import math
V=40 #gain of the controller in volts
P=100/(1+V) #permanent error of p controller in percent
print 'permanent Error of P controller=P=',P,'percent'
import math
P=1.8 #permanent error of p controller in percent
V=100/1.8-1 #gain of the controller in volts
V=round(V,1)
print 'gain of the controller=V=',V,'volts'
G=8 #sum of all time constants in milliseconds
T1=2*G*V #motor armature time constant
T1=round(T1,1)
print 'Motor armature time constant=T1=',T1,'milliseconds'
import math
f=50 #frequency in hz
p=6 #pulse number
t1=1000/(2*f*p) #time constant for the current loop in ms
print 'time constant for the current loop=t1=',t1,'ms'
t2=1.5 #time constant of feedback channel in ms
G=t1+t2 #smaller time constant in ms
print 'Smaller time constant=G=',G,'ms'
T1=30 #bigger time constant in ms
Tn=T1 #time constant of the controller in ms
print 'Time constant of the controller in AVO=Tn=',Tn,'ms'
V=T1/(2*G) #gain of the control system
print 'Gain of the control system=V=',V
Vg=14 #gain of the regulating current link
Vr=V/Vg #gain of the PI controller
Vr=round(Vr,2)
print 'Gain of the PI controller=Vr=',Vr
R2=11 #R2 in KiloOhms
R1=R2/Vr #R1 in kiloohms
R1=round(R1,1)
print 'R1=',R1,'Kiloohms'
C1=Tn/R1 #C1 in microfarads
C1=round(C1,1)
print 'C1=',C1,'microfarads'
import math
G=20.0 #smaller time constant in ms
T1=350.0 #bigger time constant in ms
Tn=4*G #time constant of the controller in ms
print 'Time constant of the controller in SO=Tn=',Tn,'ms'
V=T1/(2*G) #gain of the control system
print 'Gain of the control system=V=',V
Vg=1.0 #gain of the regulating current link
Vr=V/Vg #gain of the PI regulator
print 'Gain of the PI regulator=Vr=',Vr
R1=11.0 #R1 in KiloOhms
R2=R1*Vr #R2 in kiloohms
print 'R2=',R2,'Kiloohms'
C2=Tn/R2 #C1 in microfarads
C2=round(C2,1)
print 'C2=',C2,'microfarads'
import math
from math import sqrt
G=6 #smaller time constant in ms
T1=80 #bigger time constant in ms
Tn=T1 #time constant of the controller in ms
print 'Time constant of the controller=Tn=',Tn,'ms'
V=T1/(2*G) #gain of the control system
print 'Gain of the control system=V=',V
Wn=1/(sqrt(2)*G) #Natural frequency of the system in rad/ms
Wn=round(Wn,3)
print 'Natural frequency of the system=Wn=',Wn,'rad/ ms'
Tf=4.7*G #time taken by the system to achiecve i t s desired output for firsttime
print 'time taken by the system to achieve its desired value=Tf=',Tf,'ms'
print 'Maximum overshoot for a symmetrically optimised system is 4.3 percent'
Tmax=6.24*G #time at which maximum overload will occur in ms
print 'Time at which maximum overload will occur= Tmax=',Tmax,'ms'
import math
G=20 #smaller time constant in ms
Tn=4*G #time constant of the controller in ms
print 'time constant of the controller=Tn=',Tn,'ms'
T1=170 #bigger time constant in ms
V=T1/(2*G) #gain of the control system
print 'Gain of the control system=V=',V
Tf=3.1*G #time taken by the system to achiecve its final value on step input
print 'time taken by the system to achieve its final value=Tf=',Tf,'ms'
print 'Maximum overshoot for a symmetrically optimised system is 43 percent'
import math
G=10 #smaller time constant in ms
Tf=4.7*G #time taken by the system to achiecve its final output for firsttime
print 'time taken by the system to achieve its final value=Tf=',Tf,'ms'
print 'Maximum overshoot for a symmetrically optimised system is 4.3 percent'
Tmax=6.24*G #time at which maximum overshoot will occur in ms
print 'Time at which maximum overshoot will occur =Tmax=',Tmax,'ms'
Ts=8.4*G #settling time in ms
print 'Settling time=Ts=',Ts,'ms'
import math
print 'Response for an AVO system:'
G=10 #smaller time constant in ms
Tf=4.7*G #time taken by the system to achiecve its f i n a l output for firsttime
print 'time taken by the system to achieve its final value=Tf=',Tf,'ms'
print 'Maximum overshoot for a symmetrically optimised system is 4.3 percent'
Ts=8.4*G #settling time in ms
print 'Settling time=Ts=',Ts,'ms'
print 'Response for an SO system:'
G=10 #smaller time constant in ms
Tf=3.1*G #time taken by the system to achiecve its f i n a l output for firsttime
print 'time taken by the system to achieve its final value=Tf=',Tf,'ms'
Ts=16.6*G #settling time in ms
print 'Settling time=Ts=',Ts,'ms'