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 /1964/CH5 | |
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 '1964/CH5')
50 files changed, 1018 insertions, 0 deletions
diff --git a/1964/CH5/EX5.1/ex5_1.sce b/1964/CH5/EX5.1/ex5_1.sce new file mode 100755 index 000000000..cdc658298 --- /dev/null +++ b/1964/CH5/EX5.1/ex5_1.sce @@ -0,0 +1,30 @@ +//Chapter-5, Example 5.1, Page 157
+//=============================================================================
+clc
+clear
+ function [polar] = r2p(x,y)//function to convert rectangular to polar
+ polar = ones(1,2)
+ polar(1) = sqrt ((x ^2) +(y^2))
+ polar(2) = atan (y/x)
+ polar(2) =(polar (2)*180)/%pi
+ endfunction
+ function [ rect ] = p2r(r,theta)//function to convert polar to rectangular
+ rect = ones(1 ,2)
+ theta =( theta *%pi) /180
+ rect (1)=r* cos(theta)
+ rect (2)=r* sin(theta)
+ endfunction
+//CALCULATIONS
+I1=r2p(7,-5);
+disp(I1);
+I2=r2p(-9,6);
+I2(2)=I2(2)+(180);//this belongs to quadrant 2 and hence 180 degrees should be added
+disp(I2);
+I3=r2p(-8,-8);
+I3(2)=I3(2)+(180);//this belongs to quadrant 3 and hence 180 degrees should be added
+disp(I3);
+I4=r2p(6,6);
+disp(I4);
+//note:here direct functions for converson are not available and hence we defined user defined functions for polar to rect and rect to polar conversions
+//=================================END OF PROGRAM======================================================================================================
+
diff --git a/1964/CH5/EX5.10/ex5_10.sce b/1964/CH5/EX5.10/ex5_10.sce new file mode 100755 index 000000000..6681404ca --- /dev/null +++ b/1964/CH5/EX5.10/ex5_10.sce @@ -0,0 +1,21 @@ +//Chapter-5, Example 5.10, Page 169
+//=============================================================================
+clc
+clear
+//INPUT DATA
+//given v=141.4*sin(314*t)
+P=700;//power in Watts
+pf=0.707;//powerfactor------>leading------>cos(phi)
+Vm=141.4;//maximum value of supply voltage
+//CALCULATIONS
+Vr=Vm/(sqrt(2));//rms value of supply voltage
+I=P/(Vr*pf);//current in A
+Z=Vr/I;//impedance in ohms
+R=(Z)*(pf);//resistance in ohms
+phi=acos(pf*180/%pi);//angle in degrees
+Xc=(Z)*(sin(phi));//reactance in ohms
+C=1/(3.14*7.13);//Capacitance in F
+mprintf("Thus resistance and capacitance are %1.2f ohms and %g F respectively",R,C);
+//=================================END OF PROGRAM======================================================================================================
+
+;
diff --git a/1964/CH5/EX5.11/ex5_11.sce b/1964/CH5/EX5.11/ex5_11.sce new file mode 100755 index 000000000..1006a9a8d --- /dev/null +++ b/1964/CH5/EX5.11/ex5_11.sce @@ -0,0 +1,27 @@ +//Chapter-5, Example 5.11, Page 169
+//=============================================================================
+clc
+clear
+//INPUT DATA
+V=200;//supply voltage in volts
+f=50;//freq in hz
+P=7000;//power in Watts
+Vr=130;//volatge across resistor in volts
+P=7000;//power in Watts
+//CALCULATIONS
+R=((Vr)^2)/P;//resistance in ohms
+I=Vr/R;//current in A
+Z=V/I;//total impedance in ohms
+Xc=sqrt((Z)^2-(R)^2);
+C=1/(2*%pi*f*Xc);//Capacitance in F
+pf=R/Z;//power factor------>leading
+phi=acos(pf);//angle in radians
+phi=phi*180/%pi;//angle in degrees
+Vm=V*sqrt(2);//maximum value of voltage
+//voltage equation v=Vm*sin(2*%pi*f*t)------>282.84*sin(314.16*t)
+//current leads voltage by phi
+//current equation ------>i=76.155*sin(314.16*t+phi)
+mprintf("Thus current,resistance,p.f,capacitance,impedance are %2.2f A ,%1.2f ohms,%2.1f ,%g F and %1.2f ohms respectively",I,R,pf,C,Z);
+//=================================END OF PROGRAM======================================================================================================
+
+;
diff --git a/1964/CH5/EX5.12/ex5_12.sce b/1964/CH5/EX5.12/ex5_12.sce new file mode 100755 index 000000000..57490cc8e --- /dev/null +++ b/1964/CH5/EX5.12/ex5_12.sce @@ -0,0 +1,22 @@ +//Chapter-5, Example 5.12, Page 170
+//=============================================================================
+clc
+clear
+//INPUT DATA
+C=50;//capacitance in uf
+R=100;//resistance in ohms
+V=200;//supply voltage in volts
+f=50;//freq in hz
+//CALCULATIONS
+Xc=1/(2*%pi*f*C*10^-6);//capacitive reactance in ohms
+Z=R-((%i)*Xc);//impedance in ohms
+disp(Z);
+z1=sqrt((R)^2+(Xc)^2);
+theta=atan(Xc/R);
+pf=cos(theta);//powerfactor
+I=V/z1;//current in A
+P=V*I*pf;//power in Watts
+mprintf("Thus current,power factor,power are % 1.2f A ,%1.3f ,%d W respectively",I,pf,P);
+//=================================END OF PROGRAM======================================================================================================
+
+;
diff --git a/1964/CH5/EX5.13/ex5_13.sce b/1964/CH5/EX5.13/ex5_13.sce new file mode 100755 index 000000000..087c7c049 --- /dev/null +++ b/1964/CH5/EX5.13/ex5_13.sce @@ -0,0 +1,15 @@ +//Chapter-5, Example 5.13, Page 170
+//=============================================================================
+clc
+clear
+//INPUT DATA
+C=0.05;//capacitance in uf
+F=500;//freq in hz
+//CALCULATIONS
+Xl=1/(2*%pi*F*C*10^-6);//capacitive reactance in ohms
+//at resonance Xl=Xc
+L=(Xl/(2*%pi*F));//inductance in H
+mprintf("Thus value of L is %1.2f H",L);
+//=================================END OF PROGRAM======================================================================================================
+
+;
diff --git a/1964/CH5/EX5.14/ex5_14.sce b/1964/CH5/EX5.14/ex5_14.sce new file mode 100755 index 000000000..173396051 --- /dev/null +++ b/1964/CH5/EX5.14/ex5_14.sce @@ -0,0 +1,26 @@ +//Chapter-5, Example 5.14, Page 171
+//=============================================================================
+clc
+clear
+//INPUT DATA
+V=200;//voltage in V
+R=50;//resistance in ohms
+L=0.5;//inductance in Henry
+F=50;//freq in hz
+//CALCULATIONS
+Xl=2*%pi*F*L;//inductive reactance
+Z=(R)+((%i)*Xl)//impedance
+disp(Z);
+z1=sqrt((R)^2+(Xl)^2);//magnitude
+theta=atan(Xl/R);//angle in radians
+I=V/z1;//current in A
+P=V*I*cos(theta);//power supplied in W
+//here capacitive reactance equals inductive reactance
+//hence Xc=Xl
+C=1/(2*%pi*F*Xl);//capacitance in uf
+r=(V/I)-(R);//additional resistance to be added in series
+mprintf("Thus current and power required are % 1.2f A and %2.2f W respectively\n",I,P);
+mprintf("Thus additional resistance that neede to be connected in series with R and C to have same current at unity power factor is %1.1f ohms",r);
+//=================================END OF PROGRAM======================================================================================================
+
+;
diff --git a/1964/CH5/EX5.15/ex5_15.sce b/1964/CH5/EX5.15/ex5_15.sce new file mode 100755 index 000000000..0f00efc42 --- /dev/null +++ b/1964/CH5/EX5.15/ex5_15.sce @@ -0,0 +1,18 @@ +//Chapter-5, Example 5.15, Page 171
+//=============================================================================
+clc
+clear
+//INPUT DATA
+R=50;//resistance in ohms
+L=9;//inductance in Henry
+I0=1;//current in A
+f=75;//ferquency in Hz
+//at resonance Xl=Xc
+//CALCULATIONS
+Xl=2*%pi*f*L;//inductive reactance
+Xc=Xl;//capacitive reactance
+C=1/(2*%pi*f*Xc);//capacitance in uf
+mprintf("Thus capacitance is %g F",C);
+//=================================END OF PROGRAM======================================================================================================
+
+;
diff --git a/1964/CH5/EX5.16/ex5_16.sce b/1964/CH5/EX5.16/ex5_16.sce new file mode 100755 index 000000000..93c5c3aeb --- /dev/null +++ b/1964/CH5/EX5.16/ex5_16.sce @@ -0,0 +1,25 @@ +//Chapter-5, Example 5.16, Page 175
+//=============================================================================
+clc
+clear
+//INPUT DATA
+R=10;//resistance in ohms
+L=0.1;//inductance in Henry
+C=150;//capacitor in uf
+V=200;//voltage in V
+f=50;//frequency in hz
+//CALCULATIONS
+Xc=1/(2*%pi*f*C*10^-6);//Capacitive reactance in ohms
+Xl=(2*%pi*f*L);//inductive reactance in ohms
+Z=R+((%i)*(Xl-Xc));//impedance in ohms
+z1=sqrt((R)^2+(Xl-Xc)^2);//magnitude of Z
+I=V/z1;//current in A
+pf=R/z1;//power factor----->cos(phi)
+//As Xl-Xc is inductive,pf is lagging
+z2=sqrt((R^2)+(Xl)^2);//impedance of coil in ohms
+Vl=I*(z2);//voltage across coil in volts
+Vc=I*(Xc);//voltage across capacitor in volts
+mprintf("Thus inductive reactance,capacitive reactance,impedance,current,powerfactor are %2.2f ohms,%2.2f ohms,%2.2f ohms,%d A,%1.1f respectively,",Xl,Xc,z1,I,pf);
+//=================================END OF PROGRAM======================================================================================================
+
+;
diff --git a/1964/CH5/EX5.17/ex5_17.sce b/1964/CH5/EX5.17/ex5_17.sce new file mode 100755 index 000000000..530296263 --- /dev/null +++ b/1964/CH5/EX5.17/ex5_17.sce @@ -0,0 +1,23 @@ +//Chapter-5, Example 5.17, Page 176
+//=============================================================================
+clc
+clear
+//INPUT DATA
+L=10;//inductance in milliHenry
+C=5;//capacitor in uf
+phi=50;//phase in degrees-------->lagging
+f=500;//frequency in hz
+V=200;//supply voltage in volts
+//CALCULATIONS
+Xc=1/(2*%pi*f*C*10^-6);//Capacitive reactance in ohms
+Xl=(2*%pi*f*L*10^-3);//inductive reactance in ohms
+R=(Xc-Xl)/(tan(phi*%pi/180));//resistance in ohms
+Z=sqrt((R)^2+(Xc-Xl)^2);//impedance in ohms
+I=V/Z;//current in A
+Vr=(I)*(R);//voltage across resistance
+Vl=(I)*(Xl);//voltage across inductance
+Vc=(I)*(Xc);//voltage across capacitance
+mprintf("Thus voltages across resistance,inductance,capacitance are %3.2f volts,%3.2f volts,%3.2f volts respectively,",Vr,Vl,Vc);
+//=================================END OF PROGRAM======================================================================================================
+
+;
diff --git a/1964/CH5/EX5.18/ex5_18.sce b/1964/CH5/EX5.18/ex5_18.sce new file mode 100755 index 000000000..b8699fc04 --- /dev/null +++ b/1964/CH5/EX5.18/ex5_18.sce @@ -0,0 +1,26 @@ +//Chapter-5, Example 5.18, Page 176
+//=============================================================================
+clc
+clear
+//INPUT DATA
+L=5;//inductance in Henry
+f=50;//frequency in hz
+V=230;//supply voltage in volts
+R=2;//resitance in ohms
+V1=250;//voltage across coil in V
+//CALCULATIONS
+Xl=(2*%pi*f*L);//inductive reactance in ohms
+Z1=sqrt((R)^2+(Xl)^2);//impedance of coil in ohms
+I=V1/Z1;//current in A
+Z=V/I;//total impedance in ohms
+//Z=sqrt((R)^2+(Xl-Xc)^2) and solving for Xc
+Xc=poly(0,"Xc");
+p=(Xc^2)-3141.58*(Xc)+378004
+roots2 = roots (p);
+r2 = roots2 (2);
+//Xc cannot be greater than Z
+C=1/(2*%pi*f*r2);//capacitance in F
+mprintf("Thus value of C that must be present suct that voltage across coil is 250 volts is %g F respectively,",C);
+//=================================END OF PROGRAM======================================================================================================
+
+;
diff --git a/1964/CH5/EX5.19/ex5_19.sce b/1964/CH5/EX5.19/ex5_19.sce new file mode 100755 index 000000000..27200868d --- /dev/null +++ b/1964/CH5/EX5.19/ex5_19.sce @@ -0,0 +1,26 @@ +//Chapter-5, Example 5.19, Page 178
+//=============================================================================
+clc
+clear
+//v=350*cos(3000*t-20)
+//i=15*cos(3000*t-60)
+//INPUT DATA
+L=0.5;//inductance in Henry
+phi=-40;//phase difference between applied voltage and current
+//Xl>Xc(P.f is lagging)
+w=3000;//freq in hz
+Vm=350;//peak voltage in volts
+Im=15;//peak current in amps
+//CALCULATIONS
+Z=Vm/Im;//total impedance in ohms
+//Xl-Xc=0.839*R=X
+//Z=sqrt((R)^2+(X)^2)
+//Z=1.305*R
+R=Z/1.305;//resistance in ohms
+X=0.839*R;//
+//X=Xl-Xc
+Xl=w*L;//reactive inductance in ohms
+Xc=Xl-X;//capacitive reactance in ohms
+C=1/(w*Xc);//capacitance in uf
+mprintf("Thus resistance and capacitance are %2.2f ohms and %g F respectively,",R,C);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.2/ex5_2.sce b/1964/CH5/EX5.2/ex5_2.sce new file mode 100755 index 000000000..07c33c6af --- /dev/null +++ b/1964/CH5/EX5.2/ex5_2.sce @@ -0,0 +1,41 @@ +//Chapter-5, Example 5.2, Page 157
+//=============================================================================
+clc
+clear
+ function [polar] = r2p(x,y)//function to convert rectangular to polar
+ polar = ones(1,2)
+ polar(1) = sqrt ((x ^2) +(y^2))
+ polar(2) = atan (y/x)
+ polar(2) =(polar (2)*180)/%pi
+ endfunction
+ function [ rect ] = p2r(r,theta)//function to convert polar to rectangular
+ rect = ones(1,2)
+ theta =( theta *%pi) /180
+ rect (1)=r* cos(theta)
+ rect (2)=r* sin(theta)
+ endfunction
+//CALCULATIONS
+//for subdivision 1
+I1=p2r(10,60);
+I2=p2r(8,-45);
+I3=I1+I2;
+disp(I3);
+I4=r2p(I3(1),I3(2));
+disp(I4)
+//for subdivision 2
+I5=r2p(5,4);
+I6=r2p(-4,-6);
+I7(1)=(I5(1))*(I6(1));
+I7(2)=(I5(2)+I6(2));
+I7(2)=I7(2)-180;
+disp(I7);
+//for subdivision 3
+I8=r2p(-2,-5);
+I9=r2p(5,7);
+I10(1)=I8(1)/I9(1);
+I10(2)=I8(2)-I9(2);
+I10(2)=I10(2)-180
+disp(I10);
+//note:here direct functions for converson are not available and hence we defined user defined functions for polar to rect and rect to polar conversions
+//=================================END OF PROGRAM======================================================================================================
+
diff --git a/1964/CH5/EX5.20/ex5_20.sce b/1964/CH5/EX5.20/ex5_20.sce new file mode 100755 index 000000000..85bc38626 --- /dev/null +++ b/1964/CH5/EX5.20/ex5_20.sce @@ -0,0 +1,16 @@ +//Chapter-5, Example 5.20, Page 182
+//=============================================================================
+clc
+clear
+//INPUT DATA
+R=10;//resistance in ohms
+L=0.1;//inductance in henry
+f=50;//frequency in hz
+//CALCULATIONS
+Xl=(2*%pi*f*L);//inductive reactance in ohms
+Z=R+((%i)*(Xl));//impedance in ohms
+Y=inv(Z);//admittance in mho
+disp(Y);
+y=abs(Y);//admittance in mho
+mprintf("admittance is %1.5f mho",y);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.21/ex5_21.sce b/1964/CH5/EX5.21/ex5_21.sce new file mode 100755 index 000000000..4baf04390 --- /dev/null +++ b/1964/CH5/EX5.21/ex5_21.sce @@ -0,0 +1,10 @@ +//Chapter-5, Example 5.21, Page 182
+//=============================================================================
+clc
+clear
+//INPUT DATA
+//CALCULATIONS
+Z=10+((%i)*(5));//impedance in ohms
+Y=inv(Z);//Admittance in mho
+disp(Y);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.22/ex5_22.sce b/1964/CH5/EX5.22/ex5_22.sce new file mode 100755 index 000000000..16e567e68 --- /dev/null +++ b/1964/CH5/EX5.22/ex5_22.sce @@ -0,0 +1,23 @@ +//Chapter-5, Example 5.22, Page 182
+//=============================================================================
+clc
+clear
+//INPUT DATA
+Z1=7+((%i)*5);//impedance of branch1 in ohms
+Z2=10-((%i)*8);//impedance of branch2 in ohms
+V=230;//supply voltage in volts
+f=50;//frequency in hz
+//CALCULATIONS
+Y1=1/(Z1);//admittance of branch1 in mho
+Y2=1/(Z2);//admittance of branch2 in mho
+Y=Y1+Y2;//admittance of combined circuit
+disp(Y);
+g=abs(Y);//conductance in mho;
+B=atan(imag(Y)/real(Y));//susceptance in mho
+I=V*(Y);//current
+disp(I);//total current taken from mains in A
+z=atan(imag(I)/real(I));
+pf=cos(z);//power factor
+mprintf("thus conductance and susceptance of the circuit is %1.3f mho and %1.3f mho respectively\n",g,B);
+mprintf("power factor is %1.3f lagging",pf)
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.23/ex5_23.sce b/1964/CH5/EX5.23/ex5_23.sce new file mode 100755 index 000000000..ba68931b5 --- /dev/null +++ b/1964/CH5/EX5.23/ex5_23.sce @@ -0,0 +1,24 @@ +//Chapter-5, Example 5.23, Page 183
+//=============================================================================
+clc
+clear
+//INPUT DATA
+V=240;//voltage in volts
+f=50;//frequency in Hz
+R=15;//resisitance in ohms
+I=22.1;//current in A
+//CALCULATIONS
+G=1/R;//conductance in mho
+//susceptance of the circuit,B=1/(Xl)=0.00318/L
+//admittance of the circuit,(G-jB)=(0.067-j(0.00318/L))
+Y=I/V;//admittance in mho;
+//Y=sqrt((0.067)^2+(0.00318/L)^2)=0.092-----eqn(1)
+//solving eqn(1) for L we have it as
+L=sqrt((0.00318)^2/((Y)^2-(G)^2));//inductance in henry
+//when current is 34A
+I1=34;//current in A
+Y1=I1/V;//admittance in mho
+//for Y1 we need to find f
+f1=sqrt((3.183)^2/((Y1)^2-(G)^2));//frequency in hz
+mprintf("Thus value of frequency when current is 34A is %2.1f Hz",f1);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.24/ex5_24.sce b/1964/CH5/EX5.24/ex5_24.sce new file mode 100755 index 000000000..6fdf9ecaf --- /dev/null +++ b/1964/CH5/EX5.24/ex5_24.sce @@ -0,0 +1,28 @@ +//Chapter-5, Example 5.24, Page 184
+//=============================================================================
+clc
+clear
+//INPUT DATA
+L=0.05;//inductance in henry
+R2=20;//resistance in ohms
+R1=15;//resistance in ohms
+V=200;//supply voltage in volts
+f=50;//frequency in hz
+//CALCULATIONS
+//for branch 1
+Z1=(R1)+((%i)*(2*%pi*f*L));//impedance in ohms
+Y1=inv(Z1);//admittance in branch
+I1=V*(Y1);//current in branch
+disp(I1);
+i1=abs(I1);//magnitude of current
+//for branch 2
+Y2=1/R2;//admittance in branch
+I2=V*Y2;//current in branch
+i2=abs(I2);//magnitude of current
+I=I1+I2;//total current in A
+i=abs(I);//magnitude of total current
+theta=atan(imag(I)/real(I));//angle in radians
+theta=theta*(180)/(%pi);//angle in degrees
+mprintf("Thus current in branch1,branch2 abd total currents are %1.2f A,%d A,%2.2f A respectively\n",i1,i2,i);
+mprintf("phase angle of the combination is %2.1f degrees",theta);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.25/ex5_25.sce b/1964/CH5/EX5.25/ex5_25.sce new file mode 100755 index 000000000..2a413bb2b --- /dev/null +++ b/1964/CH5/EX5.25/ex5_25.sce @@ -0,0 +1,24 @@ +//Chapter-5, Example 5.25, Page 185
+//=============================================================================
+clc
+clear
+//INPUT DATA
+L=6;//inductance in millihenry
+R2=50;//resistance in ohms
+R1=40;//resistance in ohms
+C=4;//capacitance in uf
+V=100;//voltage in volts
+f=800;//frequency in hz
+//CALCULATIONS
+Xl=(2*%pi*f*L*10^-3);//inductive reactance in ohms
+Xc=1/(2*%pi*f*C*10^-6);//capacitive reactance in ohms
+Y1=inv((R1)+(%i*Xl));//admittance of branch1 in mho
+Y2=inv((R2)-(%i*Xc));//admittance of branch2 in mho
+I1=V*(Y1);//current in branch 1
+I2=V*(Y2);//current in branch 2
+I=I1+I2;//total curremt in A
+theta=(atan(imag(I1)/real(I1))-atan(imag(I2)/real(I2)));
+theta=theta*180/%pi;//angle in degrees
+mprintf("Thus total current taken from supply is %2.2f\n",abs(I));
+mprintf("phase angle between currents of coil and capacitor is %2.2f degrees",theta);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.26/ex5_26.sce b/1964/CH5/EX5.26/ex5_26.sce new file mode 100755 index 000000000..4796651dd --- /dev/null +++ b/1964/CH5/EX5.26/ex5_26.sce @@ -0,0 +1,17 @@ +//Chapter-5, Example 5.26, Page 186
+//=============================================================================
+clc
+clear
+//INPUT DATA
+Z1=10+(%i*15);//impedance in ohms
+Z2=6-(%i*8);//impedance in ohms
+I=15;//current in A
+//CALCULATIONS
+I1=((Z2)/(Z1+Z2))*(I);//using current division rule
+I2=((Z1)/(Z1+Z2))*(I);//using current division rule
+i1=abs(I1);//magnitude of current 1
+i2=abs(I2);//magnitdude of current 2
+P1=((i1)^2)*(Z1(1));//power consumed by branch 1
+P2=((i2)^2)*(Z2(1));//power consumed by branch 2
+mprintf("Thus power consumed by branches 1 and 2 are %3.2f W and %4.1f W respectively",P1,P2);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.27/ex5_27.sce b/1964/CH5/EX5.27/ex5_27.sce new file mode 100755 index 000000000..d503a3127 --- /dev/null +++ b/1964/CH5/EX5.27/ex5_27.sce @@ -0,0 +1,25 @@ +//Chapter-5, Example 5.27, Page 187
+//=============================================================================
+clc
+clear
+//INPUT DATA
+V=200;//voltage in volts
+f=50;//frequency in hz
+R1=10;//resistance in ohms
+L1=0.0023;//inductance in henry
+R2=5;//resistance in ohms
+L2=0.035;//inductance in henry
+//CALCULATIONS
+Xl1=(2*%pi*f*L1);//inductive reactance in branch 1 in ohm
+Xl2=(2*%pi*f*L2);//inductive reactance in branch 2 in ohm
+Y1=inv(10+(%i*7.23));//admittance of branch 1 in mho
+Y2=inv(5+(%i*10.99));//admittance of branch 2 in mho
+Y=Y1+Y2;//total admittance in mho
+I1=V*(Y1);//current through branch1
+I2=V*(Y2);//current through branch2
+I=I1+I2;//total current in A
+theta=atan(imag(I)/real(I));//angle in radians
+pf_of_combination=cos(theta);//powerfactor---->lagging
+mprintf("Thus currents in branch1,branch2 and total current are %2.1f A,%2.1f A and %2.2f A respectively\n",abs(I1),abs(I2),abs(I));
+mprintf("pf of combination is %1.3f",pf_of_combination);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.28/ex5_28.sce b/1964/CH5/EX5.28/ex5_28.sce new file mode 100755 index 000000000..fcc4f5ddc --- /dev/null +++ b/1964/CH5/EX5.28/ex5_28.sce @@ -0,0 +1,26 @@ +//Chapter-5, Example 5.28, Page 189
+//=============================================================================
+clc
+clear
+//INPUT DATA
+f=50;//freq in hz
+V=100;//volatge in V
+L1=0.015;//inductance in branch 1 in henry
+L2=0.08;//inductance in branch 2 in henry
+R1=2;//resistance of branch 1 in ohms
+x1=4.71;//reactance of branch 1 in ohms
+R2=1;//resistance of branch 2 in ohms
+x2=25.13;//reactance of branch 2 in ohms
+Z1=(R1)+(%i*x1);//impedance of branch1 in ohms
+Z2=(R2)+(%i*x2);//impedance of branch1 in ohms
+I1=V/Z1;//current in branch 1 in A
+printf("current in branch 1 in A")
+disp(I1);
+I2=V/Z2;//current in branch 2 in A
+printf("current in branch 2 in A")
+disp(I2);
+I3=I1+I2;//total current in A
+printf("total current in A")
+disp(I3);
+//note:Answer for real part of total current given in textbook is wrong.Please check the calculations
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.29/ex5_29.sce b/1964/CH5/EX5.29/ex5_29.sce new file mode 100755 index 000000000..136d115e6 --- /dev/null +++ b/1964/CH5/EX5.29/ex5_29.sce @@ -0,0 +1,10 @@ +//Chapter-5, Example 5.29, Page 189
+//=============================================================================
+clc
+clear
+//CALCULATIONS
+R=8;//resistance in ohms
+Xc=-(%i)*12;//capacitive reactance in ohms
+Y=(inv(R)+inv(Xc));//admittance in mho
+disp(Y);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.3/ex5_3.sce b/1964/CH5/EX5.3/ex5_3.sce new file mode 100755 index 000000000..04a2064f2 --- /dev/null +++ b/1964/CH5/EX5.3/ex5_3.sce @@ -0,0 +1,26 @@ +//Chapter-5, Example 5.3, Page 160
+//=============================================================================
+clc
+clear
+//given i(t)=5*sin(314*t+(2*%pi/3))&& v(t)=20*sin(314*t+(5*%pi/6))
+//CALCULATIONS
+P1=2*(%pi/3);//phase angle of current in radians
+P1=P1*(180/%pi);//phase angle of current in degrees
+P2=5*(%pi/6);//phase angle of voltage in radians
+P2=P2*(180/%pi);//phase angle of voltage in degrees
+P3=P2-P1;//current lags voltage by P3 degrees
+P4=P3*%pi/180;
+pf=cos(P4);//lagging pf
+Vm=20;//peak voltage
+Im=5;//peak current
+Z=Vm/Im;//impedance in ohms
+R=(Z)*cos(P4);//resistance in ohms
+Xl=sqrt((Z)^2-(R)^2);//reactance
+W=314;
+L=Xl/W;//inductance in henry
+V=Vm/sqrt(2);//average value of voltage
+I=Im/sqrt(2);//average value of current
+av=(V*I)*cos(P4);//average power in watts
+mprintf("thus impedance,resistance,inductance,powerfactor and average power are %d ohms,%1.2f ohms,%g H,%1.3f and %2.1f W respectively",Z,R,L,pf,av);
+//=================================END OF PROGRAM======================================================================================================
+
diff --git a/1964/CH5/EX5.30/ex5_30.sce b/1964/CH5/EX5.30/ex5_30.sce new file mode 100755 index 000000000..eca0ff58a --- /dev/null +++ b/1964/CH5/EX5.30/ex5_30.sce @@ -0,0 +1,10 @@ +//Chapter-5, Example 5.30, Page 189
+//=============================================================================
+clc
+clear
+//CALCULATIONS
+R=3;//resistance in ohms
+Xl=(%i)*4;//inductive reactance in ohms
+Y=(inv(R)+inv(Xl));//admittance in mho
+disp(Y);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.31/ex5_31.sce b/1964/CH5/EX5.31/ex5_31.sce new file mode 100755 index 000000000..062d4feed --- /dev/null +++ b/1964/CH5/EX5.31/ex5_31.sce @@ -0,0 +1,24 @@ +//Chapter-5, Example 5.31, Page 196
+//=============================================================================
+clc
+clear
+//INPUT DATA
+R=10;//resistance in ohms
+L=10;//inductance in milli henry
+C=1;//capacitance in uF
+V=200;//applied voltage in volts
+//CALCULATIONS
+fr=1/(2*%pi*(sqrt(L*C*10^-3*10^-6)));//resonant frequency in hz
+I0=V/(R);//current at resonance in A
+Vr=I0*R;//voltage across resistance in volts
+Xl=2*%pi*fr*L*10^-3;//inductance in ohms
+Vl=I0*Xl;//voltage across inductor in volts
+Xc=inv(2*%pi*fr*C*10^-6);//capacitance in ohms
+Vc=I0*Xc;//voltage across capacitor in volts
+wr=2*%pi*fr//angular resonant frewuency in rad/sec
+Q=(wr*L*10^-3)/(R);//quality factor
+Bw=(fr/Q);//bandwidth in hz
+mprintf("Thus resonant frequency and current are %4.2f hz and %d A respectively\n",fr,I0);
+mprintf("voltages across resistance,inductance and capacitance are %d V,%d V and %d V respectively\n",Vr,Vl,Vc);
+mprintf("bandwidth and quality factor are %3.2f hz and %d respectively",Bw,Q);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.32/ex5_32.sce b/1964/CH5/EX5.32/ex5_32.sce new file mode 100755 index 000000000..76134e4d0 --- /dev/null +++ b/1964/CH5/EX5.32/ex5_32.sce @@ -0,0 +1,19 @@ +//Chapter-5, Example 5.32, Page 196
+//=============================================================================
+clc
+clear
+//INPUT DATA
+V=220;//applied voltage in volts
+f=50;//frequency in hz
+Imax=0.4;//maximum current in A
+Vc=330;//voltage across capacitance in volts
+//at resonance condition I0=0.4 A
+I0=0.4//current in A
+//CALCULATIONS
+Xc=(Vc)/(I0);//capacitive reactance in ohms
+C=inv(2*%pi*f*Xc);//capacitance in F
+//at resonance condition Xc=Xl, hence
+L=Xc/(2*%pi*f);//inductance in henry
+R=V/(Imax);//resistance in ohms
+mprintf("Thus resistance,inductance and capacitance are %d ohms,%1.2f H and %g F respectively\n",R,L,C);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.33/ex5_33.sce b/1964/CH5/EX5.33/ex5_33.sce new file mode 100755 index 000000000..da6cbac3b --- /dev/null +++ b/1964/CH5/EX5.33/ex5_33.sce @@ -0,0 +1,13 @@ +//Chapter-5, Example 5.33, Page 197
+//=============================================================================
+clc
+clear
+//INPUT DATA
+R1=5;//resistance of branch1 in ohms
+R2=2;//resistance of branch2 in ohms
+L=10;//inductance in mH
+C=40;//capacitance in uF
+//CALCULATIONS
+fr=(1/(2*%pi*(sqrt(L*C*10^-9))))*(sqrt(((C*10^-6*(R1)^2)-L*10^-3)/((C*10^-6*(R2)^2)-L*10^-3)));//resonant frequency in hz
+mprintf("Thus resonant frequency is %f hz",fr);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.34/ex5_34.sce b/1964/CH5/EX5.34/ex5_34.sce new file mode 100755 index 000000000..2401bc38b --- /dev/null +++ b/1964/CH5/EX5.34/ex5_34.sce @@ -0,0 +1,15 @@ +//Chapter-5, Example 5.34, Page 197
+//=============================================================================
+clc
+clear
+//INPUT DATA
+R=20;//resistance in ohms
+L=0.2;//inductance in H
+C=100;//capacitance in uF
+//resistance will be non-inductive only at reosnant frequency
+//CALCULATIONS
+fr=(1/(2*%pi*(sqrt(L*C*10^-6))))*(sqrt((L-(C*10^-6*(R)^2))/(L)));//resonant frequency in hz
+mprintf("Thus resonant frequency is %2.2f hz\n",fr);
+Rf=(L)/(C*R*10^-6);//non-inductive resistance
+mprintf("Thus value of non-inductive resistance is %d ohms",Rf);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.35/ex5_35.sce b/1964/CH5/EX5.35/ex5_35.sce new file mode 100755 index 000000000..66f08c015 --- /dev/null +++ b/1964/CH5/EX5.35/ex5_35.sce @@ -0,0 +1,14 @@ +//Chapter-5, Example 5.35, Page 198
+//=============================================================================
+clc
+clear
+//INPUT DATA
+Q=250;//quality factor
+fr=1.5*10^6;//resonant freq in hertz
+//CALCULATIONS
+Bw=(fr)/(Q);//bandwidth in Hz
+hf1=fr+Bw;//half power freq 1
+hf2=fr-Bw;//half power freq 2
+mprintf("Thus bandwidth is %d hz\n",Bw);
+mprintf("Thus value of half-power frequencies are %g hz and %g hz",hf1,hf2);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.36/ex5_36.sce b/1964/CH5/EX5.36/ex5_36.sce new file mode 100755 index 000000000..8239c99e9 --- /dev/null +++ b/1964/CH5/EX5.36/ex5_36.sce @@ -0,0 +1,11 @@ +//Chapter-5, Example 5.36, Page 198
+//=============================================================================
+clc
+clear
+//INPUT DATA
+L=40*10^-3;//inductance in henry
+C=0.01*10^-6;//capacitance in uf
+//CALCULATIONS
+fr=1/(2*%pi*sqrt(L*C));//resonant frequency
+mprintf("Thus resonant frequency is %d hz\n",fr);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.37/ex5_37.sce b/1964/CH5/EX5.37/ex5_37.sce new file mode 100755 index 000000000..5a9b5c371 --- /dev/null +++ b/1964/CH5/EX5.37/ex5_37.sce @@ -0,0 +1,24 @@ +//Chapter-5, Example 5.37, Page 198
+//=============================================================================
+clc
+clear
+//INPUT DATA
+V=120;//source voltage in volts
+R=50;//resistance in ohms
+L=0.5;//inductance in Henry
+C=50;//capacitance in uF
+//CALCULATIONS
+//at Resonance
+fr=(1/(2*%pi*(sqrt(L*C*10^-6))));//resonant frequency in hz
+I0=V/R;//current at resonance in A
+Vl=(%i)*(I0*L);//voltage developed across inductor in volts
+Vc=(-%i)*(I0*L);//voltage developed across capacitor in volts
+Q=(inv(R))*(sqrt(L/(C*10^-6)));//quality factor
+Bw=(fr)/(Q);//Bandwidth in Hz
+//given resonance is to occur at 300 rad/sec,then
+wr=300;//wr=(2*%pi*f*r)------->measured in Hz
+//wr=inv(sqrt(L*Cn))
+Cr=inv(L*(wr)^2);//capacitance required in uF
+mprintf("Thus resonant frequency,current,quality factor and bandwidth are %2.1f Hz,%1.1f A,%d and %2.1f hz respectively\n",fr,I0,Q,Bw);
+mprintf("New value of capacitance at 300 rad/sec is %g F",Cr)
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.38/ex5_38.sce b/1964/CH5/EX5.38/ex5_38.sce new file mode 100755 index 000000000..f164fa649 --- /dev/null +++ b/1964/CH5/EX5.38/ex5_38.sce @@ -0,0 +1,19 @@ +//Chapter-5, Example 5.38, Page 199
+//=============================================================================
+clc
+clear
+//INPUT DATA
+Q=45;//quality factor
+f1=600*10^3;//freq in Hz
+f2=1000*10^3;//freq in Hz
+//given new resistance is 50% greater than former.let us consider two reistances as R1=1 ohm and R2=1.5 ohm for ease of calculation.Then
+R1=1;//resistance in ohm
+R2=1.5;//resistance in ohm
+//CALCULATIONS
+W1=2*%pi*f1;//angular freq 1 in rad/sec
+W2=2*%pi*f2;//angular freq 2 in rad/sec
+Q=45;//quality factor
+L=(Q*R1)/(W1);//inductance in henry
+Q1=(W2*L)/(R2);//new quality factor
+mprintf("Thus new quality factor is %d",Q1);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.39/ex5_39.sce b/1964/CH5/EX5.39/ex5_39.sce new file mode 100755 index 000000000..b74aa55ef --- /dev/null +++ b/1964/CH5/EX5.39/ex5_39.sce @@ -0,0 +1,17 @@ +//Chapter-5, Example 5.39, Page 199
+//=============================================================================
+clc
+clear
+//INPUT DATA
+R=4;//resistance in ohm
+L=100*10^-6;//inductance in henry
+C=250*10^-12;//capacitance in Farads
+//CALCULATIONS
+fr=inv(2*%pi*sqrt(L*C));//resonant frequency in Hz
+Q=(inv(R))*(sqrt(L/C));//Q-factor
+Bw=fr/Q;//bandwidth in Hz
+hf1=fr+Bw;//halfpower freq1 in Hz
+hf2=fr-Bw;//halfpower freq2 in Hz
+mprintf("Thus resonant freq,Q-factor and new halfpower frequencies are %dhz ,%d,%g hz,%g hz respectively",fr,Q,hf1,hf2);
+//note:given answers are wrong in textbook.Please check the answers
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.4/ex5_4.sce b/1964/CH5/EX5.4/ex5_4.sce new file mode 100755 index 000000000..9714271b0 --- /dev/null +++ b/1964/CH5/EX5.4/ex5_4.sce @@ -0,0 +1,18 @@ +//Chapter-5, Example 5.4, Page 161
+//=============================================================================
+clc
+clear
+//INPUT DATA
+I=10;//given current in A
+P=1000;//power in Watts
+V=250;//voltage in volts
+f=25;//frequency in Hz
+//CALCULATIONS
+R=P/((I)^2);//resistance in ohms
+Z=V/I;//impedance in ohms
+Xl=sqrt((Z)^2-(R)^2);//reactance in ohms
+L=Xl/(2*%pi*f);//inductance in Henry
+Pf=R/Z;//power factor,lagging,pf=cos(phi)
+mprintf("thus impedance,resistance,inductance,reactance and powerfactor are %d ohms,%d ohms,%1.3f H,%2.2f ohms and %1.1f respectively",Z,R,L,Xl,Pf);
+//=================================END OF PROGRAM======================================================================================================
+
diff --git a/1964/CH5/EX5.40/ex5_40.sce b/1964/CH5/EX5.40/ex5_40.sce new file mode 100755 index 000000000..13a0c6e0a --- /dev/null +++ b/1964/CH5/EX5.40/ex5_40.sce @@ -0,0 +1,17 @@ +//Chapter-5, Example 5.40, Page 200
+//=============================================================================
+clc
+clear
+//INPUT DATA
+R=10;//resistance in ohm
+L=10^-3;//inductance in henry
+C=1000*10^-12;//capacitance in Farads
+V=20;//voltage in volts
+//CALCULATIONS
+fr=inv(2*%pi*sqrt(L*C));//resonant frequency in Hz
+Q=(inv(R))*(sqrt(L/C));//Q-factor
+Bw=fr/Q;//bandwidth in Hz
+hf1=fr+Bw;//halfpower freq1 in Hz
+hf2=fr-Bw;//halfpower freq2 in Hz
+mprintf("Thus resonant freq,Q-factor and new halfpower frequencies are %d hz ,%d ,%g hz,%g hz respectively",fr,Q,hf1,hf2);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.41/ex5_41.sce b/1964/CH5/EX5.41/ex5_41.sce new file mode 100755 index 000000000..50162b0ee --- /dev/null +++ b/1964/CH5/EX5.41/ex5_41.sce @@ -0,0 +1,20 @@ +//Chapter-5, Example 5.41, Page 208
+//=============================================================================
+clc
+clear
+//INPUT DATA
+P1=1000;//power1 in watts
+P2=1000;//power2 in watts
+//CALCULATIONS
+//for case(1)
+Pt=P1+P2;//total power in watts
+phi=atan(sqrt(3)*((P2-P1)/(P2+P1))*(180/%pi));//since tan(phi)=sqrt(3)*((P2-P1)/(P2+P1)))
+pf=cos(phi);
+mprintf("Thus power and powerfactor are %d W ,%d respectively\n",Pt,pf);
+//for case(2)
+P3=1000;//power3 in watts
+P4=-1000;//power4 in watts
+Pt1=P3+P4;//total power in watts
+pf1=0;//since we cannot perform division by zero in scilab,it doesn't consider it as infinite quantity to yield 90 degree angle and hence powerfactor 0
+mprintf("Thus power and powerfactor are %d W ,%d respectively",Pt1,pf1);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.42/ex5_42.sce b/1964/CH5/EX5.42/ex5_42.sce new file mode 100755 index 000000000..9f804085f --- /dev/null +++ b/1964/CH5/EX5.42/ex5_42.sce @@ -0,0 +1,17 @@ +//Chapter-5, Example 5.42, Page 209
+//=============================================================================
+clc
+clear
+//INPUT DATA
+V1=400;//voltage in volts
+Z1=(3+((%i)*4));//impedance in ohms
+//CALCULATIONS
+//in star connected system,phase voltage=(line voltage)
+Ep=V1/(sqrt(3));//voltage in volts
+Ip=Ep/Z1;//current in A
+ip1=abs(Ip);//line current in A
+theta=atan((imag(Ip)/real(Ip)));
+Pt=sqrt(3)*V1*ip1*cos(theta);//total power consumed in load in W
+mprintf("Thus total power consumed in load is %f W",Pt);
+//note:for line current the answer given is 46.02A instead of 46.2 A and hence total power consumed changes
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.43/ex5_43.sce b/1964/CH5/EX5.43/ex5_43.sce new file mode 100755 index 000000000..71767c52c --- /dev/null +++ b/1964/CH5/EX5.43/ex5_43.sce @@ -0,0 +1,12 @@ +//Chapter-5, Example 5.43, Page 209
+//=============================================================================
+clc
+clear
+//INPUT DATA
+V1=400;//voltage in volts
+Il=10;//current in A
+//CALCULATIONS
+//in star connected system,phase current=(line current)=I1
+phase_voltage=(V1)/(sqrt(3));//voltage in Volts
+mprintf("Thus phase voltage is %1.0f V",phase_voltage);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.44/ex5_44.sce b/1964/CH5/EX5.44/ex5_44.sce new file mode 100755 index 000000000..ff8d3084b --- /dev/null +++ b/1964/CH5/EX5.44/ex5_44.sce @@ -0,0 +1,21 @@ +//Chapter-5, Example 5.44, Page 209
+//=============================================================================
+clc
+clear
+//INPUT DATA
+Z1=(6-((%i)*8));//impedance1 in ohms
+Z2=(16+((%i)*12));//impedance2 in ohms
+I1=(12+((%i)*16));//current in A
+//CALCULATIONS
+V=I1*Z1;//applied voltage in volts
+I2=V/(Z2);//current in other branch in A
+mprintf("current in other branch in Amps")
+disp(I2);
+I=I1+I2;//total current in A
+mprintf("total current in Amps");
+disp(I);
+i1=abs(I);//magnitude in A
+i2=atan((imag(I)/real(I)));
+P=V*i1*cos(i2);//power consumed in circuit
+mprintf("Thus voltage applied and power consumed are %d V and %d W respectively",V,P);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.45/ex5_45.sce b/1964/CH5/EX5.45/ex5_45.sce new file mode 100755 index 000000000..1cc9d1b49 --- /dev/null +++ b/1964/CH5/EX5.45/ex5_45.sce @@ -0,0 +1,16 @@ +//Chapter-5, Example 5.45, Page 210
+//=============================================================================
+clc
+clear
+//INPUT DATA
+Vl=415;//voltage in volts
+Z=(4+((%i)*6));//impedance in each phase in ohm
+//CALCULATIONS
+Ip=Vl/Z;//current in each phase in A
+ip1=abs(Ip);//magnitude of Ip
+Il=(sqrt(3))*(ip1);//line current in A
+phi=atan((imag(Ip)/real(Ip)))
+P=(sqrt(3))*Vl*Il*cos(phi);//power supplied in W
+mprintf("Thus power supplied is %d W",P);
+//note:the cosfunction of scilab and calculator will differ slightly
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.46/ex5_46.sce b/1964/CH5/EX5.46/ex5_46.sce new file mode 100755 index 000000000..484431dbe --- /dev/null +++ b/1964/CH5/EX5.46/ex5_46.sce @@ -0,0 +1,17 @@ +//Chapter-5, Example 5.46, Page 210
+//=============================================================================
+clc
+clear
+//INPUT DATA
+Vl=400;//voltage in volts
+Il=20;//current in A
+f=50;//freq in hz
+pf=0.3//power factor
+//CALCULATIONS
+Ip=Il/sqrt(3);//phase current in A
+Z=Vl/Ip;//impedance in each phase in ohms
+phi=acos(0.3);//angle in radians
+Zb=Z*(cos(phi)+(%i)*sin(phi));//impedance connected in each phase
+mprintf("Thus impedance connected in each phase in ohms");
+disp(Zb);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.47/ex5_47.sce b/1964/CH5/EX5.47/ex5_47.sce new file mode 100755 index 000000000..79496eecc --- /dev/null +++ b/1964/CH5/EX5.47/ex5_47.sce @@ -0,0 +1,13 @@ +//Chapter-5, Example 5.47, Page 210
+//=============================================================================
+clc
+clear
+//INPUT DATA
+P1=6*10^3;//power in Kw
+P2=-1*10^3;//power in Kw
+//CALCULATIONS
+P=P1+P2;//total power in Kw
+a=atan(sqrt(3)*((P2-P1)/(P2+P1)));
+pf=cos(a);//power factor
+mprintf("Thus power and power factor are %d W and %1.2f respectively",P,pf);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.48/ex5_48.sce b/1964/CH5/EX5.48/ex5_48.sce new file mode 100755 index 000000000..04e40b3a9 --- /dev/null +++ b/1964/CH5/EX5.48/ex5_48.sce @@ -0,0 +1,17 @@ +//Chapter-5, Example 5.48, Page 211
+//=============================================================================
+clc
+clear
+//INPUT DATA
+Z=3-((%i)*4);//impedance in ohms
+Vl=400;//line voltage in volts
+//CALCULATIONS
+Vp=Vl/(sqrt(3));//phase voltage in volts
+Ip=Vp/abs(Z);//phase current in Amps
+//line current(Il)=phase current(Ip)
+Il=Ip;//line current in A
+power_factor=cos(atan(imag(Z)/real(Z)));
+power_consumed=sqrt(3)*Vl*Il*power_factor;
+mprintf("Thus power consumed and power factor are %f W and %1.1f respectively",power_consumed,power_factor);
+//note:answer computed for power consumed in textbook is wrong.Please check the calculations
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.49/ex5_49.sce b/1964/CH5/EX5.49/ex5_49.sce new file mode 100755 index 000000000..fd7c14e05 --- /dev/null +++ b/1964/CH5/EX5.49/ex5_49.sce @@ -0,0 +1,12 @@ +//Chapter-5, Example 5.49, Page 211
+//=============================================================================
+clc
+clear
+//INPUT DATA
+Il=10;//current in Amps
+Vl=400;//line voltage in volts
+//CALCULATIONS
+Vp=Vl/(sqrt(3));//line to neutral voltage
+Ip=Il;//phase current in Amps
+mprintf("Thus line to neutral voltage and phase current are %1.0f V and %d A respectively",Vp,Ip);
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.5/ex5_5.sce b/1964/CH5/EX5.5/ex5_5.sce new file mode 100755 index 000000000..f7b1459b9 --- /dev/null +++ b/1964/CH5/EX5.5/ex5_5.sce @@ -0,0 +1,26 @@ +//Chapter-5, Example 5.5, Page 162
+//=============================================================================
+clc
+clear
+//INPUT DATA
+V=250;//supply voltage in volts
+f=50;//frequency in hz
+Vr=125;//voltage across resistance in volts
+Vc=200;//voltage across coil in volts
+I=5;//current in A
+//CALCULATIONS
+R=Vr/I;//resistance in ohms
+Z1=Vc/I;//impedance of coil in ohms
+//Z1=sqrt((R1)^2+(Xl)^2)------eqn(1)
+Z=V/I;//total impedance in ohms
+//Z=sqrt((R+R1)^2+(Xl)^2)-----eqn(2)
+//solving eqn(1)and eqn(2) we get R1 as follows
+R1=(((Z)^2-(Z1)^2)-(R)^2)/(2*R);//in ohms
+Xl=sqrt((Z1)^2-(R1)^2);//reactance of coil in ohms
+P=((I)^2*R1);//power absorbed by the coil in Watts
+Pt=((I)^2)*(R+R1);//total power in Watts
+mprintf("thus impedance,resistance,reactance are %d ohms,%d ohms,%2.2f ohms respectively\n",Z1,R,Xl);
+mprintf("power absorbed and total power are %3.1f W and %3.1f W respectively",P,Pt)
+
+//=================================END OF PROGRAM======================================================================================================
+
diff --git a/1964/CH5/EX5.50/ex5_50.sce b/1964/CH5/EX5.50/ex5_50.sce new file mode 100755 index 000000000..2ce26b5cc --- /dev/null +++ b/1964/CH5/EX5.50/ex5_50.sce @@ -0,0 +1,17 @@ +//Chapter-5, Example 5.50, Page 211
+//=============================================================================
+clc
+clear
+//INPUT DATA
+P1=2000;//power in watts
+P2=1000;//power in watts
+Vl=400;//line voltage in volts
+//CALCULATIONS
+P=P1+P2;//power in Watts
+a=sqrt(3*(P1-P2)/(P1+P2));
+b=atan(sqrt(a));
+power_factor=cos(b);
+kVA=P/power_factor;
+mprintf("Thus power,power factor and kVA are %d W ,%1.3f and %1.2f respectively",P,power_factor,kVA);
+//note:computed value for powerfactor and kVA in textbook are wrong.Please check the calculations
+//=================================END OF PROGRAM======================================================================================================
diff --git a/1964/CH5/EX5.6/ex5_6.sce b/1964/CH5/EX5.6/ex5_6.sce new file mode 100755 index 000000000..c6b8e62de --- /dev/null +++ b/1964/CH5/EX5.6/ex5_6.sce @@ -0,0 +1,26 @@ +//Chapter-5, Example 5.6, Page 163
+//=============================================================================
+clc
+clear
+//INPUT DATA
+V=240;//supply voltage in volts
+Vl=171;//voltage across inductor in volts
+I=3;//current in A
+phi=37;//power factor laggging in degrees
+//CALCULATIONS
+Zl=Vl/I;//impedance of coil in ohms
+//Zl=sqrt((R1)^2+(Xl)^2)------eqn(1)
+Z=V/I;//total impedance in ohms
+//Z=sqrt((R+R1)^2+(Xl)^2)-----eqn(2)
+pf=cos(phi*%pi/180);//powerfactor
+Rt=pf*Z;//total resistance in ohms//Rt=(R+R1)
+//substituting Rt value in eqn(2) we find Xl as follows
+Xl=sqrt((Z)^2-(Rt)^2);//reactance of inductor in ohms
+//ubstituting Xl value in eqn(1) we find R1 as follows
+R1=sqrt((Zl)^2-(Xl)^2);//resistance of inductor in ohms
+R=Rt-R1;//resistance of resistor in ohms
+mprintf("Thus resistance of resistor is %2.2f ohms\n",R);
+mprintf("Thus resisitance and reactance of inductor are %2.2f ohms and %2.2f ohms respectively",R1,Xl)
+
+//=================================END OF PROGRAM======================================================================================================
+
diff --git a/1964/CH5/EX5.7/ex5_7.sce b/1964/CH5/EX5.7/ex5_7.sce new file mode 100755 index 000000000..73ef8cc9a --- /dev/null +++ b/1964/CH5/EX5.7/ex5_7.sce @@ -0,0 +1,31 @@ +//Chapter-5, Example 5.7, Page 164
+//=============================================================================
+clc
+clear
+//INPUT DATA
+V=100;//supply voltage in volts
+//for COIL A
+f=50;//frequency in Hz
+I1=8;//current in A
+P1=120;//power in Watts
+//for COIL B
+I2=10;//current in A
+P2=500;//power in Watts
+//CALCULATIONS
+//FOR COIL A
+Z1=V/I1;//impedance of coil A in ohms
+R1=P1/(I1)^2;//resistance of coil A in ohms
+X1=sqrt(((Z1)^2-(R1)^2));//reactance of coil A in ohms
+//FOR COIL B
+Z2=V/I2;//impedance of coil B in ohms
+R2=P2/(I2)^2;//resistance of coil B in ohms
+X2=sqrt(((Z2)^2-(R2)^2));//reactance of coil B in ohms
+//When both COILS A and B are in series
+Rt=R1+R2;//total resistance in ohms
+Xt=X1+X2;//total reactance in ohms
+Zt=sqrt((Rt)^2+(Xt)^2);//total impedance in ohms
+It=V/Zt;//current drawn in A
+P=((It)^2)*(Rt);//power taken in watts
+mprintf("Thus current drawn and power taken in watts are %2.2f A and %3.2f W respectively",It,P);
+//=================================END OF PROGRAM======================================================================================================
+
diff --git a/1964/CH5/EX5.8/ex5_8.sce b/1964/CH5/EX5.8/ex5_8.sce new file mode 100755 index 000000000..12340b4fe --- /dev/null +++ b/1964/CH5/EX5.8/ex5_8.sce @@ -0,0 +1,24 @@ +//Chapter-5, Example 5.8, Page 167
+//=============================================================================
+clc
+clear
+//INPUT DATA
+R=100;//resistance in ohms
+C=50*10^-6;//capacitance in F
+V=200;//voltage in Volts
+f=50;//frequency in Hz
+//Z=R-(%i)*(Xc)------>impedance
+Xc=1/(2*%pi*f*C);//capacitive reactance in ohms
+Z=sqrt((R)^2+(Xc)^2);//impedance in ohms
+I=V/Z;//current in A
+pf=R/Z;//power factor ------>cos(phi)---->leading
+phi=acos(0.844);//phase angle in radians
+phi=phi*180/%pi;//phase angle in degrees
+Vr=(I)*(R);//voltage across resistor
+Vc=(I)*(Xc);//votage across capacitor
+mprintf("Thus impedance,current,powerfactor and phaseangle are %3.2f ohms,%1.2f A,%1.3f and %2.2f degrees respectively\n",Z,I,pf,phi);
+mprintf("voltage across resistor and capacitor are %d V and %3.2f V respectively",Vr,Vc)
+
+//=================================END OF PROGRAM======================================================================================================
+
+;
diff --git a/1964/CH5/EX5.9/ex5_9.sce b/1964/CH5/EX5.9/ex5_9.sce new file mode 100755 index 000000000..47d520451 --- /dev/null +++ b/1964/CH5/EX5.9/ex5_9.sce @@ -0,0 +1,19 @@ +//Chapter-5, Example 5.9, Page 169
+//=============================================================================
+clc
+clear
+//INPUT DATA
+phi=40;//phase in degrees
+V=150;//voltage in Volts
+I=8;//current in A
+//the applied voltage lags behind the current .That means the current leads the voltage
+//hence pf is leading
+//CALCULATIONS
+pf=cos(phi*%pi/180);//in degrees--->leading
+//hence it is a capacitive circuit
+pa=V*I*pf;//active power in W
+pr=V*I*sin(phi*%pi/180);//reactive power in VAR
+mprintf("Thus active and reactive power are %3.1f W and %3.1f VAR respectively",pa,pr);
+//=================================END OF PROGRAM======================================================================================================
+
+;
|