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

\title{EENG 577 W5-M7}
\author{E. Hildenbrandt \\ D. Davis  \\ J. Brownlee}
\date{7 February 2025}
\begin{document}
\maketitle
%------------------------------------------------------------------------------------------
\section*{Switched Reluctance Motor}
% introduction has the SRM characteristics, starting rotor position, and initial conditions, etc..
%------------------------------------------------------------------------------------------
\subsection*{Part 1)}
% part 1 discusses the simulink code, what each block does
The Simulink model for the switched reluctance motor has five components that include phase switching, inductance matrices, state space model, the developed torque, and the torque state model. Matlab code is provided in the appendix of this document which contains the function blocks to calculate the inductance with respect to theta and the rate of change of inductance with respect to theta. Also, there is a supplementary section of code for creating Matlab plots from the output variables from the Simulink model. Here we used intermediate scopes throughout the code as diagnostics. Figure (1) shows the overall signal paths between different subsystems in the model. This section will go into more detail on each subsystem below.
\begin{figure}[H]
    \centering
    \includegraphics[width=1\linewidth]{simulink overall.PNG} \\
    \title{Figure 1: Primary Simulink System }
\end{figure}
A system of equations can be developed on the switched reluctance motor using Kirchhoff's voltage law across any phase a, b, or c. KVL states the voltage for a given phase is equivalent to the sum of the ohmic voltage and the flux linkage time rate-of-change for a given phase. There are a few considerations. The self and mutual inductance of a switched reluctance motor are functions of the phase current and the rotor position.$^{[1]}$. We can ignore the change in inductance with respect to current$^{[1]}$ and we can ignore the mutual inductance and get accurate results.$^{[2]}$. This gives the system of equations $$V = RI + L\frac{dI}{dt} + \omega_m\frac{dL}{d\theta}I$$ where the voltage is equal to the sum of the ohmic voltage, the transformer voltage, and the reluctance voltage.$^{[1]}$ Figure (2) shows the SS model subsystem.
\begin{figure}[H]
    \centering
    \includegraphics[width=1\linewidth]{ss model.PNG} \\
    \title{Figure 2: State Space Subsystem }
\end{figure}
The rotation of the motor is governed by the following expression:
$$\theta=\frac{2\pi}{m\,Nr}=\frac{2\pi}{3\cdot4}=\frac\pi6$$
Where $m=3$ is the number of phases and $Nr=4$ is the number of rotor poles. The rotor turns $\frac\pi6$ radians or 30° before it reaches the next phase. The switching sequence is given as B,C,A such that the A phase of the H-Bridge drive circuit turns on between 60 and 90 degrees. The B phase turns on between 0 and 30 degrees and the C phase turns on between 30 and 60 degrees. Figure (3) shows the subsystem of the phase switching where the output is either $V_{bus} = 43.5[V]$, $-V_{bus}$, or $0$ depending on $\theta$ and $i_a$.  \\
In the state space model the inductance for the phases are each shifted by $2\pi/3$ radians because the three stator windings are equally spaced around the full rotation of the motor.
\begin{figure}[H]
    \centering
    \includegraphics[width=1\linewidth]{phase switching.PNG} \\
    \title{Figure 3: Phase A Switching Sequence Subsystem }
\end{figure}
The torque state model subsystem is governed by the equation $$\frac{d}{dt}\omega = \left(\frac{1}{J}\right)(T_{em} - B\omega - T_L)$$ where $J$, $B$, and $T_L$ are the Inertia of the Rotor and Load, coefficient of viscous friction, and load torque respectively. In the subsystem block, we integrated $\frac{d\omega}{dt}$ twice to get $\omega$ and $\theta$.
\begin{figure}[H]
    \centering
    \includegraphics[width=1\linewidth]{torque state model.PNG} \\
    \title{Figure 4: Torque State Model Subsystem }
\end{figure}
The electromechanical torque can be calculated from $$T_{EM} = \frac{P}{\omega_m} = \frac{ei}{\omega_m}$$ where $e$ is the rotational voltage term in the state space equation$^{[2]}$ $$V = RI + L\frac{dI}{dt} + \omega_m\frac{dL}{d\theta}I$$ and if we consider the currents to be constant in the partial differential equation$^{[1]}$, we can use the form $$T = \frac{1}{2}\frac{dL}{d\theta}\sum _{j=a,b,c}i_j^2$$ The developed torque subsystem is shown in Figure (5).
\begin{figure}[H]
    \centering
    \includegraphics[width=1\linewidth]{trq dev.PNG} \\
    \title{Figure 5: Developed Torque Subsystem }
