from __future__ import division
import math
import cmath
#initializing the variables:
R = 10;# in ohms
C = 40e-6;# IN fARADS
L = 0.075;# IN Henry
V = 200;# in Volts
#calculation:
#Resonant frequency,
fr = 1/(2*math.pi*((L*C)**0.5))
#Current at resonance, I
I = V/R
#Results
print "\n\n Result \n\n"
print "\n (a)Resonant frequency = ",round(fr,2)," Hz\n"
print "\n (b)Current at resonance, I is ",I," A\n"
from __future__ import division
import math
import cmath
#initializing the variables:
R = 8;# in ohms
L = 0.010;# IN Henry
f = 1000;# in Hz
#calculation:
#At resonance
#capacitance C
C = 1/(L*(2*math.pi*f)**2)
#Results
print "\n\n Result \n\n"
print "\n capacitance, C is ",round(C*1E6,2),"uF\n"
from __future__ import division
import math
import cmath
#initializing the variables:
C1 = 1000e-12;# IN fARADS
C2 = 500e-12;# IN fARADS
fr1 = 92500;# in Hz
fr2 = 127800;# in Hz
#calculation:
#For a series R–L–C circuit the resonant frequency fr is given by:
#fr = 1/(2pi*(L*C)**2)
Cs = ((C1 - C2)/((fr2/fr1)**2 - 1)) - C2
L = 1/((C1 + Cs)*(2*math.pi*fr1)**2)
#Results
print "\n\n Result \n\n"
print "\n (a)stray capacitance, Cs is ",round(Cs*1E12,2),"pF\n"
print "\n (b)inductance, L is ",round(L*1000,2),"mH\n"
from __future__ import division
import math
import cmath
#initializing the variables:
R = 10;# in ohms
C = 5e-6;# IN fARADS
rv = 20;#in volts
thetav = 0;# in degrees
f = 318.3;# in Hz
#calculation:
wr = 2*math.pi*f
#The maximum voltage across the resistance occurs at resonance when the current is a maximum.
#At resonance,L = 1/c*wr**2
L = 1/(C*wr**2)
#voltage
V = rv*math.cos(thetav*math.pi/180) + 1j*rv*math.sin(thetav*math.pi/180)
#Current at resonance Ir
Ir = V/R
#p.d. across resistance, VR
VR = Ir*R
#inductive reactance, XL
XL = wr*L
#p.d. across inductance, VL
VL = Ir*(1j*XL)
#capacitive reactance, Xc
Xc = 1/(wr*C)
#p.d. across capacitor, Vc
Vc = Ir*(-1j*Xc)
#Q-factor at resonance, Qr
Qr = VL.imag/V
#Results
print "\n\n Result \n\n"
print "\n (a)inductance, L is ",round(L*1000,2),"mH\n"
print "\n (b)p.d. across resistance, VR is ",VR," V, p.d. across inductance, VL ",round( VL.imag,2),"j V "
print "and p.d. across capacitor, VC ",round(Vc.imag,2)," V\n"
print "\n (c)Q-factor at resonance, Qr is ",round(abs(Qr),2)," \n"
from __future__ import division
import math
import cmath
#initializing the variables:
R = 80;# in ohms
C = 0.4e-6;# IN fARADS
L = 0.020;# IN Henry
Vm = 12;#in volts
#calculation:
#Resonant frequency,
fr = 1/(2*math.pi*((L*C)**0.5))
wr = 2*math.pi*fr
#Q = wr*L/R
Q = wr*L/R
Vc = Q*Vm
#the frequency f at which VC is a maximum value,
f = fr*(1 - (1/(2*Q*Q)))**0.5
#the maximum value of the p.d. across the capacitor is given by:
Vcm = Vc/((1 - (1/(2*Q*Q)))**0.5)
#Results
print "\n\n Result \n\n"
print "\n (a)The resonant frequency is ",round(fr,2)," Hz\n"
print "\n (b)the value of the p.d. across the capacitor at the resonant frequency ",round(Vc,2)," V\n"
print "\n (c)the frequency f at which Vc is a maximum value, is ",round(f,2)," Hz\n"
print "\n (d)the maximum value of the p.d. across the capacitor is ",round(Vcm,2)," V\n"
from __future__ import division
import math
import cmath
#initializing the variables:
QL = 60;# Q-factor
Qc = 390;# Q-factor
#calculation:
QT = QL*Qc/(QL + Qc)
#Results
print "\n\n Result \n\n"
print "\n the overall Q-factor is ",QT
from __future__ import division
import math
import cmath
#initializing the variables:
R = 5;# in ohms
L = 0.010;# IN Henry
fr = 10000;# in Hz
#calculation:
wr = 2*math.pi*fr
#Q-factor at resonance is given by
Qr = wr*L/R
#Since Qr = fr/(f2 - f1),
bw = fr/Qr
#Results
print "\n\n Result \n\n"
print "\n bandwidth of the filter is ",round(bw,2)," Hz\n"
from __future__ import division
import math
import cmath
#initializing the variables:
Zr = 50;# in ohms
fr = 1200;# in Hz
Qr = 30;# Q-factor
#calculation:
#At resonance the circuit impedance, Z
R = Zr
wr = 2*math.pi*fr
#Q-factor at resonance is given by Qr = wr*L/R, then L is
L = Qr*R/wr
#At resonance r*L = 1/(wr*C)
#capacitance, C
C = 1/(L*wr*wr)
#bandwidth,.(f2 − f1)
bw = fr/Qr
#upper half-power frequency, f2
f2 = (bw + ((bw**2) + 4*(fr**2))**0.5)/2
#lower half-power frequency, f1
f1 = f2 - bw
#At the half-power frequencies, current I
#I = 0.707*Ir
#Hence impedance
Z = (2**0.5)*R
#Results
print "\n\n Result \n\n"
print "\n (a)inductance, L is ",round(L*1000,2),"mH\n"
print "\n (b)capacitance, C is ",round(C*1E9,2),"nF\n"
print "\n (c)bandwidth is ",round(bw,2)," Hz\n"
print "\n (d)the upper half-power frequency, f2 is ",round(f2,2)," Hz "
print " and the lower half-power frequency, f1 is ",round(f1,2)," Hz\n"
print "\n (e)impedance at the half-power frequencies is ",round(Z,2)," ohm\n"
from __future__ import division
import math
import cmath
#initializing the variables:
V = 0.2;# in Volts
I = 0.004;# in Amperes
fr = 3000;# in Hz
Qr = 100;# Q-factor
#calculation:
wr = 2*math.pi*fr
#At resonance, impedance
Z = V/I
#At resonance the circuit impedance, Z
R = Z
#Q-factor at resonance is given by Qr = wr*L/R, then L is
L = Qr*R/wr
#At resonance r*L = 1/(wr*C)
#capacitance, C
C = 1/(L*wr*wr)
#Q-factor at resonance in a series circuit represents the voltage magnification Qr = Vc/V, then Vc is
Vc = Qr*V
#Results
print "\n\n Result \n\n"
print "\n (a)the circuit resistance is ",round(R,2)," ohm\n"
print "\n (b)inductance, L is ",round(L*1000,2),"mH\n"
print "\n (c)capacitance, C is ",round(C*1E9,2),"nF\n"
print "\n (d)the voltage across the capacitor is ",round(Vc,2)," V\n"
from __future__ import division
import math
import cmath
#initializing the variables:
R = 8.84;# in ohms
L = 0.3518;# IN Henry
C = 20e-6;# IN fARADS
#calculation:
#Resonant frequency,
fr = 1/(2*math.pi*((L*C)**0.5))
wr = 2*math.pi*fr
#Q-factor at resonance, Q = wr*L/R
Qr = wr*L/R
#bandwidth,.(f2 − f1)
bw = fr/Qr
#the lower −3 dB frequency
f1 = fr - bw/2
#the upper −3 dB frequency
f2 = fr + bw/2
#Results
print "\n\n Result \n\n"
print "\n (a)Resonant frequency, fr is ",round(fr,2)," Hz\n"
print "\n (b)Q-factor at resonance is ",round(Qr,2),"\n"
print "\n (c)Bandwidth is ",round(bw,2)," Hz\n"
print "\n (d)the lower -3dB frequency, f1 is ",round(f1,2)," Hz "
print " and the upper -3dB frequency, f2 is ",round(f2,2)," Hz\n"
from __future__ import division
import math
import cmath
#initializing the variables:
R = 15;# in ohms
L = 0.008;# IN Henry
C = 0.3e-6;# IN fARADS
rv = 7.56;#in volts
thetav = 0;# in degrees
x = 0.03;
#calculation:
#Resonant frequency,
fr = 1/(2*math.pi*((L*C)**0.5))
wr = 2*math.pi*fr
#At resonance,
Zr = R
#voltage
V = rv*math.cos(thetav*math.pi/180) + 1j*rv*math.sin(thetav*math.pi/180)
#Current at resonance
Ir = V/Zr
#Q-factor at resonance, Q = wr*L/R
Qr = wr*L/R
#If the frequency is 3% above fr, then
de = x
I = Ir/(1 + (2*de*Qr*1j))
Z = V/I
#Results
print "\n\n Result \n\n"
print "\n (a)Current at resonance, Ir is ",round(abs(Ir),2)," A\n"
print "\n (b)current flowing in the circuit when frequency 3 percent"
print " above the resonant frequency is ",round(I.real,2)," + (",round( I.imag,2),")i A\n"
print "\n (c)impedance of the circuit when the frequency is 3 percent"
print " above the resonant frequency is ",round(Z.real,2)," + (",round(Z.imag,2),")i A\n"