📄 diffgen.m
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% diffgen.m - plots terminal characteristic for differential
% compound dc generator. Armature reaction neglected.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear; clf;
VtR=600; % Rated terminal voltage
PR=60e03; % Rated output power
Ra=0.25; % Armature resistance
Rs=0.03; % Series field resistance
Nf=750; % Shunt field turns/pole
Ns=3; % Series field turns/pole
ILR=PR/VtR; % Rated output current
load eif % Load stored OCC
m=length(eif); npts=200;
E=eif(1:m,1); If=eif(1:m,2);
% Iterative determination of rated If
IfR=0;
for i=1:50;
IfR=interp1( E, If, VtR+(ILR+IfR)*(Ra+Rs))+Ns/Nf*(ILR-IfR);
end
Rfeq=VtR/IfR; % Total shunt field circuit resistance
IL=linspace(0,1.5*ILR,npts);
% Iterative determination of Vt-IL
for i=1:npts
If1=0.75*IfR;
for j=1:100
x=If1-Ns/Nf*(IL(i)-If1);
if x<0; break; end
Vt1=interp1(If, E, x)- (IL(i)+If1)*(Ra+Rs);
If2=Vt1/Rfeq;
if abs(If2-If1)<= 0.001; Vt(i)=Vt1; break; end;
If1=If2;
end
end
m=length(Vt);
plot(0,0,IL(1:m),Vt,ILR,VtR,'o'); grid;
title('Differential compound dc generator');
xlabel('Load current, A'); ylabel('Terminal voltage, V');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -