*3.2. 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:

$$\underbrace{\begin{bmatrix} P\_0 & P\_1 & \cdots & P\_N \end{bmatrix}}\_{\bar{P}} \begin{bmatrix} w \\ \sigma w \\ \vdots \\ \sigma^N w \end{bmatrix} = 0 \\ \text{(8)}$$

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 <sup>V</sup>*<sup>w</sup>* <sup>=</sup> 0). Therefore, after examining the partition *<sup>U</sup>* :<sup>=</sup> *U*<sup>1</sup> *U*<sup>2</sup> , where *U*<sup>1</sup> owns *r* columns, the left kernel *P* := *U* <sup>2</sup> can be retrieved.

Notice that matrix *U* <sup>2</sup> , 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.

### **4. 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:

$$\nabla Q\_{\mathbf{Y}}(w) = \underbrace{\begin{bmatrix} w \\ \sigma w \\ \vdots \\ \sigma^{N} w \end{bmatrix}^{\top} \begin{bmatrix} 0\_{q \times q} & 0\_{q \times Nq} \\ 0\_{Nq \times q} & \hat{\Psi}^{\top} \end{bmatrix} \begin{bmatrix} w \\ \sigma w \\ \vdots \\ \sigma^{N} w \end{bmatrix}}\_{\sigma \mathbf{Q} \mathbf{y}(w)} - \underbrace{\begin{bmatrix} w \\ \sigma w \\ \vdots \\ \sigma^{N} w \end{bmatrix}^{\top} \begin{bmatrix} \hat{\Psi} & 0\_{Nq \times q} \\ 0\_{q \times Nq} & 0\_{q \times q} \\ \vdots & \vdots \\ \sigma^{N} w \end{bmatrix}}\_{\mathbf{Q} \mathbf{y}(w)} \cdot \mathbf{\hat{n}}\_{\mathbf{y}} \tag{9}$$

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

$$
\begin{bmatrix} P(\sigma) \\ \mathbf{C}(\sigma) \end{bmatrix} w = \begin{bmatrix} \dot{\mathcal{P}} \\ \ddot{\mathbf{C}} \end{bmatrix} \begin{bmatrix} w \\ \sigma w \\ \vdots \\ \sigma^N w \end{bmatrix}, \quad V(\sigma)w = \dot{\mathcal{V}} \begin{bmatrix} w \\ \sigma w \\ \vdots \\ \sigma^N w \end{bmatrix}. \tag{10}
$$

Notice that, out of factorizations (9) and (10), condition (6) can be entirely written in terms of coefficient matrices, that is,

$$
\begin{bmatrix} 0\_{q \times q} & 0\_{q \times Nq} \\ 0\_{Nq \times q} & \widetilde{\Psi} \end{bmatrix} + \begin{bmatrix} \widetilde{\Psi} & 0\_{Nq \times q} \\ 0\_{q \times Nq} & 0\_{q \times q} \end{bmatrix} + \widetilde{V}^{\top} \begin{bmatrix} \widetilde{P} \\ \widetilde{\mathcal{C}} \end{bmatrix} + \begin{bmatrix} \widetilde{P}^{\top} & \widetilde{\mathcal{C}}^{\top} \end{bmatrix} \widetilde{V} \ge 0 \; ; \tag{11}
$$

Consequently, if there is a <sup>Ψ</sup> <sup>=</sup> <sup>Ψ</sup> <sup>≥</sup> 0, *<sup>X</sup>* <sup>∈</sup> <sup>R</sup>(*N*+1)*q*×(*N*+1)*<sup>q</sup>* and *<sup>C</sup>* <sup>∈</sup> <sup>R</sup>(*q*−*m*)×(*N*+1)*<sup>q</sup>* such that (11) is kept valid, then stability is guaranteed for a plant whose coefficient matrix *<sup>P</sup>* <sup>∈</sup> <sup>R</sup>(*q*−*m*)×(*N*+1)*<sup>q</sup>* 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:

$$
\Delta u := -K \Delta y \,, \tag{12}
$$

where Δ*u* := *u* − *u*<sup>∗</sup> and Δ*y* := *y* − *y*<sup>∗</sup> 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 *<sup>K</sup>* <sup>∈</sup> <sup>R</sup>*m*×*<sup>l</sup>* .

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:

$$
\Delta u = -K \Delta y - Gz \; ; \quad \sigma z = z + \Delta y \; ; \tag{13}
$$

where *z* represents an auxiliary state-variable to describe the discrete-time integrator of the output variable error, then *<sup>G</sup>* <sup>∈</sup> <sup>R</sup>*m*×*<sup>l</sup>* . By considering *w* := col(Δ*u*, Δ*y*, *z*) and considering (12) and (13), it is possible to obtain the following representation for the controller:

$$
\underbrace{\begin{bmatrix} I\_{\rm II} & K & G \\ 0\_{m \times I} & -I\_I & \sigma I\_m - I\_m \end{bmatrix}}\_{C(\sigma)} \begin{bmatrix} \Delta \mu \\ \Delta y \\ z \end{bmatrix} = 0 \; . \tag{14}
$$

The associated coefficient matrix *C* is described by:

$$
\widetilde{\mathcal{L}} = \begin{bmatrix} I\_m & K & G & 0\_{m \times m} & 0\_{m \times I} & 0\_{m \times I} \\ 0\_{l \times m} & -I\_l & -I\_l & 0\_{l \times m} & -I\_l & \sigma I\_l \end{bmatrix} . \tag{15}
$$

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.

## **5. 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].
