In [1]:

```
Vrms=220 #Volts, power supply
n2=1 #Assumption
n1=12*n2 #Turns Ratio
#Calculation
import math
Vp=math.sqrt(2)*Vrms #Maximum(Peak) Primary Voltage
Vm=n2*Vp/n1 #Maximum Secondary Voltage
Vdc=Vm/math.pi #DC load Voltage
# Results
print "The DC load Voltage is = ",round(Vdc,2),"V"
print "The Peak Inverse Voltage(PIV) is = ",round(Vm,1),"V"
```

In [2]:

```
Vrms=220 #Volts, power supply rms voltage
n2=1 #Assumption
n1=12*n2 #Turns Ratio
#Calculation
import math
Vp=math.sqrt(2)*Vrms #Maximum(Peak Primary Voltage
Vm=n2*Vp/n1 #Maximum Secondary Voltage
Vdc=2*Vm/math.pi #DC load Voltage
# Results
print "The DC load Voltage is = ",round(Vdc,1),"V"
print "The Peak Inverse Voltage(PIV of Bridge Rectifier is = ",round(Vm,1),"V"
print "The Peak Inverse Voltage(PIV of Centre-tap Rectifier is = ",round(2*Vm,1),"v"
```

In [3]:

```
import math
Rl=1000.0 #Ohms, load resistance
rd=10.0 #Ohms forward base dynamic resistance
Vm=220.0 #Volts(Peak Value of Voltage)
#Calculation
Im=Vm/(rd+Rl) #Peak Value of Current
# Result
print "The Peak Value of Current is = ",round(Im*1000,1),"mA"
#(b) dc or av value of current
Idc=2*Im/math.pi #DC Value of Current
# Results
print "The DC or Average Value of Current is ",round(Idc*1000,2),"mA"
#(c)
Irms=Im/math.sqrt(2) #RMS Value of Current
# Results
print "The RMS Value of Current is = ",round(Irms*1000,1),"mA"
#(d)
r=math.sqrt((Irms/Idc)**2-1) #Ripple Factor
# Results i
print " The Ripple Factor r = ",round(r,3)
#(e)
Pdc=Idc**2*Rl
Pac=Irms**2*(rd+Rl)
n=Pdc/Pac #Rectification Efficiency
# Results
print "The Rectification EFficiency n(eeta) = percent.",round(n*100,2)
```

In [4]:

```
Vz=9.1 #Volts
P=0.364 #Watts
#Calculation
Iz=P/Vz
#Result
print " The Maximum permissible Current is ",Iz*1000,"mA"
```

In [5]:

```
Ci=18*10**(-12) #i.e. 18 pF, capacitance of diode
Vi=4 #volt, initial voltage
Vf=8 #v, final voltage
#Calculation
import math
Vf=8
K=Ci*math.sqrt(Vi)
Cf=K/math.sqrt(Vf)
#Result
print " The Final Value of Capacitance is C = ",round(Cf/10**(-12),3),"pF"
```