summaryrefslogtreecommitdiff
path: root/608/CH26/EX26.05/26_05.sce
blob: 6b0268ef2e5b3549da2a4f0fdb403fb74598bbf9 (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
29
30
31
//Problem 26.05:The circuit shown in Figure 26.9 dissipates an active power of 400 Wand has a power factor of 0.766 lagging. Determine (a) the apparent power, (b) the reactive power, (c) the value and phase of current I, and (d) the value of impedance Z.

//initializing the variables:
Pa = 400; // in Watts
rv = 100; // in volts
thetav = 30; // in degrees
R = 4; // in ohm
pf = 0.766; // power factor

//calculation:
V = rv*cos(thetav*%pi/180) + %i*rv*sin(thetav*%pi/180)
//magnitude of apparent power,S = V*I
S = Pa/pf
phi = acos(pf)
theta = phi*180/%pi // in degrees
//Reactive power Q
Q = S*sin(phi)
//magnitude of current
Imag = S/rv
thetai = thetav - theta
I = Imag*cos(thetai*%pi/180) + %i*Imag*sin(thetai*%pi/180)
//Total circuit impedance ZT
ZT = V/I
//impedance Z
Z = ZT - R

printf("\n\n Result \n\n")
printf("\n (a)apparent power is %.2f VA ",S)
printf("\n (b)reactive power is %.2f var ",Q)
printf("\n (c)the current flowing and Circuit phase angle is %.2f/_%.0f° A ",Imag,thetai)
printf("\n (d)impedance, Z is %.2f + (%.2f)i ohm ",real(Z), imag(Z))