PowerFactory-Python based assessment of frequency and transient stability in power systems dominated by power electronic interfaced generation

The deployment of variable renewable energy based power plants is increasing all over the world, however, unlike conventional power plants these are mostly connected to the grid via power electronic interfaces. High penetration of power electronic interfaced generation (PEIG) has an important impact on the inertia of the system, which is of major concern for frequency and large disturbance rotor angle (transient) stability. Therefore, it is desirable to study the effectiveness of widely used approaches to assess the stability of a system with high penetration of PEIG. This paper concerns with the modelling and control aspects of a power system for the evaluation of the most widely used metrics (indicators) to assess the dynamics of the power system related to frequency and rotor angle stability. The functionalities of Python are used to automate the generation of operational scenarios, the execution of time domain simulations, and the extraction of signal records to compute the aforesaid indicators. The paper also provides a discussion about possible improvements in the application of these indicators in monitoring tasks.


I. INTRODUCTION
The electrical power grid is a massive and complex system with a non-linear dynamic performance, which can be excited by different types of disturbances, and can manifest in different forms of stability phenomena [1].
The future power system has in its dynamic behaviour the main challenge to properly expand with the massive inclusion of power electronic interfaced generation (PEIG) [2], which due to their output variability, and decoupling from the transmission network, impacts the overall stability of the system.Thus, motivating a revision of the approaches used in monitoring and control tasks.
Displacement of conventional power plants with synchronous generator by PEIG lowers the inertia, which decreases the robustness of the system against disturbances, and is reflected in higher excursions of frequency [3] and machine rotor angles [4].Hence, there is a renewed interest in evaluating the approaches used to estimate the proximity of the system to frequency or transient unstable condition.
Constant monitoring of systems parameters is vital to prevent widespread disruptions and system collapse.
Several researches have proposed numerous options of early detection of stability issues, which employ computational intelligence tools to predict the value of a selected stability indicator.Such approaches have been developed and tested in systems dominated by synchronous generation [5], [6].Nevertheless, further research effort is needed to improve the accuracy and reliably prediction (or alternatively classification) throughout changing operating conditions (load level, generation dispatch, and topology).This is specially critical in systems with reduced inertia and short circuit capacity.
This paper provides an evaluation of the suitability of selected and widely used indicators in both, industry and academia, for frequency and transient stability assessment in systems with high penetration of PEIG.The study is conducted on a three area system, original introduced in [7], and modified to have high penetration of wind power plants (62% of the total installed capacity), to measure the distance to frequency and transient instability in power systems with high penetration levels of PEIG.

II. A REVIEW ON STABILITY INDICATORS
The lack of ineffective participation of PEIG in the frequency containment period, rises a concern with the assessment of the frequency performance in the mentioned interval, in which the lack of assistance by PEIG can result in large frequency gradient [8].Therefore, the selected frequency indicators are related to this period.For rotor angle stability assessment, Power angle-based stability margin indicator and COI-referred rotor angles TSI (transient stability indicator) are considered.
A. Frequency performance indicators 1) Rate Of Change Of Frequency (ROCOF): This metric corresponds to the frequency gradient after an imbalance event of active power generation and load demand [9].The frequency starts deviating from rated value as an immediate result of a generation loss.
The ROCOF is defined analytically as shown in (1) and for the computation of the frequency derivative, some current practice is to compute the ROCOF in two ways: the first one is with the use of the approximation taken from [10] given by (2) for qualitative assessment of the frequency performance within the time window of the system inertial response and, the second is by computing the slope of the frequency decrease in a fixed time window of 0.5s after a disturbance.
where ∆P is the MWs lost (i.e power deficit), f is the system frequency, E sys is the system kinetic energy in MWs, E lost is the kinetic energy lost in MWs.
The relevance of the ROCOF lays on the data acquisition speed of the equipments associated to frequency measurement and protection, for which the frequency shouldn't change faster than these equipments can detect.

B. Transient performance indicators
1) Power angle-based stability margin: This indicator shows a percentage value about the maximum angular deviation between any two synchronous machines within the electrical system.This indicator is defined as follows: where δ max is the maximum angle separation of any two generators of the system at the same time in the post fault response [11].
The relevance of this indicator is on the information about the possible islanding because it monitors the rotor angles in the system.The loss of synchronism and the activation of outof-step relays are reflected in lower values of this metric.The range of δ is [−180 • , +180 • ] 1 , for which a value of M argin ∼ = 33.3%means a total separation between areas of 180 • .
2) COI-referred rotor-angles TSI: This indicator is based on equivalent inertia values as a represetation of the total inertia of each area and for the entire system [12], and it is defined as shown in (4).Taken from [13] and modified to have 62% installed capacity of PEIG.
The terms δ COIj and δ COIsystem are the equivalent rotor angles of area j and the entire system.In literature these equivalences are known as Center Of Inertia or COI.To compute these values, (6) is used.
where H j is the equivalent inertia of area j and H T is the overall inertia of the system.
Typical value for δ lim is π/3 [12], which is the maximum allowed angle determined by steady-state constraint.

A. Modified PST16 benchmark system
The 16 PST benchmark system shown in Fig. 1 is used for both Frequency and rotor angle stability studies using the same simulation platform (DIgSILENT PowerFactory).
The grid consists of three strongly meshed areas, 66 buses, 16 generators, 28 transformers and 51 transmission lines, of which 3 are considered as weak transmission lines because of their length (200km transmission lines); such lines are used to interconnect the areas.The loads are concentrated in area C and power is transferred from areas A and B to area C through two long tie-lines.The generation and load demand are distributed as shown in Table I.The system considers 5 hydro power units, 7 thermal (coal) and 4 nuclear.The last two are located in areas B and C. The wind parks installations are located on these two areas.
Synchronous generators are modelled using the built-in objects ElmSym and TypSym of PowerFactory, based on the sixth order model.The excitation system used corresponds to the modified IEEE type 1 model; while the governor systems differs from the technology of generation unit, i.e., whether the prime mover is steam or water, and the implemented models are TGOV1 and HYTGOV1, respectively.Detailed information is available in [13].

B. Wind turbine model
The wind turbine model was built based on the standard IEC 61400-27 series from [14].In the mentioned standard, the modular structure of the WT models can be done using Type 1 (1A or AB), Type 2, Type 3 (3A or 3B) or Type 4 (4A or 4B) wind turbines (check [14] for detailed information).However, for sake of implementation in PowerFactory, in this development the type 4 WTs has the same aerodynamic model like type 3 and its simplified active power control model was replaced by a more detailed one of type 3.The previous statement implies that the only difference between both WT types is the generator system block, therefore, it can be selected between WT type 3A, 3B or 4 under this block.Because of this, only one model is used to represent both turbines, being possible to change the type of the wind turbine (Type 3A, 3B or 4) by changing the generator system.As it can be seen in Fig. 1, there are eight wind farms of which seven are type 4 (representing 8899.45MW of installed capacity) and one is type 3 (954MW of installed capacity).Fig. 2 can be used as a reference for the overall structure of the WT control scheme.

C. Generated operating conditions and disturbances
The wind parks were installed with the same capacity of the synchronous generators on their point of common coupling (PCC), with the intention to study a change in the power share in the system but also to study when a wind park completely replaces a synchronous generator without modifying the overall power generation.It is worth to clarify that such situation (wind park installed in the same node of a conventional power plant) may not happen in reality, but given the fact that the system is not a detailed representation of a real system, adding a few lines and transformers to recreate a new generation addition, will not change significantly the simulation outcomes.
There are three load demand cases taken into account: Winter (100%), Spring (80%) and Summer (60%); where the 100% represents 15565MW as shown in Table I.For each case several dispatch scenarios are studied, where the main variation is done in the power share between synchronous and wind generation, i.e., under each season several simulations are ran where only the power share is changed (the power flow direction is not altered).
In each simulation case a set of operating scenarios are designed such that the wind generation progressively takes over the synchronous one, specifically, over the thermal and nuclear units in areas B and C. Including the removal from the system of a whole thermal power plant.
For assessment of ROCOF, the normative contingency for continental Europe, according to [9], is the generator outage of the two biggest generation units in one busbar.However, this doesn't apply directly to a test system like the one being used in this paper, because such event exacerbate the instability of the system and prevents unveiling interesting results that are found at the edge of instability.For this reason, the biggest conventional generation unit (with 1000 MW represents 6.3% of total power) is considered as the most critical generator outage for this system.
On the other hand, for transient stability studies the most critical contingency to be applied is a short circuit in the tie line A-C with a Fault Clearing Time of 152ms, which is shorter than the Critical Clearing Time (which was found to be 156ms).The criticality of the outage was corroborated based on steady-state analysis of the system in N-1 case, where the Power Flow Index, defined in [15] as shown in (7), is utilized to find the line where a short circuit causes the biggest impact in the system.
where S i,pos is the actual apparent power flow through the i th line, and S i,lim is the apparent power flow limit in MVA.
The tie line A-C caused the biggest post-contingency PFI (when the system is highly vulnerable to transient instability) in the system which it is interpreted as the biggest electrical stress, therefore, it was selected as the worst case scenario.

