Deep Neural Network-Based Stability Region Estimation for Grid-Converter Interaction Systems

The large-scale integration of renewables in the modern power system will lead to a large number of power electronics in the power system and pose interaction stability challenges. Impedance-based stability analysis methods have been widely adopted for the stability evaluation of interconnected power converter systems. However, they are small signal stability analysis tools that can only effectively estimate stability near a certain operating point; they are not effective for grid-converter interaction systems due to the wide variation of operating points caused by the fast and large fluctuations of renewable energy and load. To address this challenge, this article proposes a double deep neural network (DNN)-based black-box modeling and stability region estimation approach for grid-converter interaction systems. First, a DNN-based multioperating point (MOP) impedance model is proposed to build the impedance model covering multiple operating points. Next, a DNN-based stability evaluation model is developed based on the MOP impedance model and the physical nature of the whole system for the estimation of the stability region. The proposed double DNN-based method can achieve fast and accurate online estimation of the stability region for grid-converter system under large variations of renewable energy. Numerous experiments are conducted to demonstrate the effectiveness of the proposed method to achieve accurate identification of the MOP impedance model and to generate an accurate stability region of the system.


Deep Neural Network-Based Stability Region
Estimation for Grid-Converter Interaction Systems Mengfan Zhang , Member, IEEE, and Qianwen Xu , Member, IEEE Abstract-The large-scale integration of renewables in the modern power system will lead to a large number of power electronics in the power system and pose interaction stability challenges.Impedance-based stability analysis methods have been widely adopted for the stability evaluation of interconnected power converter systems.However, they are small signal stability analysis tools that can only effectively estimate stability near a certain operating point; they are not effective for grid-converter interaction systems due to the wide variation of operating points caused by the fast and large fluctuations of renewable energy and load.To address this challenge, this article proposes a double deep neural network (DNN)-based blackbox modeling and stability region estimation approach for grid-converter interaction systems.First, a DNN-based multioperating point (MOP) impedance model is proposed to build the impedance model covering multiple operating points.Next, a DNN-based stability evaluation model is developed based on the MOP impedance model and the physical nature of the whole system for the estimation of the stability region.The proposed double DNN-based method can achieve fast and accurate online estimation of the stability region for grid-converter system under large variations of renewable energy.Numerous experiments are conducted to demonstrate the effectiveness of the proposed method to achieve accurate identification of the MOP impedance model and to generate an accurate stability region of the system.Index Terms-Deep neural network (DNN), grid-converter interaction, power electronics dominated power systems, renewables, stability.

