*4.3. Case 2. Three-Phase Failure with Line Out of Service after Eight Cycles*

In contrast to case 1, now the postfault condition is with one of the parallel transmission lines 7–8 out of service after the fault is cleared. The fault with six cycles of duration is presented between buses 7–8, close to node 7. The proposed methodology has a behavior similar to case 1, Figures 8 and 9.

**Figure 8.** Angular difference of each machine with respect to number one, case 2.

The angular difference of machines respect to number one are presented in Figure 8. The overshot after the fault is released is bounded and the oscillations of internal machine angle exhibit fast transient respond reaching a new value in steady state. The final condition is due to a new electrical grid topology with one transmission line out of service.

Figure 9a reveals the active power injected by the generator 2. With improved control design stage and dynamic gains, the controllers are adapted to the new power system condition or perturbation presented. The power oscillations are diminished after one second. With only StatCom the oscillations are diminished with low magnitude.

In Figure 9b some voltage magnitudes are presented. At node 8 where StatCom is connected the voltage magnitude returns to the set point, however, it is close to low voltage limit. In the case of faulted node 7, the system tries to return a stable condition, but the voltage is below low limit. Thus, an action of secondary control loop is required to reach the new steady state condition where all variables should be within physical limits.

The evolution of the gains is exhibited in Figure 10a, the updated values allow to get the best performance. All results are in accordance with the expected values of the power system with improved damping ratio due to the design procedure and the inclusion of some dynamic gains. Additionally, the performance of these gains in case 2 is presented in Figure 10a, the initial conditions are equal for both study cases but have different dynamic evolution.

**Figure 9.** Case 2: (**a**) real power at generator 2; (**b**) voltage magnitude in bus of StatCom connection.

In Figure 10b, the control signals for the StatCom are displayed. The calculated gains are meant to get a fast response with limited overshoot, after the transient period both control signals attain a new steady state condition. Similar behavior for both cases is exhibited in these signals.

The deviation respect to initial values is small, and with very fast response (less than one second).

Cases 1 and 2 demonstrate the improved dynamic performance that the power system exhibits by using the variables of this section. The simulation results indicate that critical clearing time has been improved widely. Under this scenario the presented results illustrate the system response when the fault is cleared after six cycles. The prefault and postfault condition are the same.

Then, without loss of generality it is possible to extend our methodology in electric power system with more generators, different FACTS devices, generation plants and emerging technologies. Under these new conditions some minor considerations must be included in B-Spline scheme for on line operation.

**Figure 10.** (**a**) Evolution of dynamic gains and; (**b**) Control signals for the StatCom.

#### **5. Conclusions**

The proposed design methodology includes a complete non-linear representation of large-scale power systems for transient stability studies. Three-phase failure is presented to validate stability. On the base case, the angular difference of the machines is not ensured when failure is released after 8 cycles. The power system presents enhanced dynamic performance when StatCom and PSS are included. The PSS and the StatCom controllers are simultaneously tuned using B-Spline for gain definition, and using typical known values for each gain. Model uncertainties are not included in the design stage because they are considered on the gains updating task, which is performed in each sample time, avoiding model and parameter dependency. The control design stage allows good system performance under a specific operating point but also with other operating conditions or topologies. Moreover, the new proposed technique can be extended to other complex multimachine power systems with several adaptive dynamic controllers.

**Author Contributions:** Conceptualization, R.T.-O.; Data curation, O.A.-M.; Formal analysis, F.B.-C.; Investigation, R.T.-O.; Methodology, R.T.-O., F.B.-C. and A.V.-G.; Supervision, F.B.-C. and A.V.-G.; Validation, O.A.-M.; Writing–original draft, R.T.-O.; Writing–review–editing, A.V.-G. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** No new data were created or analyzed in this study. Data sharing is not applicable to this article.

**Acknowledgments:** R.T.-O. and O.A.-M. thank to the CONACYT-SENER-SUSTENTABILIDAD ENERGÉTICA the support to develop this work under grant CEMIE-REDES PE-A-21. A.V.-G. thanks Universidad Panamericana the support to develop this work. R.T.-O. thanks to the Programa de Apoyo a Proyectos de Investigación e Innovación Tecnológica (PAPIIT) de la UNAM. Con clave UNAM-DGAPA-PAPIIT- IA106920.

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