<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Adaptive Deep Neural Network Architecture for Data-Driven Model Based Identification of Non-Linear Dynamics of Microgrids</title></titleStmt>
			<publicationStmt>
				<publisher>IEEE</publisher>
				<date>06/18/2025</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10652652</idno>
					<idno type="doi">10.1109/ITEC63604.2025.11097975</idno>
					
					<author>Apoorva Nandakumar</author><author>Yuqi Jiang</author><author>Yan Li</author><author>Liang Du</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Not Available]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I. INTRODUCTION</head><p>Microgrids are essentially a network of interconnected distributed energy resources and loads within specific electrical boundaries, functioning as a unified controllable unit in relation to the grid <ref type="bibr">[1]</ref>. Microgrids often incorporate power electronics, renewable energy sources, and energy storage systems, which may have lower or negligible rotational inertia compared to traditional generators. Low inertia in microgrids can pose challenges related to frequency stability in response to sudden changes in power demands and power generations <ref type="bibr">[2]</ref>. The behavior of the system during these short-term disturbances or sudden changes, which typically occur within a few seconds or milliseconds, represents the transient dynamics of the microgrid. It is important to understand and design the control parameters to minimize transients of the system, as these can negatively affect the stability and reliability of the overall microgrid system <ref type="bibr">[3]</ref>. Some of the most commonly used data-driven nonlinear system identification techniques are listed below:</p><p>1. Regression models are to capture the relationships between input and output variables <ref type="bibr">[4]</ref>, <ref type="bibr">[5]</ref>. 2. Neural network models can be trained on historical data to learn and predict system dynamics. Deep learning is a powerful tool to capture complex nonlinear relationships in data <ref type="bibr">[6]</ref>. 3. Kernel methods, such as Support Vector Machines (SVMs) are used to map data into higher-dimensional spaces where linear models can capture nonlinear relationships <ref type="bibr">[7]</ref>. System identification techniques in microgrids play a crucial role in understanding and modeling the dynamic behavior of the components within the microgrid. The identification algorithms can be used to develop accurate models that can be used for control design, optimization, and overall system analysis <ref type="bibr">[8]</ref>, <ref type="bibr">[9]</ref>. The data from sensors within the microgrid can be utilized to perform system identification using statistical techniques, regression analysis, and other data-driven methods to establish relationships between inputs and outputs <ref type="bibr">[10]</ref>- <ref type="bibr">[14]</ref>.</p><p>The work in <ref type="bibr">[15]</ref> presents a data-driven low-order model identification methodology applied to voltage characterization in a photovoltaic system of a real campus microgrid for secondary voltage regulation. Data-driven online energy scheduling of a microgrid based on deep reinforcement learning is discussed in <ref type="bibr">[16]</ref>. A data-driven controller is designed in <ref type="bibr">[17]</ref> only based on input/output measurement data, but not the model, and the system stability can be guaranteed by the Lyapunov method. A multilayer feedforward neural network is configured and implemented using MATLAB's Deep Learning Toolbox in <ref type="bibr">[18]</ref> to obtain the appropriate input parameters of the PID controller to minimize the frequency fluctuations in microgrids.</p><p>Deep reinforcement learning can be used to develop control strategies for microgrid systems. Reinforcement learning algorithms can learn optimal control policies by interacting with the microgrid environment, adapting to changing conditions and uncertainties. Deep neural networks (DNNs) can be used to predict and control the frequency and stability of the microgrid <ref type="bibr">[19]</ref>. They can be employed to design controllers that respond dynamically to fluctuations in supply and demand <ref type="bibr">[20]</ref>. DNNs to dynamically identify the topology of the microgrid, especially in scenarios where the network configuration may change due to the connection or disconnection of dis-tributed energy resources (DERs) <ref type="bibr">[21]</ref>. DNNs can be applied to dynamic power flow computation in microgrids, which in turn can enhance accuracy, efficiency, and adaptability to changing conditions <ref type="bibr">[22]</ref>.</p><p>This paper focuses on developing an adaptive deep neural network architecture to identify the dynamic power flow operations in microgrids during a transient event. The novelties of the proposed method are stated below.</p><p>1. A deep neural network based data-driven model is employed to identify the dynamic power flow in a microgrid system during a transient event to predict and optimize the power flow pattern in the network based on historical data by minimizing losses.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">A method of offline training and online tuning is used</head><p>to help enhance the performance of the identified neural network model for developing a digital twin for the overall microgrid system. The remainder of the paper is organized as follows. Dynamic power flow theory and deep neural network theory are discussed in Section II. Numerical examples to validate the effectiveness of the proposed method are shown in Section III. Conclusions are drawn in Section IV.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>II. DESIGN OF DEEP NEURAL NETWORKS FOR DYNAMIC POWER FLOW</head><p>In microgrids, dynamic power flow analysis is essential for understanding the dynamic behavior of distributed energy resources (DERs), loads, and energy storage systems. It enables microgrid operators to optimize energy management and ensure reliable operation under varying conditions. An overall representation of the various data-driven/ physics based methods for dynamic power flow computation is shown in Fig. <ref type="figure">1</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Fig. 1. Dynamic power flow computation using multiple datadriven identification methods</head><p>The dynamic power flow in the system during a transient event can be solved by:</p><p>where, V k and &#920; k are the voltage magnitude and angle at bus k, G kn + jB kn represents the bus admittance matrix and P T OT and Q T OT are the net active and reactive powers in the network depending on the number of generators and loads connected to the system. In this work, we assume the availability of active and reactive powers in all the load and generator buses in the overall microgrid network. The active and reactive powers during a transient event are given as the input to the identification algorithm. The aim of the identification algorithm is to determine the voltages across all the buses in the network during this transient event. Depending on the availabile network information, the identification algorithm can be chosen.</p><p>1. When all the impedance information regarding the network and the load and generator interconnections are known, the dynamic voltages can be determined using the numerical power flow computation. 2. When the network impedances are unknown, but the load and generator interconnections are known, a regression model can be used based on the input and output data to determine the approximate impedances and this model can be used to predict the voltages for the subsequent power inputs. 3. When both the network impedances and the load and generator interconnections are unknown, a deep neural network model can be trained based on the input and output data to predict the voltages for the subsequent power inputs.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Adaptive Deep Neural Networks</head><p>The neural networks based system identification can automatically learn the relevant features from raw data and eliminates the need for manual feature engineering. It is particularly effective for modeling non-linear relationships within data and can be leveraged for the microgrid application considering the non-linear nature of the system during transient events. The robustness of the identified model to noisy data is especially useful since the data collected from sensors may be subject to noise and uncertainties.</p><p>A neural network model comprises layers of interconnected neurons, including input, hidden, and output layers. During training, the network learns intricate patterns by fine-tuning the weights and biases associated with each neuron. The introduction of activation functions adds non-linearity, enabling the network to capture complex relationships within the data. In a feed-forward configuration, data flows sequentially from the input layer to the output layer. Back-propagation, a crucial step in training, adjusts weights and biases by computing gradients of a loss function, which measures the disparity between predicted and actual outputs. An optimization algorithm iteratively updates these parameters to minimize the loss. Effective optimization entails tweaking hyperparameters such as learning rate, batch size, and the number of hidden layers to achieve optimal performance. The process to train a neural network is shown in Fig. <ref type="figure">2</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Fig. 2. Training a neural network</head><p>The hyper-parameters to tune the neural network model are shown in Table . I. The input and output size of the neural network depends on the number of buses in the system.</p><p>The formula for the hyperbolic tangent function is given by Eq. ( <ref type="formula">2</ref>), where x represents the weighted sum of the inputs to the neurons and the role of the activation function is to transform this value to produce the final output.</p><p>This function maps input values to a range between -1 and 1 and enables the network to learn complex non-linear relationships between the input and the output.</p><p>Adaptive Moment Estimation (Adam) is chosen as the optimization algorithm in this paper since it can adapt the learning rates of parameters individually. It requires less manual tuning of hyper-parameters compared to some other optimization methods. Mean squared error calculation is the typical loss function that is used in regression problems to predict continuous values, where y i is the actual ground truth value of the i th data point, &#375;i is the predicted value for the i th data point and N represents the total number of data points.</p><p>Table I: Parameters for the neural network Hyper-parameter Typical Value Input size No. of load/ generator buses Number of hidden layers K 1 layers with L 1 neurons each Output size No. of buses in the network Activation function Hyperbolic tangent Loss Function Mean Square Error Optimization Algorithm Adaptive Moment Estimation</p><p>The neural network consists of 3 layers with 20 neurons on each of the hidden layers. Multiple tests were conducted with different learning rate, number of neurons and number of layers. A good performance with reasonable computational efficiency was found based on an empirical experience to optimize the parameters.</p><p>The scope of potential dynamic operations within a microgrid is vast. The combination of changes in loads, variability in the DER generations, controller dynamics, switching operations, faults etc., all contribute to new and varied transient dynamics in microgrids. Thus, continual adjustment of model weights to accommodate diverse transient events is needed. Incremental learning facilitates the updating of a neural network model with new data without completely retraining it. This offline training and online tuning based method enables the model to adapt to evolving transient events and enhances the overall performance.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>III. NUMERICAL EXAMPLES</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Introducing microgrid test system</head><p>A 10-bus microgrid system shown in Fig. <ref type="figure">3</ref> is developed to obtain the power and voltage measurement data that is used to train the neural network model. Circuit breaker 1 is open and the test system operates in the islanded mode. The system consists of 5 DERs and 7 loads. The transient dynamics in the microgrid are simulated by the application of the input disturbances arising from fluctuations in power generation of the DERs and dynamic variations in load demand. Fig. <ref type="figure">3</ref>. A microgrid test system</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Data preparation for the neural network model</head><p>The input disturbances are varied constantly to generate the large dataset that is sufficiently sampled to help develop a machine learning model that is capable of adapting to different conditions. The system is simulated with a time step of 0.001 s for a time period of 8 s and the trajectory consists of 1000 data points. This is repeated 50 times with varying input disturbances and initial operating points to generate multiple trajectories. The data from all the trajectories are combined together to create a large subspace of operating scenarios for determining the power flow in microgrids during a transient event. All the information required for identifying the voltages during a transient event are observable and measurable. It is not dependent on the internal controller states in the system which may or may not be observable/ measurable.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C. Identification and validation of the neural network model</head><p>The initial learning rate of the model is set to 0.001. 10000 epochs were used for training and tuning the weights and biases in the model. The collected training, validation and testing dataset are normalized with z-score standardization method. Fig. <ref type="figure">4</ref> shows the training output corresponding to the voltage magnitude caused by the dynamic power flow in the microgrid system corresponding to the changing active and reactive powers. The power flow results from each time steps are concatenated together to describe the time domain trajectory of the voltage variations during a transient event. Fig. 5. Training plot zoomed in for 0.1 s A zoomed in results figure of the voltage training is shown in Fig. 5 to elucidate the effectiveness of the training model. It can be observed that the identified system closely follows the trajectory of the ground truth.</p><p>The training, validation and testing ratio used in this work is 90:5:5. The validation and testing dataset consists of new points developed with input disturbances that have not been used for training. This is used to validate the model weights and biases for unknown inputs. This split maximizes the amount of data available for the model to learn from, while still maintaining a small but sufficient portion for validation and testing. The 90:5:5 split is more useful in a moderately sized dataset where the training set needs to be large enough for the model to learn effectively. The result of the validation comparison of the voltage magnitude data is shown in Fig. <ref type="figure">6</ref>. Satisfactory performance of the validation data can be observed upon comparison with ground truth testing data with and without noise. D. Error analysis The performance of the training and validation models have been evaluated based on mean squared error (MSE) calculation. MSE measures the average of the squared differences between predicted and true values. It gives equal weight to all errors, and a lower MSE indicates a better model performance. The plot comparing the training and validation losses for the dataset is shown in Fig. 7. The accuracy of the identified model was found to be around 93%. The epoch with the best weights and biases had a minimum error of 2.7% for the training and 7.9% for the validation. LSTM is used for the baseline, where the errors for training and validating are 4.6% and 8.5% respectively, verifying efficiency of the utilized framework.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E. Incremental Learning</head><p>Incremental learning involves updating a model with new data without the need for retraining it from scratch. This process occurs in two stages -offline training and online tuning. The model undergoes training and validation using the initial dataset, and subsequently, the weights and biases are saved. Additional input data is collected from measurement devices and integrated into the initial training dataset. The pre-established weights are then adjusted in accordance with this augmented training dataset. The initial training of model takes around 4 hours and 12 minutes. The training accuracy of the model for the newly appended dataset (2000 additional data points corresponding to 2 s worth of simulated data) with incremental learning was found to be aroung 95% and the time required for tuning was found to 13 minutes.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>IV. CONCLUSIONS</head><p>This paper focuses on developing an adaptive neural network based data driven model for identifying the bus voltages during a transient event. Utilizing pre-trained weights and performing incremental learning offers an optimal approach to learning the extensive range of potential microgrid operational scenarios corresponding to various transient events with reduced computational resources and nearly identical accuracy. Numerical results have been discussed in detail to explain the effectiveness of the proposed identification method. Future work involves inclusion of more complex microgrid configurations to enhance the methodology generalization.</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_0"><p>Authorized licensed use limited to: Penn State University. Downloaded on October 30,2025 at 02:58:13 UTC from IEEE Xplore. Restrictions apply.</p></note>
		</body>
		</text>
</TEI>
