Page 276 - Solutions Manual to accompany Electric Machinery Fundamentals
P. 276
% differential ly compounded dc generator without armature
% reaction.
% Get the magnetization curve. This file contains the
% three var iables if_values, ea_values, and n_0.
clear all
load p87_mag.dat;
if_values = p87_mag(:,1);
ea_values = p 87_mag(:,2);
n_ 0 = 1800;
% First, initialize the values needed in this progr am.
r_f = 20; % Field resistance (ohms)
r_adj = 10; % Adjustable resistance (ohms)
r_a = 0.21; % Armature + series r esistance (ohms)
i_f = 0:0.02:6; % Field current (A)
n = 1800; % Generator speed (r/ min)
n_f = 1000; % Shunt field turns
n_ se = 25; % Series field turns
% Calculate Ea versus If
Ea = interp1(if_values,ea_values,i_f);
% Calculate Vt versus If
Vt = (r_f + r_adj) * i_f;
% Find the point where the difference between the two
% lines is exactly equal to i_a*r_a. This will be the
% point where the line line "Ea - Vt - i_a*r_a" goes
% negative.
i_a = 0:1:21;
fo r jj = 1:length(i_a)
% Calculate the Ea v alues modified by mmf due to the
% armature current
Ea_a = interp1(if_values,ea_values,i_f - i_a(jj)*n_se/n_f);
% Get the voltage difference
diff = Ea_a - Vt - i_a(jj)*r_a;
% This code prevents us from reporting the first (unstable)
% location sat isfying the criterion.
was_pos = 0;
for ii = 1:length(i_ f);
if diff(ii) > 0
wa s_pos = 1;
end
if ( diff(i i) < 0 & was_pos == 1 )
bre ak;
end ;
en d;
% Save terminal vol tage at this point
v_t(jj) = Vt(ii);
i_ l(jj) = i_a(jj) - v_t(jj) / ( r_f + r_adj);
270