 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Welcome to Overleaf --- just edit your LaTeX on the left,
% and we'll compile it for you on the right. If you open the
% 'Share' menu, you can invite other users to edit at the same
% time. See www.overleaf.com/learn for more info. Enjoy!
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\usepackage{amsmath}
\usepackage{comment}
%-------------------------------------------------------------------------
\usepackage[paperheight=11in,
   paperwidth=8.5in,
   top=.5in,
   bottom=.5in,
   left=.5in,
   right=.5in]{geometry}
%-------------------------------------------------------------------------
\title{EENG 577 M2 Assignment 2 (Group)}
\author{E. Hildenbrandt \\ D. Davis  \\ J. Brownlee}
\date{17 January 2025}
%----------------------------------------------------------------------

\begin{document}
\maketitle

%Here is the list of variable relations from canvas
%\begin{gather*}
%r_{p1} = r_{p2} = r_{p3} = r_p \\
%r_{s1}=r_{s2}=r_{s3}=r_s \\   
%L_{p1p1}=L_{p2p2}=L_{p3p3}=L_{pp}\\    
%L_{p1p2}=L_{p2p1}\cong L_{p1p3}=L_{p3p1}\cong L_{p2p3}=L_{p3p2}=M_{pp}\\   
%L_{s1s1}=L_{s2s2}=L_{s3s3}=L_{ss}\\  
%L_{p1s1}=L_{s1p1}\cong L_{p2s2}=L_{s2p2}\cong L_{p3s3}=L_{s3p3}=L_{ps}\\  
%L_{p1s2}=L_{s2p1}\cong L_{p2s1}=L_{s1p2}\cong L_{p1s3}=L_{s3p1}\cong L_{p3s1}=L_{s1p3}\cong L_{p2s3}=L_{s3p2}\cong L_{p3s2}=L_{s2p3}=M_{ps}\\   
%\end{gather*}

\paragraph{1)}
If we assume a 42MVA, 118 - 14.3 kV three-legged magnetic core with primary and secondary coil winding around each phase connected $\Delta$ - Y. The resistance of the primary and secondary windings are given. Also, the self inductance for the primary, self inductance on the secondary, and mutual inductances are given. The following state-space model can be used to describe the instantaneous voltages and currents assuming a linear unsaturated magnetic core where the inductance is constant for the time rate-of-change of current on the primary and secondary coils.
%----------------------------------------------------------------------
\begin{align*}
& V = [v_{p1},v_{p2},v_{p3},v_{s1},v_{s2},v_{s3}]^T & I = [i_{p1},i_{p2},i_{p3},i_{s1},i_{s2},i_{s3}]^T \\
&& \dot{I} = \frac{d}{dt}[i_{p1},i_{p2},i_{p3},i_{s1},i_{s2},i_{s3}]^T
\end{align*}
%----------------------------------------------------------------------
\begin{equation}
\left[\begin{array}{c}
     v_{p1} \\
     v_{p2} \\
     v_{p3} \\
     v_{s1} \\
     v_{s1} \\
     v_{s1}  
\end{array}\right]=
\left[\begin{array}{cccccc}
    r_p & 0 & 0 & 0 & 0 & 0\\
    0 & r_p & 0 & 0 & 0 & 0\\
    0 & 0 & r_p & 0 & 0 & 0\\
    0 & 0 & 0 & r_s & 0 & 0\\
    0 & 0 & 0 & 0 & r_s & 0\\
    0 & 0 & 0 & 0 & 0 & r_s
\end{array}\right]
\left[\begin{array}{c}
     i_{p1} \\
     i_{p2} \\
     i_{p3} \\
     i_{s1} \\
     i_{s1} \\
     i_{s1} 
\end{array}\right] +
\left[\begin{array}{cccccc}
    L_{pp} & M_{pp} & M_{pp} & L_{ps} & M_{ps} & M_{ps}\\
    M_{pp} & L_{pp} & M_{pp} & M_{ps} & L_{ps} & M_{ps}\\
    M_{pp} & M_{pp} & L_{pp} & M_{ps} & M_{ps} & L_{ps}\\
    L_{ps} & M_{ps} & M_{ps} & L_{ss} & M_{ss} & M_{ss}\\
    M_{ps} & L_{ps} & M_{ps} & M_{ss} & L_{ss} & M_{ss}\\
    M_{ps} & M_{ps} & L_{ps} & M_{ss} & M_{ss} & L_{ss}
\end{array}\right]
\frac{d}{dt}
\left[\begin{array}{c}
     i_{p1} \\
     i_{p2} \\
     i_{p3} \\
     i_{s1} \\
     i_{s2} \\
     i_{s3} 
\end{array}\right]
\end{equation}
%----------------------------------------------------------------------
\paragraph{2)}
We can use compact matrix notation to get the state-space model into the general form $\dot{X} = AX + BU$ where A, B are given below and  X, and U are the current and voltage vectors respectively.
%----------------------------------------------------------------------
\begin{align*}
& V = RI + \frac{d}{dt}(LI)    && \dot{I} = - L^{-1}RI + L^{-1}V  &\\
& V = RI + L\frac{d}{dt}I      && \dot{X} = AX + BU \\
& L^{-1}V = L^{-1}RI + \dot{I} && A = -L^{-1}R & B = L^{-1} 
\end{align*}
%----------------------------------------------------------------------
\paragraph{3 - 5)}
The power relationships and efficiency in terms of instantaneous voltage, current are given below. The power in is calculated using the primary currents and voltages and accounts for the copper losses in the primary and secondary windings. 
%----------------------------------------------------------------------
\begin{equation}
    P_{in} = v_{p1}i_{p1} + v_{p2}i_{p2} + v_{p3}i_{p3} %+  (i_{p1}^2 + i_{p2}^2 + i_{p3}^2)r_p +(i_{s1}^2 + i_{s2}^2 + i_{s3}^2)r_s
\end{equation}
%----------------------------------------------------------------------
The output power is calculated using the secondary currents and voltages and does not account for the copper or core losses.
%----------------------------------------------------------------------
% instantaneous power is (v(t)i(t)). It does not include the cos(pf angle) unless you take the peak value of phase or line which looks like this (3/2) V_m I-m cos(theta)
%----------------------------------------------------------------------
\begin{equation}
    P_{out} = v_{s1}i_{s1} + v_{s2}i_{s2} + v_{s3}i_{s3}
\end{equation}
%----------------------------------------------------------------------
% efficiency is function of output power and losses, lecture notes does not include the input power in the efficiency. I see ill go theough the lecture and update this. Copy
%----------------------------------------------------------------------
Transformer efficiency is a function of output power and losses, where output power is divided by output power + losses multiplied by 100\%.
%----------------------------------------------------------------------
\begin{equation}
    \eta = \frac{P_{out}}{P_{out} + P_{cu}}\cdot 100\% = \frac{v_{s1}i_{s1} + v_{s2}i_{s2} + v_{s3}i_{s3}}{v_{s1}i_{s1} + v_{s2}i_{s2} + v_{s3}i_{s3} +  (i_{p1}^2 + i_{p2}^2 + i_{p3}^2)r_p +(i_{s1}^2 + i_{s2}^2 + i_{s3}^2)r_s} \cdot 100\%
