**1. Introduction**

The rapidly growing energy demand has driven the fast deployment and development of renewable energy which involves advanced electronic devices to generate power. Generally speaking, such electrical power usually needs to be converted, e.g., DC (direct current)-DC(direct current) boost or buck, AC (alternating current)-DC (rectifier mode), DC-AC (inverter mode), etc., to provide a proper power supply to satisfy various power demanders. In the past decade, thanks to the advancement of modern electronics technology, studies on voltage source converters (VSC) utilizing insulated gate bipolar transistors (IGBT) have gained considerable attentions and interests around the globe [1]. VSC has many advantages over the conventional current source converter (CSC), e.g., decoupled control of the active power and reactive power and the communication process can successfully be achieved without external voltage source supply. Several typical VSC applications can be traced to VSC-based high voltage direct current (VSC-HVDC) systems [2], doubly fed induction generation (DFIG) [3], permanent magnetic synchronous generator (PMSG) [4], and photovoltaic (PV) inverter [5]. So far, VSC plays a major role in distributed generation (DG) systems [6–8] to ensure a reliable power supply.

In practice, it often requires VSC to operate rapidly to ensure the reactive power and DC voltage can be regulated in time when it operates at rectifier mode, while achieving the regulation of the reactive power and active power when it operates at inverter mode. Hence, the proper design of control systems plays an important role in VSC operation. Conventional proportional–integral–derivative (PID) control has acquired wide applications, since the one-point linearization is always used when the control parameters are tuned, once the operation points change the overall control performance of PID controller may decline significantly [9]. Such issue become particularly severe for DG systems as they often operate under stochastic atmospheric conditions, such as random wind speed variation, solar irradiation, and temperature change.

To resolve this challenging issue, many advanced control strategies have been developed, such as feedback linearization control (FLC) [10] applied in VSC-HVDC systems, which fully removes the nonlinearities of the system to guarantee a global control consistency under different operation conditions. Nevertheless, FLC requires a system model which can precisely describe the characteristics of the system and fully state measurements, thus it lacks robustness for the parameters of ideal model change and is difficult to be implemented in practice. To enhance the robustness, sliding-mode control (SMC) [11] was applied to VSC-HVDC system. However, chattering may emerge from SMC due to the use of discontinuous functions in the controller loop, together with an increased scale of controller structure complexity. Meanwhile, in reference [12], a passivity-based sliding-mode control (PBSMC) scheme was employed for rotor-side VSC of PMSG to efficiently undertake maximum power point tracking (MPPT) under different wind profiles. However, it requires many state measurements and an accurate system model which is hard to achieve in reality, thus making its implementation questionable. Moreover, a robust sliding-mode control (RSMC) strategy was developed on the rotor-side VSC of DFIG to enhance the robustness under modelling uncertainties [13], which largely increased the complexity and resulted in an overconservativeness due to the upper bound of perturbation used, which does not often occur in practice. In addition, model predictive control (MPC) has been applied on PV inverters to achieve a rapid power regulation in the presence of modelling uncertainties [14], which, however, needs to employ extra control loops, thus, the system complexity becomes significant. Besides, literature [15] adopted an effective control strategy, in which a disturbance estimator-based predictive current controller is utilized for PV inverters to estimate the unknown PV inverter parameters and modelling uncertainties. However, it introduces a large number of estimator gains for which tuning is difficult.

Basically, the aforementioned nonlinear approaches have a relatively complex structure, thus their implementation is usually difficult. Based on extended state observer (ESO) [16–18], a nonlinear adaptive control (NAC) strategy for VSC operating in both rectifier mode and inverter mode is proposed in this paper. The combined influence of system nonlinearities, uncertain parameters, unmodelled dynamics, and time-varying external disturbances can be synthesized into a perturbation, which can be estimated through a high-gain perturbation observer (HGPO) [19–21]. NAC only requires the measurement of DC voltage and reactive power for rectifier mode, and active power and reactive power for inverter mode. Thus, it provides the merit of inherently easy implementation in real systems.

However, NAC involves many parameters that need to be properly tuned, e.g., (a) observer gains which determine the perturbation estimation performance and (b) controller gains which influence the control performance. These gains are interactively coupled, thus, the optimal tuning of them is worth studying. To handle this issue, this paper aimed to design an optimal NAC (ONAC) strategy to achieve optimal parameter tuning of NAC for VSC, such that an optimal and robust control can be achieved under different operation scenarios. In particular, a newly emerging biology based metaheuristic algorithm was utilized, called memetic salp swarm algorithm (MSSA) [22], to tune the parameters of NAC more optimally and efficiently, such that the control performance of NAC can be optimized. More specifically, the salp chains adopted by MSSA are multiple independent ones, such a strategy can better balance exploration and exploitation, thus, a high-quality optimum can be efficiently found. Besides this, a novel regroup operation using a virtual population is employed to globally coordinate different salp chains, such that the convergence stability can be considerably improved.

Lastly, the proposed ONAC is compiled and downloaded into the dSPACE processor as the real-time controller for VSC, in which the I/O interface of dSPACE simulator enables the real-time sampling of inputs from measurements and output control signals with IGBT converters. Several case studies were done to verify the hardware practicality of ONAC based inverter controller and rectifier controller.

The originality and novelty of this work can be summarized as follows:


The structure of this paper is organized as follows: Section 2 presents the VSC modelling; Section 3 provides the ONAC design; in Section 4, ONAC design for VSC is given; Section 5 presents the experimental results of ONAC; lastly, Section 6 concludes the whole paper.

#### **2. VSC Modelling**

VSC can be operated in either rectifier mode (which can achieve the regulation of the reactive power and DC voltage) or inverter mode (which can achieve the regulation of the reactive power and active power). Figure 1 presents a typical structure of VSC. Here, the balanced condition has been taken into consideration, i.e., the parameters of three phases on the AC side are totally the same and the amplitude of voltages and currents are identical, while each phase shifts 120◦ between themselves. When the angular frequency is ω, the rectifier dynamics in d-q rotational frame can be expressed as [9]:

$$\begin{cases} \frac{\text{d}\mathbf{i}\_{\text{d1}}}{\text{d}\mathbf{t}} = -\frac{\mathcal{R}\_{1}}{L\_{1}}\mathbf{i}\_{\text{d1}} + \omega \mathbf{i}\_{\text{q1}} + \boldsymbol{\mu}\_{\text{d1}}\\ \frac{\text{d}\mathbf{i}\_{\text{q1}}}{\text{d}\mathbf{t}} = -\frac{\mathcal{R}\_{1}}{L\_{1}}\mathbf{i}\_{\text{q1}} - \omega \mathbf{i}\_{\text{d1}} + \boldsymbol{\mu}\_{\text{q1}}\\ \frac{\text{d}V\_{\text{dc1}}}{\text{d}\mathbf{t}} = \frac{\mathcal{R}\_{\text{bq}}\mathbf{i}\_{\text{q1}}}{2\mathbf{C}\_{1}V\_{\text{dc1}}} - \frac{\mathcal{I}\_{\text{l}}}{\mathcal{C}\_{1}} \end{cases} \tag{1}$$

where the rectifier is linked to the AC grid by the equivalent resistance *R*<sup>1</sup> and inductance *L*1, respectively, *<sup>C</sup>*<sup>1</sup> represents the capacitance of DC bus, *<sup>u</sup>*d1 <sup>=</sup> *<sup>u</sup>*sd1−*u*rd *<sup>L</sup>*<sup>1</sup> and *<sup>u</sup>*q1 <sup>=</sup> *<sup>u</sup>*sq1−*u*rq *<sup>L</sup>*<sup>1</sup> . *i*<sup>L</sup> denotes the DC current that flows out of the rectifier.

The inverter dynamics in d-q rotational frame are written as:

$$\begin{cases} \frac{\text{di}\_{\text{d2}}}{\text{d1}} = -\frac{R\_2}{L\_2}i\_{\text{d2}} + \omega i\_{\text{q2}} + \mu\_{\text{d2}}\\ \frac{\text{di}\_{\text{q2}}}{\text{d1}} = -\frac{R\_2}{L\_2}i\_{\text{q2}} - \omega i\_{\text{d2}} + \mu\_{\text{q2}}\\ \frac{\text{d}V\_{\text{d2}}}{\text{d1}} = \frac{3\mu\_{\text{sq2}}i\_{\text{q2}}}{2C\_2V\_{\text{d2}}} + \frac{i\_{\text{l}}}{C\_2} \end{cases} \tag{2}$$

where the inverter is linked to the AC grid by the equivalent resistance *R*<sup>2</sup> and inductance *L*2, respectively, *<sup>C</sup>*<sup>2</sup> represents the capacitance of DC bus, *<sup>u</sup>*d2 <sup>=</sup> *<sup>u</sup>*sd2−*u*rd *<sup>L</sup>*<sup>2</sup> and *<sup>u</sup>*q2 <sup>=</sup> *<sup>u</sup>*sq2−*u*rq *<sup>L</sup>*<sup>2</sup> .*i*<sup>L</sup> denotes the DC current that flows into the inverter.

**Figure 1.** The structure of voltage source converters (VSC).

On the rectifier side, the *q*-axis is defined to share the same phase with the AC grid voltage *u*s1. Similarly, the *q*-axis and the AC grid voltage *u*s2 are defined to share the same phase on the inverter side. Under this circumstance, the values of *u*sd1 and *u*sd2 can be regarded as 0, while the values of *u*sq1 and *u*sq2 are deemed as identical with the magnitude of *u*s1 and *u*s2. Hence, the reactive and active power can be described by

$$\begin{cases} P\_1 = \frac{3}{2} (\mu\_{\rm sq1} i\_{\rm q1} + \mu\_{\rm s21} i\_{\rm d1}) = \frac{3}{2} \mu\_{\rm sq1} i\_{\rm q1} \\\ Q\_1 = \frac{3}{2} (\mu\_{\rm sq1} i\_{\rm d1} + \mu\_{\rm s21} i\_{\rm q1}) = \frac{3}{2} \mu\_{\rm sq1} i\_{\rm d1} \\\ P\_2 = \frac{3}{2} (\mu\_{\rm sq2} i\_{\rm q2} + \mu\_{\rm s22} i\_{\rm d2}) = \frac{3}{2} \mu\_{\rm sq2} i\_{\rm q2} \\\ Q\_2 = \frac{3}{2} (\mu\_{\rm sq2} i\_{\rm d2} + \mu\_{\rm s22} i\_{\rm q2}) = \frac{3}{2} \mu\_{\rm sq2} i\_{\rm d2} \end{cases} \tag{3}$$

#### **3. Optimal Nonlinear Adaptive Control**

#### *3.1. Nonlinear Adaptive Control*

The standard form of an uncertain nonlinear system can be expressed as follows:

$$\begin{cases} \dot{\mathbf{x}} = A\mathbf{x} + B(a(\mathbf{x}) + b(\mathbf{x})\boldsymbol{u} + d(t)) \\ \mathbf{y} = \mathbf{x}\_1 \end{cases} \tag{4}$$

where *x* = [*x*1, *x*2, ··· , *xn*] <sup>T</sup> ∈ *R<sup>n</sup>* represents the state variable vector; *y* ∈ *R* and *u* ∈ *R* denote the system output and control input, respectively; *a*(*x*): *Rn* → *R* and *b*(*x*): *Rn* → *R* represent the unknown smooth functions which describe the aggregation influence of nonlinearities, parameter uncertainties, and unmodelled dynamics; and *d*(*t*): *R*<sup>+</sup> → *R* means the time-varying external disturbances.

The perturbation of system (4) can be obtained by [19–21]

$$
\Psi'(\mathbf{x}, u, t) = a(\mathbf{x}) + (b(\mathbf{x}) - b\_0)\boldsymbol{\mu} + d(t) \tag{5}
$$

where *b*<sup>0</sup> represents a constant control gain defined by users, by which the uncertainties of the control gain *b*(*x*) can be synthesized into the perturbation.

From system (4), the final state, e.g., *xn*, can be further expressed as

$$
\dot{\mathbf{x}}\_{\text{ll}} = a(\mathbf{x}) + (b(\mathbf{x}) - b\_0)\boldsymbol{\mu} + d(\mathbf{t}) + b\_0 \boldsymbol{\mu} = \Psi(\mathbf{x}, \boldsymbol{\mu}, \mathbf{t}) + b\_0 \boldsymbol{\mu}.\tag{6}
$$

Besides, the perturbation term can be expressed by defining an extended state, e.g., *xn*+<sup>1</sup> = Ψ(*x*, *u*, *t*). Further, system (4) can be described by

$$\begin{cases} \begin{array}{c} y = x\_1 \\ \dot{x}\_1 = x\_2 \\ \vdots \\ \dot{x}\_n = x\_{n+1} + b\_0 u \\ \dot{x}\_{n+1} = \dot{\Psi}(\cdot) \end{array} \end{cases} \tag{7}$$

Under the two assumptions given in [19–21], the extended state vector can be represented by *x*<sup>e</sup> = [*x*1, *x*2, ··· , *xn*, *xn*+1] T.


In this paper, *<sup>x</sup>* <sup>=</sup> *<sup>x</sup>* <sup>−</sup> *<sup>x</sup>*<sup>ˆ</sup> denotes the estimation error of *<sup>x</sup>* and *<sup>x</sup>*<sup>ˆ</sup> means the estimation of *<sup>x</sup>*, while *x\** represents the reference of variable *x*. We designed an (*n* + 1)th-order HGSPO (high-gain state and perturbation observer) for the expanded system (8) to evaluate the states and perturbation at the same time, as follows [19–21] .

$$
\hat{\mathfrak{X}}\_{\mathfrak{C}} = A\_0 \hat{\mathfrak{x}}\_{\mathfrak{C}} + B\_1 \mathfrak{u} + H(\mathfrak{x}\_1 - \hat{\mathfrak{x}}\_1) \tag{8}
$$

where *<sup>H</sup>* = α1/ε, α2/ε2, ... , α*n*/ε*n*, α*n*+1/ε*n*+<sup>1</sup> T , thickness layer boundary of observer 0 ≤ ε 1, thus a high-gain can be successfully obtained in this way; and α*i*, *i* = 1, 2, ··· , *n* + 1 represents the gains of Luenberger observer—proper choice of its value can help to ensure the poles of polynomial *sn*<sup>+</sup><sup>1</sup> + α1*sn* + α2*sn*−<sup>1</sup> + ··· + α*n*+<sup>1</sup> = (*s* + λα) *<sup>n</sup>*+<sup>1</sup> = 0 are located at the open left-half complex plane at −λα, as follows