IV. SIMULATION RESULTS
The software used for simulation is DIgSILENT Pow-erFactory 2016.Other software like Python 3.4, MATLAB 2016 and, Excel are also used as a complement to run simulations.The dispatch cases are established as tabulated based scenarios, using Microsoft Excel, and are dynamically read and set in PowerFactory by Python, where different events and faults are established per dispatch case.A zoom-in into the procedural blocks for the simulation process can be conceived schematically in Fig. 3, where the data extraction block, which was programmed in Python, is broke down into detailed steps.In the figure can be seen that branch outages were automated, while the event was always the same (one synchronous generator outage).
Numerical experiments were performed on a Dell Latitude E7450 personal computer with an Inter(R) Core (TM) i7-4600U CPU, 2.10 GHz processing speed, and 8 GB RAM.

A. Effect of increased wind generation on frequency stability performance
Different generation profiles are configured to run simulations and compute the ROCOF when the PEIG gradually replaces the conventional units.The simulations are such that: first the wind generation gradually replaces conventional units in the area B, while area A and C remain untouched; then the wind generation gradually replaces conventional units in the area C, while area A and B remain untouched; and finally the wind generation gradually replaces conventional units in both areas B and C.
At every dispatch profile the power output from synchronous generators gets reduced and the wind turbine increases.Also, a complementary information to the dispatch scenarios, already provided, is the following information that completes the environment for getting the system profile: Line A-C is set out of service (same simulation case is ran twice, one with no topological changes and one with line A-C out of service).The event is a generator outage representing 6.3% of the total generation.The generator name is A1bG (see Fig. 1).Winter (as shown in Table I), Spring (taken as 80% of Winter) and Summer (taken as 60% of Winter) peak load demands are configured.
The results of all simulation cases described above are shown in Fig. 4, where it is observable that the trend of RO-COF is such that the values are higher when the inertia is low, which happens when wind generation replaces synchronous generators, this means that, as it is well known, there is a clear relation between the frequency response and the overall system inertia, as stated in (2).However, when the system topology changes (e.g., a crucial line outage) and/or the load demand varies such that the electrical stress of the system also varies, the frequency tends to respond more abruptly (although with the same trend), which is observed in dotted lines in Fig. 4 even though the inertia is the same.This figure shows all simulations plotted together and it can be read different values of ROCOF for the same inertia level depending on the loading level and topology of the system.
The electrical stress of the system for winter is higher than spring and higher than summer, which can be captured with the PFI, shown in Fig. 5; however, these values get even higher when a line outage is done (as also does the ROCOF), i.e., the increasing of the PFI, caused in this test system by a tie line outage or the load demand variation, reflects that the electrical stress in the system has increased and it results in higher values of ROCOF, even when there is no change in the system inertia nor in active power imbalance (same generator outage).
Fig. 4 and Fig. 5 reveal a dependence of the ROCOF not only on systems inertia but in systems loading levels as well.From such figures it could be suggested that an overload metric, like PFI, on each case could work as an off-set value for ROCOF.Further investigation is needed to find a more suitable metric to associate the loading/stress level of the system to the value of ROCOF for a given inertia level.Such metric shall take into account the properties of the load (e.g.voltage/frequency dependency).

B. Effect of increased wind generation on transient stability performance
Different operating conditions are also generated to evaluate the transient stability performance to have a better and improved understanding about the sources of possible unstable operating conditions.The main factor to be modified over simulation cases is the level of penetration of wind power generation.
The simulations are such that: First the synchronous generation units in area B are being gradually replaced by wind parks while areas A and C remain untouched (6 dispatch cases); then the synchronous generation units in area C are being gradually replaced by wind parks while areas A and B remain untouched (4 dispatch cases).
In these set of simulation cases the area B doesn't return to zero wind generation, instead it remains at 100% while area C increases its wind power share, which implies that the decrease of synchronous generators is continuous along each simulation case.The event is as described in section III-C (short-circuit in line tie A-C with fault clearing time of 152ms).
The results are shown by comparing the three seasons in one picture, which are the product of the sensitivity analysis with respect three different loading levels.For the indicator COI-Referred rotor-angle TSI, Fig. 6 shows the results for each simulation case.The definition of this metric is such that the closer the results are to 1 p.u, the worst the transient stability of the system.
From Fig. 6 some interesting results are observed: 1) Due to the fact that the values of this indicator are predominantly around 0.5 p.u, with very low variation, it doesn't reveal approximations to dangerous values (but instead jumps from 0.5 p.u to unstable).It is not possible to find at which operating condition the system is critically stable.
2) The transient stability of the system varies greatly depending on the loadability level (seen in the figure as Winter, Spring and Summer), for which the system load demand is a crucial aspect to consider in a regular basis, as it affects the stability of the system.3) This indicator properly marks an unstable operating condition, so it can be used to classify the stability (as stable or unstable) but not to assess the distance and tendency to move to unstable condition (e.g. as a consequence of decrease in power share from synchronous generators due to the increase of wind power share).Despite the proper calling of unstable situation, this indicator lacks the information to measure the distance and tendency to move to unstable condition.This fact is evidenced in cases 30% and 36% of total wind generation from Fig. 6 for Spring,  where the wind power share is relatively close between each other and the indicator didn't show any type of dangerous values (but still stable), and instead, it jumped abruptly to reflect the occurrence of instability.Fig. 7 shows the results of the second indicator for transient stability, the power angle based stability margin (from now on will be referred as margin) for each simulation case.The definition of this metric is such that the closer the results to 30%, the bigger the angular separation and thus, it reflects synchronous generators approaching to a loss of synchronism (see section II-B).
From Fig. 7, some interesting results are observed: 1) After 36% of total wind generation, when PEIG is increased in area C, there is a trend of the system to become more stable, which means that while more wind generation is present, more transient stable the system is.This is due to the fact that more wind power generation is used to cover locally the demand (Area C is predominantly consuming), whereas less power transfer occurs in the tie lines and the synchronous generators of the system have reduced output power (active and reactive).It is important not to draw general conclusions based on the mentioned value for PEIG, since it is also observed that a clear relationship between the margin index and the penetration level of PEIG (or equivalently the remaining share from synch.generation) cannot be defined.This emphasizes the non-linear nature of transient stability.
2) This metric is more descriptive than the COI-referred rotor-angle TSI, since it utilizes almost the entire range of the possible results.This is important because intermediate conditions (stable but closest to instability) can be read from here.3) This metric shows more clearly the effect of the load demand (Winter, Spring, Summer) on the stability of the system.
A M argin of 33% represents an angular difference between any two generators of 180 • , 56% a difference of 100 • , while higher values (above 70%) represent shorter and safer angular differences between generators.This indicator properly displays the values that are taken as dangerous, since a value of 50% does not trigger any out-of-step relay, but might cause an islanding status in the system.

V. OUTLOOK OF IMPROVEMENTS FOR TOOLS TO MONITOR PROXIMITY TO INSTABILITY IN THE CONTROL ROOM
From the analysed cases in the previous section it is valid to declare that most of the current indicators for frequency and transient stability assessment can be valid when studying high penetration of PEIG.However, these indicators are the result of measurements of physical phenomena like the lowest frequency value, or the speed of frequency decrease, or the maximum angular deviation between generators.ROCOF and Margin are single values of instantaneous measurements without further information about future behaviour of the system.
In order to measure a possible distance to instability it is necessary to develop new methodologies that use advanced platforms like WAMS to assess the distance to instability and the impact of operational changes on a regular basis (e.g.intra-hour and real-time applications).Reliable and accurate estimation of system inertia from PMU data is crucial for this purpose.

VI. CONCLUSIONS
The modelling of an electrical power system with high penetration of power electronics interfaced generation is developed and exploited using the simulation capabilities of DIgSILENT PowerFactory, together with Python for automated execution of such simulations.The results of the multiple cases ran in this work show that, for frequency stability, the current practices might have a level of dependency on the overloading level of the system for the frequency stability assessment in the containment phase.This work makes a call to incorporate this information in the calculations to estimate a possible distance to instability.On the other hand, for rotor-angle stability studies, the current practices are found to be appropriate to monitor the behaviour of the system in real time applications, although there are limitations on some popular metrics, like the COI-referred rotor-angle TSI, which is found to be more suitable to assess and help in classifying the stability status.

Figure 2 :
Figure 2: Block diagram showing the overall structure of WT controller.

Figure 3 :
Figure 3: Flow diagram for data extraction in PowerFactory and Python.SS DB refers to Steady State results data base, while time DB refers to time domain results data base.

Figure 4 :
Figure 4: ROCOF vs Systems inertia for different dispatch configurations.The subscript "NL" refers to simulation cases with "No line out", while "Line out" refers simulation cases where the line A-C was out of service.

Figure 5 :
Figure 5: Power Flow Index (PFI) for sensitivity analysis.This figure is complementary with Fig. 4.

Figure 6 :
Figure 6: Results of COI-Referred rotor-angle TSI computations under the aforementioned batch of simulations.

Figure 7 :
Figure 7: Results of margin index computations.

TABLE I :
Winter peak load and generation distribution in PST 16 benchmark system.