%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % fwave.m - simulates air gap traveling mmf wave for one % magnetic pole-pair pitch of movement in 10 % magnetic (electric) degree increments. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear; colordef white; p=input('How many poles '); % No. of poles theta=linspace(0,2*pi,90); n=length(theta); ro=6; rs=5; rr=4; % Outside, bore, & rotor radii rgr=4.5; % Air gap center grid radius Ro=ro*ones(1,n);Rs=rs*ones(1,n);Rgr=rgr*ones(1,n);Rr=rr*ones(1,n); F=zeros(1,n); phi=0; cla; for i=1:37; pause(0.001); for j=1:n; F(j)=rgr+0.45*sin(p/2*theta(j)-phi); end polar(theta,Ro,'-.');hold on; polar(theta,Rs,'-.'); polar(theta,Rgr,'m'); polar(theta,Rr,'g-.'); text(0.9,rs+0.30,'Stator');text(-1.5,rr-0.90,'Rotor'); name=['Air gap mmf traveling wave'; ' '; ' ']; title(name); polar(theta,F,'r.'); hold off; phi=phi+pi/18; end;