Chapter 16: Power in AC Circuits

Example 16.1, Page 329

In [6]:
import math

#Initialisation
V=50                     #Voltage
I=5                     #Current in Ampere r.m.s
phase=30                 #in degrees

#Calculation 
S=V*I                            #apparent power
pf=math.cos(phase*math.pi/180)    #power factor
apf=S*pf                          #active power

#Result
print'(a) Apparent power, S = %d VA'%S
print'(b) Power Factor = %.3f'%pf
print'(c) Active Power, P = %.1f'%apf
(a) Apparent power, S = 250 VA
(b) Power Factor = 0.866
(c) Active Power, P = 216.5

Example 16.2, Page 331

In [16]:
import math

#Initialisation
pf=0.75                          #power factor
S=2000                           #apparent power in VA
V=240                             #Voltage in volts

#Calculation 
apf=S*pf                          #active power
sin=math.sqrt(1-(pf**2)) 
Q=S*sin                           #Reactive Power
I=S*V**-1                          #Current
#Result
print' Apparent Power, P = %d W'%S
print' Active Power, P = %d W'%apf
print' Reactive Power, Q = %d var'%Q
print' Current I = %.2f A'%I
 Apparent Power, P = 2000 W
 Active Power, P = 1500 W
 Reactive Power, Q = 1322 var
 Current I = 8.33 A

Example 16.3, Page 333

In [19]:
import math

#Initialisation
pf=0.75                          #power factor
S=1500                           #apparent power in W
V=240                             #Voltage in volts
P1 = 2000                         #apparent power
P2 = 1500                          #active power
Q = 1322                           #reactive power
I = 8.33                            #current in amp
f=50                                #frequency in hertz

#Calculation 
Xc=V**2/Q                        #reactive capacitance
C=1/(Xc*2*math.pi*f)             #capacitance
I=S*V**-1                             #current

#Result
print' Apparent Power, S = %d W'%S
print' Active Power, P = %d W'%apf
print' Reactive Power, Q = %d var'%Q
print' Current I = %.2f A'%I
 Apparent Power, S = 1500 W
 Active Power, P = 1500 W
 Reactive Power, Q = 1322 var
 Current I = 6.25 A

Example 16.4, Page 335

In [24]:
import math
import numpy as np

#Initialisation
Zo=complex(50,-20)               #complex form of output impedance

#Calculation 
Zl=np.conjugate(Zo)              #complex form of Load impedance

#Result
print'Zl = %s'%Zl
Zl = (50+20j)
In [ ]: