Power Grid Dynamic Performance Enhancement via STATCOM Data-Driven Control

: This work proposes a data-driven approach to controlling the alternating current (AC) voltage via a static synchronous compensator (STATCOM). This device offers a fast dynamic response injecting reactive power to compensate the voltage proﬁle, not only during load variations but also depending on the operating point established by the grid. The proposed control scheme is designed to improve the dynamic grid performance according to the deﬁned operating point into the grid. The mathematical fundamentals of the proposed control strategy are described according to a (model-free) data-driven-based controller. The robustness of the proposed scheme is proven with several tests carried out using Matlab/Simulink software. The analysis is performed with the well-known test power system of two areas, demonstrating that the proposed controller can enhance the dynamic performance under transient scenarios. As the main strength of the present work with respect to the current state-of-the-art, we highlight the fact that no prior knowledge of the system is required for the controller implementation, that is, a model or a system representation. The synthesis of the controller is obtained in a pure numerical way from data, while it can simultaneously ensure stability in a rigorous way, by satisfying Lyapunov conditions.


Introduction
The technical regulations about environmental issues and the use of renewable energy sources (RES) set robust planning expansion programs due to the increasing energy demand. This leads to analysis of the system constraints, aiming to avoid instability scenarios defined by the load-ability limits [1]. Voltage stability is of utmost importance in electrical power systems studies and is related to reactive power compensation. In this context, flexible AC transmission system (FACTS) devices have been developed not only to offer a fast dynamic response of reactive power compensation but also to prevent the occurrence of synchronous resonance in large power systems [2,3]. In the literature, it has been reported that static synchronous compensator (STATCOM) presents promising results in dynamic reactive power compensation, voltage regulation and also helping to reduce power fluctuations [4,5].
During transient events, a power system may exhibit low-frequency power oscillation between two or more interconnected areas, also called inter-area oscillations, that are in a range of 0.1-1.0 Hz according to [6]. It is well-known that a STATCOM model not only provides good support of voltage control but can also improve the dynamic performance of the grid during transient events, in other words, is able to enhance the voltage recovery time and limits, and it is expected to have a better performance during power oscillations. As a consequence, a STATCOM is a good alternative to provide power oscillation damping (POD) [7]. This task is commonly carried out using power system stabilizers (PSS) to damp low-frequency power oscillations, which consists of an auxiliary control loop that measures the deviation of frequency. However, this is not the main task of a STATCOM, it is rather an inherent response due to its control design and can also include an additional damping controller [8].
Dynamic reactive power compensation can be an effective way to facilitate the interconnection of RES, especially to comply with grid codes regarding reactive power requirements at the point of common coupling (PCC) [9]. For example, in [10], a control scheme based on the fundamentals of a STATCOM is employed in photovoltaic (PV) power plants to reduce power oscillations in power grids, due to an inverter being able to act as a STATCOM; this enables the mitigation of POD during transient events. In [11], a STATCOM is also used in wind power plants to enhance the dynamic performance of the main oscillating modes; in that work, an adaptive network-based fuzzy inference system (ANFIS) controller is employed. Another proposal focused on POD can be found in [12], where a STATCOM is equipped with energy storage so that the combination of real and reactive power injection offers good robustness during the dynamic response of the power system.
On the other hand, different control strategies have been proposed in the literature to enhance the dynamic response of power systems supported by STATCOMs. Many of those approaches present different attributes according to the employed techniques. In [13], a mechanism of POD is based on auxiliary damping controllers defined by a wavelet neural network (WNN), which offers a reduced complexity due to the number of data used as well as its learning capability. In the same way, in [14], a multi-band controller is employed to deal with POD, which is a coordinated design and is optimized based on the operating conditions of the grid. Most of them have been used to design auxiliary control loops aiming to damp power oscillations, like in [8], which presents a control strategy using an additional damper controller (ADC) based on artificial neural networks and deep deterministic policy gradient (DDPG). In another study reported in [15], a datadriven analysis is carried out to adjust and calculate the control gain to enhance the overall system dynamic response to reduce the power oscillations. In contrast with other proposed control strategies, this work is focused on the full control of the voltage source converter (VSC)-based STATCOM without using auxiliary control loops to enhance the dynamic performance.
This paper presents a fully data-driven controller for a VSC-based STATCOM. The general idea is based on the fact that a STATCOM helps to increase the transient stability; this is feasible using well-coordinated controllers or employing other supplementary control functions. In this context, the proposed approach aims to improve the dynamic performance of a VSC-based STATCOM following the fundamentals of a conventional VSC controller. The contribution is underpinned in a data-driven controller to enhance the transient response of a VSC-based STATCOM under different operating conditions of a two area, four-machine power system. The proposed controller offers robustness and adaptability according to the power system requirements that will be reflected in the dynamic performance.
The proposed data-driven control is able to ensure the demanding performance specifications without any prior knowledge of the system. Among such specifications we can highlight stability as the most important one. It is well-known that model-based techniques are able to ensure stability and general performance. However, the limitation of such approach is the requirement of an existing accurate model of the grid and the power converter as a starting point. For instance, in [16] the small signal model of the system is required to design the controller of a STATCOM based on a multilevel converter. Similarly, in [17] the model of the system is required in order to design an adaptive controller for voltage regulation using a STATCOM. Other newer approaches, such as model predictive control (MPC), also require a detailed modeling of the system in order to work properly as can be corroborated in [18,19], where MPC is used as the control strategy for the mitigation of voltage unbalance and reactive power control. Robust control can be also categorized as a model-based technique as can be observed in [20,21], where the system-model derivation is an important step of the controller design procedure. In real-life, a power grid is such a complex system that its model, parameters and general dynamics have a high-level of uncertainty. Consequently, the stability conditions obtained from an idealized model can be compromised during extreme scenarios such as the occurrence of faults. Another alternative is the use of classical proportional (P), proportional and integral (PI) and proportional, integral and derivative (PID) tuning rules, which do not require a model to set-up controller gains. The limitation of these rules, however, is the fact that they cannot guarantee stability unless a system model, for example, transfer function or frequency response traces, is provided (see e.g., [22,23]). Motivated by this problem, we developed a data-driven control technique that is able to ensure performance specifications and by all means stability, as in a model-based technique. Nevertheless, we replace the requirement of a model, by matrices constructed from data and stability conditions provided in terms of linear matrix inequalities (LMIs), which can be easily set-up and numerically solved by traditional MATLAB (Version R2021a, MathWorks, Natick, MA, USA) toolboxes such as Yalmip (free toolbox developed by Dr. Johan Lofberg).
The present paper is organized as follows. In Section 2, a theoretical background is discussed, which sets the basis of the proposed data-driven controller. The conventional state-space model is replaced by data, which is discussed in Section 3; it includes modeling and parametric identification. Section 4 describes the data-driven control design. The conventional and data-driven VSC is derived in Section 5, which includes the development of the state-space model, also known as the model-based. The case of study is depicted in Section 6, which describes the system that is going to be used to test the data-driven controller. In addition, Section 6 also includes the results, and the tests are focused on three aspects: voltage reference changes, power oscillation damping during transient faults, and load shedding. The data-driven controller performance is compared to the conventional controller, which is a state-space model described in [24]. Finally, Section 7 presents the conclusion of the data-driven controller performance.

Theoretical Background
In this section, we introduce the main notation and theoretical elements that constitute the basis of the proposed data-driven controller.

Notation
The notation used throughout the paper is described next. R is the set of reals, and Z + is the set of positive integers. R q stands for real vectors of dimension q. R p×q represents real matrices of dimension p × q. An identity matrix with q rows and q columns is denoted by I q . col(x 1 , x 2 ) is a vector obtained after stacking column vectors x 1 over x 2 . rank(M) denotes the rank of matrix M ∈ R p×q , and colspan(M) represents the set of all linear combinations of its column vectors. σ denotes the shift operator, which applies to a function f : Z + → R q in the form (σ f )(t) := f (t + 1). This operator can be extended to an order N, as (σ N f )(t) := f (t + N).

Linear Difference Systems
Recall that linear difference equations can be used to study discrete-time linear (sampled) systems, which have the following quite general form: where the discrete time function w : Z + → R q maps time instants into physical amounts (or measurements); the maximum degree of the shift operator σ is represented by N; and R i ∈ R p×q (i = 0, 1, . . ., N). The linear difference system (1) can be compactly expressed as: where R(σ) is a p × q polynomial matrix in σ, and represents the laws of the physical system with respect to w. The components of w can be classified as either inputs or outputs. Input functions, denoted by u, are independent (v.g., control variables), and output functions, denoted by y, are results due to the inputs (v.g., state variables). These variables can be accommodated as an input/output partition, that is, w := col(u, y).

