{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

sixth-crippled

# sixth-crippled - Et= Terminal voltage magnitude Pe=...

This preview shows page 1. Sign up to view the full content.

function xdot=sixth(t,x) f % % Again global parameters global Ra Xdp Xd Xq Td0p H KD KA KSTAB TA TW ... % Machine parameters T1 T2 Efdmin Efdmax ... ws Pm Vref EB XE RE XTq XTd D; % Network and load parameters % called as [t,x]=ode45('sixth', [0 tend], [wd0 delta0 EQP0 Efd0 V20 Vs0]'); % Name state variables for readability wd=x(1); delta=x(2); Eqp=x(3); Efd=x(4); % Enforce field limiter voltage if (Efd>Efdmax) Efd=Efdmax; elseif (Efd<Efdmin) Efd=Efdmin; end; V2=x(5); Vs=x(6); V % Solve algebraic equations - this you'll need to figure out id= % d-axis current i iq= % q-axis current i IT= % Terminal current referred to inf. bus ET= % Terminal voltage referred to inf. bus (Ra outside)
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Et= % Terminal voltage magnitude Pe= % Electrical power output P % Now write differential equations xdot(1)=ws/(2*H)*(Pm-Pe-KD*wd/ws); % Acceleration xdot(2)=wd; % Speed deviation xdot(3)=1/Td0p*(Efd-Eqp-(Xd-Xdp)*id); % Eqp derivative xdot(4)=1/TA*(-Efd+KA*(Vref-Et+Vs)); % Field voltage derivative xdot(5)=-1/TW*V2+KSTAB/ws*xdot(1); % Washout filter out. derivative xdot(6)=1/T2*(-Vs+V2+T1*xdot(5)); % Output of PSS out. derivative x % Limits on exciter if ((Efd>=Efdmax)&(xdot(4)>0)) xdot(4)=0; elseif ((Efd<=Efdmin)&(xdot(4)<0)) xdot(4)=0; end; e xdot=xdot'; return;...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online