⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 imphasors.m

📁 关于电机的.m程序
💻 M
字号:
%                <<<   INDUCTION MOTOR  >>>
%          Steady-state characteristics : Phasor loci
close all,clear,clc
disp('        <<<    Induction motor charateristics  >>>     ')
disp('               ( per-unit formulation  )               ')
% ---------------------------  DATA  ------------------------------------------
%           Machine parameters in per unit:                            
Rs=0.01 ; %Stator resistance
Rr=0.02 ; %Rotor resistance
Lsl=0.1 ; %Stator leakage inductance
Lrl=0.1 ; %Rotor leakage inductance
Lm=4.5  ; %Magnetizing inductance 
vs=1.0  ; %Stator voltage
ws=1.0  ; %Stator frequency
n1 =0   ; %initial speed
n2 =1   ; %finalspeed
dn=.005 ; %speed increment

% --------------------  STEADY-STATE PHASOR CALCULATIONS  --------------------
     disp('          Parameters of induction machine in per unit    ')
disp('                                                         ')
disp('    Rs        Lsl       Rr        Lrl       Lm       vs         ws')
param=[Rs Lsl Rr Lrl Lm vs ws];
disp(param)
wk=ws;                     
Ls=Lsl+Lm ; Lr=Lrl+Lm;
den=Lm*Lsl+Lm*Lrl+Lsl*Lrl;
j=sqrt(-1);
km=round((n2-n1)/dn);
k=0;
fr=[];is=[];fs=[];ir=[];Te=[];wm=[];
warning off MATLAB:mir_warning_variable_used_as_function
avimov=avifile('imPHASORS.avi','compression','cinepak');
figure('Position',[100 60 600  560],'Name','PHASORS','Numbertitle','off') ;
for wm1=n1:dn:n2
  k=k+1;   
    if wm1==ws,wm1=wm1+eps; end
    Zr=Rr/(ws-wm1)+j*Lrl; Zm=j*Lm*Zr/(j*Lm+Zr);  Zin=Rs/ws+j*Lsl+Zm;
    is1=vs/(ws*Zin);  ir1=-is1*j*Lm/(j*Lm+Zr);
    Req=real(Zm);    Te1=is1*conj(is1)*Req;
    fs1=Ls*is1+Lm*ir1;  fr1=Lm*is1+Lr*ir1; 
   % --------------------------------------------------------------------------------
   fr=[fr fr1];
   is=[is is1];
   fs=[fs fs1];
   ir=[ir ir1];
   Te=[Te Te1];
   wm=[wm wm1];
end  
   
 for k=1:km+1
   % figure('Position',[100 60 600  560],'Name','PHASORS','Numbertitle','off') ;
    compass(5.8,0.2,'w');hold on
    compass(1.0,0,'k')
   compass(fr(k),'g')
   compass(is(k),'r')
   compass(fs(k),'c')
   compass(ir(k),'m')
   set(findobj(gca,'Type','line'),'LineWidth',2)
   fill([6.5 6.5 10 10 6.5],[-4 -7 -7 -4 -4],[1 1 1]),hold on
  for p=1:k
       plot(real(fr(p)),imag(fr(p)),'o','MarkerSize',1.2,'MarkerEdgeColor','b','MarkerFacecolor','b')
       plot(real(is(p)),imag(is(p)),'o','MarkerSize',1.2,'MarkerEdgeColor','b','MarkerFacecolor','b')
       plot(real(ir(p)),imag(ir(p)),'o','MarkerSize',1.2,'MarkerEdgeColor','b','MarkerFacecolor','b')
       plot(2.43*wm(p)+7.5,Te(p)-7,'-','MarkerSize',1,'MarkerEdgeColor','k','MarkerFacecolor','k')
  end  
      text(-7.1,7.6,'INDUCTION MOTOR STEADY-STATE CHARACTERISTICS','FontSize',10,'FontWeight','bold','color','blue')
      text(6.1,-7.5,['Torque = ',num2str(Te(k))],'FontSize',10,'FontWeight','bold')
      text(6.1,-7.95,['Speed  = ',num2str(wm(k))],'FontSize',10,'FontWeight','bold')
      legend('','V','fr','is','fs','ir')
   set(gca,'Xlim',[-8 10.5],'Ylim',[-8 8],'visible','off');
   axis equal
   hold off
    f=getframe(gca);
    avimov=addframe(avimov,f);
     M(k)=getframe;
  end  
  avimov=close(avimov);
  uicontrol('Units','normalized', ...
   'Style','PushButton',...
	'BackgroundColor',[.2 .3 .8], ...
	'Callback','movie(M)', ...
	'FontSize',10, ...
	'FontWeight','bold', ...
	'ForegroundColor',[1 1 1], ...
	'Position',[0.24 0.05 0.09 .06], ...
	'String','Repeat', ...
    'TooltipString','Repeat');
    uicontrol('Units','normalized', ...
   'Style','PushButton',...
	'BackgroundColor',[.2 .3 .8], ...
	'Callback','close,clear,close all', ...
	'FontSize',10, ...
	'FontWeight','bold', ...
	'ForegroundColor',[1 1 1], ...
	'Position',[0.63 0.05 0.09 .06], ...
	'String','Quit', ...
    'TooltipString','Quit');
     
  %
  
  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -