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 /2609 | |
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 '2609')
123 files changed, 2254 insertions, 0 deletions
diff --git a/2609/CH1/EX1.1/ex_1_1.sce b/2609/CH1/EX1.1/ex_1_1.sce new file mode 100755 index 000000000..7fbb7253d --- /dev/null +++ b/2609/CH1/EX1.1/ex_1_1.sce @@ -0,0 +1,13 @@ +//Ex 1.1
+clc;
+clear;
+close;
+format('v',5);
+Iout=8;//micro A
+VBE=0.7;//V
+Beta=80;//unitless
+VCC=20;//V
+IREF=Iout*(1+2/Beta);//micro A
+R=(VCC-VBE)/IREF;//Mohm
+disp(IREF,"Reference current(micro A)");
+disp(R,"Resistance required(Mohm)");;
diff --git a/2609/CH1/EX1.10/ex_1_10.sce b/2609/CH1/EX1.10/ex_1_10.sce new file mode 100755 index 000000000..8787cd92f --- /dev/null +++ b/2609/CH1/EX1.10/ex_1_10.sce @@ -0,0 +1,16 @@ +//Ex 1.10
+clc;
+clear;
+close;
+format('v',5);
+Vout=5;//V
+Beta=180;//unitless
+R=22;//kohm
+VCC=10;//V
+VBE=0.7;//V
+IREF=(VCC-VBE)/R;//mA
+IC=(IREF-VBE/R)/(1+2/Beta);//mA
+RC=(VCC-Vout)/IC;//kohm
+disp(IC,"IC1 & IC2 in mA are ");
+disp(RC,"RC in kohm is ");
+//Answer in the book is wrong.
diff --git a/2609/CH1/EX1.2/ex_1_2.sce b/2609/CH1/EX1.2/ex_1_2.sce new file mode 100755 index 000000000..0fd5ae4f6 --- /dev/null +++ b/2609/CH1/EX1.2/ex_1_2.sce @@ -0,0 +1,13 @@ +//Ex 1.2
+clc;
+clear;
+close;
+format('v',5);
+Iout=1;//mA
+VBE=0.7;//V
+Beta=100;//unitless
+VCC=30;//V
+IREF=Iout*(1+2/Beta);//mA
+R=(VCC-VBE)/IREF;//kohm
+disp(IREF,"Reference current(mA)");
+disp(R,"Resistance required(kohm)");;
diff --git a/2609/CH1/EX1.3/ex_1_3.sce b/2609/CH1/EX1.3/ex_1_3.sce new file mode 100755 index 000000000..6f9d53446 --- /dev/null +++ b/2609/CH1/EX1.3/ex_1_3.sce @@ -0,0 +1,13 @@ +//Ex 1.3
+clc;
+clear;
+close;
+format('v',5);
+Iout=0.5;//mA
+Beta=50;//unitless
+VEB=0.7;//V
+VCC=5;//V
+IREF=Iout*(1+2/Beta);//mA
+R=(VCC-VEB)/IREF;//kohm
+disp(IREF,"Reference current(mA)");
+disp(R,"Resistance required(kohm)");;
diff --git a/2609/CH1/EX1.4/ex_1_4.sce b/2609/CH1/EX1.4/ex_1_4.sce new file mode 100755 index 000000000..81ccf261f --- /dev/null +++ b/2609/CH1/EX1.4/ex_1_4.sce @@ -0,0 +1,13 @@ +//Ex 1.4
+clc;
+clear;
+close;
+format('v',5);
+Iout=8;//micro A
+Beta=100;//unitless
+VBE=0.7;//V
+VCC=20;//V
+IREF=Iout/(1+2/Beta/(1+Beta));//micro A
+R=(VCC-2*VBE)/IREF;//Mohm
+disp(IREF,"Reference current(micro A)");
+disp(R,"Resistance required(Mohm)");;
diff --git a/2609/CH1/EX1.5/ex_1_5.sce b/2609/CH1/EX1.5/ex_1_5.sce new file mode 100755 index 000000000..37c11b991 --- /dev/null +++ b/2609/CH1/EX1.5/ex_1_5.sce @@ -0,0 +1,13 @@ +//Ex 1.5
+clc;
+clear;
+close;
+format('v',7);
+Iout=60;//micro A
+VBE=0.7;//V
+Beta=150;//unitless
+VCC=30;//V
+IREF=Iout*(1+2/Beta/(1+Beta));//micro A
+R=(VCC-2*VBE)/IREF;//Mohm
+disp(IREF,"Reference current(micro A)");
+disp(R*1000,"Resistance required(kohm)");;
diff --git a/2609/CH1/EX1.6/ex_1_6.sce b/2609/CH1/EX1.6/ex_1_6.sce new file mode 100755 index 000000000..267e90855 --- /dev/null +++ b/2609/CH1/EX1.6/ex_1_6.sce @@ -0,0 +1,16 @@ +//Ex 1.6
+clc;
+clear;
+close;
+format('v',5);
+VBE=0.7;//V
+Beta=120;//unitless
+VCC=10;//V
+R=5.6;//kohm
+//KCL at node x : IREF=IC1+I1;//as Beta>>1
+//KCL at node y : I1=IC2+IB3;//as Beta>>1
+IREF=(VCC-VBE)/R;//mA
+//as IREF=2*IC+IB3=IC*(2+1/Beta)=2*IC;//as Beta>>1
+IC=IREF/2;//mA
+Iout=IC;//mA
+disp(Iout,"Output current(mA)");
diff --git a/2609/CH1/EX1.7/ex_1_7.sce b/2609/CH1/EX1.7/ex_1_7.sce new file mode 100755 index 000000000..fa4c6fa23 --- /dev/null +++ b/2609/CH1/EX1.7/ex_1_7.sce @@ -0,0 +1,17 @@ +//Ex 1.7
+clc;
+clear;
+close;
+format('v',5);
+Iout=6;//micro A
+IREF=1.2;//mA
+VBE2=0.7;//V
+VT=26;//mV
+Beta=120;//unitless
+VCC=20;//V
+R=(VCC-VBE2)/IREF;//kohm
+disp(R,"Value of resistance R(kohm)")
+IC1=Iout;//micro A
+IC2=(IREF-IC1*10^-3/Beta)/(1+1/Beta);//mA
+RS=1/(IC1*10^-6)*VT*10^-3*log(IC2*1000/IC1);//ohm
+disp(RS/1000,"Value of resistance RS(kohm)");
diff --git a/2609/CH1/EX1.8/ex_1_8.sce b/2609/CH1/EX1.8/ex_1_8.sce new file mode 100755 index 000000000..daf516232 --- /dev/null +++ b/2609/CH1/EX1.8/ex_1_8.sce @@ -0,0 +1,22 @@ +//Ex 1.8
+clc;
+clear;
+close;
+format('v',6);
+IREF=1;//mA
+Io2=20;//micro A
+Io3=40;//micro A
+VBE1=0.7;//V
+VT=26;//mV
+VCC=10;//V
+VEE=-10;//V
+R=(VCC-VBE1-VEE)/IREF;//kohm
+disp(R,"Value of resistance R(kohm)");
+RE2=VT/Io2*log(IREF*1000/Io2);//kohm
+disp(RE2,"Value of resistance RE2(kohm)");
+RE3=VT/Io3*log(IREF*1000/Io3);//kohm
+disp(RE3,"Value of resistance RE3(kohm)");
+VBE2=VBE1-RE2*Io2/1000;//V
+disp(VBE2,"Value of Base emitter voltage of transistor Q2(V)");
+VBE3=VBE1-RE3*Io3/1000;//V
+disp(VBE3,"Value of Base emitter voltage of transistor Q3(V)");
diff --git a/2609/CH1/EX1.9/ex_1_9.sce b/2609/CH1/EX1.9/ex_1_9.sce new file mode 100755 index 000000000..844ee3fb4 --- /dev/null +++ b/2609/CH1/EX1.9/ex_1_9.sce @@ -0,0 +1,22 @@ +//Ex 1.9
+clc;
+clear;
+close;
+format('v',5);
+Beta=100;//unitless
+VBE=0.715;//V
+R=5.6;//kohm
+RC=1;//kohm
+VCC=10;//V
+VCB1=0;//V(Q1 will act as diode)
+IREF=(VCC-VBE)/R;//mA
+//KCL at node x : IREF=IC1+2*IB;
+//KCL at node y : I1=IC2+IB3;//as Beta>>1
+IREF=(VCC-VBE)/R;//mA
+//as IREF=2*IC1/Beta+IC1
+IC1=IREF/(1+2/Beta);//mA
+IC2=IC1;//mA
+IC3=IC1;//mA
+disp(IC1,"Collector current in each transistor, IC1=IC2=IC3 in mA");
+IRC=IC1+IC2+IC3;//mA
+disp(IRC,"Current through RC(mA)");
diff --git a/2609/CH10/EX10.1/Ex10_1.sce b/2609/CH10/EX10.1/Ex10_1.sce new file mode 100755 index 000000000..60c8cc65e --- /dev/null +++ b/2609/CH10/EX10.1/Ex10_1.sce @@ -0,0 +1,16 @@ +////Ex 10.1
+clc;
+clear;
+close;
+format('v',5);
+t=0:0.01:5;//sec(Assumed)
+Vin=5*sin(2*%pi*t);//V
+VCC=15;//V
+R2=1;//kohm
+R1=6.8;//kohm
+VEE=-15;//V
+Vsat=13;//V
+Vref=R2*VCC/(R1+R2);//V
+disp(Vref,"Reference Voltage(V)")
+disp(Vsat,"If Vin>Vref , Vout (V):");
+disp(-Vsat,"If Vin<Vref , Vout (V):");
diff --git a/2609/CH10/EX10.2/ex_10_2.sce b/2609/CH10/EX10.2/ex_10_2.sce new file mode 100755 index 000000000..e26023070 --- /dev/null +++ b/2609/CH10/EX10.2/ex_10_2.sce @@ -0,0 +1,12 @@ +////Ex 10.2
+clc;
+clear;
+close;
+format('v',9);
+Vsat=7;//V
+R1=68;//kohm
+R2=82;//kohm
+VUTP=R2*Vsat/(R1+R2);//V
+VLTP=R2*-Vsat/(R1+R2);//V
+disp(VUTP,"Upper trip point(V)");
+disp(VLTP,"Lower trip point(V)");
diff --git a/2609/CH10/EX10.3/ex_10_3.sce b/2609/CH10/EX10.3/ex_10_3.sce new file mode 100755 index 000000000..9bcbbff77 --- /dev/null +++ b/2609/CH10/EX10.3/ex_10_3.sce @@ -0,0 +1,13 @@ +////Ex 10.3
+clc;
+clear;
+close;
+format('v',9);
+//Vin=5*sin(omega*t)
+Vm=5;//V
+Vsat=7;//V
+R1=68;//kohm
+R2=82;//kohm
+VUTP=R2*Vsat/(R1+R2);//V
+fi=asind(VUTP/Vm);//degree
+disp(fi,"Phase shift(degree)");
diff --git a/2609/CH10/EX10.4/Ex10_4.sce b/2609/CH10/EX10.4/Ex10_4.sce new file mode 100755 index 000000000..b9acb43a5 --- /dev/null +++ b/2609/CH10/EX10.4/Ex10_4.sce @@ -0,0 +1,19 @@ +////Ex 10.4
+clc;
+clear;
+close;
+format('v',5);
+VZ1=4.7;//V
+VZ2=4.7;//V
+R1=68;//kohm
+R2=15;//kohm
+Vout=VZ1+0.7;//V(As one zener diode is always forward biased)
+VR1=Vout;//V
+IR1=VR1/R1*1000;//micro A
+IR2=IR1;//micro A
+VR2=IR2*10^-3*R2;//V
+Vout=VR1+VR2;//V
+VUTP=(R2/(R1+R2))*Vout;//V
+VLTP=(R2/(R1+R2))*(-Vout);//V
+disp(VUTP,"VUTP(V)");
+disp(VLTP,"VLTP(V)");
diff --git a/2609/CH10/EX10.5/ex_10_5.sce b/2609/CH10/EX10.5/ex_10_5.sce new file mode 100755 index 000000000..7184f1e7b --- /dev/null +++ b/2609/CH10/EX10.5/ex_10_5.sce @@ -0,0 +1,18 @@ +////Ex 10.5
+clc;
+clear;
+close;
+format('v',9);
+Vsat=12.5;//V
+Vref=-12.5;//V
+R1=80;//kohm
+R2=20;//kohm
+Beta=R2/(R1+R2);//unitless
+UTP=Beta*Vsat+(1-Beta)*Vref;//V
+LTP=-Beta*Vsat+(1-Beta)*Vref;//V
+VH=UTP-LTP;//V
+R3=R1*R2/(R1+R2);//kohm
+disp(UTP,"UTP(V)");
+disp(LTP,"LTP(V)");
+disp(VH,"Hysteresis Voltahe, VH(V)");
+disp(R3,"Use R3(kohm)");
diff --git a/2609/CH11/EX11.1/ex_11_1.sce b/2609/CH11/EX11.1/ex_11_1.sce new file mode 100755 index 000000000..5dbf753d0 --- /dev/null +++ b/2609/CH11/EX11.1/ex_11_1.sce @@ -0,0 +1,13 @@ +////Ex 11.1
+clc;
+clear;
+close;
+format('v',5);
+Vin=12.5;//V
+Ri=10;//kohm
+IS=10^-13;//A
+T=27;//degree C
+VT=26;//mV
+Vref=Ri*IS*1000;//V
+Vout=-VT*10^-3*log(Vin/Vref);//V
+disp(Vout,"Output Voltahe, Vout(V)");
diff --git a/2609/CH11/EX11.3/ex_11_3.sce b/2609/CH11/EX11.3/ex_11_3.sce new file mode 100755 index 000000000..0d9d258f1 --- /dev/null +++ b/2609/CH11/EX11.3/ex_11_3.sce @@ -0,0 +1,11 @@ +////Ex 11.2
+clc;
+clear;
+close;
+format('v',7);
+R1=10;//kohm
+k=1.38*10^-23;//J/K
+T=298;//K
+q=1.6*10^-19;//C
+Kdash=k*T/q;//Kdash=k*T/q assumed for temporary calculation
+disp("Output Voltahe, Vout(V) is "+string(-Kdash)+"*log(Vin/10*10^3)");
diff --git a/2609/CH11/EX11.4/ex_11_4.sce b/2609/CH11/EX11.4/ex_11_4.sce new file mode 100755 index 000000000..c5379ccb4 --- /dev/null +++ b/2609/CH11/EX11.4/ex_11_4.sce @@ -0,0 +1,12 @@ +////Ex 11.4
+clc;
+clear;
+close;
+format('v',5);
+R1=10;//kohm
+R2=10;//kohm
+k=1.38*10^-23;//J/K
+T=298;//K
+q=1.6*10^-19;//C
+Kdash=k*T/q;//Kdash=k*T/q assumed for temporary calculation
+disp("Output Voltahe, Vout(V) is -R1*(log("+string(-1/Kdash)+"*Vin)^-1");
diff --git a/2609/CH11/EX11.7/ex_11_7.sce b/2609/CH11/EX11.7/ex_11_7.sce new file mode 100755 index 000000000..ee1c18df0 --- /dev/null +++ b/2609/CH11/EX11.7/ex_11_7.sce @@ -0,0 +1,26 @@ +////Ex 11.7
+clc;
+clear;
+close;
+format('v',6);
+k=1;//for the givn connection
+//(a)
+Vin=5;//V
+Vout=-k*log10(Vin/0.1);//V
+disp(Vout,"For 5V input, Output Voltage(V)");
+//(b)
+Vin=2;//V
+Vout=-k*log10(Vin/0.1);//V
+disp(Vout,"For 2V input, Output Voltage(V)");
+//(c)
+Vin=0.1;//V
+Vout=-k*log10(Vin/0.1);//V
+disp(Vout,"For 0.1V input, Output Voltage(V)");
+//(d)
+Vin=50;//mV
+Vout=-k*log10(Vin/1000/0.1);//V
+disp(Vout,"For 50mV input, Output Voltage(V)");
+//(a)
+Vin=5;//mV
+Vout=-k*log10(Vin/1000/0.1);//V
+disp(Vout,"For 5mV input, Output Voltage(V)");
diff --git a/2609/CH11/EX11.8/ex_11_8.sce b/2609/CH11/EX11.8/ex_11_8.sce new file mode 100755 index 000000000..28927656e --- /dev/null +++ b/2609/CH11/EX11.8/ex_11_8.sce @@ -0,0 +1,35 @@ +////Ex 11.8
+clc;
+clear;
+close;
+format('v',6);
+k=1;//for the givn connection
+//For 755N module
+Rin=10;//kohm
+Iref=10;//micro A
+Vref=Rin*Iref/1000;//V
+//(a)
+Vin=5;//V
+Vout1=-k*log10(Vin/0.1);//V
+Vout=Vref*10^(-Vout1/k);//V
+disp(Vout,"For 5V input to log amp, Antilog amp Output(V)");
+//(b)
+Vin=2;//V
+Vout1=-k*log10(Vin/0.1);//V
+Vout=Vref*10^(-Vout1/k);//V
+disp(Vout,"For 2V input to log amp, Antilog amp Output(V)");
+//(c)
+Vin=0.1;//V
+Vout1=-k*log10(Vin/0.1);//V
+Vout=Vref*10^(-Vout1/k);//V
+disp(Vout,"For 0.1V input to log amp, Antilog amp Output(V)");
+//(d)
+Vin=50;//mV
+Vout1=-k*log10(Vin/1000/0.1);//V
+Vout=Vref*10^(-Vout1/k);//V
+disp(Vout*1000,"For 50mV input to log amp, Antilog amp Output(mV)");
+//(e)
+Vin=5;//mV
+Vout1=-k*log10(Vin/1000/0.1);//V
+Vout=Vref*10^(-Vout1/k);//V
+disp(Vout*1000,"For 5mV input to log amp, Antilog amp Output(mV)");
diff --git a/2609/CH12/EX12.1/ex_12_1.sce b/2609/CH12/EX12.1/ex_12_1.sce new file mode 100755 index 000000000..4ca142af9 --- /dev/null +++ b/2609/CH12/EX12.1/ex_12_1.sce @@ -0,0 +1,9 @@ +////Ex 12.1
+clc;
+clear;
+close;
+format('v',9);
+gm=55;//micro U
+C=8.75;//pF
+f3dB=gm/(2*%pi*C);//MHz
+disp(f3dB,"f-3dB frequency(MHz)")
diff --git a/2609/CH13/EX13.1/ex_13_1.sce b/2609/CH13/EX13.1/ex_13_1.sce new file mode 100755 index 000000000..5f0e6447e --- /dev/null +++ b/2609/CH13/EX13.1/ex_13_1.sce @@ -0,0 +1,10 @@ +////Ex 13.1
+clc;
+clear;
+close;
+format('v',6);
+deltaVin=4;//V
+deltaVout=0.4;//V
+Vout=20;//V
+LR=(deltaVout/Vout)*100/deltaVin;//%/V(Line Regulation)
+disp(LR,"Line Regulation(%/V)");
diff --git a/2609/CH13/EX13.10/ex_13_10.sce b/2609/CH13/EX13.10/ex_13_10.sce new file mode 100755 index 000000000..27d2b2ae8 --- /dev/null +++ b/2609/CH13/EX13.10/ex_13_10.sce @@ -0,0 +1,24 @@ +////Ex 13.10
+clc;
+clear;
+close;
+format('v',6);
+Vout=15;//V
+IL=50;//mA
+Vin=20;//V
+PDmax=1;//W(For LM 723)
+Iref=3;//mA(From datasheet)
+PD=Vout*(IL+Iref);//mW
+disp(PD/1000,"Required PD(W)");
+disp(PDmax,"PDmax supplie by LM723(mW)");
+disp("PD<PDmax, so we can use it.");
+Vref=7.15;//V(For LM 723)
+R3=1.5;//kohm(choosen)
+R1BYR2=(Vout-Vref)/Vref;
+R1=R3*(R1BYR2+1);//ohm
+disp(R1,"Resistance R1(kohm)");
+R2=R1/R1BYR2;//ohm
+disp(R2,"Resistance R2(kohm)");
+disp(R3,"Resistance R3(kohm)");
+RCL=0.65/(IL/1000);//ohm
+disp(RCL,"Resistance RCL(ohm)");
diff --git a/2609/CH13/EX13.2/ex_13_2.sce b/2609/CH13/EX13.2/ex_13_2.sce new file mode 100755 index 000000000..a419b913e --- /dev/null +++ b/2609/CH13/EX13.2/ex_13_2.sce @@ -0,0 +1,11 @@ +////Ex 13.2
+clc;
+clear;
+close;
+format('v',6);
+VNL=18;//V
+VFL=17.8;//V
+IL=50;//mA
+LR=(VNL-VFL)*100/VFL;//%(Line Regulation)
+LdR=LR/IL;//%/mA(Load Regulation)
+disp(LdR,"Load Regulation(%/mA)");
diff --git a/2609/CH13/EX13.3/ex_13_3.sce b/2609/CH13/EX13.3/ex_13_3.sce new file mode 100755 index 000000000..8297580f9 --- /dev/null +++ b/2609/CH13/EX13.3/ex_13_3.sce @@ -0,0 +1,11 @@ +////Ex 13.3
+clc;
+clear;
+close;
+format('v',6);
+VBE=0.65;//V
+RCL=1.2;//ohm
+ILmax=VBE/RCL;//A
+//For Vout=0, IL=ILmax
+IL=ILmax;//A
+disp(IL,"Load current(A)");
diff --git a/2609/CH13/EX13.4/ex_13_4.sce b/2609/CH13/EX13.4/ex_13_4.sce new file mode 100755 index 000000000..825f9d493 --- /dev/null +++ b/2609/CH13/EX13.4/ex_13_4.sce @@ -0,0 +1,12 @@ +////Ex 13.4
+clc;
+clear;
+close;
+format('v',6);
+R=20;//kohm
+R1=20;//kohm
+R2=10;//kohm
+VZ=4.7;//V
+Vref=VZ;//V
+Vout=Vref*(1+R1/R2);//V
+disp(Vout,"Output Voltage(V)");
diff --git a/2609/CH13/EX13.5/ex_13_5.sce b/2609/CH13/EX13.5/ex_13_5.sce new file mode 100755 index 000000000..c625cbc47 --- /dev/null +++ b/2609/CH13/EX13.5/ex_13_5.sce @@ -0,0 +1,17 @@ +////Ex 13.5
+clc;
+clear;
+close;
+format('v',6);
+Vout=15;//V
+Vin=20;//V
+INL=2;//mA(INL=Iadj+Iref)
+Iadj=60;//mA(Assumed)
+Iref=INL-Iadj/1000;//mA
+Vref=1.25;//V
+R1=Vref/Iref*1000;//ohm
+VR2=Vout-Vref;//V
+R2=VR2/INL*1000;//ohm
+disp("Design values are : ");
+disp(R1,"Resistance, R1(ohm)");
+disp(R2/1000,"Resistance, R2(kohm)");
diff --git a/2609/CH13/EX13.6/ex_13_6.sce b/2609/CH13/EX13.6/ex_13_6.sce new file mode 100755 index 000000000..8f487ea2b --- /dev/null +++ b/2609/CH13/EX13.6/ex_13_6.sce @@ -0,0 +1,27 @@ +////Ex 13.6
+clc;
+clear;
+close;
+format('v',6);
+RL1=100;//ohm
+RL2=1;//ohm
+RCS=7;//ohm
+VEB=0.7;//V
+Beta=25;//unitless
+//For 100 ohm Load
+Vout=5;//V(as 7805 used)
+IL=Vout/RL1;//A
+VRCS=IL*RCS;//V(Voltage across RCS)
+//VRCS<VEB, hence Q1 is off
+Iout=IL;Iin=IL;//A
+Iext=Iout-Iin;//A
+disp(Iext,"For 100 ohm load, Output current Iext(A)");
+//For 1 ohm Load
+Vout=5;//V(as 7805 used)
+IL=Vout/RL2;//A
+ILmax=IL;//A
+VRCS=IL*RCS;//V(Voltage across RCS)
+//VRCS>VEB, hence Q1 is on
+Iout=(ILmax+Beta*VEB/RCS)/(Beta+1);//A
+Iext=ILmax-Iout;//A
+disp(Iext,"For 10 ohm load, Output current Iext(A)");
diff --git a/2609/CH13/EX13.7/ex_13_7.sce b/2609/CH13/EX13.7/ex_13_7.sce new file mode 100755 index 000000000..ca745d9c6 --- /dev/null +++ b/2609/CH13/EX13.7/ex_13_7.sce @@ -0,0 +1,13 @@ +////Ex 13.7
+clc;
+clear;
+close;
+format('v',6);
+RL=1:10;//ohm
+R1=5;//ohm
+Vref=5;//V
+IL=1;//A
+IQ=0;//A
+Iref=IL;//A
+R1=Vref/Iref;//ohm
+disp(R1,"Value of resistor R1(ohm)");
diff --git a/2609/CH13/EX13.8/ex_13_8.sce b/2609/CH13/EX13.8/ex_13_8.sce new file mode 100755 index 000000000..b43ea4ded --- /dev/null +++ b/2609/CH13/EX13.8/ex_13_8.sce @@ -0,0 +1,18 @@ +////Ex 13.8
+clc;
+clear;
+close;
+format('v',6);
+Vout=15:20;//V
+Vin=24;//V
+VR1=12;//V
+Vref=12;//V
+I4=0;//A(Assumed)
+Iout=1;//A(Assumed)
+R1=VR1/Iout;//ohm
+//Vout=VR1*(1+R2/R1)
+R2min=R1*(min(Vout)/VR1-1);//Putting min Vout
+R2max=R1*(max(Vout)/VR1-1);//Putting min Vout
+disp(R1,"Resistance R1(ohm)");
+disp(R2max,R2min,"Minimum & maximum value of R2(ohm)");
+disp("A pot of 10 ohm should be used.");
diff --git a/2609/CH13/EX13.9/ex_13_9.sce b/2609/CH13/EX13.9/ex_13_9.sce new file mode 100755 index 000000000..633b552fb --- /dev/null +++ b/2609/CH13/EX13.9/ex_13_9.sce @@ -0,0 +1,19 @@ +////Ex 13.9
+clc;
+clear;
+close;
+format('v',6);
+Vout=6;//V
+IL=100;//mA
+Vref=7.15;//V(For LM 723)
+Iref=1;//mA(Assumed)
+R1=(Vref-Vout)/Iref;//kohm
+R2=Vout/Iref;//kohm
+disp("Design values are : ");
+disp(R1,"R1 should be used 1.2kohm. Calculated R1(kohm) is");
+disp(R2,"R2 should be used 6.2kohm. Calculated R2(kohm)");
+R1=1.2;R2=6.2;//kohm
+R3=R1*R2/(R1+R2);//kohm
+disp(R3,"Resistance R3(kohm)");
+RCL=0.65/(IL/1000);//kohm
+disp(RCL,"Resistance RCL(kohm)");
diff --git a/2609/CH2/EX2.1/ex_2_1.sce b/2609/CH2/EX2.1/ex_2_1.sce new file mode 100755 index 000000000..9b0eca331 --- /dev/null +++ b/2609/CH2/EX2.1/ex_2_1.sce @@ -0,0 +1,15 @@ +//Ex 2.1
+clc;
+clear;
+close;
+format('v',5);
+v1=7;//mV
+v2=9;//mV
+Ad=80;//dB
+CMRR=90;//dB
+vid=v2-v1;//mV
+vcm=(v1+v2)/2;//mV
+Ad=10^(Ad/20);//unitless
+CMRR=10^(CMRR/20);//unitless
+vout=Ad*(vid+vcm/CMRR)/1000;//V
+disp(vout,"Output Voltage(V)");;
diff --git a/2609/CH2/EX2.10/ex_2_10.sce b/2609/CH2/EX2.10/ex_2_10.sce new file mode 100755 index 000000000..8d83c3599 --- /dev/null +++ b/2609/CH2/EX2.10/ex_2_10.sce @@ -0,0 +1,16 @@ +////Ex 2.10
+clc;
+clear;
+close;
+format('v',9);
+Beta=100;//unitless
+VBE=0.7;//V
+R=18.6;//kohm
+VT=26;//mV
+VCC=5;//V
+VEE=5;//V
+IExt=(VCC-VBE-(-VEE))/R;//mA
+IT=IExt;;//mA
+re=2*VT/IT;//ohm(let re1=re2=re)
+Rid=2*Beta*re/1000;//kohm(let Rid1=Rid2=Rid)
+disp(Rid,"Differntial input resistances, Rid1=Rid2(kohm)");
diff --git a/2609/CH2/EX2.11/ex_2_11.sce b/2609/CH2/EX2.11/ex_2_11.sce new file mode 100755 index 000000000..6f560ceff --- /dev/null +++ b/2609/CH2/EX2.11/ex_2_11.sce @@ -0,0 +1,23 @@ +////Ex 2.11
+clc;
+clear;
+close;
+format('v',6);
+Beta=100;//unitless
+VBE=0.7;//V
+RC=2.7;//kohm
+R=2.2;//kohm
+VT=26;//mV
+VCC=10;//V
+VEE=10;//V
+IExt=(VEE-VBE)/R;//mA
+IT=IExt;;//mA
+IE=IT/2;//mA(Let IE1=IE2=IE)
+re=2*VT/IT;re1=re;re2=re;re3=re;re4=re//ohm
+reD=re1+re2;//ohm
+BetaD=Beta^2;//unitless
+Ad=-RC*1000/reD;//unitless
+disp(Ad,"Differential voltage gain, Ad")
+Rid=2*BetaD*reD/1000;//kohm(let Rid1=Rid2=Rid)
+disp(Rid,"Differntial input resistances, Rid1=Rid2(kohm)");
+//Answer in the bok is not accurate.
diff --git a/2609/CH2/EX2.2/ex_2_2.sce b/2609/CH2/EX2.2/ex_2_2.sce new file mode 100755 index 000000000..a84aaca7d --- /dev/null +++ b/2609/CH2/EX2.2/ex_2_2.sce @@ -0,0 +1,19 @@ +////Ex 2.2
+clc;
+clear;
+close;
+format('v',7);
+v1=50;//micro V
+v2=55;//micro V
+Ad=2*10^5;//unitless
+CMRR=80;//dB
+vid=v2-v1;//micro V
+vcm=(v1+v2)/2;//mV
+CMRR=10^(CMRR/20);//unitless
+vout=Ad*(vid+vcm/CMRR)/10^6;//V
+disp(vout,"Output Voltage(V)");;
+Verror=vout-Ad*vid/10^6;//V
+disp(Verror,"Error Voltage(V)");
+error_p=(Verror/vout)*100;//% error
+disp(error_p,"Percentage error(%)");
+//Percentage error answer is not correct in the book.
diff --git a/2609/CH2/EX2.3/ex_2_3.sce b/2609/CH2/EX2.3/ex_2_3.sce new file mode 100755 index 000000000..d54bc0a02 --- /dev/null +++ b/2609/CH2/EX2.3/ex_2_3.sce @@ -0,0 +1,28 @@ +////Ex 2.3
+clc;
+clear;
+close;
+format('v',6);
+IT=1;//mA
+VCC=15;//V
+RE=50;//kohm
+RC=15;//kohm
+Beta=120;//unitless
+alfa=Beta/(Beta+1);//unitless
+Vid=6;//mV
+VT=26;//mV
+//Part (a)
+iC1=alfa*IT/(1+exp(-Vid/VT));//mA
+iC2=IT-iC1;//mA
+disp(iC2,"dc Collector current through transistors(mA)");
+//Part (b)
+iC=IT/2;//mA(let iC1=iC2=iC)
+re=VT/iC;//ohm(let re1=re2=re)
+Ad=-RC*1000/re;//unitless
+Acm=-RC*1000/(re+2*RE*1000);//unitless
+Acm=abs(Acm);////unitless
+CMRR=abs(Ad/Acm);////unitless
+disp(Ad,"Ad");
+disp(Acm,"Acm");
+CMRR=20*log10(CMRR);//dB
+disp(CMRR,"CMRR(dB)");
diff --git a/2609/CH2/EX2.4/ex_2_4.sce b/2609/CH2/EX2.4/ex_2_4.sce new file mode 100755 index 000000000..28b6a877d --- /dev/null +++ b/2609/CH2/EX2.4/ex_2_4.sce @@ -0,0 +1,18 @@ +////Ex 2.4
+clc;
+clear;
+close;
+format('v',6);
+RC=2;//kohm
+RE=4.3;//kohm
+VEE=5;//V
+VBE=0.7;//V
+IT=(VEE-VBE)/RE;//mA
+VT=26;//mV
+re=2*VT/IT;//ohm
+Ad=-RC*1000/2/re;//unitless
+disp(Ad,"Ad");
+Acm=-RC*1000/(re+2*RE*1000);//unitless
+disp(Acm,"Acm");
+CMRR=abs(Ad/Acm);////unitless
+disp(CMRR,"CMRR");
diff --git a/2609/CH2/EX2.5/ex_2_5.sce b/2609/CH2/EX2.5/ex_2_5.sce new file mode 100755 index 000000000..4fbab02fa --- /dev/null +++ b/2609/CH2/EX2.5/ex_2_5.sce @@ -0,0 +1,27 @@ +////Ex 2.5
+clc;
+clear;
+close;
+format('v',5);
+Beta=100;//unitless
+VBE=0.715;VD1=0.715;//V
+VZ=6.2;//V
+VT=26;//mV
+IZt=41;//mA
+VCC=10;//V
+VEE=10;//V
+RE=2.7;//kohm
+RC=4.7;//kohm
+VB=-VEE+VZ+VD1;//V
+VE=VB-VBE;//V
+IE3=(VE-(-VEE))/(RE);//mA
+IT=IE3;//mA
+ICQ=IT/2;//mA(let ICQ1=ICQ2=ICQ)
+VCEQ=VCC+VBE-ICQ*RC;//V
+Q=[ICQ VCEQ];//[mA V](Q point)
+disp(Q,"Q point (ICQ(mA), VCEQ(V)) is ");
+re=2*VT/IT;//ohm
+Ad=-RC*1000/re;//unitless
+Rid=2*Beta*re/1000;//kohm
+disp(Ad,"Ad");
+disp(Rid,"Rid(kohm)");
diff --git a/2609/CH2/EX2.6/ex_2_6.sce b/2609/CH2/EX2.6/ex_2_6.sce new file mode 100755 index 000000000..672894c66 --- /dev/null +++ b/2609/CH2/EX2.6/ex_2_6.sce @@ -0,0 +1,20 @@ +////Ex 2.6
+clc;
+clear;
+close;
+format('v',6);
+Beta=100;//unitless
+VBE=0.7;//V
+VCC=10;//V
+VEE=10;//V
+VT=26;//mV
+RC=2.7;//kohm
+R=2.2;//kohm
+IExt=(VEE-VBE)/R;//mA
+IC3=IExt;IT=IExt;;//mA
+ICQ=IT/2;//mA
+re=2*VT/IT;//ohm(let re1=re2=re)
+Ad=-RC*1000/re;//unitless
+Rid=2*Beta*re/1000;//kohm(let Rid1=Rid2=Rid)
+disp(Ad,"Differntial moe gain, Ad");
+disp(Rid,"Differntial input resistance, Rid(kohm)");
diff --git a/2609/CH2/EX2.7/ex_2_7.sce b/2609/CH2/EX2.7/ex_2_7.sce new file mode 100755 index 000000000..a286f9be7 --- /dev/null +++ b/2609/CH2/EX2.7/ex_2_7.sce @@ -0,0 +1,26 @@ +////Ex 2.7
+clc;
+clear;
+close;
+format('v',7);
+Beta=100;//unitless
+VBE=0.7;//V
+VD1=0.7;VD2=0.7//V
+VCC=15;//V
+VEE=15;//V
+VT=26;//mV
+RE=560;//ohm
+RC=6.8;//kohm
+R=220;//ohm
+VB=-VEE+VD1+VD2;//V
+VE=VB-VBE;//V
+IE3=(VE-(-VEE))/RE*1000;//mA
+IT=IE3;//mA
+ICQ=IT/2;//mA
+VCEQ=VCC+VBE-ICQ*RC;//V
+Q=[ICQ VCEQ];//[mA V](Q point)
+disp(Q,"Q point (ICQ(mA), VCEQ(V)) is ");
+re=2*VT/IT;//ohm
+Ad=-RC*1000/re;//unitless
+disp(Ad,"Differntial moe gain, Ad");
+//Answer in the book is wrong for Q point.
diff --git a/2609/CH2/EX2.8/ex_2_8.sce b/2609/CH2/EX2.8/ex_2_8.sce new file mode 100755 index 000000000..9d9deb810 --- /dev/null +++ b/2609/CH2/EX2.8/ex_2_8.sce @@ -0,0 +1,19 @@ +////Ex 2.8
+clc;
+clear;
+close;
+format('v',5);
+ICQ=200;//micro A
+Beta=1000;//unitless
+Ad=180;//unitless
+CMRR=80;//dB
+VT=26;//mV
+re=VT/(ICQ/1000);//ohm(Let re=re1=re2)
+RC=Ad*re/1000;//kohm
+CMRR=10^(CMRR/20);//untless
+RE=(CMRR-1)*re/2/1000;//kohm
+disp(RE,RC,"Value of RC & RE(kohm)");
+Rid=2*Beta*re/1000;//kohm(Let Rid=Rid1=Rid2)
+disp(Rid,"Differntial input resistance, Rid(kohm)");
+Ric=(Beta+1)*(re+2*RE*1000)/10^6;//Mohm
+disp(Ric,"Common mode input resistance, Ric(Mohm)");
diff --git a/2609/CH2/EX2.9/ex_2_9.sce b/2609/CH2/EX2.9/ex_2_9.sce new file mode 100755 index 000000000..f5d587ed5 --- /dev/null +++ b/2609/CH2/EX2.9/ex_2_9.sce @@ -0,0 +1,29 @@ +////Ex 2.9
+clc;
+clear;
+close;
+format('v',5);
+Beta=110;//unitless
+VBE=0.7;//V
+VT=26;//mV
+VCC=10;//V
+VEE=10;//V
+RC=1.8;//kohm
+R=3.9;//kohm
+IExt=(VCC-VBE-(-VEE))/R;//mA
+IT=IExt;;//mA
+ICQ=IT/2;//mA
+V1=0;V2=0;//V
+VE=-2*VBE;//V
+VC=VCC-ICQ*RC;//V
+VCEQ=VC-VE;//V
+Q=[ICQ VCEQ];//[mA V](Q point)
+disp(Q,"Q point (ICQ(mA), VCEQ(V)) is ");
+re=2*VT/IT;//ohm(let re1=re2=re)
+reD=2*re;//ohm
+Ad=-RC*1000/reD;//unitless
+disp(Ad,"Differntial moe gain, Ad");
+BetaD=Beta^2;//unitless
+Rid=2*BetaD*reD/1000;//kohm(let Rid1=Rid2=Rid)
+disp(Rid,"Differntial input resistance, Rid(kohm)");
+//Answer for Ad is wrong(+ve) in the book while it is negative.
diff --git a/2609/CH3/EX3.1/ex_3_1.sce b/2609/CH3/EX3.1/ex_3_1.sce new file mode 100755 index 000000000..d97d36a63 --- /dev/null +++ b/2609/CH3/EX3.1/ex_3_1.sce @@ -0,0 +1,9 @@ +//Ex 3.1
+clc;
+clear;
+close;
+format('e',8);
+fBW=4;//MHz
+fo=10;//Hz
+AOL=fBW*10^6/fo;//unitless
+disp(AOL,"Open loop gain is");
diff --git a/2609/CH3/EX3.2/ex_3_2.sce b/2609/CH3/EX3.2/ex_3_2.sce new file mode 100755 index 000000000..2a6cd88c4 --- /dev/null +++ b/2609/CH3/EX3.2/ex_3_2.sce @@ -0,0 +1,11 @@ +//Ex 3.2
+clc;
+clear;
+close;
+format('v',5);
+V1=-10;//V
+V2=10;//V
+SR=0.5;//V/micro second
+delta_Vo=V2-V1;//V
+delta_t=delta_Vo/SR;//micro second
+disp(delta_t,"Time taken by op-amp is(micro second)");
diff --git a/2609/CH3/EX3.3/ex_3_3.sce b/2609/CH3/EX3.3/ex_3_3.sce new file mode 100755 index 000000000..86b6f64d4 --- /dev/null +++ b/2609/CH3/EX3.3/ex_3_3.sce @@ -0,0 +1,9 @@ +//Ex 3.3
+clc;
+clear;
+close;
+format('v',6);
+SR=0.6;//V/micro second
+f=100;//kHz
+Vm=(SR/10^-6)/(2*%pi*f*1000);//V
+disp(Vm,"Maximum voltage, Vm is(V)");
diff --git a/2609/CH3/EX3.4/ex_3_4.sce b/2609/CH3/EX3.4/ex_3_4.sce new file mode 100755 index 000000000..c66ba9c3b --- /dev/null +++ b/2609/CH3/EX3.4/ex_3_4.sce @@ -0,0 +1,10 @@ +//Ex 3.4
+clc;
+clear;
+close;
+format('v',5);
+SR=0.5;//V/micro second
+Vm=10;//V
+f=100;//kHz
+fm=(SR/10^-6)/(2*%pi*Vm);//Hz
+disp(fm/1000,"Maximum frequency, fm is(kHz)");
diff --git a/2609/CH3/EX3.5/ex_3_5.sce b/2609/CH3/EX3.5/ex_3_5.sce new file mode 100755 index 000000000..11c10b083 --- /dev/null +++ b/2609/CH3/EX3.5/ex_3_5.sce @@ -0,0 +1,11 @@ +//Ex 3.5
+clc;
+clear;
+close;
+format('v',5);
+delta_t=0.3/2;//micro second
+V1=-3;//V
+V2=3;//V
+delta_Vo=V2-V1;//V
+SR=delta_Vo/delta_t;//V/micro second
+disp(SR,"Slew rate is(V/micro second)");
diff --git a/2609/CH3/EX3.6/ex_3_6.sce b/2609/CH3/EX3.6/ex_3_6.sce new file mode 100755 index 000000000..651b9914c --- /dev/null +++ b/2609/CH3/EX3.6/ex_3_6.sce @@ -0,0 +1,10 @@ +//Ex 3.6
+clc;
+clear;
+close;
+format('v',5);
+SR=2;//V/micro second
+delta_Vin=0.8;//V
+delta_t=10;//micro second
+Acl_max=SR/(delta_Vin/delta_t);//unitless
+disp(Acl_max,"Maximum close loop voltage gain is");
diff --git a/2609/CH3/EX3.7/ex_3_7.sce b/2609/CH3/EX3.7/ex_3_7.sce new file mode 100755 index 000000000..2ba91bfc4 --- /dev/null +++ b/2609/CH3/EX3.7/ex_3_7.sce @@ -0,0 +1,14 @@ +//Ex 3.7
+clc;
+clear;
+close;
+format('v',5);
+SR=6;//V/micro second
+//Part (i)
+Vm=1;//V
+fm=(SR/10^-6)/(2*%pi*Vm);//Hz
+disp(fm/1000,"part (i) Maximum frequency, fm is(kHz)");
+//Part (i)
+Vm=10;//V
+fm=(SR/10^-6)/(2*%pi*Vm);//Hz
+disp(fm/1000,"part (ii) Maximum frequency, fm is(kHz)");
diff --git a/2609/CH4/EX4.1/ex_4_1.sce b/2609/CH4/EX4.1/ex_4_1.sce new file mode 100755 index 000000000..5fd9c2f9e --- /dev/null +++ b/2609/CH4/EX4.1/ex_4_1.sce @@ -0,0 +1,11 @@ +////Ex 4.1
+clc;
+clear;
+close;
+format('v',9);
+AOL=2*10^5;//unitless
+fo=5;//Hz
+ACL=100;//unitless
+SF=AOL/ACL;//unitless
+fodash=SF*fo;//Hz
+disp(fodash/1000,"Bandwidth with feedback(kHz)");
diff --git a/2609/CH4/EX4.10/ex_4_10.sce b/2609/CH4/EX4.10/ex_4_10.sce new file mode 100755 index 000000000..62609a250 --- /dev/null +++ b/2609/CH4/EX4.10/ex_4_10.sce @@ -0,0 +1,18 @@ +////Ex 4.10
+clc;
+clear;
+close;
+format('v',5);
+AOL=2*10^5;//unitless
+Rio=2;//Mohm
+Ro=75;//ohm
+Ri=1;//kohm
+Rf=10;//kohm
+ACL=-AOL*Rf/(Rf+Ri+AOL*Ri);//unitless(Exact)
+disp(ACL,"Exact close loop voltage gain");
+ACL=-Rf/Ri;//unitless(Approximate)
+disp(ACL,"Approximate close loop voltage gain");
+Beta=Ri/(Ri+Rf);//unitless
+SF=1+AOL*Beta;//unitless
+Rif=Rio*10^6/SF;//ohm
+disp(Rif,"Input impedence after feedback(ohm)");
diff --git a/2609/CH4/EX4.11/ex_4_11.sce b/2609/CH4/EX4.11/ex_4_11.sce new file mode 100755 index 000000000..a04ad73e3 --- /dev/null +++ b/2609/CH4/EX4.11/ex_4_11.sce @@ -0,0 +1,15 @@ +////Ex 4.11
+clc;
+clear;
+close;
+format('v',5);
+Ri=2;//kohm
+Rf=200;//kohm
+//For 741C
+fo=5;//Hz
+AOL=2*10^5;//unitless
+UGB=1;//MHz
+ACL=-AOL*Rf/(Rf+Ri+AOL*Ri);//unitless(Exact)
+disp(ACL,"Close loop voltage gain");
+fodash=fo*AOL/-ACL;//Hz
+disp(fodash/1000,"Bandwidth, fo_dash(kHz)");
diff --git a/2609/CH4/EX4.12/ex_4_12.sce b/2609/CH4/EX4.12/ex_4_12.sce new file mode 100755 index 000000000..d298c415b --- /dev/null +++ b/2609/CH4/EX4.12/ex_4_12.sce @@ -0,0 +1,22 @@ +////Ex 4.12
+clc;
+clear;
+close;
+format('v',6);
+Beta=0.06;//feedback factor
+fo=100;//Hz
+AOL=40000;//unitless(at dc)
+SFdc=1+AOL*Beta;//sacrifice factor at dc
+f=1;//kHz
+f=f*10^3;//Hz
+SF1=1+AOL*Beta/sqrt(1+f^2/fo^2);//sacrifice factor at 1 kHz
+//(a)
+ACL=AOL/SFdc;//(unitless)exact close loop gain at dc
+disp(ACL,"Exact close loop gain at dc");
+//(b)
+ACL=1/Beta;//(unitless)approximate close loop gain at dc
+disp(ACL,"Approximate close loop gain at dc");
+//(c)
+AOL=3980;//unitless(at dc)
+ACL=AOL/SF1;//(unitless)exact close loop gain at 1kHz
+disp(ACL,"Exact close loop gain at 1kHz");
diff --git a/2609/CH4/EX4.13/ex_4_13.sce b/2609/CH4/EX4.13/ex_4_13.sce new file mode 100755 index 000000000..80034ca41 --- /dev/null +++ b/2609/CH4/EX4.13/ex_4_13.sce @@ -0,0 +1,14 @@ +////Ex 4.13
+clc;
+clear;
+close;
+format('v',5);
+Beta=0.04;//feedback factor
+AOL=5000;//unitless(at dc)
+Rio=40;//kohm
+Ro=1;//kohm
+SF=1+AOL*Beta;//sacrifice factor at dc
+Rif=Rio/SF*1000;//ohm
+disp(Rif,"Input impedence(ohm)");
+Rof=Ro*1000/SF;//ohm
+disp(Rof,"Output impedence(ohm)");
diff --git a/2609/CH4/EX4.2/ex_4_2.sce b/2609/CH4/EX4.2/ex_4_2.sce new file mode 100755 index 000000000..125113d0c --- /dev/null +++ b/2609/CH4/EX4.2/ex_4_2.sce @@ -0,0 +1,27 @@ +////Ex 4.2
+clc;
+clear;
+close;
+format('v',6);
+AOL=2*10^5;//unitless
+Ri=1.5;//kohm
+Rf=12;//kohm
+Rio=1;//Mohm
+Ro=100;//ohm
+fo=5;//Hz
+Beta=Ri/(Ri+Rf);//unitless
+SF=(1+AOL)*Beta;//unitless
+ACL=AOL/SF;//unitless
+disp(ACL,"Value of ACL");
+//In case of ideal opamp
+ACL=1+Rf/Ri;//unitless
+disp(ACL,"In case of ideal opamp, Value of ACL");
+Rif=Rio*SF;//kohm
+disp(Rif,"Value of Rif(Mohm)");
+disp("This is a large value can be assumed as infity resistance.");
+format('v',5);
+Rof=Ro/SF;//mohm
+disp(Rof*1000,"Value of Rof(mohm)");
+fodash=SF*fo;//Hz
+disp(fodash/1000,"Bandwidth with feedback, fo_dash(kHz)");
+//Answer for Rif in the book has mistake of unit.
diff --git a/2609/CH4/EX4.3/ex_4_3.sce b/2609/CH4/EX4.3/ex_4_3.sce new file mode 100755 index 000000000..8277d8b63 --- /dev/null +++ b/2609/CH4/EX4.3/ex_4_3.sce @@ -0,0 +1,14 @@ +////Ex 4.3
+clc;
+clear;
+close;
+format('v',9);
+AOL=%inf;//unitless
+Rio=%inf;//ohm
+Ri=1;//kohm
+Rf=15;//kohm
+SF=%inf;//unitless;//as SF=1+AOL*Beta
+Beta=Ri/(Ri+Rf);//unitless
+ACL=1/Beta;//unitless
+disp(Rio,"Input impedence(ohm) for ideal opamp is ");
+disp(ACL,"Gain of the circuit, ACL");
diff --git a/2609/CH4/EX4.4/ex_4_4.sce b/2609/CH4/EX4.4/ex_4_4.sce new file mode 100755 index 000000000..b844e960c --- /dev/null +++ b/2609/CH4/EX4.4/ex_4_4.sce @@ -0,0 +1,14 @@ +////Ex 4.4
+clc;
+clear;
+close;
+format('v',9);
+AOL=400;//unitless
+Rio=500;//kohm
+Ro=75;//ohm
+ACL=100;//unitless
+SF=AOL/ACL;//unitless
+Rif=Rio*SF;//kohm
+disp(Rif/1000,"Input impedence, Rif(Mohm)");
+Rof=Ro/SF;//ohm
+disp(Rof,"Output impedence, Rof(ohm)");
diff --git a/2609/CH4/EX4.5/ex_4_5.sce b/2609/CH4/EX4.5/ex_4_5.sce new file mode 100755 index 000000000..56755cf13 --- /dev/null +++ b/2609/CH4/EX4.5/ex_4_5.sce @@ -0,0 +1,15 @@ +////Ex 4.5
+clc;
+clear;
+close;
+format('v',5);
+ACL=200;//unitless
+AOL=2*10^5;//unitless
+Rio=2;//Mohm
+Ro=75;//ohm
+Ri=1;//kohm(Assumed)
+SF=AOL/ACL;//unitless
+Beta=(SF-1)/AOL;//unitless
+Rf=Ri*(1-Beta)/Beta;//kohm
+disp(Ri,"Input impedence, Rif(kohm)");
+disp(Rf,"Feedback impedence, Rf(kohm)");
diff --git a/2609/CH4/EX4.6/ex_4_6.sce b/2609/CH4/EX4.6/ex_4_6.sce new file mode 100755 index 000000000..aa6658270 --- /dev/null +++ b/2609/CH4/EX4.6/ex_4_6.sce @@ -0,0 +1,13 @@ +////Ex 4.6
+clc;
+clear;
+close;
+format('v',5);
+AOL=50;//unitless
+Beta=0.8;//unitless
+deltaAOL=-20;//%(Change in open loop gain)
+deltaBeta=15;//%(Change in feedback factor)
+AOLnew=AOL+AOL*deltaAOL/100;//unitless(AOL after change)
+Betanew=Beta+Beta*deltaBeta/100;//unitless(Beta after change)
+ACL=AOLnew/(1+AOLnew*Betanew);//unitless
+disp(ACL,"Close loop gain, ACL");
diff --git a/2609/CH4/EX4.7/ex_4_7.sce b/2609/CH4/EX4.7/ex_4_7.sce new file mode 100755 index 000000000..1ca151040 --- /dev/null +++ b/2609/CH4/EX4.7/ex_4_7.sce @@ -0,0 +1,14 @@ +////Ex 4.7
+clc;
+clear;
+close;
+format('v',5);
+AOL=500;//unitless
+Rio=300;//kohm
+Ro=100;//ohm
+ACL=AOL/(1+AOL);//unitless
+Rif=Rio*(1+AOL)/1000;//Mohm
+Rof=Ro/(1+AOL);//ohm
+disp(ACL,"Close loop gain, ACL");
+disp(Rif,"Value of Rif(Mohm)");
+disp(Rof,"Value of Rof(ohm)");
diff --git a/2609/CH4/EX4.8/ex_4_8.sce b/2609/CH4/EX4.8/ex_4_8.sce new file mode 100755 index 000000000..b5400d148 --- /dev/null +++ b/2609/CH4/EX4.8/ex_4_8.sce @@ -0,0 +1,11 @@ +////Ex 4.8
+clc;
+clear;
+close;
+format('v',5);
+Iin=1;//mA
+Rf=1;//kohm
+IB=0;//for ideal opamp
+If=Iin-IB;//mA
+Vout=-If*Rf;//V
+disp(Vout,"Output Voltage(V)");
diff --git a/2609/CH4/EX4.9/ex_4_9.sce b/2609/CH4/EX4.9/ex_4_9.sce new file mode 100755 index 000000000..2d1689658 --- /dev/null +++ b/2609/CH4/EX4.9/ex_4_9.sce @@ -0,0 +1,17 @@ +////Ex 4.9
+clc;
+clear;
+close;
+format('v',5);
+I2=1;//mA
+Rf=4.7;//kohm
+//Case 1st
+I1=500;//micro A
+Vout1=-I1*10^-6*Rf*10^3;//V
+disp(Vout1,"For 500 micro A current, Output Voltage(V)");
+//Case 2nd
+I2=1;//mA
+Vout2=-I2*10^-3*Rf*10^3;//V
+disp(Vout2,"For 1 mA current, Output Voltage(V)");
+deltaVout=Vout2-Vout1;//V
+disp(deltaVout,"Variation in Output Voltage(V)");
diff --git a/2609/CH5/EX5.1/ex_5_1.sce b/2609/CH5/EX5.1/ex_5_1.sce new file mode 100755 index 000000000..214198dcb --- /dev/null +++ b/2609/CH5/EX5.1/ex_5_1.sce @@ -0,0 +1,10 @@ +//Ex 5.1
+clc;
+clear;
+close;
+format('v',5);
+V1=2;V2=3;V3=4;V4=5;//V
+R1=10;R2=15;R3=22;R4=50;//kohm
+Rf=10;//kohm
+Vout=-Rf/R1*V1-Rf/R2*V2-Rf/R3*V3-Rf/R4*V4;//V
+disp(Vout,"Output voltage of the circuit(V)");;
diff --git a/2609/CH5/EX5.11/ex_5_11.sce b/2609/CH5/EX5.11/ex_5_11.sce new file mode 100755 index 000000000..e46aeadd6 --- /dev/null +++ b/2609/CH5/EX5.11/ex_5_11.sce @@ -0,0 +1,13 @@ +//Ex 5.11
+clc;
+clear;
+close;
+format('v',4);
+G=20;//dB(Gain)
+f3dB=2;//kHz
+Cf=0.05;//micro F
+Rf=1/(f3dB*1000*2*%pi*Cf/1000000)/1000;//kohm
+G=10^(G/20);//Gain(unitless)
+Ri=Rf*1000/G;//ohm
+disp(Rf,"Resistance Rf(kohm)");
+disp(Ri,"Resistance Ri(ohm)");
diff --git a/2609/CH5/EX5.13/Ex5_13.sce b/2609/CH5/EX5.13/Ex5_13.sce new file mode 100755 index 000000000..9c413f3ee --- /dev/null +++ b/2609/CH5/EX5.13/Ex5_13.sce @@ -0,0 +1,23 @@ +//Ex 5.13
+clc;
+clear;
+close;
+format('v',4);
+t2=50;//ms(After open the switch)
+R=40;//kohm
+C=0.2;//micro F
+V2=3;//V
+Vin=5;//V
+//For Ideal op-amp V1=V2
+t1=0;//s
+Vout1=V2;//V
+V1=V2;//V
+t2=t2*10^-3;//s
+Vout2=-1/(R*10^3*C*10^-6)*integrate('Vin-V1','T',0,t2)+Vout1;//V
+//Here we have t=0 switch closed Vout=3V
+t=[t1*1000 t2*1000];//ms
+Vout=[Vout1 Vout2];//V
+plot(t,Vout);
+title('Vout Vs time after switch is opened');
+xlabel('t(ms)');
+ylabel('Vout(V)');
diff --git a/2609/CH5/EX5.14/ex_5_14.sce b/2609/CH5/EX5.14/ex_5_14.sce new file mode 100755 index 000000000..2a70b2f03 --- /dev/null +++ b/2609/CH5/EX5.14/ex_5_14.sce @@ -0,0 +1,13 @@ +//Ex 5.14
+clc;
+clear;
+close;
+format('v',4);
+R1=1;//kohm
+R2=1;//kohm
+R3=1;//kohm
+Rf=R2+R3;//kohm
+Vin=1;//V
+//Capacitor remains open circuited for steady state in both cases.
+Vout=-Rf/R1*Vin;//V
+disp(Vout,"Output Voltage(V)");
diff --git a/2609/CH5/EX5.16/Ex5_16.sce b/2609/CH5/EX5.16/Ex5_16.sce new file mode 100755 index 000000000..62d0e90af --- /dev/null +++ b/2609/CH5/EX5.16/Ex5_16.sce @@ -0,0 +1,16 @@ +//Ex 5.16
+clc;
+clear;
+close;
+format('v',4);
+//From the given equationVout=-integrate('5*Vx+2*Vy+4*Vz','t',0,t) :
+R1Cf=1/5;R2Cf=1/2;R3Cf=1/4;
+disp("Various design parameters are : ");
+Cf=10;//micro F////Chosen for the design
+disp(Cf,"Capacitance(micro F)");
+R1=R1Cf/(Cf*10^-6)/1000;//kohm
+R2=R2Cf/(Cf*10^-6)/1000;//kohm
+R3=R3Cf/(Cf*10^-6)/1000;//kohm
+disp(R1,"Resistance R1(kohm)");
+disp(R2,"Resistance R1(kohm)");
+disp(R3,"Resistance R1(kohm)");
diff --git a/2609/CH5/EX5.17/Ex5_17.sce b/2609/CH5/EX5.17/Ex5_17.sce new file mode 100755 index 000000000..dd1b80f5e --- /dev/null +++ b/2609/CH5/EX5.17/Ex5_17.sce @@ -0,0 +1,16 @@ +//Ex 5.17
+clc;
+clear;
+close;
+format('v',4);
+f=10;//kHz
+Rf=3.2;//kohm
+Ci=0.001;//micro F
+dt=5;//micro seconds
+dVin=5-(-5);//V(When voltage changes from -5V to +5V)
+Vout=-Rf*1000*Ci*10^-6*dVin/(dt*10^-6);//V
+disp(Vout,"When voltage changes from -5V to +5V, The output Voltage(V)");
+dVin=-5-(+5);//V(When voltage changes from +5V to -5V)
+Vout=-Rf*1000*Ci*10^-6*dVin/(dt*10^-6);//V
+disp(Vout,"When voltage changes from +5V to -5V, The output Voltage(V)");
+
diff --git a/2609/CH5/EX5.18/Ex5_18.sce b/2609/CH5/EX5.18/Ex5_18.sce new file mode 100755 index 000000000..d67d924ef --- /dev/null +++ b/2609/CH5/EX5.18/Ex5_18.sce @@ -0,0 +1,20 @@ +//Ex 5.18
+clc;
+clear;
+close;
+format('v',5);
+fmin=200;//Hz
+fmax=1;//kHz
+fa=fmax;//kHz
+disp("Various design parameters are : ");
+Ci=0.05;//micro F////Chosen for the design
+disp(Ci,"Capacitance Ci(micro F)");
+format('v',4);
+fb=10*fa;//kHz
+Rf=1/(2*%pi*fa*10^3*Ci*10^-6)/1000;//kohm
+disp(Rf,"Resistance Rf(kohm)");
+Ri=1/(2*%pi*fb*10^3*Ci*10^-6);//ohm
+disp(Ri,"Resistance Ri(ohm)");
+format('v',6);
+Cf=Ri*Ci/(Rf*10^3);//micro F
+disp(Cf,"Capacitance Cf(micro F)");
diff --git a/2609/CH5/EX5.19/Ex5_19.sce b/2609/CH5/EX5.19/Ex5_19.sce new file mode 100755 index 000000000..fe701762e --- /dev/null +++ b/2609/CH5/EX5.19/Ex5_19.sce @@ -0,0 +1,21 @@ +//Ex 5.19
+clc;
+clear;
+close;
+format('v',5);
+fmax=100;//Hz
+fa=fmax;//Hz
+disp("Various design parameters are : ");
+Ci=0.1;//micro F////Chosen for the design
+disp(Ci,"Capacitance Ci(micro F)");
+Rf=1/(2*%pi*fa*Ci*10^-6)/1000;//kohm
+disp(Rf,"Resistance Rf(kohm)");
+disp("Use f=15 kohm");
+fb=15*fa;//kHz
+Ri=1/(2*%pi*fb*Ci*10^-6)/1000;//kohm
+disp(Ri,"Resistance Ri(kohm)");
+disp("Use Ri=1 kohm");
+format('v',6);
+Cf=Ri*Ci/Rf;//micro F
+disp(Cf,"Capacitance Cf(micro F)");
+//Answer in the book is not accurate for Cf.
diff --git a/2609/CH5/EX5.2/ex_5_2.sce b/2609/CH5/EX5.2/ex_5_2.sce new file mode 100755 index 000000000..07b64eae7 --- /dev/null +++ b/2609/CH5/EX5.2/ex_5_2.sce @@ -0,0 +1,17 @@ +//Ex 5.1
+clc;
+clear;
+close;
+format('v',5);
+Rf=240;//kohm
+//Vout=-4*Vx+3*Vy;
+//case 1st
+Vy=0;//V(But Vx is not=0)
+//Vox=-Rf/R1*Vx=-4*Vx
+R1=Rf/4;//kohm
+//case 2nd
+Vx=0;//V(But Vy is not=0)
+//Voy=(1+Rf/R1)*R2*Vy/(R1+R2)=3*Vy
+R2=3/(1+Rf/R1)*R1/((1-3/(1+Rf/R1)))
+disp(R1,"Resistance R1(kohm)");
+disp(R2,"Resistance R2(kohm)");
diff --git a/2609/CH5/EX5.20/Ex5_20.sce b/2609/CH5/EX5.20/Ex5_20.sce new file mode 100755 index 000000000..3b6dc2304 --- /dev/null +++ b/2609/CH5/EX5.20/Ex5_20.sce @@ -0,0 +1,19 @@ +//Ex 5.20
+clc;
+clear;
+close;
+format('v',5);
+f=50;//Hz
+T=1/f;//s(Period)
+Ci=0.05;//micro F
+RiCi=0.01*T;//Given
+Ri=RiCi/(Ci*10^-6)/1000;//kohm
+disp(Ri,"Resistance Ri(kohm)");
+//Vout=-.002*dVin/dt given
+//On comparing with Vout=-Rf*Ci*dVin/dt
+RfCi=0.002;//on comparing
+Rf=RfCi/(Ci*10^-6)/1000;//kohm
+disp(Rf,"Resistance Rf(kohm)");
+Cf=Ri*Ci/Rf;//micro F
+format('v',6);
+disp(Cf,"Capacitance Cf(micro F)");
diff --git a/2609/CH5/EX5.3/ex_5_3.sce b/2609/CH5/EX5.3/ex_5_3.sce new file mode 100755 index 000000000..c0af1eeb8 --- /dev/null +++ b/2609/CH5/EX5.3/ex_5_3.sce @@ -0,0 +1,11 @@ +//Ex 5.3
+clc;
+clear;
+close;
+format('v',5);
+V1=-2;V2=3;//V
+R1=50;R2=100;//kohm
+Rf=250;//kohm
+//I1+I2=If with IB=0 & Vx=0
+Vout=-(V1/R1+V2/R2)*Rf;//V
+disp(Vout,"Output Voltage(V)");
diff --git a/2609/CH5/EX5.4/ex_5_4.sce b/2609/CH5/EX5.4/ex_5_4.sce new file mode 100755 index 000000000..f29b9a690 --- /dev/null +++ b/2609/CH5/EX5.4/ex_5_4.sce @@ -0,0 +1,12 @@ +//Ex 5.4
+clc;
+clear;
+close;
+format('v',5);
+V1=-2;V2=3;//V
+R1=12;R2=12;R3=10//kohm
+Rf=12;Ri=12;//kohm
+Rt=2;//kohm
+Vyx=200*10^-6;//V
+Vout=Rf/Ri*(1+2*R3/Rt)*Vyx;//V
+disp(Vout*1000,"Output Voltage(mV)");
diff --git a/2609/CH5/EX5.5/ex_5_5.sce b/2609/CH5/EX5.5/ex_5_5.sce new file mode 100755 index 000000000..c79431e9b --- /dev/null +++ b/2609/CH5/EX5.5/ex_5_5.sce @@ -0,0 +1,15 @@ +//Ex 5.5
+clc;
+clear;
+close;
+format('v',4);
+Ad=5:200;//Gain
+R1max=50;//kohm(Potentiometer)
+R4=10;R3=10;//kohm
+//Case 1st : Ad=Admin &R1=R1max
+R1=R1max;//kohm
+R2=(min(Ad)-1)/2*R1max
+//Case 2nd : Ad=Admax &R1=R1min
+R1min=2*R2/(max(Ad)-1);//kohm
+disp(R2,"Resistance R2(kohm)");
+disp(R1min,"Minimum value of resistance R1(kohm)");
diff --git a/2609/CH5/EX5.6/ex_5_6.sce b/2609/CH5/EX5.6/ex_5_6.sce new file mode 100755 index 000000000..ebc8f426a --- /dev/null +++ b/2609/CH5/EX5.6/ex_5_6.sce @@ -0,0 +1,23 @@ +//Ex 5.6
+clc;
+clear;
+close;
+format('v',8);
+R3=1;//kohm
+Rt=5;//kohm
+Ri=1.8;R1=1.8;//kohm
+Rf=18;R2=18;//kohm
+Vs=15;//V
+AoL=2*10^5;//Gain(for 741C)
+Rio=2//Mohm
+Ro=75//Mohm
+fo=5;//Hz
+fBW=1;//MHz
+Ad=Rf/Ri*(1+2*R3/Rt);//differential gain
+disp(Ad,"Differential gain");
+Beta=(R3+Rt)/(2*R3+Rt);//unitless
+Rix=Rio*10^6*(1+AoL*Beta);//ohm
+disp(Rix,"Input impedence, Rix(ohm)");
+Rof=Ro/(1+AoL/Ad);//ohm
+disp(Rof,"Output impedence, Rof(ohm)");
+//Answer in the book is wron for Rix.
diff --git a/2609/CH5/EX5.8/ex_5_8.sce b/2609/CH5/EX5.8/ex_5_8.sce new file mode 100755 index 000000000..d9fbdc226 --- /dev/null +++ b/2609/CH5/EX5.8/ex_5_8.sce @@ -0,0 +1,20 @@ +//Ex 5.8
+clc;
+clear;
+close;
+format('v',8);
+Ri=10;//kohm
+Rf=15;//kohm
+Vs=9;//V
+//Part (a)
+Ra=120;Rb=120;Rc=120;Rd=120;//ohm
+Vx=0;Vy=0//V(as Bridge is balanced)
+Vout=(Vy-Vx)*Rf/Ri;//V
+disp(Vout,"(a) Output Voltage(V)");
+//Part (b)
+Ra=120;Rb=120;Rc=120;Rd=150;//ohm
+Vx=Rb*Vs/(Ra+Rb);//V
+Vy=Rc*Vs/(Rc+Rd)//V
+Vyx=Vy-Vx;//V
+Vout=(Vy-Vx)*Rf/Ri;//V
+disp(Vout,"(b) Output Voltage(V)");
diff --git a/2609/CH5/EX5.9/ex_5_9.sce b/2609/CH5/EX5.9/ex_5_9.sce new file mode 100755 index 000000000..969c8ebb8 --- /dev/null +++ b/2609/CH5/EX5.9/ex_5_9.sce @@ -0,0 +1,10 @@ +//Ex 5.9
+clc;
+clear;
+close;
+format('v',8);
+Vin=2;//V
+Rf=2*2/(2+2)+2;//kohm
+R1=1;//kohm
+Vout=-Rf/R1*Vin;//V
+disp(Vout,"Output Voltage(V)");
diff --git a/2609/CH6/EX6.1/Ex6_1.sce b/2609/CH6/EX6.1/Ex6_1.sce new file mode 100755 index 000000000..5c3cc9e30 --- /dev/null +++ b/2609/CH6/EX6.1/Ex6_1.sce @@ -0,0 +1,27 @@ +//Ex 6.1
+clc;
+clear;
+close;
+format('v',6);
+f0=600;//Hz//Oscillating Frequency
+disp("Various design parameters are :-");
+C=0.05;//micro F//Chosen for the design
+disp(C,"Capacitance(micro F)");
+format('v',5);
+R=1/(2*%pi*f0*sqrt(6)*C*10^-6);//ohm
+R=R/1000;//kohm
+disp(R,"Resistance R(kohm)");
+disp("We can use R=2.2 kohm for design purpose.")
+//To avoid loading effect
+Ri=10*R;//kohm//Ri>=10*R
+Ri=ceil(Ri);//kohm
+disp(Ri,"Resistance Ri(kohm)");
+Rf=29*Ri;//kohm//Rf>=29*Ri
+disp(Rf,"Resistance Rf(kohm)");
+disp("We can use Rf=640 kohm for design purpose.")
+Rf=640;//kohm
+//Balancing the circuit
+Rom=Rf*Ri/(Rf+Ri);//kohm
+Rom=ceil(Rom);//kohm
+format('v',6);
+disp(Rom,"Resistance Rom(kohm)");
diff --git a/2609/CH6/EX6.10/Ex6_10.sce b/2609/CH6/EX6.10/Ex6_10.sce new file mode 100755 index 000000000..7337ccd9c --- /dev/null +++ b/2609/CH6/EX6.10/Ex6_10.sce @@ -0,0 +1,19 @@ +//Ex 6.10
+clc;
+clear;
+close;
+format('v',6);
+f0=1;///kHz
+Vsat=14;//V
+disp("Various design parameters are :-");
+C1=0.05;//micro F//Chosen for the design
+disp(C1,"Capacitance(micro F)");
+Rf=1/(2*f0*10^3*C1*10^-6)/1000;//kohm
+disp(Rf,"Resistance Rf(kohm)");
+//R2=0.86*R1 and Rf=R1||R2
+R2byR1=0.86;//from R2=0.86*R1
+R2=Rf*(1+R2byR1);//kohm
+R1=R2/R2byR1;//kohm
+disp(R1,"Resistance R1(kohm)");
+disp("Use R1=22 kohm for the design.");
+disp(R2,"Resistance R2(kohm)");
diff --git a/2609/CH6/EX6.11/Ex6_11.sce b/2609/CH6/EX6.11/Ex6_11.sce new file mode 100755 index 000000000..e6fb3cffb --- /dev/null +++ b/2609/CH6/EX6.11/Ex6_11.sce @@ -0,0 +1,13 @@ +//Ex 6.11
+clc;
+clear;
+close;
+format('v',6);
+T=10;//ms//(Time period)
+f0=1/(T*10^-3);//Hz
+C=0.05;//micro F//Chosen for the design
+//Formula : f0=1/{2*Rf*C*log(1+2*R2/R1)}
+Rf=1/(f0*2*C*10^-6*log(1+2))/1000;//kohm//By putting R1=R2 for this case
+Rf=round(Rf);//kohm
+disp(Rf,"Resistance Rf(kohm)");
+disp(C,"Capacitance for the design(micro F)");
diff --git a/2609/CH6/EX6.12/Ex6_12.sce b/2609/CH6/EX6.12/Ex6_12.sce new file mode 100755 index 000000000..b0d83a3dc --- /dev/null +++ b/2609/CH6/EX6.12/Ex6_12.sce @@ -0,0 +1,11 @@ +//Ex 6.12
+clc;
+clear;
+close;
+format('v',6);
+R1=4.7;//kohm
+R2=3.3;//kohm
+Rf=2;//kohm
+C=0.1;//micro F
+f0=1/2/(Rf*1000)/(C*10^-6)/log(1+2*R2/R1)/1000;//kHz
+disp(f0,"Frequency of output signal(kHz)");
diff --git a/2609/CH6/EX6.13/Ex6_13.sce b/2609/CH6/EX6.13/Ex6_13.sce new file mode 100755 index 000000000..4dfb195ef --- /dev/null +++ b/2609/CH6/EX6.13/Ex6_13.sce @@ -0,0 +1,19 @@ +//Ex 6.13
+clc;
+clear;
+close;
+format('v',6);
+f0=1.5;//kHz
+Vout=6;//V////peak to peak
+Vsat=13.5;//V
+disp("Various design parameters are : ");
+R2=10;//kohm///choosen for the design
+R1=R2*2*Vsat/Vout;//kohm
+disp(R1,"R1(kohm)");
+disp(R2,"R2(kohm)");
+disp("Use R1=50 kohm for the design");
+//Let Cf=0.05 micro F for the design
+Cf=0.05;//micro F
+disp(Cf,"Cf(micro F)");
+Ri=R1*1000/(f0*1000)/4/(Cf*10^-6*R2*1000)/1000;//kohm
+disp(Ri,"Ri(kohm)");
diff --git a/2609/CH6/EX6.14/Ex6_14.sce b/2609/CH6/EX6.14/Ex6_14.sce new file mode 100755 index 000000000..a2ee02b49 --- /dev/null +++ b/2609/CH6/EX6.14/Ex6_14.sce @@ -0,0 +1,16 @@ +//Ex 6.14
+clc;
+clear;
+close;
+format('v',4);
+//Data given
+R1=6.8;//kohm
+Ri=100;//kohm
+R2=1.5;//kohm
+Cf=0.01;//micro F
+Vsat=14;//V
+Vo_pp=2*R2/R1*Vsat;//V////Peak to peak output of triangular wave
+disp(Vo_pp,"Peak to peak output of triangular wave(V)");
+format('v',5);
+f0=R1*1000/(4*Ri*10^3*Cf*10^-6*R2*10^3)/1000;//kHz//Oscillating Frequency
+disp(f0,"Oscillation frequency(Hz)");
diff --git a/2609/CH6/EX6.15/Ex6_15.sce b/2609/CH6/EX6.15/Ex6_15.sce new file mode 100755 index 000000000..dac52471b --- /dev/null +++ b/2609/CH6/EX6.15/Ex6_15.sce @@ -0,0 +1,20 @@ +//Ex 6.15
+clc;
+clear;
+close;
+format('v',4);
+//Data given
+f0=1;//kHz
+Vo_pp=7;//V
+Vsat=14;//V
+disp("Various design parameters are :-");
+//Let R2=10;//kohm for the design
+R2=10;//kohm
+R1=2*R2*Vsat/Vo_pp;//kohm
+disp(R1,"R1(kohm)");
+disp(R2,"R2(kohm)");
+//Choose Cf=0.1 micro F for the design
+Cf=0.1;//micro F
+disp(Cf,"Cf(micro F)");
+Ri=R1*10^3/(4*f0*10^3*Cf*10^-6*R2*10^3)/1000;//kohm
+disp(Ri,"Ri(kohm)");
diff --git a/2609/CH6/EX6.16/Ex6_16.sce b/2609/CH6/EX6.16/Ex6_16.sce new file mode 100755 index 000000000..f0a3ed40a --- /dev/null +++ b/2609/CH6/EX6.16/Ex6_16.sce @@ -0,0 +1,15 @@ +//Ex 6.16
+clc;
+clear;
+close;
+format('v',4);
+//Data given
+tau=1;//ms(time period)
+R1byR2=1.8:0.2:9;//range of R1/R2
+Beta_min=1/(1+min(R1byR2));//minimum value of Beta
+Beta_max=1/(1+max(R1byR2));//maximum value of Beta
+Tmax=2*tau*log((1+Beta_min)/(1-Beta_min));//ms////For minimum value of Beta
+fmin=1/(Tmax*10^-3);//Hz
+Tmin=2*tau*log((1+Beta_max)/(1-Beta_max));//ms////For maximum value of Beta
+fmax=1/(Tmin*10^-3)/1000;//kHz
+disp("Frequency range is "+string(fmin)+" Hz to "+string(fmax)+" kHz.");
diff --git a/2609/CH6/EX6.17/Ex6_17.sce b/2609/CH6/EX6.17/Ex6_17.sce new file mode 100755 index 000000000..b30826e46 --- /dev/null +++ b/2609/CH6/EX6.17/Ex6_17.sce @@ -0,0 +1,15 @@ +//Ex 6.17
+clc;
+clear;
+close;
+format('v',4);
+//Data given
+Ls=3;//H
+Cs=0.05;//pF
+Rs=2;//kohm
+Cm=10;//pF
+fS=1/2/%pi/sqrt(Ls*Cs*10^-12)/1000;//kHz
+disp(fS,"Series resonant frequency(kHz)");
+CT=Cm*Cs/(Cm+Cs);//pF////Equivalent capacitance
+fP=1/2/%pi/sqrt(Ls*CT*10^-12)/1000;//kHz
+disp(fP,"Parallel resonant frequency(kHz)");
diff --git a/2609/CH6/EX6.18/Ex6_18.sce b/2609/CH6/EX6.18/Ex6_18.sce new file mode 100755 index 000000000..6fc9919c0 --- /dev/null +++ b/2609/CH6/EX6.18/Ex6_18.sce @@ -0,0 +1,21 @@ +//Ex 6.18
+clc;
+clear;
+close;
+format('v',5);
+//Data given
+f0=5;//kHz
+D=60;//%////duty cycle
+VCC=12;//V
+//As D=t1/(t1+t2)
+t2BYt1=1/(D/100)-1;//ratio of t1 & t2
+//RB/(2*RA-RB)=t2/t1
+RAbyRB=(1/t2BYt1+1)/2;//Ratio of RA & RB
+disp("Various design parameters are :");
+//Let CT=0.05 micro F for this design choosing between 0.01 & 1 microo F
+CT=0.05;//micro F
+disp(CT,"CT(micro F)");
+RA=1/(f0*10^3)/(5/3)^2/(CT*10^-6)/1000;//kohm
+disp(RA,"RA(kohm)");
+RB=RA/RAbyRB;//kohm
+disp(RB,"RB(kohm)");
diff --git a/2609/CH6/EX6.19/Ex6_19.sce b/2609/CH6/EX6.19/Ex6_19.sce new file mode 100755 index 000000000..e94fcb231 --- /dev/null +++ b/2609/CH6/EX6.19/Ex6_19.sce @@ -0,0 +1,46 @@ +//Ex 6.19
+clc;
+clear;
+close;
+format('v',6);
+//Data given
+Rf=15;//kohm
+RT1=4.7;//kohm
+R1=56;//kohm
+R2=6.8;//kohm
+R3=10;//kohm
+R4=1;//kohm
+R5=1;//kohm
+CB=1;//micro F
+CT=0.05;//mic
+VCC=15;//V
+V1=-15;//V////Voltage given through the resistance(R1) 56 kohm
+disp("Part (i)");
+Vin=2;//V
+Vo=Rf/R1*(-V1)-Rf/R2*Vin;//V
+disp(Vo,"Voltage Vo(V)");
+N_VCC=0;//V////-VCC////voltage given to the 12th pin of IC
+V7=N_VCC+3;//V
+disp(V7,"Voltage V7(V)");
+I=(V7-Vo)/RT1;//mA
+disp(I,"Current I(mA)");
+Rmult=R4*R5/(R4+R5)+R3;//kohm////on pin 3
+disp(Rmult,"Total resistance on pin 3, Rmult(kohm)");
+format('v',4);
+f0=0.32*I*10^-3/(CT*10^-6)/1000;//kHz
+disp(f0,"Oscillation frequency(kHz)");
+disp("Part (ii)");
+format('v',4);
+Vin=5;//V
+Vo=Rf/R1*(-V1)-Rf/R2*Vin;//V
+disp(Vo,"Voltage Vo(V)");
+N_VCC=0;//V////-VCC////voltage given to the 12th pin of IC
+V7=N_VCC+3;//V
+disp(V7,"Voltage V7(V)");
+I=(V7-Vo)/RT1;//mA
+format('v',6);
+disp(I,"Current I(mA)");
+Rmult=R4*R5/(R4+R5)+R3;//kohm////on pin 3
+disp(Rmult,"Total resistance on pin 3, Rmult(kohm)");
+f0=0.32*I*10^-3/(CT*10^-6)/1000;//kHz
+disp(f0,"Oscillation frequency(kHz)");
diff --git a/2609/CH6/EX6.3/Ex6_3.sce b/2609/CH6/EX6.3/Ex6_3.sce new file mode 100755 index 000000000..50c251696 --- /dev/null +++ b/2609/CH6/EX6.3/Ex6_3.sce @@ -0,0 +1,20 @@ +//Ex 6.3
+clc;
+clear;
+close;
+format('v',5);
+f0=12;//kHz//Oscillating Frequency
+disp("Various design parameters are :-");
+C=0.01;//micro F//Chosen for the design between 0.01 & 1 micro F
+disp(C,"Capacitance(micro F)");
+R=1/(2*%pi*f0*1000*C*10^-6);//ohm
+R=R/1000;//kohm
+disp(R,"Resistance R(kohm)");
+format('v',5);
+Ri=3*R/2;//kohm//Ri>=3*R/2
+disp(Ri,"Resistance Ri(kohm)");
+disp("We can use Ri=2.2 kohm for design purpose.")
+Ri=2.2;//kohm
+Rf=2*Ri;//kohm
+disp(Rf,"Resistance Rf(kohm)");
+disp("We should use Rf=4.7 kohm for design purpose.")
diff --git a/2609/CH6/EX6.5/Ex6_5.sce b/2609/CH6/EX6.5/Ex6_5.sce new file mode 100755 index 000000000..6d4288587 --- /dev/null +++ b/2609/CH6/EX6.5/Ex6_5.sce @@ -0,0 +1,20 @@ +//Ex 6.5
+clc;
+clear;
+close;
+format('v',5);
+f0=2;//kHz//Oscillating Frequency
+disp("Various design parameters are :-");
+C=0.05;//micro F//Chosen for the design
+disp(C,"Capacitance(micro F)");
+R=1/(2*%pi*f0*1000*C*10^-6);//ohm
+R=R/1000;//kohm
+disp(R,"Resistance R(kohm)");
+format('v',5);
+Ri=3*R/2;//kohm//Ri>=3*R/2
+format('v',4);
+disp(Ri,"Resistance Ri(kohm)");
+disp("We can use Ri=2.2 kohm for design purpose.")
+Rf=2*Ri;//kohm
+disp(Rf,"Resistance Rf(kohm)");
+disp("We should use 5k pot for Rf.")
diff --git a/2609/CH6/EX6.6/Ex6_6.sce b/2609/CH6/EX6.6/Ex6_6.sce new file mode 100755 index 000000000..13009e2c7 --- /dev/null +++ b/2609/CH6/EX6.6/Ex6_6.sce @@ -0,0 +1,12 @@ +//Ex 6.6
+clc;
+clear;
+close;
+format('v',6);
+//Data given
+R1=1;//kohm
+R2=1;//kohm
+R=1;//kohm
+C=4.7;//micro F
+f0=1/(2*%pi*R*10^3*C*10^-6);//Hz//Oscillating Frequency
+disp(f0,"Oscillation frequency(Hz)");
diff --git a/2609/CH6/EX6.7/Ex6_7.sce b/2609/CH6/EX6.7/Ex6_7.sce new file mode 100755 index 000000000..80cb41272 --- /dev/null +++ b/2609/CH6/EX6.7/Ex6_7.sce @@ -0,0 +1,20 @@ +//Ex 6.7
+clc;
+clear;
+close;
+format('v',5);
+f0=200;//Hz//Oscillating Frequency
+disp("Various design parameters are :-");
+C=0.05;//micro F//Chosen for the design
+disp(C,"Capacitance(micro F)");
+R=0.159/(f0*C*10^-6);//ohm
+R=R/1000;//kohm
+disp(R,"Resistance R(kohm)");
+disp("We should use R=510 kohm for the design.")
+R=510;//kohm
+C1=C;C2=C;C3=C;//micro F
+disp(C3,C2,C1,"Capacitance C1, C2 & C3(micro F)");
+R2=R;R3=R;//kohm
+disp(R3,R2,"Resistance R2, R3(kohm)");
+disp("1000k pot can be used.")
+//Answer for R is calculated wrong in the textbook.
diff --git a/2609/CH6/EX6.8/Ex6_8.sce b/2609/CH6/EX6.8/Ex6_8.sce new file mode 100755 index 000000000..c225e8ad7 --- /dev/null +++ b/2609/CH6/EX6.8/Ex6_8.sce @@ -0,0 +1,12 @@ +//Ex 6.8
+clc;
+clear;
+close;
+format('v',5);
+Rf=570;//kohm
+Ri=15;//kohm
+A=Rf/Ri;//Gain of the circuit
+Amin=29;//Minimum Gain requirement of RC phase shift oscillator
+deltaA=(A-Amin)/Amin*100;//%(Exceeding Gain)
+disp(deltaA,"Gain is exceeded by(%) ");
+disp("It will cause distortion at output.");
diff --git a/2609/CH6/EX6.9/Ex6_9.sce b/2609/CH6/EX6.9/Ex6_9.sce new file mode 100755 index 000000000..540e9f913 --- /dev/null +++ b/2609/CH6/EX6.9/Ex6_9.sce @@ -0,0 +1,31 @@ +//Ex 6.9
+clc;
+clear;
+close;
+format('v',6);
+disp("Part (a)");
+L1=25;//micro H
+L2=10;//micro H
+Rf=22;//kohm
+C=0.01;//micro F
+LT=L1+L2;//micro H
+fr=1/(2*%pi*sqrt(C*10^-6*LT*10^-6));//Hz
+fr=fr/1000;//kHz
+f0=fr;///kHz
+disp(f0,"Oscillation frequency(kHz)");
+Ri=Rf/(L1/L2);//kohm
+disp(Ri,"Resistance Ri(kohm)");
+disp("Part (b)");
+C1=220;//pF
+C2=680;//pF
+Rf=22;//kohm
+L=1;//mH
+CT=C1*C2/(C1+C2);//pF
+fr=1/(2*%pi*sqrt(L*10^-3*CT*10^-12));//Hz
+fr=fr/1000;//kHz
+f0=fr;///kHz
+f0=round(f0);//kHz
+disp(f0,"Oscillation frequency(kHz)");
+Ri=Rf/(C1/C2);//kohm
+disp(Ri,"Resistance Ri(kohm)");
+
diff --git a/2609/CH7/EX7.1/ex_7_1.sce b/2609/CH7/EX7.1/ex_7_1.sce new file mode 100755 index 000000000..71073c5b1 --- /dev/null +++ b/2609/CH7/EX7.1/ex_7_1.sce @@ -0,0 +1,21 @@ +////Ex 7.1
+clc;
+clear;
+close;
+format('v',9);
+th=4;//ms
+VCC=10;//V
+C=0.05;//micro F(choosen between 0.01<=C<=1)
+R=th*10^-3/(1.1*C*10^-6)/1000;//kohm
+C1=0.01;//micro F(assumed)
+C2=0.01;//micro F(choosen between 0.01<=C<=1)
+R2=th*10^-3/(10*C2*10^-6)/1000;//kohm
+C3=10;//micro F
+disp("Design values are : ");
+disp(C,"Capacitance C(micro F)");
+disp(R,"Resistance R(kohm)");
+disp(C1,"Capacitance C1(micro F)");
+disp(C2,"Capacitance C2(micro F)");
+disp(R2,"Resistance R2(kohm)");
+disp(C3,"Capacitance C3(micro F)");
+//Answer of R2 is wrong in the book.
diff --git a/2609/CH7/EX7.2/ex_7_2.sce b/2609/CH7/EX7.2/ex_7_2.sce new file mode 100755 index 000000000..ce444cf44 --- /dev/null +++ b/2609/CH7/EX7.2/ex_7_2.sce @@ -0,0 +1,12 @@ +////Ex 7.2
+clc;
+clear;
+close;
+format('v',9);
+ft=2;//kHz
+C=0.01;//micro F
+T=1/ft;//ms
+n=3;//for divide-by-3 circuit
+th=(0.2+(n-1))*T;//ms
+R=th/(1.1*C);//kohm
+disp(R,"Value of Resistance R(kohm)");
diff --git a/2609/CH7/EX7.3/ex_7_3.sce b/2609/CH7/EX7.3/ex_7_3.sce new file mode 100755 index 000000000..40d07a347 --- /dev/null +++ b/2609/CH7/EX7.3/ex_7_3.sce @@ -0,0 +1,18 @@ +////Ex 7.3
+clc;
+clear;
+close;
+format('v',9);
+fo=2;//kHz
+D=70;//%(duty cycle)
+T=1/fo;//ms
+VCC=12;//V
+tC=D*T/100;//ms
+tD=T-tC;//ms
+C=0.05;//micro F(choosen between 0.01<=C<=1)
+RB=tD*10^-3/(0.69*C*10^-6)/1000;//kohm
+RA=tC*10^-3/(0.69*C*10^-6)/1000-RB;//kohm
+disp("Design values are : ");
+disp(C,"Capacitance C(micro F)");
+disp(RA,"Resistance RA(kohm)");
+disp(RB,"Resistance RB(kohm)");
diff --git a/2609/CH7/EX7.4/ex_7_4.sce b/2609/CH7/EX7.4/ex_7_4.sce new file mode 100755 index 000000000..d6b27132c --- /dev/null +++ b/2609/CH7/EX7.4/ex_7_4.sce @@ -0,0 +1,19 @@ +////Ex 7.4
+clc;
+clear;
+close;
+format('v',9);
+fo=2;//kHz
+D=50;//%(duty cycle)
+T=1/fo;//ms
+VCC=10;//V
+tC=D*T/100;//ms
+tD=T-tC;//ms
+C=0.1;//micro F(choosen between 0.01<=C<=1)
+RB=tD*10^-3/(0.69*C*10^-6)/1000;//kohm
+RA=T*10^-3*1.45/(C*10^-6)/1000-RB;//kohm
+disp("Design values are : ");
+disp(C,"Capacitance C(micro F)");
+disp(RA,"Resistance RA(kohm)");
+disp(RB,"Resistance RB(kohm)");
+disp("RA & RB should be equal for 50% duty cycle.")
diff --git a/2609/CH7/EX7.5/ex_7_5.sce b/2609/CH7/EX7.5/ex_7_5.sce new file mode 100755 index 000000000..c5951fb9d --- /dev/null +++ b/2609/CH7/EX7.5/ex_7_5.sce @@ -0,0 +1,18 @@ +////Ex 7.5
+clc;
+clear;
+close;
+format('v',9);
+fo=2;//kHz
+D=40;//%(duty cycle)
+T=1/fo;//ms
+VCC=10;//V
+tC=D*T/100;//ms
+tD=T-tC;//ms
+C=0.22;//micro F(choosen between 0.01<=C<=1)
+RB=tD*10^-3/(0.69*C*10^-6)/1000;//kohm
+RA=T*10^-3*1.45/(C*10^-6)/1000-RB;//kohm
+disp("Design values are : ");
+disp(C,"Capacitance C(micro F)");
+disp(RA,"Resistance RA(kohm)");
+disp(round(RB),"Resistance RB(kohm)");
diff --git a/2609/CH7/EX7.6/ex_7_6.sce b/2609/CH7/EX7.6/ex_7_6.sce new file mode 100755 index 000000000..7428d8615 --- /dev/null +++ b/2609/CH7/EX7.6/ex_7_6.sce @@ -0,0 +1,18 @@ +////Ex 7.6
+clc;
+clear;
+close;
+format('v',9);
+fo=700;//Hz
+D=50;//%(duty cycle)
+T=1/fo*1000;//ms
+VCC=10;//V
+tC=D*T/100;//ms
+tD=T-tC;//ms
+C=0.05;//micro F(choosen between 0.01<=C<=1)
+RB=tD*10^-3/(0.69*C*10^-6)/1000;//kohm
+RA=T*10^-3*1.45/(C*10^-6)/1000-RB;//kohm
+disp("Design values are : ");
+disp(C,"Capacitance C(micro F)");
+disp(round(RA),"Resistance RA(kohm)");
+disp(round(RB),"Resistance RB(kohm)");
diff --git a/2609/CH7/EX7.7/ex_7_7.sce b/2609/CH7/EX7.7/ex_7_7.sce new file mode 100755 index 000000000..3027c274a --- /dev/null +++ b/2609/CH7/EX7.7/ex_7_7.sce @@ -0,0 +1,18 @@ +////Ex 7.7
+clc;
+clear;
+close;
+format('v',9);
+fo=800;//Hz
+D=60;//%(duty cycle)
+T=1/fo*1000;//ms
+VCC=10;//V
+tC=D*T/100;//ms
+tD=T-tC;//ms
+C=0.047;//micro F(choosen between 0.01<=C<=1)
+RB=tD*10^-3/(0.69*C*10^-6)/1000;//kohm
+RA=tC*10^-3*1.45/(C*10^-6)/1000-RB;//kohm
+disp("Design values are : ");
+disp(C,"Capacitance C(micro F)");
+disp(round(RA),"Resistance RA(kohm)");
+disp(round(RB),"Resistance RB(kohm)");
diff --git a/2609/CH8/EX8.1/ex_8_1.sce b/2609/CH8/EX8.1/ex_8_1.sce new file mode 100755 index 000000000..e76d6ccc2 --- /dev/null +++ b/2609/CH8/EX8.1/ex_8_1.sce @@ -0,0 +1,21 @@ +////Ex 8.1
+clc;
+clear;
+close;
+format('v',9);
+VCC=6;//V
+VEE=6;//V
+RT=4;//kohm
+CT=330;//pF
+C=240;//pF
+fo=0.3/(RT*1000*CT*10^-12)/1000;//kHz
+disp(fo,"Free running frequency(kHz)");
+Vplus=(VCC-(-VEE))/2;//V
+deltafL=8*fo/Vplus;//kHz
+disp(deltafL,"Lock Range(+ve & -ve in kHz)");
+//For LM 565
+R=3.6;//kohm
+deltafC=sqrt(deltafL*1000/(2*%pi*R*1000*C*10^-12))/1000;//kHz
+ disp(deltafC,"Capture Range(+ve & -ve in kHz)");
+deltafP=2*deltafC/2;//kHz
+ disp(deltafP,"Pull-in Range(kHz)");
diff --git a/2609/CH8/EX8.2/ex_8_2.sce b/2609/CH8/EX8.2/ex_8_2.sce new file mode 100755 index 000000000..519e0a1e8 --- /dev/null +++ b/2609/CH8/EX8.2/ex_8_2.sce @@ -0,0 +1,21 @@ +////Ex 8.2
+clc;
+clear;
+close;
+format('v',9);
+fo=450;//kHz
+deltafL=240;//kHz(+ve & -ve)
+deltafC=40;//kHz(+ve & -ve)
+Vplus=8*fo/deltafL;//V
+//Vplus=(VCC-(-VEE))/2 but |VCC|=|-VEE|
+VCC=Vplus;//V
+VEE=Vplus;//V
+disp(VCC,"For the design |VCC|=|-VEE| in Volt");
+RT=4.7;//kohm(Assumed for design)
+R=3.6;//kohm
+CT=0.3/(RT*1000*fo*1000)*10^12;//pF
+C=1/((deltafC*10^3)^2*(2*%pi*R*10^3)/(deltafL*1000))*10^9;//nF
+disp(RT,"Value of RT(kohm)");
+disp(CT,"Value of CT(pF)");
+disp(C,"Value of C(nF)");
+//Answer in the book is not accurate.
diff --git a/2609/CH8/EX8.3/ex_8_3.sce b/2609/CH8/EX8.3/ex_8_3.sce new file mode 100755 index 000000000..012cddac5 --- /dev/null +++ b/2609/CH8/EX8.3/ex_8_3.sce @@ -0,0 +1,12 @@ +////Ex 8.3
+clc;
+clear;
+close;
+format('v',9);
+fmax=160;//kHz
+fr=4;//Hz(Resolution)
+M=2.4;//unitless
+fclk=M*fmax;//kHz
+disp(fclk,"Clock frequency(kHz)");
+N=log(fclk*1000/fr)/log(2);//no. of bits
+disp(round(N),"No. of bits");
diff --git a/2609/CH9/EX9.10/Ex9_10.sce b/2609/CH9/EX9.10/Ex9_10.sce new file mode 100755 index 000000000..3fac8b246 --- /dev/null +++ b/2609/CH9/EX9.10/Ex9_10.sce @@ -0,0 +1,25 @@ +//Ex 9.10
+clc;
+clear;
+close;
+format('v',5);
+f0=2;//kHz(Critical frequency)
+fH=f0;//kHz
+f_3dB=f0;//kHz
+//For Butterworth filter using sallen key
+alfa=1.414;klp=1;//constant
+Ap=3-alfa;// band pass gain
+RfBYRi=Ap-1;//ratio
+disp("Various design parameters are :-");
+C=0.05;//micro F//Chosen for the design
+disp(C,"Capacitance C(micro F)");
+format('v',4);
+R=1/(2*%pi*fH*10^3*C*10^-6)/1000;//kohm
+disp(R,"Resistance R(kohm)");
+//For offset minimization
+//2*R=Rf||Ri=Rf/(RfBYRi+1)
+Rf=2*R*(RfBYRi+1);//kohm
+disp(Rf,"Resistance Rf(kohm)");
+Ri=Rf/RfBYRi;//kohm
+disp(Ri,"Resistance Ri(kohm)");
+//Answer in the book is not accurate. Some calculation mistake is there while working for offset minimization.
diff --git a/2609/CH9/EX9.11/Ex9_11.sce b/2609/CH9/EX9.11/Ex9_11.sce new file mode 100755 index 000000000..5e484d486 --- /dev/null +++ b/2609/CH9/EX9.11/Ex9_11.sce @@ -0,0 +1,24 @@ +//Ex 9.11
+clc;
+clear;
+close;
+format('v',5);
+f0=2;//kHz(Critical frequency)
+fH=f0;//kHz
+f_3dB=f0;//kHz
+//For Bessel filter of 2nd order
+alfa=1.73;klp=0.785;//constant
+Ap=3-alfa;// band pass gain
+RfBYRi=Ap-1;//ratio
+disp("Various design parameters are :-");
+C=0.05;//micro F//Chosen for the design
+disp(C,"Capacitance C(micro F)");
+format('v',4);
+R=klp/(2*%pi*fH*10^3*C*10^-6)/1000;//kohm
+disp(R,"Resistance R(kohm)");
+//For offset minimization
+//2*R=Rf||Ri=Rf/(RfBYRi+1)
+Rf=2*R*(RfBYRi+1);//kohm
+disp(Rf,"Resistance Rf(kohm)");
+Ri=Rf/RfBYRi;//kohm
+disp(Ri,"Resistance Ri(kohm)");
diff --git a/2609/CH9/EX9.12/Ex9_12.sce b/2609/CH9/EX9.12/Ex9_12.sce new file mode 100755 index 000000000..67673c461 --- /dev/null +++ b/2609/CH9/EX9.12/Ex9_12.sce @@ -0,0 +1,24 @@ +//Ex 9.12
+clc;
+clear;
+close;
+format('v',5);
+f0=.12;//kHz(Cutoff frequency)
+fH=f0;//kHz
+//For Butterworth filter of 2nd order
+alfa=1.414;klp=1;//constant
+Ap=3-alfa;// band pass gain
+RfBYRi=Ap-1;//ratio
+disp("Various design parameters are :-");
+C=0.33;//micro F//Chosen for the design choosing between 0.01 & 1 micro F
+disp(C,"Capacitance C(micro F)");
+format('v',4);
+R=klp/(2*%pi*fH*10^3*C*10^-6)/1000;//kohm
+disp(R,"Resistance R(kohm)");
+disp("Use R=3.9 kohm");
+//For offset minimization
+//2*R=Rf||Ri=Rf/(RfBYRi+1)
+Rf=2*R*(RfBYRi+1);//kohm
+disp(Rf,"Resistance Rf(kohm)");
+Ri=Rf/RfBYRi;//kohm
+disp(Ri,"Resistance Ri(kohm)");
diff --git a/2609/CH9/EX9.13/Ex9_13.sce b/2609/CH9/EX9.13/Ex9_13.sce new file mode 100755 index 000000000..56c25b88d --- /dev/null +++ b/2609/CH9/EX9.13/Ex9_13.sce @@ -0,0 +1,23 @@ +//Ex 9.13
+clc;
+clear;
+close;
+format('v',5);
+fL=20;//Hz(Cutoff frequency)
+//For Butterworth filter of 2nd order
+alfa=1.414;klp=1;//constant
+Ap=3-alfa;// band pass gain
+RfBYRi=Ap-1;//ratio
+disp("Various design parameters are :-");
+C=0.22;//micro F//Chosen for the design choosing between 0.01 & 1 micro F
+disp(C,"Capacitance C(micro F)");
+format('v',4);
+R=klp/(2*%pi*fL*C*10^-6)/1000;//kohm
+disp(R,"Resistance R(kohm)");
+//For offset minimization
+//R=Rf||Ri=Rf/(RfBYRi+1)
+Rf=R*(RfBYRi+1);//kohm
+disp(Rf,"Resistance Rf(kohm)");
+Ri=Rf/RfBYRi;//kohm
+Ri=floor(Ri);//kohm
+disp(Ri,"Resistance Ri(kohm)");
diff --git a/2609/CH9/EX9.14/Ex9_14.sce b/2609/CH9/EX9.14/Ex9_14.sce new file mode 100755 index 000000000..d679266b2 --- /dev/null +++ b/2609/CH9/EX9.14/Ex9_14.sce @@ -0,0 +1,37 @@ +//Ex 9.14
+clc;
+clear;
+close;
+format('v',5);
+fH=2;//kHz(Cutoff frequency)
+Ap=4;//Pass band gain
+disp("Butterworth filter of 3rd order can be obtained by cascading of first and second order high pass filter.");
+//Butterworth polynomial is (s+1)*(s^2+s+1)
+alfa=1;//for sallen key
+Ap2=3-alfa;//gain for 2nd order filter
+Ap1=Ap/Ap2;//gain for 1st order filter
+//Design parameters for 1st order filter :
+disp("Various design parameters for 1st order filter are :-");
+C=0.01;//micro F//Chosen for the design
+disp(C,"Capacitance C(micro F)");
+R=1/(2*%pi*fH*10^3*C*10^-6)/1000;//kohm
+disp(R,"Resistance R(kohm)");
+disp("Use R=8.2 kohm");
+R=8.2;//kohm
+//Ap1=Rf/Ri+1 ; with Ap1=2 we have Rf=Ri
+Rf=2*R;//kohm
+Ri=2*R;//kohm
+disp(Ri,Rf,"Resistance Rf & Ri(kohm)");
+format('v',6);
+//Design parameters for 2nd order filter :
+kLp=1/alfa;//unitless
+//Ap2=Rfdash/Ridash+1 ; with Ap2=2 we have Rfdash=Ridash
+disp("Various design parameters for 2nd order filter are :-");
+C=0.033;//micro F//Chosen for the design
+disp(C,"Capacitance C(micro F)");
+format('v',4);
+R=kLp/(2*%pi*fH*10^3*C*10^-6)/1000;//kohm
+disp(R,"Resistance R(kohm)");
+Rf=2*R;//kohm
+Ri=2*R;//kohm
+disp(Ri,Rf,"Resistance Rfdash & Ridash(kohm)");
diff --git a/2609/CH9/EX9.15/Ex9_15.sce b/2609/CH9/EX9.15/Ex9_15.sce new file mode 100755 index 000000000..208ae6e16 --- /dev/null +++ b/2609/CH9/EX9.15/Ex9_15.sce @@ -0,0 +1,38 @@ +//Ex 9.15
+clc;
+clear;
+close;
+format('v',6);
+fL=200;//Hz
+fH=1; //kHz
+Ap=4;//Pass band gain
+fc=sqrt(fH*1000*fL);//Hz(Cutoff frequency)
+BW=fH*1000-fL;//Hz
+Q=fc/BW;//Quality Factor
+disp(Q,"Quality factor is ");
+disp("As Q<12, it is a wide band filter.");
+Ap1=2;//Pass band gain for high pass section
+disp("Various design parameters for high pass section are :-");
+C=0.033;//micro F//Chosen for the design
+disp(C,"Capacitance C(micro F)");
+format('v',4);
+R=1/(2*%pi*fL*C*10^-6)/1000;//kohm
+disp(R,"Resistance R(kohm)");
+//Ap1=Rf/Ri+1 ; with Ap1=2 we have Rf=Ri
+Rf=2*R;//kohm
+Ri=2*R;//kohm
+disp(Ri,Rf,"Resistance Rf & Ri(kohm)");
+Ap2=2;//Pass band gain for low pass section
+disp("Various design parameters for low pass section are :-");
+format('v',6);
+C=0.033;//micro F//Chosen for the design
+disp(C,"Capacitance C(micro F)");
+format('v',4);
+K=fL/(fH*1000);//unitless
+Rdash=K*R;//kohm
+disp(Rdash,"Resistance Rdash(kohm)");
+//Ap1=Rf/Ri+1 ; with Ap1=2 we have Rf=Ri
+Rf=2*Rdash;//kohm
+Ri=2*Rdash;//kohm
+disp(Ri,Rf,"Resistance Rf & Ri(kohm)");
+disp("Use Rf=Ri=10 kohm");
diff --git a/2609/CH9/EX9.16/Ex9_16.sce b/2609/CH9/EX9.16/Ex9_16.sce new file mode 100755 index 000000000..d7c939382 --- /dev/null +++ b/2609/CH9/EX9.16/Ex9_16.sce @@ -0,0 +1,30 @@ +//Ex 9.16
+clc;
+clear;
+close;
+format('v',5);
+disp("Part(a)");
+fc=1.2;//kHz
+Q=4;//Quality Factor
+Ap=10;//Pass band gain
+disp("Here 2*Q^2=32>AP=10, hence it can be designed using single op-amp.");
+disp("Various design parameters are :-");
+C=0.05;//micro F//Chosen for the design
+disp(C,"Capacitance C(micro F)");
+//fc/Q=1/(%pi*R2*C)
+R2=Q/(fc*1000)/%pi/(C*10^-6)/1000;//kohm
+disp(R2,"Resistance R2(kohm)");
+disp("Use R2=22 kohm");
+format('v',5);
+R1=R2/(2*Ap);//kohm
+disp(R1,"Resistance R1(kohm)");
+R3=R1*1000/(4*%pi^2*R1*1000*R2*1000*(C*10^-6)^2*(fc*1000)^2-1);//ohm
+disp(R3,"Resistance R3(ohm)");
+disp("Use R3=460 ohm");
+disp("Part(b)");
+R3=460;//ohm
+fc_new=1.5;//kHz
+fc_old=1.2;//kHz
+R3new=R3*(fc_old/fc_new)^2;//ohm
+disp("Resistance R3 should be changed from "+string(R3)+" ohm to "+string(R3new)+" ohm");
+///Answer for R3 is wrong in the book
diff --git a/2609/CH9/EX9.17/Ex9_17.sce b/2609/CH9/EX9.17/Ex9_17.sce new file mode 100755 index 000000000..78966f9db --- /dev/null +++ b/2609/CH9/EX9.17/Ex9_17.sce @@ -0,0 +1,31 @@ +//Ex 9.17
+clc;
+clear;
+close;
+format('v',5);
+fL=3;//kHz
+fH=3.6;//kHz
+Ap=-6;//Pass band gain
+fc=sqrt(fH*fL)*1000;//Hz
+BW=(fH-fL)*1000;//Hz
+Q=fc/BW;//Quality factor
+disp(Q,"Quality factor is ");
+disp("Here 1<=Q<=12 criteria fulfills, hence it can be designed using single op-amp.");
+disp("Various design parameters are :-");
+C=0.01;//micro F//Chosen for the design
+disp(C,"Capacitance C(micro F)");
+//fc/Q=1/(%pi*R2*C)
+format('v',4);
+R2=1/%pi/(BW)/(C*10^-6)/1000;//kohm
+disp(R2,"Resistance R2(kohm)");
+format('v',5);
+R1=-R2/(2*Ap);//kohm
+disp(R1,"Resistance R1(kohm)");
+R3=R1*1000/(4*%pi^2*R1*1000*R2*1000*(C*10^-6)^2*(fc)^2-1);//ohm
+disp(R3,"Resistance R3(ohm)");
+disp("Design Verification : ");
+disp(2*Q^2>abs(Ap),"(i) Is 2*Q^2>|Ap| ?");
+disp("For op-amp 741, GBW=1 MHz");
+GBW=1;//MHz
+disp(GBW*10^6>20*Q^2*fc,"Is GBW*10^6>20*Q^2*fc ?");
+disp("2nd criteria failed. The op-amp should have higher GBW product. Use LF411");
diff --git a/2609/CH9/EX9.18/Ex9_18.sce b/2609/CH9/EX9.18/Ex9_18.sce new file mode 100755 index 000000000..891a73cf7 --- /dev/null +++ b/2609/CH9/EX9.18/Ex9_18.sce @@ -0,0 +1,34 @@ +//Ex 9.18
+clc;
+clear;
+close;
+format('v',5);
+Ap=-10;//Pass band gain
+Q=22;//Quality factor
+fc=50;//Hz
+R=60;//dB/decade(Roll off rate)
+disp("Roll off rate of single op-amp=20 dB/decade. No. of stages will be 3. Desired design can be obtained by cascading three stages.");
+n=3;//no. of op-amps(as single op-amp has 20 dB/decade)
+fc1=fc;//Hz
+fc2=fc;//Hz
+fc3=fc;//Hz
+Q1=Q*sqrt(2^(1/n)-1);//Quality factor of each stage
+Q2=Q1;//Quality factor
+Q3=Q1;//Quality factor
+Ap1=-(-Ap)^(1/n);//Band pass gain of each stage
+Ap2=Ap1;//Band pass gain
+Ap3=Ap1;//Band pass gain
+//Design of a single op-amp
+C=0.1;//micro F//Chosen for the design
+disp("Various design parameters for a single stages are :");
+disp(C,"Capacitance C(micro F)");
+format('v',4);
+R2=Q1/%pi/(fc)/(C*10^-6)/1000;//kohm
+disp(R2,"Resistance R2(kohm)");
+format('v',5);
+R1=-R2/(2*Ap1);//kohm
+disp(R1,"Resistance R1(kohm)");
+format('v',4);
+R3=R1/(4*%pi^2*R1*1000*R2*1000*(C*10^-6)^2*(fc)^2-1);//kohm
+disp(R3,"Resistance R3(ohm)");
+//Answer for R2 is wrong in the book.
diff --git a/2609/CH9/EX9.2/Ex9_2.sce b/2609/CH9/EX9.2/Ex9_2.sce new file mode 100755 index 000000000..6594521ed --- /dev/null +++ b/2609/CH9/EX9.2/Ex9_2.sce @@ -0,0 +1,20 @@ +//Ex 9.2
+clc;
+clear;
+close;
+format('v',5);
+fH=1;//kHz
+Ap=2;//Pass band gain
+disp("Various design parameters are :-");
+C=0.05;//micro F//Chosen for the design
+disp(C,"Capacitance(micro F)");
+format('v',4);
+R=1/(2*%pi*fH*1000*C*10^-6)/1000;//kohm
+disp(R,"Resistance R(kohm)");
+//Ap=1+Rf/Ri
+RfBYRi=Ap-1;//Rf=Ri here
+//R=Rf||Ri
+Ri=2*R;//kohm
+Rf=Ri;//kohm
+disp(Ri,"Resistance Ri(kohm)");
+disp(Rf,"Resistance Rf(kohm)");
diff --git a/2609/CH9/EX9.20/Ex9_20.sce b/2609/CH9/EX9.20/Ex9_20.sce new file mode 100755 index 000000000..d60afeeef --- /dev/null +++ b/2609/CH9/EX9.20/Ex9_20.sce @@ -0,0 +1,18 @@ +//Ex 9.20
+clc;
+clear;
+close;
+format('v',5);
+fNO=50;//Hz
+Q=20;//Quality Factor
+disp("Various design parameters are :-");
+C=1;//micro F//Chosen for the design
+disp(C,"Capacitance C(micro F)");
+R=1/(2*%pi*fNO)/(C*10^-6)/1000;//kohm
+disp(R,"Resistance R(kohm)");
+disp("Use R=3.2 kohm");
+//Q=(RA+RB)/4/RA
+RA=1;//kohm(chosen for the design)
+RB=Q*4*RA-RA;//kohm
+disp(RA,"Resistance RA(kohm)");
+disp(RB,"Resistance RB(kohm)");
diff --git a/2609/CH9/EX9.3/Ex9_3.sce b/2609/CH9/EX9.3/Ex9_3.sce new file mode 100755 index 000000000..cbc56fad2 --- /dev/null +++ b/2609/CH9/EX9.3/Ex9_3.sce @@ -0,0 +1,11 @@ +//Ex 9.3
+clc;
+clear;
+close;
+format('v',5);
+f0=800;//Hz
+//For Butterworth filter : f0=fH=f_3dB
+fH=f0;//Hz
+f_3dB=f0;//Hz
+BW=fH;//Hz
+disp(BW,"Bandwidth(Hz)");
diff --git a/2609/CH9/EX9.4/Ex9_4.sce b/2609/CH9/EX9.4/Ex9_4.sce new file mode 100755 index 000000000..d0d7a8691 --- /dev/null +++ b/2609/CH9/EX9.4/Ex9_4.sce @@ -0,0 +1,15 @@ +//Ex 9.4
+clc;
+clear;
+close;
+format('v',5);
+fH=2;//kHz(Cutoff frequency)
+Ap=1;//Pass band gain
+disp("Various design parameters are :-");
+C=0.05;//micro F//Chosen for the design between 0.01 & 1 micro F
+disp(C,"Capacitance(micro F)");
+format('v',4);
+R=1/(2*%pi*fH*1000*C*10^-6)/1000;//kohm
+disp(R,"Resistance R(kohm)");
+Rdash=R;///kohm(To eliminate the effect of offset)
+disp(Rdash,"Resistance R*(kohm)");
diff --git a/2609/CH9/EX9.5/Ex9_5.sce b/2609/CH9/EX9.5/Ex9_5.sce new file mode 100755 index 000000000..402ce6f66 --- /dev/null +++ b/2609/CH9/EX9.5/Ex9_5.sce @@ -0,0 +1,22 @@ +//Ex 9.5
+clc;
+clear;
+close;
+format('v',4);
+f0=1;//kHz(Cutoff frequency)
+f0dash=1.5;//kHz(Cutoff frequency)
+disp("Various design parameters are :-");
+//For Butterworth filter
+fH=f0;//kHz
+fHdash=f0dash;//kHz
+K=f0/f0dash;//ratio
+R=3.2;//kohm
+Rdash=K*R;//kohm
+disp(Rdash,"Resistance Rdash(kohm)");
+disp("Use Rdash=2.2 kohm");
+format('v',5);
+C=0.05;//micro F//Chosen for the design
+disp(C,"Capacitance(micro F)");
+format('v',4);
+fHdash=1/(2*%pi*Rdash*1000*C*10^-6)/1000;//kHz
+disp(fHdash,"Cutoff frequency(kHz)");
diff --git a/2609/CH9/EX9.6/Ex9_6.sce b/2609/CH9/EX9.6/Ex9_6.sce new file mode 100755 index 000000000..343f0d1ca --- /dev/null +++ b/2609/CH9/EX9.6/Ex9_6.sce @@ -0,0 +1,21 @@ +//Ex 9.6
+clc;
+clear;
+close;
+format('v',5);
+fL=400;//Hz
+Ap=2;//Pass band gain
+disp("Various design parameters are :-");
+C=0.05;//micro F//Chosen for the design between 0.01 & 1 micro F
+disp(C,"Capacitance(micro F)");
+R=1/(2*%pi*fL*C*10^-6)/1000;//kohm
+format('v',4);
+disp(R,"Resistance R(kohm)");
+disp("Use R=8.2 kohm");
+//Ap=1+Rf/Ri
+RfBYRi=Ap-1;//Rf=Ri here
+//R=Rf||Ri
+Ri=2*R;//kohm
+Rf=Ri;//kohm
+disp(Ri,"Resistance Ri(kohm)");
+disp(Rf,"Resistance Rf(kohm)");
diff --git a/2609/CH9/EX9.7/Ex9_7.sce b/2609/CH9/EX9.7/Ex9_7.sce new file mode 100755 index 000000000..a4b609e9d --- /dev/null +++ b/2609/CH9/EX9.7/Ex9_7.sce @@ -0,0 +1,17 @@ +//Ex 9.7
+clc;
+clear;
+close;
+format('v',5);
+fL=400;//Hz
+fLdash=800;//Hz
+K=fL/fLdash;//ratio
+disp("Various parameters for retuning are :-");
+R=8.2;//kohm
+Rdash=K*R;//kohm
+disp(Rdash,"Resistance Rdash(kohm)");
+disp("Use Rdash=4.2 kohm");
+Rf=2*Rdash;//kohm
+Ri=2*Rdash;//kohm
+disp(Ri,"Resistance Ri(kohm)");
+disp(Rf,"Resistance Rf(kohm)");
diff --git a/2609/CH9/EX9.8/Ex9_8.sce b/2609/CH9/EX9.8/Ex9_8.sce new file mode 100755 index 000000000..af35c2141 --- /dev/null +++ b/2609/CH9/EX9.8/Ex9_8.sce @@ -0,0 +1,32 @@ +//Ex 9.8
+clc;
+clear;
+close;
+format('v',6);
+f0=3;//kHz(Critical frequency)
+Ap=4;//Pass band gain
+//For Butterworth filter using sallen key
+alfa=1.414;klp=1;//constant
+fH=f0;//kHz
+f_3dB=f0;//kHz
+disp("Various design parameters are :-");
+C1=0.01;//micro F//Chosen for the design
+disp(C1,"Capacitance C1(micro F)");
+C2=alfa^2*C1/4;//micro F
+disp(C2,"Capacitance C2(micro F)");
+disp("Use C2=0.004 micro F");
+C2=0.004;// micro F
+R=1/(2*%pi*fH*10^3*sqrt(C1*10^-6*C2*10^-6))/1000;//kohm
+format('v',4);
+disp(R,"Resistance R(kohm)");
+disp("Use R=8.2 kohm");
+R=8.2;//kohm
+//For offset minimization
+Rdash=2*R;//kohm
+disp(Rdash,"Resistance R*(kohm)");
+RfBYRi=Ap-1;//Rf=Ri here
+//Ri=10 kohm chosen for design
+Ri=10;//kohm
+Rf=RfBYRi*Ri;//kohm
+disp(Ri,"Resistance Ri(kohm)");
+disp(Rf,"Resistance Rf(kohm)");
diff --git a/2609/CH9/EX9.9/Ex9_9.sce b/2609/CH9/EX9.9/Ex9_9.sce new file mode 100755 index 000000000..104630d40 --- /dev/null +++ b/2609/CH9/EX9.9/Ex9_9.sce @@ -0,0 +1,35 @@ +//Ex 9.9
+clc;
+clear;
+close;
+format('v',5);
+f0=2;//kHz(Critical frequency)
+Ap=5;//dc gain
+//For Butterworth filter using sallen key
+alfa=1.414;klp=1;//constant
+fH=f0;//kHz
+f_3dB=f0;//kHz
+Ap1=3-alfa;//gain
+RfBYRi=Ap1-1;//ratio
+disp("Various design parameters are :-");
+C=0.05;//micro F//Chosen for the design
+disp(C,"Capacitance C(micro F)");
+R=klp/(2*%pi*fH*10^3*C*10^-6)/1000;//kohm
+disp(R,"Resistance R(kohm)");
+disp("Use R=1.6 kohm");
+//For offset minimization
+//2*R=Rf||Ri=Rf/(RfBYRi+1)
+Rf=2*R*(RfBYRi+1);//kohm
+disp(Rf,"Resistance Rf(kohm)");
+Ri=Rf/RfBYRi;//kohm
+format('v',4);
+disp(Ri,"Resistance Ri(kohm)");
+//Ap=4;//dc gain in this case
+Ap=4;//dc gain
+Ap2=Ap/Ap1;//remainimg gain after 2nd order butterworth filter
+RfdashBYRidash=Ap2-1;//ratio
+//Ridash=10;//kohm chosen for design
+Ridash=10;//kohm
+disp(Ridash,"Resistance Ridash(kohm)");
+Rfdash=RfdashBYRidash*Ridash;//kohm
+disp(Rfdash,"Resistance Rfdash(kohm)");
|