$$\alpha \coloneqq \mathbb{C}\_{n+1}^{i} \lambda\_{a\prime}^{i} \, i = 1, 2, \cdots, n+1 \tag{9}$$

where λα represents the observer root utilized for ensuring the convergence of observer.

The NAC for system (4) under the estimation of states and perturbation can be written as

$$u = \frac{1}{b\_0} \left[ \mathbf{x}\_1^{\*(n+1)} - \hat{\Psi}(\cdot) - K(\hat{\mathbf{x}} - \mathbf{x}^\*) \right] \tag{10}$$

where *K* = [*k*1, *k*2, ··· , *kn*] represents the feedback control gain which makes the matrix *A*<sup>1</sup> = *A*-*BK* Hurwitzian.

Note that the closed-loop system stability of NAC has been provided in previous studies, interested readers can refer to literatures [19–21] for more details.

#### *3.2. Memetic Salp Swarm Algorithm*

MSSA is an emerging and promising metaheuristic algorithm which mimics the food hunting behavior of salp chains in deep oceans. Note that only the main idea of MSSA is presented in this section while more details are introduced in literature [21] for interested readers.

#### 3.2.1. Optimization Framework

The memetic computing framework is utilized in MSSA for the purpose of improving the searching efficiency of SSA, which consists of two steps shown in Figure 2, as follows [22]:

• Local search in each chain: Several various salp chains are connected in parallel to constitute MSSA, in which a single salp chain consists of a host of salps. At each iteration, on the basis of foraging behavior of SSA, all the salp chains will undertake a local search while this process is independently carried out in each salp chain.

• Global coordination in virtual population: The whole species group of MSSA can merely be considered as a large number of memes, in which each meme is deemed as a unit of cultural evolution [23]. In particular, positive strategy is adopted in the selection of memes to enhance the communication ability among the salps in MSSA (memetic salp swarm algorithm). Besides, each individual can keep its own physical characteristics stable during the process of global coordination. Therefore, the salps gather together can be considered as a virtual population, where all individuals need to rearrange into many new salp chains, thus various salp chains can achieve a global coordination.

**Figure 2.** Optimization framework of memetic salp swarm algorithm (MSSA).

#### 3.2.2. Local Search in Each Chain

The salp chain is composed of two groups, i.e., leader and follower. As illustrated by Figure 2, the leader always stays at the first position of the chain to decide the moving direction of the swarm, while all the other salps act as the followers to execute the command. In SSA (salp swarm algorithm), the position of each salp can be mathematically represented. Basically, the leader's position in the *m*th salp chain during the foraging process is expressed as [24]:

$$\mathbf{x}\_{m1}^{j} = \begin{cases} F\_m^j + c\_1 \big( c\_2 \big( \mu b^j - lb^j \big) + lb^j \big), & \text{if } c\_3 \ge 0\\ F\_m^j - c\_1 \big( c\_2 \big( \mu b^j - lb^j \big) + lb^j \big), & \text{if } c\_3 < 0 \end{cases} \tag{11}$$

where the superscript *j* denotes the *j*th dimension of the searching space; *x<sup>j</sup> <sup>m</sup>*<sup>1</sup> represents the leader's position in the *m*th salp chain; *F<sup>j</sup> <sup>m</sup>* means the position of the food source; *lb<sup>j</sup>* and *ub<sup>j</sup>* represent the lower and the upper bounds of the *j*th dimension, respectively; *c*1, *c*2, and *c*<sup>3</sup> represent the random numbers, while *c*<sup>2</sup> and *c*<sup>3</sup> are uniformly distributed in the range of 0–1, respectively.

Since *c*<sup>1</sup> acts as the most vital parameter in Equation (11) as it directly influences the trade-off between global exploration and local exploitation, for the purpose of realizing a more appropriate balance, it has been designed based on the iteration number, which can be written as [24]:

$$\mathcal{L}\_1 = 2\mathcal{e}^{-\left(\frac{4k}{k\_{\text{max}}}\right)^2}.\tag{12}$$

where *k* represents the number of current iteration and *k*max denotes the maximum iteration number. Moreover, the position of the followers is updated as follows [24]:

$$\mathbf{x}\_{mi}^{j} = \frac{1}{2} \left( \mathbf{x}\_{mi}^{j} + \mathbf{x}\_{m, i-1}^{j} \right), \quad i = 2, 3, \dots, n; \ m = 1, 2, \dots, M \tag{13}$$

where *x<sup>j</sup> mi* represents the position of the *i*th salp in the *m*th salp chain; *n* denotes the population size of each salp chain; and *M* means the salp chains number, respectively.

#### 3.2.3. Global Coordination in Virtual Population

For the purpose of enhancing the stability of convergence, the virtual population need to be rearranged and generate various new salp chains based on the fitness values of the salps. In particular, the regroup operation of the original population in MSSA is achieved according to the classical memetic algorithm called shuffled frog leaping algorithm (SFLA) [25], which is a widely utilized population partition principle. Therefore, through arranging the fitness value in descending order the maximum optimization of regroup operation can be realized. Here, the best solution is allocated to the salp chain #1, then the salp chain #2 will capture the second-best solution, and so on. Hence, the *m*th salp chain can update the swarm according to

$$\mathbf{Y}^{m} = \begin{cases} (\mathbf{x}\_{mi}, f\_{mi}) \Big| \mathbf{x}\_{mi} = \mathbf{X}(m + M(i - 1), \mathbf{:}), & f\_{mi} = F(m + M(i - 1)), \\ \mathbf{i} = \mathbf{1}, \mathbf{2}, \cdots, \mathbf{n} \big|, & m = 1, 2, \cdots, M \end{cases} \tag{14}$$

where *xmi* represents the position vector of the *i*th salp in the *m*th chain; *fmi* denotes the fitness value of the *i*th salp in the *m*th chain; *F* means the fitness value set of all the salps in descending order; and *X* represents the relevant position vector set of all the salps, i.e., a position matrix, by

$$X = \begin{bmatrix} x\_1^1 & x\_1^2 & \cdots & x\_1^d \\ x\_2^1 & x\_2^2 & \cdots & x\_2^d \\ \vdots & \vdots & \ddots & \vdots \\ x\_{n \times M}^1 & x\_{n \times M}^2 & \cdots & x\_{n \times M}^d \end{bmatrix} \tag{15}$$

where *d* represents the number of dimensions; and each row vector denotes the position vector of each salp.

#### 3.2.4. Optimization Procedure of MSSA

In conclusion, Table 1 demonstrates the overall process of MSSA. When solving a practical optimization issue, the design of fitness function takes on the most important part in the whole procedure, and it needs to take the related objective function and constraints into consideration.



#### **4. ONAC Design for VSC Based Rectifier and Inverter**

#### *4.1. Rectifier Controller Design*

Select system output *y*<sup>r</sup> = [*y*r1*, y*r2 ] <sup>T</sup> = [*Q*1*, V*dc1] T, Q<sup>∗</sup> <sup>1</sup> and <sup>V</sup><sup>∗</sup> dc1 act as the given references of the DC voltage and reactive power, respectively. Throughout this paper, denote *<sup>x</sup>*ˆ*<sup>i</sup>* and *xi* <sup>=</sup> *xi* <sup>−</sup> *<sup>x</sup>*ˆ*<sup>i</sup>* as the estimate and estimate error of system state *xi*, respectively. Define the tracking error as *e*<sup>r</sup> = [*e*r1, *e*r2] <sup>T</sup> = [*Q*1- Q<sup>∗</sup> <sup>1</sup>, *<sup>V</sup>*dc1- <sup>V</sup><sup>∗</sup> dc1] T, differentiate *e*<sup>r</sup> for rectifier (1) and repeat such operation until the control input can appear clearly, as follows

$$
\begin{bmatrix}
\dot{\mathcal{e}}\_{\rm r1} \\
\ddot{\mathcal{e}}\_{\rm r2}
\end{bmatrix} = \begin{bmatrix}
f\_{\rm r1} - \dot{\mathcal{Q}}\_{\rm 1}^{\*} \\
f\_{\rm r2} - \dot{\mathcal{V}}\_{\rm dc1}
\end{bmatrix} + B\mathbf{r} \begin{bmatrix}
u\_{\rm d1} \\
u\_{\rm q1}
\end{bmatrix} \tag{16}
$$

where

$$\begin{cases} f\_{\rm r1} = \frac{3u\_{\rm sq1}}{2} \Big( -\frac{R\_{\rm l}}{L\_{\rm l}} i\_{\rm d1} + \omega i\_{\rm q1} \Big) \\\ f\_{\rm r2} = \frac{3u\_{\rm sq1}}{2\mathcal{C}\_{\rm l} V \rm dc1} \Big[ -\omega i\_{\rm d1} - \frac{R\_{\rm l}}{L\_{\rm l}} i\_{\rm q1} - \frac{i\_{\rm q1}}{V \rm dc1} \Big( \frac{3u\_{\rm sq1} i\_{\rm q1}}{2\mathcal{C}\_{\rm l} V \rm dc1} - \frac{i\_{\rm l}}{\mathcal{C}\_{\rm l}} \Big) \Big] - \\\ \frac{1}{2R\_{\rm l} \mathcal{C}\_{\rm l}} \Big( \frac{3u\_{\rm sq1} i\_{\rm q1}}{2\mathcal{C}\_{\rm l} V \rm dc1} - \frac{i\_{\rm l}}{\mathcal{C}\_{\rm l}} - \frac{3u\_{\rm sq2} i\_{\rm q2}}{2\mathcal{C}\_{\rm l} V \rm dc2} - \frac{i\_{\rm l}}{\mathcal{C}\_{\rm l}} \Big) \end{cases} \tag{17}$$

and

$$B\mathbf{r} = \begin{bmatrix} \frac{3u\_{\text{sq1}}}{2L\_1} & 0\\ 0 & \frac{3u\_{\text{sq1}}}{2C\_1L\_1V\_{\text{dc1}}} \end{bmatrix} \tag{18}$$

The determinant of matrix *B*<sup>r</sup> is obtained as |*B*r| = 9*u*<sup>2</sup> sq1/ 4*C*1*L*<sup>2</sup> 1*V*dc1 , which is nonzero in the entire operation range of the rectifier. Note that the only condition for zero value of |*B*r| is that *u*sq1 = 0, such condition corresponds to the case that the connected AC power grid voltage becomes zero. In practice, when the power gird voltage is below 0.2 p.u., the protection devices of VSC are activated and disconnect/stop the VSC working [8,9]. It is the same to |*B*i| under inverter mode. As a result, VSC will not encounter this extreme case in practice. Hence, the system (16) can be regarded as linearizable, let *v*<sup>r</sup> = [ *v*r1, *v*r2] <sup>T</sup> be the control input of the linear system

$$
\begin{bmatrix} v\_{\rm r1} \\ v\_{\rm r2} \end{bmatrix} = - \begin{bmatrix} k\_{\rm r1} e\_{\rm r1} \\ k\_{\rm r1}' e\_{\rm r2} + k\_{\rm r2}' \dot{e}\_{\rm r2} \end{bmatrix} \tag{19}
$$

where *k*r1, *k r*1, and k r2 represent the positive feedback gains.

Under the assumption that the nonlinearities are all unknown, the perturbations Ψr1(·) and Ψr2(·) can be written as

$$
\begin{bmatrix}
\Psi \mathbf{r1}(\cdot) \\
\Psi \mathbf{r2}(\cdot)
\end{bmatrix} = \begin{bmatrix}
f \mathbf{r1} \\
f \mathbf{r2}
\end{bmatrix} + (B\mathbf{r} - B\_{\mathbf{r0}}) \begin{bmatrix}
u\_{\mathrm{d1}} \\
u\_{\mathrm{q1}}
\end{bmatrix} \tag{20}
$$

where the constant control gain *B*r0 can be expressed as

$$B\mathbf{r}0 = \begin{bmatrix} b\_{\mathbf{r}10} & 0 \\ 0 & b\_{\mathbf{r}20} \end{bmatrix}. \tag{21}$$

Then, system (16) can be represented by

$$
\begin{bmatrix}
\dot{c}\_{\rm r1} \\
\ddot{c}\_{\rm r2}
\end{bmatrix} = \begin{bmatrix}
\Psi r1(\cdot) \\
\Psi r2(\cdot)
\end{bmatrix} + Br0 \begin{bmatrix}
u\_{d1} \\
u\_{q1}
\end{bmatrix} - \begin{bmatrix}
\dot{Q}\_1^\* \\
\dot{V}\_{dc1}^\*
\end{bmatrix}.\tag{22}
$$

Define *z*<sup>11</sup> = *Q*1, a second-order HGPO is given by

$$\begin{cases} \dot{z}\_{11} = \Psi \mathbf{r} \mathbf{1}(\cdot) + \frac{a \mathbf{r} \mathbf{1}}{\varepsilon} (z\_{11} - \mathfrak{z}\_{11}) + b \mathbf{r} \mathbf{1} 0 u\_{\mathrm{d}1} \\\ \dot{\Psi}\_{\mathrm{r}1}(\cdot) = \frac{a \mathbf{r} \mathbf{2}}{\varepsilon^2} (z\_{11} - \mathfrak{z}\_{11}) \end{cases} . \tag{23}$$

Define *z* <sup>11</sup> <sup>=</sup> *<sup>V</sup>*dc1 and *<sup>z</sup>* <sup>12</sup> <sup>=</sup> . *z* 11, a third-order high-gain state and perturbation observer (HGSPO) is obtained by

$$\begin{cases} \dot{\hat{z}}\_{11}^{'} = \hat{z}\_{12}^{'} + \frac{\alpha\_{r1}^{\prime}}{\varepsilon}(z\_{11}^{\prime} - \hat{z}\_{11}^{\prime})\\ \dot{\hat{z}}\_{12}^{'} = \hat{\Psi}\_{\mathbf{r}2}^{\prime}(\cdot) + \frac{\alpha\_{r2}^{\prime}}{\varepsilon^2}(z\_{11}^{\prime} - \hat{z}\_{11}^{\prime}) + \text{br2}0u \text{q1} \\\ \dot{\Psi}\_{\mathbf{r}2}(\cdot) = \frac{\alpha\_{r3}^{\prime}}{\varepsilon^3}(z\_{11}^{\prime} - \hat{z}\_{11}^{\prime}) \end{cases} \tag{24}$$

where αr1, αr2, α r1, α r2, and α r3 represent positive constants with 1 > 0.

The NAC-based rectifier controller based on the estimations of perturbation can be given by

$$
\begin{bmatrix} u\_{\mathrm{d}1} \\ u\_{\mathrm{q}1} \end{bmatrix} = B\_{\mathrm{r}0}^{-1} \begin{bmatrix} -\Psi \mathrm{r} \mathbf{1}(\cdot) \\ -\Psi \mathrm{r} \mathbf{2}(\cdot) \end{bmatrix} + \begin{bmatrix} \dot{Q}\_{1}^{\star} \\ \dot{V}\_{\mathrm{dc}1} \end{bmatrix} + v\_{\mathrm{r}} \begin{bmatrix} \\ \\ \end{bmatrix} \tag{25}
$$

#### *4.2. Inverter Controller Design*

Select system output *y*<sup>i</sup> = [*y*i1, *y*i2] <sup>T</sup> = [*Q*2, *P*2] T, Q<sup>∗</sup> <sup>2</sup> and *<sup>P</sup>*<sup>∗</sup> <sup>2</sup> act as the provided references of the active power and reactive power, respectively. The tracking error can be defined as *e*<sup>i</sup> = [*e*i1, *e*i2] <sup>T</sup> = [*Q*2− Q<sup>∗</sup> <sup>2</sup>, *<sup>P</sup>*2<sup>−</sup> *<sup>P</sup>*<sup>∗</sup> 2] T, differentiate *e*<sup>i</sup> for inverter (2) and repeat such operation until the control input appears, as follows

$$
\begin{bmatrix}
\dot{c}\_{\text{i}1} \\
\dot{c}\_{\text{i}2}
\end{bmatrix} = \begin{bmatrix}
f\text{i}1 - \dot{Q}\_{2}^{\*} \\
f\text{i}2 - \dot{P}\_{2}
\end{bmatrix} + \text{Bi}\begin{bmatrix}
u\_{\text{d2}} \\
u\_{\text{q2}}
\end{bmatrix} \tag{26}
$$

where

$$\begin{cases} \begin{array}{c} f \mathbf{i} \mathbf{1} = \frac{3u\_{\mathrm{sq}2}}{2} \Big( -\frac{R^2}{L^2} i\_{\mathrm{d2}} + \omega i\_{\mathrm{q2}} \Big) \\\ f \mathbf{i} \mathbf{2} = \frac{3u\_{\mathrm{sq}2}}{2} \Big( -\frac{R^2}{L^2} i\_{\mathrm{q2}} + \omega i\_{\mathrm{d2}} \Big) \end{array} \tag{27}$$

and

$$\mathbf{B} \mathbf{i} = \begin{bmatrix} \frac{3u\_{\text{sq}2}}{2L2} & 0\\ 0 & \frac{3u\_{\text{sq}2}}{2L2} \end{bmatrix} \mathbf{j} \tag{28}$$

The determinant of matrix *B*<sup>i</sup> is obtained as |*B*i|= 9*u*<sup>2</sup> sq2/(4*L*<sup>2</sup> 2 , which is nonzero in the whole operation range of the inverter. Such that system (26) can be regarded as linearizable. Let *v*<sup>i</sup> = [*v*i1, *v*i2] <sup>T</sup> be the control input of the linear system

$$
\begin{bmatrix} v\_{i1} \\ v\_{i2} \end{bmatrix} = -\begin{bmatrix} k\_{i1}e\_{i1} \\ k\_{\prime}^{i1}e\_{i2} \end{bmatrix} \tag{29}
$$

where *k*i1 and *k* i1 represent positive feedback gains.

Under the assumption that the nonlinearities are all unknown, the perturbations Ψr1(·) and Ψr2(·) can be written as

$$
\begin{bmatrix}
\Psi \text{i1}(\cdot) \\
\Psi \text{i2}(\cdot)
\end{bmatrix} = \begin{bmatrix}
f \text{i1} \\
f \text{i2}
\end{bmatrix} + \begin{pmatrix}
B \text{i} - B \text{i0} \\
\mu\_{\text{q2}}
\end{bmatrix} \tag{30}
$$

where *B*i0 represents the constant control gain, as follows

$$\text{Bi0} = \begin{bmatrix} bi10 & 0\\ 0 & bi20 \end{bmatrix}. \tag{31}$$

Then system (26) can be rewritten as

$$
\begin{bmatrix}
\dot{\mathbf{e}}\_{\text{i}1} \\
\dot{\mathbf{e}}\_{\text{i}2}
\end{bmatrix} = \begin{bmatrix}
\Psi \text{i} \mathbf{1}(\cdot) \\
\Psi \text{i} \mathbf{2}(\cdot)
\end{bmatrix} + \text{Bi} \mathbf{0} \begin{bmatrix}
u\_{\text{d2}} \\
u\_{\text{q2}}
\end{bmatrix} - \begin{bmatrix}
\dot{Q}\_{2}^{\*} \\
\dot{P}\_{2}^{\*}
\end{bmatrix}.\tag{32}
$$

Similarly, define *z*<sup>21</sup> = *Q*<sup>2</sup> and *z* <sup>21</sup> = *P*2, two second-order HGPOs are designed as

$$\begin{cases} \dot{\mathfrak{z}}\_{21} = \dot{\Psi} \mathbf{i} \mathbf{i} (\cdot) + \frac{a\_{\rm i1}}{\varepsilon} (z\_{21} - \mathfrak{z}\_{21}) + b\_{\rm i10} u\_{\rm d2} \\\ \dot{\Psi}\_{\rm i1} (\cdot) = \frac{a\_{\rm i2}}{\varepsilon^2} (z\_{21} - \mathfrak{z}\_{21}) \end{cases} \tag{33}$$

$$\begin{cases} \dot{\hat{z}}'\_{21} = \Psi \mathbf{i} 2(\cdot) + \frac{a'\_{i1}}{\varepsilon} (z'\_{21} - \hat{z}'\_{21}) + b\_{i20} u\_{\mathbf{q}2} \\\ \dot{\Psi} \mathbf{i} 2(\cdot) = \frac{a'\_{i2}}{\varepsilon^2} (z'\_{21} - \hat{z}'\_{21}) \end{cases} \tag{34}$$

where αi1, αi2, α i1, and α i2 denote positive constants.

The NAC-based inverter controller on the basis of the estimations of perturbation can be given by

$$
\begin{bmatrix} \mu\_{\rm d2} \\ \mu\_{\rm q2} \end{bmatrix} = B\_{\rm i0}^{-1} \begin{bmatrix} -\Psi \text{i} \mathbf{1} (\cdot) \\ -\Psi \text{i} \mathbf{2} (\cdot) \end{bmatrix} + \begin{bmatrix} \dot{Q}\_{2}^{\*} \\ \dot{P}\_{2} \end{bmatrix} + v\_{\rm i} \begin{bmatrix} \\ \end{bmatrix} \tag{35}
$$

#### *4.3. Optimal Control Parameter Tuning*

The controller gains in Equations (19), (25), (29), and (35) and observer gains in Equations (23)–(24) and (33)–(34) are optimally tuned through MSSA under reactive power and active power regulation.

The ultimate purpose of the optimization is to maximumly reduce the tracking error of DC link voltage, reactive power, active power, perturbation estimation error, as well as the total control costs, the model for which can be described by

Minimize *J*(x) = ሾȁܲ െ ܲ כȁ ȁܳ െ ܳ כȁ ȁܸୢୡ െ ܸୢୡ <sup>כ</sup> <sup>ȁ</sup> ߱ଵหߖ෩୰ห߱ଶหߖ෩୧ห߱ଷȁݑୢȁ ߱ସหݑ୯หሿ ் ݐ

$$\text{subject to}\begin{cases}k\_{11}^{\min}\le k\_{11}\le k\_{11}^{\max}\\k\_{11}^{\min}\le k\_{11}^{\prime}\le k\_{11}^{\max}\\k\_{11}^{\min}\le k\_{11}\le k\_{11}^{\max}\\k\_{r1}^{\min}\le k\_{r1}^{\prime}\le k\_{r1}^{\max}\\a\_{il}^{\min}\le a\_{il}\le a\_{il}^{\max}\\a\_{rl}^{\min}\le a\_{il}\le a\_{rl}^{\max}, \ i=1,2\text{ and } j=1,2,3.\end{cases}\tag{36}$$

where ω*i*<sup>1</sup> and ω*i*<sup>2</sup> are two weights used to measure the magnitude of perturbation estimation error which are set to be 0.01; while ω*i*<sup>3</sup> and ω*i*<sup>4</sup> are the weights utilized to measure the magnitude of overall control costs which usually are set to be 0.25; note that the selection of weighting factor value is depended on the magnitude of controller output, perturbation estimation error, and control error. Normally, one should examine their magnitudes and make them have the same order of magnitude. In this paper, through trial and error, it can be found that perturbation estimation is 120 times higher (peak value occurs due to peaking phenomenon of HGPO) than that of control error while controller output is around six times higher than that of control error. Thus, their values are chosen as aforementioned to scale them to have the same order of magnitude. Lastly, *T* = 5 s represents the experiment time, while the control costs are restricted by the limits.

Lastly, the overall control structure of ONAC for VSC is demonstrated in Figures 3 and 4, respectively, in which the space vector pulse width modulation (SVPWM) is utilized for modulating the control inputs [26].

**Figure 3.** The overall optimal nonlinear adaptive control (ONAC)-based control framework of rectifier.

**Figure 4.** The overall ONAC-based control framework of inverter.