\end{figure}
Part of the model takes the outputs from vary subsystems in the model and outputs the results as a function of time shown in Figure (6).
\begin{figure}[H]
    \centering
    \includegraphics[width=1\linewidth]{output.PNG} \\
    \title{Figure 6: Variable Outputs to Scopes}
\end{figure}
%------------------------------------------------------------------------------------------
\subsection*{Part 2)}
The resulting time domain waveforms for the phase voltages, phase currents, developed torque, and the rotor speed is given below. Here we show both the startup transient from 0 to 0.25 seconds and slow data from 0 to 2 seconds.
\begin{figure}[h]
    \centering
    \includegraphics[width=.49\linewidth]{currents_0.25.png}
    \includegraphics[width=.49\linewidth]{currents_2.png}\\
    \title{Figure 7: Phase Currents}
\end{figure}

RMS phase currents 
\begin{center}
    $i_a = 3.452[A]$\\
    $i_b = 6.174[A]$\\
    $i_c = 8.281[A]$
\end{center}

\begin{figure}[H]
    \centering
    \includegraphics[width=0.49\linewidth]{voltages_0.25.png}
    \includegraphics[width=0.49\linewidth]{voltages_2.png}
    \title{Figure 8: Phase Voltage}
\end{figure}

RMS phase voltages 
\begin{center}
    $v_a = 26.75[V]$\\
    $v_b = 32.38[V]$\\
    $v_c = 26.16[V]$
\end{center}

\begin{figure}[H]
    \centering
    \includegraphics[width=.49\linewidth]{speed_0.25.png}
    \includegraphics[width=.49\linewidth]{speed_2.png}
    \title{Figure 9: Rotor Speed}
\end{figure}

RMS rotor speed 
\begin{center}
    $Rotor \ Speed = 477.1 [RPM]$
\end{center}

\begin{figure}[H]
    \centering
    \includegraphics[width=.49\linewidth]{torque_0.25.png}
    \includegraphics[width=.49\linewidth]{torque_2.png}
    \title{Figure 10: Developed Torque}
\end{figure}

RMS developed torque
\begin{center}
    $\mathrm{Developed \ Torque} = 2.15\ \mathrm{Nm}$
\end{center}
%------------------------------------------------------------------------------------------
\section*{Contributions}
\begin{table}[H]
    \centering
    % add what you feel the contributions are .. rows and columns both add to 100 .. kinda like a little game of sodoku
    \begin{tabular}{c|c|c|c|c}
        & Tasks                          & Eric Hildenbrandt & Devon Davis & Joseph Brownlee \\
        & Formulations \& Calculations   & 15  \% & 40   \% & 45 \% \\
        & MATLAB/Simulink Coding         & 55  \% & 20   \% & 25 \% \\
        & Report Writing                 & 30  \% & 40   \% & 30 \% \\
        & Overall \% Contribution/Member & 100 \% & 100 \% & 100 \% 
    \end{tabular}
    %\caption{Caption}
    %\label{tab:my_label}
\end{table}


%------------------------------------------------------------------------------------------
\section*{References}
% References
\begin{itemize}
    \item{[1]} A.A. Arkadan EENG577 Class Notes, Colorado School of Mines.
    \item{[2]} Stephen J. Chapman. (2005). Electric Machinery Fundamentals. McGraw-Hill.
    \item{[3]} A.A. Arkadan, and B.W. Kielgas, "Switched Reluctance Drive System and Dynamic Performance Prediction and Experimental Verification," IEEE Trans. On Energy Conversion, Vol. 9, No. 1, pp. 36-43, March 1994.
    \item{[4]} A.A. Arkadan, and B.W. Kielgas, "Switched Reluctance Drive System and Dynamic Performance Prediction Under Internal and External Fault Conditions," IEEE Trans. On Energy Conversion, Vol. 9, No. 1, pp. 45-52, March 1994.
    \item{[5]} A.A. Arkadan, and B.W. Kielgas, "Effects of Force Fitting on the Inductance Profile of a Switched Reluctance Motor," IEEE Trans. On Magnetics, Vol. 29, No. 2, pp. 2006-2009, March 1993.
\end{itemize}
%------------------------------------------------------------------------------------------
\newpage
\subsection*{Appendix: Matlab}
\input{appendix}
\end{document}