Quadratic Difference Forms (QdFs)
Functionals, such as Lyapunov functions, have been traditionally used to study stability and other important properties of linear difference systems. In the present case, we use the notion of quadratic difference forms (QdFs), which are functionals of the discrete-time function w and its time-shifts, that is, where Ψ ∈ R Nq×Nq is referred to as the coefficient matrix of Q Ψ . The rate of change of functional Q Ψ , denoted as ∇Q Ψ (an analogous to a continuous-time derivative), is given by Stability for autonomous systems represented by (2) can thus be studied by means of QdFs. A system is autonomous if the polynomial matrix R(σ) in (2) is square and nonsingular (see [25]). In the present case, we will see that this characteristic is easily achieved since the resultant closed-loop system under study is autonomous. An autonomous linear difference system is asymptotically stable if lim t→∞ w(t) = 0 , ∀w satisfying (2).
A system described by (2) is asymptotically stable, according to the Lyapunov approach, if a QdF Q Ψ exists and is such that, ∀w satisfying (2), the following holds: This QdF Q Ψ that satisfies the above inequalities is referred to as the Lyapunov function.

Stabilization
We are now interested in designing a controller that is not only able to regulate the system variables to a desired set-point, but that can also guarantee stability during disturbances and events that are typical in an electrical system.
In terms of linear difference systems, the equations of the plant and the controller can be represented as in (2), that is, by P(σ)w = 0 and C(σ)w = 0, respectively. Moreover, the interconnected (closed-loop) system can be represented by: where plant P(σ)w = 0 and controller C(σ)w = 0 laws must be simultaneously satisfied by w. This means that, by selecting a suitable controller, we are able to restrict the trajectories of the system to those that are asymptotically stable and discard those that are undesirable, for example, unstable, highly oscillatory, too slow, and so forth. The design of controller C(σ) can impose the stability on (5). For this, it must be guaranteed that, having a partition w = col(u, y), the stability conditions recalled in Section 2.3 for a Lyapunov function candidate Q Ψ , hold for all w satisfying (5). Notice that, if the coefficient matrix satisfies Ψ > 0, then Q Ψ ≥ 0 prevails. Then it is still necessary to guarantee that ∇Q Ψ < 0 ∀w satisfying (5). For this, the description of the closed-loop system can be introduced in the inequality, by considering a polynomial matrix V(σ), which is non zero, and has the same dimensions as R(σ) in (5). In this form, the symmetry necessary to satisfy the inequality is preserved, that is, Notice that the condition imposed by inequality (6) is interpreted as follows. If a QdF Q Ψ ≥ 0 (i.e., Ψ > 0) exists and is such that (6) is satisfied, then asymptotic stability is guaranteed for the interconnected system (5). This follows from the fact that every trajectory w satisfying the interconnected system laws, will cancel out the additional symmetric component (because P(σ)w = C(σ)w = 0), which meets the condition ∇Q Ψ < 0, concerning the trajectories w produced by the closed-loop system (5).
Next, we introduce a numerical solution to this apparently algebraically complex condition. For this, we use a candidate controller whose gains are unknown that will be eventually computed using measurement data, rather than a model of the system. The plant mathematical model will be ultimately substituted by a condition on coefficient matrices built entirely from data.

Bypassing Models Using Data
The main objective of control design based on the data-driven approach is enabling the possibility to synthesize controllers entirely from data of available measurements, which is a simplified route with respect to the classic system identification (modeling and parametric identification) plus a model-based control approach. This is illustrated in Figure 1. Moreover, stability conditions and the desired performance must be completely comparable with a model-based scheme. This is also in sharp contrast with basic empiric gain-tuning rules for classic P, PI, and PID controllers, which do not require a model of the system, but cannot guarantee stability and performance in a deterministic way (see [22,23]). Our present conviction is to generate a controller purely from measurements that permits to omit the need for an explicit mathematical model without losing stability and general performance capabilities with respect to a model-based technique.

System
The process begins with the establishment of essential conditions to assure that the measured data are convenient for control design. In brief, we introduce a test that determines whether the information provided by the available data is sufficient to fully recuperate the system physical laws.

Information Sufficiency
Consider that the sampled external variables w are aligned in a vector of measurement data {w(1), w(2), . . ., w(T)} of length T. Associated with this set of measurements, a Hankel matrix with a depth of L < T ∈ Z + can be defined as follows: Next, the persistency of excitation concept [26] is appealed to; to verify if the available information provided by measurements is sufficient to recuperate the system physical laws, we use. This is a condition that applies for the input functions u in w = col(u, y), which is defined as follows. A vector u = u(1), u(2), . . ., u(T) is said to be persistently exciting (PE) of order L if matrix H L (u) has full row rank.
Assume that u is PE of at least order L, where L equals the sum of the number of inputs plus the state-space dimension (please check Theorem 1 in [26]); out of this, colspan(H L (w)) represents the set of all possible solutions of (2). That is, if the input is PE, then the complete dynamics of the electrical system can be fully described by the set of available measurements. While a model is able to determine all the possible outcomes of an electrical system as the solution of linear difference or differential equations, we are able to do the same by considering the linear combination of the row vectors of the Hankel matrix H L . Consequently, this array of data in a matrix owns the same model information.

Data-Based Coefficient Matrices
In this section we show the connection between matrices constructed from data and the models studied in Section 2.
Consider the above kernel representation (2). Based on (1), the following factorization is obtained: where P (a block matrix) is referred to as the coefficient matrix. It is shown next that this matrix can be directly obtained out of measured data. For this, consider expression (7) for L = N + 1, w with sufficiency of information and N representing the maximum degree of the shift operator. We appeal now to the singular-value decomposition (SVD) which is defined as H N+1 (w) := UΣV , where matrices U and V are square (q × q) and orthogonal; Σ represents a diagonal matrix having non-negative real numbers on its diagonal which are referred to as singular values. Furthermore, there is a number given by r := rank(H N+1 (w)) that accounts for non-zero singular values. It can be demonstrated, out of the last (q − r) rows of zeros of U H(w), that U has annihilators of w (i.e., the set of vectors V such that V w = 0). Therefore, after examining the partition U := U 1 U 2 , where U 1 owns r columns, the left kernel P := U 2 can be retrieved. Notice that matrix U 2 , built entirely from data, owns the same information as that offered by the coefficient matrix P, which is derived from an explicit mathematical model. Based on this proven equivalence, it is possible to get around the need for an explicit mathematical model representation and to directly design controllers considering only measured data and assisted by numerical tools.

Data-Based (Model-Free) Control
This section introduces a method to design stabilizing controllers from measured data. The proposed method involves the calculation of linear matrix inequalities (LMIs). For this, consider first that the elements of (6) can be factored in terms of coefficient matrices as described next. Notice that the energy rate of change can be factored as follows: Based on the coefficient matrix definition for the plant dynamics presented in (8), and defining coefficient matrices for C(σ) and V(σ), the following factorizations can be obtained Notice that, out of factorizations (9) and (10), condition (6) can be entirely written in terms of coefficient matrices, that is, Consequently, if there is a Ψ = Ψ ≥ 0, X ∈ R (N+1)q×(N+1)q and C ∈ R (q−m)×(N+1)q such that (11) is kept valid, then stability is guaranteed for a plant whose coefficient matrix P ∈ R (q−m)×(N+1)q is built upon data. It is noteworthy that the numerical solution of the inequality (11) is a relatively simple issue for conventional MATLAB toolboxes such as Yalmip. Therefore, based solely on measurement data to generate P, the coefficients of a stabilizing controller can be obtained without the need for an explicit mathematical model. In other words, the controller given by C(σ)w = 0 can be realized out of the numerical solution of C in (11).

Candidate Controller for Stabilization
After examining (11), one can conclude that there are several solutions that will deliver convenient stabilization controllers for a certain plant. However, regarding electric power systems, there might be a particular interest in finding solutions that exhibit particular requirements, for instance, the regulation of certain variables despite of disturbances. As an example, in this section, a general convenient controller structure is proposed. The associated gains can be implicit in C, and thus they can be numerically calculated after solving (11).
The controller design process starts by considering the error variables ∆x := x − x * , where x represents the original discrete-time function, while x * is the reference at the equilibrium point (set point). Next, the following proportional feedback current control is proposed: where ∆u := u − u * and ∆y := y − y * are the error variables of the input u and the output y, respectively. We will denote the number of inputs as l and number of outputs as m; consequently K ∈ R m×l . This control loop can guarantee stabilization by a proper computation of K. Moreover, to ensure steady-state error compensation we can add a discrete-time integrator: where z represents an auxiliary state-variable to describe the discrete-time integrator of the output variable error, then G ∈ R m×l . By considering w := col(∆u, ∆y, z) and considering (12) and (13), it is possible to obtain the following representation for the controller: The associated coefficient matrix C is described by: Now the gains in K and G can be numerically computed as a solution of (11) with P the coefficient matrix of the plant, which is obtained out of measured data w, as explained in Section 3.2.

Voltage Source Converters
Several VSC models have been developed and used throughout the past few years. Depending on the approach, a detailed or average model can be employed. The control design of the converter may vary and some designs are more accurate than others, but for large power systems an average model is usually used to reduce the computational effort [27].

Conventional VSC
The conventional VSC is also referred to as an average model, which is represented in Figure 2. This model consists of one controlled voltage source on the AC side, and another controlled current source on the direct current (DC) side. The state space model of the conventional VSC converter is derived by the connection to the grid through a power transformer; therefore, its control can be performed by the impedance Z f among two buses v g and v c , defined by L f and R f . The equivalent circuit of the grid is represented by a grid impedance Z s and a voltage source V s . Figure 2. Average VSC model. According to Figure 2 and considering the Kirchhoff's voltage law in the abc reference frame, the voltage drop along the impedance Z s is: Applying Park's Transformation dq0 and considering ω g as the angular frequency of the rotating system; Equation (16) can be rewritten dividing the real and imaginary parts, giving the next expressions as a result [28]: The d-axis is aligned to the dq0-rotating frame, which provokes the q-component equals zero in steady-state [29]. In this context, to synchronize the dq0-rotating frame a Phase-Locked Loop (PPL) must be used. Therefore, the real and reactive powers in the dq0-rotating frame can be expressed as follows: A VSC is capable of controlling independently active power P (or DC voltage) and reactive power Q (or AC voltage) [24]. Basically, the control consists of two control loops: the outer-control loop and the inner-control loop. Both are derived from the mathematical equations developed previously. The outer-control loop calculates the reference signals for i d * f and i q * f , which are employed as inputs to the inner-control loop. The inner-control loop gives the reference voltage [28] to V c (controlled voltage source). Depending on the target of control, the VSC can work either as a rectifier or inverter. Considering a lossless converter, the power balance equation in the dq0 reference frame is [30]: Expression (21) can also be rewritten as: In this case, Equation (22) provides the input signal to the controlled current source on the DC side of the VSC.

Model-Based Control
The model-based control of a VSC-based STATCOM model consists basically of two control loops. The first one corresponds to the outer loop depending on the variable to be controlled, V ac or V dc . The second one represents the inner loop based on the state-space model defined by expressions (17) and (18). Therefore, the conventional control uses a PI-controller, so that, the inner-control loop can be represented as: The complete details of the conventional model-based control can be found in [31].

