\documentclass{article}
\usepackage{graphicx} % Required for inserting images
\usepackage{amsmath}
\usepackage{matlab-prettifier}
\usepackage{float}
\usepackage[paperheight=8.5in,
   paperwidth=14in,
   top=0.5in,
   bottom=.5in,
   left=.5in,
   right=.5in]{geometry}

\title{EENG 577 M3 Synchronous Generator}
\author{E. Hildenbrandt \\ D. Davis  \\ J. Brownlee}

\date{26 January 2025}

\begin{document}
\maketitle
\section*{PART 1}
\subsection*{1}
\begin{figure}[h]
    \centering
    \includegraphics[width=0.25\linewidth]{4-pole-dqf.png}
    \includegraphics[width=0.25\linewidth]{4-pole sch.png}

    Fig. 1. Cross-section of generator, not to scale. The quadrature (q) axis is 90° electrically from the direct (d) axis. Because this is a 4-pole generator, there are 720° electrical for every 360° mechanical. The analysis would be the same if a, b, c, d, and q were rotated a multiple of 90° mechanical (180° electrical).
\end{figure}




\newpage

\subsection*{2.1: State Space, Case 1 (no damping)}

Assuming the generator is balanced and rotating at $f_s$=60Hz:

\begin{center}
$\mathrm{L_{aa}\cong L_{bb}\cong L_{cc}\cong L_{sa}+L_{sv}\cos(2\theta+\phi)}$

where $[\phi_a,\ \phi_b,\ \phi_c]=[0,-\frac{4\pi}{3},-\frac{2\pi}{3}]$
and $\theta=\omega t=377\cdot t$
\\
\end{center}
Ignoring the damping windings the state space equations can be written as such:
\begin{center}


$\begin{bmatrix}
     v_a \\
     v_b \\
     v_c \\
     v_f \\
     v_{kd}\\
     v_{kq}\\
\end{bmatrix}$
=
$\begin{bmatrix}
    r_s + r_l & 0 & 0 & 0 & 0 & 0 \\
    0 & r_s + r_l & 0 & 0 & 0 & 0 \\
    0 & 0 & r_s + r_l & 0 & 0 & 0 \\
    0 & 0 & 0 & r_f & 0 & 0 \\
    0 & 0 & 0 & 0 & 0 & 0 \\
    0 & 0 & 0 & 0 & 0 & 0 \\
\end{bmatrix}$
$\cdot$
$\begin{bmatrix}
    i_a \\
    i_b \\
    i_c \\
    i_f \\
    i_{kd} \\
    i_{kq}
\end{bmatrix}$
+
\\
$\frac{d}{dt}$
$\begin{bmatrix}
     L_{sa} + L_{sv}\cos(2\theta) + L_l & -L_{ma} + L_{mv}\cos(2\theta - 2\pi/3) & -L_{ma} + L_{mv}\cos(2\theta - 4\pi/3) & L_{afm}\cos(2\theta) & 0 & 0  \\
     -L_{ma} + L_{mv}\cos(2\theta - 2\pi/3) &  L_{sa} + L_{sv}\cos(2\theta - 4\pi/3) + L_l & -L_{ma} + L_{mv}\cos(2\theta ) & L_{afm}\cos(2\theta - 2\pi/3) & 0 & 0  \\
     -L_{ma} + L_{mv}\cos(2\theta - 4\pi/3) & -L_{ma} + L_{mv}\cos(2\theta) &  L_{sa} + L_{sv}\cos(2\theta - 2\pi/3) + L_l & L_{afm}\cos(2\theta - 4\pi/3) & 0 & 0  \\
     L_{afm}\cos(2\theta) & L_{afm}\cos(2\theta - 2\pi/3) &L_{afm}\cos(2\theta - 4\pi/3) & L_{ff} & 0 & 0  \\
     0 & 0 & 0 & 0 & 0 & 0 \\
     0 & 0 & 0 & 0 & 0 & 0 \\
\end{bmatrix}$
$\cdot$
$\begin{bmatrix}
    i_a \\
    i_b \\
    i_c \\
    i_f \\
    i_{kd} \\
    i_{kq}
\end{bmatrix}$

\end{center}


\subsection*{2.2: State Space, Case 2}

\begin{center}
$\begin{bmatrix}
     v_a \\
     v_b \\
     v_c \\
     v_f \\
     v_{kd}\\
     v_{kq}\\
\end{bmatrix}$
=
$\begin{bmatrix}
    r_s + r_l & 0 & 0 & 0 & 0 & 0 \\
    0 & r_s + r_l & 0 & 0 & 0 & 0 \\
    0 & 0 & r_s + r_l & 0 & 0 & 0 \\
    0 & 0 & 0 & r_f & 0 & 0 \\
    0 & 0 & 0 & 0 & r_kd & 0 \\
    0 & 0 & 0 & 0 & 0 & r_kq \\
