# CHAPTER02:SINGLE PHASE AC CIRCUITS¶

## Example E01 : Pg 59¶

In :
                # EXAMPLE-2-1              EXAMPLE-59
t=0.5;
x=115.;
z=310.6                  # time
AV=0.2*x;  # average value
RMS=(1./10.)*z;                         # rms value
F=RMS/AV;                          # form factor
PF=60./RMS;                     # peak  factor
S=60./(2.)**0.5;                      # rms value of  sine wave
print '%s %.2f %s' %('i)R.M.S =',RMS,' V')
print '%s %.2f %s' %('i) average value = ',AV,' V')
print '%s %.2f' %('i)orm factor = ',F)
print '%s %.2f' %('i peak factor =',PF)
print '%s %.2f %s' %('i)sine wave  =',S,' V')

i)R.M.S = 31.06  V
i) average value =  23.00  V
i)orm factor =  1.35
i peak factor = 1.93
i)sine wave  = 42.43  V


## Example E03 : Pg 59¶

In :
     # EXAMPLE 2-3  PG NO-59-60
Vm=1.;
AV1=0.318*Vm;                # avegare value
RMS1=0.5*Vm;                  # RMS value
FF1=RMS1/AV1;                     # Form Factor
PF1=Vm/RMS1;                       # Peak Factor
AV2=0.637*Vm;                  # Average    value
RMS2=0.707*Vm;                  # RMS  value
FF2=RMS2/AV2;                    # Form Factor
PF2=Vm/RMS2;                      # Peak Factor
print'i)Form Factor   =  ',round(FF1,2)
print'i)peak Factor   =  ',round(PF1,2)
print'i)Form Factor   =  ',round(FF2,2)
print'i)PEAK Factor   =  ',round(PF2,2)

i)Form Factor   =   1.57
i)peak Factor   =   2.0
i)Form Factor   =   1.11
i)PEAK Factor   =   1.41


## Example E07 : Pg 64¶

In :
                     # EXAMPLE  2-7       PG NO 64-65
V1=24.15+1j*6.47;                 # VOLTAGE
V2=7.5+1j*12.99;                    # VOLTAGE
print'i)ADITION  is in rectangular  form =  ',X,' V'
X1=V1-V2;                      # subsraction     of v1&v2
print'i)substraction  is in rectangular  form =  ',X1,' V'

i)ADITION  is in rectangular  form =   (31.65+19.46j)  V
i)substraction  is in rectangular  form =   (16.65-6.52j)  V


## Example E08 : Pg 65¶

In :
                           # EXAMPLE 2-8        PG NO-65
A=3.+1j*1;
B=4.+1j*3;
Y=A-B;                     # SUBSTRACTION
Z=A*B;                     # MULTIPLICATION
U=A/B;                     # DIVISION
V=A**4.;
P=B**(1./3.);
print'ii)   ADDITION (A+B) is  in polar form  =  ',X,'ohm'
print'ii)   SUBSTRACTION (A-B) is in polar form   =  ',Y,'ohm'
print'ii)   MULTIPLICATION (A*B) is  in polar form  =  ',Z,'ohm'
print'ii)   DIVISION (A/B) is  is in polar form  =  ',U,'ohm'
print'ii)   SQUARE  OF A(A**4) is  in polar form  =  ',V,'ohm'
print'ii)   CUBE ROOT OF B (B**(1/3)) is  in polar form  =  ',P,'ohm'

ii)   ADDITION (A+B) is  in polar form  =   (7+4j) ohm
ii)   SUBSTRACTION (A-B) is in polar form   =   (-1-2j) ohm
ii)   MULTIPLICATION (A*B) is  in polar form  =   (9+13j) ohm
ii)   DIVISION (A/B) is  is in polar form  =   (0.6-0.2j) ohm
ii)   SQUARE  OF A(A**4) is  in polar form  =   (28+96j) ohm
ii)   CUBE ROOT OF B (B**(1/3)) is  in polar form  =   (1.67078820069+0.363984239564j) ohm


## Example E09 : Pg 65¶

In :
# EXAMPLE 2-9           PG NO-65
from math import cos
t1=0.0025;                              # time
t2=0.005;                               # time
t3=0.01;                                # time
i1=10.*314.16*cos(314.16*t1);                     # i1 is derivatives of i wrt t;
print'i)  Current  = ',round(i1,2),'A'
i2=10*314.16*cos(314.16*t2);
print'ii)  Current  = ',round(i2,2),'A'
i3=10*314.16*cos(314.16*t3);
print'iii)  Current  = ',round(i3,2),'A'

i)  Current  =  2221.44 A
ii)  Current  =  -0.01 A
iii)  Current  =  -3141.6 A


## Example E10 : Pg 66¶

In :
          # EXAMPLE 2-10  PG NO-66
I1=5;                  # current
I2=7.071;                # current
RMS=(I1*I1+I2*I2)**0.5;          # resultant       rms value
print '%s %.2f %s' %('i) RMS   =  ',RMS,'A ')

i) RMS   =   8.66 A


## Example E11 : Pg 66¶

In :
             # EXAMPLE 2-11     PG NO-66
import math
W=314.16;
PV=14.14;                  # PEAK VALUE
t=0.0025;                  # TIME
i=PV*math.sin(W*t);            # CURRENT
T=0.0175;              # TOTAL TIME
I=PV*math.sin(W*T);
print '%s %.2f' %('ii)   CURRNT (i) is    =  ',i);
print '%s %.2f' %('ii)   CURRNT (I) is    =  ',I);

ii)   CURRNT (i) is    =   10.00
ii)   CURRNT (I) is    =   -10.00


## Example E12 : Pg 66¶

In :
                 # EXAMPLE 2-12         PG NO-66-67
import math
W1=80*math.pi;              # womega
W2=100*math.pi;
PV=14.14;            # peak value
t1=0.025;             # time
t2=0.05;
t3=0.075;
I1=PV*(math.cos(80.*math.pi*t1)+math.cos(100.*math.pi*t1));                  # current
I2=PV*(math.cos(80.*math.pi*t2)+math.cos(100.*math.pi*t2));                   # current
I3=PV*(math.cos(80.*math.pi*t3)+math.cos(100.*math.pi*t3));                   # current
print '%s %.2f %s' %('ii)   CURRNT (I) is    =  ',I1,'  A');
print '%s %.2f %s' %('ii)   CURRNT (I) is    =  ',I2,' A  ');
print '%s %.2f %s' %('ii)   CURRNT (I) is    =  ',I3,'  A ');

ii)   CURRNT (I) is    =   14.14   A
ii)   CURRNT (I) is    =   0.00  A
ii)   CURRNT (I) is    =   14.14   A


## Example E13 : Pg 67¶

In :
                   # EXAMPLE 2-13        PG NO-67
T=20.*10.**-3.;                 # TIME PERIOD
Ta=300.*10.**-3.;              # TOTAL AREA
A=(Ta)/T;                  # AVERAGE VALUE
print '%s %.2f %s' %('ii)   AVERAGE VALUE (A) is    =  ',A,'  V ');

ii)   AVERAGE VALUE (A) is    =   15.00   V


## Example E14 : Pg 67¶

In :
               # EXAMPLE 2-14       PG NO-67
Ta=5.;                       # TOTAL  AREA
T=20.*10.**-3.;                # TIME
Av=Ta/T;                  # AVERAGE  VALUE
Ev=(Av)**0.5;              # EFFECTIVE VALUE
FF=Ev/15.;                  # FORM FACTOR
print '%s %.2f' %('ii)   AVERAGE VALUE (Av) is    =  ',Av);
print '%s %.2f %s' %('ii)   EFFECTIVE VALUE (Ev) is    =  ',Ev,'V');
print '%s %.2f' %('ii)   FORM FACTOR (FF) is    =  ',FF);

ii)   AVERAGE VALUE (Av) is    =   250.00
ii)   EFFECTIVE VALUE (Ev) is    =   15.81 V
ii)   FORM FACTOR (FF) is    =   1.05


## Example E15 : Pg 68¶

In :
import math
Eav=50.;                    # in volts
T=2;                     # time
E=((1./T)*2500.*2.66)**0.5;                # energy           # integrate('0','t',2)=2.66
print '%s %.2f %s' %('i) Energy  = ',E,'V ');
FF=E/Eav;                                   # form factor
print '%s %.2f' %('i) Form Factor  = ',FF);

i) Energy  =  57.66 V
i) Form Factor  =  1.15


## Example E16 : Pg 68¶

In :
                          # EXAMPLE 2-16          PG NO 68
import math
Eav=2.5;                  # AVERAGE ENERGY
E=8.333;
print '%s %.2f %s' %('i)   ENERGY (E) is    =  ',math.sqrt(E),' V  ');
FF=math.sqrt(E)/Eav;
print '%s %.2f' %('ii)   Form  Factor (FF) is    =  ',FF);

i)   ENERGY (E) is    =   2.89  V
ii)   Form  Factor (FF) is    =   1.15


## Example E17 : Pg 69¶

In :
                  # EXAMPLE 2-17       PG NO-69
I1=10.;                     # CURRENT
I2=-4.;
I3=2.;
I4=0;
T=8.;                   # TIME
Irms=(((I1*I1*2)+(I2*I2*2)+(I3*I3*2)+(I4*I4*2))/T)**0.5;          # RMS
print '%s %.2f %s' %('ii)   CURRENT R.M.S (Irms) is    =  ',Irms,'  A ');

ii)   CURRENT R.M.S (Irms) is    =   5.48   A


## Example E20 : Pg 70¶

In :
                          # EXAMPLE 2-20                PG NO-70
import math
T=0.03;                    # TIME
#  (1000*integrate('0','t',0.01,0.01))**2=-0.333
# 100*integrate('0.01','t',0.02,0.02)=-1
# integrate('0.02', '',0.03,0.03)]=0
V=(-0.33-1.)/T;
print '%s %.2f %s' %('i) Voltage  (V) is   =  ',V,' V ');
print '%s %.2f %s' %('i) Square Root of Voltage  (V) is   =  ',math.sqrt(-V),' seconds ');

i) Voltage  (V) is   =   -44.33  V
i) Square Root of Voltage  (V) is   =   6.66  seconds


## Example E21 : Pg 70¶

In :
                       # EXAMPLE 2-21                PG NO-70
import math
T=0.05;                    # TIME
#  (400*integrate('0','t',0.025,))**2=--0.8333
# 100*integrate('0.01','t',0.02,0.02)=-1.738
V=(-0.833-1.738*10**-86)/T;
print '%s %.2f %s' %('i) Voltage  (V) is   =  ',V,' V ');
print '%s %.2f %s' %('i) Square Root of Voltage  (V) is   =  ',math.sqrt(-V),' seconds ');

i) Voltage  (V) is   =   -16.66  V
i) Square Root of Voltage  (V) is   =   4.08  seconds


## Example E22 : Pg 70¶

In :
# EXAMPLE 2-22     PG NO-70-71
import math
A=math.pi/2.;
# integrate(wt)=math.pi/6
Eavg=1./A*(math.pi+math.pi)/6.;
print '%s %.2f %s' %('i) Average Energy  (Eavg) is =',Eavg,' Em ');

i) Average Energy  (Eavg) is = 0.67  Em


## Example E23 : Pg 71¶

In :
          # EXAMPLE 2-23     PG NO-71
import math
A=math.pi/2;
# [integrate('0',wt,'math.pi/3')]**2=math.pi/9
# integrate('math.pi/3',wt,'math.pi/2')=math.pi/6;
E=1./A*((math.pi/9.)+(math.pi/6.));
print '%s %.2f %s' %('i)  Energy  (E) is   =  ',E,'  ');
print '%s %.2f' %('ii) Square Energy  (E) is   =  ',math.sqrt(E));
FF=(math.sqrt(E)*3.)/2.;
print '%s %.2f' %('iii)  FORM FACTOR  (FF) is   =  ',FF);

i)  Energy  (E) is   =   0.56
ii) Square Energy  (E) is   =   0.75
iii)  FORM FACTOR  (FF) is   =   1.12


## Example E24 : Pg 71¶

In :
                # EXAMPLE 2-24   PG NO 71
# integration of   is=1008sinQ**2=0.5
import math
I=150.;                    # CURRENT
print '%s %.2f %s' %('i)  CURRENT  (I**2) is   =  ',I,' A ');
print '%s %.2f %s' %('ii)  CURRENT  (I) is   =  ',math.sqrt(I),' A ');

i)  CURRENT  (I**2) is   =   150.00  A
ii)  CURRENT  (I) is   =   12.25  A


## Example E25 : Pg 72¶

In :
                  # EXAMPLE 2-25  PG NO-72
V1=50.+1j*0;
V2=37.5-1j*64.95;
print 'ii)   ADDITION (X) is  in polar form  =  ',X,'  V '

ii)   ADDITION (X) is  in polar form  =   (87.5-64.95j)   V


## Example E26 : Pg 72¶

In :
                       # EXAMPLE 2-26       PG NO-72
import math
V=200.;
R=100.;
R1=500.;
R2=0.9009;                      # resistance
RMS1=V/(R+R);                      # RMS
print '%s %.2f %s' %('ii)   CURRENT R.M.S  in forward (R.M.S.1) is    =  ',RMS1,'  A ');
RMS2=-V/(R+R1);
print '%s %.2f %s' %('ii)   CURRENT R.M.S  in Backward (R.M.S.2) is    =  ',RMS2,'  A ');
I1=RMS1*R2;                            # Current
print '%s %.2f %s' %('ii)  Average CURRENT   in forward (I1) is    =  ',I1,'  A ');
I2=RMS2*R2;
print '%s %.2f %s' %('ii) Average  CURRENT   in Backward (I2) is    =  ',I2,'  A ');
A=(I1+I2)/2;                         # Ammeter
print '%s %.2f %s' %('ii)   Reading of moving coil ammeter (A) is    =  ',A,'  A ');
HA=(0.5*(RMS1+(RMS2)**2))**0.5;                   # HOT AMMETER
print '%s %.2f %s' %('ii)   Reading of hot wire ammeter (H.A) is    =  ',HA,'  A ');
P=0.5*((RMS1*V)+(RMS2*RMS2*600));                      # POWER
print '%s %.2f %s' %('ii)   TOTAL AVERAGE POWER (P) is    =  ',P,'  W ');
P1=0.5*((RMS1*R)+(RMS2*RMS2*R1));
print '%s %.2f %s' %('ii)   TOTAL  POWER  dissipated in rectifier (P) is    =  ',P1,'  W ');

ii)   CURRENT R.M.S  in forward (R.M.S.1) is    =   1.00   A
ii)   CURRENT R.M.S  in Backward (R.M.S.2) is    =   -0.33   A
ii)  Average CURRENT   in forward (I1) is    =   0.90   A
ii) Average  CURRENT   in Backward (I2) is    =   -0.30   A
ii)   Reading of moving coil ammeter (A) is    =   0.30   A
ii)   Reading of hot wire ammeter (H.A) is    =   0.75   A
ii)   TOTAL AVERAGE POWER (P) is    =   133.33   W
ii)   TOTAL  POWER  dissipated in rectifier (P) is    =   77.78   W


## Example E27 : Pg 74¶

In :
       # EXAMPLE 2-27  PG NO 74
import math
F=50.
V=230.;           # voltage
R=20.;            # resisance
I=V/R;           # current
P=V*I;           # power
Im=I*1.414;         # Maximum current
W=2.*math.pi*F;
print '%s %.2f %s' %(' current  is    = ',I,' A');
print '%s %.2f %s' %(' POWER  is    = ',P,' W');
print '%s %.2f %s' %(' MAXIMUM CURENT is    = ',Im,' A');
print '%s %.2f %s' %(' W  is    = ',W,' ');

 current  is    =  11.50  A
POWER  is    =  2645.00  W
MAXIMUM CURENT is    =  16.26  A
W  is    =  314.16


## Example E28 : Pg 76¶

In :
    # EXAMPLE 2-28  PG NO-76
import math
F=50.;   # Frequency
L=0.2;  # inductance
XL1=500.;
XL=(2*math.pi*F*L);
f=XL1/(2.*math.pi*L);                 # FREQUENCY
print '%s %.2f %s' %(' XL  is    = ',XL,' ohms');
print '%s %.2f %s' %(' frequency  is    = ',f,' Hz');

 XL  is    =  62.83  ohms
frequency  is    =  397.89  Hz


## Example E29 : Pg 77¶

In :
      # EXAMPLE 2-29  PG NO=77-78
import math
V=230.;
F=50.;       # Frequency
C=10.*10.**-6.;    # Capacitor
Xc=1./(math.pi*2.*F*C);
Bc=1./Xc;
I=V/Xc;                       # susceptance  current
print '%s %.2f %s'%(' Xc  is    = ',Xc,' ohms');
print '%s %.2e %s'%(' Bc  is    = ',Bc,' siemens');
print '%s %.2f %s'%(' Current  is    = ',I,' A');

 Xc  is    =  318.31  ohms
Bc  is    =  3.14e-03  siemens
Current  is    =  0.72  A


## Example E30 : Pg 81¶

In :
                         # EXAMPLE 2-30     PG NO-81-82
from math import pi,cos,sin
V=230.+1j*0;
F=50.;
L=0.03;
R=20.;
XL=2.*pi*F*L;
print'i)   INDUCTANCE (XL) is  in polar form  =  ',XL,'  ohm '
Z=R+1j*XL;
print'ii)   IMPEDANCE (Z) is  in polar form  =  ',Z,'  ohm '
Y=1/Z;
print'iii)  ADMITTANCE (Y) is  in polar form  =  ',Y,'  siemens '
I=V/Z;
print'iv)   CURRENT (I) is in polar form   =  ',I,'A '
Vr=I*R;
print'v)   VOLTAGE (Vr) is  in polar form  =  ',Vr,'  V '
VL=1j*XL*I
print'vi)   VOLTAGE (VL) is  in polar form  =  ',VL,'  V '
Q=25.23;                     # TETA
PF=cos(Q);
print'vi)   POWER FACTOR (PF) is    =  ',PF,' lagging '
P=V*I*cos(Q);       # ACTIVE POWER
print'vi)   ACTIVE POWER (P) is  in polar form  =  ',P,'  W '
q=V*I*sin(Q)
print'vi)   REACTIVE POWER (q) is  in polar form  =  ',q,'  W '
S=230*10.4;
print'vi)   APPARENT POWER (S) is  in polar form  =  ',S,'  VA '

i)   INDUCTANCE (XL) is  in polar form  =   9.42477796077   ohm
ii)   IMPEDANCE (Z) is  in polar form  =   (20+9.42477796077j)   ohm
iii)  ADMITTANCE (Y) is  in polar form  =   (0.0409143171878-0.0192804177456j)   siemens
iv)   CURRENT (I) is in polar form   =   (9.4102929532-4.43449608149j) A
v)   VOLTAGE (Vr) is  in polar form  =   (188.205859064-88.6899216297j)   V
vi)   VOLTAGE (VL) is  in polar form  =   (41.7941409359+88.6899216297j)   V
vi)   POWER FACTOR (PF) is    =   0.995274092769  lagging
vi)   ACTIVE POWER (P) is  in polar form  =   (2154.13877979-1015.11398481j)   W
vi)   REACTIVE POWER (q) is  in polar form  =   (210.172000308-99.0412218237j)   W
vi)   APPARENT POWER (S) is  in polar form  =   2392.0   VA


## Example E31 : Pg 82¶

In :
           # EXAMPLE 2-31  PG NO=82
Z1=20.15+1j*15.18;
Z2=6.99+1j*17.29;
Z=Z1+Z2;                  # impedance
V=230+1j*0;
I=V/Z;                     # Current
PF=0.64;                        # Power   Factotr
S=V*I;                            # Apparent Power
P=S*PF;                             # Active Power
print' Impedanceis in rectangular form   = ',Z,' ohm'
print' current  is in rectangular form   = ',I,' A'
print' S  is in rectangular form         = ',S,'VA'
print' POWER  is in rectangular form     = ',P,'W'

 Impedanceis in rectangular form   =  (27.14+32.47j)  ohm
current  is in rectangular form   =  (3.4855480307-4.17007164911j)  A
S  is in rectangular form         =  (801.676047062-959.116479296j) VA
POWER  is in rectangular form     =  (513.07267012-613.834546749j) W


## Example E32 : Pg 83¶

In :
  # EXAMPLE 2-32    PG NO-83
cos30=0.866;
sin30=0.5;
E1=141.42+1j*0;
E2=144.566+1j*11.976;
V=E1+141.42*(cos30 * sin30 );
print'1) Voltage  is in rectangular form   = ',V,'W'
Z=8+1j*6;          # IMPEDANCE
I=V/Z;
print'1) Current is in rectangular form    = ',I,'A'
P=I*V*0.743;
print' POWER  is in rectangular form       = ',P,'W'

1) Voltage  is in rectangular form   =  (202.65486+0j) W
1) Current is in rectangular form    =  (16.2123888-12.1592916j) A
POWER  is in rectangular form       =  (2441.14090122-1830.85567591j) W


## Example E33 : Pg 84¶

In :
                      # EXAMPLE 2-33     PG NO-84-85
from math import pi
V=230.+1j*0;                  # Voltage
F=50.;                     # Frequency
C=10.**-4.;                   # Capacitor
R=10.;                   # Resistance
XC=1./(2.*pi*F*C);               # Capacitor
print'i)   CAPACITOR (XC) is  in polar form  =  ',XC,'ohm '
Z=R-1j*XC;                          # Impedance
print'ii)   IMPEDANCE (Z) is  in polar form  =  ',Z,'  ohm '
print'iii)  ADMITTANCE (Y) is  in polar form  =  ',Y,'  siemens '
I=V/Z;                            # current
print'iv)   CURRENT (I) is in polar form   =  ',I,'  A '
Vr=I*R;                         #  Voltage
print'v)   VOLTAGE (Vr) is  in polar form  =  ',Vr,'  V '
VC=1j*XC*I              # Voltage
print'vi)   VOLTAGE (VL) is  in polar form  =  ',VC,'V'

i)   CAPACITOR (XC) is  in polar form  =   31.8309886184 ohm
ii)   IMPEDANCE (Z) is  in polar form  =   (10-31.8309886184j)   ohm
iii)  ADMITTANCE (Y) is  in polar form  =   (0.00898301623537+0.0285938287547j)   siemens
iv)   CURRENT (I) is in polar form   =   (2.06609373414+6.57658061358j)   A
v)   VOLTAGE (Vr) is  in polar form  =   (20.6609373414+65.7658061358j)   V
vi)   VOLTAGE (VL) is  in polar form  =   (-209.339062659+65.7658061358j) V


## Example E34 : Pg 85¶

In :
                       # EXAMPLE 2-34          PG NO-85
V=80.+1j*60;                  # voltage
I=-4.+1j*10;              # current
Z=V/I;               # Impedance
PF=0.26;                    # power factor
P=V*I*PF;           # Power
print' IMPEDANCE   is in rectangular form = ',Z,'ohm'
print' POWER  is in rectangular form      = ',P,' W'

 IMPEDANCE   is in rectangular form =  (2.41379310345-8.96551724138j) ohm
POWER  is in rectangular form      =  (-239.2+145.6j)  W


## Example E : Pg 86¶

In :
                        # EXAMPLE-2-35          PG NO-86
from math import pi,sqrt
Vr=100.;                  # VOLTAGE
P=300.;                 # POWER
I=P/Vr;                # CURRENT
V=240.;                 # voltage
F=50.;                 # frequency
Z=V/I;                   # IMPEDANCE
R=Vr/I;
Xc=(Z**2.-R**2.)**0.5;
C=1./(2.*F*pi*Xc);         # CAPACITOR
Vc=((V*V)-(Vr*Vr))**0.5;
Vm=sqrt(2.)*Vc;
Qm=(sqrt(2.)*Vc)*(C);                 # CHARGE
Em=0.5*(Xc*Vm*Vm);         # MAXIMUM ENERGY
print'i)   CURRENT (I) is         =  ',round(I,2),'A'
print'ii)  IMPEDANCE (Z) is       =  ',round(Z,2),'ohm'
print'iii)   RESISTANCE (R) is    =  ',round(R,2),'ohm'
print'i)   CAPACITOR (Xc) is      =  ',round(Xc,2),'ohm'
print'i)  CAPACITOR (C) is        =  ',round(C,2),'F'
print'i)   VOLTAGE (Vc) is        =  ',round(Vc,2),'V'
print'i)  MAXIMUM VOLTAGE (Vm) is =  ',round(Vm),'V'
print'i)  MAXIMUM CHARGE (Qm) is  =  ',round(Qm,2),'C'
print'i)  MAXIMUM ENERGY (Em) is  =  ',round(Em,2),'J'

i)   CURRENT (I) is         =   3.0 A
ii)  IMPEDANCE (Z) is       =   80.0 ohm
iii)   RESISTANCE (R) is    =   33.33 ohm
i)   CAPACITOR (Xc) is      =   72.72 ohm
i)  CAPACITOR (C) is        =   0.0 F
i)   VOLTAGE (Vc) is        =   218.17 V
i)  MAXIMUM VOLTAGE (Vm) is =   309.0 V
i)  MAXIMUM CHARGE (Qm) is  =   0.01 C
i)  MAXIMUM ENERGY (Em) is  =   3461697.98 J


## Example E36 : Pg 87¶

In :
                   # EXAMPLE 2-36    PG NO-87
from math import pi
F=50.;             # FREQUENCY
L=0.2;            # INDUCTANCE
C=150.*10.**-6.;       # CAPACITOR
R=20.;
V=230.;
XL=2.*pi*L*F;
print'i)   INDUCTANCE (XL) is    =  ',XL,'  ohm '
XC=1./(2.*pi*F*C)
print'i)   CAPACITOR (Xc) is    =  ',XC,'  ohm '
Z=R+1j*(XL-XC)
print'i)   IMPEDANCE (Z) is    in  polar form =  ',Z,'  ohm '
I=V/Z;                       # CURRENT
print'i)   CURRENT (I) is in polar form   =  ',I,'  ohm '
AP=V*I;               # APPARENT POWER
print'i)   Apparent Power (AP) is  in polar form  =  ',AP,'  VA '
P=V*I*0.433;                   # active power
print'i)   ACTIVE POWER (P) is  in  polar form  =  ',P,'  W '
Q=V*I*0.9013;                  # Reactive Power
print'i)   Reactive Power (Q) is in polar form   =  ',Q,'  vars '