I. INTRODUCTION
I N RECENT years, with increasing renewable energy (solar photovoltaic, wind, etc.) integrated into the grid, the traditional power system has become more sustainable [1].As power electronic converters are the interfaces for renewable energy to be integrated into the grid, traditional power systems are becoming power-electronics-based power systems.However, the interaction between the grid and the internal control systems of power converters brings instability issues of the grid-converter system [2], [3].
The impedance-based methods are widely used to analyze the grid-converter interaction stability [4], [5], [6].Normally, the grid-converter system is divided into two subsystems at the point of common coupling (PCC), and impedance models are developed in a parallel admittance matrix format for stability analysis [7].However, in practical applications, many vendors are unwilling to share details of their products, making it difficult to get the full information of the converters required in impedance modeling.To overcome this challenge, the impedance measurement technique is developed to directly get the impedance model by frequency scanning measurement without the prior information of inner control systems, which enables a "black-box" modeling and stability estimation of the grid-converter interaction system.However, the existing impedance measurement-based stability analysis methods are conducted only in the fixed operating scenario, but in real-world situations there are continuous variations and fluctuations due to renewables, load changes, and commands from system operators in the system, which cause wide variations of operating points.Meanwhile, the model of the converters has high-order nonlinearities, that make the identified impedance models change continuously, making it challenging to estimate with existing impedance measurement methods.Therefore, it is significantly important to develop a multioperating-point (MOP) converter modeling and stability region estimation method.
To identify converter impedance at wide operating points, there are a few methods proposed in the previous literature.A polytopic modeling method for power-electronics converters is reported in [8], where the small-signal models at different operating points are summarized with respective weights to generate an MOP model.Yet this method can just predict the impedance of the converters at limited operating points and the accuracy is hard to be guaranteed.Deep neural network (DNN)based methods are proposed to identify the impedance model of the voltage source converter (VSC) at different operating points [9], [10], [11], [12].The authors in [13] and [14] use the DNN to achieve the MOP model of the MMC, then use the model for the stability analysis.Meanwhile, the physical informed neural network technique was developed in [15] to reduce the training data amount requirement in real applications.The generated DNN-based impedance model accurately predicts the impedance at a wide range of operating points, which could be used for pointwise stability analysis with the Nyquist stability criterion.However, the efficiency of this pointwise stability analysis is not promised considering the uncertain and intermittent operation of renewables, as the stability evaluation should be reperformed when the operating point changes.Moreover, it is hard to predict the stability margins in just a few estimations when the operating point has multiple dimensions [15].Liu et al. [16] proposes a stability region analysis method for the grid-tied voltage sourced converters, but it is still limited to a known structure and parameters, which cannot be extended to identify VSC with unknown control structures.Thus, existing methods cannot achieve fast stability region estimation for gridconverter interaction systems under a wide variation of operating points.
To fill the research gaps, this article proposes a double-DNNbased method to achieve fast online stability region estimation under the wide variation of operating points.First, a DNN-based MOP-impedance model is established by frequency scanning at various scenarios with different operating points.Second, a DNN-based stability evaluation model is developed for the estimation of the whole stability region.The proposed double DNN-based stability region estimation method achieves fast and accurate online estimation of the stability region for gridconverter interaction under a wide variation of operating points to guarantee the stable operation of the system under large variations of renewable energy.It can also be combined with optimization/scheduling methods to achieve stability guaranteed optimal operation of the system.
The rest of this article is organized as follows.Section II introduces the proposed approach.Sections III and IV give the practical implementation of the proposed method in impedance model generation and stability evaluation model generation, respectively.The experimental test results are provided in Section V, which validates the effectiveness of the proposed method.Finally, Section VI concludes this article.

A. System Description
Fig. 1 shows a typical topology of the grid-converter interaction system with integrated renewables.The input of the voltage source converter (VSC) is connected to the renewables, while the output is connected to the power grid through the filter L f and its parasitic resistance RLf at the PCC.The equivalent model of the grid side is an ideal voltage source with an equivalent grid inductor denoted as L g .In such a system, inductors in the filters of the VSC and power cables interact with the inner control loops of the VSC, resulting in oscillations and instability.On the other hand, the uncertainties of the renewables and loads also bring the variation of the operating points of the VSC, which affect the stability analysis of the interaction system.Therefore, it is significantly important to develop an MOP-impedance model to study the interaction between VSC and grid and analyze its stability.

B. Proposed Method
Fig. 2 shows the proposed double DNN-based stability analysis method for grid-converter interaction systems, where the first DNN performs a regression task of multioperating-point impedance modeling, while the second DNN performs a classification task of system stability evaluation.The proposed method consists of two steps.
The first step is to develop the DNN-based MOP-impedance model.The impedance model of VSC varies with the operating point.To deal with operating point variations, the operating point scanning measurement is carried out with various operating Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
points.op denotes the operating point set, where the elements inside (e.g., op1, op2, etc.) represent operating vectors dq-frame (i.e., i d , i q , v d , v q ).And then the frequency scanning impedance measurement is implemented to get the impedance spectrum in the full frequency domain.By feeding the data measured from the above procedure (i.e., operating point, frequency, and impedance), a DNN-based MOP-impedance model is established, which is marked as DNNi.
The second step is to develop the DNN-based stability evaluation model.Based on the MOP impedance model DNNi developed in the first step, as well as the grid impedance model and generalized Nyquist criterion (GNC), the stability data can be generated.Then the DNN-based stability evaluation model can be constructed to show the stability state of the grid-inverter interaction system at variable operating points, which is marked as DNNd.
Finally, the stability region can be generated based on the stability evaluation model in the second step by inputting the concerned operating point range into the DNNd model.
The proposed DNN-based MOP-impedance model, by frequency scanning measurement without the prior information of inner control systems, can get the high-order nonlinear model under the wide operating range, which enables a "black-box" modeling for a wind operating condition; and together with the proposed DNN-based stability estimation model, the proposed double DNN-based stability analysis method can achieve fast online stability region estimation and stability estimation of the grid-converter interaction system under wide variation of operating points to fill the current research gap.
Detailed implementation of the proposed double-DNN approach will be explained in the next two sections.

