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

📄 sinwdg.m

📁 关于电机的.m程序
💻 M
字号:
%SINUSOIDALLY DISTRIBUTED WINDINGS
close all,clear,clc
disp(date)
info= ...
        ['                     SINUSOIDALLY DISTRIBUTED WINDINGS                             '
         'The stator of a 3-phase (2-pole) AC machine may be represented by 3 sinusoidally   '
         'distributed windings [RGB] whose axes are displaced by 120o.                       ' 
         'When the windings are excited with balanced 3-phase sinusoidal currents, the       '
         'combined effects is equivalent to having a single sinusoidally distributed rotating'
         'winding excited with a constant current.                                           '
         'The axis of the resultant winding is indicated in black by R.                      '
         '                                                                                   '];                                       
disp(info)
ro=1.4;ra=1.2; rb=1; rc=.8;n=13;e=0;z=0;
warning off
aviwave=avifile('sinwdg.avi','compression','cinepak');
 figure('units','normalized','Position',[.36 .09 .62 .73],'Name','Sinusoidal winding',...
        'NumberTitle','off');
 set(gcf,'color','w') 
 
 for t=1:180
  z=z+1;   
  %rotating winding
  q=0:pi/80:2*pi;
   f6=plot(0,0,'xk',[0 1.6 1.55 1.6 1.55],[0 0 0.03 0 -0.03],'-k','LineWidth',2);hold on
      rotate(f6,[0 0 1],e,[0 0 0])
 plot(.957*ro*cos(q),.957*ro*sin(q),'-k');
for k=2:1:2*n-1
    theta=acos((n-k)/(n-1));
    x=ro*cos(theta); y=ro*sin(theta);
    h1=plot(x,y,'o','MarkerSize',6,'MarkerFacecolor','k');
    rotate(h1,[0 0 1],e,[0 0 0])
end
for j=2:1:2*n-1
    theta=acos((n-j)/(n-1));
    x=ro*cos(theta); y=-ro*sin(theta);
    h2=plot(x,y,'o','MarkerSize',6,'MarkerFacecolor','k');
    rotate(h2,[0 0 1],e,[0 0 0])
end
h3=plot(ro,0,'o','MarkerSize',6,'MarkerFacecolor','w');
rotate(h3,[0 0 1],e,[0 0 0])
h4=plot(-ro,0,'o','MarkerSize',6,'MarkerFacecolor','w');
rotate(h4,[0 0 1],e,[0 0 0])

  %Phase A
  plot(.956*ra*cos(q),.956*ra*sin(q),'-k');
  text(-1.35,1.8,'SINUSOIDALLY DISTRIBUTED WINDINGS ','FontSize',14,'FontWeight','bold','color','blue')
 text(1.5,0,'A-axis ','FontSize',10,'FontWeight','bold','color','red')
 text(-.9,1.35,'B-axis ','FontSize',10,'FontWeight','bold','color','green')
 text(-.9,-1.35,'C-axis ','FontSize',10,'FontWeight','bold','color','blue')
 f7=text(1.7,0,'R','FontSize',10,'FontWeight','bold','color','black');
 rotate(f7,[0 0 1],e,[0 0 0])
for k=1:1:2*n-1
    theta=acos((n-k)/(n-1));
    x=ra*cos(theta); y=ra*sin(theta);
    h1=plot(x,y,'o','MarkerSize',6,'MarkerFacecolor','r');%hold on
    rotate(h1,[0 0 1],0,[0 0 0])
end
for j=1:1:2*n-1
    theta=acos((n-j)/(n-1));
    x=ra*cos(theta); y=-ra*sin(theta);
    h2=plot(x,y,'o','MarkerSize',6,'MarkerFacecolor','r');
    rotate(h2,[0 0 1],0,[0 0 0])
end
h3=plot(ra,0,'o','MarkerSize',6,'MarkerFacecolor','w');
rotate(h3,[0 0 1],0,[0 0 0])
h4=plot(-ra,0,'o','MarkerSize',6,'MarkerFacecolor','w');
rotate(h4,[0 0 1],0,[0 0 0])
f1=plot(0,0,'xr',[0 1.3 1.25 1.3 1.25],[0 0 .03 0 -.03],'-r','LineWidth',2);
      
%phase B
 plot(.955*rb*cos(q),.955*rb*sin(q),'-k');

 for k=1:1:2*n-1
    theta=acos((n-k)/(n-1));
    x=rb*cos(theta); y=rb*sin(theta);
    h1=plot(x,y,'o','MarkerSize',6,'MarkerFacecolor','g');
    rotate(h1,[0 0 1],120,[0 0 0])
end
for j=1:1:2*n-1
    theta=acos((n-j)/(n-1));
    x=rb*cos(theta); y=-rb*sin(theta);
    h2=plot(x,y,'o','MarkerSize',6,'MarkerFacecolor','g');
    rotate(h2,[0 0 1],120,[0 0 0])
end

h3=plot(rb,0,'o','MarkerSize',6,'MarkerFacecolor','w');
  rotate(h3,[0 0 1],120,[0 0 0])
h4=plot(-rb,0,'o','MarkerSize',6,'MarkerFacecolor','w');
  rotate(h4,[0 0 1],120,[0 0 0])
f2=plot(0,0,'xg',[0 1.3 1.25 1.3 1.25],[0 0 .03 0 -.03],'-g','LineWidth',2);
  rotate(f2,[0 0 1],120,[0 0 0])
%phase C
 plot(.95*rc*cos(q),.95*rc*sin(q),'-k');%hold on
for k=1:1:2*n-1
    theta=acos((n-k)/(n-1));
    x=rc*cos(theta); y=rc*sin(theta);
    h1=plot(x,y,'o','MarkerSize',6,'MarkerFacecolor','b');%hold on
    rotate(h1,[0 0 1],-120,[0 0 0])
end
for j=1:1:2*n-1
    theta=acos((n-j)/(n-1));
    x=rc*cos(theta); y=-rc*sin(theta);
    h2=plot(x,y,'o','MarkerSize',6,'MarkerFacecolor','b');
    rotate(h2,[0 0 1],-120,[0 0 0])
end

h3=plot(rc,0,'o','MarkerSize',6,'MarkerFacecolor','w');
rotate(h3,[0 0 1],-120,[0 0 0])
h4=plot(-rc,0,'o','MarkerSize',6,'MarkerFacecolor','w');
rotate(h4,[0 0 1],-120,[0 0 0])
f3=plot(0,0,'xb',[0 1.3 1.25 1.3 1.25],[0 0 .03 0 -.03],'-b','LineWidth',2);
      rotate(f3,[0 0 1],-120,[0 0 0])
       
set(gca,'Xlim',[-2 2],'Ylim',[-2 2],'visible','off')
      axis square
 hold off 
  g=getframe(gca);
     aviwave=addframe(aviwave,g);
    e=e+2;
 M(z)=getframe;   
end 
     aviwave=close(aviwave);
uicontrol('Units','normalized', ...
   'Style','PushButton',...
	'BackgroundColor',[.2 .3 .8], ...
	'Callback','movie(M,1)', ...
	'FontSize',10, ...
	'FontWeight','bold', ...
	'ForegroundColor',[1 1 1], ...
	'Position',[0.36 0.08 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.64 0.08 0.09 .06], ...
	'String','Quit', ...
    'TooltipString','Quit');     

⌨️ 快捷键说明

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