i)   INDUCTANCE (XL) is    =   62.8318530718   ohm
i)   CAPACITOR (Xc) is    =   21.2206590789   ohm
i)   IMPEDANCE (Z) is    in  polar form =   (20+41.6111939929j)   ohm
i)   CURRENT (I) is in polar form   =   (2.15811326221-4.49008348061j)   ohm
i)   Apparent Power (AP) is  in polar form  =   (496.366050307-1032.71920054j)   VA
i)   ACTIVE POWER (P) is  in  polar form  =   (214.926499783-447.167413834j)   W
i)   Reactive Power (Q) is in polar form   =   (447.374721142-930.789815447j)   vars


## Example E37 : Pg 88¶

In :
    # EXAMPLE  2-37    PG  NO-88
Xc=4.;
XL=6.;
R=2.;                      # RESISTANCE
v=8.48+1j*30.;
Z=R+1j*(XL-Xc);             # IMPEDANCE
V=v;
I=V/Z;                  # CURRENT
VL=1j*I*XL;
Vc=-1j*I*Xc;
P=V*I*0.707;                # ACTIVE POWER
print'i) Active Power   = ',P,'  W'
print'ii) Impedance     = ',Z,' ohm'
print'iii) Current is   = ',I,' A'
print'iv) VL is         = ',VL,' V'
print'v)Vc   is         = ',Vc,' V'

i) Active Power   =  (-56.4344368+236.2952368j)   W
ii) Impedance     =  (2+2j)  ohm
iii) Current is   =  (9.62+5.38j)  A
iv) VL is         =  (-32.28+57.72j)  V
v)Vc   is         =  (21.52-38.48j)  V


## Example E38 : Pg 88¶

In :
                 # EXAMPLE 2-38      PG N0-88-89
Z=12.-1j*5;
V=100.;            # VOLTAGE
I=V/Z;            # CURRENT
print'i)   CURRENT (I) is in polar form   =  ',I,'A'
Z1=4.+1j*3;
Z2=6.-1j*8;                         # impedance
V1=I*Z1;
print'i)   voltage (V1) is in polar form   =  ',V1,'  V '
V2=I*Z2;                               # voltage
print'i)   voltage (V2) is in polar form   =  ',V2,'  V '
V3=2.*I;                             # voltage
print'i)   voltage (V3) is in polar form   =  ',V3,'  V '
P=V*I*0.9230;                         # ACTIVE POWER
print'i)   Active Power (P) is in polar form   =  ',P,'  W '

i)   CURRENT (I) is in polar form   =   (7.10059171598+2.95857988166j) A
i)   voltage (V1) is in polar form   =   (19.5266272189+33.1360946746j)   V
i)   voltage (V2) is in polar form   =   (66.2721893491-39.0532544379j)   V
i)   voltage (V3) is in polar form   =   (14.201183432+5.91715976331j)   V
i)   Active Power (P) is in polar form   =   (655.384615385+273.076923077j)   W


## Example E39 : Pg 89¶

In :
      # EXAMPLE-2-39    PG NO-89
V=7.07;
I=4.24;
W=500;
S=V*I;
cosQ=0.6428;
sinQ=0.766;
P=S*cosQ;                   # ACTIVE POWER
Q=S*sinQ;                  # REACTIVE POWER
Z=V/I;                    # IMPEDANCE
R=Z*cosQ;                # RESISTANCE
Xc=Z*sinQ;              # Xc
C=1/(W*Xc);            # CAPACITOR
P2 =S*(cosQ-1);     # NEGATIVE PEAK  POWER
P3 =S*(cosQ+1);   # POSITIVE PEAK POWER
P1=(P3 +P2)/2;     #  POWER
S1=(P3-P1);                  # apparent power
print' S is              = ',round(S,2),' VA'
print' ACTIVE POWER  is  = ',round(P,2),' W'
print' REACTIVE POWER is = ',round(Q,2),' VAr'
print' IMPEDANCE is      = ',round(Z,2),' ohm'
print' RESISTANCE is     = ',round(R,2),'ohm '
print' Xc is             = ',round(Xc,2),' ohm'
print' CAPACITOR is      = ',round(C,2),' F'
print' POWER CURVE is    = ',round(P2,2),' W'
print' POWER CURVE is    = ',round(P3,2),' W'
print' POWER  is         = ',round(P1,2),' W'
print' S is              = ',round(S1,2),' VA'

 S is              =  29.98  VA
ACTIVE POWER  is  =  19.27  W
REACTIVE POWER is =  22.96  VAr
IMPEDANCE is      =  1.67  ohm
RESISTANCE is     =  1.07 ohm
Xc is             =  1.28  ohm
CAPACITOR is      =  0.0  F
POWER CURVE is    =  -10.71  W
POWER CURVE is    =  49.25  W
POWER  is         =  19.27  W
S is              =  29.98  VA


## Example E40 : Pg 89¶

In :
                       # EXAMPLE 2-40      PG NO-89-90
V1=52.33-1j*34.15878;
Z1=7.5-1j*9.999;        # IMPEDANCE
Z2=3.488+1j*12;        # IMPEDANCE
Z3=11.99+1j*5;
V2=(Z2/Z1)*V1;
print'i)   voltage (V2) is in polar form   =  ',V2,'  V '
V3=(Z3/Z1)*V1;                         # voltage
print'ii)   voltage (V3) is in polar form   =  ',V3,'  V '
V=V1+V2+V3;                        # total voltage
print'i)   voltage (V) is in polar form   =  ',V,'  V '
Z=Z1+Z2+Z3;                   # Total  Impedance
print'i)   IMPEDANCE (Z) is in polar form   =  ',Z,'  V '
print'i)   Y (Y) is in polar form   =  ',Y,'  ohm '

i)   voltage (V2) is in polar form   =   (-4.12462353773+62.3429419475j)   V
ii)   voltage (V3) is in polar form   =   (47.786719967+43.9874187666j)   V
i)   voltage (V) is in polar form   =   (95.9920964292+72.1715807141j)   V
i)   IMPEDANCE (Z) is in polar form   =   (22.978+7.001j)   V
i)   Y (Y) is in polar form   =   (0.0398230520619-0.0121333966179j)   ohm


## Example E41 : Pg 90¶

In :
      # EXAMPLE 2-41   PG NO-90
import math
F1=50.;                        # frequency
W=(2.*math.pi*F1);
L=1.;                          # inductar
C=10.**-6.;                        # capacitor
XL1=W*L;
Xc1=1./(W*C);
Z1=XL1-Xc1;
F2=1000.;
XL2=(2.*math.pi*F2*L);
Xc2=1./(2.*math.pi*F2*C);
Z2=(XL2-Xc2);               # impedance
print' IMPEDANCE(Z1) is = ',round(Z1,2),'ohm'
print' IMPEDANCE(Z2) is = ',round(Z2,2),'ohm'
print' XL1 is = ',round(XL1,2),'ohm'
print' Xc1 is = ',round(Xc1,2),'ohm'
print' XL2 is = ',round(XL2,2),'ohm'
print' Xc2 is = ',round(Xc2,2),'ohm'

 IMPEDANCE(Z1) is =  -2868.94 ohm
IMPEDANCE(Z2) is =  6124.03 ohm
XL1 is =  314.16 ohm
Xc1 is =  3183.1 ohm
XL2 is =  6283.19 ohm
Xc2 is =  159.15 ohm


## Example E42 : Pg 90¶

In :
  # EXAMPLE 2-42    PG NO-90
import math
F=50.;                     # frequency
C=100.*10.**-6.;                # capacitor
W=(2.*math.pi*F);
Xc=1./(W*C);
R=19.1;               # resistance
XL=25.46;
L=XL/(2.*math.pi*F);                 # inductance
print' Xc is         = ',round(Xc,2),'ohms'
print' INDUCTANCE is = ',round(L,2),'H'

 Xc is         =  31.83 ohms
INDUCTANCE is =  0.08 H


## Example E43 : Pg 91¶

In :
                         # EXAMPLE 2-43        PG NO-91
R1=6.;           # RESISTANCE
R2=3.;           # RESISTANCE
R3=8.;           # RESISTANCE
Z1=7.;             # IMPEDANCE
Z2=5.;             # IMPEDANCE
Z3=10.;            # IMPEDANCE
V=7.;
I=1.;
PF1=R1/Z1;        # POWER FACTOR
print'i)   Power Factor (PF1) is       =  ',round(PF1,2)
PD1=V*I*0.857;      # POWER dissipated
print'i)   Power Dissipated (PD1) is   =  ',round(PD1,2),'W'
PF2=R2/Z2;
print'iii)   Power Factor (PF2) is     =  ',round(PF2,2),'W'
PD2=Z2*PF2;
print'i)   Power Dissipated (PD2) is   =  ',round(PD2,2),'W'
PF3=R3/Z3;
print'iii)   Power Factor (PF3) is     =  ',round(PF3,2),'W'
PD3=Z3*PF3;
print'i)   Power Dissipated (PD3) is   =  ',round(PD3,2),'  W '
A=(Z1**2-R1**2)**0.5;
print'i)   REACTANCE OF COIL (A) is    =  ',round(A,2),'  ohm '
B=(Z2**2-R2**2)**0.5;
print'i)   REACTANCE OF COIL (B) is    =  ',round(B,2),'  ohm '
C=(Z3**2-R3**2)**0.5;
print'i)   REACTANCE OF COIL (C) is    =  ',round(C,2),'  ohm '
TR=R1+R2+R3;                                              # TOTAL  RESISTANCE
print'i)   TOTAL RESISTANCE (TR) is    =  ',round(TR,2),'  ohm '
TRC=A+B+C;                                               # TOTAL RACTANCE
print'i)   TOTAL REACTANCE (TRC) is    =  ',round(TRC,2),'  ohm '
print'i)   TOTAL IMPEDANCE (TI) is     =  ',round(TI,2),'ohm'
PF=TR/TI;# POWER FACTOR
print'i)   POWER FACTOR (PF) is        =  ',round(PF,2),'lagging'

i)   Power Factor (PF1) is       =   0.86
i)   Power Dissipated (PD1) is   =   6.0 W
iii)   Power Factor (PF2) is     =   0.6 W
i)   Power Dissipated (PD2) is   =   3.0 W
iii)   Power Factor (PF3) is     =   0.8 W
i)   Power Dissipated (PD3) is   =   8.0   W
i)   REACTANCE OF COIL (A) is    =   3.61   ohm
i)   REACTANCE OF COIL (B) is    =   4.0   ohm
i)   REACTANCE OF COIL (C) is    =   6.0   ohm
i)   TOTAL RESISTANCE (TR) is    =   17.0   ohm
i)   TOTAL REACTANCE (TRC) is    =   13.61   ohm
i)   TOTAL IMPEDANCE (TI) is     =   21.77 ohm
i)   POWER FACTOR (PF) is        =   0.78 lagging


## Example E44 : Pg 91¶

In :
                        # EXAMPLE    2-44       PG NO 91-92
import math
R=20.;                       # Resistance
V=125.;                      # VOLTAGE
I=2.2;                       # CURRENT
Z=V/I;                       # IMPEDANCE
print'i) Impedance is  = ',round(Z,2)
F=50.;            # FREQUENCY
XC=53.18
C=1./(2.*math.pi*F*XC);                      # CAPACITANCE
print'ii) Capacitor is = ',round(C,2),'F'

i) Impedance is  =  56.82
ii) Capacitor is =  0.0 F


## Example E45 : Pg 92¶

In :
    # EXAMPLE 2-45  PG NO-92
import math
I=10.;                    # CURRENT
R=5.;                    # RESISTANCE
P=I*I*R;               # POWER
IL=250.;                # IRON LOSS
Z=20.;
r=5.;
F=50.;
W=2.*math.pi*F;
p1=750.;
v=200.;                       # voltage
L=(Z*Z-r*r)**0.5/W;             # iductance
cosQ=p1/(v*I);
print' power is      = ',round(P,2),'W'
print' inductance is = ',round(L,2),'H'
print' cos Q is      = ',round(cosQ,2),'lagging'

 power is      =  500.0 W
inductance is =  0.06 H
cos Q is      =  0.38 lagging


## Example E46 : Pg 92¶

In :
                # Example  2-46    PG NO-92
from math import sin,pi,sqrt
Z=50.+1j*49.95;                # IMPEDANCE
V=283.;                      # VOLTAGE
T=1.;              # ASSUMING
i=(V/70.675)*(sin(100.*pi-44.97));
print'i)   Current (i) is  in polar form  = ',i,'A'
P=(V/sqrt(2))*(4/sqrt(2.))*(0.707);
print'ii)   POWER (P) is                  =  ',P,'W'

i)   Current (i) is  in polar form  =  -3.3425967922 A
ii)   POWER (P) is                  =   400.162 W


## Example E47 : Pg 92¶

In :
                        # EXAMPLE 2-47   PG NO 92
import math
V=100./math.sqrt(2.);                # VOLTAGE
F=100.;                      # FREQUENCY
L=0.018;                    # INDUCTANCE
XL=2.*math.pi*F*L;
print'i)   INDUCTANCE (XL) is  in polar form  =  ',XL,'ohm'
I=V/((11.3+1j*11.3));# current
print'ii)   CURRENT (I) is  in polar form  =  ',I,'A'
VR=I*10.;                                   # voltage
print'i)   Voltage Across Resister (VR) is    =  ',VR,'V'

