# Chapter 3 - Measurement of parameters¶

## Example 1 - pg 194¶

In [1]:
#pg 194
#Example 3.1: Resistance and percentage error
#calculate the Resistance and percentage error
#given data :
V=3.2;# in V
I=0.4;# in A
Rv=500.;# in ohm
#calculations
Xt=V/(I*(1-(V/(I*Rv))));
Xm=V/I;
Pe=((Xm-Xt)/Xt)*100;
#results
print "(a). True value of unknown resistance Xt(ohm) = ",round(Xt,2)
print "(b). % error (%) =",Pe
print " i.e.",-Pe,"10w"

(a). True value of unknown resistance Xt(ohm) =  8.13
(b). % error (%) = -1.6
i.e. 1.6 10w


## Example 2 - pg 195¶

In [2]:
#pg 195
#Example 3.2: Measured value of resistance
#calculate the Measured value of resistance
#given data :
a=1.;# in ohm
b=5.;# in ohm
I=0.1;# in A
#calculations
A=(1/a)+(1/b);
r=1/A;
V=r*I;
Mr=V/I;
#results
print "Measured value of resistance (ohm) = ",round(Mr,3)

Measured value of resistance (ohm) =  0.833


## Example 3 - pg 195¶

In [3]:
#pg 195
#Example 3.3: Resistor
#calculate the Resistor
#given data :
S=0.02;# in ohm
Vs=0.98;# in V
Vx=0.735;# in V
#calculate
X=(S*Vx)/Vs;
#results
print "Resistance of resistor under test X(ohm) = ",X

Resistance of resistor under test X(ohm) =  0.015


## Example 4 - pg 196¶

In [4]:
#pg 196
#Example 3.4: Resistor,current and power loss
#calculate the Resistor,current and power loss
#given data :
S=0.1;# in ohm
Vs=1.0235;# in V
Vr=0.4211;# in V
#calculations
R=(Vr/Vs)*S;
I=Vs/S;
P=I**2 *R;
#results
print "Resistance of unknown resistor R(ohm) = ",round(R,4)
print "Current through the resistor I(A) = ",I
print "Power loss in the unknown resistance P(W) = ",round(P,3)

Resistance of unknown resistor R(ohm) =  0.0411
Current through the resistor I(A) =  10.235
Power loss in the unknown resistance P(W) =  4.31


## Example 5 - pg 196¶

In [5]:
#pg 196
#Example 3.5: Magnitude of error
#calculate the Magnitude of error
#given data :
p=100.31;# in ohm
q=200.;# in ohm
P=100.24;# in ohm
Q=200.;# in ohm
S=100.03*10**-6;# in ohm
r=700.*10**-6;# in ohm
Y=50.;# in micro-ohm
#calculations
X=(((P/Q)*S)+(((q*r)/(p+q))*((P/Q)-(p/q))))*10**6;
Error=Y-X;
#results
print "Magnitude of error (micro-ohm) = ",round(Error,6)

Magnitude of error (micro-ohm) =  0.028129


## Example 6 - pg 196¶

In [7]:
#pg 196
#Example 3.6: Unknown resistance
#calculate the Unknown resistance
#given data :
p=100.6;# in ohm
q=300.25;# in ohm
P=100.5;# in ohm
Q=300.;# in ohm
S=0.0045;# in ohm
r=0.1;# in ohm
#calculations
X=(((P/Q)*S)+(((q*r)/(p+q+r))*((P/Q)-(p/q))))*10**3;
#results
print "Unknown resistance X(m-ohm) = ",round(X,3)

Unknown resistance X(m-ohm) =  1.503


## Example 7 - pg 197¶

In [8]:
#pg 197
#Example 3.7: Unknown resistance
#calculate the Unknown resistance
#given data :
s=0.5;#Mega ohms
g=10.;#killo ohms
d1=41.;#divisions
d2=51.;#divisions
#calculations
r=(((s*10**6)+(g*10**3))*(d1/d2))-(g*10**3);#ohms
#results
print "unknown resistance is (Mega-ohm)=",r*10**-6

unknown resistance is (Mega-ohm)= 0.4


## Example 8 - pg 197¶

In [9]:
#pg 197
#Example 3.8: Unknown resistance
#calculate the Unknown resistance
#given data :
P=100.;# in ohm
Q=10.;# in ohm
S=46.;# in ohm
#calculations
R=((P/Q)*S);
#results
print " Unknown resistance R(ohm) = ",R

 Unknown resistance R(ohm) =  460.0


## Example 9 - pg 197¶

In [10]:
#pg 197
#Example 3.9: limiting value of unknown resistance
#calculate the limiting value of unknown resistance
#given data :
P=1000.;# in ohm
Q=1000.;# in ohm
S=3154.;# in ohm
dp=0.05;#percentage error
dq=0.05;#percentage error
ds=0.1;#percentage error
#calculations
R=((P/Q)*S);
dr=dp+dq+ds;#percentage error
x=R+((dr*10)*R)/100;#
#results
print "limiting value of resistance is ",R,"+",dr,"% to ",round(x)," ohm"

limiting value of resistance is  3154.0 + 0.2 % to  3217.0  ohm


## Example 10 - pg 197¶

In [11]:
#pg 197
#Example 3.10: value of unknown resistance
#calculate the value of unknown resistance
#given data
ra=1200.;#ohms
#calculations
rb=ra/1600;#ohms
r1=800*rb;#ohms
r2=r1/1.25;#ohms
r3=0.5*rb;#ohms
rx=((r2/r1)*r3);#ohms
#results
print "unknown resistance is (Ohm)=",rx

unknown resistance is (Ohm)= 0.3


## Example 11 - pg 198¶

In [12]:
#pg 198
#Example 3.11: Unknown resistance
#calculate the Unknown resistance
#given data :
AB=25.;# in ohm
BC=75.;# in ohm
S=6.;# in ohm
#calculations
R=((AB/BC)*S);
#results
print "Unknown resistance R(ohm) = ",R

Unknown resistance R(ohm) =  2.0


## Example 12 - pg 199¶

In [13]:
#pg 199
#Example 3.12: length
#calculate the balance length
#given data
r=0.0250;#ohms
l=100.;#cm
d=100;#divisions
p=10.;#ohms
q=10.;#ohms
r2=1.0125;#ohms
r3=1;#ohms
p1=9.95;#ohms
q1=10.05;#ohms
#calculations
r1=r/l;#ohm/cm
x=p/q;#
l1=((r3+r)-r2)/(2*r1);#cm
l2=100-l1;#cm
x1=p1/q1;#
l11=((p1*(r3+r))-(q1*r2))/((p1*r1)+(q1*r1));#cm
l21=100-round(l11);#cm
#results
print "In case 1 balance is obtained at ",l1," and ",l2," scale divisions"
print "In case 2 balance is obtained at ",round(l11)," and ",l21," cm"

In case 1 balance is obtained at  25.0  and  75.0  scale divisions
In case 2 balance is obtained at  5.0  and  95.0  cm


## Example 13 - pg 199¶

In [14]:
#pg 199
#Example 3.13: Insolution resistance
#calculate the Insolution resistance
#given data :
import math
V1=125.;# in V
V2=100.;# in V
t=25.;# in sec
C=600*10**-12;# in F
#calculations
R=t*10**-6/(C*math.log(V1/V2));
#results
print "Insolution resistance R(M-ohm) = ",round(R)

Insolution resistance R(M-ohm) =  186726.0


## Example 14 - pg 199¶

In [15]:
#pg 199
#Example 3.14: Insolution resistance of the cable
#calculate the Insolution resistance of the cable
import math
from math import log10
y=10.;#Mega ohms
d=200.;#divisioms
d1=126.;#divisions
d2=100.;#divisions
c=1;#assume
t=30.;#seconds
x=0.4343
#calculations
r=((x*t)/(c*log10(d/d1)));#
rd=((x*t)/(c*log10(d/d2)));#
x=rd/r;#
ro=((y-(10*x))/x);#Mega ohms
#results
print "Insolution resistance R(M-ohm) = ",round(ro)

Insolution resistance R(M-ohm) =  5.0


## Example 15 - pg 200¶

In [16]:
#pg 200
#Example 3.15:
#calculate the High resistance
#given data :
import math
V1=500.;# in V
V2=300.;# in V
t=60.;# in sec
C=2.5*10**-6;# in F
#calculations
R=t*10**-6/(C*math.log(V1/V2));
#results
print "Unknown resistance R(M-ohm) = ",round(R,2)

Unknown resistance,R(M-ohm) =  46.98


## Example 16 - pg 200¶

In [17]:
#pg 200
#Example 3.16: Insolution resistance of the cable
#calculate the Insolution resistance of the cable
US=2.5;#SHUNT
SD=250;#DIVISIONS
sd1=1000;#shunt
r=1;#Mega ohms
#calculations
x=US*SD;#
y=sr*sd1;#
ro=(y/x)*r;#mega ohms
#results
print "Insolution resistance R(M-ohm) = ",round(ro)

Insolution resistance R(M-ohm) =  560.0


## Example 17 - pg 201¶

In [18]:
#pg 201
#Example 3.17: Bridhe Balanced
#calculate the Bridhe Balanced condition
z1m=400.;#ohms
z1a=50.;#degree
z2m=200.;#ohms
z2a=40.;#degree
z3m=800.;#ohms
z3a=-50.;#degree
z4m=400.;#ohms
z4a=20.;#degree
#calculations
x=z1m*z4m;#ohms
y=z2m*z3m;#ohms
a=z1a+z4a;#degree
b=z2a+z3a;#degree
#results
print "As ",x,"=",y," (Z1*Z4=Z2*Z3) firts condition is satisfied"
print "As ",a,"is not equal to",b,"(Sum of angles) second condition is not staisfied (so bridge is not balanced) "

As  160000.0 = 160000.0  (Z1*Z4=Z2*Z3) firts condition is satisfied
As  70.0 is not equal to -10.0 (Sum of angles) second condition is not staisfied (so bridge is not balanced)


## Example 18 - pg 201¶

In [19]:
#pg 201
#Example 3.18:Resistance
#calculate the Resistance and inductance
#given data :
R2=100.;# in ohm
R3=32.7;# in ohm
R4=100.;# in ohm
R=1.36;# in ohm
L=47.8;# in mH
#calculations
R1=(R2*R3/R4)-R;
L1=(R2/R4)*L;
#results
print "Resistance R1(ohm) = ",R1
print "inductance L1(mH) = ",L1

Resistance R1(ohm) =  31.34
inductance L1(mH) =  47.8


## Example 19 - pg 201¶

In [20]:
#pg 201
#Example 3.19:Resistance and Inductance
#calculate the Resistance and Inductance
#given data
import math,cmath
f=1;#assume
r1=25;#ohms
i=50.;#MH
x=r1+1j*(2*math.pi*f*(i*10**-3));#
r2=2;#ohms
r=x.real-r2;#ohms
l=x.imag/(2*math.pi*f);#henry
print "resistance is (ohm)=",r
print "inductance is (mH)=",l*1000.

resistance is (ohm)= 23.0
inductance is (mH)= 50.0


## Example 20 - pg 202¶

In [21]:
#pg 202
#Example 3.20:Resistance
#calculate the Unknown resistance
#given data :
R2=600.;# in ohm
R3=400.;# in ohm
R4=1000.;# in ohm
#calculations
R1=(R2*R3/R4);
#results
print "Unknown resistance R1(ohm) = ",R1

Unknown resistance R1(ohm) =  240.0


## Example 21 - pg 202¶

In [22]:
#pg 202
#Example 3.21:Resistance and inductance
#calculate the Resistance and inductance
#given data :
S=900;# in ohm
P=1.5*10**3;# in ohm
Q=2*10**3;# in ohm
Cs=0.2*10**-6;# in F
#calculations
rx=S*P/Q;
L=P*Cs*S*10**3;
#results
print "Resistance rx(ohm) = ",rx
print "Inductance L(mH) = ",L

Resistance rx(ohm) =  675.0
Inductance L(mH) =  270.0


## Example 22 - pg 202¶

In [23]:
#pg 202
#Example 3.22:Resistance and inductance
#calculate the Resistance and inductance
#given data :
S=2000.;# in ohm
P=1000.;# in ohm
C=1*10**-6;# in F
r=200;# in ohm
#calculations
Q=S;# in ohm
R=P*Q/S;
L=(C*P/S)*(r*(Q+S)+(Q*S));
#results
print "Resistance R(ohm) = ",R
print "Inductance L(H) = ",L

Resistance R(ohm) =  1000.0
Inductance L(H) =  2.4


## Example 23 - pg 202¶

In [24]:
#pg 202
#Example 3.23:Resistance and inductance
#calculate the Resistance and inductance
#given data :
R2=250.;# in ohm
R3=100.;# in ohm
R4=200.;# in ohm
r1=43.1;# in ohm
r=229.7;# in ohm
C=1*10**-6;# in F
#calculations
R1=(R2*R3/R4)-r1;
L1=(C*R3/R4)*(r*(R4+R2)+(R2*R4));
#results
print "Resistance R1(ohm) = ",R1
print "inductance L1(H) = ",round(L1,4)

Resistance R1(ohm) =  81.9
inductance L1(H) =  0.0767


## Example 24 - pg 203¶

In [25]:
#pg 203
#Example 3.24:Resistance and inductance
#calculate the Resistance and inductance
#given data :
R2=1000.;# in ohm
R3=500.;# in ohm
R4=1000.;# in ohm
r=100;# in ohm
C=3*10**-6;# in F
#calculations
R1=(R2*R3/R4);
L=(C*R2/R4)*(r*(R4+R3)+(R3*R4));
#results
print "Resistance R1(ohm) = ",R1
print "inductance L(H) = ",L

