summaryrefslogtreecommitdiff
path: root/Electrical_Circuit_Theory_And_Technology/chapter_12-checkpoint.ipynb
blob: 8adc225bd2f62dc364eb9f5624afed75eb412f13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h1>Chapter 12: Transistors</h1>"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 4, page no. 157</h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Estimate the voltage gain Av, the current gain Ai and \n",
      "#the power gain Ap when an input current of 20 \u03bcA peak varies sinusoidally about a mean bias of 50 \u03bcA.\n",
      "from __future__ import division\n",
      "import math\n",
      "#initializing  the  variables:\n",
      "Ia  =  0.040;#  in  Amperes\n",
      "I  =  50;#  in  Amperes\n",
      "Rl  =  1.2;#  in  Kohms\n",
      "Vc  =  7; # in Volts\n",
      "R = 1; # in Kohms\n",
      "Ib = 50*1E-6; # in Amps\n",
      "Iic = 20*1E-6; #in Amps\n",
      "\n",
      "#calculation:\n",
      "Vi = (70 - 30)*1E-6 * 1000\n",
      "Vo = 3.6\n",
      "Av = Vo/Vi\n",
      "\n",
      "Io = 3*1E-3\n",
      "Ii = (70 - 30)*1E-6\n",
      "Ai = Io/Ii\n",
      "\n",
      "Ap = Av*Ai\n",
      "\n",
      "#Results\n",
      "print  \"\\n\\n  Result  \\n\\n\"\n",
      "print  \"\\n  voltage gain, Av  =  \",  round(Av,2)\n",
      "print  \"\\n  Current gain, Av  =  \",  round(Ai,2)\n",
      "print  \"\\n  Power gain, Av  =  \",  round(Ap,2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "\n",
        "  Result  \n",
        "\n",
        "\n",
        "\n",
        "  voltage gain, Av  =   90.0\n",
        "\n",
        "  Current gain, Av  =   75.0\n",
        "\n",
        "  Power gain, Av  =   6750.0"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}