III. DNN-BASED POWER ELECTRONICS CONVERTER MODELING
To capture the multioperating-point impedance model of converters under variation of operating points, a DNN-based MOP-impedance model is developed, as shown in the first step in Fig. 2. It consists of MOP-impedance measurement and MOP-impedance model training.

A. MOP-Impedance Measurement
The MOP-impedance data is acquired by frequency scanning at different operating points.The detailed workflow is shown in Fig. 3.
Before the measurement, the operating point and frequency f are initialized.Then, the magnitude of perturbation signals needs to be appropriately designed.If the magnitude of the perturbation signal is not small enough, the operating point of the VSC will be changed.Meanwhile, if it is not sufficiently large, the noise disturbances will affect the measurement [17].According to [18] and [19], the current perturbation is set to 5% of the operating point in this article.Next, the current excitation signal is injected into the VSC system with the current-controlled power source and measure the voltage and current (v abc , i abc ) of the VSC at the PCC as shown in Fig. 4. Two independent perturbation signals are injected to gather enough information to solve the  impedance matrix.Park's transformation is adopted to transform the measured abc-frame signal into the dq-frame.The frequency domain voltage and current signal at the injected frequency are extracted with the fast Fourier transform (FFT) algorithm.With the processed voltage and current data, the admittance of the VSC is calculated as follows [20]: where the Z dq is the dq-frame VSC impedance.After the procedure, the impedance of the VSC at one operating point is generated.By repeating this procedure and changing the frequency of the perturbation and operating point of the VSC, the impedance dataset for training is established.Thus, the structure of the MOP-impedance model is established, where the operating point of the VSC in dq-frame, i.e., (v d , v q , i d , i q ) and frequency f p are selected as the input of the model to reveal the operating-point-dependent and frequency-dependent feature.The calculated dq-frame impedance is selected as the output of the model.

B. MOP-Impedance Model Training
To achieve fast mapping of the highly nonlinear impedance model from measurement, a DNN-based MOP-impedance model is developed, denoted as DNNi, which performs a regression task of multioperating-point impedance modeling.First, the DNN model is designed based on the physical nature of the impedance.As the MOP-impedance is defined as a four-input eight-output highly nonlinear model, the architecture adopted in Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.this article is a feed-forward neural network to represent a highly nonlinear function that maps the operating point of the VSC to its impedance model, where five neurons in the input layer and eight neurons in the output layer [21].The designed DNN shown in Fig. 5 DNNd is a four-layer structure with 4-64-64-8 neurons, which contains one input layer, one output layer, and two hidden layers.The type of activation function in hidden neurons is selected as sigmoid function, while the output neurons are linear.Thus, the output of neurons in hidden layers and the output layer are represented as follows: where w and b represent the weight and bias, respectively, x is the output of neurons in the upper layer.Random initialization is suitable for impedance identification due to its high nonlinearity [22], [23].The back-propagation algorithm is used to train the DNN model with the typical mean squared error (MSE) loss function [24], [25], which can be expressed as follows: where y i is the observed value of the output of the DNN and ŷi is the actual value of the output.The MSE is chosen in this article due to its continuity, easy interpretation, and being less sensitive to outliers than other loss functions like mean absolute error (MAE) loss, which can make the NN training more robust.
For the optimizers in the neural network training, the adaptive moment estimation (Adam) method is adopted in this article [26], [27].During the training process, a DNN is used to learn the mapping function of the relationship of impedance with the operating point without making assumptions.It can automatically learn the complicated relationship to the impedance from the operating points, given sufficient training samples.This process needs to be executed several times and the impedance model is then generated.After the training, the generated MOPimpedance model can be used for stability analysis of the gridconverter interactions.

