# EXAMPLE 5-1 PG NO-294
TR1=32.;
R1=20.;
R2=30.;
R3=20.;
V=32.;
Ir11=V/TR1;
Ir12=Ir11*(R1/(R1+R2));
Ir13=Ir11*(R2/(R1+R3));
TR2=40.;
Ir2=R3/TR2;
Ir1=(R3/TR2)*Ir2;
Ir3=(R3/TR2)*Ir1;
Ir3=Ir13+Ir3;
Ir1=Ir11-Ir1;
Ir2=Ir12-Ir2;
print '%s %.2f %s' %('i) current(Ir3) is = ',Ir3,'A ');
Ir3=Ir13+Ir3;
print '%s %.2f %s' %('i) current(Ir1) is = ',Ir1,'A ');
Ir1=Ir11-Ir1;
print '%s %.2f %s' %('i) current(Ir2) is = ',Ir2,'A ');
Ir2=0.5-0.4;
# EXAMPLE 5-2 PG NO-295
Vab1=7.059;
Vab2=2.353;
Vab=Vab1+Vab2;
print '%s %.2f %s' %('i) Votage(Vab) is = ',Vab,'V ');
# EXAMPLE 5-3 PG NO-296
TR1=(90./14.); # TOTAL RESISTANCE
R1=8.;
R2=6.;
R3=3.;
E1=10.; # VOLTS
IR11=E1*(1./TR1); # Current in resistance one
IR12=IR11*(R1/(R1+R2)); # Current in resistance Two
IR13=IR11*(R2/(R1+R2)); # Current in resistance one
IR14=0;
TR2=10.; # TOTAL RESISTANCE
IR23=TR2/E1;
IR21=IR23*(R2/(R2+R3));
IR22=IR23*(R3/(R2+R3));
IR24=0;
IR34=(10./12.);
IR32=TR2/(R2+(R3*R1/11.));
IR31=IR32*(R1/(R1+R3));
IR33=IR32*(R3/(R1+R3));
IR1=(14.-6.-8.)/9.;
IR2=(8.+3.-11.)/9.;
IR3=(6.+3.)/9.-1.;
IR4=IR34+0+0;
print'i) CURRENT IN RESISTANCE ONE is = ',IR11,'V ';
print'i) CURRENT IN RESISTANCE ONE is = ',IR12,'V '
print'i) CURRENT IN RESISTANCE ONE is = ',IR13,'V '
print'i) CURRENT IN RESISTANCE ONE is = ',IR14,'V '
print'i) CURRENT IN RESISTANCE ONE is = ',IR21,'V '
print'i) CURRENT IN RESISTANCE ONE is = ',IR22,'V '
print'i) CURRENT IN RESISTANCE ONE is = ',IR23,'V '
print'i) CURRENT IN RESISTANCE ONE is = ',IR24,'V '
print'i) CURRENT IN RESISTANCE ONE is = ',IR31,'V '
print'i) CURRENT IN RESISTANCE ONE is = ',IR32,'V '
print'i) CURRENT IN RESISTANCE ONE is = ',IR33,'V '
print'i) CURRENT IN RESISTANCE ONE is = ',IR34,'V '
print'i) CURRENT IN RESISTANCE ONE is = ',IR1,'V '
print'i) CURRENT IN RESISTANCE TWO is = ',IR2,'V '
print'i)CURRENT IN RESISTANCE THREE is = ',IR3,'V '
print'i) CURRENT IN RESISTANCE FOUR is = ',IR4
E1=100.+1j*0;
E2=43.30+1j*25
Z1=1.+1j*3.;
Z2=1.-1j*3.;
Z3=2.+1j*4.;
Z4=3.-1j*3.;
Z5=1.+1j*5.;
Z6=2.-1j*8.;
Iab1=E1/((Z1+Z2)+((Z3*Z4)/(Z3+Z4)));
I2=E2/((Z5-Z6)+((Z3*Z1+Z2)/(Z3+Z1+Z2)));
Iab2=(I2*Z3)/(Z3+Z1+Z2)
print 'i) CURRENT (Iab1) is = ',Iab1,'A '
print 'i) CURRENT (I2) is = ',I2,'A '
print 'i) CURRENT (Iab2) is = ',Iab2,'A '
# EXAMPLE 5-6 PG NO=299-300
TZ1=54.90+1j*85.;
Z1=40.+1j*0;
Z2=250.-1j*132.625;
Z3=0-1j*132.625;
IR1=(Z1/TZ1)*(Z3/Z2);
print ' CURRENT is in polar form = ',IR1,'A'
TZ2=173.64+1j*48.84;
Z4=20.+1j*0;
Z5=250.+1j*377.;
Z6=0+1j*377.;
IR2=(Z4/TZ2)*(Z6/Z5);
print ' CURRENT is in polar form = ',IR2,'A'
IR=(IR1**2+IR2**2)**0.5;
print ' CURRENT is in polar form = ',IR,'A'
# EXAMPLE 5-7 PG NO-300
IR1=0.185; # current
IR2=0.0924; # current
R=250.; # Resistance
P1=IR1*IR1*R; # POWER
P2=IR2*IR2*R; # POWER
P=P1+P2; # POWER
print '%s %.2f %s' %('i) POWER (P1) is = ',P1,'W ');
print '%s %.2f %s' %('i) POWER (P2) is = ',P2,'W ');
print '%s %.2f %s' %('i) POWER (P) is = ',P,'W ');
# EXAMPLE 5-8 PG NO-301
Vcb=40./7.;
Vth=-6.2857;
RTH=9.4286;
R=10.;
I=-Vth/(R+RTH);
print '%s %.2f %s' %(' CURRENT is in polar form = ',I,'A');
# EXAMPLE 5-9 PG NO-302
V=10.; # Voltage
S=0.5*10.**-5.;
R1=2500.;
R2=1050.;
R3=200.;
R4=500.;
Van=(V/(R1+R4))*R4;
Vbn=(V/(R2+R3))*R3;
VTH=Van-Vbn;
RTH=((R1*R4)/(R1+R4))+((R2*R3)/(R2+R3));
I=VTH/(RTH+100.);
GD=I/S; # Galvonater Deflection
print '%s %.2f %s' %('i) voltage (Van) is = ',Van,'V ');
print '%s %.2f %s' %('i) Voltage (Vbn) is = ',Vbn,'V ');
print '%s %.2f %s' %('i) Voltage (VTH) is = ',VTH,'V ');
print '%s %.2f %s' %('i) Resistance (RTH) is = ',RTH,'ohms ');
print '%s %.2e %s' %('i) CURRENT (I) is = ',I,'A ');
print '%s %.2f %s' %('i) Galvoneter Deflection (GD) is = ',GD,'mm ');
# EXAMPLE 5-10 PG NO-303
I1=(58./21.);
R1=2.;
R2=5.;
R3=15.;
VTH=R1+I1; # Thevenins Voltage
RTH=(1.*(R2+R3))/(1.+(R2+R3)); # Thevenins resistance
I=VTH/(10.+RTH); # CURRENT
P=I*I*10.; # POWER
print '%s %.2f %s' %('i)Thevenins voltage (VTH) is = ',VTH,'V ');
print '%s %.2f %s' %('i) Thevenins resistance (RTH) is = ',RTH,'ohm ');
print '%s %.2f %s' %('i) current (I) is = ',I,'A ');
print '%s %.2f %s' %('i) power (P) is = ',P,'W ');
# EXAMPLE 5-11 PG NO-303
X=8.+1j*8.; # X=I1/V1;
X1=0+1j*30./25.+1j*80.; # X1=Va/V1;
V1=(20.*(25.+1j*80.))/(0+1j*30.);
print ' VOLTAGE is in polar form = ',V1,'V'
# EXAMPLE 5-12 PG NO304-305
I2=0.411+1j*0;
VTH=5+1j*0-(I2*5.);
ZTH=1./(1.+(1./2.)+(1./5.));
Iab=VTH/(ZTH+(2.+1j*2.));
print 'i) VOLTAGE (VTH) is in polar form = ',VTH,'V '
print 'i) IMPEDANCE (ZTH) is in polar form = ',ZTH,'ohms '
print 'i) Current (Iab) is in polar form = ',Iab,'A '
# EXAMPLE 5-14 PG NO-306
V1=120.;
V2=65.;
R1=40.;
R2=60.;
IN=(V1/R1)+(V2/R2);
RN=(R1*R2)/(R1+R2);
IRL=IN*(RN/(RN+11.));
print '%s %.2f %s' %('i) Current (IN) is = ',IN,'A ');
print '%s %.2f %s' %('i) Current (RN) is = ',RN,'ohms ');
print '%s %.2f %s' %('i) Current (IRL) is = ',IRL,'A ');
# EXAMPLE 5-15 PG NO-306
I2=-0.67;
R1=8.;
R2=2.;
R3=5.;
RN=R1+((R2*R3)/(R2+R3));
I=-I2*(RN/(10.+RN));
print '%s %.2f %s' %('i) Resistance (RN) is = ',RN,'ohm ');
print '%s %.2f %s' %('i) Current3 (I) is = ',I,'A ');
# EXAMPLE 5-16 PG NO-307
Z1=2.828+1j*2.828;
Z2=0+1j*2.5;
R=10.;
Z3=3.+1j*4.;
IN=Z1+Z2;
ZN=(R*Z3)/(R+Z3);
print 'i) current (IN) is = ',IN,'A '
print 'i) impedance (ZN) is = ',ZN,'ohms '
# EXAMPLE 5-17 PG NO-307-308
Z1=60.+1j*0;
Z2=15.6-1j*9.;
Z3=10.42-1j*6.;
Z4=25.98-1j*15.;
Z5=11.92-1j*1.4;
I=2.5*10.**-3.;
Vab=((Z1*Z2)/(Z3+Z2));
ZTH=(Z3*Z2)/(Z3+Z2);
Vax=I*Z3*10.**3.;
Vxy=Vab-Z4;
Zxy=ZTH+Z3;
IN=Z5/(Zxy*10.**3.);
ZN=Zxy;
print 'i) Voltage (Vab) is = ',Vab,'V'
print 'i) Impedance (ZTH) is = ',ZTH,'K ohms '
print 'i) Voltage (Vax) is = ',Vax
print 'i) Voltage (Vxy) is = ',Vxy,'V'
print 'i) Impedance (Zxy) is = ',Zxy,'K ohms '
print 'i) Current (IN) is = ',IN,'A'
print 'i) Impedance (ZN) is = ',ZN,'K ohms '
# example 5-18 pg no-308-309
V=120.;
R1=1200.;
R2=400.;
Vab=(V*R1)/(R1+R2);
Rab=(R1*R2)/(R1+R2);
IN=40./450.;
RN=450.;
print '%s %.2f %s' %('i) Voltage (Vab) is = ',Vab,'V ');
print '%s %.2f %s' %('i) Resistance (Rab) is = ',Rab,' ohms ');
print '%s %.2f %s' %('i) Current (IN) is = ',IN,' mA');
print '%s %.2f %s' %('i) Resistance (RN) is = ',RN,' ohms ');
# EXAMPLE -19 PG NO-312
V=360.;
R1=150.;
R2=30.;
Pm=900.;
RL=25.;
VTH=(V*R1)/(R1+R2);
RTH=(R1*R2)/(R1+R2);
TR=30.+((R1*RL)/(R1+RL)); # total resistance
I=V/TR; # Current supplied by battery
P=V*7.; # Power supplied by battery
PL=Pm*100./P # Percentage of power delivered to load
print '%s %.2f %s' %('i) Voltage (VTH) is = ',VTH,'V ');
print '%s %2f %s' %('i) Resistance (RTH) is = ',RTH,' ohms ');
print '%s %.2f %s' %('i) Total resistance (TR) is = ',TR,' ohms');
print '%s %.2f %s' %('i) Current (I) is = ',I,' A ');
print '%s %.2f %s' %('i) power (P) is = ',P,' W ');
print '%s %.2f %s' %('i) Percentage of power (PL) is = ',PL,' % ');
# EXAMPLE 5-20 PG NO -313
Z1=5.+1j*0;
Z2=4.-1j*3.;
Z3=3.+1j*3.;
Z4=1j*3.;
VTH=((Z1)/(3.+(((Z4*Z2)/(Z3-Z4)))))*(Z4/(Z3-Z4))*(-Z4);
print 'i) Voltage (VTH) is = ',VTH,'V '
# EXAMPLE 5-21 PG NO -313-314
Z1=8.66+1j*5.;
Z2=1j*1.;
VTH=Z1-(Z1-1.)*0.9;
ZTH=Z2+((9.*1.)/(9.+1.));
I=VTH/((0.9+1j*1.)+(0.9-1j*1.));
P=1.02**2.*0.9;
print 'i) Voltage (VTH) is = ',VTH,' V '
print 'i) Impedance(ZTH) is = ',ZTH
print 'i) Current (I) is = ',I,'A '
print 'i) Power (VTH) is = ',P,' W '
# EXAMPLE 5-22 PG NO-315-316
I1=100.;
I2=80.;
I3=5.;
R1=100.;
R2=50.;
R3=200.;
IN=I1+I2-I3;
X=1./R1+1./R2+1./R3;
#1/RN=X
RN=X;
VTH=IN*RN;
RTH=RN,
print 'i) Voltage (VTH) is = ',IN,'V'
print 'i) Voltage (VTH) is = ',1/RN,'V'
print 'i) Voltage (VTH) is = ',VTH,'V'
print 'i) Voltage (VTH) is = ',RTH,'V'
# EXAMPLE 5-23 PG -NO 316-317
V11=-5.;
V12=5.;
V13=0;
G1=1./2200.;
G2=1./3300.;
G3=1./1500.;
VO1=((V11*G1)+(V12*G2)+(V13*G3))/(G1+G2+G3);
V21=-5.;
V22=10.;
V23=0;
VO2=((V21*G1)+(V22*G2)+(V23*G3))/(G1+G2+G3);
print '%s %.2f %s' %('i) Voltage (VO1) is = ',VO1,'V ');
print '%s %.2f %s' %('i) Voltage (VO2) is = ',VO2,'V ');
Z1=10+1j*0;
Z2=99.33-1j*49.09222;
Z3=20+1j*0;
Z4=10+1j*20;
Z5=20.03+1j*30.03;
Z6=15+1j*20;
Z7=89.32-1j*49.105;
IN=Z1+Z2-Z3;
ZN=1/((1/Z4)+(1/Z5)+(1/Z6));
VTH=(Z7/1000)*ZN;
ZTH=ZN
print'i) Current (IN) is in rectangular form = ',IN,'V '
print'i) Impedance (1/ZN) is in rectangular form = ',1/ZN,'V '
print'i) Voltage (VTH) is in rectangular form = ',VTH,'V '
print'i) Impedance (ZTH) is in rectangular form = ',ZTH,'ohm '
# EXAMPLE 5-25 PG NO-318-319
I1=4.4-1j*1.012; # Current
I2=I1*((1j*5.)/(3.+1j*9.));
Z1=1.;
I11=(I2/(10.*1j*5.))*(1j*5./10.+1j*5.);
print' Current is in polar form = ',I1,'A'
print' Current is in polar form = ',I2,'A'
print' Current is in polar form = ',I11,'A'
I12=I1-I11;
print' Current is in polar form = ',I12,'A'
# EXAMPLE 5-26 PG NO-319-320
import numpy as np
Z1=70.71+1j*70.71;
Z2=10.+1j*5.;
Z3=-1j*5.;
Z4=1j*5.;
Z5=5.-1j*5.;
X1=9.;#np.matrix('Z2 Z3 Z1;Z3 10 0;0 Z4 0');
X2=9.;#np.matrix('Z2 Z3 0;Z3 10 Z4;0 Z4 Z5');
X3=9.;#np.matrix('0 Z3 0;0 10 Z4;Z1 Z4 Z5');
X4=9.;#np.matrix('Z2 Z3 0;Z3 10 Z4;0 Z4 Z5');
I3=X1/X2;
I1=X3/X4;
print'i) Current (I3) is in polar = ',I3,' A '
print'i) Current (I1) is in polar = ',I1,' A '
# EXAMPLE 5-27 PG NO-321
Z1=(6.-1j*2.41); # Impedance
Z2=(0-1j*9.64); # Impedance
Z3=4.+1j*0; # Impedance
Z4=2.+1j*0; # Impedance
Z5=0-1j*2.41; # Impedance
Za=Z2/Z1; # Impedance
Zb=(Z3*Z4)/Z1; # Impedance
Zc=(Z4*Z5)/Z1; # Impedance
print'i) Impedance (Za) is in polar = ',Za,' ohms '
print'ii) Impedance (Zb) is in polar = ',Zb,' ohms '
print'iii) Impedance (Zc) is in polar = ',Zc,' ohms '
# EXAMPLE 5-28 PG NO-322
Z1=0.6-1j*1.2;
Z2=0.6-1j*1.2;
Z3=1.2+1j*0.6;
Z=Z1+(((Z2+3.)*(Z3+1j*3.))/(Z2+3.+Z3+1j*3.));
print'i) Impedance (Z) is in polar = ',Z,' ohms'
# EXAMPLE 5-29 PG NO 323
V1=5.; # Voltage
V2=0.05; # Voltage
R1=100.; # Resistance
R2=1000.; # Resistance
R3=85.;
R4=880.;
I1=0.00266; # Current
I2=0.02676; # Current
Va=V1-R1*I2;
Vb=V1-R2*I1;
VTH=Va-Vb;
RTH=((R1*R3)/(R1+R3))+(R2*R4)/(R2+R4)
I=(0.016)/(RTH+20.);
print'i) Voltage (Va) is in polar = ',Va,' V '
print'i) Voltage (Vb) is in polar = ',Vb,' V '
print'i) Voltage (VTH) is in polar = ',VTH,' V '
print'i) Resistance (RTH) is in polar = ',RTH,' ohms'
print'i) Current (I) is = ',I,' A ',
# EXAMPLE 5-30 PG NO 324-325
V=25.; # Voltage
R1=50.; # RESISTANCE
R2=35.; # RESISTANCE
R3=60.; # RESISTANCE
R4=10.;
VTH=V-(R1*(R2/R3)); # THEVENINS VOLTAGE
RTH=(R1*R4)/R3;
I40=-(VTH/(40.+RTH));
V40=40.*I40;
print '%s %.2f %s' %('i) Impedance (VTH) is = ',VTH,' V ');
print '%s %.2f %s' %('i) Impedance (RTH) is = ',RTH,' ohm ');
print '%s %.2f %s' %('i) Impedance (I40) is = ',I40,' A ');
print '%s %.2f %s' %('i) Impedance (V40) is = ',V40,' V ');
# EXAMPLE 5-31 PG NO-326;
V=25.;
R1=50.;
R2=40.;
R3=10.;
I=(V/(R1+((R2*R3)/(R2+R3))))*(R3/(R2+R3));
print '%s %.2f %s' %('i) Current (I) is = ',I,' A ');
# EXAMPLE 5-32 PG NO=326
V1=60.; # VOLTAGE
V2=50.; # VOLTAGE
V3=100.; # VOLTAGE
R1=60.; # RESISTANCE
R2=30.; # RESISTANCE
R3=40.; # RESISTANCE
VTH=V2+(R2*(2./3.))-(R1*1.);
RTH=((R1*R2)/(R1+R2))+((R1*R3)/(R1+R3));
RL=RTH;
I=VTH/(RTH+RTH); # CURRENT
P=(I*I)*RL; # POWER
print '%s %.2f %s' %('i) Voltage (VTH) is = ',VTH,' V ');
print '%s %.2f %s' %('i) Resistance (RTH) is = ',RTH,' ');
print '%s %.2f %s' %('i) Load Resistance (RL) is = ',RL,' ohm ');
print '%s %.2f %s' %('i) Current (I) is = ',I,' A ');
print '%s %.2f %s' %('i) Power (P) is = ',I,' W ');
# EXAMPLE 5-33 PG NO=327
R1=15.; # RESISTANCE
R2=8.; # RESISTANCE
R3=12.; # RESISTANCE
R4=10.;
R5=5.14;
R6=7.429;
R7=32.74;
V=60.;
Ra=(R1*R2)/ (R1+R2+R3);
Rb=(R3*R2)/(R1+R2+R3);
Rc=(R1*R3)/(R1+R2+R3);
TR=R4+R5+((R6*R7)/(R6+R7)); # TOTAL RESISTANCE
I=V/TR
print '%s %.2f %s' %('i) Resistance (Ra) is = ',Ra,' ohms ');
print '%s %.2f %s' %('i) Resistance (Rb) is = ',Rb,' ohms ');
print '%s %.2f %s' %('i) Resistance (Rc) is = ',Rc,' ohms ');
print '%s %.2f %s' %('i) Total Resistance (TR) is = ',TR,' ohms ');
print '%s %.2f %s' %('i) Current (I) is = ',I,' A ');
# EXAMPLE 5-34 PG NO-327-328
V=10.;
R1=1.;
R2=2.;
R3=8.5;
VTH=V*(R1/R2); # Thevenins Voltage
RTH=R2+((R1*R1)/(R1+R1))+R2; # Thevenins Resistance
Pmax=(5./9.)**2.*RTH;
TR=R1+((R1*R3)/(R1+R3)); # Total Resistance
TP=V*(V/TR); # Total Power
print '%s %.2f %s' %('i) Voltage (VTH) is = ',VTH,' V ');
print '%s %.2f %s' %('i) Resistance (RTH) is = ',RTH,' ohms ');
print '%s %.2f %s' %('i) Power (Pmax) is = ',Pmax,' W ');
print '%s %.2f %s' %('i) Total resistance (TR) is = ',TR,' ohms ');
print '%s %.2f %s' %('i) Total Power (TP) is = ',TP,' W ');
# EXAMPLE 5-35 PG NO-328-329
Va=6.; # VOLTAGE at PONT A
Vb=-3.; # VOLTAGE at POINT B
VTH=Va-Vb;
R1=1.;
R2=2.;
R3=3.;
RTH=((R2*R3)/(R2+R3))+((R1*R3)/(R1+R3));
print '%s %.2f %s' %('i) Voltage (VTH) is = ',VTH,' V ');
print '%s %.2f %s' %('i) Resistance (RTH) is = ',RTH,' ohm ');
# EXAMPLE 5-36 PG NO=329
I1=-10.; # CURRENT
Vpc=15.;
I2=7.5;
Vqc=I2*1.;
print '%s %.2f %s' %(' Voltage is = ',Vqc,'V');
Vpq=Vpc-Vqc;
print '%s %.2f %s' %(' Voltage is = ',Vpq,'V');
RTH=1.406;
Pmax=(I2/(2.*RTH))**2.*RTH;
print '%s %.2f %s' %(' Power is = ',Pmax,'W');
# EXAMPLE 5-37 PG NO-330-331
R=8.;
R1=12.67;
R2=4.;
R3=10.;
R4=3.077;
R5=13.077;
R50=9.9; # RESISTANCE AT 50 V BATTERY
V=50.; # VOLTAGE
I1=V/R50; # CURRENT
I=I1*(R/(R+R1));
print '%s %.2f %s' %(' Current is (I1) = ',I1,'A');
print '%s %.2f %s' %(' Current is (I) = ',I,'A');
R100=R+((R2*(R3+R4))/(R2+R3+R4));
print '%s %.2f %s' %(' Resistance at 100 (R100) is = ',R100,'ohm');
I2=100./R100;
print '%s %.2f %s' %(' Current is (I2) = ',I2,'A');
I3=((I2*R2)/(R2+R5));
print '%s %.2f %s' %(' Current is (I3) = ',I3,'A');
I10=I3-I;
print '%s %.2f %s' %(' Current is (I10) = ',I10,'A');
# EXAMPLE 5-38 PG NO-331
R1=100.;
R2=4.;
R3=8.;
R4=50.;
R5=5.;
VTH=(R1*((R2)/(R2+R3)))-((R3*R4)/(R3+R5));
RTH=((R3*R5)/(R3+R5))+((R2*R3)/(R2+R3));
I=VTH/(10.+RTH);
print '%s %.2f %s' %('i) Voltage (VTH) is = ',VTH,' V ');
print '%s %.2f %s' %('i) Resistance (RTH) is = ',RTH,' ohm ');
print '%s %.2f %s' %('i) Current (I) is = ',I,' A ');
# EXAMPLE 5-39 PG NO-331
V=36.;
R1=5.;
R2=11.;
R3=6.;
VTH=V*(R1/R2);
RTH=(R1*R3)/(R1+R3);
R=RTH;
Pmax=(VTH/(2.*RTH))**2.*(RTH);
print '%s %.2f %s' %('i) Voltage (VTH) is = ',VTH,' V ');
print '%s %.2f %s' %('i) Resistance (RTH) is = ',RTH,' ohm ');
print '%s %.2f %s' %('i) Maximum Power (Pmax) is = ',Pmax,' W ');
# EXAMPLE 5-40 PG NO-331-332
R1=3.;
R2=2.;
R3=12.;
R4=4.;
R5=8.;
V=10.;
R=R3/(R1/R2);
TR=R4+((R2*R5)/(R2+R5))+((R1*R3)/(R1+R3));
I=V/TR;
Ir=I*(R2/(R5+R2));
print 'i) Resistance (R) is = ',R,' ohm '
print 'i) Total Resistance (TR) is = ',TR,' ohm '
print 'i) Current (I) is = ',I,' A '
print 'i) Current (Ir) is = ',Ir,' A '
# EXAMPLE 5-41 PG NO-332-333
VTH=10.;
V=10.;
R1=10.;
R2=10.;
R3=16.67;
R4=50.;
R5=5.56;
R6=3.33;
RTH=V+R5+(((R1+R3)*(R4+R6))/(R1+R3+R4+R6));
I=(V/RTH)-0.4;
print '%s %.2f %s' %('i) Resistance (RTH) is = ',RTH,' ohm ');
print '%s %.2f %s' %('i) Currrent (I) is = ',I,' A ');
# EXAMPLE 5-42 PG NO-333
V=100.; # Voltage
RTH=0; # Resistance
Iab=V/20.; # Current
print '%s %.2f %s' %('i) Current (Iab) is = ',Iab,' A ');
Iab=V/20.;
# EXAMPLE 5-43 PG NO-333
Vab=38.; # Voltage
R1=12.;
R2=6.;
RTH=(R1*R2)/(R1+R2);
Iab=Vab/(RTH+3.);
print '%s %.2f %s' %('i) Resistance (RTH) is = ',RTH,' ohm ');
print '%s %.2f %s' %('i) Current (Iab) is = ',Iab,' A ');
# EXAMPLE 5-44 PG NO-333-334
I1=1.6;
I2=0.8;
VTH=6.*I2; # ((R1*R2)/(R1+R2))
R1=3.;
R2=9.;
R3=6.;
R4=3.;
RTH=((((R1*R2)/(R1+R2))+R1)*R3)/(((R1*R2)/(R1+R2))+R1+R2);
IN=VTH/RTH;
RN=RTH;
print '%s %.2f %s' %('i) Voltage (VTH) is = ',VTH,' V ');
print '%s %.2f %s' %('i) Resistance (RTH) is = ',RTH,' ohm ');
print '%s %.2f %s' %('i) Current (IN) is = ',IN,' A ');
print '%s %.2f %s' %('i) Resistance (RN) is = ',RN,' ohm ');
# EXAMPLE5-45 PG NO-334-335
R1=10.;
R2=5.;
V=15.;
Vb=9.;
Va=(V*R2)/(R1+R2);
Vba=Vb-Va;
RTH=(R1*R2)/(R1+R2);
VTH=Vba;
Iba=VTH/(RTH+Vba);
print '%s %.2f %s' %('i) Voltage (Va) is = ',Va,' V ');
print '%s %.2f %s' %('i) Voltage (Vba) is = ',Vba,' V ');
print '%s %.2f %s' %('i) Voltage (VTH) is = ',VTH,' V ');
print '%s %.2f %s' %('i) REsistance (RTH) is = ',RTH,' ohms ');
print '%s %.2f %s' %('i) Current (Iba) is = ',Iba,' A ');
# EXAMPLE 5-46 PG NO-335
R1=1.;
R2=1.;
R3=3.;
RTH=R1+((R2*R3)/(R2+R3));
RL=R3/(RTH+RTH);
P=RL**2.*RTH;
print '%s %.2f %s' %('i) Resistance (RTH) is = ',RTH,' ohms ');
print '%s %.2f %s' %('i) Resistance (RL) is = ',RL,' A ');
print '%s %.2f %s' %('i) Power (P) is = ',P,' W ');
# EXAMPLE 5-47 PG NO-336
V=5.; # VOLTAGE
R1=2.;
R2=1.;
VTH=R1+((V-R1)/3.);
RTH=R2+((R1*R2)/(R1+R2));
IN=((V*0.5)/(R1+0.5))+((R1/RTH)*(R1/VTH))
print '%s %.2f %s' %('i) Voltage (VTH) is = ',VTH,' V ');
print '%s %.2f %s' %('i) Resistance (RTH) is = ',RTH,' ohm ');
print '%s %.2f %s' %('i) Current (IN) is = ',IN,' A ');
# EXAMPLE 5-48 PG NO-336-337
V=24.;
R1=4.;
R2=4.;
Iab=V/(R1+R2);
Idb=6.;
Iba=(Idb/(R1+R2))*R1;
Ibc=Iab+Iba;
IDB=Ibc;
print '%s %.2f %s' %('i) CURRENT (Iab) is = ',Iab,' A ');
print '%s %.2f %s' %('i) CURRENT (Iba) is = ',Iba,' A ');
print '%s %.2f %s' %('i) CURRENT (Ibc) is = ',Ibc,' A ');
print '%s %.2f %s' %('i) CURRENT (IDB) is = ',IDB,' A ');
# EXAMPE 5-49 PG NO-337-338
V1=120.;
V2=65.;
R1=20.;
R2=30.;
VTH=V1-((V1-V2)/(R1+R2))*R1;
RTH=(R1*R2)/(R1+R2);
print '%s %.2f %s' %('i) Voltage (VTH) is = ',VTH,' V ');
print '%s %.2f %s' %('i) Resistance (RTH) is = ',RTH,' ohms ');
# EXAMPE 5-49 PG NO-337-338
V1=120.;
V2=65.;
R1=20.;
R2=30.;
VTH=V1-((V1-V2)/(R1+R2))*R1;
RTH=(R1*R2)/(R1+R2);
print '%s %.2f %s' %('i) Voltage (VTH) is = ',VTH,' V ');
print '%s %.2f %s' %('i) Resistance (RTH) is = ',RTH,' ohms ');
# EXAMPLE 5-51 PG NO-338
I=10.; # CURRENT
R1=1.;
R2=1.;
R3=1.;
VTH=(I*R1)/(R1+R2+R3);
RTH=(R1*(R1+R2))/(R1+R2+R3);
P=(VTH/(RTH+RTH))**2*(RTH);
print '%s %.2f %s' %('i) Voltage (VTH) is = ',VTH,' V ');
print '%s %.2f %s' %('i) Resistance (RTH) is = ',RTH,' ohms ');
print '%s %.2f %s' %('i) Power (P) is = ',P,' W ');
# EXAMPLE 5-52 PG NO-339
R1=2.;
R2=4.;
R3=2.;
V=0.389; # VOLTAGE
I1=3.89; # CURRENT
TR=((R1*R2)/(R1+R2))+R2; # TOTAL RESISTANCE
I=V/TR; # CURRENT
TI=I1+I; # TOTAL CURRENT
print '%s %.2f %s' %('i) Total resistance (TR) is = ',TR,' ohms ');
print '%s %.2f %s' %('i) Current (I) is = ',I,' A ');
print '%s %.2f %s' %('i) Total current (TI) is = ',TI,' A ');
# EXAMPLE 5-53 PG NO-339
R1=16.;
R2=8.;
R3=12.;
Rd=(R1*R2)/(R1+R2+R1);
Rb=Rd;
Rc=(R1*R1)/(R1+R1+R2);
V=180.;
VTH=(180./(R1+Rd+Rc))*Rc;
RTH=R3+(((Rc*(R1+Rd)))/(R1+Rc+Rd))+Rd;
print '%s %.2f %s' %('i) Resistance (Rd) is = ',Rd,' ohms ');
print '%s %.2f %s' %('i) Resistance (RC) is = ',Rc,' ohms ');
print '%s %.2f %s' %('i) Voltage (VTH) is = ',VTH,' V ');
print '%s %.2f %s' %('i) Resistance (RTH) is = ',RTH,' ohms ');
# EXAMPLE 5-54 PG NO-340
V1=48.; # VOLTAGE
V2=16.; # VOLTAGE
R1=12.;
R2=4.;
R3=4.;
I=(V1-V2)/(R1+R2+R3);
print '%s %.2f %s' %('i) Current (I) is = ',I,' A ');
# EXAMPLE 5-55 PG NO-340-341
I1=1.2; # Current
I2=0.3; # Current
I=I1+I2;
print '%s %.2f %s' %(' Current is = ',I,'A');
# EXAMPLE 5-56 PG NO-341
VTH=15.; # THEVENINS VOLTAGE
R1=4.;
R2=6.;
I4=VTH/(R1+R2); # CURRENT THROUGH 4 ohms Resistance
print '%s %.2f %s' %('i) CURRENT (I4) is = ',I4,' A ');
# EXAMPLE 5-57 PG NO-341-342
R1=22.;
R2=33.;
R3=10.;
R4=15.;
V=24.;
TR=((R1+R2)*(R3+R4))/(R1+R2+R3+R4);
I=V/TR;
print '%s %.2f %s' %('i) Total Resistance (TR) is = ',TR,' Kohms ');
print '%s %.2f %s' %('ii) CURRENT (I) is = ',I,' A ');
# EXAMPLE 5-58 PG NO-342-343
R1=44.;
R2=33.;
R3=10.;
R4=15.;
V=24.;
TR=((R1+R2)*(R3+R4))/(R1+R2+R3+R4);
I=V/TR;
print '%s %.2f %s' %('i) Total Resistance (TR) is = ',TR,' Kohms ');
print '%s %.2f %s' %('ii) CURRENT (I) is = ',I,' A ');
# EXAMPLE 5-60 PG NO-343
V=60.; # VOLTAGE
R1=3.;
R2=4.;
R3=1.5;
R4=2.5;
IAB=12.;
IBC=6.;
ICD=6.;
IBD=6.;
VAB=36.;
VBC=9.;
VCD=15.;
VBD=24.;
VkIk=VAB*IAB+VBC*IBC+VCD*ICD+VBD*IBD-V*IAB
print '%s %f' %('ii) SUBMISSION OF VkIk (VkIk) is = ',VkIk);
# EXAMPLE 5-62 PG NO-344-345
Z1=16.+1j*0;
Z2=2.+1j*1;
Z3=3.-1j*1;
R=4.;
I=Z1/(Z2+((R*Z3)/(R+Z3)));
print' Current is = ',I,'A'
IN=(I*Z3)/(R+Z3);
print ' Current is = ',IN,'A'
ZN=((Z3*Z2)/5)+R;
print ' Impedance is = ',ZN,'A'
# EXAMPLE 5-63 PG NO-345
IN=1.638-1j*0.614;
Z1=15.+1j*0;
Z2=3.-1j*1.;
Z3=2.+1j*1.;
VTH=(Z1*Z2)/(Z3+Z2);
ZN=5.4+1j*0.21;
VTH1=IN*ZN
print'i) Voltage (VTH) is = ',VTH,' V '
print'ii) Voltage (VTH) is = ',VTH,' V '
# EXAMPLE 5-64 PG NO-345-346
import math
Z1=4.+1j*6.;
R1=1.;
V=100.;
ZTH=(Z1*R1)/(Z1+R1);
Pmax=(100./(ZTH+ZTH))**2.*(0.93*math.cos(-6.11))
print'i) IMPEDANCE (ZTH) is = ',ZTH,' ohms '
print'ii) POWER (Pmax) is = ',Pmax,' W '
# EXAMPLE 5-65 PG NO-346
V1=5.;
G1=1.;
V2=5.;
G2=(1./2.);
V3=10.;
G3=(1./4.);
EV=(V1*G1+V2*G2+V3*G3)/(G1+G2+G3); # EQUIVALENT VOLTAGE
ER=1./(G1+G2+G3);
I=(EV*ER)/(EV+ER);
print'i) Euivalent Resistance (EV) is = ',EV,' V '
print'ii) Equivalent Resistance (ER) is = ',ER,' ohms '
print'ii) CURRENT (I) is = ',I,' A '
Z1=12.99+1j*7.5;
Z2=4.-1j*3.;
Z3=6.+1j*8.;
I1=Z1/Z2;
Z=Z3-Z2
I=(I1*Z)/Z3;
print'ii) CURRENT (I1) is in polar form = ',I1,' A '
print'i) IMPEDANCE (Z) is in polar form = ',Z,' V '
print'ii) CURRENT (I) is in polar form = ',I,' A '
# EXAMPLE 5-67 PG NO-347-348
V=10.; # VOLTAGE
R1=3.;
R2=4.91; # RESISTANCE
I1=V/R1; # CURRENT
Isc1=1.11;
I2=V/R2;
Isc2=1.11;
print'ii) CURRENT (I1) is = ',I1,' A '
print'ii) CURRENT (I2) is = ',I2,' A '
# EXAMPLE 5-68 PG NO-348
V1=3.;
V2=0.75;
R1=1.;
R2=0.75;
V=V1+V2;
R=R1+R2;
print '%s %.2f %s' %('ii) Voltage (V) is = ',V,' V ');
print '%s %.2f %s' %('ii)Resistance (R) is = ',R,' ohms ');
# EXAMPLE 5-69 PG NO-349
V=24.; # VOLTAGE
R1=0.1;
R2=6.;
R3=5.;
I=V/(R1+(R3*R2)/(R3+R2));
I1=I*(R3/(R2+R3));
I2=I*(R2/(R2+R3));
VTH=-(I1*2.)-(-2.*I2);
RTH=2.533;
IAB=VTH/(RTH+1.);
print '%s %.2f %s' %('ii) CURRENT (I) is = ',I,' A ');
print '%s %.2f %s' %('ii) CURRENT (I1) is = ',I1,' A ');
print '%s %.2f %s' %('ii) CURRENT (I2) is = ',I2,' A ');
print '%s %.2f %s' %('ii) Voltage (VTH) is = ',VTH,' V ');
print '%s %.2f %s' %('ii) CURRENT (IAB) is = ',IAB,' A ');
# EXAMPLE 5-70 PG NO-350
R1=2.;
R2=3.;
R3=6.;
I4=R2*(R1/R3); # CURRENT THROUGH 4 OHMS RESISTANCE
TI=I4+I4; # TOTAL CURRENT
print '%s %.2f %s' %('ii) CURRENT (I4) is = ',I4,' A ');
print '%s %.2f %s' %('ii) CURRENT (TI) is = ',TI,' A ');
# EXAMPLE 5-71 PG NO=350-351
R1=5.;
R2=4.;
R3=10.;
R=R1*R2/(R1+R2);
I=(R*R3)/(R+R3);
print '%s %.2f %s' %('ii) Resitance (R) is = ',R,' ohms ');
print '%s %.2f %s' %('ii) CURRENT (I) is = ',I,' A ');
X=('4 2 ;2 4');
B1=20.;
B2=10.;
X1=B1
X2=B2
print ' Current is = ',X1,'A'
print ' Current is = ',X2,'A'
R1=15.;
V=20.; # RESISTANCE
I1=V/R1;
I2=I1*(1./2.);
R2=15.;
I1=V/R2;
I2=I1*(1./2.);
print '%s %.2f %s' %('ii) CURRENT (I1) is = ',I1,' A ');
print '%s %.2f %s' %('ii) CURRENT (I2) is = ',I2,' A ');
print '%s %.2f %s' %('ii) CURRENT (I1) is = ',I1,' A ');
print '%s %.2f %s' %('ii) CURRENT (I2) is = ',I2,' A ');