|
|
MATLAB Simulation
The Matlab program used for simulation is presented below.
% Program to simulate the half-wave controlled 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>');
disp('Typical value for Firing angle is 30.0 degree')
fangDeg=input('Enter Firing angle within range 0 to 180 in deg>');
fangRad=fangDeg/180.0*pi;
w=2.0*pi*freq;
X=w*L/1000.0;
if (X<0.001) X=0.001; end;
Z=sqrt(R*R+X*X);
tauInv=R/X;
loadAng=atan(X/R);
A=peakV/Z*sin(loadAng-fangRad);
Ampavg=0;
AmpRMS=0;
for n=1:360;
theta=n/180.0*pi;
X(n)=n;
if (n<fangDeg)
cur=0.0;
Vind(n)=0;
iLoad(n)=0;
Vout(n)=0;
else
cur=peakV/Z*sin(theta-loadAng)+A*exp(-tauInv*(theta-fangRad));
if (cur>0)
Ampavg=Ampavg+cur*1/360;
AmpRMS=AmpRMS+cur*cur*1/360;
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;
end;
plot(X,iLoad)
title('The Load 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
AmpRMS=sqrt(AmpRMS);
[A,message]=fopen('hwavec1.dat','w');
fprintf(A,'Avg Load Cur=\t%d\tRMS Load Cur=\t%f\n',Ampavg,AmpRMS);
fclose(A)
The waveforms obtained for the typical specified values are displayed now.
The output file containing the values of average load current and the RMS load
current is presented below.
Avg Load Cur= 8.481852e+000 RMS Load Cur= 12.878237
TO THE TOP |
|