Page 266 - Solutions Manual to accompany Electric Machinery Fundamentals
P. 266
% equal to i_a*r_a. This will be the point where
% the line "Ea_ar - Vt - i_a*r_a" goes negative.
i_a = 0:1:55;
for jj = 1:length(i_a)
% Calculate the equivalent field current due to armature
% reaction.
i_ar = (i_a(jj) / 50) * 300 / n_f;
% Calculate the Ea values modified by armature reaction
Ea_ar = interp1(if_values,ea_values,i_f - i_ar);
% Get the voltage difference
diff = Ea_ar - Vt - i_a(jj)*r_a;
% This code prevents us from reporting the first (unstable)
% location satisfying the criterion.
was_pos = 0;
for ii = 1:length(i_f);
if diff(ii) > 0
was_pos = 1;
end
if ( diff(ii) < 0 & was_pos == 1 )
break;
end;
end;
% Save terminal voltage at this point
v_t(jj) = Vt(ii);
i_l(jj) = i_a(jj) - v_t(jj) / ( r_f + r_adj);
end;
% Plot the terminal characteristic
figure(1);
plot(i_l,v_t,'b-','LineWidth',2.0);
xlabel('\bf\itI_{L} \rm\bf(A)');
ylabel('\bf\itV_{T} \rm\bf(V)');
title ('\bfTerminal Characteristic of a Shunt DC Generator w/AR');
hold off;
axis([ 0 50 0 120]);
grid on;
260