Acceleration of Power System Dynamic Simulations using a Deep Equilibrium Layer and Neural ODE Surrogate
Extracted source text · arXiv 2405.06827
%% bare_jrnl.tex
%% V1.4b
%% 2015/08/26
%% by Michael Shell
%% see http://www.michaelshell.org/
%% for current contact information.
%%
%% This is a skeleton file demonstrating the use of IEEEtran.cls
%% (requires IEEEtran.cls version 1.8b or later) with an IEEE
%% journal paper.
%%
%% Support sites:
%% http://www.michaelshell.org/tex/ieeetran/
%% http://www.ctan.org/pkg/ieeetran
%% and
%% http://www.ieee.org/
%%*************************************************************************
%% Legal Notice:
%% This code is offered as-is without any warranty either expressed or
%% implied; without even the implied warranty of MERCHANTABILITY or
%% FITNESS FOR A PARTICULAR PURPOSE!
%% User assumes all risk.
%% In no event shall the IEEE or any contributor to this code be liable for
%% any damages or losses, including, but not limited to, incidental,
%% consequential, or any other damages, resulting from the use or misuse
%% of any information contained here.
%%
%% All comments are the opinions of their respective authors and are not
%% necessarily endorsed by the IEEE.
%%
%% This work is distributed under the LaTeX Project Public License (LPPL)
%% ( http://www.latex-project.org/ ) version 1.3, and may be freely used,
%% distributed and modified. A copy of the LPPL, version 1.3, is included
%% in the base LaTeX documentation of all distributions of LaTeX released
%% 2003/12/01 or later.
%% Retain all contribution notices and credits.
%% ** Modified files should be clearly indicated as such, including **
%% ** renaming them and changing author support contact information. **
%%*************************************************************************
% *** Authors should verify (and, if needed, correct) their LaTeX system ***
% *** with the testflow diagnostic prior to trusting their LaTeX platform ***
% *** with production work. The IEEE's font choices and paper sizes can ***
% *** trigger bugs that do not appear when using other class files. *** ***
% The testflow support page is at:
% http://www.michaelshell.org/tex/testflow/
\documentclass[journal, final]{IEEEtran}
\usepackage[pdftex]{graphicx}
\pdfoutput=1
%
% If IEEEtran.cls has not been installed into the LaTeX system files,
% manually specify the path to it like:
% \documentclass[journal]{../sty/IEEEtran}
% Some very useful LaTeX packages include:
% (uncomment the ones you want to load)
% *** MISC UTILITY PACKAGES ***
%
%\usepackage{ifpdf}
% Heiko Oberdiek's ifpdf.sty is very useful if you need conditional
% compilation based on whether the output is pdf or dvi.
% usage:
% \ifpdf
% % pdf code
% \else
% % dvi code
% \fi
% The latest version of ifpdf.sty can be obtained from:
% http://www.ctan.org/pkg/ifpdf
% Also, note that IEEEtran.cls V1.7 and later provides a builtin
% \ifCLASSINFOpdf conditional that works the same way.
% When switching from latex to pdflatex and vice-versa, the compiler may
% have to be run twice to clear warning/error messages.
% *** CITATION PACKAGES ***
%
%\usepackage{cite}
% cite.sty was written by Donald Arseneau
% V1.6 and later of IEEEtran pre-defines the format of the cite.sty package
% \cite{} output to follow that of the IEEE. Loading the cite package will
% result in citation numbers being automatically sorted and properly
% "compressed/ranged". e.g., [1], [9], [2], [7], [5], [6] without using
% cite.sty will become [1], [2], [5]--[7], [9] using cite.sty. cite.sty's
% \cite will automatically add leading space, if needed. Use cite.sty's
% noadjust option (cite.sty V3.8 and later) if you want to turn this off
% such as if a citation ever needs to be enclosed in parenthesis.
% cite.sty is already installed on most LaTeX systems. Be sure and use
% version 5.0 (2009-03-20) and later if using hyperref.sty.
% The latest version can be obtained at:
% http://www.ctan.org/pkg/cite
% The documentation is contained in the cite.sty file itself.
% *** GRAPHICS RELATED PACKAGES ***
%
\ifCLASSINFOpdf
% \usepackage[pdftex]{graphicx}
% declare the path(s) where your graphic files are
% \graphicspath{{../pdf/}{../jpeg/}}
% and their extensions so you won't have to specify these with
% every instance of \includegraphics
% \DeclareGraphicsExtensions{.pdf,.jpeg,.png}
\else
% or other class option (dvipsone, dvipdf, if not using dvips). graphicx
% will default to the driver specified in the system graphics.cfg if no
% driver is specified.
% \usepackage[dvips]{graphicx}
% declare the path(s) where your graphic files are
% \graphicspath{{../eps/}}
% and their extensions so you won't have to specify these with
% every instance of \includegraphics
% \DeclareGraphicsExtensions{.eps}
\fi
% graphicx was written by David Carlisle and Sebastian Rahtz. It is
% required if you want graphics, photos, etc. graphicx.sty is already
% installed on most LaTeX systems. The latest version and documentation
% can be obtained at:
% http://www.ctan.org/pkg/graphicx
% Another good source of documentation is "Using Imported Graphics in
% LaTeX2e" by Keith Reckdahl which can be found at:
% http://www.ctan.org/pkg/epslatex
%
% latex, and pdflatex in dvi mode, support graphics in encapsulated
% postscript (.eps) format. pdflatex in pdf mode supports graphics
% in .pdf, .jpeg, .png and .mps (metapost) formats. Users should ensure
% that all non-photo figures use a vector format (.eps, .pdf, .mps) and
% not a bitmapped formats (.jpeg, .png). The IEEE frowns on bitmapped formats
% which can result in "jaggedy"/blurry rendering of lines and letters as
% well as large increases in file sizes.
%
% You can find documentation about the pdfTeX application at:
% http://www.tug.org/applications/pdftex
% *** MATH PACKAGES ***
%
%\usepackage{amsmath}
% A popular package from the American Mathematical Society that provides
% many useful and powerful commands for dealing with mathematics.
%
% Note that the amsmath package sets \interdisplaylinepenalty to 10000
% thus preventing page breaks from occurring within multiline equations. Use:
%\interdisplaylinepenalty=2500
% after loading amsmath to restore such page breaks as IEEEtran.cls normally
% does. amsmath.sty is already installed on most LaTeX systems. The latest
% version and documentation can be obtained at:
% http://www.ctan.org/pkg/amsmath
\usepackage{xcolor} %MB ADDED
\usepackage{amsmath}%MB ADDED
\usepackage{algorithm} %MB ADDED
\usepackage{algpseudocode} %MB ADDED
\usepackage[hyphens]{url}
%\usepackage{caption}
%\usepackage{subcaption}
\usepackage{subfigure}
%\usepackage[dvipsnames]{color}
\usepackage[american,cuteinductors,smartlabels]{circuitikz}
\usepackage{siunitx}
\usepackage{amsmath,amssymb}
\usepackage{amsthm} %MB added
\usepackage[mode=buildnew]{standalone}% requires -shell-escape
\usepackage{mathtools}
\usepackage{multirow}
\allowdisplaybreaks[4]
% *** SPECIALIZED LIST PACKAGES ***
%
%\usepackage{algorithmic}
% algorithmic.sty was written by Peter Williams and Rogerio Brito.
% This package provides an algorithmic environment fo describing algorithms.
% You can use the algorithmic environment in-text or within a figure
% environment to provide for a floating algorithm. Do NOT use the algorithm
% floating environment provided by algorithm.sty (by the same authors) or
% algorithm2e.sty (by Christophe Fiorio) as the IEEE does not use dedicated
% algorithm float types and packages that provide these will not provide
% correct IEEE style captions. The latest version and documentation of
% algorithmic.sty can be obtained at:
% http://www.ctan.org/pkg/algorithms
% Also of interest may be the (relatively newer and more customizable)
% algorithmicx.sty package by Szasz Janos:
% http://www.ctan.org/pkg/algorithmicx
% *** ALIGNMENT PACKAGES ***
%
%\usepackage{array}
% Frank Mittelbach's and David Carlisle's array.sty patches and improves
% the standard LaTeX2e array and tabular environments to provide better
% appearance and additional user controls. As the default LaTeX2e table
% generation code is lacking to the point of almost being broken with
% respect to the quality of the end results, all users are strongly
% advised to use an enhanced (at the very least that provided by array.sty)
% set of table tools. array.sty is already installed on most systems. The
% latest version and documentation can be obtained at:
% http://www.ctan.org/pkg/array
% IEEEtran contains the IEEEeqnarray family of commands that can be used to
% generate multiline equations as well as matrices, tables, etc., of high
% quality.
% *** SUBFIGURE PACKAGES ***
%\ifCLASSOPTIONcompsoc
% \usepackage[caption=false,font=normalsize,labelfont=sf,textfont=sf]{subfig}
%\else
% \usepackage[caption=false,font=footnotesize]{subfig}
%\fi
% subfig.sty, written by Steven Douglas Cochran, is the modern replacement
% for subfigure.sty, the latter of which is no longer maintained and is
% incompatible with some LaTeX packages including fixltx2e. However,
% subfig.sty requires and automatically loads Axel Sommerfeldt's caption.sty
% which will override IEEEtran.cls' handling of captions and this will result
% in non-IEEE style figure/table captions. To prevent this problem, be sure
% and invoke subfig.sty's "caption=false" package option (available since
% subfig.sty version 1.3, 2005/06/28) as this is will preserve IEEEtran.cls
% handling of captions.
% Note that the Computer Society format requires a larger sans serif font
% than the serif footnote size font used in traditional IEEE formatting
% and thus the need to invoke different subfig.sty package options depending
% on whether compsoc mode has been enabled.
%
% The latest version and documentation of subfig.sty can be obtained at:
% http://www.ctan.org/pkg/subfig
% *** FLOAT PACKAGES ***
%
%\usepackage{fixltx2e}
% fixltx2e, the successor to the earlier fix2col.sty, was written by
% Frank Mittelbach and David Carlisle. This package corrects a few problems
% in the LaTeX2e kernel, the most notable of which is that in current
% LaTeX2e releases, the ordering of single and double column floats is not
% guaranteed to be preserved. Thus, an unpatched LaTeX2e can allow a
% single column figure to be placed prior to an earlier double column
% figure.
% Be aware that LaTeX2e kernels dated 2015 and later have fixltx2e.sty's
% corrections already built into the system in which case a warning will
% be issued if an attempt is made to load fixltx2e.sty as it is no longer
% needed.
% The latest version and documentation can be found at:
% http://www.ctan.org/pkg/fixltx2e
%\usepackage{stfloats}
% stfloats.sty was written by Sigitas Tolusis. This package gives LaTeX2e
% the ability to do double column floats at the bottom of the page as well
% as the top. (e.g., "\begin{figure*}[!b]" is not normally possible in
% LaTeX2e). It also provides a command:
%\fnbelowfloat
% to enable the placement of footnotes below bottom floats (the standard
% LaTeX2e kernel puts them above bottom floats). This is an invasive package
% which rewrites many portions of the LaTeX2e float routines. It may not work
% with other packages that modify the LaTeX2e float routines. The latest
% version and documentation can be obtained at:
% http://www.ctan.org/pkg/stfloats
% Do not use the stfloats baselinefloat ability as the IEEE does not allow
% \baselineskip to stretch. Authors submitting work to the IEEE should note
% that the IEEE rarely uses double column equations and that authors should try
% to avoid such use. Do not be tempted to use the cuted.sty or midfloat.sty
% packages (also by Sigitas Tolusis) as the IEEE does not format its papers in
% such ways.
% Do not attempt to use stfloats with fixltx2e as they are incompatible.
% Instead, use Morten Hogholm'a dblfloatfix which combines the features
% of both fixltx2e and stfloats:
%
% \usepackage{dblfloatfix}
% The latest version can be found at:
% http://www.ctan.org/pkg/dblfloatfix
%\ifCLASSOPTIONcaptionsoff
% \usepackage[nomarkers]{endfloat}
% \let\MYoriglatexcaption\caption
% \renewcommand{\caption}[2][\relax]{\MYoriglatexcaption[#2]{#2}}
%\fi
% endfloat.sty was written by James Darrell McCauley, Jeff Goldberg and
% Axel Sommerfeldt. This package may be useful when used in conjunction with
% IEEEtran.cls' captionsoff option. Some IEEE journals/societies require that
% submissions have lists of figures/tables at the end of the paper and that
% figures/tables without any captions are placed on a page by themselves at
% the end of the document. If needed, the draftcls IEEEtran class option or
% \CLASSINPUTbaselinestretch interface can be used to increase the line
% spacing as well. Be sure and use the nomarkers option of endfloat to
% prevent endfloat from "marking" where the figures would have been placed
% in the text. The two hack lines of code above are a slight modification of
% that suggested by in the endfloat docs (section 8.4.1) to ensure that
% the full captions always appear in the list of figures/tables - even if
% the user used the short optional argument of \caption[]{}.
% IEEE papers do not typically make use of \caption[]'s optional argument,
% so this should not be an issue. A similar trick can be used to disable
% captions of packages such as subfig.sty that lack options to turn off
% the subcaptions:
% For subfig.sty:
% \let\MYorigsubfloat\subfloat
% \renewcommand{\subfloat}[2][\relax]{\MYorigsubfloat[]{#2}}
% However, the above trick will not work if both optional arguments of
% the \subfloat command are used. Furthermore, there needs to be a
% description of each subfigure *somewhere* and endfloat does not add
% subfigure captions to its list of figures. Thus, the best approach is to
% avoid the use of subfigure captions (many IEEE journals avoid them anyway)
% and instead reference/explain all the subfigures within the main caption.
% The latest version of endfloat.sty and its documentation can obtained at:
% http://www.ctan.org/pkg/endfloat
%
% The IEEEtran \ifCLASSOPTIONcaptionsoff conditional can also be used
% later in the document, say, to conditionally put the References on a
% page by themselves.
% *** PDF, URL AND HYPERLINK PACKAGES ***
%
%\usepackage{url}
% url.sty was written by Donald Arseneau. It provides better support for
% handling and breaking URLs. url.sty is already installed on most LaTeX
% systems. The latest version and documentation can be obtained at:
% http://www.ctan.org/pkg/url
% Basically, \url{my_url_here}.
% *** Do not adjust lengths that control margins, column widths, etc. ***
% *** Do not use packages that alter fonts (such as pslatex). ***
% There should be no need to do such things with IEEEtran.cls V1.6 and later.
% (Unless specifically asked to do so by the journal or conference you plan
% to submit to, of course. )
% correct bad hyphenation here
\hyphenation{op-tical net-works semi-conduc-tor}
\hyphenation{suc-cess-ful-ly}
\hyphenation{de-ve-lop-ment}
\begin{document}
%
% paper title
% Titles are generally capitalized except for words such as a, an, and, as,
% at, but, by, for, in, nor, of, on, or, the, to and up, which are usually
% not capitalized unless they are the first or last word of the title.
% Linebreaks \\ can be used within to get better formatting as desired.
% Do not put math or special symbols in the title.
%\title{A Neural ODE Surrogate for Accelerating \\ Transient Power System Simulations}
\title{Acceleration of Power System Dynamic Simulations using a Deep Equilibrium \\ Layer and Neural ODE Surrogate}
%\title{Deep Equilibrium Layer and Neural ODE Surrogates for Accelerating Power System Dynamic Simulations}
%
% author names and IEEE memberships
% note positions of commas and nonbreaking spaces ( ~ ) LaTeX will not break
% a structure at a ~ so this keeps an author's name from being broken across
% two lines.
% use \thanks{} to gain access to the first footnote area
% a separate \thanks must be used for each paragraph as LaTeX2e's \thanks
% was not built to handle multiple paragraphs
%
\author{Matthew~Bossart,~\IEEEmembership{Student Member,~IEEE,}
Jose Daniel Lara,~\IEEEmembership{Senior Member,~IEEE,}
Ciaran~Roberts,~\IEEEmembership{Member,~IEEE,}
Rodrigo Henriquez-Auba,~\IEEEmembership{Member,~IEEE,}
Duncan Callaway,~\IEEEmembership{Member,~IEEE,}
and~Bri-Mathias~Hodge,~\IEEEmembership{Senior Member,~IEEE}% <-this % stops a space
%\thanks{Matthew Bossart and Bri-Mathias Hodge are with the Department of %Electrical,
%Computer and Energy Engineering and the Renewable and Sustainable Energy
%Institute, University of Colorado Boulder, Boulder, CO 80309 USA, and also
%with the National Renewable Energy Laboratory, Golden, CO 80401}%
%\thanks{Manuscript received Month xx, xxxx; revised Month xx, xxxx.}
}
% note the % following the last \IEEEmembership and also \thanks -
% these prevent an unwanted space from occurring between the last author name
% and the end of the author line. i.e., if you had this:
%
% \author{....lastname \thanks{...} \thanks{...} }
% ^------------^------------^----Do not want these spaces!
%
% a space would be appended to the last name and could cause every name on that
% line to be shifted left slightly. This is one of those "LaTeX things". For
% instance, "\textbf{A} \textbf{B}" will typeset as "A B" not "AB". To get
% "AB" then you have to do: "\textbf{A}\textbf{B}"
% \thanks is no different in this regard, so shield the last } of each \thanks
% that ends a line with a % and do not let a space in before the next \thanks.
% Spaces after \IEEEmembership other than the last one are OK (and needed) as
% you are supposed to have spaces between the names. For what it is worth,
% this is a minor point as most people would not even notice if the said evil
% space somehow managed to creep in.
% The paper headers
%\markboth{IEEE TRANSACTIONS ON ENERGY CONVERSION}%
%{Shell \MakeLowercase{\textit{et al.}}: Bare Demo of IEEEtran.cls for IEEE Journals}
% The only time the second header will appear is for the odd numbered pages
% after the title page when using the twoside option.
%
% *** Note that you probably will NOT want to include the author's ***
% *** name in the headers of peer review papers. ***
% You can use \ifCLASSOPTIONpeerreview for conditional compilation here if
% you desire.
% If you want to put a publisher's ID mark on the page you can do it like
% this:
%\IEEEpubid{0000--0000/00\$00.00~\copyright~2015 IEEE}
% Remember, if you use this you must call \IEEEpubidadjcol in the second
% column for its text to clear the IEEEpubid mark.
% use for special paper notices
%\IEEEspecialpapernotice{(Invited Paper)}
% make the title area
\maketitle
% As a general rule, do not put math, special symbols or citations
% in the abstract or keywords.
\begin{abstract}
The dominant paradigm for power system dynamic simulation is to build system-level simulations by combining physics-based models of individual components. The sheer size of the system along with the rapid integration of inverter-based resources exacerbates the computational burden of running time domain simulations. In this paper, we propose a data-driven surrogate model based on implicit machine learning---specifically deep equilibrium layers and neural ordinary differential equations---to learn a reduced order model of a portion of the full underlying system. The data-driven surrogate achieves similar accuracy and reduction in simulation time compared to a physics-based surrogate, without the constraint of requiring detailed knowledge of the underlying dynamic models. This work also establishes key requirements needed to integrate the surrogate into existing simulation workflows; the proposed surrogate is initialized to a steady state operating point that matches the power flow solution by design.
\end{abstract}
%The proposed two-part surrogate can serve as a starting point for future hybrid models which are also data-driven but leverage physics-based domain knowledge to improve key metrics such as interpretability, generalizability, and efficiency of training.
% Note that keywords are not normally used for peerreview papers.
\begin{IEEEkeywords}
Neural ordinary differential equations, implicit deep learning, non-linear systems, power system dynamics.
\end{IEEEkeywords}
% For peer review papers, you can put extra information on the cover
% page as needed:
% \ifCLASSOPTIONpeerreview
% \begin{center} \bfseries EDICS Category: 3-BBND \end{center}
% \fi
%
% For peerreview papers, this IEEEtran command inserts a page break and
% creates the second title. It will be ignored for other modes.
\IEEEpeerreviewmaketitle
\input{introduction.tex}
\input{methodology.tex}
\input{case_study.tex}
\input{conclusion.tex}
% An example of a floating figure using the graphicx package.
% Note that \label must occur AFTER (or within) \caption.
% For figures, \caption should occur after the \includegraphics.
% Note that IEEEtran v1.7 and later has special internal code that
% is designed to preserve the operation of \label within \caption
% even when the captionsoff option is in effect. However, because
% of issues like this, it may be the safest practice to put all your
% \label just after \caption rather than within \caption{}.
%
% Reminder: the "draftcls" or "draftclsnofoot", not "draft", class
% option should be used if it is desired that the figures are to be
% displayed while in draft mode.
%
%\begin{figure}[!t]
%\centering
%\includegraphics[width=2.5in]{myfigure}
% where an .eps filename suffix will be assumed under latex,
% and a .pdf suffix will be assumed for pdflatex; or what has been declared
% via \DeclareGraphicsExtensions.
%\caption{Simulation results for the network.}
%\label{fig_sim}
%\end{figure}
% Note that the IEEE typically puts floats only at the top, even when this
% results in a large percentage of a column being occupied by floats.
% An example of a double column floating figure using two subfigures.
% (The subfig.sty package must be loaded for this to work.)
% The subfigure \label commands are set within each subfloat command,
% and the \label for the overall figure must come after \caption.
% \hfil is used as a separator to get equal spacing.
% Watch out that the combined width of all the subfigures on a
% line do not exceed the text width or a line break will occur.
%
%\begin{figure*}[!t]
%\centering
%\subfloat[Case I]{\includegraphics[width=2.5in]{box}%
%\label{fig_first_case}}
%\hfil
%\subfloat[Case II]{\includegraphics[width=2.5in]{box}%
%\label{fig_second_case}}
%\caption{Simulation results for the network.}
%\label{fig_sim}
%\end{figure*}
%
% Note that often IEEE papers with subfigures do not employ subfigure
% captions (using the optional argument to \subfloat[]), but instead will
% reference/describe all of them (a), (b), etc., within the main caption.
% Be aware that for subfig.sty to generate the (a), (b), etc., subfigure
% labels, the optional argument to \subfloat must be present. If a
% subcaption is not desired, just leave its contents blank,
% e.g., \subfloat[].
% An example of a floating table. Note that, for IEEE style tables, the
% \caption command should come BEFORE the table and, given that table
% captions serve much like titles, are usually capitalized except for words
% such as a, an, and, as, at, but, by, for, in, nor, of, on, or, the, to
% and up, which are usually not capitalized unless they are the first or
% last word of the caption. Table text will default to \footnotesize as
% the IEEE normally uses this smaller font for tables.
% The \label must come after \caption as always.
%
%\begin{table}[!t]
%% increase table row spacing, adjust to taste
%\renewcommand{\arraystretch}{1.3}
% if using array.sty, it might be a good idea to tweak the value of
% \extrarowheight as needed to properly center the text within the cells
%\caption{An Example of a Table}
%\label{table_example}
%\centering
%% Some packages, such as MDW tools, offer better commands for making tables
%% than the plain LaTeX2e tabular which is used here.
%\begin{tabular}{|c||c|}
%\hline
%One & Two\\
%\hline
%Three & Four\\
%\hline
%\end{tabular}
%\end{table}
% Note that the IEEE does not put floats in the very first column
% - or typically anywhere on the first page for that matter. Also,
% in-text middle ("here") positioning is typically not used, but it
% is allowed and encouraged for Computer Society conferences (but
% not Computer Society journals). Most IEEE journals/conferences use
% top floats exclusively.
% Note that, LaTeX2e, unlike IEEE journals/conferences, places
% footnotes above bottom floats. This can be corrected via the
% \fnbelowfloat command of the stfloats package.
% if have a single appendix:
%\appendix[Proof of the Zonklar Equations]
% or
%\appendix % for no appendix heading
% do not use \section anymore after \appendix, only \section*
% is possibly needed
% use appendices with more than one appendix
% then use \section to start each appendix
% you must declare a \section before using any
% \subsection or using \label (\appendices by itself
% starts a section numbered zero.)
%
%\appendices
%\section{Proof of the First Zonklar Equation}
%Appendix one text goes here.
% you can choose not to have a title for an appendix
% if you want by leaving the argument blank
%\section{}
%Appendix two text goes here.
% use section* for acknowledgment
%\section*{Acknowledgment}
%The authors would like to thank...
% Can use something like this to put references on a page
% by themselves when using endfloat and the captionsoff option.
\ifCLASSOPTIONcaptionsoff
\newpage
\fi
% trigger a \newpage just before the given reference
% number - used to balance the columns on the last page
% adjust value as needed - may need to be readjusted if
% the document is modified later
%\IEEEtriggeratref{8}
% The "triggered" command can be changed if desired:
%\IEEEtriggercmd{\enlargethispage{-5in}}
% references section
% can use a bibliography generated by BibTeX as a .bbl file
% BibTeX documentation can be easily obtained at:
% http://mirror.ctan.org/biblio/bibtex/contrib/doc/
% The IEEEtran BibTeX style support page is at:
% http://www.michaelshell.org/tex/ieeetran/bibtex/
%\bibliographystyle{IEEEtran}
% argument is your BibTeX string definitions and bibliography database(s)
%\bibliography{IEEEabrv,../bib/paper}
%
% <OR> manually copy in the resultant .bbl file
% set second argument of \begin to the number of references
% (used to reserve space for the reference number labels box)
\bibliographystyle{IEEEtran}
\bibliography{NODE}
%NOTE: manually modify Differentiable modelling... author = {{C. Shen, \textit{et. al}}},
%Manually Add:
%@article{lara_revisiting_2023_tpwrs,
% title={Revisiting Power Systems Time domain Simulation Methods and Models},
% author={Lara, Jose Daniel and Henriquez-Auba, Rodrigo and Ramasubramanian, Deepak and %Dhople, Sairaj and Callaway, Duncan and Sanders, Seth},
% journal={IEEE Transactions on Power Systems},
% pages={1--16},
% year={2023},
% publisher={IEEE}
%}
% biography section
%
% If you have an EPS/PDF photo (graphicx package needed) extra braces are
% needed around the contents of the optional argument to biography to prevent
% the LaTeX parser from getting confused when it sees the complicated
% \includegraphics command within an optional argument. (You could create
% your own custom macro containing the \includegraphics command to make things
% simpler here.)
%\begin{IEEEbiography}[{\includegraphics[width=1in,height=1.25in,clip,keepaspectratio]{mshell}}]{Michael Shell}
% or if you just want to reserve a space for a photo:
%\begin{IEEEbiography}{Matthew Bossart}
%Biography text here.
%\end{IEEEbiography}
%
%% if you will not have a photo at all:
%\begin{IEEEbiographynophoto}{Bri-Mathias Hodge}
%Biography text here.
%\end{IEEEbiographynophoto}
% insert where needed to balance the two columns on the last page with
% biographies
%\newpage
%\begin{IEEEbiographynophoto}{Jane Doe}
%Biography text here.
%\end{IEEEbiographynophoto}
% You can push biographies down or up by placing
% a \vfill before or after them. The appropriate
% use of \vfill depends on what kind of text is
% on the last page and whether or not the columns
% are being equalized.
%\vfill
% Can be used to pull up biographies so that the bottom of the last one
% is flush with the other column.
%\enlargethispage{-5in}
% that's all folks
\end{document}
\section{Introduction}
% The very first letter is a 2 line initial drop letter followed
% by the rest of the first word in caps.
%
% form to use if the first word consists of a single letter:
% \IEEEPARstart{A}{demo} file is ....
%
% form to use if you need the single drop letter followed by
% normal text (unknown if ever used by the IEEE):
% \IEEEPARstart{A}{}demo file is ....
%
% Some journals put the first two words in caps:
% \IEEEPARstart{T}{his demo} file is ....
%
% Here we have the typical use of a "T" for an initial drop letter
% and "HIS" in caps to complete the first word.
\IEEEPARstart{T}{he} transition from fossil fuel-based generation to renewable energy sources is accelerating. Unlike traditional generation based on rotating synchronous machines, wind, solar photovoltaics, and storage are inverter-based resources (IBRs) that interface with the grid through power electronics. Synchronous machines and IBRs have fundamentally different dynamic behavior, and therefore the adoption of IBRs has profound impacts on the dynamic behavior of power systems.
Given the fundamental shift in the dynamics of the system brought on by IBRs, it is not guaranteed that historically useful frameworks for the study of system stability will provide adequate results for future systems. Recent work has shown that including line dynamics can change system-wide stability classification \cite{markovic_stability_2018, lara_revisiting_2023, henriquez2020grid, brouillon_effect_2018} and that it is difficult to accurately capture fast inverter controls, such as the inner current loop, in the positive sequence domain \cite{wang_instability_2018}. Events in Australia and Texas demonstrate the limitations of positive sequence tools to capture observed system oscillations \cite{badrzadeh_electromagnetic_nodate, noauthor_odessa_2021}.
These recent challenges in IBR simulations highlight the need for more detailed modeling (i.e. more dynamic states) which in many cases includes the representation of Electromagnetic Transients (EMT). Furthermore, the combination of EMT dynamics and the fast control loops of IBRs imposes a smaller time step requirement for solving systems with IBRs \cite{kenyon_comparison_2023}. Considering that the time to solve systems of differential equations is largely determined by (1)~the number of states in the system and (2)~the time step required for solving the system \cite{hairer_solving_1996}, simulating systems with large penetrations of IBRs will be more computationally expensive. For a more in-depth discussion on the underlying assumptions of various time domain simulation approaches, refer to \cite{lara_revisiting_2023_tpwrs}. The need for increased detail in simulation models is at odds with the need to carry out studies that require simulating multiple scenarios, such as contingency analysis or system impact studies \cite{charles2023off}.
\begin{figure}[t]
\centering
\includegraphics[width=0.48\textwidth]{figs/intro_fig.pdf}
\caption{For large systems, modeling all devices in detail (above) becomes computationally intractable. This paper proposes a data-driven surrogate model that is designed to be integrated into simulations containing physics-based models (below).}
\label{fig:intro}
\end{figure}
A useful technique to accelerate simulations is to create simpler versions of complex models called ``reduced-order models" or ``surrogates". These surrogates can capture intricate system dynamics with fewer states, significantly reducing the computational demands during simulation. In this manuscript, we use the term ``physics-based surrogate model" to describe a surrogate with a specified structure that is designed to replicate specific observed dynamics. Prior works have developed ``physics-based surrogate models" by representing many devices with a single aggregate model of similar structure \cite{purba_reduced-order_2019,purba_dynamic_2020, ma_mathematical_2020}. Developing these surrogate models requires knowledge of the constituent models' structure and parameters, which is not always available. For instance, simulations that involve manufacturer-provided black box models will not have the internal structure revealed to the model user. In addition, power systems with inverter control and distributed energy resources (DERs) can demonstrate complex dynamic behaviors that a structured model may not fully encapsulate in a general sense. In this case, the physics-based surrogates must rely on distinct parameterizations in order to capture the dynamic behavior accurately for different simulations \cite{noauthor_model_2018, noauthor_value_2015}. These drawbacks can be mitigated by employing other types of surrogate models that are capable of emulating the underlying system's behavior without relying on structural assumptions.
The ``data-driven surrogate model" presented in this paper is capable of creating a reduced-order representation with no underlying structural assumptions (Fig. \ref{fig:intro}). Unlike physics-based surrogate models that require extensive design and validation, data-driven surrogates can be trained on simulation data to capture the dynamics of a sub-section of a system. These surrogates are adequate for modeling complex, non-linear behavior, and the number of states can be adjusted to balance computational cost and accuracy, based on the complexity of the underlying system. The framework also captures faster time-scale phenomena, such as network dynamics and inner control loops of IBRs, when necessary. Data-driven surrogates have proven to be effective in accelerating simulations in other fields, such as chemical reactions and heating systems \cite{anantharaman_accelerating_2021}.
\begin{figure}[t]
\centering
\subfigure[Direct classification of stability \protect\cite{ren_interpretable_2022, sarajcev_power_2021, senyuk_power_2023}.]
{
\centering
\includegraphics[width=0.45\textwidth]{figs/ML_A.pdf}
\label{fig:ML_A}
}
\subfigure[Predicting time domain trajectories (e.g. physics-informed neural networks) \protect\cite{misyris_physics-informed_2020}.]
{
\centering
\includegraphics[width=0.45\textwidth]{figs/ML_B.pdf}
\label{fig:ML_B}
}
\subfigure[Incorporating ML models within the existing transient simulation workflow \protect\cite{vorwerk_using_2022, azmy_identification_2004, zhou_neuro-reachability_2022, xiao_feasibility_2022}.]
{
\centering
\includegraphics[width=0.45\textwidth]{figs/ML_C.pdf}
\label{fig:ML_C}
}
\caption{Types of applications of ML to power system dynamics.}
\label{fig:three graphs}
\end{figure}
In previous applications of scientific machine learning (ML) to power system dynamic simulation, the focus was on completely replacing the transient simulation process. This involved either classifying stability (Fig. \ref{fig:ML_A}) or predicting the time domain solution directly (Fig. \ref{fig:ML_B}). We take a different approach by integrating data-driven models into an existing transient simulation workflow (Fig. \ref{fig:ML_C}). Prior works that follow a similar approach have developed data-driven models based on variations of recurrent neural networks to predict the current state based on a fixed sequence of prior states \cite{vorwerk_using_2022, azmy_identification_2004}. These surrogates are trained based on prior values recorded at a fixed simulation time step; integrating them into a larger system therefore eliminates the possibility of using adaptive time-stepping. A more natural choice for seamless integration is a neural ordinary differential equation (neural ODE), which can be seen as an extension of recurrent neural networks to continuous time \cite{chen_neural_nodate}. The authors in \cite{zhou_neuro-reachability_2022} use neural ODEs to model the uncertainty of DERs in systems of networked microgrids; in \cite{xiao_feasibility_2022}, neural ODEs are used for parameter estimation and black box modeling. However, neither of these works addresses essential considerations related to integrating data-driven models (i.e., End-to-End implementation), such as initializing the models to start in steady-state and respecting the boundary conditions imposed by physics-based devices and the power flow solution.
The novel surrogate structure proposed in this paper is based on deep equilibrium (DEQ) layers \cite{bai_deep_nodate} and neural ODEs \cite{chen_neural_nodate}, which are both examples of implicit layers \cite{el_ghaoui_implicit_2021}. Implicit deep learning is a novel field in which layers are formulated as satisfying implicit conditions (e.g. $\text{NN}(x,y) = 0$), rather than as an explicit relationship between input and output (e.g. $y = \text{NN}(x)$). The key insight in this work is that these novel layers can be used to encode the steady-state and network boundary conditions. These layers resolve the initialization challenges of data-driven surrogate models allowing for seamless integration into a system model.
The complete End-to-End (E2E) integration of ML surrogates is a seldom-discussed step in other works and is one of the main focuses of this work. The contributions target the entire data-driven surrogate pipeline, including development, training, initialization, and integration into existing transient simulation workflows as shown in Fig. \ref{fig:ML_C}.
Further, we aim to build tools that enable system operators to evaluate dynamic phenomena in grids with significant participation of IBRs that employ heterogeneous control techniques and structures.
\begin{figure}[t]
\centering
\includegraphics[width=1.0\columnwidth]{figs/methodology_overview.pdf}
\caption{An overview of the proposed methodology. The different colors correspond to the focus of each subsection of the methodology.}
\label{fig:methodology}
\end{figure}
The E2E methods developed in this manuscript are shown at a high level in Fig. \ref{fig:methodology} and consist of the following steps: (1)~A simulation is built and solved using physics-based models and numerical integration to generate time domain trajectories. (2)~The time domain simulation data is used as the ``ground truth'' data to train a data-driven surrogate model. (3)~The data-driven model is used along with physics-based models to build and solve a new simulation. (4)~The two datasets are compared on the basis of accuracy and simulation speed.
The main contributions of this paper are:
\begin{itemize}
\item A data-driven surrogate structure, consisting of both DEQ and neural ODE layers (Section \ref{section:surrogate}), which can be integrated into time domain simulation procedures.
\item An E2E training, validation, and integration procedure for data-driven surrogate models in time domain simulations including EMT dynamics.
\item Numerical results for a medium-size case study demonstrating the implementation of the proposed approach in an existing simulation platform (Section \ref{section:casestudy}).
\end{itemize}
\section{Surrogate Structure}
\label{section:surrogate}
%We begin in Section \ref{subsection:simulation procedure} with a description of the series of steps comprising a simulation (i.e. the simulation procedure) which is applicable to both the ``traditional'' physics-based system model and also the proposed combination of physics-based and data-driven models. The structure of the surrogate is presented in Section \ref{subsection:surrogate} with a special emphasis on the features of the surrogate which allow for re-integration into a simulation. The data-generation and training process is described in Section \ref{subsection:training}.
The block diagram of the surrogate model is shown in Fig. \ref{fig:surrogate}. The proposed surrogate design is informed by the requirements of the procedure followed by standard time domain simulation tools described in Section \ref{subsection:simulation procedure}.
\subsection{Power Systems Time Domain Simulation Procedure}
\label{subsection:simulation procedure}
A time domain simulation requires the specification of two components: (1)~a system model, including the differential algebraic equations that describe the system's physics and controls, and (2)~a time-stepping (or integration) algorithm \cite{lara_revisiting_2023}. In this work, we assume the system model consists of a set of time-invariant differential equations:
\begin{subequations}
\begin{align}
\frac{d\boldsymbol{x}_{sys}}{dt} &= f_{sys}(\boldsymbol{x}_{sys}, \boldsymbol{y}_{sys}, \boldsymbol{s}_{sys}, \boldsymbol{\eta}_{sys}) \label{eq:sim1}\\
\frac{d\boldsymbol{y}_{sys}}{dt} &= g_{sys}(\boldsymbol{x}_{sys}, \boldsymbol{y}_{sys}, \boldsymbol{\psi}_{sys}) \label{eq:sim2}
\end{align}
\end{subequations}
\noindent where ${\boldsymbol{x}_{sys}}$, $f_{sys}(\cdot)$, $\boldsymbol{s}_{sys}$, and $\boldsymbol{\eta}_{sys}$ represent, respectively, the states, equations, references, and parameters of the devices (e.g., inverters, machines, loads, surrogate models, etc.). The circuit dynamics of the network are represented as the sub-system $\boldsymbol{y}_{sys}$ and $g_{sys}(\cdot)$ with network parameters $\boldsymbol{\psi}_{sys}$.
Given the system model \eqref{eq:sim1}--\eqref{eq:sim2}, we define the procedure to execute a time domain simulation as the following three steps:
\begin{enumerate}
\item Solve the network model power flow $g_{sys}(\cdot)$, resulting in an initial condition for the network states $\boldsymbol{y}_{sys}^0$.
\item Based on the power-flow solution ($\boldsymbol{y}_{sys}^0$), solve the steady-state equations for each device to determine $\boldsymbol{x}_{sys}^0$ and obtain the system-level steady-state.
\item Apply a disturbance and numerically integrate, starting from the initial conditions and using a stepping algorithm.
\end{enumerate}
The way in which each device interfaces with the network, and therefore the rest of the system, is also an important feature of the simulation definition. We assume a current balance framework wherein the input to each device is the voltage at the point of common coupling and the output is an injected current \cite{milano_power_2010}. With this formulation, a dynamic surrogate model can be written as:
\begin{subequations}
\begin{alignat}{1}
\dot{\boldsymbol{x}} &= f(\boldsymbol{x}, \boldsymbol{s}, \boldsymbol{v}, \boldsymbol{\eta}) \label{eq:device1}\\
\boldsymbol{i} &= h(\boldsymbol{x}, \boldsymbol{v}, \boldsymbol{\eta}) \label{eq:device2}
\end{alignat}
\end{subequations}
\noindent where $\boldsymbol{x}$ are the dynamic states, $\boldsymbol{v}$ is the voltage input to the model, $\boldsymbol{i}$ is the model output current, $\boldsymbol{\eta}$ are parameters of the model, and $\boldsymbol{s}$ are references which are determined during initialization. Function $f$ represents the model's differential equations, and $h$ is the mapping from the dynamic states to the output current.
%\theoremstyle{definition}
%\newtheorem*{definition*}{Definition}
%\begin{definition*}[Initial Network Interface Requirements]
\noindent \textbf{Definition} (Initial Network Interface Requirements). Given $\boldsymbol{v}_0, \boldsymbol{i}_0$ as the initial voltage and current from the power-flow solution, we define that a surrogate model \textbf{\textit{satisfies the network interface requirements}} if the following conditions are met:
\begin{subequations}
\begin{alignat}{1}
&\boldsymbol{0} = f(\boldsymbol{x}_0, \boldsymbol{s}, \boldsymbol{v}_0, \boldsymbol{\eta})\label{eq:interface1} \\
&\boldsymbol{i}_0 = h(\boldsymbol{x}_0, \boldsymbol{v}_0, \boldsymbol{\eta}) \label{eq:interface2}
\end{alignat}
\label{eq:interface}
\end{subequations}
%\end{definition*}
\noindent This definition implies that for a surrogate model to satisfy the initial network interface requirements, the differential terms must be initialized to a steady state while also matching the initial voltage and current values of the power flow solution.
\begin{figure*}[t]
\centering
\includegraphics[width=1.0\textwidth]{figs/node_surrogate.pdf}
\caption{The proposed surrogate model. The blocks are color-coded according to their function---a key novelty lies in the combination of DEQ and NODE implicit layers with shared parameters.}
\label{fig:surrogate}
\end{figure*}
This requirement is critical because if the surrogate is not in steady-state, it is not possible to find a full system condition that is in steady-state, which is typically the desired condition before a perturbation is applied. Furthermore, if the surrogate does not match the power flow quantities, the devices outside of the surrogate model have to compensate to achieve system balance leading to a different initial state than intended.
\subsection{Network Interface}
To reintegrate a surrogate into a simulation, the input and output network quantities ($\boldsymbol{v}$ and $\boldsymbol{i}$) need to be in the system reference frame. Internally, these quantities are first transformed to a local reference frame ($\boldsymbol{v}'$ and $\boldsymbol{i}'$) and then normalized ($\boldsymbol{v}''$ and $\boldsymbol{i}''$) in order to enhance the performance of the data-driven models. Without a local reference frame transformation, the solution of the surrogate model would change depending on the arbitrary definition of the system reference voltage. We define a local reference frame rotation to align one component of the input voltage to zero.
\begin{equation}
\label{eq:ref_surrogate}
\begin{aligned}
\boldsymbol{v}' = M(\theta)\boldsymbol{v}, \quad
\boldsymbol{i}' = M(\theta) \boldsymbol{i}, \quad
\theta = \arctan\left(\frac{v_{i}}{v_{r}}\right)
\end{aligned}
\end{equation}
where $M(\theta) =\begin{bmatrix} \text{sin}(\theta) & -\text{cos}(\theta) \\ \text{cos}(\theta) & \text{sin}(\theta)\\ \end{bmatrix}$, $\boldsymbol{v} = [v_r, v_i]^\intercal$, $\boldsymbol{i} = [i_r, i_i]^\intercal$, and $\theta$ is the time-varying angle of the input voltage in the system reference frame. This technique is analogous to the reference frame transformations which are common in many inverter and machine models \cite{park_two-reaction_1929, lara_revisiting_2023_tpwrs}.
ML workflows include some data preprocessing steps so that inputs to neural networks are normalized (e.g. bounded to $[-1, 1]$). Min-max normalization is included to normalize both the inputs and outputs based on the range of values seen in the training data:
\begin{equation}
\begin{aligned}
\boldsymbol{v}'' = N_{\text{in}}(\boldsymbol{v}')= -1 + \frac{2(\boldsymbol{v}' - \boldsymbol{v}'_{min})}{\boldsymbol{v}'_{max} - \boldsymbol{v}'_{min}} \\
\boldsymbol{i}'' = N_{\text{out}}(\boldsymbol{i}') = -1 + \frac{2(\boldsymbol{i}' - \boldsymbol{i}'_{min})}{\boldsymbol{i}'_{max} - \boldsymbol{i}'_{min}}
\end{aligned}
\end{equation}
\noindent where $\boldsymbol{v}'_{min}$ and $\boldsymbol{v}'_{max}$ are vectors of the minimum and maximum values respectively of each element of $\boldsymbol{v}'$ across the entire training dataset. The inverse of the normalization is included at the output of the model. Care should be taken to ensure the ranges of values in the validation and test datasets are similar to those expected to be found in both the training dataset and in practical usage.
\subsection{Initialization}
The initialization portion of the proposed surrogate is a key differentiating feature with respect to prior work. As mentioned in Section \ref{subsection:simulation procedure}, the network interface requirements \eqref{eq:interface1}-\eqref{eq:interface2} are explicitly considered during initialization. In \cite{xiao_feasibility_2022}, the initial conditions for the neural ODE are calculated by passing the power flow quantities to an \textit{explicit} feed-forward neural network. However, there is no guarantee that the resulting initial conditions satisfy the network interface requirements. In contrast, the initialization of the proposed surrogate takes place through an \textit{implicit} layer---a DEQ layer to be precise---such that the forward pass of the model ensures the relevant conditions are met. This feature implies that even the \textit{untrained} surrogate matches the network interface requirements (see Fig. \ref{fig:expository}). Unless the initial conditions of a model can be calculated precisely in closed form (which is sometimes possible with physics-based models), the initialization process is fundamentally implicit. Therefore it is reasonable to model using an implicit ML layer. This approach embeds the network interface requirements into the structure of the surrogate, and satisfying the requirements is not reliant on the training process.
The initialization portion of the surrogate is defined as:
\begin{subequations}
\begin{alignat}{1}
&(\boldsymbol{i}_0,\boldsymbol{v}_0, \boldsymbol{p}) \rightarrow [\boldsymbol{x}_0^\intercal, \boldsymbol{s}^\intercal]^\intercal \\
&\boldsymbol{p} = [\boldsymbol{p}_1^\intercal, \boldsymbol{p}_2^\intercal]^\intercal \\
\text{s.t.} \nonumber \\
&\boldsymbol{0} = \text{NN}_{\boldsymbol{p}_2}(\boldsymbol{x}_0, \boldsymbol{s}, \boldsymbol{v}_0'') \label{eq:init_surr_implicit_b} \\
&\boldsymbol{i}_0'' = [x_{0_1}, \; x_{0_2}]^\intercal \label{eq:init_surr_implicit_c} \
\end{alignat}
\label{eq:init_surr_implicit}
\end{subequations}
\noindent where the system of equations are solved numerically with the initial condition:
\begin{equation}
\label{eq:init_surr_explicit}
[\boldsymbol{\hat{x}}_0^\intercal, \; \boldsymbol{\hat{s}}^\intercal]^\intercal = \text{NN}_{\boldsymbol{p}_1}(\boldsymbol{i}_0'', \boldsymbol{v}_0'')
\end{equation}
The initialization consists of an explicit prediction from the first neural network \eqref{eq:init_surr_explicit} followed by a ``correction'' by the implicit layer \eqref{eq:init_surr_implicit_b}-\eqref{eq:init_surr_implicit_c}. The equations that are solved in the implicit layer guarantee that the surrogate satisfies the network interface requirements. The explicit prediction layer is given by $\text{NN}_{\boldsymbol{p_1}}$---a densely connected feed-forward neural network with parameters (weights and biases) $\boldsymbol{p_1}$ and the initial operating point as the input:
\begin{subequations}
\begin{align}
[\boldsymbol{i}_0''^\intercal, \boldsymbol{v}_0''^\intercal]^\intercal =& \mathbf{z^1_0} \\
\mathbf{z^1_{k+1}} = \sigma(&\mathbf{W^1_{k+1}z^1_k} + \mathbf{b^1_{k+1}})\; \ \forall k = 0, ... , K-1 \\
[\boldsymbol{\hat{x}}_0, \boldsymbol{\hat{s}}] = \sigma(&\mathbf{W^1_{K+1}z^1_K} + \mathbf{b^1_{K+1}})
\end{align}
\end{subequations}
The number of hidden layers $K$ and the width of the hidden layers $\text{dim}(\mathbf{b_k}) \ \forall k=1, ..., K-1$ are chosen as hyperparameters of the training problem. The output dimension $\text{dim}\left([\boldsymbol{\hat{x}}_0, \boldsymbol{\hat{s}}]\right)$ depends on the number of states, which is also a hyperparameter. In summary, the initialization mapping of the surrogate is given by an implicit-explicit layer similar to the layer proposed in \cite{pal_mixing_2022} as an isolated deep learning model for non-power systems applications.
The explicit layer is important in the overall structure of the surrogate as it allows the surrogate to generalize over different operating points (contingent on good training). The explicit layer is trained to give a good initial guess so that $[\boldsymbol{\hat{x}}_0, \boldsymbol{\hat{s}}] \approx [\boldsymbol{x}_0,\boldsymbol{s}]$. This implies that a different operating point $\boldsymbol{i}_0$, $\boldsymbol{v}_0$ will yield different initial conditions $\boldsymbol{x_0}$ for the neural ODE and therefore a different dynamic response. In comparison, prior works have dealt with multiple operating points by defining the data-driven states relative to the steady state \cite{vorwerk_using_2022}, implying that the dynamic response of the model will be the same regardless of the operating point. This assumption is not always true. For instance, an inverter operating without any headroom will behave much differently from an inverter with sufficient headroom when faced with an increase in load.
%\textit{Remark:} The dimension of $\boldsymbol{s}$ should be greater than or equal to the number of model outputs in order to have enough free variables determined during initialization to satisfy the constraints.
\subsection{Differential Equations}
The dynamic portion of the proposed surrogate ($f$) is given by a neural ODE \cite{chen_neural_nodate} wherein the derivatives of the hidden states are defined as the output of a neural network:
\begin{equation}
\begin{aligned}
f(\boldsymbol{x}, \boldsymbol{s}, \boldsymbol{v}, \boldsymbol{p}) :&= \text{NN}_{\boldsymbol{p}_2}(\boldsymbol{x},\boldsymbol{s},\boldsymbol{v}) \\
\end{aligned}
\end{equation}
The inputs to the neural ODE include the dynamic states ($\boldsymbol{x}$), the references which are determined during initialization ($\boldsymbol{s}$), and the time-varying exogenous input ($\boldsymbol{v}$) which comes from the interface with the rest of the system. The neural ODE neural network ($\text{NN}_{\boldsymbol{p}_2}$) is also a full-connected architecture with parameters $\boldsymbol{p}_2$:
\begin{subequations}
\label{eq:nn2}
\begin{align}
[\boldsymbol{x}^\intercal, \boldsymbol{s}^\intercal, &\boldsymbol{v}^\intercal]^\intercal = \mathbf{z^2_0} \\
\mathbf{z^2_{k+1}} &= \sigma(\mathbf{W^2_{k+1}z^2_k} + \mathbf{b^2_{k+1}})\; \forall k = 0, ... , K-1 \\
\dot{\boldsymbol{x}} &= \mathbf{W^2_{K+1}z^2_K} \label{eq:unconstrained}
\end{align}
\end{subequations}
The key difference is that the output layer is not bounded by an activation function and does not include a bias. From a numerical perspective, the neural ODE describes a non-linear relationship which defines the derivatives of the states and therefore the neural ODE architecture is compatible with any numerical integration algorithm.
The final portion of the model is the mapping from the dynamic states ($\boldsymbol{x}$) to the outputs which interface with the rest of the system. In this case, the simplest possible option is chosen---the first two dynamic states are selected to represent the output and the inverse of the normalization and reference frame transformations are applied to obtain the output current in the system reference frame and units:
\begin{equation}
\label{eq:h_surrogate}
h(\boldsymbol{x},\boldsymbol{p}) := M^{-1}(\theta)N_{\text{out}}^{-1}([x_1, \; x_2]^\intercal) = \boldsymbol{i}
\end{equation}
\noindent The complete surrogate model (Fig. \ref{fig:surrogate}) is given by \eqref{eq:ref_surrogate} -- \eqref{eq:h_surrogate}.
\begin{figure}
\centering
\subfigure[Surrogate before training.]
{
\includegraphics[width=0.95\linewidth]{figs/expository_before.pdf}
%\caption{Surrogate before training}
\label{fig:expository_before}
}
\subfigure[Surrogate after training.]
{
\includegraphics[width=0.95\linewidth]{figs/expository_after.pdf} %{figs/expository_after.png}
%\caption{Surrogate after training}
\label{fig:expository_after}
}
\caption{An expository result---(a) and (b) show the same quantities for the surrogate before and after training respectively. The left side shows the trajectories for the hidden states ($\boldsymbol{x}$) along with the predicted initial conditions ($\boldsymbol{\hat{x}}_0$) shown as black circles. The right side shows the model output (real and imaginary current).}
\label{fig:expository}
\end{figure}
%Subheading for this clarifying example which is included at the end of the methodology?
One way to visualize the novel properties of the proposed surrogate is to consider the behavior of an \textit{untrained} surrogate model. While this is not common practice in a traditional ML model, in this case the untrained behavior helps demonstrate the parts of the model performance which rely on training and the parts which are inherent due to the structure. A sample result is shown in Fig. \ref{fig:expository} for the proposed surrogate, both before (Fig. \ref{fig:expository_before}) and after (Fig. \ref{fig:expository_after}) training. On the left side are the dynamic states of the neural ODE and on the right side are the outputs of interest (real and imaginary current). The predicted initial states ($\boldsymbol{\hat{x}}_0$) are plotted as circles at time zero. As expected, before any training, there is a significant difference between the predicted and actual initial states $\boldsymbol{\hat{x}}_0$ and $\boldsymbol{x}_0$, and the dynamic response does not match the ground truth. However, the hidden states are in steady state (flat line before the perturbation is applied) and the initial outputs match exactly the ground truth data, precisely because both these constraints are encoded into the DEQ layer. After the surrogate is trained (Fig. \ref{fig:expository_after}), the prediction of the initial conditions is much closer, as is the dynamic response.
\section{Training Methodology}
\label{subsection:training}
While the parameters of a physics-based model can often be derived from the physical system itself, the parameters of the proposed data-driven models must be learned from data during the training process. In practice, this means that the surrogate structure described must be fully differentiable so that the gradient of each parameter with respect to the loss can be calculated during training. The details of the training process are discussed in the following section.
\subsection{Data Generation} The dataset used for training and evaluation of the model, $\mathcal{D}$, consists of $n$ pairs of input and output time-series trajectories where each trajectory contains $m$ time points:
\begin{equation}
\mathcal{D} = \{\{(\boldsymbol{v}_{(i,j)},\boldsymbol{i}_{(i,j)})\}_{i=1}^{m}\}_{j=1}^n
\end{equation}
For the purpose of this paper, the input is the bus voltage at the point of common coupling ($\boldsymbol{v} = [v_r, v_i]^\intercal \in \mathbb{R}^2$) and the output is the injected current from the surrogate ($\boldsymbol{i} = [i_r, i_i]^\intercal \in \mathbb{R}^2$). The full dataset of $n$ trajectories is randomly split into train, validation, and test datasets.
In this work all training data is generated from numerical simulations of the full system model including EMT dynamics as employed in \cite{henriquez2020grid} (see Section \ref{subsection:computational} for implementation details). The dataset consists of the network quantities (voltages, currents) at the point of common coupling between the surrogate portion and the remainder of the system. Generating data by simulating perturbations of interest in the full system is an easy way to ensure that the relevant dynamics that exist in the test dataset are captured during training, even though the train and test datasets consist of distinct trajectories that are generated independently. While the black-box structure of the surrogate lends itself to applications in which an accurate physical model is not known and only data is available (e.g. a real distribution feeder with measurement data at the sub-station transformer), the extension to measurement data is beyond the scope of this work.
\subsection{Loss Function}
The purpose of the loss function is to quantify the performance of the surrogate model during training so that the parameters can be iteratively updated (trained), thereby improving the performance. The loss function is given by:
\begin{equation}
\begin{aligned}
\mathcal{L}(\boldsymbol{p}_1, \boldsymbol{p}_2) =& \;(1-\alpha)\mathcal{L}_\text{init.} + \alpha \mathcal{L}_\text{dyn.} \\
\mathcal{L}_\text{init.} =& \; \text{RMSE}\left([\boldsymbol{x}_0^\intercal, \boldsymbol{s}^\intercal], [\boldsymbol{\hat{x}_0}^\intercal, \boldsymbol{\hat{s}}^\intercal]\right) \\
\mathcal{L}_\text{dyn.} =& \; \text{RMSE}\left([\boldsymbol{i}_{(1)}^\intercal \; ... \; \boldsymbol{i}_{(m)}^\intercal], [\boldsymbol{\hat{i}}_{(1)}^\intercal \; ... \; \boldsymbol{\hat{i}}_{(m)}^\intercal] \right)
\end{aligned}
\label{eq:loss}
\end{equation}
where RMSE is the well known root mean square error:
\begin{equation*}
\text{RMSE}(\boldsymbol{x},\boldsymbol{\hat{x}}) =\sqrt{\frac{\sum_{i=1}^{n}\left(x_i - \hat{x}_i\right)^2}{n}}
\end{equation*}
%\begin{equation}
%\begin{aligned}
%\mathcal{L}(p_1, p_2) &= (1-\alpha)\mathcal{L}_\text{init.} + \alpha %\mathcal{L}_\text{dyn.} \\
%\mathcal{L}_\text{init.} &= \sqrt{\frac{\sum_{i=1}^{n}\left(x^{(i)}_0 - \hat{x}^{(i)}_0\right)^2}%{n}} + \sqrt{\frac{\sum_{i=1}^{n}\left(s^{(i)} - \hat{s}^{(i)}\right)^2}{n}} \\
%\mathcal{L}_\text{dyn.} &=\sqrt{\frac{\sum_{t=1}^{N}\left(y^{ri}_t - \hat{i}^{ri}_t\right)^2}%{N}}
%\end{aligned}
%\label{eq:loss}
%\end{equation}
$\boldsymbol{p}_1$ and $\boldsymbol{p}_2$ are the parameters of the explicit initialization prediction layer and neural ODE, respectively. The initialization loss, $\mathcal{L}_\text{init.}$, quantifies how well the explicit
initial condition prediction layer matches the actual initial conditions. The dynamic loss, $\mathcal{L}_\text{dyn.}$, quantifies how well the predicted output trajectories match the ground truth data. Both $\mathcal{L}_\text{init.}$ and $\mathcal{L}_\text{dyn.}$ depend on both sets of parameters, therefore all parameters are trained simultaneously according to the total loss. $\alpha$ is a tradeoff factor between the initialization and dynamic loss and is tuned as a hyperparameter of the training.
\subsection{Training Algorithm}
The key challenge in training the proposed surrogate is to maintain the convergence of both the DEQ and neural ODE layers throughout training. To the best of the authors' knowledge, this work is unique in combining a DEQ layer and neural ODE with shared parameters, hence there are unique training challenges. In \cite{kim_stiff_2021}, the authors note the importance of equation scaling to promote stability while training neural ODEs. For DEQs, it is desirable for the neural network to be constrained in order to promote stability \cite{bai_deep_nodate}. In this case, however, the output layer of the DEQ neural network must be unconstrained because it represents the derivative of the model states which should be allowed to take on all real values (\ref{eq:unconstrained}).
In order to address the convergence of the DEQ layer, the training algorithm (Algorithm 1) includes a pre-processing step to ensure that the starting random initialization of the neural networks does not lead to divergent behavior when the training begins. To achieve this, the neural networks are randomly initialized and the convergence of the DEQ layer is checked for each entry in the training set. This ensures that for the first training iteration the surrogate will converge and we can calculate a meaningful value for both $\mathcal{L}_\text{init.}$ and $\mathcal{L}_\text{dyn.}$. For the actual training portion, the loss is calculated stochastically for a single trajectory for each training iteration and the parameters are updated according to the first-order Adam algorithm \cite{kingma_adam_2017}. In order to prevent over fitting, the loss on a validation set is checked at regular intervals during training. The training ends when a maximum number of iterations is met. The hyper-parameters of the training process (Table \ref{tab:hyperparameters}) are tuned and selected based on the best performance on the validation dataset, and the final performance results are evaluated on an unseen test dataset.
\begin{algorithm}
\caption{Surrogate Training Procedure}\label{alg:cap}
\begin{algorithmic}
\Require $\mathcal{D}_{\text{train}} = (u_{(i,j)},y_{(i,j)})$, $k_{\text{max}}$
\While{DEQ does not converge for all of $\mathcal{D}_{\text{train}}$ }
\State Randomly initialize $p_1$, $p_2$
\EndWhile
\While{$k<k_{\text{max}}$}
\State Choose a perturbation at random to calculate loss.
\State update $p_1$, $p_2$ according to Adam.
\EndWhile
\end{algorithmic}
\end{algorithm}
\section{Results}
\label{section:casestudy}
\begin{figure}[t]
\centering
\includegraphics[width=0.485\textwidth]{figs/36bus.pdf}
\caption{The case study system. The right side shows the full-order model (unshaded) and the two surrogate models (shaded) which can each be connected to the remainder of the system. The performance criteria is based on how well the predicted current ($\hat{\boldsymbol{i}} = [\hat{i}_r, \hat{i}_i]^\intercal$) matches the ground-truth result ($\boldsymbol{i} = [i_r, i_i]^\intercal$).}
\label{fig:36bus}
\end{figure}
\subsection{Computational Set Up}
\label{subsection:computational}
All of the code for generating data, training the surrogates, and evaluating the performance is open source and written in the Julia programming language. Julia is chosen for this work for its unique blend of high performance and ease of use. \texttt{PowerSimulationsDynamics.jl}---a package for simulating the transient response of power systems with large penetrations of IBRs---is used to generate the train, validation, and test datasets \cite{lara2023powersimulationsdynamics}. The surrogate model shown in Fig. \ref{fig:surrogate} is built using the packages of the Julia Scientific Machine Learning ecosystem \cite{noauthor_sciml_nodate} so that the entire process of initializing and numerically integrating to solve for time domain trajectories is fully differentiable. After training, the composable nature of Julia along with the design of the surrogate make it possible to re-integrate trained data-driven models into \texttt{PowerSimulationsDynamics.jl} by defining a new device model. For the full details of the packages used and the experiments presented in this section, the reader is directed to the paper repository\footnote{https://github.com/m-bossart/PowerSystemNODEs}.
\subsection{Case Study}
\label{subsection:casestudy}
\begin{table}[t]
\centering
\caption{Summary of dynamic models.}
\begin{tabular}{l | l | c}
Component & Model & Dynamic States \\
\hline
\hline
Transmission lines & $\pi$-model & 6 \\
Machines & GENROE & 4 \\
Excitation System & Type II AVR & 4 \\
Turbine Governor & Type II & 1 \\
Inverter A & Grid-following \cite{kenyon_open-source_2021} & 16 \\
Inverter B & Grid-forming - Droop \cite{darco_virtual_2015} & 15 \\
\end{tabular}
\label{tab:dynamic_models}
\end{table}
In this section, the training and evaluation of the proposed surrogate are demonstrated on the synthetic 36-bus power system shown in Fig. \ref{fig:36bus}. The system is modeled in detail such that the inverter inner control loops and line dynamics are not neglected. The dynamic models are summarized in Table \ref{tab:dynamic_models} and the full detailed descriptions can be found in the \texttt{PowerSimulationsDynamics.jl}
documentation \cite{lara2023powersimulationsdynamics}. The 36-bus system as constructed contains 719 dynamic states in total, making it a medium-sized system with non-trivial computational burden to solve.
\begin{figure}[t]
\centering
\includegraphics[width=0.9\columnwidth]{figs/dataset.pdf}
\caption{The trajectories of the train dataset. The top row shows the model inputs (voltage) in gray, and the bottom row shows the model outputs (current) in black. The red traces correspond to the largest single load step (85\% step) in the train dataset.}
\label{fig:datasets}
\end{figure}
The system is simulated across a range of operating conditions and perturbations to generate the ground truth trajectories that make up the train, validation, and test datasets. For each trajectory, the operating point of the base system is changed by randomly scaling the set points between a fixed range for each generator and load that is part of the external system (i.e. the left side of Fig. \ref{fig:36bus}). The generator voltage set points are randomly sampled from a uniform distribution $[0.96, 1.04]$, the generator active power references are randomly sampled from $[0.0, 1.0]$, and the load active and reactive powers are scaled by a factor randomly sampled from $[0.5, 1.5]$ as in
\cite{xiao_feasibility_2022}. The perturbations for the base study consist of step load changes wherein the active and reactive power of a randomly selected load are both scaled by a factor sampled from $[0.0, 2.0]$. Each simulation is run for a total of 10 seconds with the perturbation applied at 1 second. The recorded states are the real and imaginary voltage and real and imaginary current at the point of common coupling between the portion of the system which will be modeled with the surrogate and the remainder of the system. For each trajectory, 100 data points are saved at a linear spacing of 0.1 seconds ($m=100$). The trajectories of the train dataset are shown in Fig. \ref{fig:datasets}.
The performance of the proposed surrogate is compared against a benchmark physics-based surrogate model. The physics-based surrogate is based on the common practice of aggregating multiple similar devices by representing the collective behavior with a single model. The portion of the system to be replaced with a surrogate contains two types of inverters and one type of load, therefore the physics-based surrogate is comprised of two aggregate inverter models and one aggregate load model located at a single bus (the dynamic equations of the aggregate models and the individual device models are the same). The initial parameters of the physics-based surrogate model are determined by a base-power weighted average of the same parameter for the individual devices. The base-power of the aggregate devices is the sum of the individual base powers. While this set of parameters is a reasonable starting point, there is no guarantee that this particular parameterization best captures the behavior of the true model across the test dataset. Therefore, in order to make a more fair comparison, the physics-based surrogate model is also trained using the Adam algorithm on the same training dataset. If all of the physics-based parameters are included in the training, the underlying model is easily perturbed to an unstable parameterization, therefore only a key subset of the parameters are learned. These include the proportion of load modeled as constant impedance/constant power/constant current, the proportional and integral gains for active and reactive power control in the grid-following inverter, and the active and reactive power droop coefficients of the grid-forming inverter. Both the ``untrained'' and ``trained'' physics-based surrogates are included as points of comparison in the following results.
Hyperparameter tuning is conducted using a basic random search algorithm in order to explore a range of options as summarized in Table \ref{tab:hyperparameters}. Most of the relevant hyperparameters are related to the size of the neural networks within the data-driven surrogate. The structure of the physics-based surrogate does not have any hyperparameters, however the initial step norm for the Adam algorithm is also included as a tunable hyperparameter. For the data-driven surrogate a total of 200 random hyperparameter combinations are trained and the top performing set of hyperparameters on the validation set are selected. Given that the physics-based model has only one hyperparameter, only 33 options are evaluated.
\begin{table}[t]
\centering
\setlength\tabcolsep{2pt}
\caption{Summary of tunable hyperparameters considered for data-driven and physics-based surrogates.}
\begin{tabular}{c |c| l |c| c | c}
& \multirow{2}{1.1cm}{Parameter} & \multirow{2}{1.2cm}{Description} & Lower & Upper & Chosen \\
& & & limit & limit & Value \\
\hline
\noalign{\vskip 2mm}
\hline
\multirow{8}{0.8cm}{data-driven param.}
& $n_{init}$ & number of hidden layers in $\text{NN}_1$ & 1 & 3 & 2\\
& $w_{init}$ & neurons in hidden layers of $\text{NN}_1$ & 3 & 23 & 17\\
& $n_{dyn}$ & number of hidden layers in $\text{NN}_2$ & 1 & 3 & 1\\
& $w_{dyn}$ & neurons in hidden layers of $\text{NN}_2$ & 6 & 39 & 16\\
& $x_{dim}$ & hidden states &2 & 15 & 14\\
& $\log_{10}(\eta)$ & log of ADAM learning rate &-3.0 & -1.0 & -1.52\\
& $\alpha$ & scaling of init. and dyn. loss & 0.1 & 0.9 & 0.76\\
\hline
\noalign{\vskip 2mm}
\hline
\multirow{2}{0.8cm}{physics param.}& \multirow{2}{*}{$\log_{10}(\eta)$} & \multirow{2}{*}{log of ADAM learning rate} & \multirow{2}{*}{-7.0} & \multirow{2}{*}{-1.0} & \multirow{2}{*}{-7.0}\\
& & & & & \\
\end{tabular}
\label{tab:hyperparameters}
\end{table}
\begin{figure}[t]
\centering
\includegraphics[width=0.48\textwidth]{figs/traces3.pdf}
\caption{A single sample trajectory from the test dataset. The MAEs corresponding to this trajectory are highlighted in black in Fig. \ref{fig:accuracy}.}
\label{fig:sample_trajectory}
\end{figure}
\begin{figure}[t]
\centering
\includegraphics[width=0.48\textwidth]{figs/box_plot_times.pdf}
\caption{Simulation time comparison for the system of Fig. \ref{fig:36bus} with the full order model and each of the surrogate models. The times are plotted on a log scale, and the systems with surrogate models are approximately four times faster on average.}
\label{fig:timing}
\end{figure}
\begin{figure}[t]
\centering
\includegraphics[width=0.48\textwidth]{figs/box_plot_node_error.pdf}
\caption{MAE for the data-driven and physics-based surrogates compared to the full order model. The error is plotted on a log scale, and each point represents the mean error for a single perturbation trajectory (90 data points total). The black dots correspond to the trajectory shown in Fig. \ref{fig:sample_trajectory}.}
\label{fig:accuracy}
\end{figure}
After the hyperparameters are chosen, the surrogates are finally evaluated on the test dataset, which consists of 90 trajectories generated by the same process used for the train and validation datasets. All of the subsequent results are contingent on the encoding of the initial network interface requirements in the surrogate design, which allows for running system level simulations with the data-driven surrogate included. Figure \ref{fig:sample_trajectory} compares a single sample trajectory from the test dataset. For this trajectory, the oscillations of the ground truth data are captured with both types of surrogates, however, the imaginary current error is significantly lower for the data-driven surrogate. The training process results in negligible improvements for the physics-based surrogate, indicating that the starting parameters capture the behavior well and that the structure of the model limits the ability to improve the performance across the entire dataset through training. This single trajectory is not representative of the performance overall; for more meaningful results, the surrogates are compared on the basis of simulation speed (Fig. \ref{fig:timing}) and error relative to the full order detailed model (Fig. \ref{fig:accuracy}) across the entire test dataset. The level of accuracy or error that is ``acceptable'' is specific to the downstream analysis enabled by the simulation. In this work, we demonstrate the accuracy of the surrogate compared to the physics-based alternative without considering a specific workflow; expanding the metrics and quantifying the quality of the model based on various use cases is left to future work.
Fig. \ref{fig:timing} shows the distribution of simulation times for the test dataset. The results are straightforward and expected---the simulation time is dramatically reduced for each of the surrogate models due to the significant reduction in total number of states. The exact speedup is dependent on the properties of the system model, including, importantly, the stiffness and the type of solver used. In this case study, the speed up is approximately a factor of four for the data-driven and physics-based surrogates.
%The difference in speedup between the two surrogates is likely due to the computation of the forward pass of the neural networks and could be improved through additional software optimization of the model implementation.
One of the benefits of the proposed approach, to learn only part of a larger system, is the scalability. For example, learning and integrating many relatively small sub-systems (e.g. individual distribution systems) into a single larger simulation offers the potential to scale to very large systems in a modular manner.
Fig. \ref{fig:accuracy} shows the mean absolute error (MAE) of real and imaginary current for each trajectory in the test dataset. The overall accuracy of the data-driven and physics-based surrogate is similar; the data-driven surrogate has slightly lower average error for real current and slightly higher average error for imaginary current. In contrast to the physics-based surrogate, which starts with almost optimal parameterization, the data-driven surrogate requires training to give a reasonable output, but is able to learn the behavior without imposing a model structure \textit{a priori}.
Table \ref{tab:timing} compares the full order model with the two surrogates on the basis of number of parameters, number of states, and simulation time for the test dataset. While the physics-based surrogate dramatically reduces the number of states and parameters, the data-driven surrogate has \textit{more parameters} than the original model. The expressiveness of ML models in general is related to the large number of trainable parameters \cite{shen_differentiable_2023}; in fact, neural networks of sufficient size are a class of universal function approximators \cite{hornik_approximation_1991}. In the context of modeling dynamic systems, the flexibility and expressiveness of the data-driven model comes largely from the parameters and the representation of non-linear relationships between states rather than a large number of dynamic states. This distinction is key for reducing simulation time because the number of states largely determines the simulation time, whereas the number of parameters has a minimal impact.
\begin{table}[t]
\centering
\caption{Comparison of model complexity in terms of number of states and number of parameters.}
\begin{tabular}{l c c c}
Model & States & Parameters & *Simulation time (s) \\
\noalign{\vskip 1mm}
\hline
\noalign{\vskip 2mm}
Full order model & 432 & \textasciitilde 600 & 5.86\\
Physics-based surrogate & 31 & 54 & 1.28 \\
Data-driven surrogate & 14 & 1322 & 1.23\\
\noalign{\vskip 2mm}
\multicolumn{4}{l}{*Average simulation time across the test dataset (90 trajectories).} \\
\end{tabular}
\label{tab:timing}
\end{table}
\begin{figure}[t]
\centering
\includegraphics[width=0.48\textwidth]{figs/box_plot_node_error_linetrip.pdf}
\caption{MAE for the out-of-sample test dataset. The perturbation for this dataset is tripping of half of the line connecting the surrogate with the remainder of the system.}
\label{fig:accuracy_linetrip}
\end{figure}
In the results presented thus far, the train, validation, and test datasets are derived from the same processes for randomly changing the system operating point and applying a random load step. In order to test the generalization of the surrogate models, the models are also evaluated on a second out-of-sample test dataset. In this dataset, the operating point selection remains unchanged and the system is perturbed by tripping one half of the connecting line between the surrogate and the rest of the system. The error results are shown in Fig. \ref{fig:accuracy_linetrip}. In this case, the data-driven surrogate outperforms the physics-based surrogate in terms of imaginary current error. This result suggests that data-driven surrogate models with a large number of parameters can potentially generalize across a larger number of use cases compared to physics-based surrogates, which often require frequent re-parameterization \cite{noauthor_model_2018, noauthor_value_2015}. More work is needed to fully evaluate how the surrogate generalizes to unseen perturbations.
It is important to note that the performance of physics-based and data-driven surrogates will be highly dependent on the underlying model, therefore one method will not always outperform the other. For example, for modeling many devices that are electrically close and very similar (e.g. individual wind turbines of a wind plant), physics-based aggregation is likely to provide sufficiently accurate results. For systems with a diversity of devices with varying control structures and parameters, such as are expected in the transition towards a carbon-free power system, the flexibility of data-driven approaches can be beneficial.
\section{Conclusion}
\label{section:conclusion}
In this paper we define a set of initial network interface requirements and propose a data-driven surrogate structure which satisfies the requirements by design---ensuring that the trained models can be re-integrated into system-level simulations. The surrogate methodology is evaluated on a medium-sized power system with 719 states, and achieves similar accuracy (mean average current error of $8.3\times10^{-3}$) and speedup (4 times) as a physics-based surrogate. However, unlike the physics-based alternative, the proposed surrogate does not rely on detailed knowledge of the underlying device models, which is unlikely to be available for some applications. One avenue of future work is to apply the proposed methodology to distribution system modeling with high levels of DERs where incomplete network knowledge is particularly relevant.
One of the downsides of data-driven methods as compared to physics-based approaches is the need for training, which can be a computationally expensive process. In this work, ground truth training data is generated through simulations of power system perturbations. An alternative approach is to define an exogenous perturbation and simulate the response of only the surrogate portion of the system. Such an approach can potentially improve the training efficiency; however, the exact form of the perturbing signal, such that the surrogate is accurate when exposed to real power system perturbations, is an open research question.
Another key area of future work is elucidating the exact requirements for how general a data-driven surrogate must be in order to replace physics-based models in certain applications. For example, in this work the data-driven surrogate is shown to perform well across different operating conditions and types of perturbations. However, the surrogate cannot capture changes due to internal changes to the surrogate structure or the parameters of the ground truth model. Establishing benchmark problems will be key to determining the aspects of realistic performance that are needed to make data-driven approaches a practical alternative in the future.
Finally, while this paper compares a purely data-driven and purely physics-based surrogate, future work should also consider hybrid models which can take advantage of the benefits of each method. The potential benefits of hybrid models include reduced data requirements for training, improved generalization, and improved interpretability \cite{shen_differentiable_2023}.
% Generated by IEEEtran.bst, version: 1.14 (2015/08/26)
\begin{thebibliography}{10}
\providecommand{\url}[1]{#1}
\csname url@samestyle\endcsname
\providecommand{\newblock}{\relax}
\providecommand{\bibinfo}[2]{#2}
\providecommand{\BIBentrySTDinterwordspacing}{\spaceskip=0pt\relax}
\providecommand{\BIBentryALTinterwordstretchfactor}{4}
\providecommand{\BIBentryALTinterwordspacing}{\spaceskip=\fontdimen2\font plus
\BIBentryALTinterwordstretchfactor\fontdimen3\font minus \fontdimen4\font\relax}
\providecommand{\BIBforeignlanguage}[2]{{%
\expandafter\ifx\csname l@#1\endcsname\relax
\typeout{** WARNING: IEEEtran.bst: No hyphenation pattern has been}%
\typeout{** loaded for the language `#1'. Using the pattern for}%
\typeout{** the default language instead.}%
\else
\language=\csname l@#1\endcsname
\fi
#2}}
\providecommand{\BIBdecl}{\relax}
\BIBdecl
\bibitem{markovic_stability_2018}
U.~Markovic, J.~Vorwerk, P.~Aristidou, and G.~Hug, ``\BIBforeignlanguage{en}{Stability {Analysis} of {Converter} {Control} {Modes} in {Low}-{Inertia} {Power} {Systems}},'' in \emph{\BIBforeignlanguage{en}{2018 {IEEE} {PES} {Innovative} {Smart} {Grid} {Technologies} {Conference} {Europe} ({ISGT}-{Europe})}}, Sarajevo, Bosnia and Herzegovina, Oct. 2018, pp. 1--6.
\bibitem{lara_revisiting_2023}
\BIBentryALTinterwordspacing
J.~D. Lara, R.~Henriquez-Auba, D.~Ramasubramanian, S.~Dhople, D.~S. Callaway, and S.~Sanders, ``Revisiting {Power} {Systems} {Time}-domain {Simulation} {Methods} and {Models},'' Jan. 2023, arXiv:2301.10043 [cs, eess]. [Online]. Available: \url{http://arxiv.org/abs/2301.10043}
\BIBentrySTDinterwordspacing
\bibitem{henriquez2020grid}
R.~Henriquez-Auba, J.~D. Lara, C.~Roberts, and D.~S. Callaway, ``Grid forming inverter small signal stability: Examining role of line and voltage dynamics,'' in \emph{IECON 2020 the 46th annual conference of the IEEE industrial electronics society}.\hskip 1em plus 0.5em minus 0.4em\relax IEEE, 2020, pp. 4063--4068.
\bibitem{brouillon_effect_2018}
J.-S. Brouillon, M.~Colombino, D.~Groß, and F.~Dörfler, ``The effect of transmission-line dynamics on a globally synchronizing controller for power inverters,'' in \emph{2018 {European} {Control} {Conference} ({ECC})}, Jun. 2018, pp. 2242--2247.
\bibitem{wang_instability_2018}
W.~Wang, G.~M. Huang, P.~Kansal, L.~E. Anderson, R.~J. O’Keefe, D.~Ramasubramanian, P.~Mitra, and E.~Farantatos, ``Instability of {PLL}-{Synchronized} {Converter}-{Based} {Generators} in {Low} {Short}-{Circuit} {Systems} and the {Limitations} of {Positive} {Sequence} {Modeling},'' in \emph{2018 {North} {American} {Power} {Symposium} ({NAPS})}, Sep. 2018, pp. 1--6.
\bibitem{badrzadeh_electromagnetic_nodate}
\BIBentryALTinterwordspacing
B.~Badrzadeh, ``Electromagnetic transient simulation models for large-scale system impact studies in power systems having a high penetration of inverter-based resources - {ESIG}.'' [Online]. Available: \url{https://www.esig.energy/electromagnetic-transient-simulation-models-for-large-scale-system-impact-studies-in-power-systems-having-a-high-penetration-of-inverter-based-resources/}
\BIBentrySTDinterwordspacing
\bibitem{noauthor_odessa_2021}
\BIBentryALTinterwordspacing
``Odessa {Disturbance} {Texas} {Events}: {May} 9, 2021 and {June} 26, 2021 {Joint} {NERC} and {Texas} {RE} {Staff} {Report},'' Tech. Rep., Sep. 2021. [Online]. Available: \url{https://www.nerc.com/pa/rrm/ea/Pages/May-June-2021-Odessa-Disturbance.aspx}
\BIBentrySTDinterwordspacing
\bibitem{kenyon_comparison_2023}
R.~W. Kenyon, B.~Wang, A.~Hoke, J.~Tan, and B.~M. Hodge, ``Comparison of {Electromagnetic} {Transient} and {Phasor} {Dynamic} {Simulations}: {Implications} for {Inverter} {Dominated} {Systems},'' in \emph{2023 {IEEE} {Power} \& {Energy} {Society} {Innovative} {Smart} {Grid} {Technologies} {Conference} ({ISGT})}, Jan. 2023, pp. 1--5.
\bibitem{hairer_solving_1996}
E.~Hairer and G.~Wanner, \emph{\BIBforeignlanguage{en}{Solving {Ordinary} {Differential} {Equations} {II}}}, ser. Springer {Series} in {Computational} {Mathematics}.\hskip 1em plus 0.5em minus 0.4em\relax Berlin, Heidelberg: Springer Berlin Heidelberg, 1996, vol.~14.
\bibitem{lara_revisiting_2023_tpwrs}
J.~D. Lara, R.~Henriquez-Auba, D.~Ramasubramanian, S.~Dhople, D.~Callaway, and S.~Sanders, ``Revisiting power systems time-domain simulation methods and models,'' \emph{IEEE Transactions on Power Systems}, pp. 1--16, 2023.
\bibitem{charles2023off}
D.~Charles, ``Off the grid.'' \emph{Science (New York, NY)}, vol. 381, no. 6662, pp. 1042--1045, 2023.
\bibitem{purba_reduced-order_2019}
V.~Purba, B.~B. Johnson, M.~Rodriguez, S.~Jafarpour, F.~Bullo, and S.~V. Dhople, ``Reduced-order {Aggregate} {Model} for {Parallel}-connected {Single}-phase {Inverters},'' \emph{IEEE Transactions on Energy Conversion}, vol.~34, no.~2, pp. 824--837, Jun. 2019.
\bibitem{purba_dynamic_2020}
V.~Purba, B.~B. Johnson, S.~Jafarpour, F.~Bullo, and S.~V. Dhople, ``Dynamic {Aggregation} of {Grid}-{Tied} {Three}-{Phase} {Inverters},'' \emph{IEEE Transactions on Power Systems}, vol.~35, no.~2, pp. 1520--1530, Mar. 2020.
\bibitem{ma_mathematical_2020}
Z.~Ma, Z.~Wang, Y.~Wang, R.~Diao, and D.~Shi, ``Mathematical {Representation} of {WECC} {Composite} {Load} {Model},'' \emph{Journal of Modern Power Systems and Clean Energy}, vol.~8, no.~5, pp. 1015--1023, Sep. 2020.
\bibitem{noauthor_model_2018}
\BIBentryALTinterwordspacing
``Model {User} {Guide} for {Generic} {Renewable} {Energy} {System} {Models},'' EPRI, Technical {Update}, Jul. 2018. [Online]. Available: \url{https://www.epri.com/research/products/3002014083}
\BIBentrySTDinterwordspacing
\bibitem{noauthor_value_2015}
``Value and {Limitations} of the {Positive} {Sequence} {Generic} {Models} of {Renewable} {Energy} {Systems},'' WECC Modeling and Validation Working Group, Tech. Rep., Dec. 2015.
\bibitem{anantharaman_accelerating_2021}
\BIBentryALTinterwordspacing
R.~Anantharaman, Y.~Ma, S.~Gowda, C.~Laughman, V.~Shah, A.~Edelman, and C.~Rackauckas, ``Accelerating {Simulation} of {Stiff} {Nonlinear} {Systems} using {Continuous}-{Time} {Echo} {State} {Networks},'' Mar. 2021, arXiv:2010.04004 [cs, math]. [Online]. Available: \url{http://arxiv.org/abs/2010.04004}
\BIBentrySTDinterwordspacing
\bibitem{ren_interpretable_2022}
C.~Ren, Y.~Xu, and R.~Zhang, ``An {Interpretable} {Deep} {Learning} {Method} for {Power} {System} {Transient} {Stability} {Assessment} via {Tree} {Regularization},'' \emph{IEEE Transactions on Power Systems}, vol.~37, no.~5, pp. 3359--3369, Sep. 2022.
\bibitem{sarajcev_power_2021}
P.~Sarajcev, A.~Kunac, G.~Petrovic, and M.~Despalatovic, ``\BIBforeignlanguage{en}{Power {System} {Transient} {Stability} {Assessment} {Using} {Stacked} {Autoencoder} and {Voting} {Ensemble}},'' \emph{\BIBforeignlanguage{en}{Energies}}, vol.~14, no.~11, p. 3148, Jan. 2021.
\bibitem{senyuk_power_2023}
\BIBentryALTinterwordspacing
M.~Senyuk, M.~Safaraliev, F.~Kamalov, and H.~Sulieman, ``\BIBforeignlanguage{en}{Power {System} {Transient} {Stability} {Assessment} {Based} on {Machine} {Learning} {Algorithms} and {Grid} {Topology}},'' \emph{\BIBforeignlanguage{en}{Mathematics}}, vol.~11, no.~3, p. 525, Jan. 2023. [Online]. Available: \url{https://www.mdpi.com/2227-7390/11/3/525}
\BIBentrySTDinterwordspacing
\bibitem{misyris_physics-informed_2020}
G.~S. Misyris, A.~Venzke, and S.~Chatzivasileiadis, ``Physics-{Informed} {Neural} {Networks} for {Power} {Systems},'' in \emph{2020 {IEEE} {Power} {Energy} {Society} {General} {Meeting} ({PESGM})}, Aug. 2020, pp. 1--5.
\bibitem{vorwerk_using_2022}
J.~Vorwerk, T.~Zufferey, P.~Aristidou, and G.~Hug, ``\BIBforeignlanguage{en}{Using {Quantile} {Forecasts} for {Dynamic} {Equivalents} of {Active} {Distribution} {Grids} under {Uncertainty}},'' in \emph{\BIBforeignlanguage{en}{11th {Bulk} {Power} {Systems} {Dynamics} and {Control} {Symposium} ({IREP} 2022)}}, Banff, Canada, Jul. 2022, p.~13.
\bibitem{azmy_identification_2004}
A.~Azmy and I.~Erlich, ``Identification of dynamic equivalents for distribution power networks using recurrent {ANNs},'' in \emph{{IEEE} {PES} {Power} {Systems} {Conference} and {Exposition}, 2004.}, Oct. 2004, pp. 348--353.
\bibitem{zhou_neuro-reachability_2022}
Y.~Zhou and P.~Zhang, ``Neuro-{Reachability} of {Networked} {Microgrids},'' \emph{IEEE Transactions on Power Systems}, vol.~37, no.~1, pp. 142--152, Jan. 2022.
\bibitem{xiao_feasibility_2022}
T.~Xiao, Y.~Chen, S.~Huang, T.~He, and H.~Guan, ``Feasibility {Study} of {Neural} {ODE} and {DAE} {Modules} for {Power} {System} {Dynamic} {Component} {Modeling},'' \emph{IEEE Transactions on Power Systems}, pp. 1--13, 2022, conference Name: IEEE Transactions on Power Systems.
\bibitem{chen_neural_nodate}
R.~T.~Q. Chen, Y.~Rubanova, J.~Bettencourt, and D.~Duvenaud, ``\BIBforeignlanguage{en}{Neural {Ordinary} {Differential} {Equations}},'' in \emph{\BIBforeignlanguage{en}{Advances in {Neural} {Information} {Processing} {Systems} 31 ({NeurIPS} 2018)}}.
\bibitem{bai_deep_nodate}
S.~Bai, J.~Z. Kolter, and V.~Koltun, ``Deep {Equilibrium} {Models},'' in \emph{Advances in {Neural} {Information} {Processing} {Systems} 32 ({NeurIPS} 2019)}.\hskip 1em plus 0.5em minus 0.4em\relax arXiv, arXiv:1909.01377 [cs, stat].
\bibitem{el_ghaoui_implicit_2021}
L.~El~Ghaoui, F.~Gu, B.~Travacca, A.~Askari, and A.~Tsai, ``Implicit {Deep} {Learning},'' \emph{SIAM Journal on Mathematics of Data Science}, vol.~3, no.~3, pp. 930--958, Jan. 2021.
\bibitem{milano_power_2010}
F.~Milano, \emph{Power {System} {Modelling} and {Scripting}}.\hskip 1em plus 0.5em minus 0.4em\relax Springer Berlin Heidelberg, 2010.
\bibitem{park_two-reaction_1929}
R.~H. Park, ``Two-reaction theory of synchronous machines generalized method of analysis-part {I},'' \emph{Transactions of the American Institute of Electrical Engineers}, vol.~48, no.~3, p. 716, 1929.
\bibitem{pal_mixing_2022}
\BIBentryALTinterwordspacing
A.~Pal, A.~Edelman, and C.~Rackauckas, ``Mixing {Implicit} and {Explicit} {Deep} {Learning} with {Skip} {DEQs} and {Infinite} {Time} {Neural} {ODEs} ({Continuous} {DEQs}),'' 2022. [Online]. Available: \url{http://arxiv.org/abs/2201.12240}
\BIBentrySTDinterwordspacing
\bibitem{kim_stiff_2021}
S.~Kim, W.~Ji, S.~Deng, Y.~Ma, and C.~Rackauckas, ``Stiff neural ordinary differential equations,'' \emph{Chaos: An Interdisciplinary Journal of Nonlinear Science}, vol.~31, no.~9, p. 093122, Sep. 2021.
\bibitem{kingma_adam_2017}
\BIBentryALTinterwordspacing
D.~P. Kingma and J.~Ba, ``Adam: {A} {Method} for {Stochastic} {Optimization},'' Jan. 2017, arXiv:1412.6980 [cs]. [Online]. Available: \url{http://arxiv.org/abs/1412.6980}
\BIBentrySTDinterwordspacing
\bibitem{lara2023powersimulationsdynamics}
J.~D. Lara, R.~Henriquez-Auba, M.~Bossart, D.~S. Callaway, and C.~Barrows, ``{PowerSimulationsDynamics.jl}--an open source modeling package for modern power systems with inverter-based resources,'' \emph{arXiv preprint arXiv:2308.02921}, 2023.
\bibitem{noauthor_sciml_nodate}
\BIBentryALTinterwordspacing
``\BIBforeignlanguage{en}{{SciML}: {Open} {Source} {Software} for {Scientific} {Machine} {Learning}}.'' [Online]. Available: \url{https://sciml.ai}
\BIBentrySTDinterwordspacing
\bibitem{kenyon_open-source_2021}
R.~W. Kenyon, A.~Sajadi, A.~Hoke, and B.-M. Hodge, ``Open-{Source} {PSCAD} {Grid}-{Following} and {Grid}-{Forming} {Inverters} and {A} {Benchmark} for {Zero}-{Inertia} {Power} {System} {Simulations},'' in \emph{2021 {IEEE} {Kansas} {Power} and {Energy} {Conference} ({KPEC})}, Apr. 2021, pp. 1--6.
\bibitem{darco_virtual_2015}
S.~D’Arco, J.~A. Suul, and O.~B. Fosso, ``\BIBforeignlanguage{en}{A {Virtual} {Synchronous} {Machine} implementation for distributed control of power converters in {SmartGrids}},'' \emph{\BIBforeignlanguage{en}{Electric Power Systems Research}}, vol. 122, pp. 180--197, May 2015.
\bibitem{shen_differentiable_2023}
{C. Shen, \textit{et. al}}, ``\BIBforeignlanguage{en}{Differentiable modelling to unify machine learning and physical models for geosciences},'' \emph{\BIBforeignlanguage{en}{Nature Reviews Earth \& Environment}}, vol.~4, no.~8, pp. 552--567, Aug. 2023.
\bibitem{hornik_approximation_1991}
K.~Hornik, ``\BIBforeignlanguage{en}{Approximation capabilities of multilayer feedforward networks},'' \emph{\BIBforeignlanguage{en}{Neural Networks}}, vol.~4, no.~2, pp. 251--257, Jan. 1991.
\end{thebibliography}