summaryrefslogtreecommitdiff
path: root/1529/CH16/EX16.7/16_07.sce
blob: 183e3de3b2865ab243b02febdf8e7ab7a70aa84e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//Chapter 16, Problem 7, Fig.16.8
clc;
L=0.12;                   //inductance in henry
R=3000;                          //resistance in ohm
C=0.02e-6;                       //capacitance in farad
V=40;                          //voltage
f=5000;                          //frequency
Xl=2*%pi*f*L;                  //inductive reactance
Z1=sqrt(R^2+Xl^2);
Ilr=V/Z1;
phi1=atan(Xl/R);
Xc=1/(2*%pi*f*C);                  //capacitive reactance
Ic=V/Xc;
Ih=Ilr*cos(51.34*%pi/180);
a=-Ilr*sin(51.34*%pi/180);
b=Ic*sin(90*%pi/180);
Iv=a+b;
I=sqrt(Ih^2+(Iv)^2);
phi2=atan(-Iv/Ih);
Z=V/I;                                 //impedance
P=V*I*cos(phi2);
S=V*I;                             //apparent power
Q=V*I*sin(phi2);                    //reactive power
printf("(a) Current in coil = %.3f mA\n Phase angle = %.3f deg (lagging)\n\n",Ilr*1000,phi1*180/%pi);
printf("(b) Current in capacitor, Ic = %.3f mA\n A leading the supply voltage by 90deg\n\n",Ic*1000);
printf("(c) Supply current I = %.3f mA\n phase angle = %.3f deg \n\n",I*1000,-phi2*180/%pi);
printf("(d) Circuit impedance Z = %.3f Kohm\n\n",Z/1000);
printf("(e) Power consumed P = %.3f mW\n\n",P*1000);