Resistance R1(ohm) =  500.0
inductance L(H) =  1.95


## Example 25 - pg 203¶

In [26]:
#pg 203
#Example 3.25:Resistance and inductance
#calculate the Resistance and inductance
#given data :
import math
R2=1000;# in ohm
R3=16800;# in ohm
R4=833;# in ohm
C4=0.38*10**-6;# in F
f=50;# in Hz
#calculations
w=2*math.pi*f;
L1=(R2*R3*C4)/(1+w**2*C4**2*R4**2);
R1=(R2*R3*R4*w**2*C4**2)/(1+w**2*C4**2*R4**2);
#results
print "Inductance L1(H) = ",round(L1,3)
print "Resistance R1(ohm) = ",round(R1,3)

Inductance L1(H) =  6.321
Resistance R1(ohm) =  197.491


## Example 26 - pg 204¶

In [27]:
#pg 204
#Example 3.26:Resistance and inductance
#calculate the Resistance and inductance
#given data :
import math
R2=2410.;# in ohm
R3=750.;# in ohm
R4=64.9;# in ohm
C4=0.35*10**-6;# in F
f=500.;# in Hz
#calculations
w=2*math.pi*f;
L1=(R2*R3*C4)/(1+w**2*C4**2*R4**2);
R1=(R2*R3*R4*w**2*C4**2)/(1+w**2*C4**2*R4**2);
#results
print "Inductance L1(H) = ",round(L1,2)
print "Resistance R1(ohm) = ",round(R1,1)

Inductance L1(H) =  0.63
Resistance R1(ohm) =  141.1


## Example 27 - pg 204¶

In [28]:
#pg 204
#Example 3.27:Resistance and inductance
#calculate the Resistance and inductance
#given data :
import math
R3=16800.;# in ohm
R2=1000.;# in ohm
R4=833.;# in ohm
C4=0.38*10**-6;# in F
f=50;# in Hz
#calculations
w=2*math.pi*f;
L1=(R2*R3*C4)/(1+w**2*C4**2*R4**2);
R1=(R2*R3*R4*w**2*C4**2)/(1+(w**2*C4**2*R4**2));
#results
print "Inductance,L1(H) = ",round(L1,2)
print "Resistance,R1(ohm) = ",round(R1,0)
print 'resistance is calculated wrong in the textbook'

Inductance,L1(H) =  6.32
Resistance,R1(ohm) =  197.0
resistance is calculated wrong in the textbook


## Example 28 - pg 205¶

In [29]:
#pg 205
#Example 3.28:Resistance and Inductance
#calculate the Resistance and Inductance
r3=100;#ohms
r2=834;#ohms
#calculations
la=r2*r3*c4*10**-3;#mH
r1=(r3)*(c4/c2);#ohms
#results
print "inductance is (mH)=",la
print "resistance is (ohm)=",round(r1,2)

inductance is (mH)= 8.34
resistance is (ohm)= 80.65


## Example 29 - pg 205¶

In [30]:
#pg 205
#Example 3.29: Phase angle error and Capacitance
#calculate the Phase angle error and Capacitance
#given data :
import math
C1=1*10**-6;# in F
R1=1000.;# in ohm
R2=1000.;# in ohm
f=1000.;# in Hz
r1=10.;# in ohm
R3=2000.;# in ohm
R4=2000.;#/ in ohm
#calculations
C2=C1*R1*10**6/R2;
w=2*math.pi*f;
r2=(R2*(R3+r1)-(R1*R4))/R1;
del1=w*r1*C1*(180/math.pi);
del2=r2*w*C2*10**-6*(180/math.pi);
#results
print "Unknown capacitance C2(micro-F) = ",C2
print "Phase angle error del1(degree) = ",del1
print "Phase angle error del2(degree) = ",del2

Unknown capacitance C2(micro-F) =  1.0
Phase angle error del1(degree) =  3.6
Phase angle error del2(degree) =  3.6


## Example 30 - pg 206¶

In [32]:
#pg 206
#Example 3.30: Series resistance and loss angle
#calculate the Series resistance and loss angle
#given data :
import math
R2=100.;# in ohm
R4=309.;# in ohm
C3=100.*10**-12;# in F
C4=0.5*10**-6;# in F
f=50;# in Hz
#calculations
w=2*math.pi*f;
Rs=C4*R2*10**-6/C3;
Cs=R4*C3*10**12/R2;
dela=math.atan(w*Cs*Rs*10**-6)*57.3;
#results
print "Series resistance Rs(M-ohm) = ",Rs
print "capacitance is (micro-F)=",Cs
print "Loss angle del(degree) = ",round(dela,3)

Series resistance Rs(M-ohm) =  0.5
capacitance is (micro-F)= 309.0
Loss angle del(degree) =  2.779


## Example 31 - pg 206¶

In [83]:
#pg 206
#Example 3.31: Capacitance, power loss, loss resistance and loss angle
#calculate the Cable Capacitance, power loss, loss resistance and loss angle
#given data :
import math
r2=1500/math.pi;# in ohm
r3=120.;# in ohm
C2=0.95*10**-6;#F
C1=50*10**-12;# F
f=50;
#calculations
Cs=round(C1*r2*10**12/r3);
w=round(2*math.pi*f);
rs=(r3/(w**2*C1*10));
dela=math.atan(100*math.pi*C2*r2)*57.3;#
v=100;#kV
pl=(v*10**3)**2;#
#results
print "Cable capacitance Cs(PF) = ",Cs
print "Parallel loss resistance rs(M-ohm) = ",round(rs*10**-6,2)
print "loss angle is (degree)=",round(dela,2)
print "power loss is =",pl

Cable capacitance Cs(PF) =  199.0
Parallel loss resistance rs(M-ohm) =  2.43
loss angle is (degree)= 8.11
power loss is = 10000000000


## Example 32 - pg 207¶

In [34]:
#pg 207
#Example 3.32:frequency and resistance
#calculate the frequency and resistance
#given data
import math
r1=400.;#ohms
r2=1000.;#ohms
r3=800.;#ohms
#calculations
f=((1/((2*math.pi)*math.sqrt(r1*r3*c1*10**-6*c3*10**-6))));#Hz
x=((c3/c1)+(r1/r3));#
r4=r2*x;#ohms
#results
print "frequency is (Hz)=",round(f)
print "resistance is (ohm)=",r4

frequency is (Hz)= 398.0
resistance is (ohm)= 1000.0


## Example 33 - pg 207¶

