import math
#variable declaration
gm = 0.005; #transconductance in siemens
RQ1 = 100*10**3; #FET resistance in KΩ
RQ2 = 100*10**3; #FET resistance in KΩ
RQ = 100*10**3; #FET resistance in KΩ
Rm = 50; #meter's resistance in Ω
RD = 10*10**3; #drain resistance in KΩ
v1 = 1;
#calculations
x = (RQ*RD)/float(RQ+RD);
i = (gm*x*v1)/float((2*x)+Rm); #print'currentt through the PMMC meter(mA)
#result
print'currentt through the PMMC meter is %3.1f'%(i*10**3),'mA';
import math
#variable declaration
e = 150; #in V
t = 3; #time in s
Kfsin = 1.11; #form factor
#calculations
#the sawtooth waveform can be expressed as e = mt
m = e/float(t);
#e = 50*t;
#now integration of (50*t)**2 will be 2500*((t**3)/3) with limits ranging 0 to 3 ,solving we get
Erms = math.sqrt((1/float(9))*((2500)*(t**3)-(0))); #Erms in V
#now integration of (50*t) will be (50/2)*((t**2)/2) with limits ranging 0 to 3 ,solving we get
Eav = (1/float(6))*((50)*((t**2)-0)); #Eav in V
Kfsaw = Erms/float(Eav); #form factor
x = (Kfsin)/float(Kfsaw); #ratio of two form factors
e = ((x-1)/float(1))*100; #percentage error
#result
print'percentage error %3.1f'%e,'%'
import math
#vaariable declaration
Kfsin = 1.11; #form factor of sine wave
#calculation
#Erms = math.sqrt((1/T)*(integration(e**2)dt)) with limits from 0 to T is math.sqrt((1/T)*(Emax**2(T-0)))=Emax
#Erms = Emax;
#Erms = math.sqrt((1/T)*(integration(e*dt)) with limits from 0 to T is math.sqrt((2/T)*(Emax(T/2-0)))=Emax
#Eav = Emax;
#Kfsquare = Erms/float(Emax); #form factor of squarewave
Kfsquare = 1;
x = Kfsin/float(Kfsquare); #ratio of form factors
e = ((x-1)/float(1))*100; #percentage error in %
#result
print'percentage error %3.2f'%e,'%';
import math
#variable declaration
Va = 2000; #anode voltage in V
Id = 0.02; #length of parallel plates in m
d = 0.005; #distance between plates in m
L = 0.3; #distance between screen and plates in m
D = 0.03; #deflect of beam in m
g = 100; #overall gain
#calculations
Vd = (2*d*Va*D)/float(L*Id); #voltage in V
Vi = Vd/float(g); #input voltage in V
#result
print'input voltage %d'%Vi,'V';
import math
#variable declaration
Va = 2500; #potential difference in V
Id = 0.025; #length of parallel plates in m
d = 0.005; #distance between plates in m
L = 0.2; #distance between screen and plates in m
D = 0.03; #deflect of beam in m
#calculations
Vd = (2*d*Va*D)/float(L*Id); #voltage in V
Vi = D/float(Vd); #deflection sensitivity in mm/V
#result
print'deflection sensitivity %2.1f'%(Vi*10**3),'mm/V';
import math
#variable declaration
Id = 0.02; #length of horizontal plates in m
d = 0.005; #distance between plates in m
L = 0.2; #distance between screen and plates in m
Va = 2500; #accelerating voltage in V
#calculations
S = (L*Id)/float(2*d*Va); #deflection sensitivityin mm/V
#result
print'deflection sensitivity %3.2f'%(S*10**3),'mm/V';
import math
#variabledeclaration
va = 2500; #anode to cathode voltage in V
Id = 0.015; #length of parallel plates in m
d = 0.005; #distance between plates in m
L = 0.5; #distance between plates and screen in m
m = 9.109*10**-31; #mass of electron in kg
e = 1.602*10**-19; #charrge of electron in C
#calculations
v = math.sqrt((2*e*va)/float(m)); #beam speed in m/s
S = (L*Id)/float(2*d*va); #deflection sensitivity in mm/V
#calculatons
print'beam speed %3.2f'%(v*10**-6),'m/s';
print'deflection sensitivity %3.1f'%(S*10**3),'mm/V';
import math
#variable declaration
L = 0.22; #distance between screen and plates in m
l = 0.033; #width of uniform magnetuc field in m
Va = 6000; #anode potential in V
D = 0.044; #deflection on the screen in m
m = 9.107*10**-31; #mass of electron in kg
e = 1.6*10**-19; #charge of electron in m
#calculations
X = math.sqrt(e/float(2*m*Va)); #density of magnetic field in Wb/m**2
B = D/float(L*l*X);
#result
print'density of magnetic field %3.3f'%(B*10**3),'m Wb/m**2';
import math
#variable declaration
B = 1.8*10**-4; #flux density in Wb/m**2
Va = 800; #final anode voltage in V
d = 0.01; #distance ebetween plates in m
m = 9.107*10**-31; #mass of electron in kg
e = 1.6*10**-19; #charge of electron in C
#calculations
#we have D = B*L*I*(math.sqrt((e/float(2*m*Va)))
#let us assume x = B*(math.sqrt((e/float(2*m*Va)))
#thus D = x*L*I
#we also have D = L*Vd*l/float(2*d*Va)
#let us assume y = 1/float(2*d*Va)
#thus D = L*Vd*l*y
#comparing both D equations we get
x = B*(math.sqrt((e)/float(2*m*Va)));
y = 1/float(2*d*Va) ;
Vd = x/float(y); #voltage applied to Y deflection in V
#result
print'voltage applied to Y deflection %3.3f'%Vd,'V';
import math
#variable declaration
a = 3; #vertical attenuation in mV/div
x = 5; #one part is sub divided in units
#callculations
s = 1/float(x); #1 subdivision in units
pp = 2+(a*s); #positive peak in units
Vpp = pp+pp; #peak to peak voltage in divisions
Vpp1 = a*Vpp; #peak to peak voltage in mV
Vmax = Vpp1/float(2); #amplitude in mV
Vrms =Vmax/float(math.sqrt(2)); #R.m.s value in mV
#result
print'Peak-to-peak value %3.1f'%Vpp1,'mV';
print'Amplitude %3.1f'%Vmax,'mV';
print'R.m.s value %3.3f'%Vrms,'mV';
import math
#variable declaration
#from figure we note this values
y1 = 1.25; #vertical axis in divisions
y2 = 2.5; #maximum vertical value in divisions
#calculations
x = y1/float(y2);
phi = math.asin(x); #sinphi value
phi1 = 360-((phi*180)/float(math.pi)); #possible phases
#result
print'possible phases are %3.2f'%((phi*180)/float(math.pi)),'°','or %3.2f'%phi1,'°';
import math
#variable declaration
R1 = 20; #resistance in kΩ
R2 = 30; #resistance in kΩ
R3 = 80; #resistance in kΩ
#calculations
Rx = (R2*R3)/float(R1); #unknown resistance in kΩ
#result
print'unknown resistance %d'%Rx,'kΩ';
import math
#variable declaration
R3 = 100.03*10**-6; #standard resistance in uΩ
l = 100.31; # inner ratio arm resistance in Ω
m = 200; # inner ratio arm resistance in Ω
R1 = 100.24; #outer ratio arm resistance in Ω
R2 = 200; #outer ratio arm resistance in Ω
Ry = 680*10**-6; #unknown resistor in uΩ
#calculation
x = (R1*R3)/float(R2); #resistance in Ω
y = (m*Ry)/float(l+m+Ry); #resistance in Ω
z = ((R1/float(R2))-(l/float(m))); #unknown resistanc in Ω
Rx = x+(y*z);
#rresult
print'unknown resistance %3.3f'%(Rx*10**6),'uΩ';
import math
#variable declaration
Z1 = 50; #inductive resistance in Ω
Z2 = 125; #pure rresistance in Ω
Z3 = 200; #inductive resistance in Ω
theta1 = 80;
theta2 = 0;
theta3 = 30;
#calculations
Z4 = (Z2*Z3)/float(Z1); #unknown resistance in Ω
theta4 = theta2+theta3-theta1; #unknowm angle in °
#result
print'unknown resistance %d'%Z4;
print 'unknowm angle %d'%theta4,'°';
import cmath
#variable declaration
R1 = 225; #resistance in Ω
R2 = 150; #resistance in Ω
C2 = 0.53*10**-6; #capacitance in F
R3 = 100; #resistance in Ω
L = 7.95*10**-3; #inductance in H
f = 1000; #frequency in Hz
#calculations
Z1 = R1;
w = 2*cmath.pi*f;
x = (1/float(w*C2));
Z2 = complex(R2,-x);
y = w*L;
Z3 = complex(R3,y);
Z4 = (Z2*Z3)/float(Z1); #unknown arm
Z41 = complex(Z4)
C4 = (1/float(2*cmath.pi*f*100)); #imaginary value is 100 from Z4
c = (Z4);
#result
print' R4 = %05f'%(Z4.real);
print'capacitance %3.2f'%(C4*10**6),'uF'
import math
#variable declaration
w = 7500; #frequency in radians/sec
R2 = 140; #resistance in Ω
R3 = 1000; #non-reactive resistance of Ω
R4 = 1000; #non-reactive resistance of Ω
C2 = 0.0115; #capacitance in uF
#calculations
R1 = (R2*R3)/float(R4); #shuntless resistance in Ω
C1 = (C2*R4)/float(R3); #capacitor of imperfect condenser in F
#result
print'shuntless resistance %d'%R1,'Ω';
print'capacitor of imperfect condenser %3.4f'%C1,'uF';
import math
#variable declaration
R1 = 235; #resistance in kΩ
R2 = 2.5; #resistance in kΩ
R3 = 50; #resistance in kΩ
C1 = 0.012; #capacitance in uF
#calculations
Rx = (R2*R3)/float(R1); #unknown resistance in Ω
Lx = C1*R2*R3; #unknown inductance in H
#result
print'unknown resistance %3.2f'%Rx,'kΩ';
print'unknown inductance %3.1f'%Lx,'H';
import math
#variable declaration
w = 3000; #frequency in radians/sec
R2 = 9000; #resistance in Ω
R1 = 1800; # resistance of Ω
R3 = 900; # resistance of Ω
C1 = 0.9*10**-6; #capacitance in F
#calculations
a = ((w**2)*(R1**2)*(C1**2));
Rx = ((w**2)*(C1**2)*R1*R2*R3)/float(1+a); #equivalent resistance in KΩ
Lx = (R2*R3*C1)/float(1+((w**2)*(R1**2)*(C1**2))); #equivalent inductance in H
#result
print'equivalent resistance %3.2f'%(Rx*10**-3),'KΩ';
print'equivalent inductance %3.3f'%Lx,'H';
print'Note:calculation mistake in textbook';
import math
#variable declaration
R1 = 1.5*10**3; #resistance in Ω
R2 = 3000; #resistance in Ω
C1 = 0.4*10**-6; #capacitance in F
C3 = 0.4*10**-6; #capacitance in F
f = 1000; #frequency in Hz
#calculations
w = 2*math.pi*f;
Rx = (R2*C1)/float(C3); #resistance in kΩ
Cx = (R1*C3)/float(R2); #capacitance in F
D = w*Cx*Rx; #dissipation factor
#result
print'resistance %d'%Rx,'kΩ';
print'capacitance %3.2f'%(Cx*10**6),'uF';
print'dissipation factor %3.2f'%D;
import math
#variable declaration
Q = 1000; #resistance in Ω
S = 1000; #resistance in Ω
P = 500; #resistance in Ω
C = 0.5*10**-6; #capacitance in uF
r = 100; #resistance in Ω
#calculations
R = (P*Q)/float(S); #resistance in Ω
L = ((C*P)*((r*(Q+S))+(Q*S)))/float(S); #inductance in H
#result
print'resistance %d'%R,'Ω';
print'inductance %3.1f'%L,'H';
import math
#variable declaration
R2 = 1000; #resistance in Ω
R4 = 1000; #resistance in Ω
R3 = 500; #resistance in Ω
C = 3*10**-6; #capacitance in uF
r = 100; #resistance in Ω
#calculations
R = (R2*R3)/float(R4); #resistance in Ω
L = ((C*R2)*((r*(R3+R4))+(R3*R4)))/float(R4); #inductance in H
#result
print'resistance %d'%R,'Ω';
print'inductance %3.2f'%L,'H';
import math
#variable declaration
R2 = 100; #resistance in Ω
R3 = 834; #resistance in Ω
C4 = 0.1*10**-6; #capacitance in F
C3 = 0.124*10**-6; #capacitance in F
f = 1000;
#calculations
L1 = R2*R3*C4; #inductance in H
R1 = (R2*C4)/float(C3); #resistance in Ω
X1 = 2*math.pi*2*f*L1; #reactance of specimen in Ω
Z1 = math.sqrt((R1**2)+(X1**2)); #impedance of specimen in Ω
#result
print'inductance of specimen %3.2f'%(L1*10**3),'Ω';
print'resistance of specimen %3.2f'%R1,'Ω';
print'impedance of specimen %3.3f'%Z1,'Ω';
import math
#variable declaration
M = 18.35*10**-3; #mutual inductance in H
R1 = 200; #non-reactive resistance in Ω
L1 = 40.6*10**-3; #inductance in mH
R2 = 119.5; #non-reactive resistance in Ω
R4 = 100; # resistance in Ω
#calculations
C2 = M/float(R1*R4); #capacitance in F
R3 = (R4*(L1-M))/float(M); #resistance in Ω
R = R3-R2; #series resistance of capacitor in Ω
#result
print'capacitance %3.4f'%(C2*10**6),'uF';
print'series resistance of capacitor %3.2f'%R,'Ω';
import math
#variable declaration
R1 = 2.8*10**3; #resistance in Ω
C1 = 4.8*10**-6; #capacitance in uF
R2 = 20*10**3; #resistance in Ω
R4 = 80*10**3; #resistance in Ω
f = 2000; #frequency in Hz
w = 12.57*10**3;
R3 = 11.2*10**3;
#calculations
x = 1/float((w**2)*(C1**2)*(R1));
y = R1+x;
z = R4/float(R2);
R3 = z*(x+y); #equivalent resistance in KΩ
a = (w**2)*C1*R1*R3;
C3 = 1/float(a); #equivalent capacitance in F
#result
print'equivalent resistance %3.2f'%(R3*10**-3),'KΩ';
print'equivalent capacitance %3.2f'%(C3*10**12),'pF';
import math
#variable declaration
L1 = 52.6; #inductance in mH
R2 = 1.68; #resistance in MHz
r1 = 28.5; #resistance in MHz
#calculations
#at balance of bridge (r1+jwL1)=((R2+r2)+jwL2)
#comparing both real and imaginary terms we get
r2 = r1-R2; #resistance in Ω
L2 = L1; #inductance in H
#result
print'resistance %3.2f'%r2;
print'inductance %3.2f'%L1,'mH';
import cmath
#variable declaration
R3 = 300; #resistance in Ω
R2 = 500; #resistance in Ω
C1 = 0.2*10**-6; #capacitance in F
C3 = 0.1*10**-6; #capacitance in F
f = 1000; #frequency in Hz
#calculations
w = 2*(cmath.pi)*f; #angular frequency
z = (1/float(w*C1));
Z1 = complex(0,-z);
Z2 = R2;
x = 1/float(R3);
y = w*C3;
Y3 = complex(x,y);
Z4 = (Z2)/complex(Z1*Y3);
L = ((182.19)/float(2*cmath.pi*f)); #imaginary value is 182.12 from Z4
#result
print'R4 = %03f'%(Z4.real),'Ω';
print'inductance %3.0f'%(L*10**3),'mH';
import cmath
#variable declaration
R1 = 200; #resistance in Ω
R2 = 200; #resistance in Ω
C2 = 5*10**-6; #capacitance in F
C3 = 0.2*10**-6; #capacitance in F
R3 = 500; #resistance in Ω
f = 1000; #frequency in Hz
#calculations
Z1 = R1;
w = 2*cmath.pi*f; #angular frequency
x = (1/float(w*C2));
Z2 = complex(R2,-x);
y = 1/float(w*C3);
Z3 = complex(R3,-y);
Z4 = (Z2*Z3)/float(Z1); #unknown arm
C4 = (1/float(2*cmath.pi*f*875.3)); #imaginary value is 100 from Z4
#result
print'R4 = %05f'%(Z4.real),'Ω';
print'capacitance %3.2f'%(C4*10**6),'uF';
import cmath
#variable declaration
R1 = 600; #resistance in Ω
R2 = 100; #resistance in Ω
C1 = 1*10**-6; #capacitance in F
R3 = 1000; #resistance in Ω
f = 1000; #frequency in Hz
#calculations
w = 2*cmath.pi*f; #angular frequency
x = 1/float(R1);
y = w*C1;
Y1 = complex(x,y);
Z2 = R2;
Z3 = R3;
Z4 = Z2*Z3*Y1; #unknown arm
L = (628.3/float(2*cmath.pi*f)); #inductance in H
#result
print'R4 = %05f'%(Z4.real),'Ω';
print'inductance %3.2f'%L,'H';
import math
#variable declaration
C2 = 106*10**-12; #capacitance in F
R4 = 1000/float(math.pi); #resistance in
C4 = 0.55*10**-6; #capacitance in F
R3 = 270; #resistance in
e0 = 8.854*10**-12; #absolute permittivity
t = 0.005; #thickness of bakelite in m
d = 12*10**-2; #diameter in m
f = 50; #frequency in Hz
#calculations
R4 = 1000/float(math.pi); #resistance in
A = (math.pi/float(4))*((d)**2); #area of electrodes in m**2
w = 2*math.pi*f; #angular frequency
R1 = (R3*C4)/float(C2); #resistance in
C1 = (R4*C2)/float(R3); #apacitance in pF
P = w*R1*C1; #power factor
er = (C1*t)/float(e0*A); #relative permittivity
#result
print'capacitance = %3.2f'%(C1*10**12),'pF';
print'power factor = %3.3f'%P;
print'relative permittivity = %3.2f'%er;
import math
#variable declaration
f1 = 2*10**6; #frequency in Hz
C1 = 420*10**-12; #capacitance in F
C2 = 90*10**-12; #capacitance in F
f2 = 4*10**6; #frequency in Hz
#calculations
Cd = (C1-(4*C2))/float(3); #distributed capacitance in pF
#result
print'distributed capacitance %d'%(Cd*10**12),'pF';
import math
#variable declaration
f1 = 2*10**6; #frequencyin Hz
f2 = 5*10**6; #frequencyin Hz
C1 = 410*10**-12; #capacitance in F
C2 = 50*10**-12; #capacitance in F
#calculations
x = f2/float(f1);
Cd = (C1-((x**2)*(C2)))/float((x**2)-1); #distributed capacitance
#result
print'distributed capacitance %3.3f'%(Cd*10**12),'pF';
import math
#variable declaration
C1 = 190*10**-12; #capacitance in F
Q1 = 75; #quality factor
C2 = 170*10**-12; #capacitance in F
Q2 = 45; #quality factor
f = 200*10**3; #frequency in Hz
#calculations
Rx = ((C1*Q1)-(C2*Q2))/float(2*math.pi*f*C1*C2*Q1*Q2); #resistive in Ω
Xx = (C1-C2)/float(2*math.pi*f*C1*C2); #reactive components in Ω
#result
print'resistive %3.2f'%Rx,'Ω';
print'reactive components %3.2f'%Xx,'Ω';
import math
#variable declaration
R = 4; #resistance in Ω
f = 500*10**3; #frequency in Hz
C = 110*10**-12; #capacitance in F
x = 0.02; #resistance across oscillatory circuit in Ω
#calculations
Qtrue = 1/float(2*math.pi*f*C*R);
Qindicated = 1/float(2*math.pi*f*C*(R+x));
e = ((Qtrue-Qindicated)/float(Qtrue))*100; #percentage error in %
#result
print'percentage error %3.1f'%e,'%';
import math
#variable declaration
f1 = 600*10**3; #frequency in Hz
f2 = 2*10**6; #frequency in Hz
C1 = 100*10**-12; #capacitance in F
#calculations
Cd = ((f1**2)*C1)/float((f2**2)-(f1**2)); #self-capacitance in F
#calculations
print'self-capacitance %3.2f'%(Cd*10**12),'pF';
import math
#variable declaration
f = 400*10**3; #frequency in kHz
C = 220*10**-12; #capacitance in F
Rsh = 0.8; #resistance in Ω
Q = 110; #quality factor
#calculations
Lcoil = 1/float(((2*math.pi*f)**2)*C); #inductance in H
x = (2*math.pi*f*Lcoil)/float(Q);
Rcoil = x-Rsh; #resistance in Ω
#calculations
print'inductance %3.2f'%(Lcoil*10**6),'uH';
print'resistance %f'%Rcoil,'Ω';
import math
#variable declaration
Cs = 210*10**-12; #capacitance in F
Cv = 6*10**-12; #capacitance in F
f1 = 2*10**6; #frequency in Hz
f2 = 4*10**6; #frequency in Hz
#calculations
#we have Cs+Cv = 1/(4*(math.pi**2)*(f2**2)*L
#we have C+Cv = 1/(4*(math.pi**2)*(f2**2)*L
L = 1/float(4*(math.pi**2)*(f2**2)*(Cs+Cv)); #inductance in uH
C = (1/float((4*(math.pi**2)*(f1**2)*L)))-Cv; #capacitance in pF
#result
print'inductance L = %3.2f'%(L*10**6),'uH';
print'capacitance C = %3.3f'%(C*10**12),'pF';
import math
#variable declaration
C1 = 40*10**-12; #capacitance in pF
C2 = 48*10**-12; #capacitance in pF
f = 4*10**6; #frequency in Hz
R1 = 60; #resistance in Ω
#calculations
Co = (C1+C2)/float(2);
L = 1/float(4*(math.pi**2)*(f**2)*Co); #inductance in H
#we have I = E/math.sqrt((R**2)+((w*l)-((1/w*C1))**2))
#we also have I = E/(R+R1)
#comparing we get and solving we get R**2 + 2*R1*R +R1**2 = R**2 + ((w*l)-((1/w*C1))**2)
w = 2*math.pi*f; #angular frequency
x = w*L;
y = 1/float(w*C2);
Y = ((x-y)**2);
R = (Y-(R1**2))/float(2*R1); #resistance in Ω
#result
print'inductance L = %3.3e'%(L),'uH';
print'resistance R = %3.1f'%(R),'Ω';
print'calculation mistake in textbook assuming approximate values'
import math
#variable declaration
C = 160*10**-12; #capacitancein pF
f0 = 1.2*10**6; #frequency in Hz
f01 = 6*10**3; #frequency in Hz
#calculations
f1 = f0+f01; #frequency in Hz
f2 = f0-f01; #frequency in Hz
f = f1-f2; #frequency in Hz
Q = f0/float(f); #Q factor
R = f/float(2*math.pi*f0*f0*C); #effective resistance in Ω
#result
print'Q factor %d'%Q;
print'effective resistance %3.2f'%R,'Ω';
import math
#variable declaration
C1 = 200*10**-12; #capacitance in F
C2 = 40*10**-12; #capacitance in F
#calculations
f1 = (2/float(math.pi))*10**6; #frequency in Hz
f2 = 2*f1; #frequency in Hz
x1 = 4*(math.pi**2)*(f1**2);
x2 = 4*(math.pi**2)*(f2**2);
#L = 1/(x1*(C+Cd));
# L = 1/(x2*(C+Cd));
#comparing we get following equation for Cd
Cd = ((x1*C1)-(x2*C2))/float(x2-x1); #capacitance in pF
c = C1+Cd;
L = 1/float(x1*(c)); #inductance in H
#result
print'self-capacitance of the coil = %3.2f'%(Cd*10**12),'pF';
print'inductance = %3.2f'%(L*10**6),'uH';