Data-Driven Controller
Even though data-driven controllers applied to VSC-based STATCOMs have been used in the past, most of them have been aimed at auxiliary control and not the converter itself [8,15]. Data-driven controllers enable a faster response which is an important feature demanded by any STATCOM model given that it needs to provide voltage support after an external event such as faults or connection/disconnection of loads.
The data-driven based STATCOM model proposed in this work is based on the response of the conventional VSC model. In fact, the data-driven controller consists only of inputs and outputs data and avoids the use of complex mathematical algorithms, which makes it suitable for a large power system that usually requires a high computational burden. The proposed data-driven strategy that is discussed in a general way in Section 4, is now described in terms of the VSC variables for its implementation.
To set-up the controller, it is not required to know any information about the models of the VSC and the grid. The only requirement is the definition of variables available for control and measurement, as well as a required operating point, that is, a set-point. We call these external variables accommodated in a vector w. To denote the desired value of the external variables at the equilibrium, that is, a set-point, we use the notation w * . Then error variables are denoted by ∆w = w − w * . Then a set of measurements containing w(1), w(2), . . ., w(T) can be used to generate ∆w(1), ∆w(2), . . ., ∆w(T), simply by subtracting the operating point value.
In this case, we selected ∆i d , ∆i q , ∆v dc , ∆v ac , and ∆v d c , ∆v q c as the external variable, since they are typically the available measurements in practice. Moreover, the variables ∆v d c , ∆v q c will permit implementation of the controller, as they provide the voltage reference for the VSC in terms of dq-components.
As described in Section 3.1, the collection of data on these variables permits us to obtain the coefficient matrix P, which replaces the requirement of a model, since it contains sufficient information about the dynamics of the to-be-controlled system. Then, the matrix inequality shown in (11) is implemented using MATLAB and external optimization tools, in this case we used Yalmip. To set up (11), it is necessary to define the adequate sizes of Psi (in this case N = 2 and q = 6) and V (with the same dimension as P. It thus remains to define the matrix C that contains the parameters of the candidate controller. For ease of implementation, we chose a PI configuration as the candidate controller with the following equations: where the variables z 1 , . . ., z 4 are obtained by discrete-time integration, that is, The controller therefore has the following representation: As defined in (8), and as exemplified in (15), the factorization of C(σ) leads to the coefficient matrix C. Finally, the gains K 1 , . . ., K 6 and G 1 , . . ., G 6 are numerically computed by solving (11). Although every version of the software is portable enough to work with different versions, in the present work, it might be of interest that we used MATLAB R2021a, YALMIP R20210331, and the standard LMILAB solver available in MATLAB. The latter was used as a default option, but the results were also corroborated by using SEDUMI 1.1 as a solver. The reader can refer to [32] for more information and more suitable options.
The realization of the controller in terms of a flow diagram is shown in Figure 3. In the following sections, we discuss the performance of the proposed data-driven controller with respect to the model-based strategy introduced in the previous section.
Ts z-1 Ts Figure 3. Data-driven controller for a VSC-based STATCOM model.

Test System
In order to validate the data-driven controller of a VSC-based STATCOM model, a two areas power system is employed. The test system is simulated in Matlab/Simulink software; it is comprised of a 2-area power system connected by two AC transmission lines and two machines in each area; these test systems are well-known, such as the Kundurs 2-area 4-machine power system. The complete details of the electrical grid can be found in [33]. The single-line diagram can be seen in Figure 4. The active power exchange between two areas is around 400 MW, going from area 1 to area 2, and the swing generator corresponds to machine 2, labeled as G2. The STATCOM model is connected to Bus 7 (B7) for controlling the AC bus voltage V ac and the power ratings of the STATCOM can be seen in Appendix A, particularly in Table A1, where a step-up transformer 195 kV/230 kV is employed to connect it to the grid.  Figure 4. Two-area power system [33].
The proposed data-driven control is assessed considering different operating conditions according to the established voltage profile as well as transient faults to analyze power oscillations just after the fault clearing time. All simulations are carried out using Matlab/Simulink software, and a time step T s equal to 1 × 10 −4 is used for the implementation of the data-driven controller. The data-driven controller can be set up from the historical data collected from the grid or even from another model-based closed-loop operation of the STATCOM connected to the grid. Therefore, the data-driven controller will guarantee the dynamic performance of the STATCOM according to the rated reactive power because this will be mainly designed to operate to their limits.
The main advantage of the data-driven controller is that it is completely model-free, while its stability and general dynamic performance are equally deterministic, as if it was based on the existence of a completely accurate model of the grid. To account for this fact, we proceed to make a comprehensible comparison between the two scenarios: model-based and model-free. Other advantages include the ability to bypass the issue arising from model uncertainties, which is the typical weakness of any model-based approach. Based on the described advantages, the proposed approach is validated analyzing the performance of a VSC-based STATCOM model, which is compared to the model-based control system under three different scenarios: (a) by using changes in AC reference voltage; (b) by analyzing the voltage recovery after a three-phase fault; (c) power oscillation damping after the fault clearing time. For either, data-driven and conventional models, an average model of the VSC is used. The PPL parameters and grid parameters are kept the same for both types of controllers.

Voltage Step Response
To demonstrate the performance of the proposed method, we first use a test for comparing both model-based and data-driven control, which consists of changing the AC voltage reference V ac . For this scenario, V * dc remains unchanged given that it should be constant according to [34]; this means that I d and I q should be effectively compensated for by the controller in order to keep V ac and V dc close to their references. Figure 5a shows the results for different set points of AC voltages. First, the V ac is stepped up from 1.006 to 1.044 p.u. at t = 2 s; then, it is also stepped down from 1.044 to 0.98 p.u. at t = 8 s; finally, at t = 12 s the reference changes from 0.97 to 1.022 p.u. Notice that both controls present similar behavior during the changes of voltage; this can be confirmed with the error of differences shown in Figure 5b. Faster response time represents a faster time to reach a new steady-state defined by a particular variable due to reference changes, which can be measured with ∆t. Figure 6 shows a fair comparison of the model-based controller and the proposed method during the first voltage step shown in Figure 5. Notice that ∆t 1 corresponds to the time in which the data-driven controller reaches the new steady-state, while ∆t 2 is the elapsed time by the conventional modelbased control. In conclusion, ∆t 1 corresponds to the settling time which is around 0.242 s, whilst ∆t 2 is close to 0.426. Based on the results, the VSC-based STATCOM model with a conventional controller takes more time to reach the new steady-state compared to the data-driven controller. Other time steps are also used to analyze the dynamic response of the controller, and these are summarized in Table 1.   Figure 7 displays the current flowing from the STATCOM to the grid, current components in the dq reference frame. Notice that a change in the voltage reference does not impact the current component i d significantly as shown in Figure 7a, while the second component i q presents the most noticeable changes due to a voltage change may demand more reactive power, and this will be reflected in the reactive component of the current flowing to the system. Figure 8 presents the dynamical performance of the reactive power, which is injected into the grid according to the objective of control, that is, a higher voltage will be demanding more reactive power (capacitive) and vice-versa.

Voltage Recovery under Transient Faults
Another subject of interest to assess the dynamic performance of a STATCOM is linked to its ability to provide a fast voltage recovery after a transient event by injecting reactive power, which results in improving the power system stability limits [35,36]. In this context, the VSC-based STATCOM model using a data-driven controller is analyzed because the lack of reactive power may deteriorate the bus voltage values as well the power transfer limits [37]. In this work, the voltage recovery is assessed under two different scenarios: (1) a solid-grounded three-phase fault on Bus 7, and (b) a solid-grounded three-phase fault in one of the parallel transmission lines. For both scenarios, the clearing time corresponds to 100 ms.
6.3.1. Transient Fault on Bus 7 Figure 9 shows the dynamic response during a transient fault simulated at Bus 7. Notice that both controllers present small differences in the voltage control. However, a better performance can be observed when the data-driven controller is employed. From Figure 9, one can notice that the proposed control presents a higher voltage overshoot than the model-based control; however, once the fault is cleaned up, the data-driven controller reaches the steady-state faster than the conventional controller. In addition, during any transient fault, the STATCOM will act to maintain the voltage profile according to the AC voltage reference and depending on the fault severity, where sometimes the controller can be saturated. This will be defined by the reactive power requirements during the pre-fault condition, where a larger AC voltage reference will be demanding more reactive power. A fault may also produce a higher overshoot during the transient response, and the controller may be saturated because this has physical limits.   On the other hand, a STATCOM not only offers the capability to improve the power system efficiency due to its fast dynamic response of voltage control but can also help to mitigate low-frequency power oscillations [38]. For example, Figure 11 displays the difference between two rotor angles corresponding to Generator 1 and Generator 2 (defined as slack generator). The results show low-frequency oscillations between both generators when a PSS is used for every generator, except for Generator 4. For all analyzed scenarios, the machine speed deviation is used as an input signal to each PSS. According to the results shown in Figure 11, notice that the proposed controller helps to reduce the power oscillations due to the fast dynamic response to recover the AC voltage at the PCC. In addition, the differences shown in Figure 11 not only depend on the STATCOM but are also due to other generators. This is the main reason that both responses do not match very well during the transient period. However, notice that after some seconds both controllers have the same behavior; this means that the power system has reached the new steady-state. Model−based Data−driven Figure 11. Rotor angles during a fault at Bus 7.

Fault along the Transmission Line
In this case, a transient fault is analyzed, which is cleaned up by opening the circuitbreakers of the faulted transmission line. The dynamic response corresponding to voltage at the PCC is depicted in Figure 12, where significant differences occur between the proposed control scheme and the model-based control. In addition, Figure 13 shows the power flow changes after the fault clearing time. The power flow measurements are taken from the non-faulted transmission line. The power transmission losses are increased due to the presence of only one transmission line. The damping capability is highly noticeable in Figure 14, which shows the rotor angle difference after the clearing time and due to the change of topology caused by the opening of one transmission line. Figures 11 and 14 help to confirm the dynamic performance of the data-driven controller in comparison with the conventional model-based controller. Notice that a better performance is exhibited when the STATCOM is controlled by the data-driven approach. Finally, the described results help to confirm the dynamic performance of the data-driven controller in comparison with the model-based controller, where significant differences appear during the transient period. Table 2 summarizes the controller performance during transient faults after evaluating different time steps; voltage recovery after the fault clearing time. Finally, considering all analyzed variables, the results showed that the data-driven controller offers better performance during transient events because the resulting power oscillations are smaller in magnitude for all analyzed scenarios.

Load Shedding Assessment
One of the last resources to mitigate electric power generation deficiency is load shedding. It consists of disconnecting the less essential loads connected to the grid. An inequality between power generation and consumption affects the power system frequency leading to a collapse [39]. Load shedding is a common practice that can be either beneficial or detrimental to the power system stability. The disconnection of considerable sizing loads creates a mismatch between mechanical and electrical power, causing a positive power acceleration that can lead to power system instability.
To assess the performance of the STATCOM after a load shedding, a 200 MW load is disconnected from Bus 9. The load shedding decreases the power flow between the two areas bringing a new condition to the generation (rotor angles). Figures 15 and 16 show the comparison between the transient response of the model-based and data-driven controllers. Regarding the real and reactive power flows shown in Figure 15, both controllers present quite a similar performance. The transient response of the AC voltage shown in Figure 16 reaches a peak voltage of 1.03 p.u. when the data-driven controller is employed. That voltage is a bit higher than that produced by the model-based controller but both controllers match very well due to both producing the same magnitude on the first oscillation and almost the same settling time. The reactive power injected by the STATCOM can be shown in Figure 16, where both controllers present a similar behavior. Notice that the load shedding will demand less reactive power as expected.

Conclusions
A new control approach based on data-driven was proposed. The fundamentals of design were included, aiming to develop a new control strategy for a STATCOM model. The proposed data-driven control was assessed, considering different operating conditions according to the established voltage profile as well as transient faults to analyze power oscillations just after the fault clearing time. A solid comparison of a VSC-based STATCOM model was developed between a model-based control and a data-driven control approach. The studies were focused on voltage control and power oscillation damping capabilities. For voltage control, two tests were carried out: (a) voltage step response, and (b) voltage recovery under fault scenarios. After testing the scenarios, the authors concluded that the data-driven controller showed a better performance in all scenarios compared to the conventional model-based controller, providing a faster response for voltage control and power oscillations damping. Funding: This research is a product of the Project 266632 "Laboratorio Binacional para la Gestión Inteligente de la Sustentabilidad Energética y la Formación Tecnológica" ["Bi-National Laboratory on Smart Sustainable Energy Management and Technology Training"], funded by the CONACYT-SENER Fund for Energy Sustainability (Agreement: S0019-2014-01).

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

Abbreviations
The following abbreviations are used in this manuscript:

Appendix A
The STATCOM parameters and ratings are a modified version from the one used in [24,40], which are presented in Table A1.