i)   INDUCTANCE (XL) is  in polar form  =   11.3097335529 ohm
ii)   CURRENT (I) is  in polar form  =   (3.1287910672-3.1287910672j) A
i)   Voltage Across Resister (VR) is    =   (31.287910672-31.287910672j) V


## Example E49 : Pg 93¶

In :
     # EXAMPLE 2-49   PG NO-93
import math
K=0.35;     # CONSTANT
L1=0.1;       # INDUCTANCE
L2=0.2;     # INDUCTANCE
M=K*(L1*L2)**0.5;
V=125.;        # VOLTAGE
F=50.;        # FREQUENCY
L=0.2;     #   TOTAL INDUCTANCE
I=V/(2.*math.pi*F*L);      # CURRENT
print' M is       = ',round(M,2),'H'
print' current is = ',round(I,2),'A'

 M is       =  0.05 H
current is =  1.99 A


## Example E51 : Pg 94¶

In :
                # example 2-51        pg no-94
import math
V=230.+1j*0;                  # VOLTAGE
F=50.;                       # FREQUENCY
C=10.**-4.;                   # CAPACITOR
R=10.;                      # RESISTANCE
#cos(72.56)=0.299;
XC=1./(2.*math.pi*F*C);
print'i)   INDUCTANCE (XC) is                             =  ',XC,'ohm'
Z=R-1j*XC;                       # impedance
print'i)   IMPEDANCE (Z) is  in rectangular form          =  ',Z,'ohm'
print'i)   ADMITTANCE (Y) is  in rectangular form         =  ',Y,'ohm'
I=V/Z;                      # CURRENT
print'i)    CURRENT (I) is  in rectangular form           =  ',I,'A'
PF=0.299;         # POWER FACTOR
print'i)   POWER FACTOR (PF) is                           =  ',PF,'leading'
S=V*I;             # APPARENT  POWER
print'i)   APPARENT POWER (S) is  IN rectangular FORM     =  ',S,'VA'
P=V*I*0.3;               # ACTIVE    POWER
print'i)   ACTIVE POWER (P) is in   rectangular form      =  ',P,'W'
Q=V*I*-0.1315;          # REACTIVE POWER
print'i)   REACTIVE POWER (Q) is    in rectangular form   =  ',Q,'vars'
Vr=I*R;
print'i)   VOLTAGE (Vr) is  in rectangular form           =  ',Vr,'V'
Vc=-1j*I*XC;
print'i)   VOLTAGE (Vc) is                                =  ',Vc,'V'

i)   INDUCTANCE (XC) is                             =   31.8309886184 ohm
i)   IMPEDANCE (Z) is  in rectangular form          =   (10-31.8309886184j) ohm
i)   ADMITTANCE (Y) is  in rectangular form         =   (0.00898301623537+0.0285938287547j) ohm
i)    CURRENT (I) is  in rectangular form           =   (2.06609373414+6.57658061358j) A
i)   POWER FACTOR (PF) is                           =   0.299 leading
i)   APPARENT POWER (S) is  IN rectangular FORM     =   (475.201558851+1512.61354112j) VA
i)   ACTIVE POWER (P) is in   rectangular form      =   (142.560467655+453.784062337j) W
i)   REACTIVE POWER (Q) is    in rectangular form   =   (-62.4890049889-198.908680658j) vars
i)   VOLTAGE (Vr) is  in rectangular form           =   (20.6609373414+65.7658061358j) V
i)   VOLTAGE (Vc) is                                =   (209.339062659-65.7658061358j) V


## Example E52 : Pg 96¶

In :
#    EXAMPLE 2-52    PG  NO-96
W=1000.;
L=0.02;
XL=W*L;
Z=4.85;
V=(100./1.414);
I=(20.62/1.414);
#cos(14.06)=0.97;   #
P=V*I*0.97;
z=1.18;
Leq=z/W;
print' XL is    = ',round(XL,2),'ohms'
print' POWER is = ',round(P,2),'W'
print' Leq is   = ',round(Leq,2),'H'

 XL is    =  20.0 ohms
POWER is =  1000.37 W
Leq is   =  0.0 H


## Example E53 : Pg 97¶

In :
               # EXAMPLE 2-53   PG NO=97
import math
R=15.;               # RESISTANCE
V=240+1j*0;         # VOLTAGE
I=22.1;
Ir=V/R;             # CURENT
print'i)  CURRENT (Ir) is    =  ',Ir,'A'
IL=(I**2.-Ir**2.)**0.5;
print'i)  CURRENT (IL) is    =  ',IL,'A'
XL=V/IL;
print'i)   INDUCTANCE (XL) is    =  ',XL,'ohm'
L=XL/(2.*math.pi*50.);
print'i)   INDUCTANCE (L) is    =  ',L,'H'
IL1=(34.**2.-Ir**2.)**0.5;
print'i)   INDUCTANCE (IL1) is    =  ',IL1,'A'
F=8./(2.*math.pi*0.05);
print'i)   FREQUENCY (F) is    =  ',F,'Hz'

i)  CURRENT (Ir) is    =   (16+0j) A
i)  CURRENT (IL) is    =   (15.2449991801+0j) A
i)   INDUCTANCE (XL) is    =   (15.7428673603+0j) ohm
i)   INDUCTANCE (L) is    =   (0.0501111031767+0j) H
i)   INDUCTANCE (IL1) is    =   (30+0j) A
i)   FREQUENCY (F) is    =   25.4647908947 Hz


## Example E54 : Pg 98¶

In :
    # EXAMPLE 2-54  PG NO-98
from math import pi
C=159.*10.**-6.;     # capacitor
F=50.;           # frequency
Xc=1./(2.*pi*F*C);
Z=8.94;               # impedance
V=100.;               # voltage
I=V/Z;             # Current
PF=0.894           # power factor
S=V*I;
P=V*I*PF;
Q=V*I*(-0.447);
print' CURRENT is = ',round(P,2),'A'
print' APPARENT POWER is = ',round(S,2),'VA'
print' active power is = ',round(P,2),'W'
print' reactive power is = ',round(Q,2),'vars'

 CURRENT is =  1000.0 A
APPARENT POWER is =  1118.57 VA
active power is =  1000.0 W
reactive power is =  -500.0 vars


## Example E55 : Pg 99¶

In :
                 # EXAMPLE 2-55    PG NO-99

Q=72.4;
tanQ=3.1524;
W=3000.;
C=35.*10.**-6.;
Xc=1./(W*C);
R=3.1524*Xc
print'i)   CAPACITOR (XC) is    =  ',round(Xc,2),'ohm'
print'i)   RESISTANCE (R) is    =  ',round(R,2),'ohm'

i)   CAPACITOR (XC) is    =   9.52 ohm
i)   RESISTANCE (R) is    =   30.02 ohm


## Example E56 : Pg 100¶

In :
                  # EXAMPLE 2-56      PG NO-99-100
import math
V=230.+1j*0;
R=15.+1j*0;
L=1j*7.5;
Ir=V/R;
Z1=-1j*12.
print'i)   CURRENT (Ir) is    =  ',Ir,' A'
IL=V/L;
print'i)   INDUCTANCE CURRENT (IL) is    =  ',IL,'A'
Ic=V/Z1;
print'i)   CAPACITOR CURRENT (Ic) is    =  ',Ic,'A'
I=Ir+IL+Ic;
print'i)    CURRENT (I) is    =  ',I,'A'
Z=V/I;
print'i)   IMPEDANCE (Z) is    =  ',Z,'A'
PF=0.8;
Leq=7.2/(2.*math.pi*50.);
print'i)   EQUIVALENT CURRENT (Ieq) is    =  ',Leq,'H'

i)   CURRENT (Ir) is    =   (15.3333333333+0j)  A
i)   INDUCTANCE CURRENT (IL) is    =   -30.6666666667j A
i)   CAPACITOR CURRENT (Ic) is    =   (-0+19.1666666667j) A
i)    CURRENT (I) is    =   (15.3333333333-11.5j) A
i)   IMPEDANCE (Z) is    =   (9.6+7.2j) A
i)   EQUIVALENT CURRENT (Ieq) is    =   0.0229183118052 H


## Example E57 : Pg 100¶

In :
                  # EXAMPLE 2-57   PG N0-100-101
V=240.+1j*0;
R=400.+1j*0;
Z1=1j*50.;
Z2=-1j*40.;
IR=V/R;
print'i)   CURRENT (IR) is    =  ',IR,'A'
IL=V/Z1;
print'i)   CURRENT (IL) is    =  ',IL,'A'
IC=V/Z2;
print'i)   CURRENT (IC) is    =  ',IC,'A'
I=IR+IL+IC;
print'i)   CURRENT (I) is    =  ',I,'A'
Z=V/I;
print'i)  IMPEDANCE (Z) is    =  ',Z,'ohms'
Y=1/Z;
print'i)  ADMITTANCE (Y) is    =  ',Y,'ohm'
S=V*I;
print'i)  APPARENT POWER (S) is    =  ',S,'VA'
P=V*I*0.448;
print'i)  ACTIVE POWER (P) is    =  ',P,'W'
Q=V*I*-0.94;
print'i)  REACTIVE POWER (Q) is    =  ',Q,'vars'

i)   CURRENT (IR) is    =   (0.6+0j) A
i)   CURRENT (IL) is    =   -4.8j A
i)   CURRENT (IC) is    =   (-0+6j) A
i)   CURRENT (I) is    =   (0.6+1.2j) A
i)  IMPEDANCE (Z) is    =   (80-160j) ohms
i)  ADMITTANCE (Y) is    =   (0.0025+0.005j) ohm
i)  APPARENT POWER (S) is    =   (144+288j) VA
i)  ACTIVE POWER (P) is    =   (64.512+129.024j) W
i)  REACTIVE POWER (Q) is    =   (-135.36-270.72j) vars


## Example E58 : Pg 101¶

In :
                     # EXAMPLE 2-58      PG NO-101-102
Z1=2.+1j*3;
Z2=1.-1j*5;
Z3=4.+1j*2;
Zeq=(Z2*Z3)/(Z2+Z3);
print'i)  IMPEDANCE EQUVALENT (Zeq) is    =  ',Zeq,'ohms '
Z=Z1+Zeq;
print'i)  TOTAL IMPEDANCE (Z) is    =  ',Z,'ohm '
V=10.;
R=5.65+1j*1.588;
I=V/R;
print'i)  CURRENT (I) is    =  ',I,'A'
VBC=I*Zeq;
print'i)  VOLTAGE (VBC) is    =  ',VBC,'V'
I2=VBC/Z2;
print'i)   CURRENT    (I2) is    =  ',I2,'A'
I3=VBC/Z3;
print'i)   CURRENT    (I3) is  in polar form  =  ',I3,'A'
S=V*I;
print'i)  APPARENT POWER (S) is  in polar form  =  ',S,'VA'
P=V*I*0.963;
print'i)  ACTIVE POWER (P) is  in polar form  =  ',P,'W'
Q=V*I*-0.27;
print'i)  REACTIVE POWER (Q) is  in polar form  =  ',Q,'vars'

i)  IMPEDANCE EQUVALENT (Zeq) is    =   (3.64705882353-1.41176470588j) ohms
i)  TOTAL IMPEDANCE (Z) is    =   (5.64705882353+1.58823529412j) ohm
i)  CURRENT (I) is    =   (1.64033212632-0.46103494099j) A
i)  VOLTAGE (VBC) is    =   (5.33151489694-3.99718455136j) V
i)   CURRENT    (I2) is    =   (0.973747602067+0.871553458976j) A
i)   CURRENT    (I3) is  in polar form  =   (0.666584524253-1.33258839997j) A
i)  APPARENT POWER (S) is  in polar form  =   (16.4033212632-4.6103494099j) VA
i)  ACTIVE POWER (P) is  in polar form  =   (15.7963983765-4.43976648174j) W
i)  REACTIVE POWER (Q) is  in polar form  =   (-4.42889674106+1.24479434067j) vars


## Example E59 : Pg 103¶

In :
    # EXAMPLE 2-59   PG NO-103
import math
C1=15.5*10**3;
L=1000.;
V=230.;
P=PL1+PL2;     # total active power
Q=QL1+QL2;      # total reactive power
AP=(P*P+Q*Q)**0.5;      # total apparent power
I=(AP*L)/V;          # TOTAL CURRENT
Ic=(C1/V);
Xc=V/Ic;
K=16.;
C=1./(2.*math.pi*50.*Xc);
I1=(L*K)/V;
print' total active power is = ',round(P,2),'KW'
print' total reactive power is = ',round(Q,2),'K var'
print' total apparent power is = ',round(AP,2),'KVA'
print' total current(I) is = ',round(P,2),'A'
print' Ic is = ',round(P,2),'A'
print' Xc is = ',round(Xc,2),'ohm'
print' capacitor is = ',round(C,2),'F'
print' current(I1) is = ',round(I1,2),'A'

 total active power is =  16.0 KW
total reactive power is =  15.5 K var
total apparent power is =  22.28 KVA
total current(I) is =  16.0 A
Ic is =  16.0 A
Xc is =  3.41 ohm
capacitor is =  0.0 F
current(I1) is =  69.57 A


## Example E60 : Pg 103¶

In :
                   # EXAMPLE 2-60     PG NO-103-104
Z1=6.+1j*8;
V=230.;                    #  VOLTAGE
Y1=1./Z1;
print'i)  ADMITTANCE (Y1) is    =  ',Y1,'  siemens '
G1=0.06;
B1=-0.08;
Z2=4.-1j*3;
Y2=1./Z2;
print'ii)  ADMITTANCE (Y2) is    =  ',Y2,'  siemens '
G2=0.16;
B2=0.12;
TL=G1+G2;                    # TOTAL CONDUCTANCE
print'iii) TOTAL CONDUCTANCE (TL) is    =  ',TL,' siemens'
TS=B1+B2;                      # TOTAL SUSCEPTANCE
print'iv)  TOTAL SUSCEPTANCE (TS) is    =  ',TS,'  siemens '
I1=V*Y1;                    #    CURRENT
print'v)  CURRENT (I1) is    =  ',I1,' A '
I2=V*Y2;
print'vi)  CURRENT (I2) is    =  ',I2,' A '
TI=I1+I2;                # TOTAL CURRENT
print'vii)  TOTAL CURRENT (TI) is    =  ',TI,' A '
PF=0.983;#cos(degree(10.3));
print'i)  POWER FACTOR (PF) is    =  ',PF,' leading '

i)  ADMITTANCE (Y1) is    =   (0.06-0.08j)   siemens
ii)  ADMITTANCE (Y2) is    =   (0.16+0.12j)   siemens
iii) TOTAL CONDUCTANCE (TL) is    =   0.22  siemens
iv)  TOTAL SUSCEPTANCE (TS) is    =   0.04   siemens
v)  CURRENT (I1) is    =   (13.8-18.4j)  A
vi)  CURRENT (I2) is    =   (36.8+27.6j)  A
vii)  TOTAL CURRENT (TI) is    =   (50.6+9.2j)  A
i)  POWER FACTOR (PF) is    =   0.983  leading


## Example E61 : Pg 104¶

In :
                 # EXAMPLE 2-61          PG NO-104-105
V=100.+1j*0;
Zab=1.6+1j*7.2;
Yab=1./Zab;
print'i)  ADMITTANCE (Yab) is  in polar form  =  ',Yab,' siemens'
Zcd=4.+1j*3;
Ycd=1./Zcd;
print'i)  ADMITTANCE (Ycd) is  in polar form   =  ',Ycd,'  siemens '
Zef=6.-1j*8;
Yef=1./Zef;
print'i)  ADMITTANCE (Yef) is in polar form    =  ',Yef,'  siemens '
Ybg=Yef+Ycd;
print'i)  ADMITTANCE (Ybg) is  in polar form   =  ',Ybg,'  siemens '
Zbg=1./Ybg;
print'i)  IMPEDANCE (Zbg) is  in polar form   =  ',Zbg,'  ohms '
TZ=1.6+1j*7.2+4.4+1j*0.8;
print'i) TOTAL IMPEDANCE (TZ) is  in polar form   =  ',TZ,'  ohms '
TI=V/TZ;
print'i)  TOTAL CURRENT (TI) is  in polar form   =  ',TI,'  A '
Icd=TI*(Zef/(Zcd+Zef))
print'i)  CURRENT (Icd) is  in polar form   =  ',Icd,'  A '
Ief=TI*(Zcd/(Zcd+Zef));
print'i)  CURRENT (Ief) is  in polar form   =  ',Ief,'  A '
Pab=TI*TI*1.6;
print'i)  POWER (Pab) is  in polar form   =  ',Pab,'  W '
Pcd=Icd*Icd*4;
print'i)  POWER (Pcd) is  in polar form   =  ',Pcd,'  W '
Pef=Ief*Ief*6;
print'i)  POWER (Pef) is  in polar form   =  ',Pef,'  W '
TP=Pab+Pcd+Pef;
print'i) TOTAL POWER (TP) is  in polar form   =  ',TP,'  W '

i)  ADMITTANCE (Yab) is  in polar form  =   (0.0294117647059-0.132352941176j)  siemens
i)  ADMITTANCE (Ycd) is  in polar form   =   (0.16-0.12j)   siemens
i)  ADMITTANCE (Yef) is in polar form    =   (0.06+0.08j)   siemens
i)  ADMITTANCE (Ybg) is  in polar form   =   (0.22-0.04j)   siemens
i)  IMPEDANCE (Zbg) is  in polar form   =   (4.4+0.8j)   ohms
i) TOTAL IMPEDANCE (TZ) is  in polar form   =   (6+8j)   ohms
i)  TOTAL CURRENT (TI) is  in polar form   =   (6-8j)   A
i)  CURRENT (Icd) is  in polar form   =   (1.6-8.8j)   A
i)  CURRENT (Ief) is  in polar form   =   (4.4+0.8j)   A
i)  POWER (Pab) is  in polar form   =   (-44.8-153.6j)   W
i)  POWER (Pcd) is  in polar form   =   (-299.52-112.64j)   W
i)  POWER (Pef) is  in polar form   =   (112.32+42.24j)   W
i) TOTAL POWER (TP) is  in polar form   =   (-232-224j)   W


## Example E62 : Pg 105¶

In :
                   # EXAMPLE 2-62        PG NO-105-106
Z1=24.+1j*18;
Z2=24.-1j*10;
Z3=2.-1j*0.148;
R1=24.;
R2=24.;
R3=32.;
R4=16.;
V=2.;
v1=128.3;
I=2.;
I3=32.+1j*24;
I4=16.-1j*30;
Z=Z1+Z2;
print'i)  IMPEDANCE (Z) is  in polar form   =  ',Z,'  ohms '
I1=(Z2/(Z1+Z2))*Z3;
print'i)  CURRENT (I1) is  in polar form   =  ',I1,'  ohms '
I2=(Z1/(Z1+Z2))*Z3;
print'i)  CURRENT (I2) is  in polar form   =  ',I2,'  ohms '
P1=I1*I1*R1;
print'i)  POWER (P1) is  in polar form   =  ',P1,'  W '
P2=I2*I2*R2;
print'i)  POWER (P2) is  in polar form   =  ',P2,'  W '
P3=V*V*R3;
print'i)  POWER (P3) is  in polar form   =  ',P3,'  W '
P4=V*V*R4;
print'i)  POWER (P4) is  in polar form   =  ',P4,'  W '
P=P1+P2+P3+P4;
print'i)  TOTAL POWER (P) is  in polar form   =  ',P,'  W '
V1=I1*Z1;
print'i)  VOLTAGE (V1) is  in polar form   =  ',V1,'  V '
V2=V1;
print'i)  VOLTAGE (V2) is  in polar form   =  ',V2,'  V '
V3=I3*Z3;
print'i)  VOLTAGE (V3) is  in polar form   =  ',V3,'  V '
V4=I4*Z3;
print'i)  VOLTAGE (V4) is  in polar form   =  ',V4,'  V '
V=V1+V4+V3;
print'i%)  VOLTAGE (V) is  in polar form   =  ',V,'  V '
S=v1*I;
print'i)  Apparent Power (S) is     =  ',S,'  VA '
Q=S*0.0726;
print'i) Reactive Power (Q) is     =  ',Q,'  Var '

i)  IMPEDANCE (Z) is  in polar form   =   (48+8j)   ohms
i)  CURRENT (I1) is  in polar form   =   (0.863405405405-0.634567567568j)   ohms
i)  CURRENT (I2) is  in polar form   =   (1.13659459459+0.486567567568j)   ohms
i)  POWER (P1) is  in polar form   =   (8.22702951059-26.2986752608j)   W
i)  POWER (P2) is  in polar form   =   (25.3223825917+26.5454432257j)   W
i)  POWER (P3) is  in polar form   =   128.0   W
i)  POWER (P4) is  in polar form   =   64.0   W
i)  TOTAL POWER (P) is  in polar form   =   (225.549412102+0.246767964938j)   W
i)  VOLTAGE (V1) is  in polar form   =   (32.1439459459+0.311675675676j)   V
i)  VOLTAGE (V2) is  in polar form   =   (32.1439459459+0.311675675676j)   V
i)  VOLTAGE (V3) is  in polar form   =   (67.552+43.264j)   V
i)  VOLTAGE (V4) is  in polar form   =   (27.56-62.368j)   V
i%)  VOLTAGE (V) is  in polar form   =   (127.255945946-18.7923243243j)   V
i)  Apparent Power (S) is     =   256.6   VA
i) Reactive Power (Q) is     =   18.62916   Var


## Example E63 : Pg 106¶

In :
                       # EXAMPLE 2-63   PG NO-106-107
Z1=14.+1j*48;
Z2=30.+1j*40;
Z3=24.+1j*70;
V=230.+1j*0;
Y1=1./Z1;
print'i)  ADMITTANCE (Y1) is  in polar form  =  ',Y1,' siemens'
Y2=1./Z2;
print'ii)  ADMITTANCE (Y2) is  in polar form  =  ',Y2,' siemens'
Y3=1./Z3;
print'iii)  ADMITTANCE (Y3) is  in polar form  =  ',Y3,' siemens'
Y=Y1+Y2+Y3;
print'i)  ADMITTANCE (Y) is  in polar form  =  ',Y,' siemens'
Z13=29.763+1j*21.62;
Z14=10.-1j*24;
X=Z13+Z14;
Y=18.+1j*80;
A=8.-1j*6;
print'i)  IMPEDANCE (X) is  in polar form  =  ',X,' ohm'
Z=((X*Y)/(X+Y))+A;
print'i)  IMPEDANCE (Z) is  in polar form  =  ',Z,' ohm'
I=V/Z;
print'vi)  CURRENT (I) is    =  ',I,' A '
S=V*I;
print'i)  Apparent Power (S) is     =  ',S,'  VA '
P=V*I*0.989;
print'i) Active Power (P) is     =  ',P,'  W '
Q=V*I*0.146;
print'i) Reactive Power (Q) is     =  ',Q,'  Var '

i)  ADMITTANCE (Y1) is  in polar form  =   (0.0056-0.0192j)  siemens
ii)  ADMITTANCE (Y2) is  in polar form  =   (0.012-0.016j)  siemens
iii)  ADMITTANCE (Y3) is  in polar form  =   (0.00438276113952-0.0127830533236j)  siemens
i)  ADMITTANCE (Y) is  in polar form  =   (0.0219827611395-0.0479830533236j)  siemens
i)  IMPEDANCE (X) is  in polar form  =   (39.763-2.38j)  ohm
i)  IMPEDANCE (Z) is  in polar form  =   (39.6114255491+5.85051241937j)  ohm
vi)  CURRENT (I) is    =   (5.68244535894-0.839283532063j)  A
i)  Apparent Power (S) is     =   (1306.96243256-193.035212374j)   VA
i) Active Power (P) is     =   (1292.5858458-190.911825038j)   W
i) Reactive Power (Q) is     =   (190.816515153-28.1831410067j)   Var


## Example E64 : Pg 107¶

In :
ZA=15.+1j*15.708;
ZB=20.+1j*0;
V=200.+1j*0;
IA=V/ZA;
print'i)  CURRENT (IA) is =',IA,' A '
IB=V/ZB;
print'ii)  CURRENT (IB) is =',IB,' A '
I=IA+IB;
print'vi) TOTAL CURRENT (I) is =',I,' A '

i)  CURRENT (IA) is = (6.35941824245-6.6595827835j)  A
ii)  CURRENT (IB) is = (10+0j)  A
vi) TOTAL CURRENT (I) is = (16.3594182425-6.6595827835j)  A


## Example E66 : Pg 108¶

In :
                           # EXAMPLE 2-66      PG NO-108
I=15.;
Z1=10.+1j*15
Z2=6.-1j*8;
I1=(I*Z2)/(Z1+Z2);
print'ii)  CURRENT (I1) is  in polar form  =  ',I1,' A '
I2=(I*Z1)/(Z1+Z2);
print'ii)  CURRENT (I2) is  in polar form  =  ',I2,' A '
P1=8.59**2*10;
print'ii)  Power (P1) is  in  polar form  =  ',P1,' W '
P2=15.49**2*6;
print'ii)  Power (P2) is  in polar form  =  ',P2,' W '

ii)  CURRENT (I1) is  in polar form  =   (1.96721311475-8.3606557377j)  A
ii)  CURRENT (I2) is  in polar form  =   (13.0327868852+8.3606557377j)  A
ii)  Power (P1) is  in  polar form  =   737.881  W
ii)  Power (P2) is  in polar form  =   1439.6406  W


## Example E67 : Pg 108¶

In :
                          # EXAMPLE 2-67      PG NO-108-109
Z1=5.;
V=100.+1j*200;
I1=16.;                      # CURRENT
P1=I1*I1*Z1;
print'i)  POWER (P1) is    =  ',P1,' W '
P2=5000.-P1;
print'ii)  POWER (P2) is    =  ',P2,' W '
Q1=-69.02;
#cos(-69.02)=0.35;
Z2=Z1/0.358;
print'iii)  IMPEDANCE (Z2) is  in polar form   =  ',Z2,'  ohms '
X1=Z2*-0.933;
print'i)   (X1) is  in polar form   =  ',X1,'  ohms '
Z3=5-1j*13.04;
I1=V/Z3;
print'ii)  CURRENT (I1) is  in polar form  =  ',I1,' A '
P3=3720;
I2=P3/(223.6*0.8);
print'ii)  CURRENT (I2) is  in polar form  =  ',I2,' A '
z2=8.6+1j*6.45;
I3=V/z2;
print'ii)  CURRENT (I3) is  in polar form  =  ',I3,' A'
I=I1+I3;
print'ii)  CURRENT (I) is  in polar form  =  ',I,' A '
Z=V/I;
print'iii)  IMPEDANCE (Z) is  in polar form   =  ',Z,'ohms '

