📄 im_field3.m
字号:
%rotating sinusoidal winding and air gap flux density distribution
close all,clear,clc
n=11;ra=1.4;e=0;z=0;
q=0:pi/80:2*pi;
theta=(0:10:360)*pi/180;
warning off
aviwave=avifile('im_field3.avi','compression','cinepak');
figure('units','normalized','Position',[.25 .2 .50 .50],'Name','Magnetic field distribution due to 3-phase stator excitation',...
'NumberTitle','off');
for e=0:2:358
z=z+1;
u=cos(theta).*cos(theta);
v=cos(theta).*sin(theta);
x=cos(theta); y=sin(theta);
set(gcf,'color','w')
fill(1.8*cos(q),1.8*sin(q),[.6 .6 .6],'LineWidth',1.0);hold on
fill(1.25*cos(q),1.25*sin(q),[.95 .98 .95]);
fill(.75*cos(q),.75*sin(q),[.6 .6 .6]);
plot(x,y,'y');
h0=quiver(x,y,u,v,.6,'g');
rotate(h0,[0 0 1],e,[0 0 0])
for k=1:1:2*n-1
alfa=acos((n-k)/(n-1));
x1=ra*cos(alfa); y1=ra*sin(alfa);
h1=plot(x1,y1,'o','MarkerSize',6,'MarkerFacecolor','r');
rotate(h1,[0 0 1],e,[0 0 0])
fill(.75*cos(q),.75*sin(q),[.9 .9 .9]);
end
for j=1:1:2*n-1
alfa=acos((n-j)/(n-1));
x=ra*cos(alfa); y=-ra*sin(alfa);
h2=plot(x,y,'o','MarkerSize',6,'MarkerFacecolor','m');
rotate(h2,[0 0 1],e,[0 0 0])
end
g1=plot(ra,0,'o','MarkerSize',6,'MarkerFacecolor','w');
rotate(g1,[0 0 1],e,[0 0 0])
g2=plot(-ra,0,'o','MarkerSize',6,'MarkerFacecolor','w');
rotate(g2,[0 0 1],e,[0 0 0])
fill(.75*cos(q),.75*sin(q),[.6 .6 .6]);
set(findobj(gca,'Type','line'),'LineWidth',1.5)
g3=plot(0,0,'xr',[0 1.9 1.85 1.9 1.85],[0 0 .04 0 -.04],'-r','LineWidth',3);
rotate(g3,[0 0 1],e,[0 0 0])
text(-1.6,1.97,'ROTATING SINUSOIDAL WINDING','FontSize',12,'FontWeight','bold','color','blue')
text(-1.23,-1.97,'FLUX DENSITY DISTRIBUTION','FontSize',10,'FontWeight','bold','color','blue')
axis square;
set(gca,'Xlim',[-2.1 2.1],'Ylim',[-2.1 2.1],'visible','off')
hold off
M(z)=getframe;
g=getframe(gca);
aviwave=addframe(aviwave,g);
end
aviwave=close(aviwave);
uicontrol('Units','normalized', ...
'Style','PushButton',...
'BackgroundColor',[.2 .3 .8], ...
'Callback','movie(M,.5)', ...
'FontSize',10, ...
'FontWeight','bold', ...
'ForegroundColor',[1 1 1], ...
'Position',[0.35 0.03 0.10 .05], ...
'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.6 0.03 0.09 .05], ...
'String','Quit', ...
'TooltipString','Quit');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -