*4.1. Control Law*

The presented PI-PBC approach can deal with parametric uncertainties in the SCES system when it is modeled using a direct power formulation (see Model (7) and (8)). For its analysis, let us present the general control inputs obtained from Equation (15) as follows

$$u\_d = u\_d^\star + k\_{p1} \left( v^\star \left( p - p^\star \right) - p^\star \left( v - v^\star \right) \right) + k\_{i1} \int \left( v^\star \left( p - p^\star \right) - p^\star \left( v - v^\star \right) \right) dt,\tag{18a}$$

$$\mu\_q = \mathfrak{u}\_q^\star + k\_{p2} \left( q^\star \left( \upsilon - \upsilon^\star \right) - \upsilon^\star \left( q - q^\star \right) \right) + k\_{i2} \int \left( q^\star \left( \upsilon - \upsilon^\star \right) - \upsilon^\star \left( q - q^\star \right) \right) dt,\tag{18b}$$

where *kp*1 and *kp*2 are the proportional gains, and *ki*1 and *ki*2 are the integral gains, respectively.

**Remark 5.** *The components ud and uq in Equation (18) can be neglected as recommended in [16] because they can be considered as constant values to calculate integral actions.*

It is important to mention that the control inputs of Equation (18) can remain robust to parametric uncertainties because they do not depend on any parameter of the system. This implies that small variations in these values (e.g., *l*, *r*, and *csc*) will not compromise the dynamical performance of the SCES system.

Note that in Equation (18), the value of *v*- = *vdvsc* needs to control the active and reactive power interchange between the SCES system and the grid (the values of *p*- and *q*- are defined by the designer because the main interest in SCES applications corresponds to control active and reactive power independently). Therefore, it is necessary to know *vsc* to apply the controller. We start from the energy function of the SCES to compute *vsc*, as follows:

$$\dot{W}\_{\text{sc}}^{\star} = \frac{1}{2} \mathbb{C}\_{\text{sc}} \boldsymbol{\upsilon}\_{\text{sc}}^{\star 2} \to \dot{W}\_{\text{sc}}^{\star} = \boldsymbol{p}\_{\text{sc}}^{\star} = \mathbb{C}\_{\text{sc}} \boldsymbol{\upsilon}\_{\text{sc}}^{\star^2} \tag{19}$$

and the relation between the active power of SCES and VSC can be approximated to *psc* = −*p*-. Hence, *vsc* can be given by

$$\left|\boldsymbol{v}\_{\rm sc}^{\star}\right|^{2} = \frac{1}{\mathbb{C}\_{\rm sc}} \int -\boldsymbol{p}^{\star}\,d\boldsymbol{t} \to \boldsymbol{v}\_{\rm sc}^{\star} = \mathcal{K}\_{i} \sqrt{\int\_{0}^{t} -\boldsymbol{p}^{\star}\,d\boldsymbol{t}},\tag{20}$$

with *Ki* > 0.

It is important to mention that the stability proof shown in Section 3.3 may be compromised by replacing Equation (20) into (18), which is only valid when *vsc* is constant. Therefore, we adopted the time-scale separation assumption between the outer-loop (*vsc*) and the inner PI-PBC described in [17,18]. Interestingly, the assumption deals with the possible lost stability by only adjusting the integral gain in Equation (20).
