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 /2252/CH8 | |
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 '2252/CH8')
-rwxr-xr-x | 2252/CH8/EX8.1/Ex8_1.sce | 40 | ||||
-rwxr-xr-x | 2252/CH8/EX8.10/Ex8_10.sce | 48 | ||||
-rwxr-xr-x | 2252/CH8/EX8.11/Ex8_11.sce | 33 | ||||
-rwxr-xr-x | 2252/CH8/EX8.12/Ex8_12.sce | 29 | ||||
-rwxr-xr-x | 2252/CH8/EX8.13/Ex8_13.sce | 31 | ||||
-rwxr-xr-x | 2252/CH8/EX8.2/Ex8_2.sce | 38 | ||||
-rwxr-xr-x | 2252/CH8/EX8.3/Ex8_3.sce | 44 | ||||
-rwxr-xr-x | 2252/CH8/EX8.4/Ex8_4.sce | 47 | ||||
-rwxr-xr-x | 2252/CH8/EX8.5/Ex8_5.sce | 36 | ||||
-rwxr-xr-x | 2252/CH8/EX8.6/Ex8_6.sce | 27 | ||||
-rwxr-xr-x | 2252/CH8/EX8.7/Ex8_7.sce | 33 | ||||
-rwxr-xr-x | 2252/CH8/EX8.8/Ex8_8.sce | 15 | ||||
-rwxr-xr-x | 2252/CH8/EX8.9/Ex8_9.sce | 26 |
13 files changed, 447 insertions, 0 deletions
diff --git a/2252/CH8/EX8.1/Ex8_1.sce b/2252/CH8/EX8.1/Ex8_1.sce new file mode 100755 index 000000000..b23c308bf --- /dev/null +++ b/2252/CH8/EX8.1/Ex8_1.sce @@ -0,0 +1,40 @@ +
+function[r,theta]=rect2pol(A)
+ x=real(A)
+ y=imag(A)
+ r=sqrt(x^2+y^2)
+ theta=atand(y/x)
+endfunction
+function[z]=pol2rect(r,theta)
+ x=r*cos(theta*%pi/180)
+ y=r*sin(theta*%pi/180)
+ z=x+y*%i
+endfunction
+function[r]=mag(A)
+ x=real(A)
+ y=imag(A)
+ r=sqrt(x^2+y^2)
+endfunction
+//calculating current in each branch and its angle of lag or lead
+V=230
+f=50
+//for branch A
+Ra=10//resistance
+L=.04//inductance
+Xl=2*%pi*f*L//inductive reactance
+Za=sqrt(Ra^2+Xl^2)//impedance
+Ia=V/Za
+phi_a=atand(Xl/Ra)
+//for branch B
+R=25//resistance
+Zb=R//impedance
+Ib=V/Zb
+phi_b=0
+mprintf("Current in branch A, Ia=%f A lagging the applied voltage by %f degrees\nCurrent in branch B, Ib=%f A in phase with applied voltage\n",Ia, phi_a,Ib)
+//calculating current drawn by the circuit
+Ia=pol2rect(Ia,phi_a)
+Ib=pol2rect(Ib,0)
+I=Ia+Ib
+mprintf("Total current drawn by the circuit=%f A\n", mag(I))
+phi=atand(imag(I)/real(I))
+mprintf("Phase angle of combination=%f degrees and power factor =%f lagging",phi,cos(phi*%pi/180))
diff --git a/2252/CH8/EX8.10/Ex8_10.sce b/2252/CH8/EX8.10/Ex8_10.sce new file mode 100755 index 000000000..f4e72beb1 --- /dev/null +++ b/2252/CH8/EX8.10/Ex8_10.sce @@ -0,0 +1,48 @@ +
+function[r,theta]=rect2pol(A)
+ x=real(A)
+ y=imag(A)
+ r=sqrt(x^2+y^2)
+ theta=atand(y/x)
+endfunction
+function[z]=pol2rect(r,theta)
+ x=r*cos(theta*%pi/180)
+ y=r*sin(theta*%pi/180)
+ z=x+y*%i
+endfunction
+function[r]=mag(A)
+ x=real(A)
+ y=imag(A)
+ r=sqrt(x^2+y^2)
+endfunction
+j=%i
+//calculating impedance of overall circuit
+Za=2+0*j//impedance of branch A
+Zb=3+4*j//impedance of branch B
+Zab=Za*Zb/(Za+Zb)//equivalent impedances of branches A and B
+Zc=2-2*j
+Z1=Zab*Zc/(Zab+Zc)//equivalent impedance of parallel circuit
+Zd=1+1*j//impedance of branch D
+Z=Z1+Zd
+[Z theta]=rect2pol(Z)
+mprintf("Total impedance of overall circuit=%f ohm at angle %f degrees\n", Z,theta)
+//calculating current taken by overall circuit
+V=110//voltage applied to the overall circuit
+I=V/Z
+mprintf("Current taken by the overall circuit=%f A\n", I)
+//Calculating power consumed in each branch and total power consumed
+Id=I//current in the series branch
+Rd=1//resistance of branch D
+Pd=I^2*Rd//power consumed by branch D
+Ia=I*mag(Z1)/mag(Za)//current in branch A
+Ib=I*mag(Z1)/mag(Zb)//current in branch B
+Ic=I*mag(Z1)/mag(Zc)//current in branch C
+Ra=2
+Pa=Ia^2*Ra
+Rb=3
+Pb=Ib^2*Rb
+Rc=2
+Pc=Ic^2*Rc
+P=Pa+Pb+Pc+Pd
+mprintf("Power consumed by branch A=%f W,\nPower consumed by branch B=%f W,\nPower consumed by branch C=%f W,\nPower consumed by branch D=%f W,\nTotal power consumed=%f W",Pa,Pb,Pc,Pd,P)
+//The answers vary from the textbook due to round off error
diff --git a/2252/CH8/EX8.11/Ex8_11.sce b/2252/CH8/EX8.11/Ex8_11.sce new file mode 100755 index 000000000..84e1df88b --- /dev/null +++ b/2252/CH8/EX8.11/Ex8_11.sce @@ -0,0 +1,33 @@ +
+function[r,theta]=rect2pol(A)
+ x=real(A)
+ y=imag(A)
+ r=sqrt(x^2+y^2)
+ theta=atand(y/x)
+endfunction
+function[r]=mag(A)
+ x=real(A)
+ y=imag(A)
+ r=sqrt(x^2+y^2)
+endfunction
+j=%i
+//using Maxwell's mesh analysis
+//refer Fig.8.14 in the textbook
+//considering mesh FDCEF, (18+8*j)*I1-(10+8*j)*I2=24
+//considering mesh ABCDA, (10+8*j)*I1-(14+10*j)*I2=0
+a=[18+8*j -(10+8*j);10+8*j -(14+10*j)]
+b=[24;0]
+x=inv(a)*b
+I1=x(1,1)
+I2=x(2,1)
+[I2 theta]=rect2pol(I2)
+mprintf("By Maxwell Mesh Analysis, current in branch AB of the circuit shown is %f A, lagging the applied voltage by %f degrees\n",I2, -theta)
+//using thevenin's theorem
+//refer Fig.8.14(a),(b) and (c)
+Zth=8*(10+8*j)/(8+10+8*j)+(-4*j)//thevenin's impedance
+//for calculating the equivalent Thevenin's voltage Vth, I1 be the current flowing in the branch CD
+I1=24/(8+10+8*j)
+Vth=I1*(10+8*j)//equivalent thevenin's voltage
+I=Vth/((4+6*j+Zth))
+[I theta]=rect2pol(I)
+mprintf("By Thevenin Theorem, current in the branch AB is %f A lagging the voltage by %f degrees\n",I,-theta)
diff --git a/2252/CH8/EX8.12/Ex8_12.sce b/2252/CH8/EX8.12/Ex8_12.sce new file mode 100755 index 000000000..b95c37a56 --- /dev/null +++ b/2252/CH8/EX8.12/Ex8_12.sce @@ -0,0 +1,29 @@ +
+function[r]=mag(A)
+ x=real(A)
+ y=imag(A)
+ r=sqrt(x^2+y^2)
+endfunction
+j=%i
+V=200
+//calculating supply frequency
+L=.1//inductance of branch A
+//Xa=2*%pi*f*.1
+Ra=10//resistance of branch A
+C=150D-6//capacitance of branch B
+//Xb=1/(2*%pi*f*150D-6)
+Rb=0//resistance of branch B
+//Zb=-Xb*j
+//total current I=Ia+Ib, total current is in phase with voltage-->j component of I=0
+//on solving for f,
+f=sqrt((V*2*%pi*L)*(1/(2*%pi*C))/V-Ra^2)/(2*%pi*L)
+mprintf("Frequency of the supply which is also the resonant frequency, f=%f Hz\n", f)
+Xa=2*%pi*f*.1
+Za=Ra+Xa*j
+Ia=V/Za
+Xb=1/(2*%pi*f*150D-6)
+Zb=-Xb*j
+Ib=V/Zb
+I=Ia+Ib
+mprintf("Total current drawn by the circuit=%f A", mag(I))
+//The answers vary from the textbook due to round off error
diff --git a/2252/CH8/EX8.13/Ex8_13.sce b/2252/CH8/EX8.13/Ex8_13.sce new file mode 100755 index 000000000..cb2856476 --- /dev/null +++ b/2252/CH8/EX8.13/Ex8_13.sce @@ -0,0 +1,31 @@ +
+function[r,theta]=rect2pol(A)
+ x=real(A)
+ y=imag(A)
+ r=sqrt(x^2+y^2)
+ theta=atand(y/x)
+endfunction
+function[r]=mag(A)
+ x=real(A)
+ y=imag(A)
+ r=sqrt(x^2+y^2)
+endfunction
+j=%i
+//calculating branch currents
+Z1=15+12*j//impedance of branch 1
+I1=200/Z1
+phi1=atand(12/15)
+Z2=25-17*j//impedance of branch 2
+I2=200/Z2
+phi2=atand(17/25)
+mprintf("I1=%f A at angle of %f degrees\nI2=%f A at angle of %f degrees\n",mag(I1),phi1,mag(I2),phi2)
+//calculating total current
+I=I1+I2
+[I phi]=rect2pol(I)
+mprintf("Total current drawn by the circuit I=%f A, angle of lag=%f degrees and power factor=%f lagging\n",I,-phi,cos(phi*%pi/180))
+//power factor is to be raised to unity-a capacitor has to be connected in parallel
+//at unity power factor, imaginary part of I must be zero
+Xc=-200/imag(I1+I2)
+f=40
+C=1/(2*%pi*f*Xc)
+mprintf("If power factor is to be raised to unity-a capacitor of %f microF has to be connected in parallel to given circuit", C*1D+6)
diff --git a/2252/CH8/EX8.2/Ex8_2.sce b/2252/CH8/EX8.2/Ex8_2.sce new file mode 100755 index 000000000..d20d9c86c --- /dev/null +++ b/2252/CH8/EX8.2/Ex8_2.sce @@ -0,0 +1,38 @@ +
+function[r,theta]=rect2pol(A)
+ x=real(A)
+ y=imag(A)
+ r=sqrt(x^2+y^2)
+ theta=atand(y/x)
+endfunction
+function[z]=pol2rect(r,theta)
+ x=r*cos(theta*%pi/180)
+ y=r*sin(theta*%pi/180)
+ z=x+y*%i
+endfunction
+function[r]=mag(A)
+ x=real(A)
+ y=imag(A)
+ r=sqrt(x^2+y^2)
+endfunction
+//solving part (i)
+Xa=2*%pi*50*.1//inductive reactance of branch A
+Za=sqrt(50^2+Xa^2)
+Ia=230/Za
+phi_a=atand(Xa/50)//angle of lag of Ia w.r.t. applied voltage
+Ia=pol2rect(Ia,-phi_a)
+Xb=1/(2*%pi*50*100D-6)//capacitive reactance of branch B
+Zb=sqrt(45^2+Xb^2)
+Ib=230/Zb
+phi_b=atand(Xb/45)//angle of lead of Ib w.r.t. applied voltage
+Ib=pol2rect(Ib,phi_b)
+I=Ia+Ib
+mprintf("Current drawn by the circuit=%f A\n", mag(I))
+//calculating power factor
+phi=atan(imag(I)/real(I))//phase angle of the circuit
+pf=cos(phi)
+mprintf("Power factor of the circuit=%f(leading)\n",pf)
+//calculating power taken by the parallel circuit
+P=230*mag(I)*pf
+mprintf("Power taken by the parallel circuit=%d W", round(P))
+//The answers vary from the textbook due to round off error
diff --git a/2252/CH8/EX8.3/Ex8_3.sce b/2252/CH8/EX8.3/Ex8_3.sce new file mode 100755 index 000000000..f55997510 --- /dev/null +++ b/2252/CH8/EX8.3/Ex8_3.sce @@ -0,0 +1,44 @@ +
+
+function[r,theta]=rect2pol(A)
+ x=real(A)
+ y=imag(A)
+ r=sqrt(x^2+y^2)
+ theta=atand(y/x)
+endfunction
+function[z]=pol2rect(r,theta)
+ x=r*cos(theta*%pi/180)
+ y=r*sin(theta*%pi/180)
+ z=x+y*%i
+endfunction
+function[r]=mag(A)
+ x=real(A)
+ y=imag(A)
+ r=sqrt(x^2+y^2)
+endfunction
+//calculating current in coil A
+Xa=2*%pi*50*.02//inductive reactance of coil A
+Za=sqrt(12^2+Xa^2)
+Ia=200/Za
+phi_a=atand(Xa/12)//angle of lag of Ia w.r.t. applied voltage
+mprintf("Ia=%f A, lagging the applied voltage by %f degrees\n", Ia, phi_a)
+//calculating current in coil B
+Xb=2*%pi*50*.03//inductive reactance of coil B
+Zb=sqrt(6^2+Xb^2)
+Ib=200/Zb
+phi_b=atand(Xb/6)//angle of lag of Ib w.r.t. applied voltage
+mprintf("Ib=%f A, lagging the applied voltage by %f degrees\n", Ib, phi_b)
+//calculating total current in the circuit
+Ia=pol2rect(Ia,-phi_a)
+Ib=pol2rect(Ib,-phi_b)
+I=Ia+Ib
+mprintf("Total current drawn by circuit=%f A lagging the applied voltage by %f degrees\n", mag(I),-atand(imag(I)/real(I)))
+//calculating total current when additional circuit is added
+Xc=1/(2*%pi*50*120D-6)//capacitive reactance
+Zc=sqrt(15^2+Xc^2)
+Ic=200/Zc
+phi_c=atand(Xc/15)//angle of lag of Ic w.r.t. applied voltage
+Ic=pol2rect(Ic,phi_c)
+I=Ia+Ib+Ic
+phi=atand(imag(I)/real(I))
+mprintf("For the new circuit, total current drawn=%f A lagging the applied voltage by %f degrees, i.e. pf=%f(lagging)", mag(I),-phi,cos(phi*%pi/180))
diff --git a/2252/CH8/EX8.4/Ex8_4.sce b/2252/CH8/EX8.4/Ex8_4.sce new file mode 100755 index 000000000..8f48fa02f --- /dev/null +++ b/2252/CH8/EX8.4/Ex8_4.sce @@ -0,0 +1,47 @@ +
+function[r,theta]=rect2pol(A)
+ x=real(A)
+ y=imag(A)
+ r=sqrt(x^2+y^2)
+ theta=atand(y/x)
+endfunction
+function[z]=pol2rect(r,theta)
+ x=r*cos(theta*%pi/180)
+ y=r*sin(theta*%pi/180)
+ z=x+y*%i
+endfunction
+function[r]=mag(A)
+ x=real(A)
+ y=imag(A)
+ r=sqrt(x^2+y^2)
+endfunction
+//for coil A
+Ia=5//current taken
+Va=110//voltage applied
+Pa=300//power dissipated
+Ra=Pa/Ia^2
+Za=Va/Ia
+Xa=sqrt(Za^2-Ra^2)
+//for coil B
+Ib=5//current taken
+Vb=110//voltage applied
+Pb=400//power dissipated
+Rb=Pb/Ib^2
+Zb=Vb/Ib
+Xb=sqrt(Zb^2-Rb^2)
+//calculating current drawn and power factor when coils conected in series
+R=Ra+Rb
+Xl=Xa+Xb
+Z=sqrt(R^2+Xl^2)//impedance of series circuit
+I=Va/Z
+pf=R/Z
+mprintf("Current in the series circuit=%f A at pf=%f lagging\n", I,pf)
+//calculating current drawn and power factor when coils conected in parallel
+Ia=pol2rect(Ia,-acosd(Ra/Za))
+Ib=pol2rect(Ib,-acosd(Rb/Zb))
+I=Ia+Ib
+phi=atan(imag(I)/real(I))
+mprintf("Total current drawn by the parallel circuit=%f A at pf=%f(lagging)", mag(I),cos(phi))
+
+
+
diff --git a/2252/CH8/EX8.5/Ex8_5.sce b/2252/CH8/EX8.5/Ex8_5.sce new file mode 100755 index 000000000..a4933df80 --- /dev/null +++ b/2252/CH8/EX8.5/Ex8_5.sce @@ -0,0 +1,36 @@ +
+function[r]=mag(A)
+ x=real(A)
+ y=imag(A)
+ r=sqrt(x^2+y^2)
+endfunction
+j=%i
+//solving part (i)
+//for coil 1
+Z1=5+2*%pi*50*.03*j//impedance
+Y1=1/Z1
+G1=real(Y1)
+B1=imag(Y1)
+mprintf("For coil 1,\nConductance=%f mho\nSuspectance=%f mho\nAdmittance=%f mho\n", G1,-B1,mag(Y1))
+//for coil 2
+Z2=3+2*%pi*50*.04*j//impedance
+Y2=1/Z2
+G2=real(Y2)
+B2=imag(Y2)
+mprintf("For coil 2,\nConductance=%f mho\nSuspectance=%f mho\nAdmittance=%f mho\n", G2,-B2,mag(Y2))
+//solving part(ii)
+Y=Y1+Y2//total admittance
+I=200*Y
+phi=atan(imag(I)/real(I))
+pf=cos(phi)
+mprintf("Total current drawn by the circuit=%f A at pf of %f(lagging)\n",mag(I),pf)
+//calculating power
+P=200*mag(I)*pf
+mprintf("Power absorbed by the circuit=%f W\n",P)
+//solving part(iv)
+Z=1/Y
+R=real(Z)
+Xl=imag(Z)
+L=Xl/(2*%pi*50)
+mprintf("R=%f ohm, L=%f H of single coil which will take the same current and power as taken by the original circuit",R,L)
+//answers vary from the textbook due to round off error
diff --git a/2252/CH8/EX8.6/Ex8_6.sce b/2252/CH8/EX8.6/Ex8_6.sce new file mode 100755 index 000000000..486ff171a --- /dev/null +++ b/2252/CH8/EX8.6/Ex8_6.sce @@ -0,0 +1,27 @@ +
+function[r]=mag(A)
+ x=real(A)
+ y=imag(A)
+ r=sqrt(x^2+y^2)
+endfunction
+j=%i
+//voltage V is taken as reference phasor
+Z1=5+10*j//impedance of inductive branch
+Z2=10-15*j//impedance of capacitive branch
+I=20//total current
+V=I/mag(1/Z1+1/Z2)
+mprintf("Applied voltage=%f V\n",V)
+//calculating power factor of total current
+I1=V/Z1
+I2=V/Z2
+I=I1+I2
+phi=atan(imag(I)/real(I))//angle of lag
+pf=cos(phi)
+mprintf("Power factor of the total circuit=%f(lagging)\n",pf)
+//calculating power taken by each branch
+R1=5//resistance of branch 1
+P1=mag(I1)^2*R1
+R2=10//resistance of branch 2
+P2=mag(I2)^2*R2
+mprintf("Power taken by inductive branch=%f W\nPower taken by capacitive branch=%f W", P1,P2)
+//answers vary from the textbook due to round off error
diff --git a/2252/CH8/EX8.7/Ex8_7.sce b/2252/CH8/EX8.7/Ex8_7.sce new file mode 100755 index 000000000..77e86860a --- /dev/null +++ b/2252/CH8/EX8.7/Ex8_7.sce @@ -0,0 +1,33 @@ +
+function[z]=pol2rect(r,theta)
+ x=r*cos(theta*%pi/180)
+ y=r*sin(theta*%pi/180)
+ z=x+y*%i
+endfunction
+function[r]=mag(A)
+ x=real(A)
+ y=imag(A)
+ r=sqrt(x^2+y^2)
+endfunction
+//for coil A
+Va=10//voltage applied
+Ia=2//current taken
+pf=.8//lagging power factor
+Ia=pol2rect(Ia,-acosd(pf))
+Za=Va/Ia//impedance
+//for coil B
+Vb=5//voltage applied
+Ib=2//current taken
+pf=.7//lagging power factor
+Ib=pol2rect(2,-acosd(pf))
+Zb=Vb/Ib//impedance
+//calculating voltage required to produce a current of 2 A with A and B in series
+I=2
+Z=Za+Zb//impedance of series circuit
+V=I*mag(Z)
+mprintf("Voltage required to produce a current of 2 A with A and B in series=%f V\n", V)
+//calculating voltage required to produce a current of 2 A with A and B in parallel
+Z=Za*Zb/(Za+Zb)//impedance of parallel circuit
+V=I*mag(Z)
+mprintf("Voltage required to produce a current of 2 A with A and B in parallel=%f V\n", V)
+//The answers vary from the textbook due to round off error
diff --git a/2252/CH8/EX8.8/Ex8_8.sce b/2252/CH8/EX8.8/Ex8_8.sce new file mode 100755 index 000000000..8e2ee65eb --- /dev/null +++ b/2252/CH8/EX8.8/Ex8_8.sce @@ -0,0 +1,15 @@ +
+//calculating value of unknown capacitance
+V=110//applied voltage
+R=30//resistance of resistive circuit
+Ir=V/R//Ohm's Law
+I=5//total current drawn
+Xc=V/sqrt(I^2-Ir^2)
+f=50//frequency of supply
+C=1/(2*%pi*f*Xc)
+mprintf("Capacitance=%f microF\n",C*10^6)
+//calculating unknown frequency
+I=4//total current drawn
+f=sqrt(I^2-Ir^2)/(V*2*%pi*C)
+mprintf("To decrease the total current to 4 A, the frequency of the supply should be adjusted to %f Hz",f)
+//The answers vary from the textbook due to round off error
diff --git a/2252/CH8/EX8.9/Ex8_9.sce b/2252/CH8/EX8.9/Ex8_9.sce new file mode 100755 index 000000000..b3664b036 --- /dev/null +++ b/2252/CH8/EX8.9/Ex8_9.sce @@ -0,0 +1,26 @@ +
+function[r]=mag(A)
+ x=real(A)
+ y=imag(A)
+ r=sqrt(x^2+y^2)
+endfunction
+
+j=%i
+R1=12//resistance of series circuit
+X1=2*%pi*50*.025//inductive reactance of the series circuit
+Z1=R1+X1*j
+pf1=R1/mag(Z1)//power factor of the series circuit(lagging)
+//the impedances and power factor of the parallel circuit are to be same as that of series circuit
+//on solving, we get, R*Xl/sqrt(R^2+Xl^2)=mag(Z1); Xl/(sqrt(R^2+Xl^2))=pf1
+R=mag(Z1)/pf1
+//solving for Xl
+Xl=pf1*R/sqrt(1-pf1^2)
+L=Xl/(2*%pi*50)
+mprintf("Resistance=%f ohm; Inductance=%f H\n",R,L)
+//calculating current in each case
+V=230//applied voltage
+I1=V/mag(Z1)
+mprintf("Current in series circuit=%f A\n",I1)
+I2=V/mag(Z1)
+mprintf("Current drawn by parallel circuit=%f A",I2)
+//The answers vary from the textbook due to round off error
|