Application of the Conditional Optimization Method for the Synthesis of the Law of Emergency Control of a Synchronous Generator Steam Turbine Operating in a Complex-Closed Configuration Power System

: Stochastic renewable sources of energy have been causing changes in the structure and operation of power systems. High penetration of this type of generation results in decreased inertia of a power system, increased active power fluctuations, and a higher probability of false tripping of emergency control devices. Traditional algorithms of emergency control are not adaptable and flexible enough for systems with high penetration of renewables and flexible alternating current transmission systems. Integration and development of phasor measurement units make it possible to create adaptable emergency control systems, which would require minimal pre-defined data. The purpose of this study is to develop an adaptable algorithm of turbine fast valving control synthesis and transient stability estimation for a generator. The suggested algorithm is based on the equal area criterion in the domain synchronous generator Torque—Load angle. The measurements of the generator operation under consideration are used as the input data for the steam turbine fast valving control synthesis. Thus, the algorithm becomes adaptable because no pre-defined parameters of a power system model are required.


Introduction
For the most part, the development of modern power systems covers the following subjects: digital monitoring and control tools [1], the transition to low-carbon sources of energy, changes in the operation of energy and power markets [2], implementation of the demand response concept [3], advanced methods of power equipment monitoring [4], integration of phasor measurement units (PMU) [5]. Power systems tend toward the increased observability and controllability, reduced amount of combustion products at power plants based on organic fuel, higher efficiency of power and energy markets, as well as improved reliability of consumers and grids. Nevertheless, there are certain aspects of power systems development that have a negative influence on the stability and reliability of a power system operation.
The substantial increase in RESs penetration is aimed to reduce the total amount of carbon dioxide emissions. This penetration increase occurs across the board. The traits of RESs that are of the greatest significance for reliable and stable operation of a power system are the following: stochastic nature of power generation, low inertia [6], which can be increased artificially [7]. Transient stability studies may be problematic for power systems with high-RES penetration. This is caused by insufficient sensitivity of protection and control devices as well as increased probability of unplanned events.
Increased capacity of synchronous generators (SG) leads to more efficient energy production. On the other hand, a disconnection of such a large generator may result in significant changes in values and directions of interconnection power flow. As a result, a power system is more likely to lose its small-signal and transient stability.
The development and integration of PMU devices caused wide application of transient stability margin estimation systems [8]. The application of these systems in power systems control has made it possible to increase transmission capacity, which causes stability more likely to be lost during disturbances.
The features mentioned above necessitate further development of traditional protection and control algorithms in terms of adaptability and response time [9]. The purpose of this study is to develop and test an adaptable method of transient stability estimation. In addition, the control synthesis algorithm of turbine fast valving (TFV) is to be formulated in the case of stability loss. The stability loss is identified based on the equal area criterion (EAC) and PMU measurements.

State-of-the-Art
The first stage of the algorithm of power system emergency control is the identification of transient inception according to the pre-selected signals of primary measurements from instrumental transformers. Following a disturbance identification, the data are transferred to the logical part (decision element) of the emergency control device, where the transient stability is being estimated and control actions are being selected. The last stage is the implementation of the selected control actions on the power system objects under control.

Algorithms of Transient Inception Identification
One of the first studies aimed at identifying the moment of disturbance inception in power systems used voltage sag as an indicator. In [10] the following algorithm was proposed: the time of voltage sag inception was found through detecting the event of rootmean-square (RMS) voltage violating pre-defined range. In [11] this method was accelerated computation-wise by calculating quadrature-based RMS voltages. Both these mentioned studies [10,11] use the procedure of dynamic reduction of RMS voltage signal at the ending instant of a voltage sag due to the possible lower voltage values in post-contingency state, which is caused by outage of generation, transmission, or distribution equipment.
Several methods for estimating a disturbance duration based on digital processing of the power system signals were developed owing to recent remarkable development and growing integration of PMUs in power system protection and control. The study [12] suggested using the method based on discrete wavelet coefficients (DWC). The values of DWC for voltage and current are constant in a normal steady state of a power system. A disturbance results in a sharp increase in DWC values due to the occurring transient instantaneous voltages and currents of high-frequency components. The main disadvantage of the proposed method is the complicated selection of the mother wavelet. In [13], the novel d-q transform algorithm was suggested to detect the disturbance time. It allows transforming signals of three-phase voltage or current to an orthogonal basis. This method is highly accurate in the case of highly symmetrical signals, otherwise, its accuracy is substantially lower. In [14] the detection was based on analyzing the amplitudes of voltage and current using the Hilbert transform (HT). The disadvantages of the traditional DT were demonstrated in [15]. In [16] the envelope waveform approach was used to detect disturbance time, and it was shown that errors may be significant in the case of distorted signals [17].
The considered methods possess relatively high adaptability and accuracy. However, there are limits to the efficient application of a method to be used in power system protection and control. Therefore, only a combined approach can be used. For example, the initial time value can be detected using the method in [10], with the further correction using the algorithm in [12]. A combined approach to the problem of disturbance time detection can show accurate and reliable results, although not without increased computation time.
To overcome the discovered obstacles this study suggests the accelerated adaptable method of disturbance time detection. It is based on the estimation of errors of instantaneous signals forecast.
Time-domain analysis of an electromechanical transient was one of the original methods of estimating the transient stability of power systems [18]. Transient disturbances are simulated using fault shunts that are switched on for a pre-defined period.
Numerical integration methods are widely used in power systems studies. Several problems may occur in real-time emergency control when using the numerical integration [19]: accuracy of numerical integration results depends on parameters of power system models, which may deviate from the real ones [20]; in some cases, a significant time is to be considered.
These disadvantages of numerical integration methods can be overcome by artificial intelligence (AI) methods [21][22][23][24][25]: the support vector algorithm [21], artificial neural networks (ANN) [22], pattern recognition approaches [23], the deep learning theory [24], as well as the XGBoost algorithm [25]. The AI allows revealing implicit correlation in the data. In addition, due to generalization, the AI-based methods make it possible to identify transient stability region in a fast and accurate way provided a model was trained correctly. In terms of emergency control, the AI-based methods have the following features: the training set should be sufficient for the AI to be learned properly. It can be difficult to achieve in the estimation of transient stability for real power systems; results of AI-based methods become irrelevant when the structure or parameters of a power system change.
Drawbacks of both numerical integration and AI can be partially negated using variations of Lyapunov's direct method for transient stability estimation in power systems [26]. The EAC is the result of the development of these methods. This criterion can be considered as the special case of Lyapunov's theory application. The balance between kinetic and potential energy during a transient can be estimated using the EAC. If the kinetic energy of a generator rotor and turbine exceeded possible potential energy, then loss of transient stability would be detected. The EAC is put to good use in commercial systems of transient stability estimation for generators [27][28][29], including cases of complex power systems [30], where the extended EAC is being used.

Algorithms of Turbine Fast Valving Control Synthesis
Emergency control systems utilize the following control actions: load shedding, turbine fast valving (TFV), generator braking using resistors, field forcing, disconnection of grid elements [30]. Generator disconnection and TFV were considered in this study. One of the earliest mentions concerning the application of the TFV can be traced back to 1931 [31]. Practical studies [32] and integration of TFV began in 1960 [33]. Positions of the intercept valve during TFV operation are shown in Figure 1. TFV control synthesis means finding values of tFV, IVmin, and IVinf. The methods of TFV control synthesis are the following: AI-based [34][35][36], multidimensional interpolation global optimization [37], multi-agent systems [38], analysis of the Lyapunov's function [39].
In [34] the improved conjugate gradient algorithm was used to train an ANN. The input data set includes the load angle of a synchronous generator, rotor speed, load angle acceleration, and acceleration derivative. The model was trained using the results of several simulated transients. The backpropagation algorithm was used to train an ANN in [35]. This algorithm was implemented on the physical controller in real-time mode. In [36] the radial-basis function ANN was used. The approach was tested on the simulations data. The complicated process of creating the proper training dataset is the main drawback of the AI-based methods of TFV control synthesis.
The methods of Lagrange multiplier and multidimensional interpolation global optimization were used in [37]. Tests have shown the efficiency of the suggested approaches. The significant computational burden makes these methods difficult to use in real-time.
In [38] the multi-agent system was applied. It consisted of two agents: the former detects the loss of transient stability using load angle values, the latter synthesizes the TFV control based on the pre-made calculations. Authors notice that in real-time emergency IVinf control of power systems additional studies are needed to reduce response times. Elements of Lyapunov's theory were used for TFV control synthesis in [39]. The suggested algorithm was based on generator measurements. The TFV control synthesis for emergency control of power systems is a complex and controversial task. Currently, the features of methods of the TFV control synthesis are as follows: too high response time, which does not allow the use of algorithms in real-time; the complexity of the preliminary algorithm tuning (the selection of the Lyapunov function); insufficient adaptability related to using the predetermined parameters power system model and the necessity to rebuild the algorithm when the system structure is changed.
The EAC [19], can be used as a method capable of overcoming these disadvantages. It can be used in the transient stability estimation for a synchronous generator. The imbalanced energy is used as input data for the TFV control synthesis. It is equal to the difference between the acceleration and deceleration energies of the generator calculated in the domain "generator torque-load angle".

The Algorithm of a Power System Transient Stability Estimation and Emergency Control
The general block diagram of the proposed algorithm is shown in Figure 2. The novelty of the algorithm is to increase the adaptability of emergency control of the SG operation mode at the pace of the transition process. The high adaptability and speed of the developed algorithm are ensured through the use of accelerated methods for determining the perturbation time and assessing dynamic stability based on measurement data.

Algorithms for Disturbance Inception Detection
The algorithm of disturbance inception detection is based on detection of the time instant when a preselected indicator has gone beyond the permissible range of its change. The value of the signal prediction error at a given time interval was selected as the indicator. The permissible range for the indicator variation is calculated on a sliding window of a pre-selected width. The signals of instantaneous voltages are used as the input data for the algorithm to detect the disturbance time. The use of instantaneous current signals can be difficult when magnetic circuits of current transformers are saturated [40].
The detection algorithm consists of the following stages: 1. For a given sliding learning window, the values of the instantaneous voltages are approximated by the Fourier series; 2. The standard deviation (SD) of the difference between the actual and estimated signal levels is calculated for a sliding learning window. 3. The coefficients of the obtained model are used to estimate the signal for a given prediction window; 4. At each calculation cycle the difference between the estimated measurement values of instantaneous voltages and actual ones is calculated, i.e., mathematical expectation (ME) of the prediction error is found. 5. If the signal prediction error is recorded to be beyond the range ME ± k • SD, then disturbance inception is detected. 6. The algorithm operation is blocked for a specified time when a disturbance has been detected. This blocking allows to tune out false trippings caused by an increase in the algorithm error during an electromagnetic transient.
The proposed algorithm can also be applied to signals of instantaneous phase and linear voltages to increase the accuracy of the disturbance time detection. In this case, the resulting disturbance time will correspond to the minimum obtained time.

