summaryrefslogtreecommitdiff
path: root/backup/ELECTRICAL_ENGINEERING_MATERIALS_by_R.K.Shukla_version_backup/Chapter7.ipynb
blob: 9f8fe79f1e855b296c6caf73b0d7df6864760c02 (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
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 7:Junction Rectifier,Transistors and Devices"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 7.2,Page No:7.7"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Increase in temperature necessary to increase Is by a factor by 150 is 72.29  °C\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "#given Is2/Is1 =150\n",
    "#Is2/Is1 =2**(T2-T1)/10\n",
    "#dT=10ln(I)/ln(2)\n",
    "I  = 150;\n",
    " \n",
    "\n",
    "#Calculations\n",
    "dT  = 10*math.log(I)/float(math.log(2));       #increase in temperature in °C\n",
    "\n",
    "#Result\n",
    "print'Increase in temperature necessary to increase Is by a factor by 150 is %3.2f '%dT,'°C';\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 7.3,Page No:7.7"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Current flowing through germanium diode = 25.0067  uA\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "Io  = 0.25*10**-6;        # large reverse biased current in A\n",
    "V   = 0.12;               # applied voltage in V\n",
    "Vt  = 0.026;              # Volt-equivalent of temperature in V\n",
    "\n",
    "# Calculations\n",
    "I   = Io*(math.exp(V/float(Vt))-1);     #current in A \n",
    "\n",
    "# Result\n",
    "print'Current flowing through germanium diode = %g '%(I*10**6),'uA';"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 7.4,Page No:7.12"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Diffusion co-efficients of electrons = 4.92e-03 m**2/s\n",
      "Diffusion co-efficients of holes = 6.99e-04  m**2/s\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "k   = 1.38*10**-23;          # boltzmann constant (m**2)*(kg)*(s**-2)*(K**-1)\n",
    "e   = 1.6*10**-19;           # charge of electron in coulombs\n",
    "ue  = 0.19                   # mobility of electron  in m**2.V**-1.s**-1\n",
    "uh  = 0.027;                 # mobilty of holes in m**2.V**-1.s**-1\n",
    "T   = 300;                   # temperature in K\n",
    "\n",
    "#Calculations\n",
    "Dn  = ((k*T)/float(e))*ue;           # diffusion constant of electrons in cm**2/s\n",
    "Dh  = (k*T/float(e))*uh;             # diffusion constant of holes in cm**2/s\n",
    "\n",
    "\n",
    "#Result\n",
    "print'Diffusion co-efficients of electrons = %3.2e'%Dn,'m**2/s';\n",
    "print'Diffusion co-efficients of holes = %3.2e '%Dh,'m**2/s';\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 7.6,Page No:7.13"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "resistance = 10 ohm\n",
      "Vreb = 1.0e+07 ohm\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "I1  = 20;           #current in mA\n",
    "V1  = 0.8;          #voltage in volts\n",
    "V2  = 0.7;          #voltage in volts\n",
    "I2  = 10;           # current in mA\n",
    "v3  = -10;          #voltage in volts\n",
    "I3  = -1*10**-6;     # current in mA\n",
    "\n",
    "# Calculations\n",
    "R   = (V1 - V2)/(I1 - I2);     #resistance in ohm\n",
    "Vreb  = v3/I3;                 #velocity in volts\n",
    "\n",
    "#Result\n",
    "print'resistance = %d'%(R*10**3),'ohm';\n",
    "print'Vreb = %3.1e'%Vreb,'ohm';\n",
    "       "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 7.7,Page No:7.13"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Diffusion constant of electrons = 94.3 cm**2/s\n",
      "Diffusion constant of electrons = 44.4 cm**2/s\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "T   = 300;                 # temp in kelvin\n",
    "k   = 1.38*10**-23;        # Boltzmann constant (m**2)*(kg)*(s**-2)*(K**-1)\n",
    "e   = 1.602*10**-19;       # charge of electron in coulombs\n",
    "ue  = 3650;                # mobility of electrons \n",
    "uh  = 1720;                # mobility of holes\n",
    "\n",
    "#Calculations\n",
    "De  = (ue*k*T)/float(e);       # diffusion constant of electrons in cm**2/s\n",
    "Dh  = (uh*k*T)/float(e);       # diffusion constant of holes in cm**2/s\n",
    "\n",
    "# Result\n",
    "print'Diffusion constant of electrons = %3.1f'%De,'cm**2/s';\n",
    "print'Diffusion constant of electrons = %3.1f'%Dh,'cm**2/s';\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 7.8,Page No:7.23"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Pinch-off voltage = 3.92e-02 V\n",
      " Note:calculation mistake in text book ,e value is taken as 14.16*10**-12 instead of 141.6*10**-12\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "p   = 2;                 # resistivity in ohm-m\n",
    "er  = 16;                 #relative dielectrivity of Ge cm**2/s\n",
    "up  = 1800;               # mobility of holes in cm**2/s\n",
    "e0  = 8.85*10**-12;       #permitivity in (m**-3)*(kg**-1)*(s**4)*(A**2)\n",
    "a   = 2*10**-4;           #channel height in m\n",
    "\n",
    "# Calculations\n",
    "qNa  = 1/float(up*p);\n",
    "e    = e0*er;                      #permitivity in F/cm\n",
    "Vp   = (qNa*(a**2))/float(2*e);       # pinch-off voltage in V\n",
    "\n",
    "#Result\n",
    "print'Pinch-off voltage = %3.2e'%Vp,'V';\n",
    "print' Note:calculation mistake in text book ,e value is taken as 14.16*10**-12 instead of 141.6*10**-12';\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 7.9,Page No:7.23"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "pinch off velocity =9.2 V\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "a       = 3.5*10**-6;               #channel width in m\n",
    "N       = 10**21;                   #number of electrons in electrons/m**3\n",
    "q       = 1.6*10**-19;              #charge of electron in coulombs\n",
    "er      = 12;                       #dielectric constant F/m\n",
    "e0      = 8.85*10**-12;             #dielectric constant F/m\n",
    " \n",
    "\n",
    "#calculation\n",
    "e      = (e0)*(er);                     #permitivityin F/m\n",
    "Vp     = (q*(a**2)*N)/float(2*e);        #pinch off voltage in V\n",
    "\n",
    "\n",
    "#result \n",
    "print'pinch off velocity =%2.1f'%Vp,'V';"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 7.10,Page No:7.23"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "transconductance =2.24 m*A/V\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "IDSS       = 10;               #current in mA\n",
    "IDS        =2.;                # current in mA\n",
    "Vp         = -4.0;             #pinch off voltage in V\n",
    "\n",
    "#formula\n",
    "#IDS   = IDSS*((1-(VGS/Vp))**2)\n",
    "#calculation\n",
    "VGS        = Vp*(1-(math.sqrt(IDS/float(IDSS))));\n",
    "gm         = ((-2*IDSS)/float(Vp))*(1-(VGS/float(Vp)));    #transconductance in m*A/V\n",
    "\n",
    "\n",
    "#result\n",
    "print'transconductance =%3.2f'%gm,'m*A/V';"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 7.11,Page No:7.24"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "current =1.60 mA\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "VGS       = -3;                       #pinch off voltage in V\n",
    "IDSS        =10*10**-3;                # current in A\n",
    "Vp         = -5.0;                     #pinch off voltage in V\n",
    " \n",
    "\n",
    "#calculation\n",
    "IDS   = IDSS*((1-(VGS/float(Vp)))**2);    #current in mA\n",
    "\n",
    "\n",
    "#result\n",
    "print'current =%3.2f'%(IDS*10**3),'mA';"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 7.12,Page No:7.24"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "transconductance =2.05 m S\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "IDS        = 2*10**-3;               #current in mA\n",
    "IDSS       = 8*10**-3;                # current in mA\n",
    "Vp         = -4.5;                    #pinch off voltage in V\n",
    "VGS1       = -1.902;                   #pinch off voltage  when IDS =3*10**-3 A\n",
    "\n",
    "#formula\n",
    "#IDS   = IDSS*((1-(VGS/Vp))**2)\n",
    "#calculation\n",
    "VGS        = Vp*(1-(math.sqrt(IDS/float(IDSS))));\n",
    "gm         = ((-2*IDSS)/float(Vp))*(1-(VGS1/float(Vp)));   #transconductance in m S\n",
    "\n",
    "\n",
    "#result\n",
    "print'transconductance =%3.2f'%(gm/10**-3),'m S';\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 7.13,Page No:7.25"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "resistance =1.62e+10 ohms\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "VGS        = 26;                #gate source voltage in V\n",
    "IG         = 1.6*10**-9;        #gate current in A\n",
    "\n",
    "\n",
    "#calculation\n",
    "R          = VGS/float(IG);           #gate to current resistance in ohms\n",
    "\n",
    "\n",
    "#result \n",
    "print'resistance =%3.2e'%R,'ohms';\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 7.14,Page No:7.25"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "transconductance =2.20e-03  ohm\n",
      "Note:wrong answer in textbook\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "ID1          = 1;                #current in A\n",
    "ID2          = 2.1;              # current in A\n",
    "VGS1         = 3.0;              #pinch off voltage in V\n",
    "VGS2         = 3.5;              #pinch off voltage in V\n",
    " \n",
    "\n",
    "#calculation\n",
    "dID         = ID2-ID1;\n",
    "dVGS        = VGS2-VGS1;\n",
    "gm          = (dID*10**-3)/float(dVGS);   #transconductance in mho\n",
    "\n",
    "\n",
    "#result\n",
    "print'transconductance =%3.2e '%gm,'ohm';\n",
    "print'Note:wrong answer in textbook';"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 7.15,Page No:7.25"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ac drain resistnce =30.00 k-ohms\n",
      "transconductance =4000 u mhos\n",
      "amplification factor=120.00\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "ID1         = 8;                    #drain current in mA\n",
    "ID2         = 8.3;                  #drain current in mA\n",
    "VDS1        = 5;                    #drainn source voltage in V\n",
    "VDS2        = 14;                   #drain source voltage in V\n",
    "ID3         = 7.1;                  #drain current when VDS constant VGS change\n",
    "ID4         = 8.3;                  #drain current when VDS constant VGS change\n",
    "VGS1         = 0.1;                 #drain source voltage in V\n",
    "VGS2         = 0.4;                 #drain source voltage in V\n",
    "\n",
    "#calculation\n",
    "dID1        = ID2-ID1;\n",
    "dVDS        = VDS2-VDS1;\n",
    "rd          = dVDS/float(dID1);                #ac drain resistance\n",
    "dID2        = ID4-ID3;\n",
    "dVGS        = VGS2-VGS1;\n",
    "gm          = dID2/float(dVGS);               #transconductance mhos\n",
    "u           = rd*gm;                          #amplification factor\n",
    "\n",
    "\n",
    "#result\n",
    "print'ac drain resistnce =%3.2f'%rd,'k-ohms';\n",
    "print'transconductance =%3.2d'%(gm/10**-3),'u mhos';\n",
    "print'amplification factor=%3.2f'%u;\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 7.16,Page No:7.26"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "transconductance =3.03  mmhos\n",
      "Note:transconductance value is wrongly printed in terms of umhos\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "#variable declaration\n",
    "u          = 100;              #amplification factor \n",
    "rd         = 33*10**3;         #drain resistance  in ohms\n",
    "\n",
    "\n",
    "#calculation\n",
    "gm          = u/float(rd);         #transconductance in mhos\n",
    "\n",
    "#result\n",
    "print'transconductance =%3.2f'%(gm*10**3),' mmhos';\n",
    "print'Note:transconductance value is wrongly printed in terms of umhos';\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}