Page 341 - Solutions Manual to accompany Electric Machinery Fundamentals
P. 341
A MATLAB program to generate these waveforms and to calculate the ripple on the output waveform is
shown below. The first function biphase_controller.m generates a switched ac waveform. The
inputs to this function are the current phase angle in degrees, the offset angle of the waveform in degrees,
and the firing angle in degrees.
function volts = biphase_controller(wt,theta0,fire)
% Function to simulate the output of an ac phase
% angle controller that operates symmetrically on
% positive and negative half cycles. Assume a peak
% voltage VM = 120 * SQRT(2) = 170 V for convenience.
%
% wt = Current phase in degrees
% theta0 = Starting phase angle in degrees
% fire = Firing angle in degrees
% Degrees to radians conversion factor
deg2rad = pi / 180;
% Remove phase ambiguities: 0 <= wt < 360 deg
ang = wt + theta0;
while ang >= 360
ang = ang - 360;
end
while ang < 0
ang = ang + 360;
end
% Simulate the output of the phase angle controller.
if (ang >= fire & ang <= 180)
volts = 170 * sin(ang * deg2rad);
elseif (ang >= (fire+180) & ang <= 360)
volts = 170 * sin(ang * deg2rad);
else
335