Estimation of the Generator Transient Stability during a Disturbance
Estimation of the generator transient stability is carried out based on the EAC [30], which represents the energy conservation law. The EAC in the domain "generator torque-time" is: where Ω0 is the angular velocity of the generator rotor before disturbance, ∆Ω is the change in the rotor angular velocity for the fault clearance time instant, MT is the turbine accelerating torque, MSG is the deceleration torque of the generator magnetic field, J is the inertia moment of rotor and turbine. Following the energy conservation law, Expression (2) is transformed as follows: where ∆Wk(∆Ω) is the change in the kinetic energy change of rotor and turbine, A(δ) is the potential deceleration energy, ∆Wd is the energy spent on damping oscillations of rotor and turbine.
The value of the energy spent on damping oscillations rotor and turbine oscillations is found as follows: where ∆We is the change in energy found by integrating the difference between generator active power output and turbine power. When the disturbance inception is detected, change in the acceleration kinetic energy of rotor and turbine is calculated: where Ω0 is the angular velocity of the generator rotor before disturbance, ∆Ω is the change in the rotor angular velocity for the fault clearance time instant, J is the inertia moment of a rotor.
The following curves are approximated for the pre-defined training interval: the "torque-load angle" curve-estimating the deceleration area; curves "load angle-time" and "angular velocity of the rotor-time"-estimating ∆Wd.
After the fault clearance time is detected, an approximation is performed on a given interval of angular curves "torque-load angle" by the following polynomial: where M1, M2 are the coefficients of the polynomial, φ1 and φ2 are the initial sine wave phases.
According to the obtained values of the model (5), estimation of the generator deceleration area is performed: where δU is the unstable equilibrium angle, δPF is the angle of transition to the post-disturbance generator angular curve. Estimation of the generator transient stability is performed by determining the unbalanced energy sign: A positive value of ∆W indicates an excess of the acceleration kinetic energy of rotor and turbine, excess of the potential deceleration energy, as well as loss of the generator stability. A negative value of ∆W indicates a stable operation of the generator. When a violation of the generator stability is predicted the TFV control synthesis is carried out. If it is impossible to synthesize the TFV control, the generator is disconnected.

TFV Control Synthesis and Implementation
Within the framework of the study, the TFV control synthesis is defined as finding the minimum position of the intercept valve and duration of the valve's closed state. Based on the technological limitations of the steam boiler, the time of the intercept valve closure is taken as the maximum possible. The intercept valve position after a disturbance is assumed to be equal to the initial position before a disturbance. Under the conditions of the TFV implementation, the deceleration area of the generator is divided into two fragments: before the implementation of the TFV and after it. Figure 3 shows the characteristics of the normal, emergency, and post-accident modes of the SG; the black solid line shows the moment of the steam turbine, the yellow area is the acceleration area, the gray area is the simplified braking area before the IRT, characterizing the shut-off valve closing process and the time delay in approximating the angular characteristic, the braking area after the TFV is highlighted by a green area. When implementing the TFV, SG braking area is divided into two fragments: before implementation of the TFV and after.
The following values are shown along the abscissa axis in Figure   Taking into account the implementation of the TFV, the area rule is written as follows: where Ad-braking area before the implementation of the TFV, AdFV1, AdFV2-braking areas after the implementation of the TFV, Wd-the energy spent on damping the vibrations of the SG rotor and turbine. On the other hand, the values of AdFV1 and AdFV2 are determined from the angular characteristics of the post-accident mode of operation of the SG: where MFV-turbine torque at the lower position of the shut-off valve. Expression (8) contains two desired characteristics of the TFV law: MFV and δFV, to determine which transition to the conditional optimization problem can be made: where MFVmin-the minimum turbine torque determined by the characteristics of the steam boiler, MFVmax-the maximum turbine torque, determined by the nominal parameters of the turbine and steam boiler, TFVmax-the maximum unloading time of a steam turbine, determined by the parameters of steam pipelines.
To solve problem (11), the Lagrange method is used [30]. Figure 4 shows a graphical interpretation of the problem (11) with the solution shown by a red dot on lines of equal level. The right half of Figure 4 shows the surface defined by expression (11), the right half of the figure shows lines of equal level with restrictions applied and the solution obtained.
The color in Figure 4 shows the values of the objective function.
where K1, K2, K3 are high, medium, and low-pressure components of mechanical power respectively, M0 is the turbine torque before a disturbance.

