From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- macros/latex/contrib/withesis/derivs.m | 56 ++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 macros/latex/contrib/withesis/derivs.m (limited to 'macros/latex/contrib/withesis/derivs.m') diff --git a/macros/latex/contrib/withesis/derivs.m b/macros/latex/contrib/withesis/derivs.m new file mode 100644 index 0000000000..c723cdbbe4 --- /dev/null +++ b/macros/latex/contrib/withesis/derivs.m @@ -0,0 +1,56 @@ +function dPsi = derivs(t,Psi); +% derivs computes the state derivatives for an induction machine +% The machine is in the synchronous reference frame. +% Eric Benedict, Spring 1996 + +% Machine parameters... +global Rs Rqr Rdr Xls Xlr Xm Xms J P We Wb Vs + +% rename state vector... +Phqs=Psi(1); +Phds=Psi(2); +Phqr=Psi(3); +Phdr=Psi(4); +Wr=Psi(5); +Theta=Psi(6); + + +% Select Reference Frame... +% Assume no angle differnce between a-axis and q-axis at t=0 + +% Synchronous +W=We; +ThetaR=W*t; + +% Compute Machine Currents... +Phmq=Xms*Phqs/Xls + Xms*Phqr/Xlr; +Phmd=Xms*Phds/Xls + Xms*Phdr/Xlr; + +Iqs=(Phqs - Phmq)/Xls; +Ids=(Phds - Phmd)/Xls; +Iqr=(Phqr - Phmq)/Xlr; + Idr=(Phdr - Phmd)/Xlr; + + +% Compute Torques... +Te=3*P*(Phds*Iqs-Phqs*Ids)/(4*Wb); % Electrical Torque +Tl=0; % Load Torque + + +% Compute Voltages... +Vqs=Vs*cos(We*t - ThetaR); +Vds=-1*Vs*sin(We*t - ThetaR); +Vqr=0; +Vdr=0; + +% Compute new derivative of state vector... +dPsi(1) = Vqs - Rs*(Phqs - Phmq)/Xls - W*Phds/Wb; % PHqs/Wb +dPsi(2) = Vds - Rs*(Phds - Phmd)/Xls + W*Phqs/Wb; % PHds/Wb +dPsi(3) = Vqr - Rqr*(Phqr - Phmq)/Xlr - (W-Wr)*Phdr/Wb; % PHqr/Wb +dPsi(4) = Vdr - Rdr*(Phdr - Phmd)/Xlr + (W-Wr)*Phqr/Wb; % PHdr/Wb + +dPsi(5) = (Te - Tl)*P/(2*J*Wb); % Wr/Wb + +dPsi(6) = Wr/Wb; % Theta/Wb + +dPsi=Wb*dPsi; -- cgit v1.2.3