i)  POWER (P1) is    =   1280.0  W
ii)  POWER (P2) is    =   3720.0  W
iii)  IMPEDANCE (Z2) is  in polar form   =   13.9664804469   ohms
i)   (X1) is  in polar form   =   -13.030726257   ohms
ii)  CURRENT (I1) is  in polar form  =   (-10.8079507141+11.8128645376j)  A
ii)  CURRENT (I2) is  in polar form  =   20.7960644007  A
ii)  CURRENT (I3) is  in polar form  =   (18.6046511628+9.3023255814j)  A
ii)  CURRENT (I) is  in polar form  =   (7.79670044869+21.115190119j)  A
iii)  IMPEDANCE (Z) is  in polar form   =   (9.87428968497-1.08988463059j) ohms


## Example E68 : Pg 109¶

In :
                                 # EXAMPLE 2-68     PG NO-109-110
V=100.;
Y1=0.16+1j*0.12;
Y2=-1j*0.15;
I1=V*Y1;
print'i)  CURRENT (I1) is  in polar form  =  ',I1,' A '
I2=V*Y2;
print'ii)  CURRENT (I2) is  in polar form  =  ',I2,' A '
P=(V*I1*0.8)+(V*I2*0);
print'iii)  Power (P) is  in polar form  =  ',P,' W '
I=I1+I2;
print'ii)  CURRENT (I) is  in polar form  =  ',I,' A '

i)  CURRENT (I1) is  in polar form  =   (16+12j)  A
ii)  CURRENT (I2) is  in polar form  =   -15j  A
iii)  Power (P) is  in polar form  =   (1280+960j)  W
ii)  CURRENT (I) is  in polar form  =   (16-3j)  A


## Example E69 : Pg 110¶

In :
                   # EXAMPLE 2-69   PG NO-110
import math
F=50.;
L=0.6;
R=100.;
XL=(math.pi*2.*F*L)
print'i)  INDUCTANCE (XL) is    =  ',XL,' ohm '
V=230.+1j*0;
IR=V/R;
print'ii)  CURRENT (IR) is  in polar form  =  ',IR,' A '
IL=V/(0+1j*XL);
print'iii)  CURRENT (IL) is  in polar form  =  ',IL,' A '
I=IR+IL;
print'iv)  CURRENT (I) is  in polar form  =  ',I,' A '
#cos(degree(27.9))=0.8837;
P=V*I*0.8837;
print'v)  POWER (P) is  in polar form  =  ',P,' W '
Z=V/I;
print'vi)  IMPEDANCE (Z) is    =  ',Z,' ohm '
LEQ=41.39/(2.*math.pi*F);
print'ii)  INDUCTANCE (LEQ) is    =  ',LEQ,' H '

i)  INDUCTANCE (XL) is    =   188.495559215  ohm
ii)  CURRENT (IR) is  in polar form  =   (2.3+0j)  A
iii)  CURRENT (IL) is  in polar form  =   -1.22018789704j  A
iv)  CURRENT (I) is  in polar form  =   (2.3-1.22018789704j)  A
v)  POWER (P) is  in polar form  =   (467.4773-248.004410261j)  W
vi)  IMPEDANCE (Z) is    =   (78.0367372592+41.3997749252j)  ohm
ii)  INDUCTANCE (LEQ) is    =   0.131748461891  H


## Example E70 : Pg 110¶

In :
            # EXAMPLE 2-70      PG NO-110-111
ZA=-1j*227.36;               # IMPEDANCE
ZB=-1j*795.77;                        # IMPEDANCE
ZC=500.;                         # IMPEDANCE
V=230.+1j*0;                    # VOLTAGE
IA=V/ZA;                          # CURRENT
print 'i)  CURRENT (IA) is  in polar form  =  ',IA,' A '
IB=V/ZB;
print 'i)  CURRENT (IB) is  in polar form  =  ',IB,' A '
IC=V/ZC;
print 'i)  CURRENT (IC) is  in polar form  =  ',IC,' A '
I=IA+IB+IC;
print 'i)  CURRENT (I) is  in polar form  =  ',I,' A '
P=V*I*0.334;
print 'i)  POWER (P) is  in polar form  =  ',P,' W '
Z=V/I;
print 'vi)  IMPEDANCE (Z) is    =  ',Z,' ohm '

i)  CURRENT (IA) is  in polar form  =   (-0+1.01161154117j)  A
i)  CURRENT (IB) is  in polar form  =   (-0+0.289028236802j)  A
i)  CURRENT (IC) is  in polar form  =   (0.46+0j)  A
i)  CURRENT (I) is  in polar form  =   (0.46+1.30063977797j)  A
i)  POWER (P) is  in polar form  =   (35.3372+99.9151477437j)  W
vi)  IMPEDANCE (Z) is    =   (55.5887198711-157.175870154j)  ohm


## Example E71 : Pg 111¶

In :
                 # EXAMPLE 2-71  PG NO-111
V=240.;
#cos (degree(62.74))=0.458;
Pm=V*2*0.458;
print 'i)  POWER (Pm) is  in rectangular form  =  ',Pm,' W '
I=(2.*0.458+1.5)-1j*(2*0.89);
print 'i)  CURRENT (I) is  in rectangular form  =  ',I,' A '
P=V*3*0.805
print 'i)  Power (P) is  in  rectangular form  =  ',P,' W '

i)  POWER (Pm) is  in rectangular form  =   219.84  W
i)  CURRENT (I) is  in rectangular form  =   (2.416-1.78j)  A
i)  Power (P) is  in  rectangular form  =   579.6  W


## Example E72 : Pg 111¶

In :
  # EXAMPLE 2-72   PG NO 111
PF=0.5;
cosQ=0.5;
sinQ=0.866;
V=552.;
I=2.3;
v=240;
PF1=0.89;
P=v*I*PF1;
Q=(V*V-P*P)**0.5;
print '%s %.2f %s' %(' ACTIVE POWER is = ',P,' W');
print '%s %.2f %s' %(' REACTIVE POWER is = ',Q,' vars');

 ACTIVE POWER is =  491.28  W
REACTIVE POWER is =  251.69  vars


## Example E73 : Pg 112¶

In :
     # EXAMPLE 2-73   PG NO-112
import math
R=44.074;
V=230.;
I=3.05;
Z=V/I;
Y=2.475;
X=(Z*Z-R*R)**0.5;
L=X/(2.*math.pi*50.)
Xc=V/Y;
C=1./(2.*50.*Xc*math.pi);
print '%s %.2f %s' %(' impedance is = ',Z,' ohm');
print '%s %.2f %s' %(' X is = ',X,' W');
print '%s %.2f %s' %('inductance  is = ',L,'H ');
print '%s %.2f %s' %(' Xc is = ',Xc,' ohm');
print '%s %.2e %s' %(' Capacitor is = ',C,' F');

 impedance is =  75.41  ohm
X is =  61.19  W
inductance  is =  0.19 H
Xc is =  92.93  ohm
Capacitor is =  3.43e-05  F


## Example E74 : Pg 112¶

In :
                 # EXAMPLE 2-74  PG NO-112
ZA=10.+1j*7.226;               # IMPEDANCE
ZB=5.+1j*10.99;               # IMPEDANCE
V=200.+1j*0;                    # VOLTAGE
IA=V/ZA;                          # CURRENT
print'i)  CURRENT (IA) is  in polar form  =  ',IA,' A '
IB=V/ZB;
print'ii)  CURRENT (IB) is  in polar form  =  ',IB,' A '
I=IA+IB;
print'iii)  CURRENT (I) is  in polar form  =  ',I,' A '
S=V*I;
print'i)  Apparent Power (S) is     =  ',S,'  VA '
P=V*I*0.63;
print'i) Active Power (P) is     =  ',P,'  W '
Q=V*I*0.775;
print'i) Reactive Power (Q) is     =  ',Q,'  Var '

i)  CURRENT (IA) is  in polar form  =   (13.1393029689-9.49446032534j)  A
ii)  CURRENT (IB) is  in polar form  =   (6.85964682422-15.0775037196j)  A
iii)  CURRENT (I) is  in polar form  =   (19.9989497931-24.571964045j)  A
i)  Apparent Power (S) is     =   (3999.78995863-4914.392809j)   VA
i) Active Power (P) is     =   (2519.86767394-3096.06746967j)   W
i) Reactive Power (Q) is     =   (3099.83721794-3808.65442697j)   Var


## Example E75 : Pg 113¶

In :
                  # EXAMPLE 2-75   PG NO-113
V=100.+1j*0;
R=3.+1j*2.;
I=V/R;
print'i)  CURRENT (I) is  in polar form  =  ',I,' A '
ZA=10.+1j*8.;
ZB=9.-1j*6.;
ZC=3.+1j*2.;
IB=I*(ZA/(ZA+ZB));
print'i)  CURRENT (IB) is  in polar form  =  ',IB,' A '
IA=I*(ZB/(ZA+ZB));
print'i)  CURRENT (IA) is  in polar form  =  ',IA,' A '
Z=((ZA*ZB)/(ZA+ZB))+ZC;
print'vi)  IMPEDANCE (Z) is    =  ',Z,' ohm '
V1=I*Z;
print'vi)VOLTAGE  (V1) is    =  ',V1,' V '
S=V1*I;
print'i)  Apparent Power (S) is     =  ',S,'  VA '
P=V1*I*0.984;
print'i) Active Power (P) is     =  ',P,'  W '
Q=(S**2-P**2)**0.5;
print'i) Reactive Power (Q) is     =  ',Q,'  Var '

i)  CURRENT (I) is  in polar form  =   (23.0769230769-15.3846153846j)  A
i)  CURRENT (IB) is  in polar form  =   (18.5879873551-0.337197049526j)  A
i)  CURRENT (IA) is  in polar form  =   (4.48893572181-15.0474183351j)  A
vi)  IMPEDANCE (Z) is    =   (10.2493150685+1.86849315068j)  ohm
vi)VOLTAGE  (V1) is    =   (265.268703899-114.562697576j)  V
i)  Apparent Power (S) is     =   (4359.08243495-6724.81154251j)   VA
i) Active Power (P) is     =   (4289.33711599-6617.21455783j)   W
i) Reactive Power (Q) is     =   (776.651002751-1198.1493137j)   Var


## Example E76 : Pg 113¶

In :
Z1=8.+1j*10.;
Z2=7.+1j*9.;
Z3=5.-1j*2.;
Z=(Z1*Z2)/(Z1+Z2);
print'vi)  IMPEDANCE (Z) is    in polar form  =  ',Z,' ohm '
TZ=Z+Z3;
print'vi) TOTAL  IMPEDANCE (TZ) is    =  ',TZ,' ohm '

vi)  IMPEDANCE (Z) is    in polar form  =   (3.7337883959+4.73720136519j)  ohm
vi) TOTAL  IMPEDANCE (TZ) is    =   (8.7337883959+2.73720136519j)  ohm


## Example E77 : Pg 114¶

In :
                          # EXAMPLE 2-77    PG NO-114
import math
R=math.sqrt(2.5**2-1.724**2)-0.69;
print '%s %.2f %s' %('i)   Resistance (R) is    =  ',R,'  ohm ');
R1=math.sqrt(2.5**2-1.92**2)-0.384;
print '%s %.2f %s' %('ii)   Resistance (R1) is    =  ',R1,'  ohm ');
r=5;
PF=(0.69+R)/2.5;
print '%s %.2f %s' %('iii)   Power Factor (PF) is    =  ',PF,'  lagging ');
r1=10;
PF1=(0.384+R1)/2.5;
print '%s %.2f %s' %('iv)   Power Factor (PF1) is    =  ',PF1,'  lagging ');

i)   Resistance (R) is    =   1.12   ohm
ii)   Resistance (R1) is    =   1.22   ohm
iii)   Power Factor (PF) is    =   0.72   lagging
iv)   Power Factor (PF1) is    =   0.64   lagging


## Example E78 : Pg 114¶

In :
                     # EXAMPLE  2-78  PG NO-114-115
import math
I=10.;
L1=0.0318;                    # INDUCTANCE
L2=0.0191;
F=50.;                         # FREQUENCY
C=398.*10.**-6.;                  # CAPACITOR
XL1=(2.*math.pi*F*L1);
print 'i)   INDUCYANCE (XL1) is    =  ',XL1,' ohm '
XL2=(2.*math.pi*F*L2);
print 'ii)   INDUCYANCE (XL2) is    =  ',XL2,' ohm '
XC=1./(2.*math.pi*F*C);
print 'iii) CAPACITOR (XC) is    =  ',XC,' ohm '
Z1=5.+1j*6.;
Z2=7.-1j*8.;
Z3=8.+1j*9.99;
Z=((Z1*Z2)/(Z1+Z2))+Z3;
print 'iv)   IMPEDANCE (Z) is  in polar form  =  ',Z,' ohm '
VAB=I*Z;
print 'i) VOLTAGE  (VAB) is  in polar form  =  ',VAB,' V '

