\documentclass[conference]{IEEEtran}
%\IEEEoverridecommandlockouts
% The preceding line is only needed to identify funding in the first footnote. If that is unneeded, please comment it out.
\usepackage{cite}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{color}
\usepackage{amsmath}
\usepackage{float}
\usepackage{array}
\usepackage{siunitx}
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
		T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
\begin{document}
	
\title{Transients on PM Machine After Solar Drop-out}

\author{\IEEEauthorblockN{E. Hildenbrandt, D. Davis, J. Brownlee}
\IEEEauthorblockA{\textit{Department of Electrical Engineering} \\
    \textit{Colorado School of Mines}\\
    \textit{EENG 577 Final Project}\\}}
\maketitle

%-----------------------------------------------------------
\begin{abstract}
As renewable penetration increases, the power supply becomes more stochastic. Rural areas lacking reliable grid infrastructure often utilize microgrids as a backup to power critical loads. Here we propose a case study exploring the transient effects of changing solar irradiance in such a microgrid with solar PV, a generator, and a motor.
\end{abstract}
%-----------------------------------------------------------
\section{Introduction}
The key focus of this project is to analyze the time response of the system when the solar generation is dynamically disconnected leaving the generator to carry the full load. We modeled a microgrid and the transients that occur in this situation in order to gain information about how machines behave under quick changes in the required power.
%-----------------------------------------------------------
\section{Schematic}
The model will consist of four main components including a synchronous generator, solar photovoltaic (PV) generation, DC to AC inverter, and an induction motor as the load shown in Figure \ref{schematic}. 
\begin{figure}[H]
    \begin{center}
    \includegraphics[width=3in]{one generators.png}
    \caption{Flowchart of the components in the proposed model}
    \label{schematic}
    \end{center}
\end{figure}

\begin{table}[H]
    \centering
\caption{Ratings of the components}
\label{tab:my_label}
\begin{tabular}{|c|c|}
        \hline
         Device &  Rating\\ \hline 
         Motor Load &   0.8pf lagging 100kW continuous, 200kW peak\\ \hline 
        Synchronous Generator & 480V 60Hz 200kVA\\ \hline 
        Solar PV & 80kW 240Vdc\\ \hline 
        Inverter & 80kVA 60Hz 480Vac 240Vdc\\ \hline 
        3ph AC Lines& 480V 525A\\
        \hline
    \end{tabular}
    
\end{table}

%-----------------------------------------------------------
\section{Simulation}
Simulink offers model based simulation engineering (MBSE) where different components can be captured and decomposed into block bodies that accept inputs and provide outputs. The software allows users to integrate multiple interconnected and independent items such that models can be reduced to a minimum number of state variables. Simulink is integrated with Matlab such that sub components of the primary model can use the aid of built in Matlab functions and calculations. 

We modeled the microgrid using three main subsystems - the inverter, synchronous generator, and the load. The Inverter and generator were modeled with bidirectional connections representing the voltage of the lines.
\begin{figure}[H]
    \begin{center}
    \includegraphics[width=3in]{full_slx.png}
    \caption{Top-level view of simulink simulation}
    \label{simulink main}
    \end{center}
\end{figure}

We used a grid-tied inverter as shown in \ref{simulink inverter} to ensure the two sources of power do not get de-synchronized. This was controlled using PWM control and a Phase-Locked Loop (PLL) with a filter on its output to remove switching noise and smooth the inverter output signal. We modeled the change in solar irradiance by quickly ramping down the PV voltage at 0.15 seconds.

\begin{figure}[H]
    \begin{center}
    \includegraphics[width=3in]{DC_AC.png}
    \caption{DC-AC Inverter (grid tied)}
    \label{simulink inverter}
    \end{center}
\end{figure}

We used the built in synchronous generator block in Simulink with constant frequency reference and line-line voltage at 480V. The outputs $V_A$, $V_B$, and $V_C$ are tied in parallel with the AC-DC inverter, the PM magnet motor, and microgrid load. 

