diff options
Diffstat (limited to '2075')
80 files changed, 1446 insertions, 0 deletions
diff --git a/2075/CH1/EX1.1/pe1_1.sce b/2075/CH1/EX1.1/pe1_1.sce new file mode 100755 index 000000000..cd10ab13b --- /dev/null +++ b/2075/CH1/EX1.1/pe1_1.sce @@ -0,0 +1,14 @@ +//example 1.1a
+clc;funcprot(0);
+//Initialization of Variable
+R1=1000;
+R2=1000;
+Rl=500//load resistance
+V=1//input voltage
+Vo=(R2/(R1+R2))*V;
+disp(Vo,"open output voltage in Vrms")
+Rll=1/((1/R2)+(1/Rl))//lower loaded resistance
+disp(Rll,"resistance lower loaded in ohm:")
+Vol=(Rll/(R2+Rll))*V;
+disp(Vol,"loaded output voltag in Vrms")
+clear()
diff --git a/2075/CH1/EX1.11/pe1_11.sce b/2075/CH1/EX1.11/pe1_11.sce new file mode 100755 index 000000000..5ed79f285 --- /dev/null +++ b/2075/CH1/EX1.11/pe1_11.sce @@ -0,0 +1,18 @@ +//exapple 1.11
+clc; funcprot(0);
+// Initialization of Variable
+Vin=4.5;
+R1=1100;
+R2=10000;
+G1=3.4//gain 1
+G2=120//gain 2
+//calculation
+Ir=Vin/R1;
+disp(Ir*1000,"output current in mA:")
+Vo=Ir*(R1+R2);
+disp(Vo,"output voltage in V:")
+Vuo1=Vo/G1;
+disp(Vuo1,"gain output voltage 1 in V:")
+Vuo2=Vo/G2;
+disp(Vuo2,"gain output voltage 2 in V:")
+clear()
diff --git a/2075/CH1/EX1.2/pe1_2.sce b/2075/CH1/EX1.2/pe1_2.sce new file mode 100755 index 000000000..ff3d15f80 --- /dev/null +++ b/2075/CH1/EX1.2/pe1_2.sce @@ -0,0 +1,8 @@ +//example 1.2
+clc;funcprot(0);
+//Initialization of Variable
+Rf=100000//resistance
+Acl=100//amplifier gain
+Ri=Rf/(Acl-1);
+disp(Ri/1000,"input resistance in Kohm")
+clear()
diff --git a/2075/CH1/EX1.3/pe1_3.sce b/2075/CH1/EX1.3/pe1_3.sce new file mode 100755 index 000000000..913aad13b --- /dev/null +++ b/2075/CH1/EX1.3/pe1_3.sce @@ -0,0 +1,24 @@ +//example 1.3
+clc;funcprot(0);
+//Initialization of Variable
+Vni=0//non inverting voltage
+Vinv=0;//inverting voltage
+Vri1=1;
+Vri2=15;
+Ri1=5600//resistance
+Ri2=470000;
+Rf=10000//load resistance
+//calculation
+Ir1=Vri1/Ri1;
+disp(Ir1*1e6,"current through Ri1 in microAmp:")
+Ir2=Vri2/Ri2;
+disp(Ir2*1e6,"current through Ri2 in microAmp:")
+Irf=(Vri1/Ri1)+(Vri2/Ri2);
+disp(Irf*1e6,"current through Rf in microAmp:")
+Vr=Irf*Rf;
+disp(Vr,"voltage dropped in V:")
+Vo1=-Vr;
+disp(Vo1,"output voltage 1 in V:")
+Vo=Irf*Rf;
+disp(Vo,"output voltage in V:")
+clear()
diff --git a/2075/CH1/EX1.4/pe1_4.sce b/2075/CH1/EX1.4/pe1_4.sce new file mode 100755 index 000000000..f6bb58f38 --- /dev/null +++ b/2075/CH1/EX1.4/pe1_4.sce @@ -0,0 +1,22 @@ +//example 1.4
+clc;funcprot(0);
+//Initialization of Variable
+Ri1=950;//ohm
+Ri2=1050;
+Rf1=105000;//resistance
+Rf2=95000;
+Vin=5;//voltage
+//calculation
+Vinv=(Rf1/(Rf1+Ri1))*Vin;
+disp(Vinv,"inverting voltage in V:")
+Vni=Vinv;
+disp(Vni,"non inverting voltage in V:")
+Irf2=(Vin-Vinv)/Ri2;
+disp(Irf2*1e6,"current through Rf2 in microA:")
+Iri2=Irf2;
+disp(Iri2*1e6,"current through Ri2 in microA:")
+Vrf2=Irf2*Rf2;
+disp(Vrf2,"voltage dropped in V:")
+Vo=Vinv-Vrf2;
+disp(Vo*1000,"output voltage in mV:")
+clear()
diff --git a/2075/CH1/EX1.5/pe1_5.sce b/2075/CH1/EX1.5/pe1_5.sce new file mode 100755 index 000000000..c6cdd7b9d --- /dev/null +++ b/2075/CH1/EX1.5/pe1_5.sce @@ -0,0 +1,32 @@ +//example 1.5
+clc; funcprot(0);
+// Initialization of Variable
+Vniu1=2.45;//V
+Vniu2=2.55;//V
+Vinvu1=2.45;
+Vinvu2=2.55;
+Ri1=9000;//ohm
+Ri2=1000;//ohm
+Rf1=1000;
+Rf2=9000;
+Rg=200;//load resistance
+//calculation
+Iri1=Vniu1/Ri1;
+disp(Iri1*1e6,"input resistor current in microA:")
+Irg=(Vniu2-Vniu1)/Rg;
+disp(Irg*1e6,"input resistor current in microA:")
+Irf1=Irg-Iri1;
+disp(Irf1*1e6,"feedback resistor current in microAmp:")
+Vrf1=Irf1*Rf1;
+disp(Vrf1*1000,"resistor voltage in mV:")
+Vou1=Vniu1-Vrf1;
+disp(Vou1,"1st output voltage in V:")
+Iri2=(Vniu2-Vou1)/Ri2;
+disp(Iri2*1e6,"input resistor current in microA:")
+Irf2=Iri2+Irg;
+disp(Irf2*1e6,"input resistor current in microA:")
+Vrf2=Irf2*Rf2//feedback resistor voltage
+disp(Vrf2,"feedback resistor voltage in V:")
+Vo=Vrf2+Vniu2;
+disp(Vo,"2nd output voltage in V:")
+clear()
diff --git a/2075/CH1/EX1.6a/pe1_6a.sce b/2075/CH1/EX1.6a/pe1_6a.sce new file mode 100755 index 000000000..b24f7f591 --- /dev/null +++ b/2075/CH1/EX1.6a/pe1_6a.sce @@ -0,0 +1,29 @@ +//example 1.6
+clc; funcprot(0);
+// Initialization of Variable
+Vniu1=0;//V
+Vinvu2=0;//V
+Vref=2.56;
+Rl=10000;//ohm
+Rf=39200;//ohm
+Ro=10;//resistance
+Vdc1=5;
+Vdc2=15;
+Idc=.5;//current
+//calculation
+Iu1=(Vref/Rl)*.5;
+disp(Iu1*1e6,"input resistor current in microA:")
+Irf=Iu1;
+disp(Irf*1e6,"feedback resistor current in microA:")
+Vrf=Irf*Rf;
+disp(Vrf,"feedback resistor voltage in V:")
+Vout=Vrf+Vinvu2;
+disp(Vout,"output resistor voltage in V:")
+Eo=Vout-1.2;
+disp(Eo,"output voltage in V:")
+Iload=Vdc1/Ro;
+disp(Iload,"load current in A:")
+Pload=Vdc1^2/Ro;
+disp(Pload,"load power in W:")
+Plm317=(Vdc2-Vdc1)*Idc;
+disp(Plm317,"powerdissipated in LM317 in W:")
diff --git a/2075/CH1/EX1.6b/pe1_6b.sce b/2075/CH1/EX1.6b/pe1_6b.sce new file mode 100755 index 000000000..1eacc3ba9 --- /dev/null +++ b/2075/CH1/EX1.6b/pe1_6b.sce @@ -0,0 +1,21 @@ +//example 1.6b
+clc; funcprot(0);
+// Initialization of Variable
+Vin=4;//V
+Vs=1.8;//V
+Rf=10000;//ohm
+Ri=1100;//ohm
+Rl=2;//ohm
+Rs=0.1;//ohm
+//calculation
+Irf=Vin/(Rf+Ri);
+disp(Irf*1e6,"input resistor current in microamp:")
+Vni=Irf*Ri;
+disp(Vni*1000,"inverting voltage 1 & 2 in mV:")
+Ir=Vni/Rs;
+disp(Ir,"current across Rs in A:")
+Ve=Ir*(Rl+Rs);
+disp(Ve,"emitter voltage in V:")
+Vo=Ve+Vs;
+disp(Vo,"output voltage in V:")
+clear()
diff --git a/2075/CH1/EX1.7/pe1_7.sce b/2075/CH1/EX1.7/pe1_7.sce new file mode 100755 index 000000000..532397fe4 --- /dev/null +++ b/2075/CH1/EX1.7/pe1_7.sce @@ -0,0 +1,15 @@ +//example 1.7
+clc; funcprot(0);
+// Initialization of Variable
+Vs=18;//V
+Rl=8;//load resistance
+Pll=100;//power
+//calculation
+Vlp=Vs-4;
+Vlr=Vlp/(2^.5);
+disp(Vlr,"rms voltage in V:")
+Pl=(Vlr^2)/Rl;
+disp(Pl,"power delivered in W:")
+Vl=(Pll*Rl)^.5;
+disp(Vl,"load voltage in V:")
+clear()
diff --git a/2075/CH1/EX1.9/pe1_9.sce b/2075/CH1/EX1.9/pe1_9.sce new file mode 100755 index 000000000..f9d455cfb --- /dev/null +++ b/2075/CH1/EX1.9/pe1_9.sce @@ -0,0 +1,17 @@ +//example 1.9
+clc; funcprot(0);
+// Initialization of Variable
+Vp=6;//V
+Ra=10;//Kohm
+Rb=1800;//ohm
+V=8;
+//solving for Ir & Vo
+A=[1 -124.6e-6; 7800 -1];
+B=[134.6e-6;0];
+x=inv(A)*B;
+Vo=x(2,1);
+disp(Vo,"output voltage in V:")
+Va=Vo+V;
+Vb=Vo-V;
+disp(Va,Vb,"V- & V+ in V:")
+clear()
diff --git a/2075/CH2/EX2.9/pe2_9.sce b/2075/CH2/EX2.9/pe2_9.sce new file mode 100755 index 000000000..6816ec6bd --- /dev/null +++ b/2075/CH2/EX2.9/pe2_9.sce @@ -0,0 +1,15 @@ +//example 2.9
+clc; funcprot(0);
+// Initialization of Variable
+V=15;//voltage
+R=4;//resistance
+Vl=.1;
+D=8;//duty cycle
+//calculation
+Il=V/R;
+disp(Il,"load current in A:")
+Rw=Vl/Il//wiring resistance
+disp(Rw*1000,"wiring resistance in mohm:")
+Ri=Rw/(2*D);
+disp(Ri*1e6,"resistance per inch in microohm/inch:")
+clear()
diff --git a/2075/CH3/EX3.1/pe3_1.sce b/2075/CH3/EX3.1/pe3_1.sce new file mode 100755 index 000000000..355b2e35d --- /dev/null +++ b/2075/CH3/EX3.1/pe3_1.sce @@ -0,0 +1,13 @@ +//example 3.1
+clc; funcprot(0);
+// Initialization of Variable
+Ip=3;
+f=150000;
+t=5e-6;
+//calculation
+T=1/f;
+It=Ip/T;
+disp(It/1000,"ramp current in kAt/s")
+I5=It*t;
+disp(I5,"current at 5 micro sec in A")
+clear()
diff --git a/2075/CH3/EX3.10/pe3_10.sce b/2075/CH3/EX3.10/pe3_10.sce new file mode 100755 index 000000000..1270de14a --- /dev/null +++ b/2075/CH3/EX3.10/pe3_10.sce @@ -0,0 +1,10 @@ +//example 3.10
+clc; funcprot(0);
+// Initialization of Variable
+V=170;
+R=51;
+//calculation
+I=V/R;
+P=(V*I)/4;
+disp(P,"power delivered in Watt:")
+clear()
diff --git a/2075/CH3/EX3.11/pe3_11.sce b/2075/CH3/EX3.11/pe3_11.sce new file mode 100755 index 000000000..aff0fd1a9 --- /dev/null +++ b/2075/CH3/EX3.11/pe3_11.sce @@ -0,0 +1,16 @@ +//example 3.11
+clc; funcprot(0);
+// Initialization of Variable
+V=7.2;
+Rq=.2;
+Rl=4;
+D=.6;
+//calculation
+Ip=V/(Rq+Rl);
+Vl=Ip*Rl;
+P=D*Vl*Ip;
+disp(P,"power dissipated in watt:")
+Vq=Ip*Rq;
+Pq=D*Vq*Ip;
+disp(Pq,"power dissipated when transistor resistance is 0.2 hm in watt:")
+clear()
diff --git a/2075/CH3/EX3.2/pe3_2.sce b/2075/CH3/EX3.2/pe3_2.sce new file mode 100755 index 000000000..0270391a1 --- /dev/null +++ b/2075/CH3/EX3.2/pe3_2.sce @@ -0,0 +1,19 @@ +//example 3.2
+clc; funcprot(0);
+// Initialization of Variable
+Ip=2;
+f=500000;
+Ir=.3;
+Cd=.4//duty cycle
+t1=4e-7;
+t2=1e-6;
+//calculation
+T=1/f;
+Im=Ip-Ir;
+disp(It=(Ip-Im)*t1/(Cd*T)+Im,"current in time 0<=t<800ns in A")
+disp(It=0,"current in time 800ns<=t<2 microsec in A")
+I4=(Ip-Im)*t1/(Cd*T)+Im;
+disp(I4,"current in time 400ns in A")
+I1=0;
+disp(I1,"current in time 1 microsec in A")
+clear()
diff --git a/2075/CH3/EX3.3/pe3_3.sce b/2075/CH3/EX3.3/pe3_3.sce new file mode 100755 index 000000000..b5a2120d7 --- /dev/null +++ b/2075/CH3/EX3.3/pe3_3.sce @@ -0,0 +1,8 @@ +//example3.2
+clc; funcprot(0);
+// Initialization of Variable
+Vr=120;
+pi=3.1428;
+V=(Vr*2^.5)/pi;
+disp(V,"average voltage in V")
+clear()
diff --git a/2075/CH3/EX3.4/pe3_4.sce b/2075/CH3/EX3.4/pe3_4.sce new file mode 100755 index 000000000..1e019bb89 --- /dev/null +++ b/2075/CH3/EX3.4/pe3_4.sce @@ -0,0 +1,13 @@ +//example 3.4
+clc; funcprot(0);
+// Initialization of Variable
+f=100000;
+Cd=.35//duty cycle
+Ip=3;
+Ir=.4;
+//calculation
+Im=Ip-Ir;
+T=1/f;
+I=Cd*((Ip-Im)/2+Im)
+disp(I,"average current in A")
+clear()
diff --git a/2075/CH3/EX3.5/pe3_5.sce b/2075/CH3/EX3.5/pe3_5.sce new file mode 100755 index 000000000..deee48009 --- /dev/null +++ b/2075/CH3/EX3.5/pe3_5.sce @@ -0,0 +1,9 @@ +//example 3.5
+clc; funcprot(0);
+// Initialization of Variable
+Vp=15;
+Cd=.35;
+f=100000;
+V=Vp*Cd^.5;
+disp(V,"rms voltage in V")
+clear()
diff --git a/2075/CH3/EX3.6/pe3_6.sce b/2075/CH3/EX3.6/pe3_6.sce new file mode 100755 index 000000000..8d0f901b0 --- /dev/null +++ b/2075/CH3/EX3.6/pe3_6.sce @@ -0,0 +1,8 @@ +//example 3.6
+clc; funcprot(0);
+// Initialization of Variable
+Ip=3;
+f=100000;
+I=Ip/3^.5;
+disp(I,"rms current in A")
+clear()
diff --git a/2075/CH3/EX3.7/pe3_7.sce b/2075/CH3/EX3.7/pe3_7.sce new file mode 100755 index 000000000..f08aafa74 --- /dev/null +++ b/2075/CH3/EX3.7/pe3_7.sce @@ -0,0 +1,8 @@ +//example 3.7
+clc; funcprot(0);
+// Initialization of Variable
+Vp=170;
+f=60;
+Vr=Vp/2;
+disp(Vr,"rms voltage in V")
+clear()
diff --git a/2075/CH3/EX3.8/pe3_8.sce b/2075/CH3/EX3.8/pe3_8.sce new file mode 100755 index 000000000..bec0ae0c6 --- /dev/null +++ b/2075/CH3/EX3.8/pe3_8.sce @@ -0,0 +1,19 @@ +//example 3.8
+clc; funcprot(0);
+// Initialization of Variable
+M=1000;
+H=40;
+T=30;
+E1=.9;
+E2=.5;
+V=220;
+//calculation
+W=M*H;
+P=(W)/(T*550);
+disp(P,"power required in hp")
+printf('Pick a 5HP motor')
+P1=5;
+Pe=P1/E1;
+I=(Pe*746)/V;
+disp(I,"current required in amp")
+clear()
diff --git a/2075/CH3/EX3.9/pe3_9.sce b/2075/CH3/EX3.9/pe3_9.sce new file mode 100755 index 000000000..41c94ea3d --- /dev/null +++ b/2075/CH3/EX3.9/pe3_9.sce @@ -0,0 +1,18 @@ +//example 3.9
+clc; funcprot(0);
+// Initialization of Variable
+Vin=1;
+Ri=1100;
+Rf=10000;
+Rl=8;
+Vs=18;
+pi=3.1428;
+//calculation
+Ir=Vin/Ri;
+Vl=Ir*(Ri+Rf);
+Ip=Vl/Rl;
+Pl=(Vl*Ip)/2;
+disp(Pl,"power delivered to the load in Watt:-")
+Ps=(Vs*Ip)/pi;
+disp(Ps,"power provided by each supply in Watt:-")
+clear()
diff --git a/2075/CH4/EX4.1/pe4_1.sce b/2075/CH4/EX4.1/pe4_1.sce new file mode 100755 index 000000000..b5e245b42 --- /dev/null +++ b/2075/CH4/EX4.1/pe4_1.sce @@ -0,0 +1,11 @@ +//example 4.1
+clc; funcprot(0);
+// Initialization of Variable
+Rf=1;
+Ri=10;
+Vi=0;
+Ip=500;
+///calculation
+Vrf=Ip*Rf;
+disp(Vrf,"output voltage in mV:")
+clear()
diff --git a/2075/CH4/EX4.10/pe4_10.sce b/2075/CH4/EX4.10/pe4_10.sce new file mode 100755 index 000000000..e800e62b6 --- /dev/null +++ b/2075/CH4/EX4.10/pe4_10.sce @@ -0,0 +1,12 @@ +//example 4.10
+clc; funcprot(0);
+// Initialization of Variable
+D=1;
+I1=108;
+I2=95;
+P=1;
+//calculation
+I=I1-I2;
+Pr=P*10^(I/10);
+disp(Pr,"power provided in watt:")
+clear()
diff --git a/2075/CH4/EX4.11/pe4_11.sce b/2075/CH4/EX4.11/pe4_11.sce new file mode 100755 index 000000000..199e62787 --- /dev/null +++ b/2075/CH4/EX4.11/pe4_11.sce @@ -0,0 +1,12 @@ +//example 4.11
+clc; funcprot(0);
+// Initialization of Variable
+P=20;
+R=8;
+Vi=1.23;
+//calculation
+V=(P*R)^.5;
+disp(V,"output voltage in V")
+G=V/Vi;
+disp(G,"gain:")
+clear()
diff --git a/2075/CH4/EX4.13/pe4_13.sce b/2075/CH4/EX4.13/pe4_13.sce new file mode 100755 index 000000000..2021c5bd9 --- /dev/null +++ b/2075/CH4/EX4.13/pe4_13.sce @@ -0,0 +1,22 @@ +//example 4.13
+clc; funcprot(0);
+// Initialization of Variable
+R=8//resistance
+V=5//voltage
+Tm=150//temperature
+Ta=50//temperature
+Qa=107;
+Qc=37;
+Ps=299;
+//calculation
+Vd=V/2;
+Vm=V-1;
+Vp=Vm-Vd;
+Vr=Vp/2^.5;
+Pl=1000*Vr^2/R;
+disp(Pl,"power dissipated in mW:")
+Pl=140;
+Pic=Ps-Pl;
+Q=(Tm-Ta)/Pic;
+disp(Q*1000,"thermal resistance degree C/W")
+clear()
diff --git a/2075/CH4/EX4.14/pe4_14.sce b/2075/CH4/EX4.14/pe4_14.sce new file mode 100755 index 000000000..48e1742c9 --- /dev/null +++ b/2075/CH4/EX4.14/pe4_14.sce @@ -0,0 +1,12 @@ +//example 4.14
+clc; funcprot(0);
+// Initialization of Variable
+R=8//resistance
+V=5//voltage
+//calculation
+Vl=V-1;
+Vp=Vl-1;
+Vr=Vp/2^.5;
+P=Vr^2/R;
+disp(P*1000,"pwer deliverd in mwatt")
+clear()
diff --git a/2075/CH4/EX4.15/pe4_15.sce b/2075/CH4/EX4.15/pe4_15.sce new file mode 100755 index 000000000..7e46fa1c9 --- /dev/null +++ b/2075/CH4/EX4.15/pe4_15.sce @@ -0,0 +1,16 @@ +//example 4.15
+clc; funcprot(0);
+// Initialization of Variable
+R=8//resistance
+Ts=35//temperature
+Ta=150//temperature
+Vm=42//voltage
+//calcuation
+Vp=Vm-5;
+Vr=Vp/2^.5;
+Pm=Vr^2/R;
+disp(Pm,"power delivered in watt:")
+P=45;
+Qs=(Ta-Ts)/P-1.2;
+disp(round(Qs*10)/10,"thermal resistance in degreeC/W")
+clear()
diff --git a/2075/CH4/EX4.2/pe4_2.sce b/2075/CH4/EX4.2/pe4_2.sce new file mode 100755 index 000000000..367d43adc --- /dev/null +++ b/2075/CH4/EX4.2/pe4_2.sce @@ -0,0 +1,20 @@ +//example 4.2
+clc; funcprot(0);
+// Initialization of Variable
+Vi=300;
+P=35;
+R=8;
+pi=3.1428;
+S=10000;
+fh=20;
+//calculation
+Vl=(P*R)^.5;
+Vp=Vl*2^.5;
+Il=Vl/R;
+f=S/(2*pi*Vp);
+disp(f,"frequency of OPA548 in KHz")
+Ao=Vl/Vi;
+G=Ao*fh;
+disp(G,"slew rate of OPA548 in Mhz")
+printf('the OPA548 can be used')
+clear()
diff --git a/2075/CH4/EX4.3/pe4_3.sce b/2075/CH4/EX4.3/pe4_3.sce new file mode 100755 index 000000000..1e131c86e --- /dev/null +++ b/2075/CH4/EX4.3/pe4_3.sce @@ -0,0 +1,13 @@ +//example 4.3
+clc; funcprot(0);
+// Initialization of Variable
+Rl=10;
+V=12;
+Vl=5;
+//calculation
+Pl=Vl^2/Rl;
+I=Vl/Rl;
+Ps=V*I;
+Pic=Ps-Pl;
+disp(Pic,"power delivered in watt:")
+clear()
diff --git a/2075/CH4/EX4.4/pe4_4.sce b/2075/CH4/EX4.4/pe4_4.sce new file mode 100755 index 000000000..980d35cc1 --- /dev/null +++ b/2075/CH4/EX4.4/pe4_4.sce @@ -0,0 +1,21 @@ +//example 4.4
+clc;funcprot(0);
+//Initilization of variable
+Vload=[0.0 0.2 0.4 0.6 0.8 4.8 5.0 5.2 5.4 5.6 5.8 6.0 6.2 6.4 11.4 11.6 11.8 12.0];
+Iload=[0.0 0.0 0.0 0.1 0.1 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 1.1 1.2 1.2 1.2];
+Pload=[0.00 0.00 0.02 0.04 0.06 2.30 2.50 2.70 2.92 3.14 3.36 3.60 3.84 4.10 13.00 13.46 13.92 14.40];
+Ps=[0.00 0.24 0.48 0.72 0.96 5.76 6.00 6.24 6.48 6.72 6.96 7.20 7.44 7.68 13.68 13.92 14.16 14.40];
+Pic=[0.00 0.24 0.46 0.68 0.90 3.46 3.50 3.54 3.56 3.58 3.60 3.60 3.60 3.58 0.68 0.46 0.24 0.00];
+printf('Vload Iload Pload Ps Pic');
+printf('\n');
+for i=1:18
+ printf(' %.2f',Vload(i));
+ printf(' %.2f',Iload(i));
+ printf(' %.2f',Pload(i));
+ printf(' %.2f',Ps(i));
+ printf(' %.2f',Pic(i));
+ printf('\n')
+end
+plot(Vload,Pic);
+xtitle('load voltage vs IC power','Vload (V)','Pic (W)')
+clear()
diff --git a/2075/CH4/EX4.5/pe4_5.sce b/2075/CH4/EX4.5/pe4_5.sce new file mode 100755 index 000000000..bbc1795ec --- /dev/null +++ b/2075/CH4/EX4.5/pe4_5.sce @@ -0,0 +1,19 @@ +//example 4.5
+clc; funcprot(0);
+// Initialization of Variable
+V=12;
+Vp=5;
+R=10;
+pi=3.1428;
+//calculation
+Ip=Vp/R;
+Il=Ip/2^.5;
+Pl=(Vp*Ip)/2;
+disp(Pl,"power delivered in watt")
+Id=Ip/pi;
+disp(Id*1000,"dc supply current in mA")
+Pt=2*V*Ip/pi;
+disp(Pt,"total power in W")
+Pic=Pt-Pl;
+disp(Pic,"IC power in W")
+clear()
diff --git a/2075/CH4/EX4.6/pe4_6.sce b/2075/CH4/EX4.6/pe4_6.sce new file mode 100755 index 000000000..ca398b5c9 --- /dev/null +++ b/2075/CH4/EX4.6/pe4_6.sce @@ -0,0 +1,12 @@ +//example 4.6
+clc; funcprot(0);
+// Initialization of Variable
+Ts=40;
+P=2.92;
+Qj=2.5;
+Qc=2;
+Tj=125;
+//calculation
+Qs=(Tj-Ts)/P-Qj-Qc;
+disp(Qs,"thermal resistance in C/W:")
+clear()
diff --git a/2075/CH4/EX4.7/pe4_7.sce b/2075/CH4/EX4.7/pe4_7.sce new file mode 100755 index 000000000..2795e369c --- /dev/null +++ b/2075/CH4/EX4.7/pe4_7.sce @@ -0,0 +1,29 @@ +//example 4.7
+clc; funcprot(0);
+// Initialization of Variable
+V=24;
+R=10;
+Qs=4;
+Tj=125;
+Ta=40;
+Qj=2.5;
+Qc=2;
+//calculation
+P=(Tj-Ta)/(Qj+Qc+Qs);
+disp(P,"power delivered by IC in watt:")
+Vload=[9.4 9.6];
+Iload=[.94 .96];
+Pload=[4.42 4.61];
+Ps=[14.36 14.67];
+Pic=[9.94 10.06];
+printf('Vload Iload Pload Ps Pic');
+printf('\n')
+for i=1:2
+ printf('%.2f',Vload(i));
+ printf(' %.2f',Iload(i));
+ printf(' %.2f',Pload(i));
+ printf(' %.2f',Ps(i));
+ printf(' %.2f',Pic(i));
+ printf('\n')
+end
+clear()
diff --git a/2075/CH4/EX4.8/pe4_8.sce b/2075/CH4/EX4.8/pe4_8.sce new file mode 100755 index 000000000..2b72d91b2 --- /dev/null +++ b/2075/CH4/EX4.8/pe4_8.sce @@ -0,0 +1,21 @@ +//example 4.8
+clc; funcprot(0);
+// Initialization of Variable
+Rf=22;
+Ri=1;
+Rs=15;
+I=4.75;
+Rc=4;
+Vp=2;
+Rl=8;
+Im=4;
+//calculation
+Av=1+(Rf/Ri);
+disp(Av,"gain")
+Il=(Rs*I)/(Rc+13.75);
+disp(Il,"limit current in A:")
+Vo=Vp*Av;
+disp(Vo,"output voltage in V:")
+V=Im*Rl;
+disp(V,"maximum output voltage in V")
+clear()
diff --git a/2075/CH4/EX4.9/pe4_9.sce b/2075/CH4/EX4.9/pe4_9.sce new file mode 100755 index 000000000..83f31152f --- /dev/null +++ b/2075/CH4/EX4.9/pe4_9.sce @@ -0,0 +1,11 @@ +//example 4.9
+clc; funcprot(0);
+// Initialization of Variable
+D=8;
+d=1;
+I=90;
+//calculation
+Is=20*log10(d/D);
+Ir=I-Is;
+disp(Ir,"loudness ofsound in dB")
+clear()
diff --git a/2075/CH5/EX5.1/pe5_1.sce b/2075/CH5/EX5.1/pe5_1.sce new file mode 100755 index 000000000..f91aad343 --- /dev/null +++ b/2075/CH5/EX5.1/pe5_1.sce @@ -0,0 +1,13 @@ +//example 5.1
+clc; funcprot(0);
+clf()
+//initialization of variable
+Vth=3.6;
+Vgs=4;//voltage
+//volt change beyond 3.6 causes a major increase in Id as it is cut off voltage
+printf('Id=0 from 0 to 2 so not shown in the graph')
+x=linspace(2,3.6,300);
+y=(-2.5*(x-3.6))^.5;
+plot(x,y)
+xtitle('Vgs vs Id','Vgs','Id');
+clear()
diff --git a/2075/CH5/EX5.10/pe5_10.sce b/2075/CH5/EX5.10/pe5_10.sce new file mode 100755 index 000000000..039e91510 --- /dev/null +++ b/2075/CH5/EX5.10/pe5_10.sce @@ -0,0 +1,21 @@ +//example 5.10
+clc; funcprot(0);
+// Initialization of Variable
+G=6.4;//A/V
+I=5;//current
+Pq=9.8;//W
+Tj=140;
+Ta=40;
+//calculation
+R=2/G;
+disp(R,"resistance in ohm:")
+printf('thus pick a .33ohm rsistance')
+R=.33;
+Im=I/3;
+Vr=Im*R;
+disp(Vr,"voltage in V:")
+P=Vr*Im/4;
+disp(P,"power in W:")
+Qs=(Tj-Ta)/Pq-2.1;
+disp(Qs,"thermal resistance in degreeC/W")
+clear()
diff --git a/2075/CH5/EX5.11/pe5_11.sce b/2075/CH5/EX5.11/pe5_11.sce new file mode 100755 index 000000000..4083bbef0 --- /dev/null +++ b/2075/CH5/EX5.11/pe5_11.sce @@ -0,0 +1,9 @@ +//example 5.11
+clc; funcprot(0);
+// Initialization of Variable
+P=200;//power
+R=8;//ohm
+//calculation
+Il=(P/R)^.5*2^.5;
+Ilm=1.2*Il;
+disp(Ilm,"limit level current in A:")
diff --git a/2075/CH5/EX5.12/pe5_12.sce b/2075/CH5/EX5.12/pe5_12.sce new file mode 100755 index 000000000..8fca59647 --- /dev/null +++ b/2075/CH5/EX5.12/pe5_12.sce @@ -0,0 +1,17 @@ +//example 5.12
+clc; funcprot(0);
+// Initialization of Variable
+I=6;//current
+V=.6;//voltage
+D=.5;//duty cycle
+//calculation
+Rs=V/I;
+disp(Rs,"resistance in ohm")
+Pr=D*V*I;
+disp(Pr,"power in W:")
+Vp=28;
+Pm=D*Vp*I;
+disp(Pm,"MOSFET power in W")
+T=40;//temperature
+Tj=T+Pm*5.1;
+disp(round(Tj),"temperature in degreeC")
diff --git a/2075/CH5/EX5.13/pe5_13.sce b/2075/CH5/EX5.13/pe5_13.sce new file mode 100755 index 000000000..e7075f239 --- /dev/null +++ b/2075/CH5/EX5.13/pe5_13.sce @@ -0,0 +1,9 @@ +//example 5.13
+clc; funcprot(0);
+// Initialization of Variable
+T=130;//temperature
+P=19.5;//power
+//calculation
+Ts=T-P*2.1;
+disp(Ts,"maximum safe temperature in degreeC")
+clear()
diff --git a/2075/CH5/EX5.14/pe5_14.sce b/2075/CH5/EX5.14/pe5_14.sce new file mode 100755 index 000000000..051e13d6d --- /dev/null +++ b/2075/CH5/EX5.14/pe5_14.sce @@ -0,0 +1,25 @@ +//example 5.14
+clc; funcprot(0);
+// Initialization of Variable
+pi=3.1428;
+V=15.0;//voltage
+f=300.0;//frequency
+L=4.7;//inductance
+Vdc=28;//V
+//calculation
+Xl=2*pi*f*L;
+disp(Xl/1000,"reactance in ohm")
+Zload=sqroot(8^2+8.9^2);//magnitude of Zload
+Vload=15.0;//msgnitude of Vload
+Vr=Vload*8/Zload;
+disp(Vr,"voltage across resistor in V");
+disp("-48 is the angle of the voltage in degrees");
+Pr=12.5;
+disp(Pr,"power dissipated by load in watts")
+I=Vr/8*sqroot(2);
+disp(I,"current across the resistamce in A");
+Psupply=Vdc*I/pi;
+disp(Psupply,"power supply in W");
+Pq=Psupply-Pr/2;
+disp(Pq,"power dissipated by transistor in watts")
+clear()
diff --git a/2075/CH5/EX5.2/pe5_2.sce b/2075/CH5/EX5.2/pe5_2.sce new file mode 100755 index 000000000..37dbd81a8 --- /dev/null +++ b/2075/CH5/EX5.2/pe5_2.sce @@ -0,0 +1,9 @@ +//example 5.2
+clc; funcprot(0);
+// Initialization of Variable
+V=4.5;//voltage
+T=25;//degreeC
+Id=3.8;
+disp(Id,"drain current in A:")
+printf('Vth=4V is assumed')
+clear()
diff --git a/2075/CH5/EX5.3/pe5_3.sce b/2075/CH5/EX5.3/pe5_3.sce new file mode 100755 index 000000000..e335c180c --- /dev/null +++ b/2075/CH5/EX5.3/pe5_3.sce @@ -0,0 +1,12 @@ +//example 5.3
+clc; funcprot(0);
+// Initialization of Variable
+Vgs=-5;//voltage
+printf('MOSFET is IRF530N')
+Vthl=-4;
+Vthu=-2;
+disp(Vthl,"lower limit of Vth in V:")
+disp(Vthu,"upper limit of Vth in V:")
+Id=2.3;//current
+disp(Id,"Id in A:")
+clear()
diff --git a/2075/CH5/EX5.5/pe5_5.sce b/2075/CH5/EX5.5/pe5_5.sce new file mode 100755 index 000000000..f29446559 --- /dev/null +++ b/2075/CH5/EX5.5/pe5_5.sce @@ -0,0 +1,26 @@ +//example 5.5
+clc; funcprot(0);
+// Initialization of Variable
+R1=22;//resistance
+Vg=3.6;//voltage
+Vd=56;
+G=.98;//gain
+Vi=40;
+Rl=8;//load resistance
+Vp=36.5;
+pi=3.1428;
+//calculation
+Vr=Vd-Vg;
+Ir=Vr/R1;
+R2=Vg/Ir;
+disp(R2,"resistance in kohm:")
+Va=(R1/(R1+R2))*Vi;
+Vl=G*Va;
+disp(Vl,"load voltage in V:")
+Il=Vp/Rl;
+Pl=Vp*4.6/4;
+Ps=Vd*4.6/pi;
+Pq=Ps-Pl;
+disp(Pq,"Pq in watt:")
+disp(Ps,"Ps in watt:")
+disp(Pl,"Pl in watt:")
diff --git a/2075/CH5/EX5.6/pe5_6.sce b/2075/CH5/EX5.6/pe5_6.sce new file mode 100755 index 000000000..0fbc03340 --- /dev/null +++ b/2075/CH5/EX5.6/pe5_6.sce @@ -0,0 +1,13 @@ +//example 5.6
+clc; funcprot(0);
+// Initialization of Variable
+R1=22;//resistance
+V1=56;//voltage
+V2=2;//voltage
+//calculation
+I=(V1-V2)/R1;
+disp(I,"current in mA")
+R2=V2/I;
+disp(R2*1000,"resistance2 in ohm:")
+printf('pick R2=R3=820ohm R1=R4=22 kohm')
+clear()
diff --git a/2075/CH5/EX5.7/pe5_7.sce b/2075/CH5/EX5.7/pe5_7.sce new file mode 100755 index 000000000..07c36f13c --- /dev/null +++ b/2075/CH5/EX5.7/pe5_7.sce @@ -0,0 +1,11 @@ +//example 5.7
+clc; funcprot(0);
+// Initialization of Variable
+Vi=350;//voltage
+f=100;//frequency
+Rf=10000;//resistance
+Ri=520;
+//calculation
+Vp=(1+(Rf/Ri))*Vi*2^.5;
+disp(Vp/1000,"load voltage in V:")
+clear()
diff --git a/2075/CH5/EX5.8/pe5_8.sce b/2075/CH5/EX5.8/pe5_8.sce new file mode 100755 index 000000000..8b4cbb821 --- /dev/null +++ b/2075/CH5/EX5.8/pe5_8.sce @@ -0,0 +1,32 @@ +//example 5.8
+clc; funcprot(0);
+// Initialization of Variable
+P=50;//power
+Z=4.7//impedence
+R=4;//resistance
+Ta=40;//degreeC
+Tj=140;//degreeC
+Vd=28;
+R2=22;
+pi=3.1428;
+//calculation
+Vr=(P*R)^.5;
+Vp=Vr*2^.5;
+disp(Vp,"load rms voltage in V:")
+Av=-Vr/1.23;
+Rf=-Av*Z;
+disp(Rf,"resistance in kohm:")
+I=(Vd-2)/R2;
+disp(I,"current in mA:")
+Vm=.63*Vd;
+Ip=Vm/R;
+disp(Ip,"load current in A:")
+Ps=Vd*Ip/pi;
+disp(round(Ps),"supply power in watt:")
+Pl=Ip^2/2*R;
+disp(round(Pl),"load power in W:")
+Pq=round(Ps)-Pl/2;
+disp(Pq,"power in W:")
+Qs=(Tj-Ta)/Pq-2.1;
+disp(Qs,"thermal resistance in degreC/W:")
+clear()
diff --git a/2075/CH5/EX5.9/pe5_8.sce b/2075/CH5/EX5.9/pe5_8.sce new file mode 100755 index 000000000..8b4cbb821 --- /dev/null +++ b/2075/CH5/EX5.9/pe5_8.sce @@ -0,0 +1,32 @@ +//example 5.8
+clc; funcprot(0);
+// Initialization of Variable
+P=50;//power
+Z=4.7//impedence
+R=4;//resistance
+Ta=40;//degreeC
+Tj=140;//degreeC
+Vd=28;
+R2=22;
+pi=3.1428;
+//calculation
+Vr=(P*R)^.5;
+Vp=Vr*2^.5;
+disp(Vp,"load rms voltage in V:")
+Av=-Vr/1.23;
+Rf=-Av*Z;
+disp(Rf,"resistance in kohm:")
+I=(Vd-2)/R2;
+disp(I,"current in mA:")
+Vm=.63*Vd;
+Ip=Vm/R;
+disp(Ip,"load current in A:")
+Ps=Vd*Ip/pi;
+disp(round(Ps),"supply power in watt:")
+Pl=Ip^2/2*R;
+disp(round(Pl),"load power in W:")
+Pq=round(Ps)-Pl/2;
+disp(Pq,"power in W:")
+Qs=(Tj-Ta)/Pq-2.1;
+disp(Qs,"thermal resistance in degreC/W:")
+clear()
diff --git a/2075/CH6/EX6.1/pe6_1.sce b/2075/CH6/EX6.1/pe6_1.sce new file mode 100755 index 000000000..e8d0adf86 --- /dev/null +++ b/2075/CH6/EX6.1/pe6_1.sce @@ -0,0 +1,21 @@ +//example 6.1
+clc; funcprot(0);
+// Initialization of Variable
+Vs=28;//V
+Vi=5;//V
+Rl=15;//ohm
+Vc=.8;//V
+b=20;
+//calculation
+Ic=(Vs-Vc)/Rl;
+disp(Ic,"collector current in A:")
+Pl=Ic^2*Rl;
+disp(Pl,"load power in W:")
+Pq=Ic*Vc;
+disp(Pq,"transistor power in W:")
+Ib=Ic/b*1000;
+disp(Ib,"least value of base current in mA:")
+Rb=(Vi-.6)/Ib;
+disp(Rb*1000,"max. value of base resistance in ohm:")
+printf('thus pick Rb=33ohm,1W')
+clear()
diff --git a/2075/CH6/EX6.10/pe6_10.sce b/2075/CH6/EX6.10/pe6_10.sce new file mode 100755 index 000000000..a313edb19 --- /dev/null +++ b/2075/CH6/EX6.10/pe6_10.sce @@ -0,0 +1,8 @@ +//example 6.10
+clc; funcprot(0);
+// Initialization of Variable
+I=40;//current
+Q=44;//nC
+t=Q/I;
+disp(t,"time in micro s:")
+clear()
diff --git a/2075/CH6/EX6.11/pe6_11.sce b/2075/CH6/EX6.11/pe6_11.sce new file mode 100755 index 000000000..c6c4006d9 --- /dev/null +++ b/2075/CH6/EX6.11/pe6_11.sce @@ -0,0 +1,32 @@ +//example 6.11
+clc; funcprot(0);
+// Initialization of Variable
+Rl=15;//load resistance
+D=.85;//duty cycle
+Ts=60;//degreeC
+Vd=28;//voltage
+R1=.375;
+R2=.2;
+//calculation
+I=Vd/(R1+R2+Rl);
+disp(I,"current in A:")
+Vl=I*Rl;
+disp(Vl,"load voltage in V:")
+P=D*Vl*I;
+disp(P,"power in W:")
+Vh=I*R1;
+disp(Vh,"high side voltage in V:")
+Ph=D*Vh*I;
+disp(Ph,"high side power in W:")
+Vl=I*R2;
+disp(Vl,"low side voltage in V:")
+Pl=D*Vl*I;
+disp(Pl,"low side power in W:")
+Pic=Ph+Pl;
+disp(Pic,"IC power in W:")
+Pic=1.56;
+Tj=150;
+Ta=60;
+Q=(Tj-Ta)/Pic-2.2;
+disp(Q,"thermal resistance in degreeC/W:")
+clear()
diff --git a/2075/CH6/EX6.4/pe6_4.sce b/2075/CH6/EX6.4/pe6_4.sce new file mode 100755 index 000000000..789a997fa --- /dev/null +++ b/2075/CH6/EX6.4/pe6_4.sce @@ -0,0 +1,25 @@ +//example 6.4
+clc; funcprot(0);
+// Initialization of Variable
+Vd=28;//V
+f=100;//frequency
+I=50;//current
+//calculation
+Rl=(Vd-.3)/I;
+disp(Rl*1000,"load resistance in ohm:")
+printf('thus pick Rl=560ohm')
+Rl=560;
+Vp=2.4;
+Ib=500;//microAmp
+Rb=(Vp-.9)/Ib;
+disp(Rb*1000,"max value of Rb is in kohm:")
+printf('thus pick Rb=2.2kohm')
+Vl=Vd-.3;
+D=.5;//duty cycle
+Ip=Vl/Rl;
+disp(Ip*1000,"load current in mA:")
+Pl=D*Vl*Ip;
+disp(Pl*1000,"load power in mW:")
+Pq=D*Ip*.3;
+disp(Pq*1000,"power delivered in mW:")
+clear()
diff --git a/2075/CH6/EX6.5/pe6_5.sce b/2075/CH6/EX6.5/pe6_5.sce new file mode 100755 index 000000000..67042c74d --- /dev/null +++ b/2075/CH6/EX6.5/pe6_5.sce @@ -0,0 +1,12 @@ +//example 6.5
+clc; funcprot(0);
+// Initialization of Variable
+C=640;//capacitor
+R1=560;//load resistance
+R2=3.3;//kohm
+//calculation
+t1=2.2*R1*C;
+disp(t1/1000,"time of rise in ns:")
+t2=2.2*R2*C;
+disp(t2/1000,"time of rise in microsec:")
+clear()
diff --git a/2075/CH6/EX6.6/pe6_6.sce b/2075/CH6/EX6.6/pe6_6.sce new file mode 100755 index 000000000..9abb23779 --- /dev/null +++ b/2075/CH6/EX6.6/pe6_6.sce @@ -0,0 +1,20 @@ +//example 6.6
+clc; funcprot(0);
+clf()
+// Initialization of Variable
+Vol=0.7;
+Iol=40.0/1000;//current
+Epullup=28.0;
+Rpullup=(Epullup-Vol)/Iol;
+disp(Rpullup,"resistance in ohm")
+printf('pick up resistance=680 ohm');
+Rpullup=680.0;
+C=640;
+trise=2.2*Rpullup*C;
+disp(trise/1000,"rise time in ns");
+//for plotting
+x=[0 .1 1.9 4.1 5 5.1 5.3 5.6 6 9.3];
+y=[27.8 .1 .1 .1 .1 5 13.5 21 27 27.8];
+plot(x,y);
+xtitle('Vout vs time','time(mus)','Vout')
+clear()
diff --git a/2075/CH6/EX6.7/pe6_7.sce b/2075/CH6/EX6.7/pe6_7.sce new file mode 100755 index 000000000..149cc3256 --- /dev/null +++ b/2075/CH6/EX6.7/pe6_7.sce @@ -0,0 +1,23 @@ +//example 6.7
+clc; funcprot(0);
+// Initialization of Variable
+R1=.11;//resistance
+Vd=28;//voltage
+R2=6;//ohm
+D=.4;//duty cycle
+Q=62;
+Ro=2.6*R1;
+disp(Ro,"worstcase resistance in ohm:")
+Ip=Vd/(R2+Ro);
+disp(Ip,"load current in A:")
+Vl=Ip*R2;
+disp(Vl,"load voltage in V:")
+Pl=D*Vl*Ip;
+disp(Pl,"load power in W:")
+Vq=Ip*Ro;
+disp(Vq,"drop voltage in V:")
+Pq=D*Vq*Ip;
+disp(round(Pq*10)/10,"power in W:")
+T=40+round(Pq*10)/10*Q;
+disp(T,"temperature in deg.C")
+clear()
diff --git a/2075/CH6/EX6.8/pe6_8.sce b/2075/CH6/EX6.8/pe6_8.sce new file mode 100755 index 000000000..2d53fc442 --- /dev/null +++ b/2075/CH6/EX6.8/pe6_8.sce @@ -0,0 +1,10 @@ +//example 6.8
+clc; funcprot(0);
+// Initialization of Variable
+L=10;//inductor
+I=4.5;//current
+t=300//time
+//calculation
+V=L*I/t;
+disp(V*1000,"voltage in V:")
+clear()
diff --git a/2075/CH6/EX6.9/pe6_9.sce b/2075/CH6/EX6.9/pe6_9.sce new file mode 100755 index 000000000..bca009c67 --- /dev/null +++ b/2075/CH6/EX6.9/pe6_9.sce @@ -0,0 +1,38 @@ +//example 6.9
+clc; funcprot(0);
+// Initialization of Variable
+Rl=12;//load resistance
+V1=.8;//voltage
+V2=2.4;//voltage
+D=.8;//duty cycle
+Tj=150;//degreeC
+Ta=40;//degreeC
+Vd=28;
+Vo=.7;
+I=40;//mA;
+//calculation
+k=(Vd-Vo)/I;
+disp(round(k*1000),"R1+R2 in ohm:")
+printf('pick R1=330ohm & R2=360ohm as they divide Vd setting 8V<Vg<18V')
+R1=330;
+R2=360;
+Vn1=28;
+disp(Vn1,"node voltage for V1 in V:")
+Vn2=.7;
+disp(Vn2,"node voltage for V2 in V:")
+Vg=R2*Vd/(R1+R2)+Vn2;
+disp(Vg,"gate voltage in V:")
+Vgs=Vg-Vd;
+disp(Vgs,"gate & source diff in V:")
+Vl=Vd*Rl/(Rl+.57);
+disp(Vl,"load voltage in V:")
+Il=Vl/Rl;
+disp(Il,"load current in A:")
+Pl=D*Vl*Il;
+disp(Pl,"load power in W:")
+Vq=Il*.57;
+Pq=D*Vq*Il;
+disp(Pq,"Pq in W:")
+Q=(Tj-Ta)/Pq-3.7;
+disp(Q,"thermal resistance in degreeC/W:")
+clear()
diff --git a/2075/CH7/EX7.1/pe7_1.sce b/2075/CH7/EX7.1/pe7_1.sce new file mode 100755 index 000000000..6ab923ef3 --- /dev/null +++ b/2075/CH7/EX7.1/pe7_1.sce @@ -0,0 +1,12 @@ +//example 7.1
+clc; funcprot(0);
+// Initialization of Variable
+T=20;//time
+Vp=12;//voltage
+t=5;
+//calculation
+D=t/T;
+disp(D,"duty cycle:")
+Vd=(D*Vp);
+disp(Vd,"average voltage in V:")
+clear()
diff --git a/2075/CH7/EX7.2/pe7_2.sce b/2075/CH7/EX7.2/pe7_2.sce new file mode 100755 index 000000000..778121911 --- /dev/null +++ b/2075/CH7/EX7.2/pe7_2.sce @@ -0,0 +1,23 @@ +//example 7.2
+clc; funcprot(0);
+// Initialization of Variable
+Vd=12;//voltage
+Vl=5;//load voltage
+Rl=10;//load resistance
+f=100;//frequency
+L=220;//inductor
+//calculation
+D=Vl/Vd;
+disp(round(D*100),"duty cycle in %:")
+T=1/f;
+disp(T*1000,"time in microsec")
+t=D*T;
+disp(round(t*10000)/10,"on time in microsec")
+Vr=Vd-Vl;
+I=Vr*round(t*10000)/10/L;
+disp(I*1000,"ripple current in mA:")
+Il=Vl/Rl;
+disp(Il*1000,"load current in mA:")
+Ip=Il+I/2;
+disp(Ip*1000,"peak inductor current in mA:")
+clear()
diff --git a/2075/CH7/EX7.3/pe7_3.sce b/2075/CH7/EX7.3/pe7_3.sce new file mode 100755 index 000000000..c20ecd239 --- /dev/null +++ b/2075/CH7/EX7.3/pe7_3.sce @@ -0,0 +1,17 @@ +//example 7.3
+clc; funcprot(0);
+// Initialization of Variable
+Id=500;//load current
+i=134;//mA
+D=.42;//duty cycle
+//calculation
+Ip=Id+i/2;
+Im=Id-i/2;
+I1=((D/3)*(Ip^2+Im*Ip+Im^2))^.5;
+disp(I1,"rms current in mA:")
+printf('by trapezium method')
+I2=D^.5*Id;
+disp(I2,"rms current in mA:")
+printf('by rectangle method')
+printf('\n rectangle method gives good result than trapezium method')
+clear()
diff --git a/2075/CH7/EX7.4/pe7_4.sce b/2075/CH7/EX7.4/pe7_4.sce new file mode 100755 index 000000000..7ac4fe671 --- /dev/null +++ b/2075/CH7/EX7.4/pe7_4.sce @@ -0,0 +1,14 @@ +//example 7.4
+clc; funcprot(0);
+// Initialization of Variable
+Vp=.3;//voltage
+I=500;//current
+D=.42;//duty cycle
+T=150;//temperature
+R=.6;//ohm
+//calculation
+Vq=I*R;
+disp(Vq/1000,"voltage in V:")
+Pq=D*Vq*I;
+disp(Pq/1000,"dissipated power in mW:")
+clear()
diff --git a/2075/CH7/EX7.5/pe7_5.sce b/2075/CH7/EX7.5/pe7_5.sce new file mode 100755 index 000000000..7c691bc19 --- /dev/null +++ b/2075/CH7/EX7.5/pe7_5.sce @@ -0,0 +1,37 @@ +//example 7.5
+clc; funcprot(0);
+// Initialization of Variable
+R=10.0;//resistance
+V1=5.0;//V
+V2=12.0;//V
+Ta=80.0;//degreeC
+Tb=150.0;
+f=150.0;//frequency
+//calculation
+D=V1/V2;
+disp(D*100,"duty cycle in %")
+T=1/f;
+disp(T*1000,"time period in microsec:")
+t=D*T;
+disp(t*1000,"on time in microsec:")
+Id=V1/R;
+disp(Id*1000,"load current in mA:")
+i=.25*Id;
+disp(i*1000,"ripple current in mA:")
+Vl=V2-V1;
+disp(Vl,"inductor voltage in V:")
+L=Vl*t/i;
+disp(L*1000,"inductor in microH:")
+Ip=Id+i/2;
+disp(Ip*1000,"inductor current in mA:")
+Ic=Id/2;
+disp(Ic*1000,"minimum capacitor current in mA:")
+Vc=1.5*V2;
+disp(Vc,"minimum capacitor voltage in V:")
+K=V1/1.23-1;
+disp(K,"Rf/Ri = :")
+P=.01*V2+D*Id*1;
+disp(P,"power of LM2595 in W:")
+Q=(Tb-Ta)/P-2.2;
+disp(Q,"thermal resistance in degreeC/W:")
+clear()
diff --git a/2075/CH7/EX7.6/pe7_6.sce b/2075/CH7/EX7.6/pe7_6.sce new file mode 100755 index 000000000..0beef55c9 --- /dev/null +++ b/2075/CH7/EX7.6/pe7_6.sce @@ -0,0 +1,32 @@ +//example 7.6
+clc; funcprot(0);
+// Initialization of Variable
+V1=12//V
+V2=22;//V
+I=.7;//A
+f=100;//kHz
+R=.4;//ohm
+Vd=.5;
+//calculation
+Pl=V2*I;
+disp(Pl,"load power in W:")
+Ps=Pl/.9;
+disp(Ps ,"supply power in W:")
+Id=round(Ps/V1*10)/10;
+disp(Id,"dc current in A:")
+i=.25*Id;
+Ip=Id+i/2;
+disp(Ip,"inductor current in A:")
+D=round((1-V1/V2)*100)/100;
+disp(D,"duty cycle :")
+t=D/f;
+L=V1*t/i;
+disp(L*1000,"inductor in microH:")
+Vp=Id*R;
+Pq=D*Vp*Id;
+disp(Pq*1000,"transistor power in mW:")
+Pd=(1-D)*.5*Id;
+disp(round(Pd*100)*10,"diode power in mW:")
+C=Id*t/2/20;
+disp(C*1e6,"capacitor in microF:")
+clear()
diff --git a/2075/CH7/EX7.7/pe7_7.sce b/2075/CH7/EX7.7/pe7_7.sce new file mode 100755 index 000000000..ecc216b98 --- /dev/null +++ b/2075/CH7/EX7.7/pe7_7.sce @@ -0,0 +1,25 @@ +//example 7.7
+clc;funcprot(0);
+//Initialization of Variable
+V1=12;//V
+V2=22;//V
+I=.7;//A
+Ta=80;//degreeC
+Ps=17.1//supply power
+//calculation
+K=V2/1.23-1;
+disp(K,"Rf/Ri=:")
+printf('pick Rf=22; Ri=1.3;')
+Id=round(Ps/V1*10)/10;
+D=round((1-(V1/V2))*100)/100;
+Ir=D^.5*Id;
+disp(Id,"rms current in A:")
+Ps=Ir^2*.15;
+disp(Ps*1000,"switch power in mW:")
+Pi=D*Id*V1/50;
+disp(Pi*1000,"IC power in mW:")
+P=Ps+Pi;
+disp(P*1000,"total power in mW:")
+T=Ta+P*65;
+disp(T,"IC temperature in degreeC:")
+clear()
diff --git a/2075/CH7/EX7.8/pe7_8.sce b/2075/CH7/EX7.8/pe7_8.sce new file mode 100755 index 000000000..752fe98a0 --- /dev/null +++ b/2075/CH7/EX7.8/pe7_8.sce @@ -0,0 +1,40 @@ +//example 7.8
+clc;funcprot(0);
+//Initialization of Variable
+V1=12;//V
+V2=5;//V
+Il=1;//load current
+T=10;//microsec
+K=1.25;//Npri/Nsec
+L=85;//microH
+//calculation
+Vq=V1+V2*K;
+disp(Vq,"maximum voltage in V:")
+Vd=V1*K+V2;
+disp(Vd,"diode voltage in V:")
+D=round((K*V2)*100/(V1+K*V2))/100;
+disp(D,"duty cycle:")
+Po=V2*Il;
+disp(Po,"power delivered in W:")
+Pi=round(Po/.09)/10;
+Id=Pi/V1;
+disp(Id*1000,"average current in mA:")
+Im=Id/D;
+disp(Im,"mid primary current in A:")
+Ir=(Im*D^.5);
+disp(Ir*1000,"rms current in mA:")
+i=V1*D*T/L;
+disp(i*1000,"ramp current in mA:")
+IM=Im+.24;
+disp(IM,"maximum transistor current in A:")
+Imin=Im-.24;
+disp(Imin,"minimum transistor current in A:")
+Ip=K*IM;
+disp(Ip,"diode peak current in A:")
+Imid=Il/(1-D);
+Irms=Imid*(1-D)^.5;
+disp(Irms,"secondary rms current in A:")
+C=D*Il*T/20;
+disp(C*1000,"capacitor in microF:")
+clear()
+
diff --git a/2075/CH8/EX8.3/pe8_3.sce b/2075/CH8/EX8.3/pe8_3.sce new file mode 100755 index 000000000..c259f0926 --- /dev/null +++ b/2075/CH8/EX8.3/pe8_3.sce @@ -0,0 +1,14 @@ +//example 8.3
+clc;funcprot(0);
+//Initialization of Variable
+V=220;//line voltage
+f=50;//hertz
+R=80;//load resistance
+K=50;//di/dt
+pi=3.1428;
+//calculation
+L=V*2^.5/K;
+disp(L,"inductance in microH:")
+Z=2*pi*f*L;
+disp(Z*1e-6,"load impedence at angle 90 degree in ohm")
+clear()
diff --git a/2075/CH8/EX8.4/pe8_4.sce b/2075/CH8/EX8.4/pe8_4.sce new file mode 100755 index 000000000..769dd40b7 --- /dev/null +++ b/2075/CH8/EX8.4/pe8_4.sce @@ -0,0 +1,23 @@ +//example 8.4
+clc;funcprot(0);
+//Initialization of Variable
+V=220;//line voltage
+f=50;//hertz
+R=80;//load resistance
+K=75;//dv/dt
+Vd=400;//DRM voltage
+pi=3.1428
+//calculation
+C=Vd/R/K;
+disp(C,"minimum value of capacitor in micfoF:")
+printf('\nchoose C=.1 micoF')
+C1=.1;
+Z=1/(2*pi*f*C1);
+disp(Z*1000,"capacitor impedence at angle -90degree in ohm:")
+Iload=V/1000/(-Z*cos(180*pi/180)+R*round(cos(90*pi/180)));
+disp(Iload,"Load current in mA at an angle 90 degrees :");
+Vload=Iload/1000*R;
+disp(Vload,"Potential drop in V at an angle 90 degrees :")
+P=Vload*Iload;
+disp(int(P),"Power dissipated in mW :")
+clear()
diff --git a/2075/CH8/EX8.5/pe8_5.sce b/2075/CH8/EX8.5/pe8_5.sce new file mode 100755 index 000000000..313b57da9 --- /dev/null +++ b/2075/CH8/EX8.5/pe8_5.sce @@ -0,0 +1,11 @@ +//example 8.5
+clc;funcprot(0);
+//Initialization of Variable
+V=220;//line voltage
+f=50;//hertz
+R=80;//load resistance
+I=46;//TSM current
+//calculation
+Rs=V*2^.5/(I-V*2^.5/R);
+disp(Rs,"snubbing resistnce in ohm:")
+clear()
diff --git a/2075/CH8/EX8.6/pe8_6.sce b/2075/CH8/EX8.6/pe8_6.sce new file mode 100755 index 000000000..25a548953 --- /dev/null +++ b/2075/CH8/EX8.6/pe8_6.sce @@ -0,0 +1,27 @@ +//example 8.6
+clc;funcprot(0);
+//Initialization of Variable
+R=10;//load
+V=120;//rms voltage
+f=60;//hertz
+T=83.3;//ms
+t1=15;//ms
+t2=55;//ms
+//calculation
+Tl=1/f;
+disp(Tl*1000,"line period in ms:")
+Th=Tl/2;
+disp(Th*1000,"half-cycle time in ms:")
+C=round(T/Th/100)*100;
+disp(C/1000,"cycles:")
+D1=.2;
+V1=round(V*D1^.5);
+disp(V1,"voltage for t1 in V:")
+P1=V1^2/R;
+disp(P1,"power for t1 in W:")
+D2=.7;
+V2=round(V*D2^.5);
+disp(V2,"voltage for t2 in V:")
+P2=V2^2/R;
+disp(P2,"power for t2 in W:")
+clear()
diff --git a/2075/CH8/EX8.8/pe8_8.sce b/2075/CH8/EX8.8/pe8_8.sce new file mode 100755 index 000000000..adc33aa5a --- /dev/null +++ b/2075/CH8/EX8.8/pe8_8.sce @@ -0,0 +1,19 @@ +//example 8.8
+clc;funcprot(0);
+//Initialization of Variable
+V=120;//line voltage
+A=60;//degree
+D=.35;
+pi=3.14;
+//calculation
+Va=D*V;
+disp(Va,"average voltage in V:")
+Vd=V*2^.5*(cos(A*pi/180)+1)/2/pi;
+disp(round(Vd),"dc voltage in V:")
+printf('\nthe markers indicae Vp=163V Vave=41')
+Vr=.9*V;
+disp(Vr,"full-wave rms voltage in V:")
+Vrms=V*(2^.5)*(.5*(pi-1.047)+.25*sin(2*A*pi/180))^.5/pi^.5;
+disp(Vrms,"rms voltage in V:")
+printf('\nthe markers indicate Vp=169V Vave=106V')
+clear()
diff --git a/2075/CH8/EX8.9/pe8_9.sce b/2075/CH8/EX8.9/pe8_9.sce new file mode 100755 index 000000000..4196d6e78 --- /dev/null +++ b/2075/CH8/EX8.9/pe8_9.sce @@ -0,0 +1,14 @@ +//example 8.9
+clc;funcprot(0);
+//Initialization of Variable
+V=220;//line voltage
+P=1.3;//kW
+R=15;//ohm
+pi=3.1428;
+//calculation
+Vr=round((P*1000*R)^.5);
+disp(Vr,"rms voltage in V:")
+D=Vr/V;
+Vr=V*2^.5*(.5*(pi-1.710)+sin(196*pi/180)/4)^.5/pi^.5;
+disp(Vr,"double checked value of rms voltage in V:")
+clear()
diff --git a/2075/CH9/EX9.1/pe9_1.sce b/2075/CH9/EX9.1/pe9_1.sce new file mode 100755 index 000000000..fef256959 --- /dev/null +++ b/2075/CH9/EX9.1/pe9_1.sce @@ -0,0 +1,19 @@ +//example 9.1
+clc;funcprot(0);
+//Initialization of Variable
+V=28;//V
+C=4700;//microF
+R=16;//load
+f=120;//hertz
+//calculation
+Vp=V*2^.5-2;
+disp(Vp,"peak voltage in V:")
+Vd=.95*Vp;
+disp(Vd,"load voltage in V:")
+Id=Vd/R;
+v=Id/f/C;
+disp(v*1e6,"ripple voltage in V:")
+//approximation
+Vd=Vp-v*1e6/2;
+disp(Vd,"approx. load voltage in V:")
+clear()
diff --git a/2075/CH9/EX9.2/pe9_2.sce b/2075/CH9/EX9.2/pe9_2.sce new file mode 100755 index 000000000..7896766e3 --- /dev/null +++ b/2075/CH9/EX9.2/pe9_2.sce @@ -0,0 +1,19 @@ +//example 9.2
+clc;funcprot(0);
+//Initialization of Variable
+V1=120;//pri voltage
+V2=28;//sec voltage
+I=2;//pri current
+f=60;//Hz
+Vth=28.8;//open voltage
+V3=12.1;//pri-short voltage
+Is=2;//short current at 45 degree
+pi=3.1428;
+//calculation
+Zi=(V2*V3)/V1/Is*cos(45*pi/180);
+Zj=(V2*V3)/V1/Is*sin(45*pi/180);
+printf('Zth=Zi in %f is',Zi)
+printf('\n\nZth=Zj in %f is',Zj)
+L=Zi/(2*pi*f);
+disp(L*1000,"inductor in mH:")
+clear()
diff --git a/2075/CH9/EX9.4/pe9_4.sce b/2075/CH9/EX9.4/pe9_4.sce new file mode 100755 index 000000000..1e220c407 --- /dev/null +++ b/2075/CH9/EX9.4/pe9_4.sce @@ -0,0 +1,13 @@ +//example 9.4
+clc;funcprot(0);
+//Initialization of Variable
+I1=1.8;//current
+R=16;//resistance
+I2=5.7;//A
+V=28.8;//Voltage
+//calculation
+P=I1^2*R;
+S=I2*V;
+Pf=P/S;
+disp(Pf,"power factor:")
+clear()
diff --git a/2075/CH9/EX9.5/pe9_5.sce b/2075/CH9/EX9.5/pe9_5.sce new file mode 100755 index 000000000..9d746f83d --- /dev/null +++ b/2075/CH9/EX9.5/pe9_5.sce @@ -0,0 +1,15 @@ +//example 9.5
+clc;funcprot(0);
+//Initialization of Variable
+I=22.6;//current
+V=120;//voltage
+Id=28;//A
+Vd=280;//V
+//calculation
+P=3*I*V;
+disp(P/1000,"total power in kW:")
+Pl=Id*Vd;
+disp(Pl/1000,"load power in kW:")
+Pf=Pl/P;
+disp(Pf,"power factor:")
+clear()
diff --git a/2075/CH9/EX9.6/pe9_6.sce b/2075/CH9/EX9.6/pe9_6.sce new file mode 100755 index 000000000..18be993fa --- /dev/null +++ b/2075/CH9/EX9.6/pe9_6.sce @@ -0,0 +1,17 @@ +//example 9.6
+clc;funcprot(0);
+//Initialization of Variable
+V=208;//voltage
+R=100;//load
+Vd=150;//V
+pi=3.1428;
+//calculation
+r=Vd/V;
+disp(r,"ratio:")
+printf('firing angle is 58 degrees');
+a=58;//degree
+Vd=3*2^.5*208*(cos(pi/3+a*pi/180)-cos(2*pi/3+a*pi/180))/pi;
+disp(Vd,"dc voltage in V:")
+t=a*16.7/360;
+disp(t,"time delay in ms:")
+clear()
diff --git a/2075/CH9/EX9.7/pe9_7.sce b/2075/CH9/EX9.7/pe9_7.sce new file mode 100755 index 000000000..9fa61f6a7 --- /dev/null +++ b/2075/CH9/EX9.7/pe9_7.sce @@ -0,0 +1,14 @@ +//example 9.7
+clc;funcprot(0);
+//Initialization of Variable
+P=150;//power
+V=8;//voltage
+R=.01;//resistance
+D=.5;//duty cycle
+//calculation
+I=P/.9/D/V;
+disp(I,"max. current in A:")
+Ir=I*D^.5;
+Pq=Ir^2*R;
+disp(Pq,"dissipated power in W:")
+clear()
diff --git a/2075/CH9/EX9.8/pe9_8.sce b/2075/CH9/EX9.8/pe9_8.sce new file mode 100755 index 000000000..79de417ec --- /dev/null +++ b/2075/CH9/EX9.8/pe9_8.sce @@ -0,0 +1,12 @@ +//example 9.8
+clc;funcprot(0);
+//Initialization of Variable
+f1=60;//frequency
+V=150;//voltage
+f2=31;//kHz
+//calculation
+f3=f1*4;
+disp(f3*2^7/1000,"pwm fundamental frequency in kHz:")
+Vo=V*10^(-4.2);
+disp(Vo*1000,"output voltage in V:")
+clear()
diff --git a/2075/CH9/EX9.9/pe9_9.sce b/2075/CH9/EX9.9/pe9_9.sce new file mode 100755 index 000000000..c242d18f2 --- /dev/null +++ b/2075/CH9/EX9.9/pe9_9.sce @@ -0,0 +1,24 @@ +//example 9.9
+clc;funcprot(0);
+//Initialization of Variable
+V=120;//load voltage
+f=60;//Hz
+Vp=200;//V
+Vd=5;//V
+pi=3.1428;
+//calculation
+Vdc=2*Vp/pi;
+disp(Vdc,"average voltage in V:")
+printf('\nVa-d @ 200Vin=4.2V')
+Va=4.2;
+printf('\n\npick R1=47kohm')
+R1=47;
+I=(Vdc-Va)/R1;
+disp(I,"current through dividers in mA:")
+R2=Va/I;
+disp(R2,"R2 in kohm:")
+pi=3.1428;
+K=1/(1/R1+1/R2);// R1 \\ R2
+C=1/2/pi/3.8/K;
+disp(C*1000,"capacitor in microF:")
+clear()
|