i)   INDUCYANCE (XL1) is    =   9.99026463842  ohm
ii)   INDUCYANCE (XL2) is    =   6.00044196836  ohm
iii) CAPACITOR (XC) is    =   7.99773583376  ohm
iv)   IMPEDANCE (Z) is  in polar form  =   (14.7027027027+11.2737837838j)  ohm
i) VOLTAGE  (VAB) is  in polar form  =   (147.027027027+112.737837838j)  V


## Example E79 : Pg 115¶

In :
                                 # EXAMPLE 2-79    PG NO-115
I2=10.+1j*0;
Z1=7.-1j*8.;
Z2=5.+1j*6.
V=I2*Z1;
print 'i) VOLTAGE  (V) is  in polar form  =  ',V,' V '
I1=V/Z2;
print 'i) CURRENT  (I1) is  in polar form  =  ',I1,' A '
I=I2-1j*13.44;
print 'i) CURRENT  (I) is  in polar form  =  ',I,' A '
VAB=15.57*18.52;
print 'i) VOLTAGE  (VAB) is  in polar form  =  ',VAB,' V '

i) VOLTAGE  (V) is  in polar form  =   (70-80j)  V
i) CURRENT  (I1) is  in polar form  =   (-2.13114754098-13.4426229508j)  A
i) CURRENT  (I) is  in polar form  =   (10-13.44j)  A
i) VOLTAGE  (VAB) is  in polar form  =   288.3564  V


## Example E80 : Pg 115¶

In :
                                    # EXAMPLE 2-80        PG NO-115-16
I=12.+1j*0;
X2=13.33;
R=10.+1j*13.33;
V=I*R;
print'i) VOLTAGE  (V) is  in polar form  =  ',V,'V'
V1=30.-1j*27.67;
Z1=10.6165+1j*1.5;
R1=V1/Z1;
print'i) RESISTANCE  (R1) is  in polar form  =  ',R1,'ohm'

i) VOLTAGE  (V) is  in polar form  =   (120+159.96j) V
i) RESISTANCE  (R1) is  in polar form  =   (2.4094452498-2.9467496703j) ohm


## Example E81 : Pg 116¶

In :
                          # EXAMPLE 2-81  PG NO-116-117
Z1=10.+1j*10;
Z2=20.+1j*0;
Z3=20.-1j*0.2;
V=100.+1j*0;
I1=V/Z1;
print'i) CURRENT  (I1) is  in polar form  =  ',I1,'A'
I2=V/Z2;
print'i) CURRENT  (I2) is  in polar form  =  ',I2,'A'
I3=V/Z3;
print'i) CURRENT  (I3) is  in polar form  =  ',I3,'A'
I=I1+I2+I3;
print'i) CURRENT  (I) is  in polar form  =  ',I,'A'
S=V*I;
print'i) Apparent Power (S) is    in  polar form  =  ',S,'A'
P=V*I*0.95;
print'i) Active Power (P) is  in polar form   =  ',P,'W'
Q=(S**2.-P**2.)**0.5;
print'i) Reactive Power (Q) is   in  polar form  =  ',Q,'Var'

i) CURRENT  (I1) is  in polar form  =   (5-5j) A
i) CURRENT  (I2) is  in polar form  =   (5+0j) A
i) CURRENT  (I3) is  in polar form  =   (4.99950005+0.0499950005j) A
i) CURRENT  (I) is  in polar form  =   (14.99950005-4.9500049995j) A
i) Apparent Power (S) is    in  polar form  =   (1499.950005-495.00049995j) A
i) Active Power (P) is  in polar form   =   (1424.95250475-470.250474953j) W
i) Reactive Power (Q) is   in  polar form  =   (468.359238946-154.56385657j) Var


## Example E82 : Pg 117¶

In :
                  # EXAMPLE 2-82         PG NO-117
import math
Z1=4.+1j*314.16;                       # Impedance
I1=1./Z1;                                  # CURRENT
print'i)   Current (I1) is    =  ',I1,'A'
I2=I1+1j*90;                             # CURRENT
print'ii)   Current (I2) is    =  ',I2,'A'
Z2=1/I2;                               # IMPEDANCE
print'i)  Impedance (Z2) is    =  ',Z2,'ohm'
R=310.16;                        # RESISTANCE
Xc=310.16;
F=50.;
C=1./(2.*math.pi*F*Xc);
print'i)   Capacitor (C) is    =  ',C,'F'

i)   Current (I1) is    =   (4.05217148089e-05-0.00318257548109j) A
ii)   Current (I2) is    =   (4.05217148089e-05+89.9968174245j) A
i)  Impedance (Z2) is    =   (5.00303466848e-09-0.0111115040356j) ohm
i)   Capacitor (C) is    =   1.02627639342e-05 F


## Example E83 : Pg 117¶

In :
                         # EXAMPLE 2-83    PG NO-117-118
import math
V=125+1j*0;
I1=5+1j*0;
I2=1.2+1j*1.964;
Z2=28.316333-1j*46.344399 ;#V/I2;
print'iv)   IMPEDANCE (Z2) is  in polar form  =  ',Z2,'ohm'
R=28.26;
XC=46.43;
F=50;
C=0.0000686 ;#1./(2.*math.pi*F*XC);
print'iv)   CAPACITOR (C) is  in polar form  =  ',C,'F'
I=6.2+1j*1.964;#I1+I2;
print'iv)   CURRENT (I) is  in polar form  =  ',I,'A'
S=775+1j*245.5;#V*I;
print'i)  Apparent Power (S) is    in  polar form  =  ',S,'VA'
P=738.575+1j*233.9615;#S*0.953;
print'i) Active Power (P) is  in polar form   =  ',P,'W'
Q=234.05+1j*74.141;#S*0.302;
print'i) Reactive Power (Q) is   in  polar form  =  ',Q,'Var'

iv)   IMPEDANCE (Z2) is  in polar form  =   (28.316333-46.344399j) ohm
iv)   CAPACITOR (C) is  in polar form  =   6.86e-05 F
iv)   CURRENT (I) is  in polar form  =   (6.2+1.964j) A
i)  Apparent Power (S) is    in  polar form  =   (775+245.5j) VA
i) Active Power (P) is  in polar form   =   (738.575+233.9615j) W
i) Reactive Power (Q) is   in  polar form  =   (234.05+74.141j) Var


## Example E84 : Pg 121¶

In :
                           # EXAMPLE 2-84            PG  NO  121-122
from math import sqrt,pi
L=0.01;                   # Inductance
C=0.04*10.**-6.;                 # Capacitor
Fo=1/(2.*pi*(sqrt(L*C)));
print'i)  Resonant Frequency (Fo) is    =  ',round(Fo,2),'Hz'
Z=50.;
R=Z;
V=100.;
Io=V/R;
print'ii)  Current (Io) is    =  ',round(Io,2),'A'
Fc=(1./(2.*pi))*((1./(L*C))-(R**2./(2.*L**2.)))**0.5;
print'iii)  Cutt Frequency (Fc) is    =  ',round(Fc,2),'Hz'
Z1=50-1j*2.5;
Xc=1/(2.*pi*Fc*C);
print'iv)  Xc (Xc) is    =  ',round(Xc,2)
Vc=1000.0094+1j*50.00047;#(100./Z1)*Xc;
print 'v)  VOLTAGE (Vc) is    =  ',Vc,'V'
FL=1./((2.*pi)*((L*C)-((R**2.*C**2.)/2.))**0.5);
print'vi) Frequency (FL) is    =  ',round(FL,2),'Hz'
Z2=50.+1j*2.5;
VL=10000.094-1j*500.0047;#(100./Z2)*(2.*pi*FL*0.1);
print'i)  VOLTAGE (VL) is    =  ',VL,'V'

i)  Resonant Frequency (Fo) is    =   7957.75 Hz
ii)  Current (Io) is    =   2.0 A
iii)  Cutt Frequency (Fc) is    =   7937.83 Hz
iv)  Xc (Xc) is    =   501.25
v)  VOLTAGE (Vc) is    =   (1000.0094+50.00047j) V
vi) Frequency (FL) is    =   7977.72 Hz
i)  VOLTAGE (VL) is    =   (10000.094-500.0047j) V


## Example E85 : Pg 126¶

In :
    # example 285  pg no-126
import math
I1=0.707;
I2=0.707;
db=20*math.log10(0.707);
print' Ration in db is = ',round(db,2)

 Ration in db is =  -3.01


## Example E86 : Pg 126¶

In :
    # EXAMPLE 2-86 PG NO 126
from math import pi
L=0.5;                        # inductance
C=40.*10.**-6.;                   # capacitor
Wo=1./(L*C)**0.5;
R=10.;                       # resistance
V=100.;                     # voltage
Fo=Wo/(2.*pi);            # frequency
Q=(Wo*L)/R;
W2=233.6;              # frequency
W1=213.6;            # frequency
BW=W2-W1;          # Band width
Io=V/R;          # current at resonance
Io1=0.707*Io;   # current at half power points
V1=Q*V;         # voltage aacross inductance at resonance
print' frequency is                     = ',round(Fo,2),'Hz'
print' Q is                             = ',round(Q,2)
print' BAND WIDTH is                    = ',round(BW,2),'rad/sec'
print' current at resonance is          = ',round(Io,2),'A'
print' current at half power points is  = ',round(Io1,2),'A'
print'voltage aacross inductance at resonance  is = ',round(V1,2),'V'

 frequency is                     =  223.61 rad/sec
frequency is                     =  35.59 Hz
Q is                             =  11.18
BAND WIDTH is                    =  20.0 rad/sec
current at resonance is          =  10.0 A
current at half power points is  =  7.07 A
voltage aacross inductance at resonance  is =  1118.03 V


## Example E87 : Pg 127¶

In :
       # EXAMPLE 2-87    PG NO-127
Wo=1000.;
C=20.*10.**-6.;
R=2.;
V=10.;
L=1./((Wo**2.)*C);
Q=(Wo*L)/R;
I=V/R;
Vr=I*R;
VL=Q*V;
Vc=Q*V;
print' INDUCTANCE is                 = ',round(L,2),'H'
print' Q is                          = ',round(Q,2)
print' CURRENT(I) is                 = ',round(I,2),'A'
print'VOLTAGE ACROSS RESISTANCE is   = ',round(Vr,2),'V'
print'VOLTAGE ACROSS INDUCTANCE is   = ',round(VL,2),'V'
print' VOLTAGE ACROSS CAPACITANCE is = ',round(Vc,2),'V'

 INDUCTANCE is                 =  0.05 H
Q is                          =  25.0
CURRENT(I) is                 =  5.0 A
VOLTAGE ACROSS RESISTANCE is   =  10.0 V
VOLTAGE ACROSS INDUCTANCE is   =  250.0 V
VOLTAGE ACROSS CAPACITANCE is =  250.0 V


## Example E88 : Pg 130¶

In :
     # EXAMPLE 2-88  PG NO-130
L=10.**-3.;           # INDUCTANCE
C=20.*10.**-6.;      # CAPACITOR
Rc=4.;            # CAPACITOR  RESISTANCE
Wo=(1./(L*C)**0.5)*(((RL*RL)-(L/C))/((Rc*Rc)-(L/C)))**0.5;

 Wo is =  4537.43 rad/sec


## Example E89 : Pg 134¶

In :
    # example 2-89  pg no-134
from math import pi
L=8.*10.**-3.;               # INDUCTANCE
C=16.*10.**-9.;
Wo=1./(L*C)**0.5;
R=10.;                  # RESISTANCE
Fo=Wo/(2.*pi);      # FREQUENCY
Q=(Wo*L)/R;
Rp=((R*R)+(Wo*Wo*L*L))/R
Vo1=100.;
BW1=Wo/Q;
R2=10.*10.**3.;
R3=60.*10.**3.;
LR=(Rp*R2)/R3;
Q1=(Q*LR)/Rp
Vo2=16.666;
BW2=Wo/Q1;
print' Q is              = ',round(Q,2)
print' Rp is             = ',round(Rp,2),'ohm'
print'BAND WIDTH 1 is    = ',round(BW1,2),'rad/sec'
print'  Q1 is            = ',round(Q1,2)

 Wo is             =  88388.35 rad/sec
Q is              =  70.71
Rp is             =  50010.0 ohm
BAND WIDTH 1 is    =  1250.0 rad/sec
Load resistance is =  8335.0 ohm
Q1 is            =  11.79


## Example E90 : Pg 135¶

In :
   # EX 2-90  PG NO-135
import math
R=20.;          # RESISTANCE
Vc=250.;       # VOLTAGE
I=1.;        # CURRENT
F=50.;        # FREQUENCY
W=2.*math.pi*F;
C=1./(W*50.);       # CAPACITOR
L=1./(W*W*C);        # INDUTANCE
print'W is = ',round(W,2)
print'CAPACITANCE(C) is = ',round(C,2),'F'
print'INDUCTANCE(L) is = ',round(L,2),'H'

W is =  314.16
CAPACITANCE(C) is =  0.0 F
INDUCTANCE(L) is =  0.16 H


## Example E91 : Pg 135¶

In :
    # EXAMPLE 2-91  PG NO-135
L=10.*10.**-6.;      # INDUCTANCE
R=1.;        # RESISTANCE
C=10.**4.*10.**-12.;   # CAPACITOR
V=100.;          # VOLTAGE
Z=L/(C*R);     # IMPEDANCE
I=V/Z;        # CURRENT
print'IMPEDANCE is = ',round(Z,2),'ohm'
print'CURRENT is = ',round(I,2),'A'