\end{equation}
%----------------------------------------------------------------------
\newpage
\paragraph{6)}
Solving Equation (1) for the instantaneous voltage on the primary coils gives equations (5) through (7).
%----------------------------------------------------------------------
\begin{gather}
v_{p1}(t) = r_pi_{p1} + L_{pp}\frac{d}{dt}i_{p1} + M_{pp}\frac{d}{dt}(i_{p2}+i_{p3}) + L_{ps}\frac{d}{dt}i_{s1} + M_{ps}\frac{d}{dt}(i_{s2} + i_{s3})\\
v_{p2}(t) = r_pi_{p2} + L_{pp}\frac{d}{dt}i_{p2} + M_{pp}\frac{d}{dt}(i_{p1}+i_{p3}) + L_{ps}\frac{d}{dt}i_{s2} + M_{ps}\frac{d}{dt}(i_{s1} + i_{s3})\\
v_{p3}(t) = r_pi_{p3} + L_{pp}\frac{d}{dt}i_{p3} + M_{pp}\frac{d}{dt}(i_{p1}+i_{p2}) + L_{ps}\frac{d}{dt}i_{s3} + M_{ps}\frac{d}{dt}(i_{s1} + i_{s2})
\end{gather}
%----------------------------------------------------------------------
\begin{comment}
%----------------------------------------------------------------------
Because the current is sinusoidal and the frequency is constant, we can use imaginary numbers (phasors) to simplify.
%----------------------------------------------------------------------
\begin{equation}    
\frac{d}{dt}(i_m(t)) = \frac{d}{dt}(I_m\cdot cos(\omega t)) = - \omega I_m  \cdot sin(\omega t) = \omega I_m \cdot cos(\omega t+\pi/2)
\end{equation}
\begin{equation}
    \vec{I}  = P\{\omega I_m \cdot cos(\omega t + \phi)\} = \omega I_m \cdot e^{j\phi} = \omega I_m e^{j(\pi/2)} = j\omega I_m
\end{equation}
% --------------------------------------------------------
more than welcome to add more context or make changes as you see fit. The only problem i see is the Pin equation needs to account for losses. one second, im looking back at M1 3phase power slides. He says the 3phase instantaneous power is the sume of individual phases v*i. I think the input power would be supplied upstream from the transformer and assumed to be like boundary conditions. I see . In this case, losses are intrinsic to the winding on the transformer. Right wonly need if if we are claculting it as a function of output power. Yea, going the other direction, secondary to primary that is. You are right nice catch. 

Ok, imma log off. there is a download as pdf button just to the right of the 'recompile' button. Please post in the group chat when you get it submitted. also, it may be pretty snowy over the weekend which could make it tough to meet up in person. Joseph might not be available in the afternoon but how do you feel about a teams meeting.
Im free basicaly all weekend so anytime is good with me. I agree about the snow its probably best if we meet on teams.
let's aim for 4 or 6:30, idk at the moment, group chat to the rescue, catch you later
%----------------------------------------------------------------------
\begin{gather}
v_{p1}(t) = r_pi_{p1} + j\omega L_{pp}i_{p1} + j\omega M_{pp}(i_{p2}+i_{p3}) + j\omega L_{ps}i_{s1} + j\omega M_{ps}(i_{s2} + i_{s3})\\
v_{p2}(t) = r_pi_{p2} + j\omega L_{pp}i_{p2} + j\omega M_{pp}(i_{p1}+i_{p3}) + j\omega L_{ps}i_{s2} + j\omega M_{ps}(i_{s1} + i_{s3})\\
v_{p3}(t) = r_pi_{p3} + j\omega L_{pp}i_{p3} + j\omega M_{pp}(i_{p1}+i_{p2}) + j\omega L_{ps}i_{s3} + j\omega M_{ps}(i_{s1} + i_{s2})
\end{gather}
\end{comment}
%----------------------------------------------------------------------
\paragraph{7)}
Given the apparent power, $S_{3\phi}$, of transformer and the Line-Line voltage on the secondary, we can find the full load impedance on the secondary.
%----------------------------------------------------------------------
\begin{gather}
    V_{\phi} = \frac{V_L}{\sqrt{3}} = \frac{14.3\ \mathrm{[kV]}}{\sqrt{3}} = 8.27\ \mathrm{[kV]}\\
    \cos^{-1}(0.8)=36.87\ \mathrm{[deg]} \\
    Z_{\phi}={\frac{3(V_\phi)^2}{S{_3\phi}}}=\frac{3(8.27)^2}{42}=4.885 \angle{36.87^o}\left[\Omega\right]
\end{gather}
%----------------------------------------------------------------------
\end{document}