In [35]:
#pg 207
#Example 3.33:frequency and resistance
#calculate the frequency and resistance
import math
r1=200.;#ohms
r3=400.;#ohms
r4=1000.;#ohms
#calculations
x=((r4/r3)-(c1/c2));#
r2=r1*x;#ohms
f=((1/((2*math.pi)*math.sqrt(r1*r2*c1*10**-6*c2*10**-6))));#Hz
#results
print "resistance is (ohm)=",r2
print "frequency is (Hz)=",round(f)

resistance is (ohm)= 400.0
frequency is (Hz)= 398.0


## Example 34 - pg 208¶

In [36]:
#pg 208
#Example 3.34:percentage error and voltmeter readings
#calculate the percentage error and voltmeter readings
#given data
v=180.;#volts
i=2.;#amperes
rv=2000;#ohms
ra=0.01;#ohms
#calculations
rm2=v/i;#ohms
iv=v/rv;#amperes
ir=i-iv;#amperes
r=v/ir;#ohms
per=((rm2-r)/r)*100;#
vr=i*(ra+r);#volts
#results
print "percentage error is (%)=",per

percentage error is (%)= -4.5


## Example 35 - pg 209¶

In [37]:
#pg 209
#Example 3.35:unknown resistance
#calculate the unknown resistance
#given data
P=100.24;#ohms
Q=200.;#ohms
S=100.03;#ohms
q=200.;#ohms
r=700.;#micro ohms
p=100.31;#ohms
#calculations
x=(P/Q)*S*10**-6;#ohms
y=((q*r*10**-6)/(p+q+(r*10**-6)));#ohms
z=((P/Q)-(p/q));#ohms
R=x+(y*z);#micro ohms
#results
print "unknown resistance is (micro-ohm)=",round(R*10**6,2)

unknown resistance is (micro-ohm)= 49.97


## Example 36 - pg 209¶

In [39]:
#pg 209
#Example 3.36:
#calculate the deflection of galvanometer and the sensivity
#given
P=1000.;#ohms
Q=100.;#ohms
S=200.;#ohms
R=2005.;#ohms
e=5.;#volts
G=100.;#ohms
si=10.;#mm/micro-ampere
#calculations
R1=((P/Q)*S);#ohms
dr=R-R1;#ohms
eo=e*((R/(R+S))-(P/(P+Q)));#volts
ro=(((R*S)/(R+S))+((P*Q)/(P+Q)));#ohms
ig=eo/(ro+G);#amperes
th=si*(ig*10**6);#mm
sb=th/dr;#mm/ohm
#results
print "deflection of the galvanometer is,(mm)=",round(th,1)
print "sensivity of bridge is (mm/ohm)=",round(sb,2)

deflection of the galvanometer is,(mm)= 27.7
sensivity of bridge is (mm/ohm)= 5.53


## Example 37 - pg 209¶

In [40]:
#pg 209
#Example 3.37: Insolution resistance of the cable
#calculate the resistance
#given data
import math
from math import log
v1=200.;#volts
v2=125.;#volts
t=30.;#seconds
v21=100;#volts
x=10;#mega ohms
#calculations
cr=t/(log(v1/v2));#
cr1=t/(log(v1/v21));#
y=cr1/cr;#
R=((x/y)-x);#mega ohms
#results
print "resistance is (M-ohm)=",round(R,2)

resistance is (M-ohm)= 4.75


## Example 38 - pg 210¶

In [41]:
#pg 210
#Example 3.38:resistance and inductance
#calculate the resistance and inductance
r2=400.;#ohms
r3=400.;#ohms
r4=400.;#ohms
r=500.;#ohms
#calculations
rX=((r2*r3)/r4);#ohms
l=(((c*10**-6*r2)/r4)*((r*(r3+r4))+(r3*r4)));#H
#results
print "resistance is (ohm)=",rX
print "inductance is (H)=",l

resistance is (ohm)= 400.0
inductance is (H)= 1.12


## Example 39 - pg 211¶

In [43]:
#pg 211
#Example 3.39:resistance and inductance
#calculate the resistance and inductance
#given data
import math
r2=1000.;#ohms
r3=15000.;#ohms
r4=500.;#ohms
f=50;#Hz
#calculations
w=2*math.pi*f;#
l=((r2*r3*c4*10**-6)/((1+(w**2*(c4*10**-6)**2*r4**2))));#H
r=((r2*r3*r4*w**2*(c4*10**-6)**2)/((1+(w**2*(c4*10**-6)**2*r4**2))));#ohms
#results
print "inductance is (H)=",round(l,2)
print "resistance is (ohm)=",round(r,0)
print 'resistance is calculated wrong in the textbook'

inductance is (H)= 22.45
resistance is (ohm)= 1761.0
resistance is calculated wrong in the textbook


## Example 40 - pg 211¶

In [44]:
#pg 211
#Example 3.40:resistance and capacitance
#calculate the resistance and capacitance
#given data
r2=1000.;#ohms
r4=100.;#ohms
c3=1000.;#pF
#calculations
rs=((c4/(c3*10**-6))*r2);#M-ohm
#results
print "resistance is (M-ohm)=",rs*10**-7
print "capacitance is (micro-F)",cs*10**6

resistance is (M-ohm)= 0.01
capacitance is (micro-F) 100.0


## Example 41 - pg 211¶

In [45]:
#pg 211
#Example 3.41:resistance and capacitance
#calculate the resistance and capacitance
#given data
r1=140.;#ohms
c1=0.0115*10**-6;#F
r2=1000.;#ohms
r4=1000.;#ohms
w=7500.;#
#calculations
x=((1/(w**2*r1*c1)));#
c3=c1;#
r3=x/c3;#
#results
print "capaciatnce is (micro-F)=",c3*10**6
print "resistance is (M-ohm)=",round(r3*10**-6,2)

capaciatnce is (micro-F)= 0.0115
resistance is (M-ohm)= 0.96


## Example 42 - pg 212¶

In [46]:
#pg 212
#Example 3.42:resistance
#calculate the Upper and lower limits of resistance
dp=0.08;#% error
ds=0.05;#% error
x=250;#ohms
#calculations
dq=dp;#
dx=dp+ds+dq;#% percentage error
dx1=dx*x;#
#results
print "Upper and lower limits of X are ",x+dx1," ohm and ",x-dx1," ohm"

Upper and lower limits of X are  302.5  ohm and  197.5  ohm


## Example 43 - pg 213¶

In [47]:
#pg 213
#Example 3.43:resistance
#calculate the unknown resistance
#given data
Q=100.5;#ohms
M=300.;#ohms
S=0.0045;#ohms
r=0.1;#ohms
m=300.25;#micro ohms
q=100.6;#ohms
#calculations
x=(Q/M)*S;#ohms
y=((r*m)/(r+m+q));#ohms
z=((Q/M)-(q/m));#ohms
R=x+(y*z);#milli ohms
#results
print "unknown resistance is (milli-ohm)=",round(R*10**3,4)
print 'The answer is a bit different from textbook due to rounding off error'

unknown resistance is (milli-ohm)= 1.5034
The answer is a bit different from textbook due to rounding off error


## Example 44 - pg 213¶

In [48]:
#pg 213
#Example 3.44:balance current and bridge sensivity
#calculate the balance current and bridge sensivity
#given data
P=100.;#ohms
Q=1000.;#ohms
S=857.;#ohms
E=1.5;#volts
rg=50;#ohms
D=100;#M-ohm
#calculations
X=((P/Q)*S);#ohms
dx=1/X;#
a1=((rg+(X*(Q+S))/(X+S)));#ohms
dig=((E*S*X*dx)/((X+S)**2*a1));#
sb=((dig*D*10**6)/dx);#
#results
print "balance current is (micro-A)=",round(dig*10**6,1)
print "bridge sensivity is (cm-(ohm/ohm))=",round(sb*10**-1)
print 'sensivity is calculated wrong in the book'

balance current is (micro-A)= 6.6
bridge sensivity is (cm-(ohm/ohm))= 5665.0
sensivity is calculated wrong in the book


## Example 45 - pg 214¶

In [49]:
#pg 213
#Example 3.44:balance current and bridge sensivity
#calculate the balance current and bridge sensivity
#given data
P=100.;#ohms
Q=1000.;#ohms
S=857.;#ohms
E=1.5;#volts
rg=50;#ohms
D=100;#M-ohm
#calculations
X=((P/Q)*S);#ohms
dx=1/X;#
a1=((rg+(X*(Q+S))/(X+S)));#ohms
dig=((E*S*X*dx)/((X+S)**2*a1));#
sb=((dig*D*10**6)/dx);#
#results
print "balance current is (micro-A)=",round(dig*10**6,1)
print "bridge sensivity is (cm-(ohm/ohm))=",round(sb*10**-1)
print 'sensivity is calculated wrong in the book'

balance current is (micro-A)= 6.6
bridge sensivity is (cm-(ohm/ohm))= 5665.0
sensivity is calculated wrong in the book


## Example 46 - pg 214¶

In [50]:
#pg 214
#Example 3.46:insulation resistance
#calculate the resistance
#given data
import math
from math import log
v=170.;#volts
e=250.;#volts
t=20.;#seconds
v1=110.;#volts
e=250.;#volts
t=20.;#seconds
r1=25.;#M-ohm
r2=70.;#M-ohm
#calculations
cr1=t/(log(e/v));#
cr2=t/(log(e/v1));#
x=cr1/cr2;#
y=((r1*r2)/(r1+r2));#
R=((x*r2*(r1*r2))-(r2*r1*r2))/((r2*(r1+r2))-((r1*r2*x)));#
#results
print "resistance is (M-ohm)=",round(R,2)
print 'The answer is a bit different from textbook due to rounding off error'

resistance is (M-ohm)= 47.28
The answer is a bit different from textbook due to rounding off error


## Example 47 - pg 215¶

In [52]:
#pg 215
#Example 3.47: resistance
#calculate the resistance
#given data
em=500.;#volts
ep=50.;#volts
en=150.;#volts
rv=50.;#k-ohm
#calculations
rp=((em-ep-en)/en)*rv*10**3;#ohm
rn=((em-ep-en)/ep)*rv*10**3;#
#results
print "Rp is (M-ohm)=",rp*10**-6
print "Rn is (M-ohm)=",rn*10**-6

Rp is (M-ohm)= 0.1
Rn is (M-ohm)= 0.3


## Example 49 - pg 216¶

In [53]:
#pg 216
#given data
rp=1.;#M-ohm
rn=2.;#M-ohm
r=50.;#killo ohms
v=500;#volts
#calculations
x=((rp*10**6)/(r*10**3));#
ep=(v)/((rn*x+(rn+rp)));#volts
en=2*ep;#
#results
print "Ep is (V)=",round(ep,2)
print "En is (V)=",round(en,2)

Ep is (V)= 11.63
En is (V)= 23.26


## Example 50 - pg 216¶

In [54]:
#pg 216
#Example 3.50:Resistance and Inductance
#calculate the resistance and inductance
#given data
R2=600.;#OHMS
R4=400.;#OHMS
R3=1000.;#OHMS
C3=0.5;#MICRO-f
#calculations
r=((R2*R4)/R3);#ohms
l=R2*R4*C3*10**-6;#H
#results
print "resistance is (ohm)=",r
print "inductance is (H)=",l

resistance is (ohm)= 240.0
inductance is (H)= 0.12


## Example 51 - pg 217¶

In [55]:
#pg 217
#Example 3.51:Resistance
#calculate the percentage error
#given data
p=100.;#ohms
q=1000.;#ohms
s=518.8;#ohms
ep=0.1;#
eq=0.1;#
es1=0.05;#
es2=0.05;#
es3=0.1;#
es4=0.5;#
tes=0.267;#
ds=0.008;#ohms
#calculations
pes=(tes/s)*100;#
pds=(ds/s)*100;#
ttos1=pes+pds;#
ttos2=-pes+pds;#
m1=ep+eq+ttos1;#
m2=-ep-eq+ttos2;#
#results
print "The maximum (+ve) percentage error in X =",round(m1,4)
print "The maximum (-ve) percentage error in X =",round(m2,4)
print "Therefore limits of percentage error in X is +",round(m1,4)," to ",round(m2,4)," "
print 'The answers are a bit different from textbook due to rounding off error'

The maximum (+ve) percentage error in X = 0.253
The maximum (-ve) percentage error in X = -0.2499
Therefore limits of percentage error in X is + 0.253  to  -0.2499
The answers are a bit different from textbook due to rounding off error


## Example 52 - pg 218¶

In [56]:
#pg 218
#Example 3.52:loss angle
#calculate the loss angle
#given data
import math
r2=2000.;#ohms
r3=2850.;#ohms
r4=0.4;#ohms
c4=0.5;#micro-F
R4=4.8;#ohms
f=450;#Hz
#calculations
r1=((r2*(R4+r4))/r3);#ohms
c1=((r3*c4)/r2);#micro-F
w=2*math.pi*f;#
d=f*c1*10**-6*r1;#
#results
print 'resistance (ohms) = ',round(r1,2)
print 'capacitance (micro-F) = ',c1
print "loss angle is ",x," degree and ",round(ad*60)," minutes "

resistance (ohms) =  3.65
capacitance (micro-F) =  0.7125
loss angle is  0.0  degree and  4.0  minutes


## Example 53 - pg 218¶

In [57]:
#pg 218
#Example 3.53: resistance
#calculate the resistances
#given data
em=500.;#volts
i1=0.8;#mA
r=30;#killo ohms
i2=0.4;#mA
rv=50;#k-ohm
#calculations
ep=i1*r;#volts
en=i2*r;#volts
rp=((em-ep-en)/en)*r*10**3;#ohm
rn=((em-ep-en)/ep)*r*10**3;#
#results
print "R1 is (M-ohm)=",rp*10**-6
print "R2 is (M-ohm)=",rn*10**-6

R1 is (M-ohm)= 1.16
R2 is (M-ohm)= 0.58


## Example 54 - pg 219¶

In [58]:
#pg 219
#Example 3.54: resistance and capacitance
#calculate the resistance and capacitance
#given data
import math
r2=100.;#ohms
r4=1000.;#ohms
r1=50.;#ohms
f=50.;#Hz
l=0.1;#H
#calculations
r3=((r2*r4)/r1)+((r1*r2*r4)/((2*math.pi*f)**2*l**2));#ohms
c3=r1/((2*math.pi*f)**2*l*r3);#F
#results
print "resistance is (ohm)=",round(r3)
print "capacitance is (micro-F)=",round(c3*10**6,3)
print 'resistance is wrong in the textbook due to rounding off error'

resistance is (ohm)= 7066.0
capacitance is (micro-F)= 0.717
resistance is wrong in the textbook due to rounding off error


## Example 56 - pg 220¶

In [59]:
#pg 220
#Example 3.54: resistance and inductance
#calculate the resistance and inductance
#given data
import math
r2=16800.;#ohms
r3=950.;#ohms
r4=1000.;#ohms
f=50.;#Hz
c3=1.57;#micro-F
#calculations
x=((r2*r3*r4*(2*math.pi*f)**2*(c3*10**-6)**2));#
y=(1+(((2*math.pi*f)**2)*(c3*10**-6)**2*r3**2));#
r1=x/y;#ohms
l1=((r2*r4*c3*10**-6)/y);#
print "resistance is (ohm)=",round(r1)
print "inductance is (H)=",round(l1,1)
print 'resistance is wrong in the textbook due to rounding off error'

resistance is (ohm)= 3184.0
inductance is (H)= 21.6
resistance is wrong in the textbook due to rounding off error


## Example 57 - pg 221¶

In [60]:
#pg 221
#Example 3.57: resistance, capacitance AND POWER FACTOR
#calculate the resistance, capacitance AND POWER FACTOR
#given data
import math
f=50.;#Hz
r2=120.;#ohms
c3=0.4;#micro-F
c4=106.;#pF
r3=318.;#ohms
#calculations
r1=((r2*c3*10**-6)/(c4*10**-12));#ohms
c1=((c4*10**-12*r3)/r2);#pF
pf=((r1)/(math.sqrt(r1**2+(1/(2*math.pi*f*c1)**2))));#
#results
print "resistance is (k-ohm)=",round(r1*10**-3)
print "capacitance is (p-F)=",round(c1*10**12)
print "power factor is =",round(pf,2)

resistance is (k-ohm)= 453.0
capacitance is (p-F)= 281.0
power factor is = 0.04


## Example 58 - pg 222¶

In [62]:
#pg 222
#Example 3.58: resistance
#calculate the resistance
#given data
l1=26.;#cm
l2=24.;#cm
l1d=25.8;#cm
l2d=23.5;#cm
s=545.;#ohm
sg=65.;#ohm
#calculations
sd=((s*sg)/(s+sg));#ohm
X=((sd*(l1-l2))-s*(l1d-l2d))/(l1-l2-l1d+l2d);#
#results
print "X is =",round(X,3)

X is = 3791.175


## Example 59 - pg 222¶

In [63]:
#pg 222
#Example 3.59: capacitance and resistance
#calculate the capacitance and resistance
#given data
e1=5000.;#volts
r1=500.;#ohm
l1=0.18;#H
r2=1000.;#ohm
#calculations
r4=r2;#ohms
x=(r1/(e1**2*l1));#
y=((r2*r2)/(1+((e1**2)*x**2)));#
c3=((l1/y));#F
r3=(x/c3);#
#results
print "capacitance is (micro-F)=",round(c3*10**6,4)
print "resistance is (ohm)=",round(r3,1)

capacitance is (micro-F)= 0.2356
resistance is (ohm)= 471.7


## Example 60 - pg 222¶

In [64]:
#pg 222
#Example 3.59: capacitance and resistance
#calculate the capacitance and resistance
#given data
e1=5000.;#volts
r1=500.;#ohm
l1=0.18;#H
r2=1000.;#ohm
#calculations
r4=r2;#ohms
x=(r1/(e1**2*l1));#
y=((r2*r2)/(1+((e1**2)*x**2)));#
c3=((l1/y));#F
r3=(x/c3);#
#results
print "capacitance is (micro-F)=",round(c3*10**6,4)
print "resistance is (ohm)=",round(r3,1)

capacitance is (micro-F)= 0.2356
resistance is (ohm)= 471.7


## Example 61 - pg 223¶

In [65]:
#pg 223
#Example 3.61;resistance and inductance
#calculate the resistance and inductance
#given data
p=0;#
r2=10;#ohms
r4=900;#ohms
c3=0.9;#micro-F
c4=0.15;#micro-F
#calculations
r=((r2*c3*10**-6)/(c4*10**-6));#ohms
l=r2*r4*c3*10**-3;#mH
#results
print "resistance is (ohm)=",r
print "inductance is (mH)=",l

resistance is (ohm)= 60.0
inductance is (mH)= 8.1


## Example 62 - pg 223¶

In [66]:
#pg 223
#Example 3.62;resistance
#calculate the resistance
#given data
d2=350.;#
f2=1000.;#Hz
s=1;#M-ohm
d1=250.;#
f1=2.5;#Hz
l=400.;#/m
l1=1000.;#m
#calculations
X=((d2*f2*s)/(d1*f1));#M-ohm
x=(X*l)/l1;#M-ohm
#results
print "resistance is (M-ohm)=",x

resistance is (M-ohm)= 224.0


## Example 63 - pg 223¶

In [67]:
#pg 223
#Example 3.62;resistance
#calculate the resistance
#given data
d2=350.;#
f2=1000.;#Hz
s=1;#M-ohm
d1=250.;#
f1=2.5;#Hz
l=400.;#/m
l1=1000.;#m
#calculations
X=((d2*f2*s)/(d1*f1));#M-ohm
x=(X*l)/l1;#M-ohm
#results
print "resistance is (M-ohm)=",x

resistance is (M-ohm)= 224.0


## Example 64 - pg 224¶

In [68]:
#pg 224
#Example 3.64:permittivity and power factor
#calculate the permittivity and power factor
#given data
import math
r3=350.;#ohms
f=50.;#Hz
r2=250.;#ohms
c3=0.4;#micro-F
c4=100.;#pF
l=5.;#mm
l1=10.;#cm
#calculations
r1=((r2*c3*10**-6)/(c4*10**-12));#ohms
c1=((c4*10**-12)*(r3/r2));#F
e=((c1*l*10**-3)/((math.pi/4)*(l1/100)**2));#
pf=r1*2*math.pi*f*c1;#
#results
print "permittivity is =",round(e,13)
print "power factor is =",round(pf,3)

