Generative Adversarial Networks for Real-time Stability of Inverter-based Systems
In islanded systems with droop-controlled sources, the droop coefficients need to be tuned in real-time using supervisory control to maintain asymptotic stability. In contrast to offline tuning methods, online domain-of-stability estimation yields no…
Authors: Xilei Cao, Gurupraanesh Raman, Gururaghav Raman
Generati v e Adv ersarial Networks for Real-time Stability of In v erter-based Systems Xilei Cao, Gurupraanesh Raman, Gururaghav Raman, and Jimmy Chih-Hsien Peng Department of Electrical and Computer Engineering National Univ ersity of Singapore, Singapore 117583 Email: jpeng@nus.edu.sg Abstract —In islanded systems with droop-controlled sources, the droop coefficients need to be tuned in r eal-time using supervisory control to maintain asymptotic stability . In contrast to offline tuning methods, online domain-of-stability estima- tion yields non-conservati ve droop gains in real-time, ensuring good power sharing performance as the operating point varies. The challenge in the conv entional online domain-of-stability estimation process is its unscalability and high computational complexity . In this paper , an efficient alter native using conditional Generative Adversarial Networks (cGANs) is described. W e demonstrate that the notion of power system stability can be learned by such deep neural networks, and that they can offer a scalable alternati ve to con ventional domain-of-stability estimation methods in islanded distribution systems. The implementation of cGANs-based stability assessment is described for an L V distribution test case and its advantages demonstrated. Index T erms —Distribution system stability , droop control, Generative Adversarial Networks (GANs), super visory control. I . I N T RO D U C T I O N In distribution networks that are tied to weak grids or islanded, decentralized power sharing mechanisms are im- plemented for forming the grid. The most common control strategy is the P - f / Q - V droop control wherein the v oltage and frequency of each source varies as per a linear law based on the real and reactiv e power output of that source. Such a control strategy could manifest poorly damped poles for some values of the droop parameters [1], and the distribution system operator’ s fast response to these poorly-damped power flows is imperativ e to the continuing operation of the grid. The small-signal stability of the system is dependent on the network topology , loading, generation and the power -sharing controller parameters. Before the system begins operation, offline tuning is performed to obtain the optimal values of the droop coefficients while considering constraints such as the maximum steady-state voltage and frequency deviations, and the desired power outputs of each source. Howe ver , the generation le vels can change frequently at the distribution lev el with the presence of highly variable renewable generation [2]. Moreov er , the network configuration could also be signifi- cantly affected by tap-changes, line switching, and faults. T o assess the stability of such grids in real time, their eigen values must be examined based on the real-time conditions. T o maintain real-time stability , the first approach is to use the nominal system configuration to design the droop values in an of fline manner while allo wing a sufficient margin from the instability limit. The expectation here is that the system will remain within the stable region as the operating point changes. Howe ver , such a conservati ve droop selection will lead to a poor power -sharing performance when there is significant deviation from the assumed operating point [3]. An alternati ve approach proposed in [4] effects real-time corrections on the droop coefficients to achiev e less conservati ve settings using a global stability indicator . While this approach is more advan- tageous than offline tuning, it does not actually determine the domain-of-stability (i.e., the hyperspace of all droop gains that yield stable behavior) in real-time, and therefore still yields somewhat conservati ve results. If the full domain-of-stability were to be kno wn accurately , appropriate droop selection can be made with the required stability margin. Con ventionally , the determination of the stability region entails the ev aluation of eigen values for a range of droop gains, and the stability classification of each setting. This process has a complexity O ( n 3 ) based on the number of states n (detailed models contain 5 states per source) [5]. Consequently , the stability region determination could take sev eral tens of seconds or minutes for large systems during which time lo w-inertia systems could well face tripping of lines/sources. An alternati ve approach would be to develop an a priori database of various possible system configurations with the domain-of-stability for each case. While this may address the computation time issue with online stability assess- ment, it raises other concerns pertaining to the dev elopment of an exhausti ve database, its non-adaptability to changes in configuration, and the time required to identify the relev ant database entry for a giv en real-time configuration. Deep learning techniques have been applied for studying multi-in verter dynamics in order to obtain fast black-box models (most recently in [6]). Howe ver , their use has been largely limited to learning time-domain behavior . In contrast, the focus of this work is on the frequency-domain behavior . This paper proposes the use of Generative Adversarial Net- works (GANs), specifically , conditional GANs (cGANs) for obtaining the stability hyperspace of control parameters. This study is a novel demonstration of the ability of cGANs to learn the notion of small-signal stability , and generate the complete stability re gion in real-time for the present distribution network configuration. As a result, this guarantees stable operation while enabling non-conservati ve droop settings to be selected so as to achiev e an optimal power -sharing performance. The cGANs are trained offline, and while online, the computational time for generating the stability region is demonstrated to be significantly lo wer than that for the traditional tuning method. It will also be demonstrated that the training process itself is scalable to the number of system configurations, implying that the proposed cGANs approach will be comparable, or better than the look-up-table approach as well. I I . C O N V E N T I O NA L S TAB I L I T Y R E G I O N D E T E R M I N A T I O N The system of interest here is a distribution network with sev eral con ventional and po wer electronic sources, each gov- erned by the following droop equations: f = f 0 − k f ω c s + ω c ( P − P 0 ) , and V = V 0 − k v ω c s + ω c ( Q − Q 0 ) , (1) where f , V , P , and Q respecti vely denote the frequency , terminal voltage magnitude, real and reacti ve power injections of each source. The subscript ‘0’ indicates their respecti ve nominal values. k f and k v are the P - f and Q - V droop coefficients respectively , and ω c is the first-order power filter corner frequency . While the con ventional droop is taken up here for proof-of-concept, the proposed method is equally applicable to more sophisticated droop control strategies such as opposite droop [1]. The eigen v alues of the system are obtained as the solution of: [ A + B s + C s 2 + D s 3 + E s 4 ] ∆ θ ∆ V = 0 . (2) The coefficient matrices are defined as follows: A = − ( ρ 2 + 1) B − ρ ( ρ 2 + 1) B ρ ( ρ 2 + 1) B ( ρ 2 + 1)( − B + L q ) B = ( ρ 2 + 1) L p − ( ρ 2 + 1) B ω 0 ( ρ 2 + 1) B ω 0 (( ρ 2 + 1) T + 2 ρ ω 0 ) L q C = " (( ρ 2 + 1) T + 2 ρ ω 0 ) L p 0 0 ( 1 ω 2 0 + 2 ρT ω 0 ) L q # D = " ( 1 ω 2 0 + 2 ρT ω 0 ) L p 0 0 T ω 2 0 L q # E = T ω 2 0 L p 0 0 0 where G + j B = Y bus is the bus-admittance matrix of the distribution network, L p and L q diagonal matrices containing the in verse of k f and k v respectiv ely of all the sources, ρ the R/X ratio of the system, ω 0 the nominal power frequency ( 100 π rad/s), and T = 1 /ω c . T o determine the stability region numerically , a hyperspace of possible droop coef ficients is first conceptualized, and the stability of each point is determined to obtain the full domain-of-stability . A droop setting is considered stable if the real parts of all eigenv alues are negati ve. I I I . S TA B I L I T Y R E G I O N D E T E R M I N A T I O N U S I N G C G A N S A. Revie w of GANs and cGANs GANs have been used in the image processing domain to create synthetic images from a training set of real images, for example, pictures of human faces, birds, etc. GANs consist of two neural networks- a Generator and a Discriminator . The former generates new data sets, and the latter judges how similar the generated data set is to the training data (real data); the two networks compete to improve their respective accuracies during training [7]. The follo wing is a mathematical ov erview of the GANs training process. Let x be the actual data with a distribution p data . The Generator is fed noise z , which maps it to G ( z ) . The Dis- criminator , when fed an input x , produces a single scalar D ( x ) that represents the probability that x came from the training data rather than from the Generator . The output of the Generator is fed to the Discriminator , and the networks are trained simultaneously . During the course of the training, the goal is to maximize the accuracy of the Discriminator , while minimizing log (1 − D ( G ( z ))) . This is equiv alent to the minimax game with a value function V ( D , G ) giv en by: min G max D V ( D , G ) = E x ∼ p data ( x ) [ log D ( x )] + E z ∼ p z ( z ) [ log (1 − D ( G ( z )))] . (3) At the end of the training process, the distribution of the generated (synthetic) data p g becomes equal to p data . The Discriminator is therefore unable to differentiate between the real data and the generated data, i.e., D ( x ) = D ( G ( z )) = 0 . 5 . Conditional GANs (cGANs) entail an additional input y to both G and D , which can be used to impose a condition on the generated data samples [8]. For example, cGANs can generate pictures of smiling faces from a training dataset of faces with sev eral expressions. The training equation in this case is: min G max D V ( D , G ) = E x ∼ p data ( x ) [ log D ( x k y )] + E z ∼ p z ( z ) [ log (1 − D ( G ( z k y )))] . (4) B. Application to distribution system stability studies Since GANs in general have the capability to generate new data sets with similar characteristics as the training data, they can be usefully lev eraged for power system stability characterization. The principle behind using cGANs instead of simple GANs is the follo wing. The data representing each power system includes the network parameters and droop coefficients. When trained with sev eral possible stable system configurations and droop settings, simple GANs will generate additional stable cases, thus generating a stability hyperspace (droop coefficients) for a mixture of network configurations. When cGANs are used with the conditional input as the present network configuration, they will directly provide the stability region for that particular configuration. Notably , since the training of the cGANs will be performed offline, the real- time generation of the domain-of-stability can be obtained relativ ely faster when compared to the con ventional method, as will be demonstrated in the following subsections. Z 12 Z 23 Z 15 Inverter-1 Inverter-2 Inverter-3 Z 45 Z 34 Inverter-5 Inverter-4 Fig. 1. Schematic of 5-node ring-main distribution system. T ABLE I N E TW O R K P A R AM E T E RS OF T E S T S Y S TE M Impedance V alue ( Ω ) Impedance V alue ( Ω ) Z 12 0 . 08 + j 0 . 08 Z 45 0 . 15 + j 0 . 15 Z 23 0 . 15 + j 0 . 15 Z 15 0 . 02 + j 0 . 02 Z 34 0 . 05 + j 0 . 05 C. Implementation details Online stability region determination using cGANs is demonstrated using a 4.16kV , 50Hz ring system shown in Fig. 1. The power rating of each of the fiv e identical sources is 1 MV A, and the nominal droop coefficients are k f =0.15% and k v =5.0%. The network impedances are presented in T able I. The po wer filter cut-of f frequency ω c is taken as 31.41 rad/s. Let Y bus = Y ∠ θ be the b us admittance matrix of the netw ork, and k f and k v be vectors including the droop coefficients of all the sources. The training dataset is created in MA TLAB, with each data point consisting of Y , θ , k f , and k v . T ogether, these four parameters determine the stability of the system. The elements of the abo ve matrices/v ectors are concatenated to obtain a single vector; positional information is not recognized by non-conv olutional networks. While generating the data, as these matrices/vectors hav e elements having different ranges of magnitudes, these are scaled by dividing with the largest element of the respective matrices, bringing their magnitudes in the interval [0 , 1] . This scaling factor is uniformly used for all the data points (i.e., different power system configurations), guaranteeing that due importance is giv en to the quantities with smaller magnitudes during the training, while accelerating it [9]. The in verse is multiplied to reg ain the true physical parameters from the cGANs output. The cGANs are realized using the Pytorch package in Python and executed on a PC running 64-bit Windo ws-10 OS, with an i7-8550 processor and 8GB RAM. The Generator and Discriminator entail a fully connected neural network with 4 and 3 layers respectiv ely . The acti vation function for all layers is LeakyRelu, e xcept the Discriminator’ s output layer , which is the sigmoid function. For each epoch, small-batch training is done and for the Generator, batch normalization is performed so as to accelerate the optimization process. This reduces the algorithm’ s sensitivity to the learning rate [10]. T o guage the performance of the Discriminator during the training process, we define the term “real loss” to denote the cross-entropy between D ( x ) and the unit vector , where x is the training data set. Similarly , “fake loss” is the cross- entropy between D ( G ( z )) and the zero vector , where z is a random vector . For the Generator , “G loss” is the cross-entrop y between D ( G ( z )) and the unit vector . When the training process is completed, all of these three quantities approach log(2)=0.69 because D ( G ( z )) and D ( x ) both tend to 0.5 as mentioned in Section III A. The output data points of the cGANs correspond to synthetic power system configurations and their parameters are expected to conform to practical values. Thus, the follo w stopping criterion is used for the training process: d c = max z ( x f − G ( z ) f ) < , (5) where d c is the Chebyshev distance, and is the allowable deviation of the generated data from the real data. As the data matrices Y , θ , k f , and k v hav e already been scaled to [0 , 1] , can be uniformly be used for all, and this value is selected as 0.05 for this work. D. Simple GANs for a single network configuration First, we consider simple GANs to demonstrate its useful- ness for this application, and highlight the need to use cGANs, which is employed in the following subsection. T o obtain the domain of stability with respect to the first inv erter (for ease of representation on a 2-D plane), the v alues of k fi and k vi for i =2-5 are respecti vely fixed at 0.1% and 2%, and the training data set is generated by varying k f1 and k v1 uniformly in the range [0 , 0 . 4] and [0 , 4] respectiv ely . The training set size is chosen as 4000, the batch size 100, and learning rate 8 × 10 − 6 . The real loss, fake loss, G loss and d c for each epoch are recorded as shown in Fig. 2. Although the loss functions reach their final v alues around epoch 500, the goal (5) is first achiev ed at epoch 1130. The value d c , when smaller, indicates higher generation accuracy , and that a wider region of the actual stability region will be populated. Random noise is then fed to the trained GANs to populate the stability region shown in Fig. 3(a) with 20000 samples. The theoretical stability region obtained from the traditional numerical method is also shown. The data samples from the GANs are found to be 99.38% accurate. W ith further training, the GANs generates a better cov erage of the stability region, as seen from Fig. 3(b) corresponding to epoch 1900. Some of the identified points are marked to be actually “unstable” ev en though they are just inside the boundary of the stability region. These correspond to GANs output samples that have a slight v ariation in the Y and θ which makes them actually unstable; such variations are inherent to GANs and therefore the optimal droop setting should be picked sufficiently farther from the boundaries to guarantee stability . Howe ver , this error can be further reduced if desired, through additional epochs of training. The need for cGANs is clear from this case because, if a variety of system topologies were used to generate the training data, then the output would be spread out among those topologies as well, generating a large set of stable cases. Howe ver , since the application calls for selecting the 0 500 1000 1500 2000 Epoch 0.4 0.6 0.8 1 (a) Real loss 0 500 1000 1500 2000 Epoch 0.5 0.6 0.7 0.8 (b) Fake loss 0 500 1000 1500 2000 Epoch 0.4 0.6 0.8 1 (c) G loss 0 500 1000 1500 2000 Epoch 0 0.2 0.4 0.6 (d) Chebyshev distance Fig. 2. Training procession for simple GANs with learning rate 8 × 10 − 6 . 0.05 0.1 0.15 0.2 0.25 0.3 k f 1 0.5 1 1.5 2 2.5 3 k v1 (a) Epoch 1130 (Accuracy=99.38%) 0.05 0.1 0.15 0.2 0.25 0.3 k f 1 0.5 1 1.5 2 2.5 3 k v1 (b) Epoch 1900 (Accuracy=98.95%) Fig. 3. Stability region obtained from 20000 samples from GANs is plotted in red. The theoretical stability region is shown in blue. The points identified by the GANs not in the actual stability region are shown in green. appropriate droop settings for the present system configuration, cGANs can be le veraged, with the conditional label being the real-time Y matrix. E. Conditional GANs for multiple network configurations The use of cGANs is demonstrated considering the same system as before, along with certain contingencies. Assuming that there are two parallel feeders between Nodes 1-2, 2- 3 and 3-4, we consider the cases of loss of one of these parallel connections separately (i.e., y ij is halved), yielding 3 additional distribution system configurations apart from the original system. The structure of each training data vector is the same, covering 16000 samples equally distrib uted over the 0 500 1000 1500 2000 Epoch 0.4 0.6 0.8 (a) Real loss 0 500 1000 1500 2000 Epoch 0.5 0.6 0.7 0.8 (b) Fake loss 0 500 1000 1500 2000 Epoch 0.4 0.6 0.8 1 (c) G loss 0 500 1000 1500 2000 Epoch 0 0.2 0.4 0.6 (d) Chebyshev distance Fig. 4. Training procession for cGANs with learning rate 8 × 10 − 6 . 4 system configurations. The batch size is set as 400 and d c is calculated ev ery 20 epochs for each of the 4 configurations by providing the appropriate conditional label to the cGANs. The maximum d c of all the configurations is considered to be the d c for the generated data. The criterion (5) is satisfied at epoch 1630, but in the interest of better populating the stability region, the training is carried out for over 300 additional epochs, and the relev ant plots are shown in Fig. 4. The corresponding cGANs are used to generate 20000 samples for each of the 4 system configurations to obtain their respectiv e stability regions, which are shown in Fig. 5. It is clear that this is different for each system as expected, and that the accuracy of the output samples is high, abov e 97 . 5% for each case. T o demonstrate the computational advantage of the cGANs vis--vis the traditional approach, both models are used to generate 20000 sets of stable ( k f 1 , k v 1 ) samples for each system configuration. The time for the sample generation is noted in T able II. First, the droop coefficients for In verters 2-5 are kept constant, i.e., the stable hyperplane corresponding to the first in verter alone is generated. Second, as is practically necessary , the sample generation is carried out varying the droop parameters of all the in verters to generate the whole stability hyperspace, and the corresponding runtime is also noted in the same table. F or this, the learning rate is selected as 2 × 10 − 5 and the selections of k v i and k f i ( i =1-5) obey uniform distribution in their respectiv e ranges of [1 , 5] and [0 . 1 , 0 . 5] . It 0.05 0.1 0.15 0.2 0.25 0.3 0.35 k f 1 0.5 1 1.5 2 2.5 3 3.5 k v1 (a) Original (Accuracy=98.43%) 0.05 0.1 0.15 0.2 0.25 0.3 0.35 k f 1 0.5 1 1.5 2 2.5 3 3.5 k v1 (b) y 12 / 2 (Accuracy=98.78%) 0.05 0.1 0.15 0.2 0.25 0.3 0.35 k f 1 0.5 1 1.5 2 2.5 3 3.5 k v1 (c) y 23 / 2 (Accuracy=97.85%) 0.05 0.1 0.15 0.2 0.25 0.3 0.35 k f 1 0.5 1 1.5 2 2.5 3 3.5 k v1 (d) y 34 / 2 (Accuracy=99.80%) Fig. 5. Stability region (shown in red) for Inv erter-1 identified using cGANs for 4 system configurations at epoch 1907. Corresponding theoretical regions are indicated in blue, obtained from the traditional method. Green circles denote erroneously projected points of stability by cGANs method. T ABLE II R U N N IN G T IM E F O R 2 0 0 0 0 S A M P LE S - A CC U R AC Y I N P A RE N T HE S E S Approach k f i & k v i System a System b System c System d ( i =2-5) T ime (s) T ime (s) Time (s) T ime (s) T raditional Fixed 14.2336 16.5988 15.1759 14.8897 T raditional V aried 12.1833 12.3569 12.4272 12.4838 cGANs Fixed 1.3480 1.3776 1.3343 1.2241 Epoch 1907 ( 98 . 43% ) ( 98 . 78% ) ( 97 . 85% ) ( 98 . 03% ) cGANs V aried 1.2838 1.2896 1.3115 1.2256 Epoch 3994 ( 100% ) ( 99 . 98% ) ( 99 . 97% ) ( 99 . 80% ) T ABLE III R E QU I R ED E P OC H S F O R L E A R NI N G R A T E 8 × 10 − 6 Number of system configurations 1 2 4 Epoch number with accuracy above 95% 680 695 720 Epoch number with whole region populated 1035 1200 1280 is observed that for any particular system configuration, the traditional domain-of-stability determination approach takes well abov e 10s, but the cGANs runs for just ov er 1.2s, with good accuracy . This indicates the suitability of cGANs for practical deployment. F . Demonstration of scalability The scalability of cGANs in determining the domain-of- stability stems from the fact that it can generate the plots corre- sponding to multiple system configurations without additional real-time computational complexity as compared to the simple GANs. Ho wever , the training process demands more data. Further , as the number of system configurations in the training dataset increases, the number of epochs required for good accuracy , as well as for populating the entire stability region increases as evident from T able III. Ho wev er, the required number of epochs does not increase significantly when the number of system configurations increases, demonstrating the scalability of the training process. Therefore, the cGANs approach is expected to perform better , and in the worst case, equal, to a look-up-table approach. I V . C O N C L U S I O N This study has demonstrated that the computational time requirements for online domain-of-stability characterization of networked droop controlled sources can be met by cGANs. The cGANs-based method can accurately yield the stability region for the present system configuration, which can be effecti vely used by the supervisory controller to make real- time adjustments to the droop controllers for ensuring small- signal stability . Importantly , these droop settings can be se- lected with a flexible degree of conservatism. The scalability of the proposed method with respect to the required training epochs and number of possible system configurations has been demonstrated. Comparison of the running time between the cGANs-based and con ventional methods indicate that the for- mer is nearly 10 times faster in generating the stability region for each system configuration, indicating its effecti veness for supervisory control. Future work should address the optimal selection of the training parameters such as learning rate, and the size of the training dataset so as to achiev e high accuracy and stability region coverage. A C K N O W L E D G M E N T This work was supported by the Singapore Ministry of Education grant R-263-000-D10-114. R E F E R E N C E S [1] C.-C. Chang, D. Gorinevsk y , and S. Lall, “Dynamical and voltage profile stability of inverter -connected distributed power generation, ” IEEE Tr ans. Smart Grid , vol. 5, no. 4, pp. 2093–2105, 2014. [2] S. H. Lee, G. Son, and J.-W . Park, “Power management and control for grid-connected dgs with intentional islanding operation of inverter , ” IEEE Tr ans. P ower Syst. , vol. 28, no. 2, pp. 1235–1244, 2013. [3] J. W . Simpson-Porco, Q. Shafiee, F . Dorfler, J. C. V asquez, J. M. Guerrero, and F . Bullo, “Secondary Frequency and V oltage Control of Islanded Microgrids via Distributed A veraging, ” IEEE T rans. Ind. Electr on. , vol. 62, no. 11, pp. 7025–7038, 2015. [4] Y . Zhang, L. Xie, and Q. Ding, “Interactiv e Control of Coupled Microgrids for Guaranteed System-W ide Small Signal Stability , ” IEEE T rans. Smart Grid , vol. 7, no. 2, pp. 1088–1096, 2016. [5] I. P . Nikolakakos, H. H. Zeineldin, M. S. El-Moursi, and N. D. Hatziargyriou, “Stability Evaluation of Interconnected Multi-Inv erter Microgrids Through Critical Clusters, ” IEEE T rans. P ower Syst. , pp. 1–13, 2015. [6] D. O. Amoateng, M. Al Hosani, M. S. Elmoursi, K. T uritsyn, and J. L. Kirtley , “Adaptive V oltage and Frequency Control of Islanded Multi- Microgrids, ” IEEE T rans. P ower Syst. , vol. 33, no. 4, pp. 4454–4465, 2018. [7] I. Goodfellow , J. Pouget-Abadie, M. Mirza, B. Xu, D. W arde-Farley , S. Ozair, A. Courville, and Y . Bengio, “Generativ e adversarial nets, ” in Advances in neural information pr ocessing systems , 2014, pp. 2672– 2680. [8] M. Mirza and S. Osindero, “Conditional generativ e adversarial nets, ” arXiv preprint arXiv:1411.1784 , 2014. [9] P . Y . Simard, Y . A. LeCun, J. S. Denker , and B. V ictorri, “T ransformation in variance in pattern recognitiontangent distance and tangent propaga- tion, ” in Neural networks: tricks of the trade . Springer , 1998, pp. 239–274. [10] S. Iof fe and C. Szegedy , “Batch normalization: Accelerating deep network training by reducing internal cov ariate shift, ” arXiv preprint arXiv:1502.03167 , 2015.
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment