diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /135/CH7/EX7.7/EX7.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '135/CH7/EX7.7/EX7.sce')
-rwxr-xr-x | 135/CH7/EX7.7/EX7.sce | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/135/CH7/EX7.7/EX7.sce b/135/CH7/EX7.7/EX7.sce new file mode 100755 index 000000000..5a41039cb --- /dev/null +++ b/135/CH7/EX7.7/EX7.sce @@ -0,0 +1,39 @@ +// Example 7.7: IDQ, VDSQ, VGSQ
+clc, clear
+ID=5e-3; // in amperes
+VGS=6; // in volts
+VT=3; // in volts
+// From Fig. 7.39(a)
+VDD=24; // in volts
+R1=10; // in mega-ohms
+R2=6.8; // in mega-ohms
+RD=2.2e3; // in ohms
+RS=0.75e3; // in ohms
+// Applying Thevnin's theorem to obtain simplified circuit in Fig. 7.39(b)
+VGG=VDD*R2/(R1+R2); // in volts
+// Plotting transfer characteristics
+k=ID/(VGS-VT)^2; // in amperes per volt square
+VGS=[3:0.01:VGG]; // Gate source voltage in volts
+ID=k*(VGS-VT)^2; // Drain current in amperes ............ (i)
+ID=ID*1e3; // Drain current in mili-amperes
+plot(VGS,ID);
+xtitle("Transfer Characteristics","VGS (V)","ID (mA)");
+// Plotting bias line
+VGS=[0:0.01:VGG]; // Gate source voltage in volts
+// Writing KVL for the gate-source loop
+ID=(VGG-VGS)/RS; // Source current in amperes
+ID=ID*1e3; // Source current in mili-amperes
+plot(VGS,ID,"RED");
+// Intersection of transfer curve with the bias curve
+// Putting VGS = VGG-ID*RD in equation (i) and solving, we get ID^2*RS^2 + (2*RS*VT - 2*VGG*RS - 1/k)*ID + (VGG-VT)^2
+// Solving the equation
+p_eq = poly([(VGG-VT)^2 (2*RS*VT-2*VGG*RS-1/k) RS^2],"x","coeff");
+p_roots= roots(p_eq);
+IDQ=p_roots(1); // in amperes
+VGSQ=VGG-IDQ*RS; // in volts
+// From the output circuit
+VDSQ=VDD-IDQ*(RD+RS); // in volts
+IDQ=IDQ*1e3; // in mili-amperes
+disp(IDQ,"IDQ (mA) =");
+disp(VDSQ,"VDSQ (V) =");
+disp(VGSQ,"VGSQ (V) =");
\ No newline at end of file |