IV. DNN-BASED STABILITY EVALUATION MODEL
Based on the developed MOP-impedance model in Section III, a DNN-based stability evaluation model is proposed to achieve fast and accurate stability estimation of the gridconnected VSC system under changing operating points, as shown in the second step in Fig. 2. It consists of stability condition data generation and stability evaluation model generation.

A. Stability Condition Data Generation
To effectively generate the stability condition data with the trained MOP impedance model, a GNC-based method is adopted [28].The grid-connected VSC system shown in Fig. 2 is modeled as two subsystems connected at PCC.According to Thevenin's theorem, each subsystem is represented as the impedance in series with the voltage source, which is shown in Fig. 6, where Z inv is the equivalent impedance of the VSC, which is developed in Section III, while Z g is the equivalent grid impedance.The impedance ratio is calculated as follows: The stability of the grid-converter system is predicted by the eigenlocus, which are the locus of the eigenvalues of the impedance ratio parameterized as a function of frequency and is derived as If the impedance ratio Le(s) has P unstable poles, then the grid-connected VSC system is stable if and only if the eigenlocus of the impedance ratio, taken together, encircles the critical point (−1, j0) P times [29].
Substituting the trained impedance model DNNi into the above criterion, the stability condition at each operating point can be identified and the stability condition data are generated.The stability condition data consist of a feature space of operating points X and the corresponding class label y (stable or unstable), which are represented as (x 1 , y 1 ),..., (x n , y n ), where x contains four elements of the operating points (v d , v q , i d , i q ).

B. DNN-Based Stability Evaluation Model Training
The DNNd performs a classification task of system stability evaluation, which is a feed-forward neural network and serves as the multilayer perceptron.As shown in Fig. 7, the structure of DNN-based stability evaluation model DNNd is a four-layer structure with 3-64-64-1 neurons, which contains one input layer, one output layer, and two hidden layers.The input of the model is the operating point, while the output is the stability probability.The activation function in hidden layers is sigmoid, while the softmax function is embedded in the output layer to generate the probability of stability [24].As the output of the DNN is the probability of the stable state, when the probability of the stability state of the DNN output is bigger than 0.5, the system is stable.
The back-propagation algorithm with the logarithmic loss function is used to train the DNN model [30].The cross-entropy loss function is used to evaluate the performance of the classification task, which is given by where t k denotes the label of the stable state in each reference sample, t k is equal to 1 when the system is stable, while P k denotes the probability of t k .It is noticed that the cross-entropy loss function measures the difference between the predicted class probabilities and the true class labels by calculating the logarithmic loss of the predicted probabilities for the true class labels.The cross-entropy loss function can penalize the model more when it makes a wrong prediction with high confidence, and less when it makes a wrong prediction with low confidence.
Thus, it can converge faster than the MSE in the classification task.Adam is selected as the optimizer in the DNNd training.
After the training process, the DNN-based stability evaluation model that can be used for stability analysis of the grid-converter interaction is generated.

V. CASE STUDY AND VALIDATION
To verify the proposed method, it is applied to a typical grid-converter interaction system shown in Fig. 8.The VSC is controlled with the proportional-integral (PI) current controller and the phase-locked loop (PLL).The PLL is used to synchronize the phase of the VSC to the grid voltage at PCC.The active power reference P ref and reactive power reference Q ref are varied with the renewables and loads, which are used to generate the current reference i dref and i qref .The current of the VSC is controlled by the PI controller.The detailed parameters of the VSC are shown in Table I.

TABLE I VSC PARAMETERS
The active power reference P ref and reactive power reference Q ref are varied with the renewables and loads.The variation of grid voltage magnitude is also taken into consideration.In this article, the voltage and current on the dq-axis are selected as the operating point, the relationship between these elements is shown as follows: Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