\begin{figure}[H]
    \begin{center}
    \includegraphics[width=3in]{sync_gen.png}
    \caption{Built In Synchronous Generator}
    \label{sync gen}
    \end{center}
\end{figure}
The permanent magnetic motor in the Simulink model takes the grid voltage as input and calculates the inducted armature winding currents. The induced torque is calculated from the internal generator voltage, armature winding currents, and rotational frequency shown in Figure \ref{simulink PM Motor}.
\begin{figure}[H]
    \begin{center}
    \includegraphics[width=3in]{PM_motor.png}
    \caption{PM Motor Load}
    \label{simulink PM Motor}
    \end{center}
\end{figure}

In order to avoid issues with components interacting we modeled the motor load as an arbitrary constant power load, and then used an existing motor simulation to show how a motor would behave with the terminal voltage in this situation. This is an okay assumption because the motor has a very large inertia so its speed will not change in the span of a couple seconds.
The load also helps to look at the voltage and current response on the grid when solar power generation is reduced.

%-----------------------------------------------------------
\section{Results}
The results from the simulation show the response from a permanent magnetic (PM) motor attached to the microgrid when the solar PV source discontinues power generation. The PM motor reaches steady state with the PV and synchronous generator attached in parallel. We observe a higher level of torque when the PM motor is first connected to the load given zero rotor winding currents at time t=0.
\begin{figure}[H]
    \begin{center}
    \includegraphics[width=3in]{PM_motor_torque.png}
    \caption{Output Torque on Permanent Magnetic Connected to Microgrid}
    \label{motor}
    \end{center}
\end{figure}
The line to line voltage on the microgrid load adjusts to a new voltage level after the Ac-DC inverter discontinues energy production shown in Figure \ref{LL voltage}. The voltage drop is gradual until the inverter drops out completely after which it stabilizes below the pre-cutout voltage. 
\begin{figure}[H]
    \begin{center}
    \includegraphics[width=3in]{load_LL_voltage.png}
    \caption{Line to Line voltage on 100kW Microgrid Load}
    \label{LL voltage}
    \end{center}
\end{figure}

Figure \ref{pm voltages} shows the terminal voltage change when the solar PV source is cut off from the grid. The frequency and the internal generated voltages are constant such that the terminal voltage and induced torque adjust to match the new drive levels.
\begin{figure}[H]
    \begin{center}
    \includegraphics[width=3in]{motor voltages (1).png}
    \caption{PM Motor Internal Generated Voltage and Terminal Voltage}
    \label{pm voltages}
    \end{center}
\end{figure}

\section{Conclusion}

This study is limited in usefulness due to a few of the simplifications made. If this were describing an actual microgrid it would be important to model all parts together, which includes controlling the motor as a constant power load and directly connecting it to allow it to directly affect the other devices in the network. From the preliminary results seen here the system would not meet ANSI standards with the voltage drop being outside the acceptable range of $\pm$ 0.05 [P.U.] though a more dynamic model would be needed to make this determination. 

There were a few notable challenges with the simulation. The LC filter on the DC-AC converter smoothed the output waveform from the PV DC voltage onto the microgrid, however, it introduced additional load onto the microgrid and allowed power to flow back into the converter when the simulated solar panel output was reduced to zero. An extra breaker in the output of the inverter could potentially be used to prevent this kind of back-flow. Also, the LC filter on the inverter superimposed harmonics at very low or very high frequencies on the microgrid which affected the resulting voltage, currents, and output torque on the PM motor.

%-----------------------------------------------------------
\section*{Acknowledgments}
    Thank you to Dr. Arkadan for his course on Advanced AC Machinery. In this course we learned how to model different models and generators using state space analysis.
\vspace{0.1cm}

%-----------------------------------------------------------
\begin{thebibliography}{00}
    %\bibitem[1]{bibPowerOperation} (J Duncan Glover.\textit{Power system analysis \& design.} Boston, Ma, Usa Cengage Learning, 2017.)
    \bibitem[1]{chapman} Stephen J. Chapman. (2005).\textit{Electric Machinery Fundamentals.} McGraw-Hill.
\end{thebibliography}
	
\end{document}
