Chapter 23 : Alternating Current Circuits

Example No. 23_1 Page No. 715

In [3]:
from math import sqrt,atan,pi
# A 27-Ohms R is in series with 54 Ohms of Xl and 27 Ohms of Xc. The applied voltage Vt is 50 mV. Calculate ZT, I, and Theta z.

# Given data

R = 27.#         # Resistance=27 Ohms
Xl = 54.#        # Inductive reactance=54 Ohms
Vt = 50.*10**-3#  # Applied voltage=100 Volts
Xc = 27.#        # Capacitive reactance=27 Ohms

nXl = Xl-Xc#    # Net Inductive reactance
R1 = R*R#
nXl1 = nXl*nXl#

Zt = sqrt(R1+nXl1)#
print 'Total Impedence Zt = %0.2f Ohms'%Zt

I = (Vt/Zt)#
print  'Current I = %0.2f Ampers'%I
print 'i.e 1.31 mAmps'

Oz = atan(Xc/R)*180/pi
print  'Theta z = %0.2f Degree'%Oz
Total Impedence Zt = 38.18 Ohms
Current I = 0.00 Ampers
i.e 1.31 mAmps
Theta z = 45.00 Degree

Example No. 23_2 Page No. 717

In [4]:
from math import atan,pi,sqrt
# The following branch currents are supplied from a 50-mV source: Ir=1.8 mA# Il=2.8 mA# Ic=1 mA. Calculate It, Zeq, and Theta I.

# Given data

Va = 50.*10**-3#      # Applied voltage=50m Volts
Ir = 1.8*10**-3#     # Ir=1.8 mAmps
Il = 2.8*10**-3#     # Ir=2.8 mAmps
Ic = 1.*10**-3#       # Ic=1 mAmps

nI = Il-Ic#         # net current
Ir1 = Ir*Ir#
nI1 = nI*nI#

It = sqrt(Ir1+nI1)#
print 'The Total Current It = %0.2f Amps'%It
print 'i.e 2.55 mAmps'

Zeq = Va/It#
print 'The Equivqlent Impedence Zeq = %0.2f Ohms'%Zeq
print 'approx 19.61 Ohms'

Oz = atan(-(nI/Ir))*180/pi
print 'Theta z = %0.2f Degree'%Oz
The Total Current It = 0.00 Amps
i.e 2.55 mAmps
The Equivqlent Impedence Zeq = 19.64 Ohms
approx 19.61 Ohms
Theta z = -45.00 Degree