Case Study
This section describes the testing of the developed algorithm of transient stability estimation and TFV control synthesis with the Matlab/Simulink simulation data. The fixed-step method of numerical integration was used in solving a system of differentialalgebraic equations modeling the dynamic behavior of a power system. The step size correlates with the sampling rate of 10 kHz. The following assumptions were used: 1. There is no out-of-step protection in the power system; each generator is equipped with direct measurements of rotor angular velocity. 2. Each generator is equipped with PMUs; each generator is driven by a single-shaft steam turbine with cylinders of low, medium, and high pressure [30]. 3. The lower limit of turbine power output in terms of stable operation of a boiler-0.3 p.u. 4. The intercept valve is opening in 3 s, the longest time of the intercept valve closure is 1 s.

Description of the Test System Model
The test system NE39bus is used in this numerical experiment. It consists of 39 buses, 10 synchronous generators with automatic excitation control, power system stabilizers, steam turbine models, and TFV [30]. The diagram of the test system is shown in Figure 5, with the red arrow indicating a fault location. In Figure 5, the numbers indicate the numbers of the nodes of the test power system, the place of the short circuit is indicated by the red arrow. The generator SG1 is the equivalent of the external power system. Table 1 shows the initial states of generators in the power system model under consideration. The base MVA is Sbase = 1000 MVA. Table 1 also shows the number of a generator, number of a generator bus, active power output of a generator, inertia constant. The primary drive of all synchronous generators is supplied by the single steam turbine [30], its model is shown in Figure 6. In Figure 6, the sign "+" indicates the addition of signals, the sign "−" the difference of the signals, the sign "×" the multiplication of the signals.   The parameters of the steam turbine and turbine speed governor are given in Table  2. In tables, the abbreviation "p.u." denotes the per unit.  Table 2. Parameters of steam turbine and speed governor. The designations used in Table 2 are: A full description and testing of the NE39bus model used is given in the study [40]. This study presents one of the possible experiments to test the algorithm of transient stability estimation and TFV control synthesis. A three-phase self-clearing fault starts in

Steam turbine
E2 E3 + the middle of lines 16-19 in a time of 10 s and lasts for 0.15 s. This disturbance causes SG5 and SG4 to lose stability and switches to out-of-step mode. Figure 7 shows the load angles of generators in the test system. Due to the high value of the inertia constant of SG1, its load angle almost does not change; this is the reason why it is not shown. Loss of transient stability is characterized by load angle exceeding 180 degrees [30]. After fault clearance, load angles of SG4 and SG5 are over 180 degrees. Load angles of other generators are in a range from 0 to 180 degrees. Post-fault fluctuations of load angles related to SG4 and SG5 losing stability. It leads to fluctuations of load angles and voltages of other generators in the power system. In a real power system, this situation is impossible because generators that have lost their stability are automatically disconnected by outof-step protection.

Detection of a Disturbance Inception
The measurement of instantaneous phase voltage of phase A of SG4 is used for disturbance inception detection.
On the upper half of Figure 8, the original signal of phase A voltage is shown. The black dotted line shows estimated disturbance inception. The lower half of the figure describes signals that are used to estimate the disturbance inception: signal forecast error, upper bound, lower bound.
To define the perturbation time, the following parameters were chosen to detect disturbance inception: forecasting time-1 ms, training time-5 ms, k = 3, time of the algorithm blocking is 10 ms. At time 10.005 s the signal forecast error exceeds the permissible limits ( Figure 8). Disturbance inception is not detected since the blocking time is 10 ms. With the selected settings, the time of disturbance inception is 10.0002 s. The proper ranges of algorithm parameters were obtained for the transient under consideration: training window and forecasting window. The results are shown in Figure 9.
, grad.  The legend of Figure 9 shows considered forecasting windows. Beginning from the training window size of 5 ms and forecasting window of 0.6 ms the value of disturbance inception detection error is stabilized at a level of 0.2%. The suggested algorithm allows detecting times of fault inception and clearance.