permittivity is = 8.91e-11
power factor is = 0.044


## Example 65 - pg 225¶

In [69]:
#pg 225
#Example 3.65:resistance and capacitance
#calculate the resistance and capacitance
#given data
import math,cmath
rab=2000.;#ohms
f=1;#kHz
rbc=1000;#ohms
cbc=0.47;#micro-F
#calculations
cda=0.5;#micro-F
zab=(1/((1/rab)+(1j*2*math.pi*f*10**3*cab*10**-6)));#
zbc=rbc-(1j/(2*math.pi*f*10**3*cbc*10**-6));#
zda=(-1j/(2*math.pi*f*10**3*cda*10**-6));#
zx=(zda*zbc)/zab;#
rx=zx.real;#ohms
cx=-1/(2*math.pi*f*10**3*zx.imag);#
#results
print "resistance is (ohm)=",round(rx)
print "capacitance is (micro-F)=",round(cx*10**6,3)

resistance is (ohm)= 40.0
capacitance is (micro-F)= 0.833


## Example 66 - pg 225¶

In [70]:
#pg 225
#Example 3.66:capacitance
#calculate the capacitance and voltage
#given data
import math,cmath
from math import sqrt
zbc=1000;#ohms
f=1;#kHz
cda=0.2*10**-6 ;#micro-F
zab=500.;#ohms
rba=1002;#ohms
v1=10;#volts
#calculations
zda=(-1j/(2*math.pi*f*10**3*cda));#
zcd=(zbc*zda)/zab;#
cx=-1/(2*math.pi*f*10**3*zcd.imag);#
iab=v1/(rba+zab);#amperes
ibc=iab;#amperes
ida=v1*1j*2*math.pi*f*10**3*((cda*cx)/(cda+cx));#amperes
icd=ida;#amperes
vab=(v1*zab)/(rba+zab);#volts
vab1=icd/(1j*2*math.pi*10**3*cda);#volts
vbd=vab1-vab;#volts
iba=v1/(zab-(1j/(2*math.pi*10**3*cda)));#
vba=zab*iba;#
v2=sqrt(vba.real**2+vba.imag**2);#volts
ibc=v1/(rba-(1j/(2*math.pi*10**3*cx)));#
vbc=rba*ibc;#
v3=sqrt(vbc.real**2+vbc.imag**2);#volts
vac=v3-v2;#
#results
print "capacitance is (micro-F)=",cx*10**6
print "voltage across the detector is (mV)=",round(vbd.real*10**3,1)
print "voltage across the detector is (mV)=",round(vac*10**3,1)

capacitance is (micro-F)= 0.1
voltage across the detector is (mV)= 4.4
voltage across the detector is (mV)= 7.6


## Example 67 - pg 226¶

In [71]:
#pg 226
#Example 3.67:frequency and resistance
#calculate the frequency and resistance
#given data
import math
rab=800.;#ohm
cab=0.4;#micro-F
rbc=500.;#ohms
cbc=1;#micro-F
rcd=1200.;#ohm
#calculations
x=cab*10**-6*rab;#
y=cbc*10**-6*rbc;#
f=w/(2*math.pi);#
zab=(rab/((1+(1j*w*cab*10**-6*rab))));#ohms
zbc=rbc+(1/((1+(1j*w*cbc*10**-6*rbc))));#ohms
zda=(zab*rcd)/zbc;#ohms
#results
print "frequency is (Hz)=",round(f)
print "resistance is (ohm)=",round(zda.real)

frequency is (Hz)= 398.0
resistance is (ohm)= 1171.0


## Example 68 - pg 227¶

In [72]:
#pg 227
#Example 3.68: resistance and inductance
#calculate the resistance and inductance
#given data
import math,cmath
cab=0.01;#micro-F
rbc=2.5;#k-ohms
cbc=1;#micro-F
rda=7.5*10**3;#ohm
cda=0.02;#micro-F
w=50*10**3;#Hz
#calculations and results
zab=(-1/(((1j*w*cab*10**-6*1))));#ohms
zbc=rbc*10**3;#ohms
zda=rda+(1/(((1j*w*cda*10**-6))));#ohms
zcd=(zbc*zda)/zab;#
r=-(zcd.real);#ohms
l=-(zcd.imag)/w;#H
print 'in case 1'
print "resistance is (ohm)=",round(r)
print "inductance is (H)=",l
zda2=zda/(1+(zda*1j*w*100*10**-12));#
zcd=(zbc*zda2)/zab;#
r=-zcd.real;#ohms
l=-(zcd.imag)/w;#H
print 'in case 2'
print "resistance is (ohm)=",round(r,2)
print "inductance is (H)=",round(l,4)

in case 1
resistance is (ohm)= 1250.0
inductance is (H)= 0.1875
in case 2
resistance is (ohm)= 1589.64
inductance is (H)= 0.1854


## Example 69 - pg 228¶

In [74]:
#pg 228
#Example 3.69:resistance and capacitance
#calculate the resistance and capacitance
#given data
import math,cmath
zab=521.;#ohms
zbc=1200.;#ohms
rda=12.1;#ohms
f=10.;#kHz
cda=0.045;#micro-F
#calculations and results
zda=rda-(1j/(2*math.pi*f*10**3*cda*10**-6));#
zcd=(zbc*zda)/zab;#
c=1/(2*math.pi*f*10**3*zcd.imag);#
print "resistance is (ohm)=",round(zcd.real,3)
print "capcitance is (micro-F)=",round(-c*10**6,4)
rab=521;#ohms
lab=2;#micro-H
cab=550;#pF
rbc=1200;#ohms
lbc=5;#micro-H
cbc=250;#pF
rda1=1.5;#m-ohms
cda=0.045;#micro-F
zab1=521;#ohms
zbc1=1200;#ohms
rda1=12.1;#ohms
f1=10;#kHz
cda1=0.045;#micro-F
zab=1/((1/(rab+(1j*2*math.pi*f*10**4*lab*10**-6)))+(1j*2*math.pi*f*10**3*cab*10**-12));#
zbc=1/((1/(rbc+(1j*2*math.pi*f*10**4*lbc*10**-6)))+(1j*2*math.pi*f*10**3*cbc*10**-12));#
zda=rda+((1/((1/rda1*10**-6)+(1j*2*math.pi*f*10**3*cda*10**-6))));#;#
zcd=(zbc*zda)/zab;#
zda1=rda1-(1j/(2*math.pi*f1*10**3*cda1*10**-6));#
zcd1=(zbc1*zda1)/zab1;#
c1=1/(2*math.pi*f*10**3*(zcd1.imag));#
c=1/(2*math.pi*f*10**3*(zcd.imag));#
per=(((zcd1.real)-(zcd.real))/(zcd.real))*100;#
pec=(((zcd1.imag)-(zcd.imag))/(zcd.imag))*100;#
print "error in R is (%)=",round(per,3)
print "error in C is (%)=",round(pec,5)
print 'answer is wrong in the textbook for errors'

