MATLAB Simulation
The Matlab program used is re-produced below.
% Program to simulate the half-wave rectifier circuit
% Enter the peak voltage, frequency, inductance L in mH and resistor R
disp('Typical value for peak voltage is 340 V')
peakV=input('Enter Peak voltage in Volts>');
disp('Typical value for line frequency is 50 Hz')
freq=input('Enter line frequency in Hz>');
disp('Typical value for Load inductance is 31.8 mH')
L=input('Enter Load inductance in mH>');
disp('Typical value for Load Resistance is 10.0 Ohms')
R=input('Enter Load Resistance in Ohms>');
w=2.0*pi*freq;
X=w*L/1000.0;
if (X<0.001) X=0.001; end;
Z=sqrt(R*R+X*X);
loadAng=atan(X/R);
A=peakV/Z*sin(loadAng);
tauInv=R/X;
for n=1:360;
theta=n/180.0*pi;
X(n)=n;
cur=peakV/Z*sin(theta-loadAng)+A*exp(-tauInv*theta);
if (cur>0.0)
Vind(n)=peakV*sin(theta)-R*cur;
iLoad(n)=cur;
Vout(n)=peakV*sin(theta);
else
Vind(n)=0;
iLoad(n)=0;
Vout(n)=0;
end;
end;
plot(X,iLoad)
title('The diode current')
xlabel('degrees')
ylabel('Amps')
grid
pause
plot(X,Vout)
title('Voltage at cathode')
xlabel('degrees')
ylabel('Volts')
grid
pause
plot(X,Vind)
title('Inductor Voltage')
xlabel('degrees')
ylabel('Volts')
grid
The plots obtained for the typical values mentioned are shown below.
It can be seen from the waveform of voltage across the inductor is that the
area above the x-axis at 0 V is equal to its area below the x-axis. It can
be seen that the matlab program is relatively simple.
TO THE TOP |