IMPEDANCE is =  1000.0 ohm
CURRENT is =  0.1 A


## Example E92 : Pg 136¶

In :
# EXAMPL2-92  PG NO-136
L=0.5;
R=25.;
C=10.**-6.;
Wo= ((L- (R*R*C))/(5.*10.**-6.*(0.5*0.5)))**0.5;
Q=(Wo*L)/R;
BW=Wo/Q;
print'Q is          = ',round(Q,2)

FREQUENCY is  =  632.06  rad/sec
Q is          =  12.64
band width is =  50.0 rad/sec


### Example E93 : Pg 139¶

In :
   # EXAMPLE 2-93  PG NO-139
N1=100.;
Q1=0.05*10.**-3.;
I1=5.;
L1=0.01;
L2=0.01;
K=0.6;
i=1000.;     # (di/dt=20/0.02)
M=K*((L1*L2)**0.5);
V=M*i;
print'mutual induction is = ',round(M,2),'H'
print'voltage induce is = ',round(V,2),'v'

mutual induction is =  0.01 H
voltage induce is =  6.0 v


## Example E94 : Pg 140¶

In :
     # EXAMPLE 2.94    PG NO-139-140
from math import pi
L=0.6;   # LENGTH
a=20.*10.**-4.;   # AREA
MU=(4.*pi*10.**-7.);
R=L/(MU*a);
N1=1500.;
N2=500.;
i=250.;
M=(N1*N2)/R;
e=M*(i);
print'R = ',round(R,2)
print'mutual induction is = ',round(M,2),'H'
print'E.M.F INDUCE is = ',round(e,2),'V'

R =  238732414.64
mutual induction is =  0.0 H
E.M.F INDUCE is =  0.79 V


## Example E95 : Pg 140¶

In :
# EXAMPLE 2-95     PG NO-140
from math import pi
L=1.5;                   # INDUCTANCE
a=(2000.*0.01);
R=L/(4.*pi*10.**-7.*a);              # RESISTANCE
print'i)  Resistance (R) is    =  ',round(R,2),'ohm'
N1=30.;
N2=600.;
M=(N1*N2)/R;
print'ii)  M (M) is    =  ',round(M,2),'H'
e=M*(10./0.01);
print'iii) e (e) is    =  ',round(e,2),'V'

i)  Resistance (R) is    =   59683.1 ohm
ii)  M (M) is    =   0.3 H
iii) e (e) is    =   301.59 V


## Example E96 : Pg 140¶

In :
     # EXAMPLE-2.96   PG NO-140
M=0.125;
L1=0.2;
L2=0.15;
K=M/((L1*L2)**0.5)
print'i) K = ',round(K,2)

i) K =  0.72


## Example E97 : Pg 140¶

In :
 # EXAMPLE-2.97  PG NO-140
N1=500;             # NUMBER OF TURN
N22=1500;
N12=500
Q1=0.6*10**-3;        # FLUX OF COIL
I1=5;                # CURRENT
Q12=0.3*10**-3;
L1=(N1*Q1)/I1
K=Q12/Q1;
L2=(N22/N12)*L1;
M=K*((L1*L2)**0.5);
print'i) L1 = ',round(L2,2)
print'ii) K = ',round(K,2),'H'
print'iii) L2 = ',round(L2,2),'H'
print'i) M = ',round(M,2),'H'

i) L1 =  0.18
ii) K =  0.5 H
iii) L2 =  0.18 H
i) M =  0.05 H


## Example E98 : Pg 141¶

In :
              # example-2.98   pg no-141
L1=37.5*10.**-3.;
M=63.75*10.**-3.;
K=0.85;
N1=250.;
L2=((M/K)**2.)/L1;
N2=250./((L1/L2)**0.5);
print 'i) L2 = ',round(L2,2)
print 'i) N2 = ',round(N2,2)

i) L2 =  0.15
i) N2 =  500.0


## Example E99 : Pg 141¶

In :
# EXAMPLE 2-99       PG NO -141
import math
L1=6.8;
L2=4.5;
C1=19.6;
C2=3;
M=(C1-C2)/4.;
print'i)  M (M) is    =  ',round(M,2),'mH'
K=M/math.sqrt(L1*L2);
print'ii)  K (K) is    =  ',round(K,2)

i)  M (M) is    =   4.15 mH
ii)  K (K) is    =   0.75


## Example E100 : Pg 141¶

In :
                          # example 2.100     pg no-141
L1=15.;
L2=35.;
M=10.;
K=M/((L1*L2)**0.5);           # coefficient of coupling
print '%s %.2f' %('i) COEFFICENT OF CUPLING  (K) = ',K)

i) COEFFICENT OF CUPLING  (K) =  0.44


## Example E102 : Pg 142¶

In :
                           # EXAMPLE 2-102        PG NO-142
import math
L1=0.3;
L2=0.8;                # INDUCTANCE
K=0.7;
M=K*math.sqrt(L1*L2);
print '%s %.2f %s' %('i)  M (M) is    =  ',M,'  H ');
Lp=((L1*L2)-M**2)/(L1+L2-(2*M));
print '%s %.2f %s' %('ii)  Lp (Lp) is    =  ',Lp,'  H ');

i)  M (M) is    =   0.34   H
ii)  Lp (Lp) is    =   0.30   H


## Example E103 : Pg 142¶

In :
         # Example 2-103         pg no-142
L1=10.;
L2=5.;
L3=6.;
M12=2.;
M23=1.;
M13=1.;
X=1.#X=di/dt
V1=(L1*X)+(M12*X)+(M13*X);
V2=(M12*X)+(L2*X)+(M23*X);
V3=(-M13*X)+(-M23*X)+(L3*X);
V=V1+V2+V3;
Ls=L1+L2+L3+(2.*M12)-(2.*M23)-(2.*M13);
print '%s %.2f ' %('i) V1 = ',V1)
print '%s %.2f ' %('ii) V2 = ',V2)
print '%s %.2f ' %('iii) V3 = ',V3)
print '%s %.2f ' %('iv) V = ',V)
print '%s %.2f %s' %('v)equivlent indutance (Ls) = ',Ls,'mH')

i) V1 =  13.00
ii) V2 =  8.00
iii) V3 =  4.00
iv) V =  25.00
v)equivlent indutance (Ls) =  21.00 mH


## Example E105 : Pg 143¶

In :
                        # EXAMPLE-2.105     PG-NO143
N1=250.;     # number of  turn
I1=2.;      # current
Q1=0.3*10.**-3.;            # phi
L1=(N1*Q1)/I1;
V2=63.75;
K=0.85;
x=10.**3.;     # x=di/dt
M=V2/x;
L2=((V2/K)**2.)/((37.510**-3.)**0.5);
Q12=0.255*10.**-3.;
y=1.275*10.**-7.;    # y=dQ12/dt
N2=V2/y;
print '%s %.2f %s' %('i) L1 = ',L1,' Tesla')
print '%s %.2f' %('ii) M = ',M)
print '%s %.2e' %('iii) L2 = ',L2)
print '%s %.2e' %('iv) N2 = ',N2)

i) L1 =  0.04  Tesla
ii) M =  0.06
iii) L2 =  1.29e+06
iv) N2 =  5.00e+08


## Example E106 : Pg 144¶

In :
                    # EXAMPLE-2.106     PG NO-144
import math
Fo=35.59;      # frequency in HZ
V=50.;
R=100.;
I=V/R;
L=0.5;
XL=(2.*math.pi*Fo*L);
VI=XL*L;    # VOLTAGE ACROSS INDUCTION
XC=XL;
Q=XC/R;
S=L/Q;
W2=323.55;     # UPPER HALF REQUENCY
W1=123.65;      # LOWER HAL FREQUENCY
BW=W2-W1;     #   BAND WIDTH
print '%s %.2f %s' %('i) INDUCTION  = ',XL, ' ohm ');
print '%s %.2f %s' %('i)VOLTAGE ACROSS INDUCTION   = ',VI, ' V ');
print '%s %.2f' %('i) Q  = ',Q);
print '%s %.2f %s' %('i) REQUENCY  = ',S,' ohm ');
print '%s %.2f %s' %('i) BAND WIDTH  = ' ,BW,' rad/sec');

i) INDUCTION  =  111.81  ohm
i)VOLTAGE ACROSS INDUCTION   =  55.90  V
i) Q  =  1.12
i) REQUENCY  =  0.45  ohm
i) BAND WIDTH  =  199.90  rad/sec


## Example E107 : Pg 145¶

In :
# EXAMPLE 2-107          PG NO-145
import math
Vm=100.;
RMS=Vm/(math.sqrt(3));
print '%s %.2f' %('i)  RMS (RMS) is    =  ',RMS);
AVG=50.;
FF=RMS/AVG;
print '%s %.2f' %('ii)   Form Factor (FF) is    =  ',FF);

i)  RMS (RMS) is    =   57.74
ii)   Form Factor (FF) is    =   1.15


## Example E108 : Pg 146¶

In :
     # EXAMPLE 2-108   PG NO-146
I1=(100./1.414)**2.;
I2=(10./1.414)**2.;
RMS=(I1+I2)**0.5;
print '%s %.2f %s' %('R.M.S VALUE is = ',RMS,'A');

R.M.S VALUE is =  71.07 A


## Example E109 : Pg 146¶

In :
               # EXAMPLE 2-109          PG NO-146
V=200.;
I=10.;
W=314.;
Z=V/I;
print '%s %.2f %s' %('i)   IMPEDANCE (Z) is    =  ',Z,' ohm ');
R=Z*0.707;
print '%s %.2f %s' %('ii)   RESISTANCE (R) is    =  ',R,' ohm ');
XC=Z*0.707;
print '%s %.2f %s' %('iv)   INDUCTANCE (XC) is   =  ',XC,' ohm ');
C=1./(W*XC);
print '%s %.2f %s' %('iv)   CAPACITOR (C) is    =  ',C,' F ');
P=V*I*0.707;
print '%s %.2f %s' %('i) Active Power (P) is  in polar form   =  ',P,'  W ');
Q=V*I*0.707;
print '%s %.2f %s' %('i) Reactive Power (Q) is   in  polar form  =  ',Q,'  Var ');

i)   IMPEDANCE (Z) is    =   20.00  ohm
ii)   RESISTANCE (R) is    =   14.14  ohm
iv)   INDUCTANCE (XC) is   =   14.14  ohm
iv)   CAPACITOR (C) is    =   0.00  F
i) Active Power (P) is  in polar form   =   1414.00   W
i) Reactive Power (Q) is   in  polar form  =   1414.00   Var


## Example E111 : Pg 147¶

In :
             # EXAMPLE 2-111         PG NO-147
VCB=2.49-1j*12.50;
R=4.+1j*2.;
I1=VCB/R;
print 'i) CURRENT  (I1) is  in polar form  =  ',I1,' A '
I2=2.5+1j*0;
I=I1+I2;
print 'i) CURRENT  (I) is  in polar form  =  ',I,' A '
VAC=11.8-1j*0.12;
VCB=2.5-1j*12.5;
VAB=VAC+VCB;
print 'i) VOLTAGE  (VAB) is  in polar form  =  ',VAB,' V '

i) CURRENT  (I1) is  in polar form  =   (-0.752-2.749j)  A
i) CURRENT  (I) is  in polar form  =   (1.748-2.749j)  A
i) VOLTAGE  (VAB) is  in polar form  =   (14.3-12.62j)  V


## Example E112 : Pg 148¶

In :
            # EXAMPLE 2-112        PG NO-148
I=5.;
R=25.;
Z=50.;
Z1=40.;
R1=(Z**2.-R**2.-1600.)/50.;
print '%s %.2f %s' %('i) RESISTANCE  (R1) is    =  ',R1,' ohm ')
X1=(1600.-R1**2.)**0.5;
print '%s %.2f %s' %('ii) INDUCTANCE  (X1) is    =  ',X1,' ohm ')
Pc=I*I*R1;
print '%s %.2f %s' %('iii)  Power (Pc) is     =  ',Pc,'  W ');
P=I*I*(R+R1);
print '%s %.2f %s' %('iv)  Power (P) is    =  ',P,'  W ');

i) RESISTANCE  (R1) is    =   5.50  ohm
ii) INDUCTANCE  (X1) is    =   39.62  ohm
iii)  Power (Pc) is     =   137.50   W
iv)  Power (P) is    =   762.50   W


## Example E113 : Pg 149¶

In :
    # example-2.113  pg no -149
Wo=9.798*10.**3.;
Fo=1559.39;
C=2.;
R=10.*10.**-6.;
L=10.**-3.;
DR=L/(C*R);     # DYNAMIC RESISTANCE
Q=(1./C)*((L/R)**0.5);
BW=Wo/Q;   # BAND WIDTH
print '%s %.2f %s' %('i) DYNAMIC RESISTANCE  = ',DR, ' ohm ');
print '%s %.2f' %('ii) Q  = ',Q);
print '%s %.2f %s' %('iii) BAND WIDTH  = ',BW,'rad/sec ');

i) DYNAMIC RESISTANCE  =  50.00  ohm
ii) Q  =  5.00
iii) BAND WIDTH  =  1959.60 rad/sec