# decay - inf. bus VT=EB+IT*RE+IT*j*XE; % Terminal voltage...

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

function xdot=decay(t,x) % Global parameters again global Ra Xdp Xd Xq Td0p Efd H KD Pm . .. % Machine parameters ws EB XE RE XTq XTd D; % Network parameters % Name state variables for readability wd=x(1); delta=x(2); Eqp=x(3); E % Solve algebraic equations id=((Eqp-EB*cos(delta))*XTq-RE*EB*sin(delta))/D; % D-axis current i iq=(EB*sin(delta)+RE*id)/XTq; % Q-axis current i IT=(id+j*iq)*(cos(delta-pi/2)+j*sin(delta-pi/2)); % Terminal current referred to
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: inf. bus VT=EB+IT*RE+IT*j*XE; % Terminal voltage referred to inf. bus (Ra outside) Vt=abs(VT); % Terminal voltage magnitude Pe=real(VT*conj(IT)); % Electrical power output % % 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=xdot'; x return;...
View Full Document

## This note was uploaded on 07/14/2011 for the course ECE 522 taught by Professor Tomsovic during the Summer '10 term at University of Florida.

Ask a homework question - tutors are online