diff options
Diffstat (limited to '74/CH1')
-rwxr-xr-x | 74/CH1/EX1.1/example1_sce.sce | 21 | ||||
-rwxr-xr-x | 74/CH1/EX1.10/example10_sce.sce | 16 | ||||
-rwxr-xr-x | 74/CH1/EX1.11/example11_sce.sce | 15 | ||||
-rwxr-xr-x | 74/CH1/EX1.12/example12_sce.sce | 40 | ||||
-rwxr-xr-x | 74/CH1/EX1.13/example13_sce.sce | 28 | ||||
-rwxr-xr-x | 74/CH1/EX1.14/example14_sce.sce | 29 | ||||
-rwxr-xr-x | 74/CH1/EX1.15/example15_sce.sce | 14 | ||||
-rwxr-xr-x | 74/CH1/EX1.16/example16_sce.sce | 18 | ||||
-rwxr-xr-x | 74/CH1/EX1.17/example17_sce.sce | 18 | ||||
-rwxr-xr-x | 74/CH1/EX1.2/example2_sce.sce | 14 | ||||
-rwxr-xr-x | 74/CH1/EX1.3/example3_sce.sce | 15 | ||||
-rwxr-xr-x | 74/CH1/EX1.4/example4_sce.sce | 6 | ||||
-rwxr-xr-x | 74/CH1/EX1.5/example5_sce.sce | 9 | ||||
-rwxr-xr-x | 74/CH1/EX1.6/example6_sce.sce | 8 | ||||
-rwxr-xr-x | 74/CH1/EX1.7/example7_sce.sce | 12 | ||||
-rwxr-xr-x | 74/CH1/EX1.8/example8_sce.sce | 17 | ||||
-rwxr-xr-x | 74/CH1/EX1.9/example9_sce.sce | 16 |
17 files changed, 296 insertions, 0 deletions
diff --git a/74/CH1/EX1.1/example1_sce.sce b/74/CH1/EX1.1/example1_sce.sce new file mode 100755 index 000000000..acbe72320 --- /dev/null +++ b/74/CH1/EX1.1/example1_sce.sce @@ -0,0 +1,21 @@ +// chapter 1
+//example 1.3
+// page no.18,figure no.1.22
+//given
+Rin1=100;Rin2=100;
+Re=2700;Rc=4700;
+Hfe=100;
+Hie=1000;Hoe=0;
+Aid=(Hfe*Rc)/(Rin1+Hie);
+disp(Aid)//differential gain
+//Acm=(2*Re*Hoe-Hfe)*Rc/(2*Re(1+Hfe)+(Rin1+Hie)(1+2*Re*Hoe)),and Hoe=0
+x=2*Re*1+2*Re*Hfe+Rin1+Hie;
+Acm=-(Hfe*Rc)/x;
+disp(Acm)//neglecting the negative value.taking mod of Acm
+Acm=-(Acm)
+CMRR=20*log10(Aid/Acm);
+disp(CMRR)//is in db
+Rin=2*Rin1+2*Hie;
+disp(Rin)//input resistance
+Ro=Rc
+disp(Ro)//output resistance
\ No newline at end of file diff --git a/74/CH1/EX1.10/example10_sce.sce b/74/CH1/EX1.10/example10_sce.sce new file mode 100755 index 000000000..1e8fe5737 --- /dev/null +++ b/74/CH1/EX1.10/example10_sce.sce @@ -0,0 +1,16 @@ +// chapter 1
+// example 1.10
+//page 34, figure 1.39
+Xdc=100;Xac=100;// gain
+Vbe=0.7;Vee=12;Vcc=12;//given voltage in volts
+Re=8200;Rin=150;Rc=3300;// given resistance in ohm
+Hfe=100;Hie=1000;// given
+Icq=(Vee-Vbe)/(2*Re+(Rin/Xdc))
+Vceq=Vcc+Vbe-Rc*Icq
+disp(Icq,Vceq)//operating point(volt,ampere)
+Aid=(Hfe*Rc)/(Rin+Hie);// voltage gain
+disp(Aid)// result
+Ri=2*(Rin+Hie)// input resistance
+disp(Ri)//in ohm
+Ro=Rc;// output resistance
+disp(Ro)//output resistance in ohm
\ No newline at end of file diff --git a/74/CH1/EX1.11/example11_sce.sce b/74/CH1/EX1.11/example11_sce.sce new file mode 100755 index 000000000..bbdf41c60 --- /dev/null +++ b/74/CH1/EX1.11/example11_sce.sce @@ -0,0 +1,15 @@ +//chapter 1
+// example 1.11
+// page 35
+Rin=1000;Rc=1000;Re=2500000;// resistance is in ohm(given)
+Hfe=50;Hre=0;Hoe=0;Hie=1000;//given
+Vid=1*10^-3;Vc=20*10^-3// voltage in volts
+Aid=-(Hfe*Rc)/(Rin+Hie);// differential gain Aid
+Vout=Aid*Vid;// output voltage
+disp(Vout)//result in ampere.
+// to calculate CMRR we have to first find Acm common mode gain
+Acm=((2*Re*Hoe-Hfe)*Rc)/(2*Re*(1+Hfe)+Rin+Hie)// common mode gain
+CMRR=Aid/Acm;//CMRR
+disp(CMRR)//result
+CMRRdb=20*log10(CMRR);
+disp(CMRRdb)// result CMRR is in db
\ No newline at end of file diff --git a/74/CH1/EX1.12/example12_sce.sce b/74/CH1/EX1.12/example12_sce.sce new file mode 100755 index 000000000..d63f85920 --- /dev/null +++ b/74/CH1/EX1.12/example12_sce.sce @@ -0,0 +1,40 @@ +// chapter 1
+// example 1.12
+// page no.38, figure 1.44
+Kn1=.2*10^-3;Kn2=.2*10^-3;Kn3=.4*10^-3;Kn4=.4*10^-3;// all in mA/V^2
+Vtn=1;Vcc=12;Vee=-12;// voltage is in volts
+R1=27000;Rd=15000;
+// calculation of I1 and Vgs4
+// applying KVL=> Vcc-Vee=I1*R1+Vgs4------------eq(1)
+// I1=Kn3*(Vgs4-Vtn)^2-----------eq(2)
+// put eq (2) in eq (1)
+//((Vcc-Vee)-Vgs4)/R1=Kn3*(Vgs4-Vtn)^2
+p1=poly([-13.2 -20.6 10],'Vgs4','c');
+roots(p1)// we have to take only value positive and greater than Vtn
+I1=Kn3*(2.573-Vtn)^2;//only positive and value greater than Vtn of Vgs4 taken
+disp(I1)
+//calculation of drain current Iq
+Iq=I1;// identical M4 and M3
+disp(Iq)
+// calculation of Id1 and Id2
+Id1=Iq/2;
+Id2=Iq/2;
+disp(Id1,Id2)// identical
+// calculation of gate voltage for M1 and M2
+Vgs1=Vtn+sqrt(Id1/Kn1);// using Id1=Kn1*(Vgs1-Vtn)^2
+disp(Vgs1)// result gate to source voltage
+Vgs2=Vgs1;// since they are identical
+disp(Vgs2)
+//calculation of Vout1 and Vout2
+Vout1=Vcc-Id1*Rd;
+disp(Vout1)// under quiescent condition
+Vout2=Vcc-Id2*Rd;
+disp(Vout2)
+// calculation of maximum common mode input voltage Vcmmax
+Vds1=Vgs1-Vtn;
+Vcmmax=Vout1-Vds1+Vgs1;//maximum common mode voltage
+disp(Vcmmax)// result is in volts
+// calculation of minimum common mode input voltage Vcmmin
+Vds4=Vgs2-Vtn;
+Vcmmin=Vgs1+Vds4-Vcc;// minimum common mode input voltage
+disp(Vcmmin)// volts
\ No newline at end of file diff --git a/74/CH1/EX1.13/example13_sce.sce b/74/CH1/EX1.13/example13_sce.sce new file mode 100755 index 000000000..da5b507db --- /dev/null +++ b/74/CH1/EX1.13/example13_sce.sce @@ -0,0 +1,28 @@ +// chapter 1
+// example 1.13
+// page 44, figure 1.52
+Rl=%inf;B=100;Rin=0;
+Re=1;// let suppose
+Iq=4*10^-3;
+Vt=26*10^-3;Va2=150;Va4=100;
+I2=Iq/2;
+I4=Iq/2;
+disp(I2,I4)
+Gm=Iq/(2*Vt);//parameters
+Ro2=Va2/I2;
+Ro4=Va4/I4;
+Aid=Gm*((Ro2*Ro4)/(Ro2+Ro4));//Aid =Gm(Ro2||Ro4||Rl),Rl=%inf
+disp(Aid)//differential mode gain Aid
+r=(2*(B*Vt))/Iq// Vt=26mV at 300k
+//Re=1/X*Iq and Rc=1/x*Iq/2
+//Rc/Re=2
+Rc=2*Re;
+//assuming 2*(1+B)*Re/(r+Rin)>>>>1
+//Acm=((-Gm*Rc)/1+((2*(1+B)*Re)/(r+Rin)));
+k=(2*(1+B)*Re)/((r+Rin)/1000)
+Acm=-((Gm*Rc)*1000)/k;
+disp(Acm)// common mode gain
+CMRR=Aid/-Acm;
+disp(CMRR)//
+CMRRdb=20*log10(CMRR);
+disp(CMRRdb)// result is in db
\ No newline at end of file diff --git a/74/CH1/EX1.14/example14_sce.sce b/74/CH1/EX1.14/example14_sce.sce new file mode 100755 index 000000000..1b549d812 --- /dev/null +++ b/74/CH1/EX1.14/example14_sce.sce @@ -0,0 +1,29 @@ +// chapter 1
+//example 1.14
+// page 46, figure1.54
+Bac=100;Bdc=100;
+Vbe=.715;Vd1=.715; Vz=6.2;Vee=-10;Vcc=10;Vt=26*10^-3;// at room temprature
+Re=2700;Rin=10000;Rc=4700;//assuming Rin= 10k
+Izt=41*10^-3;
+Vin=0;// for dc analysis
+//calculation of the value of Ie,Icq1 and Icq2
+Vb3=Vee+Vz+Vd1
+Ve3=Vb3-Vbe
+Ie=(Ve3-Vee)/Re;
+disp(Ie)
+Ie1=Ie/2
+Ie2=Ie/2
+A=B/(1+B);
+Icq=A*Ie1;//(B/(B+1))*Ie1
+disp(Icq)
+Icq2=Icq;
+disp(Icq2)
+Gm=Icq/Vt// Vt at room temp 26mA
+r=(B*Vt)/Icq
+Ib=Icq/B
+Ve1=-Ib*Rin-Vbe;
+disp(Ve1)//result
+Vc1=Vcc-Icq*Rc;
+disp(Vc1)
+Vceq=Vc1-Ve1;
+disp(Vceq,Icq)//result operating point
\ No newline at end of file diff --git a/74/CH1/EX1.15/example15_sce.sce b/74/CH1/EX1.15/example15_sce.sce new file mode 100755 index 000000000..f30228ed0 --- /dev/null +++ b/74/CH1/EX1.15/example15_sce.sce @@ -0,0 +1,14 @@ +//chapter 1
+// example 1.15
+//page 47, figure 1.57
+Bdc=100;Bac=100;
+Vbe=.715;
+R=5600;
+Vr=-(Vbe-10);
+Ir=Vr/R;// Ir=Ic+Ib=Vr/R
+disp(Ir)
+Ic=Ir*(Bdc/(1+Bdc));//Ir=Ic+Ib=Ic+Ic/Bdc
+disp(Ic)//ampre
+Ic2=Ir
+Ic3=Ir
+Ic4=Ir
\ No newline at end of file diff --git a/74/CH1/EX1.16/example16_sce.sce b/74/CH1/EX1.16/example16_sce.sce new file mode 100755 index 000000000..db38212a6 --- /dev/null +++ b/74/CH1/EX1.16/example16_sce.sce @@ -0,0 +1,18 @@ +//chapter 1
+//example 1.16
+//page 48,figure 1.59
+Ie=400*10^-6;
+Bmin=80;Bmax=120;
+//Ie=Ie1+Ie2 for identical transistor Ie1=Ie2
+Ie1=Ie/2
+Ie2=Ie/2
+IB1max=Ie1/(1+Bmin)
+IB2max=Ie2/(1+Bmin)
+IBmax=(IB1max+IB2max)/2;
+disp(IBmax)//largest input bais current
+IB1min=Ie1/(1+Bmax)
+IB2min=Ie2/(1+Bmax)
+IBmin=(IB1min+IB2min)/2;
+disp(IBmin)// smallest current
+Iios=IBmax-IBmin// input bais current
+disp(Iios)//result
\ No newline at end of file diff --git a/74/CH1/EX1.17/example17_sce.sce b/74/CH1/EX1.17/example17_sce.sce new file mode 100755 index 000000000..864c22f88 --- /dev/null +++ b/74/CH1/EX1.17/example17_sce.sce @@ -0,0 +1,18 @@ +//chapter1
+//example 1.17
+//page 49, figure 1.60
+I=.2*10^-3; B=200;Va=100;Rl=%inf;
+Vt=26*10^-3//assuming at room temprature
+I2=I/2
+I4=I2
+r02=Va/I2;
+disp(r02)
+r04=Va/I4;
+disp(r04)
+Gm=2/Vt
+Aid=Gm/((1/r02)+(1/r04)+(1/Rl));
+disp(Aid)
+Ri=2*(B/I)//Ri=2*r
+disp(Ri)
+Ri=(r02*r04)/(r02+r04);
+disp(Ri)
\ No newline at end of file diff --git a/74/CH1/EX1.2/example2_sce.sce b/74/CH1/EX1.2/example2_sce.sce new file mode 100755 index 000000000..9ad37d0d3 --- /dev/null +++ b/74/CH1/EX1.2/example2_sce.sce @@ -0,0 +1,14 @@ +// chapter 1
+// example 1.2
+//page 17. figure 1.21
+//given
+Rc=4700,Re=2700;// Resistor is in ohm
+Vcc=12;Vee=12;// voltage is in volt
+Vbe=.7;// assuming Vbe
+Ie=(Vee-Vbe)/(2*Re);
+disp(Ie)//current is in ampere
+Icq=Ie;
+disp(Icq)//current is in ampere
+Vc=Icq*Rc;
+Vce=Vcc+Vbe-Vc;
+disp(Vce)
\ No newline at end of file diff --git a/74/CH1/EX1.3/example3_sce.sce b/74/CH1/EX1.3/example3_sce.sce new file mode 100755 index 000000000..8f17b8019 --- /dev/null +++ b/74/CH1/EX1.3/example3_sce.sce @@ -0,0 +1,15 @@ +// chapter 1
+// example 1.3
+//page 18
+Rin1=100;Rin2=100;Re=2.7*10^3;Rc=4.7*10^3;
+hfe=100;hie=1000;hoe=0;
+Aid=(hfe*Rc)/(Rin1+hie);//Differential gain
+disp(Aid)
+Acm=((2*Re*hoe-hfe)*Rc)/(2*Re*(1+hfe)+(Rin1+hie)*(1+2*Re*hoe));//comman mode gain
+Acm=-Acm// neglecting negative sign
+disp(Acm)
+CMRR=Aid/Acm
+CMRR=20*log10(CMRR);
+disp(CMRR)
+Rin=2*(Rin1+hie)//input resistance
+Ro=Rc//output resistance
\ No newline at end of file diff --git a/74/CH1/EX1.4/example4_sce.sce b/74/CH1/EX1.4/example4_sce.sce new file mode 100755 index 000000000..c762a7769 --- /dev/null +++ b/74/CH1/EX1.4/example4_sce.sce @@ -0,0 +1,6 @@ +//chapter 1
+//example 1.4
+// page 23,figure 1.27
+Vee=10;R1=2400;R2=2400;R3=1000;Vbe=.7;//given
+I=(Vee-(R2*Vee/(R1+R2))-Vbe)/R3;
+disp(I)// result is in ampere
\ No newline at end of file diff --git a/74/CH1/EX1.5/example5_sce.sce b/74/CH1/EX1.5/example5_sce.sce new file mode 100755 index 000000000..a725e5495 --- /dev/null +++ b/74/CH1/EX1.5/example5_sce.sce @@ -0,0 +1,9 @@ +//chapter 1
+// example 1.5
+//page 27.figure 1.31
+Ic1=10*10^-6;Vcc=50;Vbe=.7;R=50*10^3;
+Ic2=(Vcc-Vbe)/R;
+disp(Ic2);
+Vt=26*10^-3// assume at room temperature of 300k
+Re=Vt/Ic1*log(Ic2/Ic1);
+disp(Re)//result in ohm
\ No newline at end of file diff --git a/74/CH1/EX1.6/example6_sce.sce b/74/CH1/EX1.6/example6_sce.sce new file mode 100755 index 000000000..6cf7bad69 --- /dev/null +++ b/74/CH1/EX1.6/example6_sce.sce @@ -0,0 +1,8 @@ +//chapter 3
+// exmaple 3.6
+//page 124 , figure 3.17
+R1=1*10^3;R2=R1;R3=R1;//given
+Rf=1*10^3;//given
+Vin1=2;Vin2=1;Vin3=4;//given
+Vout=-((Rf/R1)*Vin1+(Rf/R2)*Vin2+(Rf/R3)*Vin3);
+disp(Vout)
\ No newline at end of file diff --git a/74/CH1/EX1.7/example7_sce.sce b/74/CH1/EX1.7/example7_sce.sce new file mode 100755 index 000000000..a319b1d68 --- /dev/null +++ b/74/CH1/EX1.7/example7_sce.sce @@ -0,0 +1,12 @@ +//chapter 1
+// example 1.7
+//page 32,figure 1.36
+Vee=12;Vbe=0.7;Rin=100;Re=8400;Rc=3900;Vcc=12;
+Xdc=100// dc gain
+Icq=(Vee-Vbe)/((Rin/Xdc)+2*Re);
+Vceq=Vcc+Vbe-Icq*Rc;
+disp(Vceq,Icq)//the DC base point or Q point is at(volt,ampere)
+Hie=1100// assuming
+Ri=2*(Rin+Hie);//input resistance
+disp(Ri)// input resistance in ohm
+Ro=Rc// output resistance
\ No newline at end of file diff --git a/74/CH1/EX1.8/example8_sce.sce b/74/CH1/EX1.8/example8_sce.sce new file mode 100755 index 000000000..a4004bb15 --- /dev/null +++ b/74/CH1/EX1.8/example8_sce.sce @@ -0,0 +1,17 @@ +//chapter 1
+// example 1.8
+// page 33, figure 1.37:
+Xdc=100;Xac=100;//AC and DC gain
+Vbe=0.7;Vee=10;Vcc=10;// voltage is in volts
+Re=4700;Rin=50;Rc=2700;//resistance in ohm
+Hfe=100;Hie=1100// assuming
+Icq=(Vee-Vbe)/(2*Re+(Rin/Xdc));
+disp(Icq)//result current
+Vceq=Vcc+Vbe-Rc*Icq;
+disp(Vceq)// result voltage
+Aid=(Hfe*Rc)/(2*(Rin+Hie));//voltage gain Aid
+disp(Aid)
+Ri=2*(Rin+Hie)// input resistance
+disp(Ri)//in ohm
+Ro=Rc;// output resistance
+disp(Ro)//ohm
\ No newline at end of file diff --git a/74/CH1/EX1.9/example9_sce.sce b/74/CH1/EX1.9/example9_sce.sce new file mode 100755 index 000000000..11a9f6a77 --- /dev/null +++ b/74/CH1/EX1.9/example9_sce.sce @@ -0,0 +1,16 @@ +// chapter 1
+// example 1.9
+//page 34, figure 1.38
+Xdc=100;Xac=100;// gain
+Vbe=0.7;Vee=12;Vcc=12;//given voltage in volts
+Re=4700;Rin=50;Rc=2700;// given resistance in ohm
+Hfe=100;Hie=1100;// given
+Icq=(Vee-Vbe)/(2*Re+(Rin/Xdc));
+Vceq=Vcc+Vbe-Rc*Icq;
+disp(Icq,Vceq)//operating point(volt,ampere)
+Aid=(Hfe*Rc)/(Rin+Hie);// voltage gain
+disp(Aid)// result
+Ri=2*(Rin+Hie)// input resistance
+disp(Ri)//in ohm
+Ro=Rc;// output resistance
+disp(Ro)//output resistance in ohm
\ No newline at end of file |