resistance is (ohm)= 27.869
capcitance is (micro-F)= 0.0195
error in R is (%)= 1.815
error in C is (%)= -0.00125
answer is wrong in the textbook for errors


## Example 70 - pg 230¶

In [75]:
#pg 230
#Example 3.70:resistance
#calculate the resistance
#given data
import math,cmath
cab=0.2;#micro-F
zbc=500.;#ohm
l=0.1;#H
cda=0.4;#micro-F
rcd=50.;#ohm
#calculations
zab=(-1j/(w*cab*10**-6));#ohms
zcd=rcd+1j*w*l;#ohm
izda=-1j/(w*cda*10**-6);#
zda=(zab*zcd)/zbc;#
rs=(zda.real);#ohms
#results
print "resistance is (ohm)=",rs

resistance is (ohm)= 1000.0


## Example 71 - pg 230¶

In [76]:
#pg 225
#Example 3.66:capacitance
#calculate the capacitance and voltage
#given data
import math,cmath
from math import sqrt
zbc=1000;#ohms
f=1;#kHz
cda=0.2*10**-6 ;#micro-F
zab=500.;#ohms
rba=1002;#ohms
v1=10;#volts
#calculations
zda=(-1j/(2*math.pi*f*10**3*cda));#
zcd=(zbc*zda)/zab;#
cx=-1/(2*math.pi*f*10**3*zcd.imag);#
iab=v1/(rba+zab);#amperes
ibc=iab;#amperes
ida=v1*1j*2*math.pi*f*10**3*((cda*cx)/(cda+cx));#amperes
icd=ida;#amperes
vab=(v1*zab)/(rba+zab);#volts
vab1=icd/(1j*2*math.pi*10**3*cda);#volts
vbd=vab1-vab;#volts
iba=v1/(zab-(1j/(2*math.pi*10**3*cda)));#
vba=zab*iba;#
v2=sqrt(vba.real**2+vba.imag**2);#volts
ibc=v1/(rba-(1j/(2*math.pi*10**3*cx)));#
vbc=rba*ibc;#
v3=sqrt(vbc.real**2+vbc.imag**2);#volts
vac=v3-v2;#
#results
print "capacitance is (micro-F)=",cx*10**6
print "voltage across the detector is (mV)=",round(vbd.real*10**3,1)
print "voltage across the detector is (mV)=",round(vac*10**3,1)

capacitance is (micro-F)= 0.1
voltage across the detector is (mV)= 4.4
voltage across the detector is (mV)= 7.6


## Example 72 - pg 231¶

In [77]:
#pg 226
#Example 3.67:frequency and resistance
#calculate the frequency and resistance
#given data
import math
rab=800.;#ohm
cab=0.4;#micro-F
rbc=500.;#ohms
cbc=1;#micro-F
rcd=1200.;#ohm
#calculations
x=cab*10**-6*rab;#
y=cbc*10**-6*rbc;#
f=w/(2*math.pi);#
zab=(rab/((1+(1j*w*cab*10**-6*rab))));#ohms
zbc=rbc+(1/((1+(1j*w*cbc*10**-6*rbc))));#ohms
zda=(zab*rcd)/zbc;#ohms
#results
print "frequency is (Hz)=",round(f)
print "resistance is (ohm)=",round(zda.real)

frequency is (Hz)= 398.0
resistance is (ohm)= 1171.0


## Example 73 - pg 231¶

In [78]:
#pg 231
#Example 3.73: inductance
#calculate the inductance
#given data
l1=4.;#H
r1=1.;#ohm
r2=1.;#ohm
r3=2.;#ohm
l4=2.;#H
r4=2.;#ohm
#calculations
M=((r3*l1)-(r2*l4))/(r2+r3);#H
#results
print "M is (H)=",M

M is (H)= 2.0


## Example 74 - pg 232¶

In [79]:
#pg 232
#Example 3.74:resistance and inductance
#calculate the resistance and inductance
#given data
r2=500.;#ohms
r3=300.;#ohms
r4=500.;#ohms
r=150.;#ohms
#calculations
rX=((r2*r3)/r4);#ohms
l=(((c*10**-9*r3)/r4)*((r*(r2+r4))+(r2*r4)));#H
#results
print "resistance is (ohm)=",rX
print "inductance is (mH)=",l*100.

resistance is (ohm)= 300.0
inductance is (mH)= 0.06


## Example 75 - pg 233¶

In [80]:
#pg 233
#Example 3.75:iron loss
#calculate the current and iron loss
#given data
import math
r2=18.;#ohm
r4=550.;#ohm
r3=1250.;#ohm
c3=0.5;#micro-F
r4=550.;#ohm
r31=1125.;#ohm
c31=3.85;#micro-F
v=50.;#volts
#calculations
r1=(r2*r4)/r3;#ohm
l1=r2*r4*c3*10**-3;#mH
r11=(r2*r4)/r31;#ohm
l11=r2*r4*c31*10**-3;#mH
i1=v/(math.sqrt((r1+r11)**2+(w**2*(l11*10**-3)**2)));#
tl=i1**2*r11;#W
cl=i1**2*r1;#W
il=tl-cl;#
#results
print "current is (A)=",round(i1,3)
print "iron loss is (W)=",round(il,4)

current is (A)= 0.326
iron loss is (W)= 0.0935


## Example 77 - pg 235¶

In [81]:
#pg 235
#Example 3.77:parameters
#calculate the required parameters
#given data
import math,cmath
rab=1000.;#ohm
f=1.;#kHz
cab=0.5;#micro-F
rbc=1000.;#ohm
rcd=200.;#ohm
lcd=30.;#mH
#calculations
zab=1/((1/rab)+(1j*2*math.pi*f*10**3*cab*10**-6));#
zbc=rbc-(1j/(2*math.pi*f*10**3*cab*10**-6));#
zcd=rcd+(1j*2*math.pi*f*10**3*lcd*10**-3);#
zda=(zab*zcd)/zbc;#ohm
R=(zda.real);#
cda=1/(2*math.pi*f*10**3*(zda.imag));#
x=math.sqrt((zda.real)**2+(zda.imag)**2);#
x=81.03
rp=x;#ohms
cp=((.2015)*10**3)/(2*math.pi*rp);#
#results
print "resistance is (ohm)=",round(R,3)
print "capacitance is (micro-F)=",round(-cda*10**6,3)
print "Rp is (ohm)=",round(rp,2)
print "Cp is (micro-F)=",round(cp,3)

resistance is (ohm)= 77.87
capacitance is (micro-F)= 10.152
Rp is (ohm)= 81.03
Cp is (micro-F)= 0.396