\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_axes.png}
    \includegraphics[width=0.25\linewidth]{4-pole sch.png}
\end{figure}

\newpage

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

Assuming the generator is balanced and rotating at 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 & 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) & 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}
    \bf{V} = \bf{RI}+\frac{d}{dt}\bf{LI}
\end{gather}

\end{document}
