📄 threephase.m
字号:
%%文件2-lecture21_22.m
fprintf('\n Wait simulation is in process. \n')
VF = 400; rF = 0.4; iF0 = VF/rF;
Ld = 0.0072; Lq = 0.0070; L0=0.0010; LF = 2.500; LD = 0.0068; LQ = 0.0016;
MF = 0.100; MD = 0.0054; MQ = 0.0026; MR = 0.1250;
r = 0.002; rF = 0.4000; rD = 0.015; rQ = 0.0150;
f = 50; w = 2.*pi*f; pi2=2.*pi/3;
%d =180.;
%d=90.0;
d=0.0;
d = d*pi/180.;
t0 = 0 ; tfinal =5.80;
i0 = [0; 0; 0; iF0; 0; 0;]; % Initial currents
%[t,i] = ode45('Gllshort', t0, tfinal, i0); % use for MATLAB 4
tspan = [t0, tfinal]; % use for MATLAB 5
[t,i] = ode45('Gllshort', tspan, i0); % use for MATLAB 5
% id,iq,i0 = Armature current iF=Field current
id=i(:,1); iq=i(:,2);i0=i(:,3) ;iF=i(:,4); iD=i(:,5); iQ=i(:,6)
%current dq0 to current abc
nn=length(id);
for kk=1:nn,
tt=t(kk);thetaa=w*tt+d;thetab=thetaa-pi2;thetac=thetaa+pi2;
ia(kk)=cos(thetaa)*id(kk)-sin(thetaa)*iq(kk)+i0(kk);
ib(kk)=cos(thetab)*id(kk)-sin(thetab)*iq(kk)+i0(kk);
ic(kk)=cos(thetac)*id(kk)-sin(thetac)*iq(kk)+i0(kk);
T(kk)=iq(kk)*w*(-Ld*id(kk)+LF*iF(kk)+LD*iD(kk))-id(kk)*w*(-Lq*iq(kk)+LQ*iQ(kk));
end
figure(1), plot(t,ia), xlabel('t, sec'), ylabel('ia, A'), grid
title(['three phase short circuit ia, ','delta = ', num2str(d)])
%figure(2), plot(t,iF), xlabel('t, sec'), ylabel('iF, A'), grid
%title(['Line-line short circuit iF, ','delta = ',num2str(d)])
%figure(2), plot(t,ib), xlabel('t, sec'), ylabel('ib, A'), grid
%title(['three phase short circuit ib, ','delta = ', num2str(d)])
%figure(3), plot(t,ic), xlabel('t, sec'), ylabel('ic, A'), grid
%title(['three phase short circuit ic, ','delta = ', num2str(d)])
%figure(3), plot(t,T), xlabel('t, sec'), ylabel('T, '), grid
%title(['Electromagnrtic Torque, ','delta = ',num2str(d)])
%figure(1), plot(t,iD), xlabel('t, sec'), ylabel('iD, A'), grid
%title(['iD, ','delta = ', num2str(d)])
%figure(2), plot(t,iQ), xlabel('t, sec'), ylabel('iQ, A'), grid
%title(['iQ, ','delta = ',num2str(d)])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -