*6.2. 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 *Vac*. For this scenario, *V*∗ *dc* remains unchanged given that it should be constant according to [34]; this means that *Id* and *Iq* should be effectively compensated for by the controller in order to keep *Vac* and *Vdc* close to their references.

Figure 5a shows the results for different set points of AC voltages. First, the *Vac* 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*<sup>1</sup> corresponds to the time in which the data-driven controller reaches the new steady-state, while Δ*t*<sup>2</sup> is the elapsed time by the conventional modelbased control. In conclusion, Δ*t*<sup>1</sup> corresponds to the settling time which is around 0.242 s, whilst Δ*t*<sup>2</sup> 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 5.** Reference changes: (**a**) voltage step comparison and (**b**) errors of differences.

**Figure 6.** Comparison of both control approaches during voltage reference changes.



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 *id* significantly as shown in Figure 7a, while the second component *iq* 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.

**Figure 7.** Currents of the data-driven controller during changes in the AC reference voltage: (**a**) *d*-axis current and (**b**) *q*-axis current.

**Figure 8.** Reactive power at PCC using the data-driven controller with changes in the AC reference voltage.

#### *6.3. 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.