\end{bmatrix}$
$\cdot$
$\begin{bmatrix}
    i_a \\
    i_b \\
    i_c \\
    i_f \\
    i_{kd} \\
    i_{kq}
\end{bmatrix}$
+
\\
$\frac{d}{dt}$
$\begin{bmatrix}
     L_{sa} + L_{sv}\cos(2\theta) + L_l & -L_{ma} + L_{mv}\cos(2\theta - 2\pi/3) & -L_{ma} + L_{mv}\cos(2\theta - 4\pi/3) & L_{afm}\cos(2\theta) & L_{adkm}\cos(2\theta) & -L_{akqm1}\cos(2\theta)  \\
     -L_{ma} + L_{mv}\cos(2\theta - 2\pi/3) &  L_{sa} + L_{sv}\cos(2\theta - 4\pi/3) + L_l & -L_{ma} + L_{mv}\cos(2\theta ) & L_{afm}\cos(2\theta - 2\pi/3) & L_{akdm}\cos(2\theta - 2\pi/3) & -L_{akqm1}\cos(2\theta - 2\pi/3)  \\
     -L_{ma} + L_{mv}\cos(2\theta - 4\pi/3) & -L_{ma} + L_{mv}\cos(2\theta) &  L_{sa} + L_{sv}\cos(2\theta - 2\pi/3) + L_l & L_{afm}\cos(2\theta - 4\pi/3) & L_{akdm}\cos(2\theta - 4\pi/3) & -L_{akqm1}\cos(2\theta - 4\pi/3)  \\
     L_{afm}\cos(2\theta) & L_{afm}\cos(2\theta - 2\pi/3) &L_{afm}\cos(2\theta - 4\pi/3) & L_{ff} & L_{kdf} & L_{kqf}  \\
     L_{adkm}\cos(2\theta) & L_{akdm}\cos(2\theta - 2\pi/3) & L_{akdm}\cos(2\theta - 4\pi/3) & L_{kdf} & L_{kd1kd1} & 0 \\
     -L_{akqm1}\cos(2\theta) & -L_{akqm1}\cos(2\theta - 2\pi/3) & -L_{akqm1}\cos(2\theta - 4\pi/3) & L_{kqf} & 0 & L_{kq1kq1} \\
\end{bmatrix}$
$\cdot$
$\begin{bmatrix}
    i_a \\
    i_b \\
    i_c \\
    i_f \\
    i_{kd} \\
    i_{kq}
\end{bmatrix}$
\end{center}

\subsection*{3.1}
\begin{gather}
    V = RI+\frac{d}{dt}LI\\
    A = -L^{-1}R\\
    B = L^{-1}
\end{gather}

In compact matrix from.

\begin{equation*}
    X^\prime = AX + BU
\end{equation*}

Where without damping

\begin{center}
    $A = -$
    $
    \begin{bmatrix}
    1.95+0.05\cos{(2\theta)}+L_l & -0.80-0.05\cos{(2\theta-\frac{2\pi}{3})} & -0.80-0.05\cos{(2\theta-\frac{4\pi}{3})} & 26.1\cos{(2\theta)}\\
    -0.80-0.05\cos{(2\theta-\frac{2\pi}{3})} & 1.95+0.05\cos{(2\theta)}+L_l & -0.80-0.05\cos{(2\theta-\frac{4\pi}{3})} & 26.1\cos{(2\theta - \frac{2\pi}{3})}\\
    -0.80-0.05\cos{(2\theta-\frac{4\pi}{3})} & -0.80-0.05\cos{(2\theta-\frac{2\pi}{3})} & 1.95+0.05\cos{(2\theta)}+L_l& 26.1\cos{(2\theta - \frac{4\pi}{3})}\\
    26.1\cos{(2\theta)} & 26.1\cos{(2\theta - \frac{2\pi}{3})} & 26.1\cos{(2\theta - \frac{4\pi}{3})} & 444

    \end{bmatrix}
    $
    $^-1$
    $\cdot$        $\begin{pmatrix}

    \begin{bmatrix}
    7.4\cdot 10^{-4}+r_l & 0 & 0 & 0\\
    0 & 7.4\cdot 10^{-4}+r_l & 0 & 0\\
    0 & 0 & 7.4\cdot 10^{-4}+r_l & 0\\
    0 & 0 & 0 & 0.086
    \end{bmatrix}
    +
    \begin{bmatrix}
    -0.1\sin{(2\theta)}+L_l & -0.1\sin{(2\theta-\frac{2\pi}{3})} & -0.1\sin{(2\theta-\frac{4\pi}{3})} & -52.2\sin{(2\theta)}\\
    -0.1\sin{(2\theta-\frac{2\pi}{3})} & -0.1\sin{(2\theta)}+L_l & -0.1\sin{(2\theta-\frac{4\pi}{3})} & -52.2\sin{(2\theta - \frac{2\pi}{3})}\\
    -0.1\sin{(2\theta-\frac{4\pi}{3})} & -0.1\sin{(2\theta-\frac{2\pi}{3})} & -0.1\sin{(2\theta)} & -52.2\sin{(2\theta - \frac{4\pi}{3})}\\
    -52.2\sin{(2\theta)} & -52.2\sin{(2\theta - \frac{2\pi}{3})} & -52.2\sin{(2\theta - \frac{4\pi}{3})} & 0
    \end{bmatrix}

    \end{pmatrix}$
$\cdot 10^{-3}H^{-1}$
\end{center}

and

\begin{center}
    $B =
    \begin{bmatrix}
    1.95+0.05\cos{(2\theta)}+L_l & -0.80-0.05\cos{(2\theta-\frac{2\pi}{3})} & -0.80-0.05\cos{(2\theta-\frac{4\pi}{3})} & 26.1\cos{(2\theta)}\\
    -0.80-0.05\cos{(2\theta-\frac{2\pi}{3})} & 1.95+0.05\cos{(2\theta)}+L_l & -0.80-0.05\cos{(2\theta-\frac{4\pi}{3})} & 26.1\cos{(2\theta - \frac{2\pi}{3})}\\
    -0.80-0.05\cos{(2\theta-\frac{4\pi}{3})} & -0.80-0.05\cos{(2\theta-\frac{2\pi}{3})} & 1.95+0.05\cos{(2\theta)}+L_l & 26.1\cos{(2\theta - \frac{4\pi}{3})}\\
    26.1\cos{(2\theta)} & 26.1\cos{(2\theta - \frac{2\pi}{3})} & 26.1\cos{(2\theta - \frac{4\pi}{3})} & 444
    \end{bmatrix}^{-1}
    $
    $\cdot 10^{-3}H^{-1}$
\end{center}

With damping

\begin{center}

    $A = -$
      $\begin{bmatrix}
    7.4\cdot 10^{-4}+r_l & 0 & 0 & 0 & 0 & 0\\
    0 & 7.4\cdot 10^{-4}+r_l & 0 & 0 & 0 & 0\\
    0 & 0 & 7.4\cdot 10^{-4}+r_l & 0 & 0 & 0\\
    0 & 0 & 0 & 0.086 & 0 & 0\\
    0 & 0 & 0 & 0 & 1.58 \cdot 10^{-4} & 0\\
    0 & 0 & 0 & 0 & 0 & 1.227 \cdot 10^{-4}
    \end{bmatrix}$
    $\begin{bmatrix}
    -0.1\sin{(2\theta)}+L_l & -0.1\sin{(2\theta-\frac{2\pi}{3})} & -0.1\sin{(2\theta-\frac{4\pi}{3})} & -52.2\sin{(2\theta)} & -0.894\sin{(2\theta)} & 0.894\sin{(2\theta)}\\

    -0.1\sin{(2\theta-\frac{2\pi}{3})} & -0.1\sin{(2\theta)}+L_l & -0.1\sin{(2\theta-\frac{4\pi}{3})} & -52.2\sin{(2\theta - \frac{2\pi}{3})} & -0.894\sin{(2\theta-\frac{2\pi}{3})} & 0.894\sin{(2\theta-\frac{2\pi}{3})}\\

    -0.1\sin{(2\theta-\frac{4\pi}{3})} & -0.1\sin{(2\theta-\frac{2\pi}{3})} & -0.1\sin{(2\theta)}+L_l & -52.2\sin{(2\theta - \frac{4\pi}{3})} & -0.894\sin{(2\theta-\frac{4\pi}{3})} & 0.894\sin{(2\theta-\frac{4\pi}{3})}\\

    -52.2\sin{(2\theta)} & -52.2\sin{(2\theta - \frac{2\pi}{3})} & -52.2\sin{(2\theta - \frac{4\pi}{3})} & 0 & 0 & 0\\

    -0.894\sin{(2\theta)} & -0.894\sin{(2\theta-\frac{2\pi}{3})} & -0.894\sin{(2\theta-\frac{4\pi}{3})} & 0 & 0 & 0\\

    0.894\sin{(2\theta)} & 0.894\sin{(2\theta-\frac{2\pi}{3})} & 0.894\sin{(2\theta-\frac{4\pi}{3})} & 0 & 0 & 0

    \end{bmatrix}$

$\mathrm{\times10^{-3}H^{-1}} \cdot$

\end{center}

and
\begin{center}
    $b = $
    $\begin{bmatrix}
     1.95 + 0.05\cos(2\theta) + L_l & -0.80 - 0.05\cos(2\theta - 2\pi/3) & -0.08 - 0.05\cos(2\theta - 4\pi/3) & 26.1\cos(2\theta) & 0.447\cos(2\theta) & -0.670\cos(2\theta)  \\
     -0.80 - 0.05\cos(2\theta - 2\pi/3) &  1.95 + 0.05\cos(2\theta - 4\pi/3) + L_l & -0.80 - 0.05\cos(2\theta ) & 26.1\cos(2\theta - 2\pi/3) & 0.447\cos(2\theta - 2\pi/3) & -0.670\cos(2\theta - 2\pi/3)  \\
     -0.80 - 0.05\cos(2\theta - 4\pi/3) & 1.95 + 0.05\cos(2\theta) &  -0.80 - 0.05\cos(2\theta - 2\pi/3) + L_l & 26.1\cos(2\theta - 4\pi/3) & 0.447\cos(2\theta - 4\pi/3) & -0.670\cos(2\theta - 4\pi/3)  \\
     26.1\cos(2\theta) & 26.1\cos(2\theta - 2\pi/3) & 26.1\cos(2\theta - 4\pi/3) & 444 & 6.29 & 5.05  \\
     0.447\cos(2\theta) & 0.447\cos(2\theta - 2\pi/3) & 0.447\cos(2\theta - 4\pi/3) & 6.29 & 0.1254 & 0 \\
     -0.670\cos(2\theta) & -0.670\cos(2\theta - 2\pi/3) & -0.670\cos(2\theta - 4\pi/3) & 5.05 & 0 & 0.3762 \\
\end{bmatrix}^{-1}$
$\mathrm{\times10^{-3}H^{-1}}$
\end{center}



\section*{PART 2}
\subsection*{1.1}
The necessary excitation field current is given by $i_f = \frac{V_f}{r_f} = \frac{338}{0.0860} = 3930 [A]$. The initial conditions at time $t = 0$ can be calculated by dividing the given phase voltages on the bus bar with the magnitude of the load resistance and reactance.
\subsection*{1.2}
\begin{align*}
    & I_a = \frac{S}{\sqrt{3}V_{phi}} = 32950 [A] & V_a = \frac{20*10^3}{\sqrt(3)}\sqrt(2)cos(\omega t) = V_mcos(0)  && i_a = \frac{V_a}{\sqrt{R_l^2 + X_l^2}} \\
    & Rl = \frac{S\cdot pf}{I_{A}^2} = 0.5463 [\Omega]  & V_b = V_mcos(0 - 2\pi/3)  && i_b = \frac{V_b}{\sqrt{R_l^2 + X_l^2}}\\
    & Xl = \frac{S\cdot\sqrt{1-pf^2}}{I_a^2} = 0.2646 [\Omega]     & V_c = V_mcos(0 - 4\pi/3)  && i_c = \frac{V_c}{\sqrt{R_l^2 + X_l^2}}
\end{align*}
The initial conditions are put into a column vector as follows.\\\\
$\Vec{I} =
\begin{bmatrix}
    26904 \\
    -13452 \\
    -13452 \\
    3930 \\
     0 \\
     0
\end{bmatrix}$
\newpage
\begin{figure}[h]
    \centering
    \includegraphics[width=0.25\linewidth]{M3 currents no damping.png}
    \includegraphics[width=0.25\linewidth]{M3 torque no damping.png}

    Fig. 2. Current values for $i_a, i_b, i_c,$ and $i_f$ (left) and the torque (right)
\end{figure}
\begin{figure}[h]
    \centering
    \includegraphics[width=0.25\linewidth]{M3 currents with damping.png}
    \includegraphics[width=0.25\linewidth]{M3 dampers.png}\
    \includegraphics[width=0.25\linewidth]{M3 torque with damping.png}

    Fig. 3. Current values for $i_a, i_b, i_c,$ and $i_f$ (left) $i_{kd}$ and $i_{kq}$ (center) and the torque (right)
\end{figure}

We found that without the damping windings, the generator speeds out of control which would effectively grenade itself once the mechanical limit of the structural components is reached. This is likely because of undamped resonance in the system causing instability. But with the damping windings the generator stays at a reasonable current. The Matlab code for both models can be viewed at the end of this document.
\newpage
\input{appendix}
\end{document}