Estimation of Generator Transient Stability and TFV Control Synthesis
The results of estimating the excess rotor and turbine acceleration are given in Table  3. In addition, Table 3 shows potential deceleration energy, damping energy, and unbalanced energy.
A positive value of unbalanced energy indicates loss of stability of SG4 and SG5 after disturbance. High values of SG5 unbalanced energy indicate that the SG5 derivative of rotor velocity is higher than that of SG4, which is proven by the results of the transient simulation.
Signals, p.u. Signals, p.u. The (11) is used to synthesize the TFV control. Table 4 shows the results of calculating the minimum positions of intercept valves for each steam turbine in the power system model. For SG5 the minimum position of the intercept valve is −0.25 p.u. It indicates that it is impossible to maintain the stability of SG5 using TFV. For SG4 minimum position of intercept, the valve is 0.15 p.u. Figure 10 shows the load angles of the SG after the implementation of the control. To ensure the stability of SG4, preventive division of the electrical network can be applied. This action will increase the electrical distance from the protected SG to the short circuit location, thereby reducing the volume Generator disconnection type of TFV. Table  5 shows the results of the synthesis of the TFV law during the preventive division of node 19 after the identification of the disturbance.  Figure 11 shows the load angles of SG 4 and 5 during the implementation of the TFV and the preventive division of node 19. The use of the division of the electrical network allows to provide dynamic stability to SG5 through the use of TFV. Table 6 shows the results of the synthesis of emergency control laws for disturbances in various nodes of the test model under consideration. For all the considered test perturbations, dynamic stability is ensured by the implementation of TFV.

Conclusions
The study describes the algorithm of estimating transient stability of a generator and the TFV control synthesis based on the PMU data during an electromechanical transient. The algorithm includes the following stages: detecting the moment of disturbance inception using instantaneous voltage values, EAC-based estimation of transient stability, TFV control synthesis based on calculated energy balance, which is found as the difference between (a) excessive kinetic energy of rotor and turbine, the potential energy of deceleration and (b) energy spent on damping the fluctuations of rotor and turbine. The algorithm is adaptable since it is not necessary to use pre-defined parameters of a power system model. The algorithm operation requires measurements of instantaneous voltages and currents, values of load angle, and angular velocity of the rotor. The rotor angle sensor and gearbox can be installed to obtain values of load angle and angular velocity of the rotor.
The algorithm was tested on the test system NE39bus, in the Matlab/Simulink software. The test system included models of the single-shaft steam turbine with TFV, turbine governor, AVR, and PSS. The test disturbance that causes the out-of-step condition of generators 4 and 5 was a three-phase fault with a duration of 0.15 s. The optimal position of the intercept valve was found to ensure transient stability when synthesizing the TFV control for generator 4. Transient stability cannot be ensured by the TFV operation for SG5, therefore the SG5 was disconnected.
The effectiveness of preventive division of the electrical network in the synthesis of the TFV law by the proposed method is shown. After the division of node 19, it is possible to ensure the dynamic stability of SG5.
The configurable parameters of the algorithm for assessing the dynamic stability and emergency management of the SG operation are as follows:


A window for training and predicting the signal to determine the time of the disturbance. These parameters are determined based on the results of a series of simulation of disturbances on a digital model of the protected power system;  The values of the windows of learning and forecasting the angular characteristics and changes in the angular velocity of the SG. The parameters are selected based on calculations of electromechanical transients.
Further research will be aimed at developing an algorithm for automatic selection of algorithm parameters and testing on a real-time modeling complex. Such testing will allow us to prove the practical applicability of the proposed emergency control algorithm during the transition process. The next direction of further research is related to the coordination of control actions and taking into account the impact on the adjacent electrical network.  Data Availability Statement: https://www.mathworks.com/matlabcentral/fileexchange/54771-10machine-new-england-power-system-ieee-benchmark?s_tid=srchtitle (accessed on 1 July 2022).

Conflicts of Interest:
The authors declare no conflict of interest.