summaryrefslogtreecommitdiff
path: root/Solid_State_Electronics/Solid_State_electronics_Ch6.ipynb
blob: ebc711df03305dc87251692266f622f004b9414f (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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 6 : Field Effect Transistors"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.1, Page No. 184"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# drain resistance transconductance and amplification factor\n",
      "\n",
      "import math\n",
      "from array import array\n",
      "#Variable declaration\n",
      "Vgs=array('d', [0.0, 0.0, 0.3])     #in V\n",
      "Vds=array('d',[5.0, 10.0, 10.0])    #in V\n",
      "Id=array('d',[8.0, 8.2, 7.6])       #in mA\n",
      "\n",
      "#Calcualtions\n",
      "dVds=Vds[1]-Vds[0]                  #in V\n",
      "dId=Id[1]-Id[0]                     #in mA\n",
      "rd=(dVds/dId)                       #in kilo-ohm\n",
      "dVgs=Vgs[2]-Vgs[1]                  #in V\n",
      "dId1=Id[1]-Id[2]                    #in mA\n",
      "gm=dId1/dVgs                        #in mA/volt\n",
      "mu=gm*rd                            #A/V\n",
      "\n",
      "#Result\n",
      "print(\"(i)  A.C. Drain resistance is ,(kilo-ohm)= %.f\"%rd)\n",
      "print(\"(ii) Transconductance is ,(mS)           = %.f\"%gm)\n",
      "print(\"(iii) Amplification factor is ,          = %.f\"%mu)\n",
      "#Transconductance and Amplification factor are calculated wrong in the textbook"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i)  A.C. Drain resistance is ,(kilo-ohm)= 25\n",
        "(ii) Transconductance is ,(mS)           = 2\n",
        "(iii) Amplification factor is ,          = 50\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.2, Page No. 184"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# mutual conductance\n",
      "\n",
      "import math\n",
      "#Variable declaration\n",
      "I1=1.0                  # in mA\n",
      "I2=1.2                  # in mA\n",
      "V1=-3.0                 # in V\n",
      "V2=-2.9                 # in V\n",
      "\n",
      "#Calculations\n",
      "del_ID=(I2-I1)\n",
      "del_VGS=V2-V1           # in V\n",
      "gm=del_ID/del_VGS\n",
      "\n",
      "#Result\n",
      "print(\"mutual conductance,gm(mS) = %.f\"%gm)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "mutual conductance,gm(mS) = 2\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.3, Page No. 185"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# pinch off voltage\n",
      "\n",
      "import math\n",
      "#Variable declaration\n",
      "a=5.6*10**-6/2                  # channel width in m\n",
      "epsilon0=8.86*10**-12           # in F/m\n",
      "epsilon=12*epsilon0             # in F/m\n",
      "Nd=10**21                       # in m^-3\n",
      "e=1.6*10**-19                   # in V\n",
      "\n",
      "#Calculations\n",
      "Vp=e*Nd*a**2/(2*epsilon);\n",
      "\n",
      "#Result\n",
      "print(\"Pinch off voltage,Vp(V) = %.1f\"%Vp)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Pinch off voltage,Vp(V) = 5.9\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.4, Page No. 185"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# ID gm and gmo\n",
      "\n",
      "import math\n",
      "#Variable declaration\n",
      "I_DES=8.7                 # in mA\n",
      "V1=-3.0                   # in V\n",
      "V_GS=-1.0                 # in V\n",
      "\n",
      "\n",
      "#Calculations\n",
      "gmo=-(2*I_DES/V1)\n",
      "ID=I_DES*(1-(V_GS/V1))**2\n",
      "gm=gmo*(1-(V_GS/V1));\n",
      "\n",
      "#Result\n",
      "print(\"(i).  ID(mA)  = %.3f\"%(math.floor(ID*1000)/1000))\n",
      "print(\"(ii). gmo(mS) = %.1f\"%gmo)\n",
      "print(\"(iii).gm(mA)  = %.3f\"%(math.floor(gm*1000)/1000))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i).  ID(mA)  = 3.866\n",
        "(ii). gmo(mS) = 5.8\n",
        "(iii).gm(mA)  = 3.866\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.5, Page No. 186"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Vgs\n",
      "\n",
      "import math\n",
      "#Variable declaration\n",
      "ID=3.0                         # in mA\n",
      "I_DSS=9.0                      # in mA\n",
      "Vp=-4.5                        # in V\n",
      "\n",
      "#Calculations\n",
      "Vgs=-Vp*(math.sqrt(ID/I_DSS)-1)\n",
      "\n",
      "\n",
      "#Result\n",
      "print(\"Vgs(V) = %.1f\"%Vgs)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Vgs(V) = -1.9\n"
       ]
      }
     ],
     "prompt_number": 25
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.6, Page No. 196"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# voltage amplification\n",
      "\n",
      "import math\n",
      "#Variable declaration\n",
      "gm=3                  #Transconductance in mS\n",
      "rl=10                 #load resistance in kilo-ohm\n",
      "\n",
      "#Calculations\n",
      "av=gm*rl\n",
      "#Result\n",
      "print(\"the voltage aplification is ,= %.f\"%av)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the voltage aplification is ,= 30\n"
       ]
      }
     ],
     "prompt_number": 27
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.7, Page No. 196"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# output voltage\n",
      "\n",
      "import math\n",
      "#Variable declaration\n",
      "Rl=20.0                   #in kilo-ohm\n",
      "Rs=1.0                    #in kilo-ohm\n",
      "Rg=1.0                    #in M-ohm\n",
      "Cs=25.0                   #in micro-F\n",
      "mu=20.0                   #amplification factor\n",
      "rd=100.0                  #in kilo-ohm\n",
      "vi=2.0                    #in V\n",
      "f=1.0                     #in kilo-Hz\n",
      "\n",
      "#Calculations\n",
      "Xc=((1/(2*math.pi*f*10**3*Cs*10**-6)))\n",
      "A=((mu*Rl*10**3)/((rd+Rl)*10**3))\n",
      "Vo=A*vi\n",
      "\n",
      "#Result\n",
      "print(\"amplifier output signal voltage is ,(V)= %.2f\"%(math.floor(Vo*100)/100))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "amplifier output signal voltage is ,(V)= 6.66\n"
       ]
      }
     ],
     "prompt_number": 3
    }
   ],
   "metadata": {}
  }
 ]
}