import math
from math import pi,sqrt,exp
L=10*10**-3 #Inductance of s e r i e s inverter cir cui t in Henry
C=0.1*10**-6 #Capacitance of s e r i e s inverter ci rcu it in Farads
R=400 #Load Resistance in Ohms
Toff=0.2*10**-3 #Off time of Duty cycle in sec
w=sqrt((1/(L*C))-(R**2/(4*L**2))) #Angular Frequency in rad/ sec
w=round(w,1)
print 'value of w=',w,'rad/sec'
F=w/(3.14+(w*Toff)) #Output Frequency in Hertz
F=round(F,1)
print 'value of the Output Frequency=F=',F,'Hertz'
T=1/F #Time period of Output in sec
AF=exp((-R/(2*L))*T) #Attenuation Factor
AF=round(AF,4)
print 'value of the Attenuation Factor=AF=',AF
import math
C=1*10**-6 #Capacitance of series inverter circuit in Farads
f=5*10**3 #operating Frequency of series Inverter in Hertz
L=1/(C*(f**2)) #value of Inductance under Resonance condition in Henry
print 'value of Inductance at resonance=L=',L,'Henry'
import math
from math import sqrt
L=5*10**-3 #Inductance of series inverter circuit in Henry
C=1*10**-6 #Capacitance of series inverter circuit in Farads
Rl=400 #Load Resistance in Ohms
R2=10**4 #value of the second resistance in Ohms
DF=0.7 #Damping Factor value of LC filter
R1=(2*(DF)*(sqrt(L/C)))-R2 -(1/(Rl*C)) #value of the first resistance in Ohms
R1=round(R1,2)
print 'value of resistance=R1=',R1,'Ohms'