TABLE II TRAINING DATASET PARAMETERS
As shown in (9), the system operating point is dependent on the voltage and current.Due to the PLL effect, the voltage of the VSC in q-axis is aligned to the voltage reference at PCC, i.e., q = 0. Thus, the system operating point can be represented as the vector (v d , i d , i q ).Following the proposed DNN-based stability region estimation method, first, the MOP-impedance model is established with the operating-point-scanning impedance measurement technique and DNN training technique; then the established impedance model is used for the DNN-based stability evaluation model generation; finally, the stability region of the grid-connected VSC system is generated with the stability evaluation model.For DNNi, the inputs of the dataset are the frequency f p and the operating points I d , I q , V d , and the outputs are the impedance of the VSC.For DNNd, the inputs of the dataset are operating point I d , I q , V d , the outputs are the stability of the grid-converter interaction system shown in Fig. 8.The dataset structure of DNNi and DNNd are shown in Figs. 9 and 10, separately.

A. MOP-Impedance Model
The current perturbation is injected into the grid-connected VSC and after the calculation, the dataset is established.The inputs of the dataset are the frequency and operating point, where frequency f p and the operating points I d , I q , and V d are swept with the different ranges and intervals separately, as shown in Table II The accuracy of the MOP-impedance model is evaluated by the index R 2 , which is given as follows: where X i denotes the operating point and frequency, y i denotes the reference impedance data corresponding to the X i in the verification dataset,y denotes the average value, and f i denotes the trained DNN model.For the DNNi training in this article, the index R 2 is 0.99.To validate the accuracy of trained MOP-impedance mode outside the training data range.The corresponding errors of the trained MOP-impedance model and testing data, where the resolution is (0.1 A, 0.1 Hz), are shown in Fig. 14.From the errors diagram, the biggest error is lower than 0.1 • , which can validate the accuracy of the trained model, and demonstrate the effectiveness of the method outside the training data.
To demonstrate the superiority of the proposed method against the existing method, we conducted the linear interpolation-based method to identify the impedance model.The corresponding errors of the linear interpolation-based method and the testing data have been visualized in Fig. 15.The resolution of testing impedance dataset is (0.1 A, 0.1 Hz), while the resolution of the training/interpolating dataset is (1 A, 1 Hz).From the comparison of the error diagram of Figs. 14 and 15, the error of the linear interpolation-based method is much larger than the proposed method (e.g., 10 times in Z qd and Z qq ).

B. DNN-Based Stability Evaluation Model
The grid impedance can be modeled as a second-order matrix in dq-frame, which is written as follows: where f is the sweeping frequency.It should be mentioned that the grid impedance can be nonlinear and time-varying, Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

TABLE III CONFUSION MATRIX OF THE STABILITY ESTIMATION MODEL
the proposed method is also effective for these cases (the only difference is that the grid impedance needs to be measured following [31]).Thus, the impedance ratio at one operating point is shown as follows: where Z inv (j2πf ) is the impedance at the frequency f that is obtained with the MOP-impedance model generated above.Then we calculate the eigenlocus of the system with the sweeping frequency in the following: The stability state of the converter-grid interaction system at the specific operating point is predicted by analyzing the eigenlocus, which is shown in Fig. 16.By sweeping the operating point of the MOP-impedance model, the stability state at the global operating points is obtained.Then the stability state dataset is achieved.The inputs of the dataset are the operating point, while the outputs are the stability state of the grid-connected VSC system.
Then the dataset is fed into the neural network and after the training, the stability evaluation model DNNd is obtained.The training process of DNNd is shown in Fig. 17.

C. Experiment Validation
To verify the effectiveness of the stability evaluation model, the experimental tests are carried out for the system shown in Fig. 8.The experiment setup is shown in Fig. 18.The Danfoss converter is controlled with the current control loop and phase lock loop, where the dSPACE DS1007 is used to control the VSC, and the parameters are the same as shown in Table I.The Chroma 61845 is used as the grid simulator.
The stability region can be estimated using the generated DNN-based stability evaluation model.Fig. 19 shows the stability region of the grid-converter interaction system estimated by the DNN model.The blue region is the stability region, while the yellow region denotes the unstable scenarios.
To verify the accuracy of the stability region estimation model, massive experiments with 400 operating points are conducted, where these points are simple random samples within the operating range, following the uniform distribution.The confusion matrix of the model is shown in Table III, where P represents the actual stability results in the data and N represents the predicted stability results in the data.The accuracy of the model is 98.25%, which can validate the accuracy of the proposed method.During the experiment test, the short circuit ratio (SCR) of the system ranges from 2.2 to 6.8, which covers both the strong grid and weak grid scenarios.

TABLE IV STABILITY PREDICTION AT DIFFERENT OPERATING POINT
To clearly demonstrate the stability boundary, we can obtain two cutting planes within the stability region by letting V d = 311 V and I q = 0.The cutting planes are shown in Fig. 20, where the stability boundaries can be visualized.
To check the stability estimation of the grid-converter system, we have conducted several experiments around the boundaries, which are marked in the 2-D diagram of the stability region of the grid-converter system in Fig. 20.And the corresponding experiment results are shown in Fig. 21 to show the stable/unstable experimental phenomena under selected stable/unstable operating points based on DNNd prediction, which are shown in Table IV, where the V ga represents the grid voltage and I a , I b , and I c are the output current of VSC.From the figures, the prediction results match the experimental results, which show the effectiveness of the proposed approach for stability estimation of the grid-converter system.

VI. CONCLUSION
This article had proposed a double DNN-based black-box modeling and stability region estimation method for convertergrid interaction systems under the wide changing operating points, consisting of a DNN-based MOP-impedance model and a DNN-based stability evaluation model.The proposed method enabled fast and accurate online stability region estimation of grid-converter interaction system, thus could guarantee the system's stable operation under large variations in renewables and loads.The experiment was conducted to demonstrate the effectiveness of the proposed method in achieving accurate identification of MOP impedance model, and accurate estimation of the stability region of the system.The accuracy of the obtained stability region was 98.25% based on massive experiments with 400 operating points.Moreover, experimental results of different operating points near the stability boundary were presented in detail to further illustrate the accuracy of the predicted stability region by the proposed method.

Fig. 2 .
Fig. 2. Proposed double DNN-based stability region estimation method for grid-converter interaction system.

Fig. 6 .
Fig.6.Equivalent circuit of the grid converter interaction system for impedance-based stability analysis.

Fig. 11 .Fig. 12 .
Fig. 11.Measured impedance dataset of VSC.(a) Magnitude and phase angle of Z dd .(b) Magnitude and phase angle of Z dq .(c) Magnitude and phase angle of Z qd .(d) Magnitude and phase angle of Z qq .

Fig. 13 .
Fig. 13.Generated MOP-impedance model of VSC.(a) Magnitude and phase angle of Z dd .(b) Magnitude and phase angle of Z dq .(c) Magnitude and phase angle of Z qd .(d) Magnitude and phase angle of Z qq .

Fig. 15 .Fig. 16 .
Fig. 15.Corresponding errors of the linear interpolation model and testing data.(a) Magnitude and phase angle of Z dd .(b) Magnitude and phase angle of Z dq .(c) Magnitude and phase angle of Z qd .(d) Magnitude and phase angle of Z qq .
, the outputs are the impedance of the VSC.Here, the 2000 operating points data are used for the training.To make the results easily visible, only the variation of I d is drawn in this article.The obtained dataset is shown in Fig. 11.Then the training dataset is fed into the DNNi as shown in Fig. 5.The training process of DNNi is shown in Fig. 12.After the training, the MOP-impedance model DNNi is visualized as shown in Fig. 13.

Fig. 21 .
Fig. 21.Experimental results of the grid-converter interaction system at different operating points.(a) Case I: Operating point a.(b) Case II: Operating point b.(c) Case III: Operating point c.(d) Case IV: Operating point d.(e) Case V: Operating point e. (f) Case VI: Operating point f.(g) Case VII: Operating point g.(h) Case VIII: Operating point h.