diff options
Diffstat (limited to '135/CH3')
51 files changed, 692 insertions, 0 deletions
diff --git a/135/CH3/EX3.10/EX10.sce b/135/CH3/EX3.10/EX10.sce new file mode 100755 index 000000000..479805441 --- /dev/null +++ b/135/CH3/EX3.10/EX10.sce @@ -0,0 +1,17 @@ +// Example 3.10: Minimum and maximum value of zener diode current
+clc, clear
+// From the Fig. 3.33
+Vsmin=120; // in volts
+Vsmax=170; // in volts
+Vz=50; // in volts
+Rs=5e3; // in ohms
+RLmin=5e3; // in ohms
+RLmax=10e3; // in ohms
+ILmin=Vz/RLmax; // in amperes
+ILmax=Vz/RLmin; // in amperes
+Izmin=((Vsmin-Vz)/Rs)-ILmax; // Minimum value of zener diode current in amperes
+Izmin=Izmin*1e3; // Minimum value of zener diode current in miliamperes
+Izmax=((Vsmax-Vz)/Rs)-ILmin; // Maximum value of zener diode current in amperes
+Izmax=Izmax*1e3; // Maximum value of zener diode current in miliamperes
+disp(Izmin,"Minimum value of zener diode current (mA) =");
+disp(Izmax,"Maximum value of zener diode current (mA) =");
\ No newline at end of file diff --git a/135/CH3/EX3.11/EX11.sce b/135/CH3/EX3.11/EX11.sce new file mode 100755 index 000000000..ae0583ffc --- /dev/null +++ b/135/CH3/EX3.11/EX11.sce @@ -0,0 +1,19 @@ +// Example 3.11: (a) V
+// (b) Voltage range of V
+clc, clear
+Vz=50; // Zener voltage in volts
+Izmin=1e-3; // in amperes
+Izmax=5e-3; // in amperes
+
+disp("Part (a)");
+ILmin=0;
+Rs=5e3; // in ohms
+V=Vz+Rs*(Izmax+ILmin); // in volts
+disp(V,"V (V) =");
+
+disp("Part (b)");
+IL=(50/15)*1e-3; // in amperes
+Vmin=Vz+Rs*(Izmin+IL); // in volts
+Vmax=Vz+Rs*(Izmax+IL); // in volts
+disp(Vmin,"Vmin (V) =");
+disp(Vmax,"Vmax (V) =");
\ No newline at end of file diff --git a/135/CH3/EX3.12/EX12.sce b/135/CH3/EX3.12/EX12.sce new file mode 100755 index 000000000..2c99f8f53 --- /dev/null +++ b/135/CH3/EX3.12/EX12.sce @@ -0,0 +1,29 @@ +// Example 3.12: Zener diode current, Power dissipation in zener diode and resistor
+clc, clear
+// In the Fig. 3.35
+Vz=6.8; // in volts
+R=100; // in ohms
+
+disp("Normal situation");
+Vs=9; // in volts
+I=(Vs-Vz)/R; // in amperes
+Pzener=I*Vz; // in watts
+Presistor=I^2*R; // in watts
+I=I*1e3; // in miliamperes
+Pzener=Pzener*1e3; // in miliwatts
+Presistor=Presistor*1e3; // in miliwatts
+disp(I,"Zener diode current (mA) =");
+disp(Pzener,"Power dissipation in zener diode (mW) =");
+disp(Presistor,"Power dissipation in resistor (mW) =");
+
+disp("Aberrant situation");
+Vs=15; // in volts
+I=(Vs-Vz)/R; // in amperes
+Pzener=I*Vz; // in watts
+Presistor=I^2*R; // in watts
+I=I*1e3; // in miliamperes
+Pzener=Pzener*1e3; // in miliwatts
+Presistor=Presistor*1e3; // in miliwatts
+disp(I,"Zener diode current (mA) =");
+disp(Pzener,"Power dissipation in zener diode (mW) =");
+disp(Presistor,"Power dissipation in resistor (mW) =");
\ No newline at end of file diff --git a/135/CH3/EX3.13/EX13.sce b/135/CH3/EX3.13/EX13.sce new file mode 100755 index 000000000..abe23809f --- /dev/null +++ b/135/CH3/EX3.13/EX13.sce @@ -0,0 +1,14 @@ +// Example 3.13: Range of load current
+clc, clear
+Vz=5; // in volts
+Izmin=50e-3; // in amperes
+Izmax=1; // in amperes
+Vmin=7.5; // in volts
+Vmax=10; // in volts
+Rs=4.75; // in ohms
+ILmin=((Vmax-Vz)/Rs)-Izmax; // in amperes
+ILmin=ILmin*1e3; // in miliamperes
+ILmax=((Vmin-Vz)/Rs)-Izmin; // in amperes
+ILmax=ILmax*1e3; // in miliamperes
+disp(ILmin,"ILmin (mA) =");
+disp(ILmax,"ILmax (mA) =");
\ No newline at end of file diff --git a/135/CH3/EX3.14/EX14.sce b/135/CH3/EX3.14/EX14.sce new file mode 100755 index 000000000..e305bb80d --- /dev/null +++ b/135/CH3/EX3.14/EX14.sce @@ -0,0 +1,18 @@ +// Exmaple 3.14: Load-current range, Series resistance in redesigned circuit
+clc, clear
+// In Fig. 3.37
+Vz=6.8; // in volts
+Izk=0.1e-3; // in amperes
+Vs=10; // in volts
+Rs=1e3; // in ohms
+ILmax=((Vs-Vz)/Rs)-Izk; // in amperes
+ILmax=ILmax*1e3; // in miliamperes
+disp(0,"ILmin =");
+disp(ILmax,"ILmax (mA) =");
+
+disp("Redesigned Part")
+RL=1e3; // in ohms
+Izk=Izk*10; // in amperes
+I=Izk+(Vz/RL); // in amperes
+R=(Vs-Vz)/I; // in ohms
+disp(R,"Series resistance (Ω) =");
\ No newline at end of file diff --git a/135/CH3/EX3.15/EX15.sce b/135/CH3/EX3.15/EX15.sce new file mode 100755 index 000000000..3700cbb13 --- /dev/null +++ b/135/CH3/EX3.15/EX15.sce @@ -0,0 +1,19 @@ +// Example 3.15: (a) Series resistance
+// (b) Power dissipation rating of zener diode
+clc, clear
+// In Fig. 3.38
+Vz=6; // in volts
+ILmin=0;
+ILmax=0.5; // in amperes
+Vmin=8; // in volts
+Vmax=10; // in volts
+Izmin=0;
+
+disp("Part (a)");
+Rs=(Vmin-Vz)/(ILmax+Izmin); // Series resistance in ohms
+disp(Rs,"Series resistance (Ω) =");
+
+disp("Part (b)");
+Izmax=((Vmax-Vz)/Rs)-ILmin; // in amperes
+Pzmax=Vz*Izmax; // in watts
+disp(Pzmax,"Power dissipation rating of zener diode (W) =");
\ No newline at end of file diff --git a/135/CH3/EX3.16/EX16.sce b/135/CH3/EX3.16/EX16.sce new file mode 100755 index 000000000..82ccf9132 --- /dev/null +++ b/135/CH3/EX3.16/EX16.sce @@ -0,0 +1,14 @@ +// Example 3.16: Series resistance R, Maximum zener current
+clc, clear
+// In Fig. 3.39
+Vz=7.2; // in volts
+ILmin=12e-3; // in amperes
+ILmax=100e-3; // in amperes
+Vs=20; // in volts
+Izmin=10e-3; // in amperes
+Rs=(Vs-Vz)/(ILmax+Izmin); // Series resistance in ohms
+disp(Rs,"Series resistance (Ω) =");
+// For ILmin=0
+Izmax=((Vs-Vz)/Rs); // in amperes
+Izmax=Izmax*1e3; // in miliamperes
+disp(Izmax,"Maximum zener current (mA) =");
\ No newline at end of file diff --git a/135/CH3/EX3.17/EX17.sce b/135/CH3/EX3.17/EX17.sce new file mode 100755 index 000000000..e99672835 --- /dev/null +++ b/135/CH3/EX3.17/EX17.sce @@ -0,0 +1,23 @@ +// Example 3.17: (a) R, maximum possible value of load current
+// (b) Range of V
+clc, clear
+Vz=50; // Diode voltage in volts
+Izmin=5e-3; // in amperes
+Izmax=40e-3; // in amperes
+
+disp("Part (a)");
+ILmin=0;
+V=200; // Input voltage in volts
+R=(V-Vz)/(Izmax-ILmin); // in ohms
+ILmax=((V-Vz)/R)-Izmin; // in amperes
+Rk=R*1e-3; // in kilo-ohms
+ILmax=ILmax*1e3; // in miliamperes
+disp(Rk,"R(kΩ) =");
+disp(ILmax,"Maximum possible value of load current (mA) =");
+
+disp("Part (b)");
+IL=25e-3;
+Vmin=Vz+R*(Izmin+IL); // in volts
+Vmax=Vz+R*(Izmax+IL); // in volts
+disp(Vmin,"Minimum value of V (V) =");
+disp(Vmax,"Maximum value of V (V) =");
\ No newline at end of file diff --git a/135/CH3/EX3.18/EX18.sce b/135/CH3/EX3.18/EX18.sce new file mode 100755 index 000000000..d261e5020 --- /dev/null +++ b/135/CH3/EX3.18/EX18.sce @@ -0,0 +1,16 @@ +// Example 3.18: R, ILmax, Power rating of zener diode
+clc, clear
+// In Fig. 3.41
+Vz=6; // in volts
+V=22; // in volts
+Izmin=10e-3; // in amperes
+Izmax=40e-3; // in amperes
+ILmin=0;
+R=(V-Vz)/(Izmax-ILmin); // in ohms
+ILmax=((V-Vz)/R)-Izmin; // in amperes
+P=Izmax*Vz; // Power rating of zener diode in watts
+ILmax=ILmax*1e3; // in miliamperes
+P=P*1e3; // Power rating of zener diode in mili-watts
+disp(R,"R(Ω) =");
+disp(ILmax,"ILmax (mA) =");
+disp(P,"Power rating of zener diode (mW) =");
\ No newline at end of file diff --git a/135/CH3/EX3.19/EX19.sce b/135/CH3/EX3.19/EX19.sce new file mode 100755 index 000000000..925f5de62 --- /dev/null +++ b/135/CH3/EX3.19/EX19.sce @@ -0,0 +1,35 @@ +// Example 3.19: (a) VL,IL,Iz,IR
+// (b) RL for maximum power dissipation for zener diode
+// (c) Maximum value of RL for zener diode to remain ON
+clc, clear
+// From Fig. 3.42
+Vs=25; // in volts
+Rs=220; // in ohms
+Vz=10; // in volts
+Pzmax=400; // in mili-watts
+Izmax=Pzmax/Vz; // in miliamperes
+Izmin=Izmax*10/100; // in miliamperes
+
+disp("Part (a)");
+RL=180; // in ohms
+VL=Vz; // in volts
+IL=Vz/RL; // in amperes
+IL=IL*1e3; // in miliamperes
+IR=(Vs-Vz)/Rs; // in amperes
+IR=IR*1e3; // in miliamperes
+Iz=IR-IL; // in miliamperes
+disp(VL,"VL (V) =");
+disp(IL,"IL (mA) =");
+disp(Iz,"Iz (mA) =");
+disp(IR,"IR (mA) =");
+
+disp("Part (b)");
+RL=Vz*1e3/(IR-Izmax); // in ohms
+disp(RL,"RL for maximum power dissipation for zener diode (Ω) =");
+
+disp("Part (c)");
+RL=Vz*1e3/(IR-Izmin); // in ohms
+disp(RL,"Maximum value of RL for zener diode to remain ON (Ω) =");
+disp("If Izmin=0");
+RL=Vz*1e3/IR; // in ohms
+disp(RL,"Maximum value of RL for zener diode to remain ON (Ω) =");
\ No newline at end of file diff --git a/135/CH3/EX3.20/EX20.sce b/135/CH3/EX3.20/EX20.sce new file mode 100755 index 000000000..ec21383ab --- /dev/null +++ b/135/CH3/EX3.20/EX20.sce @@ -0,0 +1,30 @@ +// Example 3.20: Range and average watage of Rs
+clc, clear
+// From Fig. 3.43
+Vsmin=20; // in volts
+Vsmax=30; // in volts
+RLmin=1; // in ohms
+RLmax=10; // in ohms
+Izmin=10e-3; // in amperes
+Pzmax=50; // in watts
+Vz=10; // in volts
+ILmin=Vz/RLmax; // in amperes
+ILmax=Vz/RLmin; // in amperes
+Izmax=Pzmax/Vz; // in amperes
+Rs1=(Vsmin-Vz)/(ILmax+Izmin); // in ohms
+Rs2=(Vsmax-Vz)/(ILmin+Izmax); // in ohms
+disp(Rs1,"Rs <= ");
+disp(Rs2,"Rs >= ");
+disp("To meet the load current variation from 1 A to 10 A a zener of specification Izmin = 0.01 A to Izmax = 5 A cannot meet the requirement for any value of Rs")
+// Let
+RLmin=1e3; // in ohms
+RLmax=10e3; // in ohms
+ILmin=Vz/RLmax; // in amperes
+ILmax=Vz/RLmin; // in amperes
+Rsmin=(Vsmax-Vz)/(ILmin+Izmax); // in ohms
+Rsmax=(Vsmin-Vz)/(ILmax+Izmin); // in ohms
+disp(Rsmin,"Minimum value of Rs (Ω) =");
+disp(Rsmax,"Maximum value of Rs (Ω) =");
+Rs=4; // in ohms
+W=Rs*(ILmax+Izmax)^2; // in watts
+disp(W,"Average wattage of Rs (W) =");
\ No newline at end of file diff --git a/135/CH3/EX3.21.a/3_21_a_1.JPG b/135/CH3/EX3.21.a/3_21_a_1.JPG Binary files differnew file mode 100755 index 000000000..edd8cc232 --- /dev/null +++ b/135/CH3/EX3.21.a/3_21_a_1.JPG diff --git a/135/CH3/EX3.21.a/3_21_a_2.JPG b/135/CH3/EX3.21.a/3_21_a_2.JPG Binary files differnew file mode 100755 index 000000000..1c9002d81 --- /dev/null +++ b/135/CH3/EX3.21.a/3_21_a_2.JPG diff --git a/135/CH3/EX3.21.a/EX21.sce b/135/CH3/EX3.21.a/EX21.sce new file mode 100755 index 000000000..c12f580ba --- /dev/null +++ b/135/CH3/EX3.21.a/EX21.sce @@ -0,0 +1,48 @@ +// Example 3.21: (a) Transfer characteristics and output
+// (b) Transfer characteristics and output
+clc, clear
+Vy=0.6; // in volts
+Rf=100; // in ohms
+t=[-40:0.001:40];
+vin=40*sin(2*%pi*t/80); // Input voltage in volts
+
+// Part (a)
+// From Fig. 3.49(a)
+// Sketching of transfer characteristics
+for i=1:length(vin)
+ if vin(i)<5.6 then
+ vo(i)=vin(i); // in volts
+ else
+ ID=(vin(i)-5.6)/(4.9e3+Rf); // in amperes
+ vo(i)=vin(i)-ID*4.9e3; // in volts
+ end
+end
+plot(vin,vo);
+xtitle("Part (a) - Transfer characteristics","vin","vo");
+// Sketching of output
+scf(1);
+plot(t,vin,"--");
+plot(t,vo);
+xtitle("Part (a) - Output voltage and input voltage","ωt","vo,vin");
+legend("vin","vo");
+
+// Part (b)
+// From Fig. 3.49(b)
+// Sketching of transfer characteristics
+for i=1:length(vin)
+ if vin(i)>-0.6 then
+ vo(i)=vin(i); // in volts
+ else
+ ID=(vin(i)+0.6)/(9.9e3+Rf); // in amperes
+ vo(i)=vin(i)-ID*9.9e3; // in volts
+ end
+end
+scf(2);
+plot(vin,vo);
+xtitle("Part (b) - Transfer characteristics","vin","vo");
+// Sketching of output
+scf(3);
+plot(t,vin,"--");
+plot(t,vo);
+xtitle("Part (b) - Output voltage and input voltage","ωt","vo,vin");
+legend("vin","vo");
\ No newline at end of file diff --git a/135/CH3/EX3.21.b/3_21_b_1.JPG b/135/CH3/EX3.21.b/3_21_b_1.JPG Binary files differnew file mode 100755 index 000000000..7d47d2466 --- /dev/null +++ b/135/CH3/EX3.21.b/3_21_b_1.JPG diff --git a/135/CH3/EX3.21.b/3_21_b_2.JPG b/135/CH3/EX3.21.b/3_21_b_2.JPG Binary files differnew file mode 100755 index 000000000..c6503d160 --- /dev/null +++ b/135/CH3/EX3.21.b/3_21_b_2.JPG diff --git a/135/CH3/EX3.21.b/EX21.sce b/135/CH3/EX3.21.b/EX21.sce new file mode 100755 index 000000000..c12f580ba --- /dev/null +++ b/135/CH3/EX3.21.b/EX21.sce @@ -0,0 +1,48 @@ +// Example 3.21: (a) Transfer characteristics and output
+// (b) Transfer characteristics and output
+clc, clear
+Vy=0.6; // in volts
+Rf=100; // in ohms
+t=[-40:0.001:40];
+vin=40*sin(2*%pi*t/80); // Input voltage in volts
+
+// Part (a)
+// From Fig. 3.49(a)
+// Sketching of transfer characteristics
+for i=1:length(vin)
+ if vin(i)<5.6 then
+ vo(i)=vin(i); // in volts
+ else
+ ID=(vin(i)-5.6)/(4.9e3+Rf); // in amperes
+ vo(i)=vin(i)-ID*4.9e3; // in volts
+ end
+end
+plot(vin,vo);
+xtitle("Part (a) - Transfer characteristics","vin","vo");
+// Sketching of output
+scf(1);
+plot(t,vin,"--");
+plot(t,vo);
+xtitle("Part (a) - Output voltage and input voltage","ωt","vo,vin");
+legend("vin","vo");
+
+// Part (b)
+// From Fig. 3.49(b)
+// Sketching of transfer characteristics
+for i=1:length(vin)
+ if vin(i)>-0.6 then
+ vo(i)=vin(i); // in volts
+ else
+ ID=(vin(i)+0.6)/(9.9e3+Rf); // in amperes
+ vo(i)=vin(i)-ID*9.9e3; // in volts
+ end
+end
+scf(2);
+plot(vin,vo);
+xtitle("Part (b) - Transfer characteristics","vin","vo");
+// Sketching of output
+scf(3);
+plot(t,vin,"--");
+plot(t,vo);
+xtitle("Part (b) - Output voltage and input voltage","ωt","vo,vin");
+legend("vin","vo");
\ No newline at end of file diff --git a/135/CH3/EX3.22/3_22_a.JPG b/135/CH3/EX3.22/3_22_a.JPG Binary files differnew file mode 100755 index 000000000..8f0e6e3cd --- /dev/null +++ b/135/CH3/EX3.22/3_22_a.JPG diff --git a/135/CH3/EX3.22/3_22_b.JPG b/135/CH3/EX3.22/3_22_b.JPG Binary files differnew file mode 100755 index 000000000..5b861a300 --- /dev/null +++ b/135/CH3/EX3.22/3_22_b.JPG diff --git a/135/CH3/EX3.22/EX22.sce b/135/CH3/EX3.22/EX22.sce new file mode 100755 index 000000000..2082ba6ef --- /dev/null +++ b/135/CH3/EX3.22/EX22.sce @@ -0,0 +1,37 @@ +// Example 3.22: (a) Transfer characteristics
+// (b) Transfer characteristics
+clc, clear
+t=[0:0.1:20]; // in mili-seconds
+vin=30*t/10; // Input voltage in volts
+// From Fig. 3.52(b)
+
+// Part {a}
+// Sketching of transfer characteristics
+for i=1:length(vin)
+ if vin(i)>25 then
+ vo(i)=5; // in volts
+ else
+ IL=vin(i)/(200+50); // in amperes
+ vo(i)=IL*50; // in volts
+ end
+end
+plot2d(vin,vo,rect=[0,0,60,6]);
+xtitle("Part (a) - Transfer characteristics","vin","vo");
+
+// Part (b)
+// Sketching of transfer characteristics
+Vy=0.5; // in volts
+Rf=40; // in ohms
+VA=5+0.5; // in volts
+for i=1:length(vin)
+ if vin(i)<27.5 then
+ IL=vin(i)/(200+50); // in amperes
+ vo(i)=IL*50; // in volts
+ else
+ IL=(vin(i)+27.5)/500; // in amperes
+ vo(i)=IL*50; // in volts
+ end
+end
+scf(1);
+plot2d(vin,vo);
+xtitle("Part (b) - Transfer characteristics","vin","vo");
\ No newline at end of file diff --git a/135/CH3/EX3.23/3_23_1.JPG b/135/CH3/EX3.23/3_23_1.JPG Binary files differnew file mode 100755 index 000000000..3d201cc21 --- /dev/null +++ b/135/CH3/EX3.23/3_23_1.JPG diff --git a/135/CH3/EX3.23/3_23_2.JPG b/135/CH3/EX3.23/3_23_2.JPG Binary files differnew file mode 100755 index 000000000..b486950c8 --- /dev/null +++ b/135/CH3/EX3.23/3_23_2.JPG diff --git a/135/CH3/EX3.23/EX23.sce b/135/CH3/EX3.23/EX23.sce new file mode 100755 index 000000000..15ea763c1 --- /dev/null +++ b/135/CH3/EX3.23/EX23.sce @@ -0,0 +1,26 @@ +// Example 3.23: Output voltage and transfer characteristic curve
+clc, clear
+t=[-6:0.001:6];
+vin=6*sin(2*%pi*t/12); // Input voltage in volts
+// Sketching of output voltage
+for i=1:length(vin)
+ if vin(i)>=2 then
+ // From Fig. 3.54(b), D1 ON and D2 OFF
+ I1=(vin(i)-2)/(10e3+10e3); // in amperes
+ vo(i)=vin(i)-I1*10e3; // in volts
+ elseif vin(i)>=-4 then
+ // both D1 and D2 OFF
+ vo(i)=vin(i);
+ else
+ // From Fig. 3.54(c), D1 OFF and D2 ON
+ vo(i)=-4; // in volts
+ end
+end
+plot(t,vin,"--");
+plot(t,vo);
+xtitle("Output voltage and input voltage","ωt","vo,vin");
+legend("vin","vo");
+// Sketching of transfer characteristic curve
+scf(1);
+plot2d(vin,vo,rect=[-6,-6,6,6]);
+xtitle("Transfer characteristic curve","vin","vo");
\ No newline at end of file diff --git a/135/CH3/EX3.24/3_24.JPG b/135/CH3/EX3.24/3_24.JPG Binary files differnew file mode 100755 index 000000000..64af07c70 --- /dev/null +++ b/135/CH3/EX3.24/3_24.JPG diff --git a/135/CH3/EX3.24/EX24.sce b/135/CH3/EX3.24/EX24.sce new file mode 100755 index 000000000..e6cc9bdd5 --- /dev/null +++ b/135/CH3/EX3.24/EX24.sce @@ -0,0 +1,21 @@ +// Example 3.24: Voltage transfer characteristics
+clc, clear
+vin=[-2.5:2.5]; // Input voltage in volts
+// Obtaining thevnin's equivalent circuit on LHS of XX'
+V_th=vin*7.5e3/(7.5e3+15e3); // in volts
+R_th=15e3*7.5e3/(15e3+7.5e3); // in ohms
+// Sketching of voltage transfer characteristics
+// From thevnin's equivalent circuit in Fig. 3.55(b)
+for i=1:length(vin)
+ if vin(i)>1.8 then
+ I1=(V_th(i)-0.6)/(5e3+R_th); // in amperes
+ vo(i)=I1*5e3; // in volts
+ elseif vin(i)>-1.8 then
+ vo(i)=0;
+ else
+ I2=(V_th(i)+0.6)/(4e3+R_th); // in amperes
+ vo(i)=I2*5e3; // in volts
+ end
+end
+plot(vin,vo);
+xtitle("Voltage transfer characteristics","vin","vo");
\ No newline at end of file diff --git a/135/CH3/EX3.25/3_25_1.JPG b/135/CH3/EX3.25/3_25_1.JPG Binary files differnew file mode 100755 index 000000000..12340e130 --- /dev/null +++ b/135/CH3/EX3.25/3_25_1.JPG diff --git a/135/CH3/EX3.25/3_25_2.JPG b/135/CH3/EX3.25/3_25_2.JPG Binary files differnew file mode 100755 index 000000000..99218e297 --- /dev/null +++ b/135/CH3/EX3.25/3_25_2.JPG diff --git a/135/CH3/EX3.25/EX25.sce b/135/CH3/EX3.25/EX25.sce new file mode 100755 index 000000000..2284531b3 --- /dev/null +++ b/135/CH3/EX3.25/EX25.sce @@ -0,0 +1,28 @@ +// Example 3.25: (a) Output voltage waveform
+// (b) Transfer curve
+clc, clear
+t=[0:0.001:12];
+vin=15*sin(2*%pi*t/12); // Input voltage in volts
+// From Fig. 3.56(a)
+// Sketching of output voltage waveform
+for i=1:length(vin)
+ if vin(i)<16/3 then
+ // D1 OFF and D2 ON
+ I2=(10-3)/(20e3+10e3); // in amperes
+ vo(i)=10-I2*20e3; // in volts
+ elseif vin(i)<=10 then
+ // both D1 and D2 ON
+ vo(i)=vin(i);
+ else
+ // D1 ON and D2 OFF
+ vo(i)=10; // in volts
+ end
+end
+plot(t,vin,"--");
+plot(t,vo);
+xtitle("Output voltage and input voltage","ωt","vo,vin");
+legend("vin","vo");
+// Sketching of transfer curve
+scf(1);
+plot2d(vin,vo,rect=[0,0,15,12]);
+xtitle("Transfer characteristic curve","vin","vo");
\ No newline at end of file diff --git a/135/CH3/EX3.26/3_26_1.JPG b/135/CH3/EX3.26/3_26_1.JPG Binary files differnew file mode 100755 index 000000000..2c0c2ed0d --- /dev/null +++ b/135/CH3/EX3.26/3_26_1.JPG diff --git a/135/CH3/EX3.26/3_26_2.JPG b/135/CH3/EX3.26/3_26_2.JPG Binary files differnew file mode 100755 index 000000000..b905b15a8 --- /dev/null +++ b/135/CH3/EX3.26/3_26_2.JPG diff --git a/135/CH3/EX3.26/EX26.sce b/135/CH3/EX3.26/EX26.sce new file mode 100755 index 000000000..403791c99 --- /dev/null +++ b/135/CH3/EX3.26/EX26.sce @@ -0,0 +1,28 @@ +// Example 3.26: Transfer characteristics and output and input voltage
+clc, clear
+T=60; // Let T = 60 seconds
+t=[0:T];
+vin=120*t/T; // Input voltage in volts
+// From Fig. 3.57(a)
+// Sketching of transfer characteristics
+for i=1:length(vin)
+ if vin(i)<=15 then
+ // Both D1 and D2 OFF
+ vo(i)=15; // in volts
+ elseif vin(i)<=105 then
+ // D1 OFF and D2 ON
+ I2=(vin(i)-15)/(100e3+200e3); // in amperes
+ vo(i)=vin(i)-I2*100e3; // in volts
+ else
+ // Both D1 and D2 ON
+ vo(i)=75; // in volts
+ end
+end
+plot(vin,vo);
+xtitle("Transfer characteristics","vin","vo");
+// Sketching of output
+scf(1);
+plot(t,vin,"--");
+plot(t,vo);
+xtitle("Output voltage and input voltage","ωt","vo,vin");
+legend("vin","vo");
\ No newline at end of file diff --git a/135/CH3/EX3.27/3_27.JPG b/135/CH3/EX3.27/3_27.JPG Binary files differnew file mode 100755 index 000000000..52de5af88 --- /dev/null +++ b/135/CH3/EX3.27/3_27.JPG diff --git a/135/CH3/EX3.27/EX27.sce b/135/CH3/EX3.27/EX27.sce new file mode 100755 index 000000000..a104c5809 --- /dev/null +++ b/135/CH3/EX3.27/EX27.sce @@ -0,0 +1,25 @@ +// Example 3.27: vo vs vin
+clc, clear
+vin=[0:50]; // Input voltage in volts
+// Sketching of vo vs vin
+for i=1:length(vin)
+ if vin(i)<3 then
+ // From Fig. 3.58(b), D1 ON, D2 and D3 OFF
+ I1=6/(5e3+5e3); // in amperes
+ vo(i)=I1*5e3; // in volts
+ elseif vin(i)<9 then
+ // From Fig. 3.58(c), D1 and D3 ON, D2 OFF
+ // Applying Kirchoff's laws
+ vo(i)=0.5*vin(i)+1.5; // in volts
+ elseif vin(i)<30 then
+ // From Fig. 3.58(d), D3 ON, D1 and D2 OFF
+ I3=vin(i)/(2.5e3+5e3); // in amperes
+ vo(i)=I3*5e3; // in volts
+ else
+ // From Fig. 3.58(e), D2 and D3 ON, D1 OFF
+ // Applying Kirchoff's laws
+ vo(i)=4*vin(i)/7+20/7; // in volts
+ end
+end
+plot(vin,vo);
+xtitle("Voltage transfer characteristics","vin","vo");
\ No newline at end of file diff --git a/135/CH3/EX3.28/3_28.JPG b/135/CH3/EX3.28/3_28.JPG Binary files differnew file mode 100755 index 000000000..f4c3e63e0 --- /dev/null +++ b/135/CH3/EX3.28/3_28.JPG diff --git a/135/CH3/EX3.28/EX28.sce b/135/CH3/EX3.28/EX28.sce new file mode 100755 index 000000000..8be0749e7 --- /dev/null +++ b/135/CH3/EX3.28/EX28.sce @@ -0,0 +1,17 @@ +// Example 3.28: Output voltage
+clc, clear
+t=[0:5]; // in seconds
+vs=10*t/5; // Input voltage in volts
+// Output voltage
+for i=1:length(vs)
+ if vs(i)<6 then
+ // Diode is OFF
+ vo(i)=6; // in volts
+ else
+ // From Fig. 3.65(c), Diode is ON
+ I=(vs(i)-6)/(200+200); // in amperes
+ vo(i)=6+I*200; // in volts
+ end
+end
+plot2d(t,vo,rect=[0,0,5,8]);
+xtitle("Output voltage","t,ms","vo(t)");
\ No newline at end of file diff --git a/135/CH3/EX3.29/3_29.JPG b/135/CH3/EX3.29/3_29.JPG Binary files differnew file mode 100755 index 000000000..4c6734a71 --- /dev/null +++ b/135/CH3/EX3.29/3_29.JPG diff --git a/135/CH3/EX3.29/EX29.sce b/135/CH3/EX3.29/EX29.sce new file mode 100755 index 000000000..27f8e6bd3 --- /dev/null +++ b/135/CH3/EX3.29/EX29.sce @@ -0,0 +1,19 @@ +// Example 3.29: Output voltage
+clc, clear
+Vy=0.5; // in volts
+Rf=50; // in ohms
+t=[0:5]; // in seconds
+vs=10*t/5; // Input voltage in volts
+// Output voltage
+for i=1:length(vs)
+ if vs(i)<6.5 then
+ // Diode is OFF
+ vo(i)=6; // in volts
+ else
+ // From Fig. 3.66(a), Diode is ON
+ I=(vs(i)-6.5)/(200+Rf+200); // in amperes
+ vo(i)=6+I*200; // in volts
+ end
+end
+plot2d(t,vo,rect=[0,0,5,8]);
+xtitle("Output voltage","t,ms","vo(t)");
\ No newline at end of file diff --git a/135/CH3/EX3.30/3_30_a.JPG b/135/CH3/EX3.30/3_30_a.JPG Binary files differnew file mode 100755 index 000000000..3a0276773 --- /dev/null +++ b/135/CH3/EX3.30/3_30_a.JPG diff --git a/135/CH3/EX3.30/3_30_b.JPG b/135/CH3/EX3.30/3_30_b.JPG Binary files differnew file mode 100755 index 000000000..1f6180bc0 --- /dev/null +++ b/135/CH3/EX3.30/3_30_b.JPG diff --git a/135/CH3/EX3.30/EX30.sce b/135/CH3/EX3.30/EX30.sce new file mode 100755 index 000000000..5851e6a0f --- /dev/null +++ b/135/CH3/EX3.30/EX30.sce @@ -0,0 +1,16 @@ +// Example 3.30: (a) Output waveform
+// (b) Output waveform
+clc, clear
+t=[0:0.001:12];
+vin=15*sin(2*%pi*t/12); // Input voltage in volts
+
+// Part (a), From Fig. 3.67(a)
+vo=vin-15; // in volts
+plot(t,vo);
+xtitle("Part (a) - Output voltage","t","vo");
+
+// Part(b), From Fig. 3.67(b)
+vo=vin-10; // in volts
+scf(1);
+plot(t,vo);
+xtitle("Part (b) - Output voltage","t","vo");
\ No newline at end of file diff --git a/135/CH3/EX3.31/3_31.JPG b/135/CH3/EX3.31/3_31.JPG Binary files differnew file mode 100755 index 000000000..1bc99ed35 --- /dev/null +++ b/135/CH3/EX3.31/3_31.JPG diff --git a/135/CH3/EX3.31/EX31.sce b/135/CH3/EX3.31/EX31.sce new file mode 100755 index 000000000..d56637e56 --- /dev/null +++ b/135/CH3/EX3.31/EX31.sce @@ -0,0 +1,7 @@ +// Example 3.31: Output voltage
+clc, clear
+t=[0:0.1:9*%pi];
+vin=15*squarewave(t)-5; // Input wave in volts
+vo=vin+25; // in volts
+plot2d(t,vo,rect=[0,0,9*%pi,40]);
+xtitle("Output voltage","t","vo");
\ No newline at end of file diff --git a/135/CH3/EX3.32/3_32.JPG b/135/CH3/EX3.32/3_32.JPG Binary files differnew file mode 100755 index 000000000..1af4a9e51 --- /dev/null +++ b/135/CH3/EX3.32/3_32.JPG diff --git a/135/CH3/EX3.32/EX32.sce b/135/CH3/EX3.32/EX32.sce new file mode 100755 index 000000000..126643a26 --- /dev/null +++ b/135/CH3/EX3.32/EX32.sce @@ -0,0 +1,13 @@ +// Example 3.32: Output voltage
+clc, clear
+t1=[0:20];
+vin1=t1;
+t2=[20:60];
+vin2=40-t2;
+t3=[60:80];
+vin3=-80+t3;
+t=[t1 t2 t3];
+vin=[vin1 vin2 vin3]; // Input wave in volts
+vo=vin+25; // in volts
+plot(t,vo);
+xtitle("Output voltage","t","vo");
\ No newline at end of file diff --git a/135/CH3/EX3.33/3_33.JPG b/135/CH3/EX3.33/3_33.JPG Binary files differnew file mode 100755 index 000000000..f9425d904 --- /dev/null +++ b/135/CH3/EX3.33/3_33.JPG diff --git a/135/CH3/EX3.33/EX33.sce b/135/CH3/EX3.33/EX33.sce new file mode 100755 index 000000000..70560a316 --- /dev/null +++ b/135/CH3/EX3.33/EX33.sce @@ -0,0 +1,28 @@ +// Example 3.33: vo
+clc, clear
+t=[0:0.001:12];
+vin=10*sin(2*%pi*t/4); // Input voltage in volts
+// From Fig. 3.73
+vint=vin+5;
+for i=1:length(vint)
+ if vint(i)>0 then
+ // Diode is OFF
+ vo(i)=vint(i); // in volts
+ else
+ break;
+ end
+end
+for i=i:length(vint)
+ if vint(i)==-5 then
+ break;
+ else
+ // Diode is ON
+ vo(i)=0;
+ end
+end
+for i=i:length(vint)
+ // Capacitor is charged to 5 V
+ vo(i)=vint(i)+5; // in volts
+end
+plot2d(t,vo,rect=[0,-5,12,25]);
+xtitle("Output voltage","t","vo");
\ No newline at end of file diff --git a/135/CH3/EX3.4/EX4.sce b/135/CH3/EX3.4/EX4.sce new file mode 100755 index 000000000..f5555db2b --- /dev/null +++ b/135/CH3/EX3.4/EX4.sce @@ -0,0 +1,32 @@ +// Example 3.4: (a) DC load current
+// (b) DC power in load
+// (c) Rectification efficiency
+// (d) Percentage regulation
+// (e) PIV of each diode
+clc, clear
+Vrms=40; // Input in volts
+Rf=1; // Forward conduction resistance of diodes in ohms
+RL=29; // Load resistance in ohms
+Vmax=Vrms*sqrt(2); // in volts
+Imax=Vmax/(Rf+RL); // in amperes
+
+disp("Part (a)");
+Idc=2*Imax/%pi; // DC load current in amperes
+disp(Idc,"DC load current (A) =");
+
+disp("Part (b)");
+Pdc=Idc^2*RL; // DC power in load in watts
+disp(Pdc,"DC power in load (W) =");
+
+disp("Part (c)");
+Pac=Vrms^2/(Rf+RL); // AC power in load
+eta=Pdc/Pac; // Rectification efficiency
+disp(eta,"Rectification efficiency =");
+
+disp("Part (d)");
+reg=Rf*100/RL; // Percentage regulation
+disp(reg,"Percentage regulation (%) =");
+
+disp("Part (e)");
+PIV=2*Vmax; // in volts
+disp(PIV,"PIV for each diode (V) =");
\ No newline at end of file diff --git a/135/CH3/EX3.5/EX5.sce b/135/CH3/EX3.5/EX5.sce new file mode 100755 index 000000000..064fdb2f9 --- /dev/null +++ b/135/CH3/EX3.5/EX5.sce @@ -0,0 +1,26 @@ +// Example 3.5: (a) DC voltage at load
+// (b) PIV rating of each diode
+// (c) Maximum current through each diode
+// (d) Required power rating
+clc, clear
+Vrms=120; // Input voltage in volts
+RL=1e3; // Load resistance in ohms
+Vy=0.7; // Cut-in voltage in volts
+
+disp("Part (a)");
+Vmax=Vrms*sqrt(2); // in volts
+Imax=(Vmax-2*Vy)/RL; // in amperes
+Idc=2*Imax/%pi; // in amperes
+Vdc=Idc*RL; // in volts
+disp(Vdc,"DC voltage at load (V) =");
+
+disp("Part (b)");
+disp(Vmax,"PIV rating of each diode (V) =");
+
+disp("Part (c)");
+Imax=Imax*1e3; // in miliamperes
+disp(Imax,"Maximum current through each diode (mA) =");
+
+disp("Part (d)");
+Pmax=Vy*Imax; // Required power rating in mili-watts
+disp(Pmax,"Required power rating (mW) =");
\ No newline at end of file diff --git a/135/CH3/EX3.6/EX6.sce b/135/CH3/EX3.6/EX6.sce new file mode 100755 index 000000000..76dd8daef --- /dev/null +++ b/135/CH3/EX3.6/EX6.sce @@ -0,0 +1,25 @@ +// Example 3.6: (a) Peak value of current
+// (b) DC value of current
+// (c) Ripple factor
+// (d) Rectification efficiency
+clc, clear
+// From the Fig. 2.16
+RL=1e3; // Load resistance in ohms
+rd=10; // Forward bias dynamic resistance of diodes in ohms
+Vmax=220; // Amplitude of input voltage in volts
+
+disp("Part (a)");
+Imax=Vmax/(rd+RL); // Peak value of current in amperes
+disp(Imax,"Peak value of current (A) =");
+
+disp("Part (b)");
+Idc=2*Imax/%pi; // DC value of current in amperes
+disp(Idc,"DC value of current (A) =");
+
+disp("Part (C)");
+ripl=sqrt((Imax/(Idc*sqrt(2)))^2-1);
+disp(ripl,"Ripple factor =");
+
+disp("Part (d)");
+eta=8/(%pi^2*(1+(rd/RL))); // Rectification efficiency
+disp(eta,"Rectification efficiency =");
\ No newline at end of file diff --git a/135/CH3/EX3.7/EX7.sce b/135/CH3/EX3.7/EX7.sce new file mode 100755 index 000000000..d8c1b0b45 --- /dev/null +++ b/135/CH3/EX3.7/EX7.sce @@ -0,0 +1,7 @@ +// Example 3.7: Full scale reading
+clc, clear
+Idc=1e-3; // in amperes
+Rf=10; // in ohms
+RL=5e3; // in ohms
+Vrms=Idc*(RL+Rf)*%pi/(2*sqrt(2)); // Full-scale deflection in volts
+disp(Vrms,"Full-scale deflection (V) =");
\ No newline at end of file diff --git a/135/CH3/EX3.8/EX8.sce b/135/CH3/EX3.8/EX8.sce new file mode 100755 index 000000000..a957ff435 --- /dev/null +++ b/135/CH3/EX3.8/EX8.sce @@ -0,0 +1,7 @@ +// Example 3.8: Full-scale reading
+clc, clear
+Idc=5e-3; // in amperes
+Rf=40; // in ohms
+RL=20e3; // in ohms
+Vrms=Idc*(RL+Rf)*%pi/(2*sqrt(2)); // Full-scale deflection in volts
+disp(Vrms,"Full-scale deflection (V) =");
\ No newline at end of file |