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
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 4 - Field Effect Transistors"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4_1 Page No. 98"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"IDSS = 0.01 ampere\n",
"VP= -4.00 volts\n",
"VGS = -2.00 volts\n",
"VDSmin =VGS-VP=2.00 volts\n",
"ID =IDSS*(1-VGS/VP)**2= 2.50e-03 ampere\n"
]
}
],
"source": [
"from __future__ import division \n",
"IDSS=10*10**(-3)\n",
"print \"IDSS = %0.2f\"%(IDSS),\" ampere\" # maximum drain current\n",
"VP=(-4)\n",
"print \"VP= %0.2f\"%(VP),\" volts\" # pinch off voltage \n",
"VGS=(-2)\n",
"print \"VGS = %0.2f\"%(VGS),\" volts\" # gate to source voltage \n",
"VDSmin=VGS-VP\n",
"print \"VDSmin =VGS-VP=%0.2f\"%(VDSmin),\" volts\" # Drain to source voltage \n",
"ID=IDSS*(1-VGS/VP)**2\n",
"print \"ID =IDSS*(1-VGS/VP)**2= %0.2e\"%(ID),\" ampere\" # drain current"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4_2 Page No. 99"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"IDSS = 0.01 ampere\n",
"VP= -4.00 volts\n",
"VGS = 0.00 volts\n",
"RDS = 1/[(2*(IDSS/(-VP)))*(1-VGS/VP)]=200.00 ohm\n",
"VGS = -2.00 volts\n",
"RDS = 1/[(2*(IDSS/(-VP)))*(1-VGS/VP)]=400.00 ohm\n"
]
}
],
"source": [
"from __future__ import division \n",
"IDSS=10*10**(-3)\n",
"print \"IDSS = %0.2f\"%(IDSS),\" ampere\" # maximum drain current\n",
"VP=(-4)\n",
"print \"VP= %0.2f\"%(VP),\" volts\" # pinch off voltage \n",
"VGS=(0)\n",
"print \"VGS = %0.2f\"%(VGS),\" volts\" # gate to source voltage1 \n",
"RDS=1/((2*(IDSS/(-VP)))*(1-VGS/VP))#formula for JFET\n",
"print \"RDS = 1/[(2*(IDSS/(-VP)))*(1-VGS/VP)]=%0.2f\"%(RDS),\" ohm\" # drain to source resistance for VGS=0V\n",
"VGS=(-2)\n",
"print \"VGS = %0.2f\"%(VGS),\" volts\" # gate to source voltage2 \n",
"RDS=1/((2*(IDSS/(-VP)))*(1-VGS/VP))\n",
"print \"RDS = 1/[(2*(IDSS/(-VP)))*(1-VGS/VP)]=%0.2f\"%(RDS),\" ohm\" # drain to source resistance for VGS=(-2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4_3 Page No. 104"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ID = 0.01 ampere\n",
"VDD= 24.00 volts\n",
"VT= 5.00 volts\n",
"VGS= 10.00 volts\n",
"KF = ID/(VGS-VT)**2 = 4.00e-04 A/V**2\n",
"VDS =VGS= 7.00 volts\n",
"ID =KF*(VGS-VT)**2= 1.60e-03 ampere\n",
"RL=(VDD-VDS)/ID= 1.06e+04 ohm\n"
]
}
],
"source": [
"from __future__ import division \n",
"ID=10*10**(-3)\n",
"print \"ID = %0.2f\"%(ID),\" ampere\" # given drain current \n",
"VDD=(24)\n",
"print \"VDD= %0.2f\"%(VDD),\" volts\" # Drain voltage \n",
"VT=(5)\n",
"print \"VT= %0.2f\"%(VT),\" volts\" # Threshold voltage \n",
"VGS=(10)\n",
"print \"VGS= %0.2f\"%(VGS),\" volts\" # gate to source voltage1 \n",
"KF=ID/(VGS-VT)**2\n",
"print \"KF = ID/(VGS-VT)**2 = %0.2e\"%(KF),\" A/V**2\" # To calculate Scale factor for finding ID2\n",
"VDS=(7)\n",
"print \"VDS =VGS= %0.2f\"%(VDS),\" volts\" # drain to source voltage \n",
"VGS=(VDS)\n",
"ID=KF*(VGS-VT)**2\n",
"print \"ID =KF*(VGS-VT)**2= %0.2e\"%(ID),\" ampere\" # New drain current for VDS=24V\n",
"RL=(VDD-VDS)/ID\n",
"print \"RL=(VDD-VDS)/ID= %0.2e\"%(RL)+ \" ohm\" #calculation for load resistance at VDS=24V"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4_4 Page No. 105"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"part(i) \n",
"IDSS = 0.01 ampere\n",
"VP= 2.00 volts\n",
"IDQ = 0.00 ampere\n",
"gm =[(2)*sqrt(IDQ*IDSS)]/VP= 4.70e-03 A/V\n",
"part(ii) \n",
"IDQ = 0.01 ampere\n",
"IDSS = 0.01 ampere\n",
"VP= 6.00 volts\n",
"gm =[(2)*sqrt(IDQ*IDSS)]/VP= 3.17e-03 A/V\n",
"part(iii) \n",
"IDQ = 1.00e-03 ampere\n",
"KF = 2.50e-04 A/V**2\n",
"gm =sqrt(4*IDQ*KF)= 1.00e-03 A/V\n",
"part(iv) \n",
"IDQ = 9.10e-04 ampere\n",
"KF = 3.75e-04 A/V**2\n",
"gm =sqrt(4*IDQ*KF)= 1.17e-03 A/V\n"
]
}
],
"source": [
"from math import sqrt\n",
"from __future__ import division \n",
"print \"part(i) \"# part(i) of this question\n",
"IDSS=5*10**(-3)\n",
"print \"IDSS = %0.2f\"%(IDSS),\" ampere\" # maximum drain current JFET 1\n",
"VP=(2)\n",
"print \"VP= %0.2f\"%(VP),\" volts\" # pinch off voltage for JFET 1\n",
"IDQ=4.42*10**(-3)\n",
"print \"IDQ = %0.2f\"%(IDQ),\" ampere\" # drain current for JFET 1\n",
"gm=((2)*sqrt(IDQ*IDSS))/VP\n",
"print \"gm =[(2)*sqrt(IDQ*IDSS)]/VP= %0.2e\"%(gm),\" A/V\"# calculating transconductance for JFET with IDQ = 4.42 mA\n",
"\n",
"print \"part(ii) \"# part(ii) of this question\n",
"IDQ=6.04*10**(-3)\n",
"print \"IDQ = %0.2f\"%(IDQ),\" ampere\" # drain current for JFET 1\n",
"IDSS=15*10**(-3)\n",
"print \"IDSS = %0.2f\"%(IDSS),\" ampere\" # maximum drain current JFET2\n",
"VP=(6)\n",
"print \"VP= %0.2f\"%(VP),\" volts\" # pinch off voltage for JFET2 \n",
"gm=((2)*sqrt(IDQ*IDSS))/VP\n",
"print \"gm =[(2)*sqrt(IDQ*IDSS)]/VP= %0.2e\"%(gm),\" A/V\"# calculating transconductance for JFET with IDQ = 6.04 mA\n",
"\n",
"print \"part(iii) \"# part(iii) of this question\n",
"IDQ=1*10**(-3)\n",
"print \"IDQ = %0.2e\"%(IDQ),\" ampere\" # drain current for EMOSFET 1\n",
"KF=0.25*10**(-3)\n",
"print \"KF = %0.2e\"%(KF),\" A/V**2\" # Scale factor for finding EMOSFET1\n",
"gm=sqrt(4*IDQ*KF)\n",
"print \"gm =sqrt(4*IDQ*KF)= %0.2e\"%(gm),\" A/V\"# calculating transconductance for EMOSFET1 with IDQ = 1 mA\n",
"\n",
"print \"part(iv) \"# part(iv) of this question\n",
"IDQ=0.91*10**(-3)\n",
"print \"IDQ = %0.2e\"%(IDQ),\" ampere\" # drain current for EMOSFET 2\n",
"KF=0.375*10**(-3)\n",
"print \"KF = %0.2e\"%(KF),\" A/V**2\" # Scale factor for finding EMOSFET2\n",
"gm=sqrt(4*IDQ*KF)\n",
"print \"gm =sqrt(4*IDQ*KF)= %0.2e\"%(gm),\" A/V\"# calculating transconductance for EMOSFET2 with IDQ = 0.91 mA"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4_5 Page No. 106"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"IDQmax = 0.01 ampere\n",
"IDQmin = 0.00 ampere\n",
"VDD= 20.00 volts\n",
"VDSmin= 6.00 volts\n",
"ID = 2.40e-03 ampere\n",
"VGG= 3.00 volts\n",
"Ri= 1.00e+05 ohm\n",
"RF= (VGG-0)/(ID-0)= 1250.00 ohm\n",
"R1= VDD*Ri/VGG= 6.67e+05 ohm\n",
"R2= R1*VGG/(VDD-VGG)= 1.18e+05 ohm\n",
"RL=[((VDD-VDSmin)/IDmax)-RF]=1550.00 ohm\n"
]
}
],
"source": [
"from __future__ import division \n",
"IDQmax=5*10**(-3)\n",
"print \"IDQmax = %0.2f\"%(IDQmax),\" ampere\" # drain current for JFET for maximum transfer characteristics\n",
"IDmax=IDQmax# maximum drain current will be given by IDQmax\n",
"IDQmin=3*10**(-3)\n",
"print \"IDQmin = %0.2f\"%(IDQmin),\" ampere\" # drain current for JFET for minimum transfer characteristics \n",
"VDD=(20)\n",
"print \"VDD= %0.2f\"%(VDD),\" volts\" # Drain voltage supply\n",
"VDSmin=(6)\n",
"print \"VDSmin= %0.2f\"%(VDSmin),\" volts\" # minimum Drain to source voltage supply\n",
"ID=2.4*10**(-3)\n",
"print \"ID = %0.2e\"%(ID),\" ampere\" # drain current chosen for operation within max and min limits \n",
"VGG=3\n",
"print \"VGG= %0.2f\"%(VGG),\" volts\" # Gate voltage from fig.\n",
"Ri=100*10**(3)\n",
"print \"Ri= %0.2e\"%(Ri)+ \" ohm\" #eqivalent input resistance\n",
"RF=(VGG-0)/(ID-0)\n",
"print \"RF= (VGG-0)/(ID-0)= %0.2f\"%(RF)+ \" ohm\" #calculation for feedback resistance \n",
"R1=VDD*Ri/VGG #using formulae VGG=VDD*Ri/R1\n",
"print \"R1= VDD*Ri/VGG= %0.2e\"%(R1)+ \" ohm\" #calculation for first resistance R1 at input side\n",
"R2=R1*VGG/(VDD-VGG)\n",
"print \"R2= R1*VGG/(VDD-VGG)= %0.2e\"%(R2)+ \" ohm\" #calculation for second resistance R2 at input side\n",
"RL=(((VDD-VDSmin)/IDmax)-RF) # using formulae VDD=IDmax(RL+RF)+VDSmin\n",
"print \"RL=[((VDD-VDSmin)/IDmax)-RF]=%0.2f\"%(RL)+ \" ohm\" #Load resistance calculation"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4_6 Page No. 107"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"IDSS = 0.05 ampere\n",
"VP= -10.00 volts\n",
"VGSQ= -5.00 volts\n",
"ID =IDSS*(1-VGS/VP)**2= 0.01 ampere\n",
"RF= (VGSQ)/(ID)= 400.00 ohm\n"
]
}
],
"source": [
"from __future__ import division \n",
"IDSS=50*10**(-3)\n",
"print \"IDSS = %0.2f\"%(IDSS),\" ampere\" # maximum drain current JFET \n",
"VP=(-10)\n",
"print \"VP= %0.2f\"%(VP),\" volts\" # pinch off voltage for JFET \n",
"VGSQ=(-5)\n",
"print \"VGSQ= %0.2f\"%(VGSQ),\" volts\" # Gate operating point voltage \n",
"ID=IDSS*(1-VGSQ/VP)**2\n",
"print \"ID =IDSS*(1-VGS/VP)**2= %0.2f\"%(ID),\" ampere\" # drain current JFET \n",
"RF=abs(VGSQ/ID) \n",
"print \"RF= (VGSQ)/(ID)= %0.2f\"%(RF)+ \" ohm\" #calculation for feedback resistance "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4_7 Page No. 108"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"IDSS = 0.01 ampere\n",
"RL= 910.00 ohm\n",
"RF= 2290.00 ohm\n",
"R1= 1.20e+07 ohm\n",
"R2= 8.57e+06 ohm\n",
"VDD= 24.00 volts\n",
"VP= -2.00 volts\n",
"VGG= VDD*R2/(R1+R2)=10.00 volts\n",
"Quadratic equation =5.244*ID**(2)-55.76*ID+144=0\n",
"ID = 0.00 ampere\n",
"Since ID <=IDSS, hence ID=6.214 mA cannot be chosen, so we chose ID=4.42 mA\n",
"IDQ =0.00 A\n",
"VGSQ = VGG-IDQ*RF = -0.12 volts\n",
"VDSQ= VDD-IDQ*(RL+RF)= 9.86 volts\n",
"VDGQ = VDSQ-VGSQ =9.98 volts\n",
"VDGQ >magnitude_VP,Hence FET is in pinch off region\n"
]
}
],
"source": [
"from sympy import symbols,solve\n",
"from __future__ import division \n",
"IDSS=5*10**(-3)\n",
"print \"IDSS = %0.2f\"%(IDSS),\" ampere\" # maximum drain current JFET \n",
"RL=910\n",
"print \"RL= %0.2f\"%(RL)+ \" ohm\" #Load resistance\n",
"RF=2.29*10**(3) \n",
"print \"RF= %0.2f\"%(RF)+ \" ohm\" # feedback resistance \n",
"R1=12*10**(6)\n",
"print \"R1= %0.2e\"%(R1)+ \" ohm\" # first resistance R1 at input side\n",
"R2=8.57*10**(6)\n",
"print \"R2= %0.2e\"%(R2)+ \" ohm\" # second resistance R2 at input side\n",
"VDD=(24)\n",
"print \"VDD= %0.2f\"%(VDD),\" volts\" # Drain voltage supply\n",
"VP=(-2)\n",
"print \"VP= %0.2f\"%(VP),\" volts\" # pinch off voltage for JFET \n",
"VGG=(VDD*R2)/(R1+R2)\n",
"print \"VGG= VDD*R2/(R1+R2)=%0.2f\"%(VGG),\" volts\" # Gate voltage for JFET\n",
"print \"Quadratic equation =5.244*ID**(2)-55.76*ID+144=0\"# Forming Quadratic equation using VGS = VGG-ID*RF and ID = IDSS(1-VGS/VP)**2 where ID in mA\n",
"p = [5.244, -55.76, 144]\n",
"P=symbols('P')\n",
"ID=solve(p[0]*P**2+p[1]*P+p[2])[0]*10**(-3)# values of ID converted into Ampere by multiplying by 10**(-3)\n",
"print \"ID = %0.2f\"%(ID),\" ampere\" # drain current JFET \n",
"print \"Since ID <=IDSS, hence ID=6.214 mA cannot be chosen, so we chose ID=4.42 mA\"\n",
"IDQ=4.42*10**(-3) \n",
"print \"IDQ =%0.2f\"%(IDQ),\" A\"#Since ID <=IDSS, hence ID=6.214 mA cannot be chosen, so we chose ID=4.42 mA\n",
"VGSQ=VGG-IDQ*RF\n",
"print \"VGSQ = VGG-IDQ*RF = %0.2f\"%(VGSQ),\" volts\" # Gate operating point voltage \n",
"VDSQ=VDD-IDQ*(RL+RF)\n",
"print \"VDSQ= VDD-IDQ*(RL+RF)= %0.2f\"%(VDSQ),\" volts\" # Drain voltage for JFET\n",
"VDGQ=VDSQ-VGSQ\n",
"print \"VDGQ = VDSQ-VGSQ =%0.2f\"%(VDGQ),\" volts\" # Drain-Gate voltage for JFET\n",
"print \"VDGQ >magnitude_VP,Hence FET is in pinch off region\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4_8 Page No. 108"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"IDSS = 0.01 ampere\n",
"RL= 910.00 ohm\n",
"RF= 2290.00 ohm\n",
"R1= 1.20e+07 ohm\n",
"R2= 8.57e+06 ohm\n",
"VDD= 24.00 volts\n",
"VP= -6.00 volts\n",
"VGG= VDD*R2/(R1+R2)=10.00 volts\n",
"Quadratic equation =5.244*ID**(2)-75.68*ID+256=0\n",
"ID = 0.01 ampere\n",
"VDG= 9.08 volts\n",
"since VDG < magnitude_VP for ID=9.0189 mA which is inappropriate for JFET pinch off region ,hence ID=5.4128 mA is choosen !\n",
"IDQ =0.01 ampere\n",
"VGSQ = VGG-IDQ*RF = -2.39 volts\n",
"VDSQ= VDD-IDQ*(RL+RF)= 6.69 volts\n",
"VDGQ = VDSQ-VGSQ =9.08 volts\n",
"VDGQ > VP,Hence FET is in pinch off region\n"
]
}
],
"source": [
"from sympy import symbols,solve\n",
"from __future__ import division \n",
"IDSS=15*10**(-3)\n",
"print \"IDSS = %0.2f\"%(IDSS),\" ampere\" # maximum drain current of JFET \n",
"RL=910\n",
"print \"RL= %0.2f\"%(RL)+ \" ohm\" #Load resistance\n",
"RF=2.29*10**(3) \n",
"print \"RF= %0.2f\"%(RF)+ \" ohm\" # feedback resistance \n",
"R1=12*10**(6)\n",
"print \"R1= %0.2e\"%(R1)+ \" ohm\" # first resistance R1 at input side\n",
"R2=8.57*10**(6)\n",
"print \"R2= %0.2e\"%(R2)+ \" ohm\" # second resistance R2 at input side\n",
"VDD=(24)\n",
"print \"VDD= %0.2f\"%(VDD),\" volts\" # Drain voltage supply\n",
"VP=(-6)\n",
"print \"VP= %0.2f\"%(VP),\" volts\" # pinch off voltage for JFET \n",
"VGG=(VDD*R2)/(R1+R2)\n",
"print \"VGG= VDD*R2/(R1+R2)=%0.2f\"%(VGG),\" volts\" # Gate voltage for JFET\n",
"print \"Quadratic equation =5.244*ID**(2)-75.68*ID+256=0\"# where ID in mA\n",
"p = [5.244, -75.68, 256]\n",
"P=symbols('P')\n",
"ID=solve(p[0]*P**2+p[1]*P+p[2])[0]*10**(-3)#values of ID converted into Ampere by multiplying by 10**(-3)\n",
"print \"ID = %0.2f\"%(ID),\" ampere\" # drain current JFET \n",
"VDG=VDD-(ID*RL)-VGG\n",
"print \"VDG= %0.2f\"%(VDG),\" volts\" # Drain-gate voltage for JFET\n",
"print \"since VDG < magnitude_VP for ID=9.0189 mA which is inappropriate for JFET pinch off region ,hence ID=5.4128 mA is choosen !\" \n",
"IDQ=5.41*10**(-3) # since VDG < magnitude_VP for ID=9.0189 mA which is inappropriate for JFET pinch off region ,hence ID=5.4128 mA is choosen !\n",
"print \"IDQ =%0.2f\"%(IDQ),\" ampere\"\n",
"VGSQ=VGG-IDQ*RF\n",
"print \"VGSQ = VGG-IDQ*RF = %0.2f\"%(VGSQ),\" volts\" # Gate operating point voltage \n",
"VDSQ=VDD-IDQ*(RL+RF)\n",
"print \"VDSQ= VDD-IDQ*(RL+RF)= %0.2f\"%(VDSQ),\" volts\" # Drain voltage for JFET\n",
"VDGQ=VDSQ-VGSQ\n",
"print \"VDGQ = VDSQ-VGSQ =%0.2f\"%(VDGQ),\" volts\" # Drain-Gate voltage for JFET\n",
"print \"VDGQ > VP,Hence FET is in pinch off region\"\n",
"\n",
"# NOTE :all values of book ans is wrong so give note-INCOMPLETE QUESTION\n",
"#Roots for drain current quadratic equation are wrong in the book thus value for VGSQ,VDSQ and VDGQ are also wrong"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4_9 Page No. 112"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"RL= 12000.00 ohm\n",
"RF= 6000.00 ohm\n",
"R1= 1.20e+07 ohm\n",
"R2= 8.57e+06 ohm\n",
"VDD= 24.00 volts\n",
"VT= 3.00 volts\n",
"KF= 0.00 A/V**2\n",
"VGG= VDD*R2/(R1+R2)=10.00 volts\n",
"Quadratic equation =9*ID**(2)-25*ID+16=0\n",
"ID = 0.00 A\n",
"VGS = VGG-ID*RF = 4.00 volts\n",
"Since VGS < VT for ID=1.78 mA, hence ID = 1.78 mA cannot be chosen, so we chose ID= 1 mA as operating drain current IDQ\n",
"IDQ =0.00 A\n",
"VGSQ = VGG-IDQ*RF = 4.00 volts\n",
"VDSQ= VDD-IDQ*(RL+RF)= 6.00 volts\n"
]
}
],
"source": [
"from sympy import symbols,solve\n",
"from __future__ import division \n",
"RL=12*10**(3)\n",
"print \"RL= %0.2f\"%(RL)+ \" ohm\" #Load resistance\n",
"RF=6*10**(3) \n",
"print \"RF= %0.2f\"%(RF)+ \" ohm\" # feedback resistance \n",
"R1=12*10**(6)\n",
"print \"R1= %0.2e\"%(R1)+ \" ohm\" # first resistance R1 at input side\n",
"R2=8.57*10**(6)\n",
"print \"R2= %0.2e\"%(R2)+ \" ohm\" # second resistance R2 at input side\n",
"VDD=(24)\n",
"print \"VDD= %0.2f\"%(VDD),\" volts\" # Drain voltage supply\n",
"VT=(3)\n",
"print \"VT= %0.2f\"%(VT),\" volts\" # Threshold voltage for n-channel EMOSFET\n",
"KF=0.25*10**(-3)\n",
"print \"KF= %0.2f\"%(KF),\" A/V**2\" # Constant for n-channel EMOSFET \n",
"VGG=(VDD*R2)/(R1+R2)\n",
"print \"VGG= VDD*R2/(R1+R2)=%0.2f\"%(VGG),\" volts\" # Gate voltage for n-channel EMOSFET \n",
"print \"Quadratic equation =9*ID**(2)-25*ID+16=0\"# IDS=KF*(VGS-VT)**2 and VGS=VGG-ID*RD ,so Quadratic equation formed is :IDS=KF*(VGG-ID*RD-VT)**2 where ID in mA\n",
"p = [9, -25, 16]\n",
"P=symbols('P')\n",
"ID=solve(p[0]*P**2+p[1]*P+p[2])[0]*10**(-3)#values of ID converted into Ampere by multiplying by 10**(-3)\n",
"print \"ID = %0.2f\"%(ID),\" A\" # drain current n-channel EMOSFET in Ampere \n",
"VGS=VGG-ID*RF# For ID=1.78 mA and ID=1mA\n",
"print \"VGS = VGG-ID*RF = %0.2f\"%(VGS),\" volts\" # Gate operating point voltage \n",
"print \"Since VGS < VT for ID=1.78 mA, hence ID = 1.78 mA cannot be chosen, so we chose ID= 1 mA as operating drain current IDQ\"\n",
"IDQ=1*10**(-3)\n",
"print \"IDQ =%0.2f\"%(IDQ),\"A\"#Since VGS < VT for ID=1.78 mA, hence ID = 1.78 mA cannot be chosen, so we chose ID= 1 mA as operating drain current IDQ\n",
"VGSQ=VGG-IDQ*RF\n",
"print \"VGSQ = VGG-IDQ*RF = %0.2f\"%(VGSQ),\" volts\" # Gate operating point voltage \n",
"VDSQ=VDD-IDQ*(RL+RF)\n",
"print \"VDSQ= VDD-IDQ*(RL+RF)= %0.2f\"%(VDSQ),\" volts\" # Drain voltage for n-channel EMOSFET \n",
"# NOTE:Value of VGS= -0.6676390 volts for ID=1.78 mA but in book given as -0.68 V"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4_10 Page No. 113"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"RL= 12000.00 ohm\n",
"RF= 6000.00 ohm\n",
"R1= 1.20e+07 ohm\n",
"R2= 8.57e+06 ohm\n",
"VDD= 24.00 volts\n",
"VT= 3.00 volts\n",
"KF= 0.00 A/V**2\n",
"VGG= VDD*R2/(R1+R2)=10.00 volts\n",
"Quadratic equation =36*ID**(2)-86.67*ID+49=0\n",
"ID = 0.00 A\n",
"VGS = VGG-ID*RF = 4.56 volts\n",
"Since VGS < VT for ID=1.5 mA, hence ID = 1.5 mA cannot be chosen, so we chose ID= 0.91 mA as operating drain current IDQ\n",
"IDQ =0.00 A\n",
"change in IDQ = 9.00 percent\n",
"VGSQ = VGG-IDQ*RF = 4.54 volts\n",
"VDSQ= VDD-IDQ*(RL+RF)= 7.62 volts\n"
]
}
],
"source": [
"from math import sqrt\n",
"from __future__ import division \n",
"RL=12*10**(3)\n",
"print \"RL= %0.2f\"%(RL)+ \" ohm\" #Load resistance\n",
"RF=6*10**(3) \n",
"print \"RF= %0.2f\"%(RF)+ \" ohm\" # feedback resistance \n",
"R1=12*10**(6)\n",
"print \"R1= %0.2e\"%(R1)+ \" ohm\" # first resistance R1 at input side\n",
"R2=8.57*10**(6)\n",
"print \"R2= %0.2e\"%(R2)+ \" ohm\" # second resistance R2 at input side\n",
"VDD=(24)\n",
"print \"VDD= %0.2f\"%(VDD),\" volts\" # Drain voltage supply\n",
"VT=(3)\n",
"print \"VT= %0.2f\"%(VT),\" volts\" # Threshold voltage for n-channel EMOSFET\n",
"KF=0.375*10**(-3)\n",
"print \"KF= %0.2f\"%(KF),\" A/V**2\" # Constant for n-channel EMOSFET \n",
"VGG=(VDD*R2)/(R1+R2)\n",
"print \"VGG= VDD*R2/(R1+R2)=%0.2f\"%(VGG),\" volts\" # Gate voltage for n-channel EMOSFET \n",
"print \"Quadratic equation =36*ID**(2)-86.67*ID+49=0\"# IDS=KF*(VGS-VT)**2 and VGS=VGG-ID*RD ,so Quadratic equation formed is :IDS=KF*(VGG-ID*RD-VT)**2 ,where ID in mA\n",
"p = [36, -86.67, 49]\n",
"P=symbols('P')\n",
"ID=solve(p[0]*P**2+p[1]*P+p[2])[0]*10**(-3)#values of ID converted into Ampere by multiplying by 10**(-3)\n",
"print \"ID = %0.2f\"%(ID),\" A\" # drain current n-channel EMOSFET in Ampere \n",
"VGS=VGG-ID*RF# Gate voltage for ID = 1.5 mA and ID = 0.91 mA\n",
"print \"VGS = VGG-ID*RF = %0.2f\"%(VGS),\" volts\" # Gate voltage \n",
"print \"Since VGS < VT for ID=1.5 mA, hence ID = 1.5 mA cannot be chosen, so we chose ID= 0.91 mA as operating drain current IDQ\"\n",
"IDQ=0.91*10**(-3)\n",
"print \"IDQ =%0.2f\"%(IDQ),\" A\"#Since VGS < VT for ID=1.5 mA, hence ID = 1.5 mA cannot be chosen, so we chose ID= 0.91 mA as operating drain current IDQ\n",
"change_IDQ=((1-0.91)*100)/(1)# \n",
"print \"change in IDQ = %0.2f\"%(change_IDQ),\" percent\"# Percent change in IDQ from value 1 mA from its actual value IDQ=0.91mA\n",
"VGSQ=VGG-IDQ*RF\n",
"print \"VGSQ = VGG-IDQ*RF = %0.2f\"%(VGSQ),\" volts\" # Gate operating point voltage \n",
"VDSQ=VDD-IDQ*(RL+RF)\n",
"print \"VDSQ= VDD-IDQ*(RL+RF)= %0.2f\"%(VDSQ),\" volts\" # Drain voltage for n-channel EMOSFET \n",
"\n",
"\n",
"# note: in the textbook author has given KF = .375 but I have work with KF = .375*10**-3A/V**2"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4_11 Page No. 114"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"RF= 6000.00 ohm\n",
"VDD= 20.00 volts\n",
"part(i) \n",
"VT= 2.00 volts\n",
"KF= 0.00 A/V**2\n",
"ID = 0.00 A\n",
"RL=[VDD-VT-sqrt(ID/KF)]/ID= 16000.00 ohm\n",
"part(ii) \n",
"VT= 3.00 volts\n",
"KF= 0.00 A/V**2\n",
"Quadratic equation =(256)*ID**(2)-(546.67)*ID+289=0\n",
"ID = 0.00 A\n",
"VDS =VDD-ID*RL = 4.60 volts\n",
"IDQ =0.00 A\n",
"Percentage change= 3.80 percent\n"
]
}
],
"source": [
"from math import sqrt\n",
"from sympy import symbols,solve\n",
"from __future__ import division \n",
"RF=6*10**(3) \n",
"print \"RF= %0.2f\"%(RF)+ \" ohm\" # feedback resistance \n",
"VDD=(20)\n",
"print \"VDD= %0.2f\"%(VDD),\" volts\" # Drain voltage supply\n",
"print \"part(i) \"# part(i) of this question\n",
"VT=(2)\n",
"print \"VT= %0.2f\"%(VT),\" volts\" # Threshold voltage for EMOSFET\n",
"KF=0.25*10**(-3)\n",
"print \"KF= %0.2f\"%(KF),\" A/V**2\" # Constant for EMOSFET \n",
"ID=1*10**(-3)\n",
"print \"ID = %0.2f\"%(ID),\" A\" # drain current EMOSFET in Ampere \n",
"RL=(VDD-VT-sqrt(ID/KF))/ID # Using formulae ID=KF*(VDD-ID*RL-VT)\n",
"print \"RL=[VDD-VT-sqrt(ID/KF)]/ID= %0.2f\"%(RL)+ \" ohm\" #Load resistance\n",
"print \"part(ii) \"# part(ii) of this question\n",
"VT=(3)\n",
"print \"VT= %0.2f\"%(VT),\" volts\" # Threshold voltage for EMOSFET\n",
"KF=0.375*10**(-3)\n",
"print \"KF= %0.2f\"%(KF),\" A/V**2\" # Constant for EMOSFET \n",
"print \"Quadratic equation =(256)*ID**(2)-(546.67)*ID+289=0\"#IDS=KF*(VGS-VT)**2 =KF*(VDS-VT)**2 and VDS=VDD-ID*RL,so Quadratic equation is:IDS=KF*(VDD-ID*RL-VT)**2 ,where ID in mA\n",
"p = [256, -546.66 , 289]\n",
"P=symbols('P')\n",
"ID=solve(p[0]*P**2+p[1]*P+p[2])[0]*10**(-3)#values of ID converted into Ampere by multiplying by 10**(-3)\n",
"print \"ID = %0.2f\"%(ID),\" A\" # drain current EMOSFET in Ampere \n",
"VDS=VDD-ID*RL# Drain voltage for ID = 1.173 mA and ID = 0.962 mA\n",
"print \"VDS =VDD-ID*RL = %0.2f\"%(VDS),\" volts\" # Drain voltage \n",
"IDQ=0.962*10**(-3)\n",
"print \"IDQ =%0.2f\"%(IDQ),\" A\"#Since VDS < VT for ID=1.173 mA, hence ID = 1.173 mA cannot be chosen, so we chose ID= 0.962 mA as operating drain current IDQ\n",
"Percentage_change=((1-0.962)*100)/(1)\n",
"print \"Percentage change= %0.2f\"%(Percentage_change),\" percent\"# Percent change in IDQ value from 1 mA(part(i)) to its value ( of part(ii))IDQ=0.91mA\n",
"# NOTE: part(ii):the values of ID = 1.173 mA or ID = 0.962 mA but in book given as ID= 1.197 mA and ID = 0.939 mA .Hence (correct) Percentage_change in ID= 3.8 % but in book given as 6.1 % \n",
"# ANS is not correct check &correct"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4_12 Page No. 115"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"VDD= 5.00 volts\n",
"RL1= 1.25e+05 ohm\n",
"RL2= 2.00e+05 ohm\n",
"IDON1 =0.00 A\n",
"IDON2 =0.00 A\n",
"VDON1=VDD-IDON1*RL1= 0.64 volts\n",
"VDON2=VDD-IDON2*RL2= 0.50 volts\n"
]
}
],
"source": [
"from __future__ import division \n",
"VDD=(5)\n",
"print \"VDD= %0.2f\"%(VDD),\" volts\" # Drain voltage supply\n",
"RL1=125*10**(3)\n",
"print \"RL1= %0.2e\"%(RL1)+ \" ohm\" #Load resistance\n",
"RL2=200*10**(3)\n",
"print \"RL2= %0.2e\"%(RL2)+ \" ohm\" #Load resistance\n",
"IDON1=34.88*10**(-6)\n",
"print \"IDON1 =%0.2f\"%(IDON1),\" A\"#Drain current for load line 1 from fig.\n",
"IDON2=22.5*10**(-6)\n",
"print \"IDON2 =%0.2f\"%(IDON2),\" A\"#Drain current for load line 2 from fig.\n",
"VDON1=VDD-IDON1*RL1\n",
"print \"VDON1=VDD-IDON1*RL1= %0.2f\"%(VDON1),\" volts\" # output voltage at drain terminal for IDON1\n",
"VDON2=VDD-IDON2*RL2\n",
"print \"VDON2=VDD-IDON2*RL2= %0.2f\"%(VDON2),\" volts\" # output voltage at drain terminal for IDON2"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4_13 Page No. 120"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"IDSS = 0.01 ampere\n",
"VP= -4.00 volts\n",
"VGS= 0.00 volts\n",
"VDD= 10.00 volts\n",
"RL= 500.00 ohm\n",
"VDS=VDD-ID*RL= 5.00 volts\n",
"VDS>VP,so pinch off region\n",
"RL= 750.00 ohm\n",
"VDS=VDD-ID*RL= 2.50 volts\n",
"VDS<VP,so ohmic region\n"
]
}
],
"source": [
"from __future__ import division \n",
"IDSS=10*10**(-3)\n",
"print \"IDSS = %0.2f\"%(IDSS),\" ampere\" # maximum drain current for n-channel DEMOSFET\n",
"ID=IDSS # since VGS=0V, so ID=maximum\n",
"VP=(-4)\n",
"print \"VP= %0.2f\"%(VP),\" volts\" # pinch off voltage \n",
"VGS=(0)\n",
"print \"VGS= %0.2f\"%(VGS),\" volts\" # Gate to source voltage \n",
"VDD=(10)\n",
"print \"VDD= %0.2f\"%(VDD),\" volts\" # Drain supply voltage \n",
"RL=0.5*10**(3)\n",
"print \"RL= %0.2f\"%(RL)+ \" ohm\" #Load resistance\n",
"VDS=VDD-ID*RL\n",
"print \"VDS=VDD-ID*RL= %0.2f\"%(VDS),\" volts\" # Drain to source voltage ,since VDS>VP DEMOSFET is in pinch off\n",
"print \"VDS>VP,so pinch off region\"\n",
"RL=0.75*10**(3)\n",
"print \"RL= %0.2f\"%(RL)+ \" ohm\" # New Load resistance value\n",
"VDS=VDD-ID*RL\n",
"print \"VDS=VDD-ID*RL= %0.2f\"%(VDS),\" volts\" # New Drain to source voltage for RL=750 ohm\n",
"print \"VDS<VP,so ohmic region\"# since VDS < VP DEMOSFET is in ohmic region for RL=750 ohm and hence will not operate as a current source"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4_14 Page No. 122"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"KF1 = 2.50e-04 A/V**2\n",
"KF2 = 2.50e-04 A/V**2\n",
"IQ= 1.00e-03 ampere\n",
"VT1 = 2.00 volts\n",
"VT2 = 2.00 volts\n",
"VDD= 15.00 volts\n",
"IREF =IQ= 1.00e-03 ampere\n",
"VGS= VT1+sqrt(2*IREF/KF1)=4.83 volts\n",
"R= (VDD-VGS)/IREF=10171.57 ohm\n"
]
}
],
"source": [
"from math import sqrt\n",
"from __future__ import division \n",
"KF1=0.25*10**(-3)\n",
"print \"KF1 = %0.2e\"%(KF1),\" A/V**2\" # Scale factor \n",
"KF2=KF1\n",
"print \"KF2 = %0.2e\"%(KF2),\" A/V**2\" # Scale factor \n",
"IQ=1*10**(-3)\n",
"print \"IQ= %0.2e\"%(IQ),\" ampere\" # constant current source value\n",
"VT1=2\n",
"print \"VT1 = %0.2f\"%(VT1),\" volts\"# Threshold voltage\n",
"VT2=VT1\n",
"print \"VT2 = %0.2f\"%(VT2),\" volts\"# Threshold voltage\n",
"VDD=(15)\n",
"print \"VDD= %0.2f\"%(VDD),\" volts\" # Drain supply voltage \n",
"IREF=IQ\n",
"print \"IREF =IQ= %0.2e\"%(IREF),\" ampere\" # Reference current value\n",
"VGS=VT1+sqrt(2*IREF/KF1) # Formulae\n",
"print \"VGS= VT1+sqrt(2*IREF/KF1)=%0.2f\"%(VGS),\" volts\" # Gate to source voltage \n",
"R=(VDD-VGS)/IREF\n",
"print \"R= (VDD-VGS)/IREF=%0.2f\"%(R)+ \" ohm\" # resistance value to obtain constant current\n",
"# ERROR NOTE:values of VGS and R (correct) are 4.8284271 volts and 10171.573 ohm respectively but given in book are VGS=4V and R=11 kilo ohms"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4_15 Page No. 123"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"RON= 100.00 ohm\n",
"ROFF= 1.00e+10 ohm\n",
"Vip= 1.00 volts\n",
"Rs= 100.00 ohm\n",
"RL= 10000.00 ohm\n",
"part(i) \n",
"Vo=(Vip*RL)/(RL+RON+Rs)= 0.98 volts\n",
"ErON=[Vip*(RON+Rs)/(RL+RON+Rs)]*100= 1.96 percent\n",
"vOFF=(Vip*RL)/ROFF= 0.00 volts\n",
"OFF_isolation=20*log10(Vip/vOFF)= 120.00 dB\n",
"part(ii) \n",
"vOFF=(Vip*RON)/(Rs+RON)= 0.50 volts\n",
"OFF_isolation=20*log10((Rs+RON)/RON)= 6.02 dB\n"
]
}
],
"source": [
"from math import log10\n",
"from __future__ import division \n",
"RON=100\n",
"print \"RON= %0.2f\"%(RON)+ \" ohm\" #ON resistance of analog series switch\n",
"ROFF=10**(10)\n",
"print \"ROFF= %0.2e\"%(ROFF)+ \" ohm\" #OFF resistance analog series switch\n",
"Vip=1\n",
"print \"Vip= %0.2f\"%(Vip),\" volts\"# Peak amplitude of analog voltage\n",
"Rs=100\n",
"print \"Rs= %0.2f\"%(Rs)+ \" ohm\" #Voltage source resistance\n",
"RL=10*10**(3)\n",
"print \"RL= %0.2f\"%(RL)+ \" ohm\" #Load resistance\n",
"print \"part(i) \"# part(i) of this question\n",
"Vo=(Vip*RL)/(RL+RON+Rs)\n",
"print \"Vo=(Vip*RL)/(RL+RON+Rs)= %0.2f\"%(Vo),\" volts\"# ON voltage\n",
"ErON=(Vip*(RON+Rs)/(RL+RON+Rs))*100\n",
"print \"ErON=[Vip*(RON+Rs)/(RL+RON+Rs)]*100= %0.2f\"%(ErON),\" percent\"# Output voltage error \n",
"vOFF=(Vip*RL)/ROFF\n",
"print \"vOFF=(Vip*RL)/ROFF= %0.2f\"%(vOFF),\" volts\"# Output voltage in OFF state\n",
"OFF_isolation=20*log10(Vip/vOFF)\n",
"print \"OFF_isolation=20*log10(Vip/vOFF)= %0.2f\"%(OFF_isolation),\" dB\" # OFF_isolation=20*log10(Vip/vOFF) in dB# Thus ON error and OFF isolation decrease with increasing values of RL.\n",
"print \"part(ii) \"# part(ii) of this question\n",
"vOFF=(Vip*RON)/(Rs+RON)\n",
"print \"vOFF=(Vip*RON)/(Rs+RON)= %0.2f\"%(vOFF),\" volts\"# Output voltage in OFF state for analog shunt switch\n",
"OFF_isolation=20*log10((Rs+RON)/RON)# OFF_isolation of shunt switch\n",
"print \"OFF_isolation=20*log10((Rs+RON)/RON)= %0.2f\"%(OFF_isolation),\" dB\"# Thus shunt switch is inferior to series switch in its OFF isolation property\n",
"\n",
"# ERROR NOTE: in question the author has given RL = 10K but in solution he has used RL = 1 k ... I have done programming using RL = 10 K."
]
}
],
"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.9"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|