**Applications of Mathematical Models in Engineering**

Editors

**Eva H. Dulf Cristina I. Muresan**

MDPI • Basel • Beijing • Wuhan • Barcelona • Belgrade • Manchester • Tokyo • Cluj • Tianjin

*Editors* Eva H. Dulf Technical University of Cluj-Napoca Romania

Cristina I. Muresan Technical University of Cluj-Napoca Romania

*Editorial Office* MDPI St. Alban-Anlage 66 4052 Basel, Switzerland

This is a reprint of articles from the Special Issue published online in the open access journal *Mathematics* (ISSN 2227-7390) (available at: https://www.mdpi.com/journal/mathematics/special issues/math model eng).

For citation purposes, cite each article independently as indicated on the article page online and as indicated below:

LastName, A.A.; LastName, B.B.; LastName, C.C. Article Title. *Journal Name* **Year**, *Volume Number*, Page Range.

**ISBN 978-3-0365-3847-1 (Hbk) ISBN 978-3-0365-3848-8 (PDF)**

© 2022 by the authors. Articles in this book are Open Access and distributed under the Creative Commons Attribution (CC BY) license, which allows users to download, copy and build upon published articles, as long as the author and publisher are properly credited, which ensures maximum dissemination and a wider impact of our publications.

The book as a whole is distributed by MDPI under the terms and conditions of the Creative Commons license CC BY-NC-ND.

## **Contents**



### **About the Editors**

**Eva H. Dulf**, Professor, received her Ph.D. degree from the Technical University of Cluj- Napoca, Cluj-Napoca, Romania, in 2006, where she is currently Professor in the Automation Department. She has published more than 150 papers and received 39 awards at prestigious International Exhibitions of Inventions. She has been and currently is involved in more than 30 research grants, all dealing with the modeling and control of complex processes. Her research interests include modern control strategies and the modeling of biochemical and medical processes.

**Cristina I. Muresan**, PhD, received a degree in control systems and her Ph.D. degree from the Technical University of Cluj-Napoca, Cluj-Napoca, Romania, in 2007 and 2011, respectively, where she is currently an Associate Professor in the Automation Department. She has published more than 150 papers. She has been and currently is involved in more than ten research grants, all dealing with multivariable and fractional order control. Her research interests include modern control strategies, such as predictive algorithms, robust nonlinear control, fractional-order control, time-delay compensation methods and multivariable systems.

### **Preface to "Applications of Mathematical Models in Engineering"**

The role of applied mathematics has continued to become increasingly important with the advancement of science and technology, ranging from the modeling and analysis of natural phenomena to the simulation, design, control and optimization of systems. With the advancements in computing technology, larger and more complex problems can now be tackled and analyzed in a very timely fashion. As a sample for this, the present book comprises 19 chapters that present a series of contributions in the field.

The manuscripts cover a wide spectrum in terms of the type of problems, methodologies and applications discussed. Different mathematical models are discussed: models for pumps working as turbines considering the modified affinity laws; a reassessment of the rainfall-runoff model and model calibration with inferential statistics; a three-dimensional unsteady aerodynamic force reduction model based on the eXterme Gradient Boosting algorithm in machine learning; a hybrid nanofluid flow model towards a stagnation region of a vertical plate with radiation effects; analytical formulations to calculate magnetic field distribution and stray losses in the transformer region where bushings are mounted, considering a stainless steel insert in the transformer tank; a mathematical model to enhance the freshwater productivity rate of a solar-assisted humidification–dehumidification type of desalination system; statistical modeling of the pressure field at the centerline of the apron along the USBR Type I and II basins; solitary wave solutions of the generalized Rosenau-Korteweg-de Vries-regularized-long wave equation. In the control engineering field, different innovative strategies are presented: an event-based algorithm for fractional-order IMCs for first-order plus dead-time processes, including delay- and lag-dominant ones; the integration of a fixed-structure, multiple-input-multiple-output, fractional-order, proportional-integral-derivative controller in the μ-synthesis optimization problem for different engineering applications; the design, implementation, validation and use of a Computer-Aided Control System Design (CACSD) toolbox for nonlinear and hybrid systems; uncertainty modeling, simulation, and control using μ-synthesis; robust fractional-order control using a decoupled pitch and roll actuation strategy for the I-Support soft robot; a set of tuning rules for Linear Active Disturbance Rejection Controller (LADRC) with three different levels of compromise between disturbance rejection and robustness; a sliding mode control for the precise positioning of a Stewart platform used as a mobile platform in non-destructive inspection applications. The discussed applications range from the development of a control system for fermentation production in batch bioreactors to the design and optimization of gridshell structures or the determination of aircraft cruise altitudes with minimum fuel consumption and time-to-climb, or even the design of a low-cost, performing quadrotor unmanned aerial vehicle using a quaternion-based estimator.

DWe would like to thank the MDPI publishing editorial team, the scientific peer reviewers and all of the authors who have contributed to this volume. We hope that the manuscripts are of value to researchers, academics and professionals involved in the resolution and optimization of real-world engineering problems.

> **Eva H. Dulf and Cristina I. Muresan** *Editors*

### *Article μ***-Synthesis FO-PID for Twin Rotor Aerodynamic System**

**Vlad Mihaly, Mircea ¸Su¸sc ˘a and Eva H. Dulf \***

Department of Automation, Technical University of Cluj-Napoca, Str. G. Bari¸tiu nr. 26-28, 400027 Cluj-Napoca, Romania; vlad.mihaly@aut.utcluj.ro (V.M.); mircea.susca@aut.utcluj.ro (M. ¸S.) **\*** Correspondence: eva.dulf@aut.utcluj.ro

**Abstract:** *μ*-synthesis is a NP-hard optimization problem based on the generalized Robust Control framework which manages to find a controller which fulfills both robust stability and robust performance. In order to solve such problems, nonsmooth optimization techniques are employed to find nearly-optimal parameters values. However, the free parameters available for tuning must be involved only in classical arithmetic operations, which leads to a problem for the fractional-order operator or for its integer-order approximation, exponential operations being involved. The main goal of the current article consists of presenting a possibility to integrate a fixed-structure multipleinput-multiple-output (MIMO) fractional-order proportional-integral-derivative (FO-PID) controller in the *μ*-synthesis optimization problem. The solution consists in a possibility to find a set of tunable parameters isomorphic with the fractional-order such that the coefficients involved in the approximation of the fractional element, along with the formulation of a fixed-structure mixed-sensitivity loop shaping *μ*-synthesis control problem. The proposed design procedure is applied to a twin rotor aerodynamic system (TRAS) using both MATLAB numerical simulation and practical experiments on laboratory scale equipment. Moreover, a comparison with the unstructured *μ*-synthesis is performed, highlighting the advantages of the proposed solution: simpler form and guaranteed robust stability and performance.

**Keywords:** robust control; mixed-sensitivity; *μ*-synthesis; fractional-order control; FO-PID; twin rotor aerodynamic system

#### **1. Introduction**

One of the fundamental problems studied in Control Engineering concerns robustness, which characterizes the sensitivity of the closed loop system to the variation of plant parameters. One of the most used performance measures is the H<sup>∞</sup> norm. Starting from the approach of synthesizing a H<sup>∞</sup> controller by solving two Algebraic Riccati Equations (AREs) as in [1], a more numerically stable solution can be obtained using Popov triplets [2]. Alternatively, due to the limitations of this approach represented by the impossibility of solving singular problems, the AREs were replaced with Algebraic Riccati Inequalities (ARIs) and were solved using Linear Matrix Inequalities (LMIs) [3]. The last two approaches have been recently implemented in open-source manners in [4,5]. However, the classical H<sup>∞</sup> control problem manages to ensure nominal stability and nominal performance only. In order to consider dynamic and parametric uncertainties, the plant is formulated as an upper linear fractional transform with such an uncertainty block and the *μ*-synthesis can be used for computing a robust controller based on the classical *D*–*K* iterations [6]. The major concern about these methods consists of the fact that the controller is usually of high order. However, imposing a fixed structure leads to a non-convex problem which cannot be approximated as in the case of *μ*-synthesis. The solutions, initially proposed for H<sup>∞</sup> problem [7], and then for *μ*-synthesis [8] as well, are based on nonsmooth optimization techniques. A CACSD toolbox that manages to offer an end-to-end solution for designing a robust controller starting from a given plant is presented in [9].

**Citation:** Mihaly, V.; ¸Su¸sc ˘a, M.; Dulf, E.H. *μ*-Synthesis FO-PID for Twin Rotor Aerodynamic System. *Mathematics* **2021**, *9*, 2504. https://doi.org/10.3390/ math9192504

Academic Editor: Ali Farajpour

Received: 8 September 2021 Accepted: 2 October 2021 Published: 6 October 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

The most well-known controller structure, which is highly used in industry, is the proportional-integral-derivative (PID) regulator. Its form is generally given as an example for fixed-structure controllers and nonsmooth optimization methods were designed around it [10]. An extension with two extra degrees of freedom is represented by fractional-order PID (FO-PID), which improves the robustness of the closed loop system. As tuning methods, the well-known methods used for designing integer-order controllers were extended for fractional-order controllers as well. As such, two generalized versions of Kessler's magnitude methods were presented in [11,12], while a fractional-order internal model controller with event-based implementation was developed in [13]. A fractionalorder integrator was used as a model for the servo problem in [14], while the same structure was used as a speed controller for a DC motor in [15]. In [16] crone control methodologies were presented, along with LMI formulation for the H<sup>∞</sup> fractional-order control problem. An artificial bee colony optimization for a MIMO FO-PID controller design by solving the mixed-sensitivity *μ*-synthesis control problem is presented in [17].

The twin rotor aerodynamic system (TRAS) is a well-known benchmark system used to illustrate the control methods designed in literature. A two degrees of freedom (2-DOF) discrete-time *μ*-synthesis controller of order 24 was presented in [18]. A decentralized fixedstructure PID controller designed using H<sup>∞</sup> is presented in [19], along with a comparison between the full-order H<sup>∞</sup> controller. After the linearization and decoupling steps, 2- DOF continuous and discrete-time controllers were designed using H<sup>∞</sup> in [20]. A hybrid architecture using both H<sup>∞</sup> and Iterative Learning Control is described in [21]. A linear quadratic regulator (LQR) for MIMO TRAS problem was designed using particle swarm optimization in [22], while a frequency-based PID controller was combined with a lead compensator designed using root locus in [23]. An approach that further details the controller implementation with quantization aspects taken into consideration for the same family of processes is presented in [24].

In this paper, we present a design procedure that manages to optimize the controller parameters instead of tuning them. As such, we present a method for finding the parameters of a MIMO fractional-order PID (FO-PID) robust controller by solving a fixed-structure mixed-sensitivity loop shaping *μ*-synthesis control problem. Although the resulting control problem is nonconvex in terms of the controller's free parameters, the nonsmooth optimization techniques implemented in MATLAB's Robust Control Toolbox can be used. However, the realp object used for these free parameters does not support exponential operations necessary in the approximation of a fractional-order element. Therefore, we present in this paper an algorithm to construct the approximation function of a fractional-order element using integer-order elements and supported arithmetic operations applied on a free parameter isomorphic to the desired fractional order. As such, we successfully manage to formulate the problem of optimizing the parameters of a MIMO FO-PID such that the available techniques can be used. Moreover, we illustrate our design method on the twin rotor aerodynamic system stand, having both MATLAB simulations and physical experiments.

The remainder of this paper is organized as follows: Section 2 summarizes the main mathematical background in terms of available results in both Robust and Fractional-Order Control, along with the description of the proposed method in terms of the algorithm for approximation of the fractional order element and of the optimization problem; Section 3 starts with the presentation of the simplified nonlinear mathematical model of the TRAS system, the linearized mathematical model around an equilibrium point, and a list of parameters with their numerical values and tolerances which manages to encompass the nonlinearities; in Section 4, the numerical results are presented, starting from the augmentation step, followed by the proposed structure of the controller and the obtain results in MATLAB and on the experimental stand; Section 5 presents the discussions of the obtained results and a comparison with another method for solving the optimization problem, while in Section 6 there are some conclusions and possible research directions.

#### **2. Proposed Method**

In this section, the mathematical background for the proposed controller design method in terms of Robust Control Framework in Section 2.1 and Fractional-Order Control Framework in Section 2.2 is firstly presented, while in Section 2.3 the method for optimizing the controller parameters using a different approach as against the procedure presented in [17] is described.

#### *2.1. Robust Control*

The generalized Robust Control Framework [25] has, besides the control input vector **<sup>u</sup>** <sup>∈</sup> <sup>R</sup>*nu* , two extra inputs: the exogenous input vector **<sup>w</sup>** <sup>∈</sup> <sup>R</sup>*nw* and disturbance input vector **<sup>d</sup>** <sup>∈</sup> <sup>R</sup>*nd* . Additionally, besides the output vector **<sup>y</sup>** <sup>∈</sup> <sup>R</sup>*ny* , the generalized plant contains two extra outputs: the performance vector **<sup>z</sup>** <sup>∈</sup> <sup>R</sup>*nz* and the disturbance output **<sup>v</sup>** <sup>∈</sup> <sup>R</sup>*nv* . The input and output disturbance vectors encompass both parametric and unstructured uncertainties, which are generally modeled by the following set:

$$\Delta = \left\{ \text{diag} \left( \delta\_1 I\_{\mathbb{H}\_1}, \dots, \delta\_\delta I\_{\mathbb{H}\_s}, \Delta\_1, \dots, \Delta\_f \right) \middle| \delta\_k \in \mathbb{R}, \ \Delta\_j \in \mathbb{R}^{m\_j \times m\_j}, \ k = \overline{1, s}, \ j = \overline{1, f} \right\}, \tag{1}$$

where *In* denotes the identity matrix of order *n*.

The uncertainty block **Δ** is interconnected with the generalized plant *P*<sup>Δ</sup> via an upper linear fractional transformation (ULFT), while the controller *K* is interconnected via a lower linear fractional transformation (LLFT) with *P*Δ, as noticed in Figure 1.

**Figure 1.** Generalized plant interconnection with the controller and uncertainty blocks [17].

The state-space representation of the generalized plant *P*Δ is:

$$P\_{\Lambda}: \begin{pmatrix} \dot{\mathbf{x}}(t) \\ \mathbf{v}(t) \\ \mathbf{z}(t) \\ \mathbf{y}(t) \end{pmatrix} = \begin{pmatrix} A & B\_{d} & B\_{w} & B\_{u} \\ \hline C\_{v} & D\_{vd} & D\_{vw} & D\_{vu} \\ C\_{z} & D\_{zd} & D\_{zw} & D\_{zu} \\ C\_{yd} & D\_{yd} & D\_{yw} & D\_{yu} \end{pmatrix} \begin{pmatrix} \mathbf{x}(t) \\ \mathbf{d}(t) \\ \mathbf{w}(t) \\ \mathbf{u}(t) \end{pmatrix}. \tag{2}$$

For robustness analysis, the singular value notion used for H<sup>∞</sup> synthesis was extended to the *structural singular value*, defined for the LLFT interconnection between the plant *P*Δ and the controller *K* according to the uncertainty block **Δ** as:

$$\mu\_{\Lambda}(\text{LLFT}(P\_{\Lambda}, K)) = \sup\_{\omega \in \mathbb{R}\_{+}} \frac{1}{\min\_{\Lambda \in \Lambda} \{ \overline{\sigma}(\Lambda) | \det(I - \text{LLFT}(P\_{\Lambda}, K)(j\omega)\Lambda) = 0 \}}.\tag{3}$$

Given that the problem of explicitly computing such structural singular values is NP-hard, an approximation must be used. The classical H<sup>∞</sup> control problem can be extended to the following optimization problem:

$$\inf\_{\mathcal{K}\text{ stable}} \sup\_{\omega\in\mathbb{R}\_{+}} \mu\_{\mathbf{A}}(\text{LLFT}(P\_{\mathbf{A}\prime}\mathcal{K})(j\omega)),\tag{4}$$

which can be considered solved if there is a controller *K* such that *μ***Δ**(LLFT(*P*Δ, *K*)) < 1, according to main loop theorem. As such, an upper bound is necessary for *μ***Δ**(·) [6]:

$$\mu\_{\Delta}(\text{LLFT}(P\_{\Delta}, K)(j\omega)) \le \inf\_{D \in \mathcal{D}} \overline{\mathcal{I}} \Big( D \cdot \text{LLFT}(P\_{\Delta}, K)(j\omega) \cdot D^{-1} \Big),\tag{5}$$

where the set *D* is defined according to the uncertainty block **Δ** as follows [6]:

$$\mathbf{D} = \left\{ \text{diag}\left( D\_1, \dots, D\_\delta, d\_1 l\_{\mathfrak{m}\_1}, \dots, d\_f l\_{\mathfrak{m}\_f} \right) \middle| D\_k = D\_k^\top \in \mathbb{R}^{n\_k \times n\_k}, \ d\_j > 0, \ k = \overline{1, s}, \ j = \overline{1, f} \right\}. \tag{6}$$

Summarizing, robust stability and robust performance are achieved through a controller *K* obtained as a solution of the optimization problem (4) which manages to obtain an objective value lower than 1. But this NP-hard problem can be approximated by the following quasi-convex problem:

$$\inf\_{\mathcal{K}\text{ stab.}}\sup\_{\omega\in\mathbb{R}\_{+}}\inf\_{D\in\mathcal{D}}\overline{\sigma}\Big(D(j\omega)\cdot\text{LLFT}(P\_{\Delta},\mathcal{K})(j\omega)\cdot(D(j\omega))^{-1}\Big).\tag{7}$$

As already known, the last optimization problem can be solved using the so-called *D*–*K* iteration [9,17]. This iterative procedure starts with a fixed *D* (usually considered the unitary system) and alternatively computes the controller *K*, by solving the H<sup>∞</sup> control problem with fixed *D*, and the *D*-scale factor, by solving the Parrot problem, as defined in [6], for each point from a frequency set Ω = {*ω<sup>l</sup>* = *ω*<sup>1</sup> < ··· < *ω<sup>N</sup>* = *ωu*} followed an approximation of the obtained solutions with a minimum phase system. Therefore, after setting the initial *D*-scale step as *D* = *I*, the following steps are successively applied:

1: The *D*-scale step is fixed and the controller can be computed as:

$$\mathcal{K} = \arg\inf\_{\mathcal{K}\text{ stable}} ||\text{LLFT}(P\_{\Lambda'}\mathcal{K})||\_{\infty}.\tag{8}$$

2: The controller *K* is fixed and the following set of convex problems must be solved:

$$D(j\omega) = \arg\inf\_{D \in D} \overline{\sigma} \Big( D \cdot \text{LLFT}(P\_{\Lambda \nu} K)(j\omega) \cdot D^{-1} \Big),\tag{9}$$

for a given frequency range Ω and, then, a stable minimum phase transfer matrix *D*(*s*) is fitted.

Steps **1** and **2** are executed in a loop sequence until the difference between two consecutive H<sup>∞</sup> norms is less than a prescribed tolerance, the maximum number of iterations is reached, or the improvement after a prescribed number of steps is under an imposed tolerance.

#### *2.2. Fractional-Order Control*

The domain of Fractional-Order Control has recently gained more attention due to their robustness. The fractional integral operator used in Control Engineering is [26]:

$$\mathcal{Z}\_{\mathfrak{a}}\{f(t)\} = \frac{1}{\Gamma(a)} \int\_0^t (t-\tau)^{a-1} f(\tau) d\tau, \ t > 0, \ a \in \mathbb{R}\_+,\tag{10}$$

where <sup>Γ</sup>(·) : <sup>C</sup><sup>+</sup> <sup>→</sup> <sup>C</sup> is the Euler Gamma function. In a similar manner with the integer order integral operator, the fractional order integral operator I*<sup>α</sup>* has the following Laplace transform:

$$
\mathcal{L}\{\mathcal{Z}\_{\mathfrak{a}}\{f(t)\}\}(\mathbf{s}) = \mathbf{s}^{-\mathfrak{a}}\mathcal{L}\{f(t)\}(\mathbf{s}).\tag{11}
$$

As previously stated, the fractional-order calculus can be used to extend the classical 3-DOF proportional-integral-derivative (PID) controller to a fractional-order PID (FO-PID) having two extra DOF *<sup>λ</sup>*, *<sup>μ</sup>* <sup>∈</sup> <sup>R</sup><sup>+</sup> – the order of the integral operator and the order of the

derivative operator, respectively. As such, based on the error signal *ε*(*t*), the command signal *c*(*t*) has the following expression:

$$\varepsilon(t) = K\_P \cdot \varepsilon(t) + K\_I \cdot \mathcal{Z}\_{\lambda} \{\varepsilon(t)\} + K\_D \cdot \mathcal{Z}\_{-\mu} \{\varepsilon(t)\},\tag{12}$$

where *c*(*t*) would be *u*(*t*) and *ε*(*t*) would be *r*(*t*) − *y*(*t*) according to the generalized framework from Figure 1, while the differences between the transfer functions of these two controllers are:

$$H\_{PID}(\mathbf{s}) = K\_P + \frac{K\_I}{\mathbf{s}} + K\_D \mathbf{s} \quad \Rightarrow \quad H\_{FO-PID}(\mathbf{s}) = K\_P + \frac{K\_I}{\mathbf{s}^\lambda} + K\_D \mathbf{s}^\mu. \tag{13}$$

The main drawback of the FO-PID revolves around the implementation of the fractional order elements. One possible solution is the Oustaloup recursive approximation (ORA) introduced in crone toolbox [16]. The approximation of a fractional-order element *<sup>s</sup><sup>λ</sup>* with an integer-order one is detailed for *<sup>λ</sup>* <sup>∈</sup> (0, 1), but it can be easily extended for *<sup>λ</sup>* <sup>∈</sup> <sup>R</sup>. The ORA representation receives as inputs three parameters: the order *<sup>N</sup>* of the LTI system which approximates the fractional-order element, along with the lower bound *ω<sup>l</sup>* and the upper bound *ω<sup>u</sup>* of the frequency range where the approximation is valid. The LTI approximation is:

$$s^{\lambda} \approx \prod\_{k=1}^{N} \frac{1 + s/\hat{\omega}\_k}{1 + s/\hat{\omega}\_k},\tag{14}$$

where the poles and zeros frequencies can be computed using two coefficients:

$$
\varepsilon = \left(\frac{\omega\_{\rm u}}{\omega\_{\rm l}}\right)^{\frac{1}{N}} \quad \text{and} \quad \eta = \left(\frac{\omega\_{\rm u}}{\omega\_{\rm l}}\right)^{\frac{1-\lambda}{N}},\tag{15}
$$

followed by the recursive relations:

$$
\mathring{\omega}\_1 = \omega\_l \sqrt{\eta}\_1 \tag{16a}
$$

$$
\hat{\omega}\_{\mathbf{k}} = \stackrel{\circ}{\omega}\_{\mathbf{k}} \cdot \boldsymbol{\varepsilon}, \ k = \overline{1, N}, \tag{16b}
$$

$$
\hat{\omega}\_{k+1} = \hat{\omega}\_k \cdot \eta,\ \ k = 1, N - 1. \tag{16c}
$$

The MATLAB object realp used for fixed-structure robust synthesis does not allow the use of operations other than classical arithmetic operations. Therefore, the recursive fractional-order approximation (14) cannot be used as is in order to compute the fractionalorder of the integrative and derivative effects. In Section 2.3 we will give a possible implementation in order to use the realp object for optimizing the controller parameters.

#### *2.3. Controller Design Procedure*

Although the controller which results by solving the quasi-convex problem (7) manages to fulfill the robust stability and robust performance, the major drawback consists in the fact that the controller is of high-order and cannot be easily implemented. As such, the problem should be constrained to use a specific controller structure. After imposing a fixed-structure family K, the problem (7) can be written as:

$$\inf\_{\substack{\mathcal{K}\in\mathcal{K}\\ \mathcal{K}\text{ stable}}} \sup\_{\omega\in\mathbb{R}\_{+}} \inf\_{D\in\mathcal{D}} \overline{\sigma} \Big(D(j\omega)\cdot\text{LFFT}(P\_{\Lambda\nu}\mathcal{K})(j\omega)\cdot(D(j\omega))^{-1}\Big). \tag{17}$$

The above problem is non-convex in terms of the free tuning parameters of the controller *K* ∈ K. However, the problem (17) can also be solved using the *D*–*K* iteration approach, where the *K* step from (8) is replaced with the following *K*<sup>K</sup> step:

$$K = \arg\inf\_{\substack{K \in \mathcal{K} \\ K \text{ staab}}} \|\text{LLFT}(P\_{\Lambda \nu} K)\|\_{\infty} \tag{18}$$

In the MATLAB environment there exists the realp object which can be used to construct a desired family of controllers K and then the closed loop system contains both uncertainties and free tunable parameters alike. Using nonsmooth optimization techniques presented in [8] and implemented in [25], the fixed-structure *μ*-synthesis control problem can be solved. For the purpose of this paper, we consider the fixed structure controller family:

$$\mathcal{K} = \left\{ K\_{\theta}(s) = \begin{pmatrix} K\_{1,1}(s) & K\_{1,2}(s) & \dots & K\_{1,n\_y}(s) \\ K\_{2,1}(s) & K\_{2,2}(s) & \dots & K\_{2,n\_y}(s) \\ \vdots & \vdots & \ddots & \vdots \\ K\_{n\_u,1}(s) & K\_{n\_u,2}(s) & \dots & K\_{n\_y,n\_y}(s) \end{pmatrix} \mid \theta \in D \right\},\tag{19}$$

where each controller *Ki*,*<sup>j</sup>* has the form:

$$K\_{i,j}(\mathbf{s}) = K\_P^{(i,j)} + \frac{K\_I^{(i,j)}}{\mathbf{s}^{\lambda(i,j)}} + K\_D^{(i,j)} \mathbf{s}^{\mu^{(i,j)}},\tag{20}$$

having the free parameters:

$$\theta\_{\bar{i},\bar{j}} = \begin{pmatrix} \mathcal{K}\_P^{(\bar{i},\bar{j})} & \mathcal{K}\_I^{(\bar{i},\bar{j})} & \mathcal{K}\_D^{(\bar{i},\bar{j})} & \lambda^{(\bar{i},\bar{j})} & \mu^{(\bar{i},\bar{j})} \end{pmatrix} \in \mathbb{R}^5. \tag{21}$$

However, the tunable parameters *λ*(*i*,*j*) and *μ*(*i*,*j*) cannot be used as realp objects, due to exponential operations not supported. As a solution, ORA is used with the tunable parameter being *θλ* <sup>≡</sup> <sup>√</sup>*<sup>η</sup>* from (15). The transfer function (14) can be implemented using *θλ* as in Algorithm 1.


Therefore, the tunable parameters for each controller *Ki*,*j*(*s*) are:

$$\boldsymbol{\theta}\_{i,j} = \begin{pmatrix} \boldsymbol{K}\_{P}^{(i,j)} & \boldsymbol{K}\_{I}^{(i,j)} & \boldsymbol{K}\_{D}^{(i,j)} & \boldsymbol{\theta}\_{\lambda^{(i,j)}} & \boldsymbol{\theta}\_{\mu^{(i,j)}} \end{pmatrix} \in \mathbb{R}^{5},\tag{22}$$

with the special mention that the parameters *θλ*(*i*,*j*) and *θμ*(*i*,*j*) must be in the domain 1, *<sup>ω</sup><sup>u</sup> ωl* 1 *N* . If a desired fractional order *λ* is out of the admissible domain, extra integrator/derivative terms can be added. Therefore, the fixed-structure *μ*-synthesis control problem can be solved in MATLAB from the desired family K from (19).

Additionally, the control problem will be posed in a mixed-sensitivity loop shaping *μ*-synthesis formulation. The main reason for this choice consists in the fact that the mixed-sensitivity loop shaping allows an adequate trade-off between robustness and performance. In the optimization process, the following functions will be used for the loop shaping procedure: the sensitivity function *S*, the complementary sensitivity function *T*, and the control effort *KS*. For each performance function, a set of performance outputs are considered, while the performance inputs are considered as the references.

On one hand, large magnitude in the open loop system implies good reference tracking, disturbance rejection, and unstable plant stabilization. On the other hand, small magnitude of the open loop system ensures robust stability and mitigation of measurement noise. Moreover, a small magnitude of the control effort is necessary to relieve actuator stress. Although all these magnitude requirements seem to lead to an impossible combination, the target frequency ranges for each component are disjunctive. Through the loop shaping mechanism, the engineer is supposed to find three weighting functions, one for each of the previously-mentioned closed loop performances and the frequency performance imposed by the weighting functions is strongly correlated to the corresponding time performance.

For the sensitivity function, the frequency performance indicators of the weighting function are the minimum bandwidth frequency *ωB*, which is inversely proportional with the rise time, the maximum magnitude *AS* at low frequencies, which imposes the maximum steady-state error, the peak magnitude *MS*, which limits the overshoot of the system, along with the imposed slope *nS* of the sensitivity function at low and medium frequencies [9]:

$$\mathcal{W}\_{\mathcal{S}}(\mathbf{s}) = \left( \frac{\frac{1}{M\_{\mathcal{S}}} \mathbf{s} + \omega\_{\mathcal{B}}}{\mathbf{s} + \omega\_{\mathcal{B}} A\_{\mathcal{S}}^{1/n\_{\mathcal{S}}}} \right)^{n\_{\mathcal{S}}}.\tag{2.3}$$

Similarly, the complementary sensitivity's weighting function can be constructed using the peak amplitude *MT*, the maximum magnitude at high frequencies *AT*, the minimum bandwidth *ωBT* and the roll-off *nT*:

$$\mathcal{W}\_{T}(\mathbf{s}) = \left(\frac{\mathbf{s} + \omega\_{\mathcal{B}T}}{A\_{T}^{1/n\_{T}}\mathbf{s} + \omega\_{\mathcal{B}T}\mathbf{M}\_{T}^{1/n\_{T}}}\right)^{n\_{T}}.\tag{24}$$

The control effort is generally weighted by imposing the magnitude at low and high frequencies, along with an intermediate point of interest. However, the main goal is to maintain the control effort in the range given by the saturation of the physical actuator. For MIMO systems, the weighting matrices are diagonal concatenations of the weighting functions described above. Now the optimization problem that needs to be solved for the proposed method is the mixed-sensitivity fixed-structure loop shaping *μ*-synthesis:

$$\begin{aligned} \min\_{\begin{subarray}{c}K\in\mathcal{K}\_{\omega}\\K\text{stable}\end{subarray}} & \sup\_{\omega\in\mathbb{R}\_{+}} \inf\_{D\in\mathcal{D}} \, \overline{\mathcal{P}} \Big(D(j\omega) \cdot \text{LLFT}(P,K)(j\omega) \cdot (D(j\omega))^{-1}\Big) \\ & \text{s.t.} \quad \|\left(\mathcal{W}\_{\mathcal{S}}\mathcal{S} \quad \mathcal{W}\_{T}T \quad \mathcal{W}\_{\mathcal{KS}}\mathcal{K}\right)\|\_{\infty} < 1 \end{aligned} \tag{25}$$

#### **3. Mathematical Model of a TRAS**

The TRAS model is of sixth order with four inputs and two outputs. The state variables considered are the rotational speed of the tail rotor (*ωh*), the rotational speed of the main rotor (*ωv*), the azimuth velocity of TRAS beam (Ω*h*), the pitch velocity of TRAS beam (Ω*v*), the azimuth position (*αh*), and the pitch position (*αv*), the state vector being:

$$\mathbf{x} = \begin{pmatrix} \omega\_{\mathrm{h}} & \omega\_{\mathrm{v}} & \Omega\_{\mathrm{h}} & \Omega\_{\mathrm{v}} & \alpha\_{\mathrm{h}} & \alpha\_{\mathrm{v}} \end{pmatrix}^{\top} \in \mathbb{R}^{6}. \tag{26}$$

There are two control inputs, *uh* and *uv*, representing the normalized horizontal and vertical DC-motor PWM duty cycles, while the considered outputs will be the azimuth and pitch positions of the TRAS beam:

$$\mathbf{u} = \begin{pmatrix} u\_h & u\_\upsilon \end{pmatrix} \in \mathbb{R}^2, \quad \mathbf{y} = \begin{pmatrix} a\_h & a\_\upsilon \end{pmatrix} \in \mathbb{R}^2. \tag{27}$$

The TRAS model is strongly nonlinear even under some simplifying assumptions, as stated in [27]. One simplification is regarding to the characteristics of the two rotors: their models are supposed to be of first order containing the moment of inertia and the velocity gain for each rotor. Moreover, the angular velocities of the TRAS beam is influenced by the aerodynamic force of each rotor, which is nonlinear in terms of its rotational speed, by the aerodynamic damping torque and by the cross momentum. Moreover, the azimuth velocity is strongly influenced by the pitch angle position, while the pitch velocity is influenced by the pitch angle as well by the return torque. The nonlinear model after some simplifying assumptions can be written as:

$$
\dot{\omega}\_h = -\frac{1}{I\_h} f\_1(\omega\_h) + \frac{1}{I\_h} u\_h \tag{28}
$$

$$\dot{\Omega}\_{\rm li} = \frac{l\_{\rm i}}{k\_1 \cdot \cos^2(a\_{\rm v}) + k\_2} f\_2(\omega\_{\rm h}) \cdot \cos(a\_{\rm v}) - \frac{k\_{f\rm h}}{k\_1 \cdot \cos^2(a\_{\rm v}) + k\_2} \Omega\_{\rm h} - \frac{k\_{\rm rh}}{k\_1 \cdot \cos^2(a\_{\rm v}) + k\_2} \cos(a\_{\rm v}) \cdot u\_{\rm r} \tag{29}$$

$$
\dot{\alpha}\_h = \Omega\_h \tag{30}
$$

$$
\dot{\omega}\_{\upsilon} = -\frac{1}{I\_{\upsilon}} f\_3(\omega\_{\upsilon}) + \frac{1}{I\_{\upsilon}} u\_{\upsilon} \tag{31}
$$

$$\Omega\_{\upsilon} = \frac{l\_{\text{ff}}}{f\_{\upsilon}} f\_{4}(\omega\_{\upsilon}) - \frac{k\_{fv}}{f\_{\upsilon}} \Omega\_{\upsilon} - \frac{k\_{3}\cos(\mathfrak{a}\_{\upsilon}) + k\_{4}\sin(\mathfrak{a}\_{\upsilon}) + k\_{5}\sin(\mathfrak{a}\_{\upsilon})\cos(\mathfrak{a}\_{\upsilon})}{f\_{\upsilon}} + \frac{k\_{h\upsilon}}{f\_{\upsilon}} \mathfrak{u}\_{h} \tag{32}$$

$$
\boldsymbol{\dot{\alpha}}\_{\upsilon} = \boldsymbol{\Omega}\_{\upsilon} \tag{33}
$$

All parameters of both linearized an nonlinear systems are described in Table 1. The first step of the linearization process is to find approximations for the functions *f*<sup>1</sup> and *f*<sup>3</sup> such that the two systems from inputs to rotational speeds of the rotors are of first order. In order to obtain this scenario, these functions are estimated as *f*1(*ωh*) = *kHh* · *ω<sup>h</sup>* and *f*3(*ωv*) = *kHv* · *ωv*, while the nonlinerity is treated using the sector bound technique, being included in the tolerance of each velocity gain. Moreover, the forces developed by each axis are also nonlinear in terms of rotational speeds of the rotors and can be approximated *f*2(*ωh*) = *kFh* · *ω<sup>h</sup>* and *f*4(*ωv*) = *kFv* · *ωv*, where the trust coefficients encompass the nonlinearities in their tolerances. All sector bound nonlinearites described above are depicted in Figure 2.

**Figure 2.** The tolerances of the parameters *kHh*, *kHv*, *kFh*, *kFv* which encompass the behaviour of the nonlinear functions *f*1, *f*2, *f*<sup>3</sup> and *f*<sup>4</sup> into sector bound nonlinearities.


**Table 1.** Twin rotor aerodynamic system physical parameters, values and tolerances.

After this first step, the nonlinear model can be now linearized around an equilibrium point. The forced equilibrium point has been chosen such that the outputs are *α<sup>h</sup>* = *α<sup>v</sup>* = 0 [rad], i.e., plant stabilization problem. In order to obtain this point, the state vector has the rest of the components *ω<sup>h</sup>* = −1336 [rad/s] , *ω<sup>v</sup>* = 1803.45 [rad/s], Ω*<sup>h</sup>* = 0 [rad/s], Ω*<sup>v</sup>* = 0 [rad/s] , while the input vector has the components *uh* = −0.1492 and *uv* = 0.30559. According to [27], the moment of inertia with respect to the horizontal axis is constant, while around the vertical axis the moment of inertia is nonlinear, having the expression *Jh* = *<sup>k</sup>*<sup>1</sup> · cos2(*αv*) + *<sup>k</sup>*2. In practice, we will consider this parameter uncertain, having the nominal value *Jh* = *k*<sup>1</sup> · cos(*αv*) + *k*2, along with a tolerance of ±10[%]. The uncertainties from the thrust coefficients of the tail and the main rotors are necessary in order to compensate the nonlinearity of the aerodynamic forces from these rotors. The friction coefficients in the axes and the cross moments coefficients also present uncertainties in order to compensate the nonlinearities presented in the angular velocity parts and the interconnections between the two rotations. The return torque coefficient is a nonlinear function in terms of pitch position and velocity, which can be approximated by an uncertain parameter having the nominal value *Rv* = *k*<sup>3</sup> sin(*αv*) − *k*<sup>4</sup> cos(*αv*), and a tolerance of ±10%. As such, the linearized state-space model can now be written as:

**x**˙(*t*) = ⎛ ⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝ <sup>−</sup> <sup>1</sup> *Ih*·*kHh* 00 0 0 0 *lt*·*kFh* ·cos(*αv*) *Jh* <sup>−</sup>*<sup>k</sup> <sup>f</sup> h Jh* 00 0 <sup>−</sup>*lt*·*kFh* ·sin(*αv*)+*kvh*·sin(*αv*)·*uv Jh* 0 10 0 0 0 0 00 <sup>−</sup> <sup>1</sup> *kHv* ·*Iv* 0 0 0 00 *lm*·*kFv Jv* <sup>−</sup>*<sup>k</sup> fv Jv* <sup>−</sup>*Rv*+2*k*<sup>5</sup> cos(2*αv*) *Jv* 0 00 0 1 0 ⎞ ⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠ **x**(*t*) + ⎛ ⎜⎜⎜⎜⎜⎜⎜⎜⎝ 1 *Ih* 0 <sup>0</sup> <sup>−</sup>*kvh*·cos(*αv*) *Jh* 0 0 0 <sup>1</sup> *Iv khv Jv* 0 0 0 ⎞ ⎟⎟⎟⎟⎟⎟⎟⎟⎠ **u**(*t*); (34a) **<sup>y</sup>**(*t*) = 000010 000001 **<sup>x</sup>**(*t*) + 0 0 0 0 **u**(*t*). (34b)

The singular values of the twin rotor aerodynamic system plant having the parameters presented in Table 1, before augmentation, are presented in Figure 3.

**Figure 3.** Singular value plot of the twin rotor aerodynamic system.

#### **4. Numerical Results**

The controller design procedure proposed in this paper will be applied on a twin rotor aerodynamic system (TRAS). The physical stand from INTECO [27] is presented in Figure 4. The numerical values of the parameters described in Section 3 are presented in Table 1, along with their nominal values and tolerances.

**Figure 4.** Twin rotor aerodynamic system used for practical experiments.

In order to illustrate the power of the proposed method, a comparison between the numerical simulations for the linearized system using MATLAB and the experimental results on the physical stand has been performed. For the numerical results, the block diagram is presented in Figure 5, where the reference signals **w**<sup>1</sup> ≡ **r** = *α*- *<sup>h</sup> <sup>α</sup>*- *v* are considered the inputs of the linearized system, while the performance output vector is:

$$\mathbf{z} = \begin{pmatrix} z\_{\mathcal{S}, \mathfrak{a}\_h} & z\_{\mathcal{S}, \mathfrak{a}\_v} & z\_{T, \mathfrak{a}\_h} & z\_{T, \mathfrak{a}\_v} & z\_{\mathcal{KS}, \mathfrak{a}\_h} & z\_{\mathcal{KS}, \mathfrak{a}\_v} \end{pmatrix}. \tag{35}$$

**Figure 5.** The block diagram of the proposed experiment containing the augmented plant which contains as inputs the reference signals only.

For the numerical simulation part, the plant augmentation has been done with the following weighting functions parameters: *ωB*,*α<sup>h</sup>* = 0.2 [rad/s], *ωB*,*α<sup>v</sup>* = 0.05 [rad/s], *AS*,*α<sup>v</sup>* = *AS*,*α<sup>h</sup>* = <sup>1</sup> ×10<sup>−</sup>2, *MS*,*α<sup>v</sup>* = *MS*,*α<sup>h</sup>* = 2, *nS*,*α<sup>v</sup>* = *nS*,*α<sup>h</sup>* = 1 (the reference is considered to be a unity step signal), *<sup>ω</sup>BT*,*α<sup>h</sup>* = 20 [rad/s], *<sup>ω</sup>B*,*α<sup>v</sup>* = 5 [rad/s], *AT*,*α<sup>v</sup>* = *AT*,*α<sup>h</sup>* = <sup>1</sup> × <sup>10</sup><sup>−</sup>2, *MT*,*α<sup>v</sup>* = *MT*,*α<sup>h</sup>* = 2, *nT*,*α<sup>v</sup>* = *nT*,*α<sup>h</sup>* = 1, while the *DC* component of the control effort weighting functions is 1, being the maximum value of the command signal, and the maximum value at high-frequency is of magnitude 5. The weighting functions result as follows:

$$\mathcal{W}\_{\rm S}(\mathbf{s}) = \begin{pmatrix} \mathcal{W}\_{\rm S, \mu\_k}(\mathbf{s}) & \mathbf{0} \\ \mathbf{0} & \mathcal{W}\_{\rm S, \mu\_\upsilon}(\mathbf{s}) \end{pmatrix}, \quad \text{where} \quad \mathcal{W}\_{\rm S, \mu\_k}(\mathbf{s}) = \frac{0.5 \mathbf{s} + 0.2}{\mathbf{s} + 2 \times 10^{-5}}, \ \mathcal{W}\_{\rm S, \mu\_\upsilon}(\mathbf{s}) = \frac{0.5 \mathbf{s} + 0.05}{\mathbf{s} + 5 \times 10^{-4}}, \tag{36}$$

$$\boldsymbol{W\_{T}(s)} = \begin{pmatrix} \boldsymbol{W\_{T,a\_{h}}(s)} & \boldsymbol{0} \\ \boldsymbol{0} & \boldsymbol{W\_{T,a\_{r}}(s)} \end{pmatrix}, \text{ where } \quad \boldsymbol{W\_{T,a\_{h}}(s)} = \frac{s+20}{0.01s+40}, \; \boldsymbol{W\_{T,a\_{r}}(s)} = \frac{s+5}{0.01s+10}, \tag{37}$$

$$\mathcal{W}\_{KS}(\mathbf{s}) = \begin{pmatrix} \mathcal{W}\_{KS,\mathbf{a}\_{\mathbf{h}}}(\mathbf{s}) & \mathbf{0} \\ \mathbf{0} & \mathcal{W}\_{KS,\mathbf{a}\_{\mathbf{b}}}(\mathbf{s}) \end{pmatrix}, \quad \text{where} \quad \mathcal{W}\_{KS,\mathbf{a}\_{\mathbf{h}}}(\mathbf{s}) = \mathcal{W}\_{KS,\mathbf{a}\_{\mathbf{b}}}(\mathbf{s}) = \frac{0.2\mathbf{s} + 0.8532}{\mathbf{s} + 0.8532}. \tag{38}$$

As noted in Figure 3, the frequency range is between *<sup>ω</sup><sup>l</sup>* = <sup>1</sup> × <sup>10</sup>−<sup>2</sup> [rad/s] and *<sup>ω</sup><sup>u</sup>* = <sup>1</sup> × <sup>10</sup><sup>3</sup> [rad/s], which will be also used for ORA, along with the order of approximation *N* = 5. Using the augmented plant presented in Figure 5, the fixed-structure mixedsensitivity loop shaping *μ*-synthesis problem (25) is solved using the musyn command from MATLAB with the following specifications: the maximum number of *D*–*K* iterations is 10, the threshold for the upper bound of the *μ***Δ**(LLFT(*P*aug, *K*)) is 1, and the maximum number of iterations for asserting the lack of progress is 4.

The fixed-structured *μ*-synthesis control problem was solved using three *D*–*K* iterations, having the upper bound of the structured singular value *μ***Δ**(LLFT(*P*aug, *K*)) ≤ 0.9902 < 1, which means that the resulting FO-PID controller manages to fulfill both robust stability and robust performance. The resulting FO-PID controller is:

$$K\_{\rm FO-PID}^{\theta^\*}(s) = \begin{pmatrix} 0.1149 + 0.0603 \cdot s^{-1.267} + 0.0909 \cdot \frac{s^{1.042}}{\overline{0.11545 + 1}} & -7.1329 + 5.0864 \times 10^3 \frac{s^{1.001}}{772.97s + 1} \\ 0.0315 - 0.0832 \frac{s^{1.291}}{27.3375s + 1} & -0.0297 + 0.1013 \cdot s^{-1.0001} + 0.0232 \cdot \frac{s^{1.281}}{\overline{0.1954 + 1}} \end{pmatrix} \prime \tag{39}$$

where the low-pass component needs to be added in order to implement the derivative element of order greater than 1 having one extra degree of freedom for each such element. The results obtained after each step are summarized in Table 2, where after x steps the controller design problem has been successfully solved. The upper bound of the structural singular value is presented in Figure 6.

**Table 2.** The evolution of the structural singular value in the *D*–*K* iteration procedure used to solve the mixed-sensitivity fixed structure *μ*-synthesis problem for the case study—FO-PID structure.

**Figure 6.** Upper bound of the structural singular value *μ***Δ**(LLFT(*Paug*, *K*)(*jω*)) for the frequency range used for solving the Parrot problems.

In order to illustrate the frequency-domain performance, the sensitivity function, complementary sensitivity function and control effort are presented in Figure 7. The nominal plant has been analyzed along with 100 Monte Carlo simulations for the given uncertainty range. Also, in order to underline that the control problem has been successfully solved, the weighting functions are also depicted and it can be noticed that all the simulated functions are under the imposed thresholds. Additionally, the Bode magnitude characteristics of the resulting controller are provided in Figure 8.

**Figure 7.** Sensitivity, control effort and complementary sensitivity functions for the TRAS design phase: specified and synthesized.

**Figure 8.** Bode magnitude characteristic of the resulting controller (39).

The time-domain performance of the lower linear fractional transform between the linearized plant and the controller are presented using a step response in Figure 9. In a similar manner, the nominal plant is illustrated along with 100 Monte Carlo simulations. The rise time for the azimuth position varies between 0.796 [s] and 1.05 [s], having a settling time between 14.8 [s] and 16.1 [s] and an overshoot between 16.9 [%] and 24.2 [%], with no steady-state error. Similarly, the rise time for the pitch position is between 6.79 [s] and 11.7 [s], having a settling time between 10.7 [s] and 19 [s], with no overshoot and no steady-state error.

**Figure 9.** Closed-loop simulated step responses for azimuth and pitch positions, respectively.

Numerical results will further be compared with the experimental results. The first set of experiments, shown in Figure 10, have been made for a square reference with an amplitude of ±0.1 [rad] and a period of 100 [s] for both axes. The initial conditions were varied in practice in order to illustrate the capability of the method. It can be noticed that for the azimuth position, the practical overshoot is a bit higher than in the linear case, with a comparable settling time and near-zero steady-state error due to the quantization effects. The pitch position presents overshoot for the initial step, while for the second step the behavior is similar to that of the linear system, with no overshoot, no steady-state error and comparable settling time.

**Figure 10.** Practical experimental results for reference tracking using various initial conditions.

The second set of experiments are made for the stabilization problem, where the reference for both axes is *α*- *<sup>h</sup>* <sup>=</sup> *<sup>α</sup>*- *<sup>v</sup>* = 0.1 [rad]. It can be noticed that the azimuth position presents an initial overshoot comparable to that obtained for the linear system, while the second part of the oscillation is more aggressive, underling the influence of the nonlinear components. In a similar manner, the pitch position presents an overshoot along with several oscillations, while the settling time is comparable with the linear case's. The experimental results are shown in Figure 11. Moreover, three different disturbances have been applied after 50 [s]: a perturbation on the vertical axis which leads the pitch position at the maximum value (blue), a perturbation on the horizontal axis with the same characteristics (cyan), and another small perturbation on the horizontal axis (black). It can be noticed that all disturbances have been successfully rejected.

**Figure 11.** Practical experimental results for disturbance rejection, by alternatively perturbing both the azimuth and pitch axes alike.

Finally, the third set of experiments, depicted in Figure 12, illustrates the behaviour of the proposed method for an operating point far from the forced equilibrium point used in the linearization procedure and controller synthesis. As such, a step of *α*- *<sup>h</sup>* <sup>=</sup> *<sup>α</sup>*- *<sup>v</sup>* = 0.7 [rad] has been initially applied, with a different pair *α*- *<sup>h</sup>* <sup>=</sup> *<sup>α</sup>*- *<sup>v</sup>* = −0.3 [rad] applied at the moment *t*<sup>1</sup> = 50 [s]. For the horizontal axis, the overshoot is a bit higher than in the linear case, but with similar settling time and no steady-state error. Also, for the vertical axis, the overshoot is negligible for the first step and zero for the second step, having comparable settling times and no steady-state error. Therefore, the controller can be used for other operating points.

**Figure 12.** Practical experimental results for reference tracking using high-valued reference signals and, as such, validating the controller for variable plant operating points.

#### **5. Discussion**

In order to compare the current iteration of FO-PID *μ*-synthesis with previous methods, the fixed-structure part of the *μ*-synthesis mixed-sensitivity loop shaping control problem (25) is solved using the artificial bee colony (ABC) approach presented in [17]. The hyperparameters used for this experiment are: the swarm dimension *N* = 50, the maximum number of ABC cycles 50, the maximum number of cycles with no improvements 10, the limit for the abandonment counter 10, the maximum number of *D*–*K* iterations 10, the maximum window length for assessing lack of progress 4, while the parameters for the cost functions are *α* = 1 and *β* = 105. Using this setup, the fixed-structure mixed-sensitivity loop shaping *μ*-synthesis problem (25) is solved using five *D*—*K* iterations. The resulting controller is:

$$K\_{FO-PID,ABC}^{\theta^\*}(s) = \begin{pmatrix} 0.1642 + 0.0892 \cdot s^{-1.1834} + 0.0913 \cdot \frac{s^{1.120}}{0.07173 + 1} & -0.0016 + 0.8355 \frac{s^{1.001}}{10358 + 1} \\ 0.0106 - 6.769 \times 10^{-4} \frac{s^{1.4808}}{10358 + 1} & -0.0741 + 0.0981 \cdot s^{-1.185} + 0.001 \cdot \frac{s^{1.157}}{0.07358 + 1} \end{pmatrix}, \tag{40}$$

Additionally, an experiment with unstructured *μ*-synthesis has also been performed, leading to an upper bound of the structured singular value of 99.86 and a controller of 34th order, which means that robust stability and robust performance are not guaranteed, with the controller additionally of high order. The optimization algorithm has been stopped after three iterations because the diverging stopping criteria has been reached. A summary of the obtained results with the proposed method, the ABC method [17] and the unstructured *μ*-synthesis is presented in Table 3.

**Table 3.** A comparison between the evolution of the structural singular values in the *D*–*K* iteration procedure used to solve the mixed-sensitivity fixed structure *μ*-synthesis problem for the case study.


As such, the unstructured version of the *μ*-synthesis control problem could not be solved, resulting a high-order controller which does not guarantee robust stability and performance. On the other hand, both remaining methods managed to solve the control problem described in (25). The new method introduced in this paper manages to solve the problem faster due to the advantages of the nonsmooth optimization techniques implemented in MATLAB.

As a future iteration, we propose to find a decentralized controller having a nonlinear component and a linear and time-invariant (LTI) robust component. The nonlinear component needs to be designed such that the lower linear fractional transform interconnection between the plant and such a component is asymptotically stable, as in [28], where the passivity-based control framework has been extended for quasi-linear input-affine systems. Additionally, the LTI robust controller can be designed using the proposed method, the decentralized controller managing to ensure robust stability and performance for the nonlinear system. Moreover, the fractional-order element can be approximated using the presented ORA method only for *<sup>s</sup>λ*, with *<sup>λ</sup>* <sup>∈</sup> (0, 1). As such, another research direction is to find a method to integrate all positive values of *<sup>λ</sup>* <sup>∈</sup> <sup>R</sup>+. On the other hand, the presented methods were considered in the continuous-time domain, although, for practical implementation, the controller must be discretized and also quantized. A starting point for this aspect could be the work presented in [24].

#### **6. Conclusions**

The current paper presents an algorithm which manages to integrate the MIMO fractional-order PID (FO-PID) controller in the fixed-structure mixed-sensitivity loop shaping *μ*-synthesis control problem by constructing an element isomorphic with the fractional order. In order to expose the method capacity and potential, a twin rotor aerodynamic system experimental stand has been utilized. After the simplified nonlinear and linearized models were presented, the linear system has been augmented with weighting functions which managed to impose the desired performance. The fixed-structure *μ*-synthesis control problem has been successfully solved using four *D*–*K* iterations, resulting a controller which manages to ensure both robust stability and robust performance. A comparative analysis between the results obtained with the designed controller used for the linearized plant and for the practical experimental stand has also been performed.

As future work, the proposed design method will be added into a next iteration of the toolbox initially proposed in [9] in order to automatically perform the fractional-order fixedstructure *μ*-synthesis. Also, the proposed method can be integrated into a control scheme with a decentralized controller having an extra nonlinear component which ensures that the robust stability and robust performance are also guaranteed for the nonlinear system.

**Author Contributions:** Conceptualization, V.M. and M. ¸S.; methodology, V.M.; software, V.M.; validation, M. ¸S. and E.H.D.; formal analysis, V.M. and E.H.D.; investigation, V.M.; resources, V.M. and M. ¸S.; data curation, V.M. and M. ¸S.; writing—original draft preparation, V.M., M. ¸S. and E.H.D.; writing—review and editing, V.M., M. ¸S. and E.H.D.; visualization, M. ¸S.; supervision, E.H.D.; project administration, V.M.; funding acquisition, E.H.D. All authors have read and agreed to the published version of the manuscript.

**Funding:** This paper was financially supported by the Project "Entrepreneurial competences and excellence research in doctoral and postdoctoral programs—ANTREDOC", project co-funded by the European Social Fund financing agreement no. 56437/24.07.2019.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

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

#### **Abbreviations**

The following abbreviations are used in this manuscript:

CACSD Computer-Aided Control System Design DOF Degrees of Freedom FO-PID Fractional-Order PID


#### **References**


### *Article* **Adaptive Control of CO2 Production during Milk Fermentation in a Batch Bioreactor**

**Jožef Ritonja**

Faculty of Electrical Engineering and Computer Science, University of Maribor, Koroška cesta 46, 2000 Maribor, Slovenia; jozef.ritonja@um.si; Tel.: +386-2-220-7074

**Abstract:** The basic characteristic of batch bioreactors is their inability to inflow or outflow the substances during the fermentation process. This follows in the simple construction and maintenance, which is the significant advantage of batch bioreactors. Unfortunately, this characteristic also results in the inability of the current industrial and laboratory batch bioreactors to control fermentation production during the process duration. In some recent studies, it was shown that changing the temperature could influence the execution of the fermentation process. The presented paper shows that this phenomenon could be used to develop the closed-loop control system for the fermentation production control in batch bioreactors. First, based on theoretical work, experiments, and numerical methods, the appropriate structure of the mathematical model was determined and parameters were identified. Next, the closed-loop control system structure for batch bioreactor was proposed, and the linear and adaptive control system based on this structure and the derived and identified model were developed. Both modeling and adaptive control system design are new and represent original contributions. As expected, due to the non-linearity of the controlled plant, the adaptive control represents a more successful approach. The simulation and experimental results were used to confirm the applicability of the proposed solution.

**Keywords:** biotechnology; fermentation process; batch bioreactors; modeling; control system design and synthesis; linear control; adaptive control; model reference adaptive control; control system realization

#### **1. Introduction**

*1.1. Basic Facts about Fermentation Process and Batch Bioreactors*

The fermentation process represents a planned use of microorganisms (bacteria, yeasts, molds, or algae) or cells (animal or plant cells) to make products advantageous to humans. In the food industry, fermentation refers to bioprocesses where microorganisms' activity creates a desirable change in food and beverages to improve flavor, provide health benefits, or preserve foodstuffs.

Fermentation processes are carried out in bioreactors. With regard to the type of fermentation process, bioreactors are divided into three groups: batch bioreactors, fedbatch bioreactors, and continuous bioreactors. The main difference between the individual types of bioreactors is in their ability to supply and discharge substances during the fermentation process. Batch bioreactors are the simplest and do not allow the input and output of substances during the fermentation process. This means that the time course of the fermentation process quantities depends entirely on the initial concentrations of bioreactor substances. During operation, the bioreactor is closed, and we do not have the ability to control the fermentation process. From an operational standpoint, this type of bioreactor is the least capable. However, due to their uncomplicated construction, these bioreactors are the cheapest to purchase and, at the same time, very easy to maintain. Fedbatch bioreactors allow the introduction of substances during the fermentation process but do not allow the removal of substances. All fermentation products remain in the bioreactor until the end of fermentation. The possibility of adding substances during operation makes

**Citation:** Ritonja, J. Adaptive Control of CO2 Production during Milk Fermentation in a Batch Bioreactor. *Mathematics* **2021**, *9*, 1712. https:// doi.org/10.3390/math9151712

Academic Editors: Eva H. Dulf, Cristina I. Muresan and Asier Ibeas

Received: 17 April 2021 Accepted: 19 July 2021 Published: 21 July 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

it possible to influence the fermentation process in fed-batch bioreactors during operation. Unlike batch bioreactors, fed-batch bioreactors enable a relatively simple and efficient implementation of a closed-loop control system, ensuring the desired dynamics of the fermentation process. Continuous bioreactors are the most capable in terms of adding and removing substances. They allow the inflow and outflow of substances into/from the bioreactor continuously throughout the operation as a flowing stream. Although fed-batch and continuous bioreactors allow greater flexibility during operation, batch bioreactors are still used widely in the industrial environment. Based on data from manufactures and traders, industrial bioreactors are still made primarily for batch processing (some reports even 90% presence in certain areas) [1].

The goal of fermentation is to produce a lot of high-quality fermentation product in the shortest possible time. This goal is achieved when the time course of fermentation quantity follows the prescribed reference course. Therefore, the control of the fermentation process is extremely important.

While the control of the fermentation processes in fed-batch and continuous bioreactors is relatively easy to implement, the control of the batch bioreactors is very difficult to perform. The reason is simple: batch bioreactors do not have an input substance that could be changed through inflow or outflow during the fermentation process and used to control it. The fact that there are extremely rare examples in commercial offers or in academic publications that show the control system for the production control during fermentation processes in batch bioreactors posed a challenge for this study. This paper has focused on developing a control system for a batch bioreactor that utilizes **temperature changing** to control the growth of the fermentation product. The implementation of the adaptive control system represents an original approach that is not found in other publications.

#### *1.2. Literature Review*

The problem of the automatic control of the fermentation processes is very important, up to date, and attractive. The availability of non-expensive equipment for the development and manufacture of control systems has caused great topicality in this area in the last three decades. Therefore, in recent years, we have seen an enormous effort from academic institutions and industrial providers to find new control systems for bioreactors.

The initial phase of any control system research represents the determination of the mathematical model of the controlled plant. We can trace the intensive work and new publications in mathematical modeling of the fermentation processes in bioreactors. Still, the progress in the field of mathematical modeling does not reach the development in the field of the control of the fermentation process. In control studies in the last two decades, the fundamental kinetic mathematical model of the fermentation in the bioreactors has still been used commonly for quantitative simulations or theoretical analysis [2–5]. Unfortunately, in many cases, this model is not the most suitable for the design and synthesis of bioreactor control systems [6]. The new bioreactors enable an easy, fast and wide range of changes in the mechanical (by mixing) and thermal (by heating and cooling) conditions of fermentation processes, also during operation. It turns out that the course of the fermentation process can be influenced by changes in these fermentation quantities (stirrer speed and temperature), and it is not always necessary to control the fermentation process by feeding substances into the bioreactor [7]. To develop the control system for the fermentation process, which would use stirrer speed or heater temperature as an input quantity, we need a mathematical model that describes the influence of these quantities on the fermentation process. References [6,8] are some of the publications where the influence of stirrer speed and heater temperature on the fermentation process is analyzed, and appropriate mathematical models are also determined.

More publications are in the field of the control of bioreactors. The bioreactor fermentation process is a very suitable and attractive process for developing and testing conventional and advanced control theories. The presented review is focused on works dealing with the control of the time profile of the fermentation product.

As expected, most publications are in the field of control systems developed for continuous bioreactors, where control is possible through changes in inflow and outflow during the fermentation. Reference [8] shows the utilization of robust control for continuous bioreactors. The implementation of the sliding mode theory is presented in [9], the use of output linearization in [10], the application of output linearization taking into account the constraints of the input signals is studied in [11], the appropriateness of model predictive control (MPC) is shown in [12,13]. A multitude of new publications testifies to the topicality of the problem and intensive work in this area.

The intensive development of the control systems is also seen in the field of fedbatch bioreactors. Reference [14] shows the use of robust control for the fermentation process in fed-batch bioreactors. The use of an iterative learning controller is presented in [15]. The use of model-based optimization for a fed-batch bioreactor was studied in [16]. References [17,18] discuss the applicability of MPC for fed-batch bioreactor control. Reference [19] shows the implementation of the sliding mode control for the photobioreactor (which works initially in the fed-batch mode and then in continuous operation), but the reference deals only with the fed-batch stage. All publications demonstrate the advantage of advanced control concepts over the conventional closed-loop control of fed-batch bioreactors.

As opposed to continuous- and fed-batch bioreactors, relatively few publications have been observed that address the closed-loop control of the time profile of the fermentation product quantity during the fermentation process in batch bioreactors. Most batch bioreactors still operate autonomously, without closed-loop control, which would control the fermentation process. Publications in the field of batch bioreactor control are mainly limited to the control of bioreactors' subsystems. Many works show different control theories or different realizations for temperature regulation, pH regulation, oxygen control, and stirrer speed control. The most considered is temperature regulation. Reference [20] comparatively shows the use of MPC and sliding mode control for temperature regulation in a batch bioreactor. Reference [21] shows temperature control of fermentation bioreactor for ethanol production using internal model control (IMC) based PID controller. Modified fractional-order IMC-PID for ethanol production is proposed in [22]. Non-linear autoregressive moving average neuro controller for temperature control in bioreactors is shown in [23]. The temperature control of an alcoholic fermentation process through Takagi–Sugeno modeling is presented in [24]. A fuzzy–split range control system applied to the fermentation process is shown in [25].

Because of the importance of dissolved CO2 for the fermentation process, it is also possible to find frequent publications considering CO2 monitoring. Reference [26] discusses the importance of real-time CO2 monitoring for the proper execution of the fermentation process. Reference [27] describes sensors for real-time dissolved CO2 monitoring and control. A noninvasive approach for monitoring dissolved CO2 in cell culture using a silicon sampling loop is presented in [28].

However, very few publications deal with the control of the growth of microorganisms in batch bioreactors. The growth is visible in the time course of the generation of the endproduct quantity during the fermentation. Only a few references in this field were found. The gain scheduling control was used in [29]. Reference [30] shows the implementation of the PI-controller. Reference [31] studies the application of model reference adaptive control. The absence of publications studying the control of the yield of the fermentation product in batch bioreactors was also an additional motivation to work even more in-depth and intensively in this area.

#### *1.3. Contributions and Novelties*

There are two major contributions of this article.

• The first contribution of the presented study is the discovery of the solution for the closed-loop control of the growth of microorganisms (and, thus, control the time course of the fermentation product quantity), which will be valid for **batch bioreac-** **tors**. The controlled operation mode has so far been reserved only for the fed-batch and continuous bioreactors, which are much more expensive to purchase and more difficult to maintain than batch bioreactors. All today's industrial or laboratory batch bioreactors operate without a closed-loop control system in an autonomous mode. The time course of the fermentation product quantity depends only on the initial concentrations of substances introduced into the bioreactor before the start of the fermentation process. The presented solution is based on the finding that changing the bioreactor's temperature could be used for the closed-loop control of the fermentation product profile. This discovery was obtained from the analysis of previous studies, from simulation calculations based on the derived mathematical model, and from the laboratory experiments. Based on this finding, the structure of the closed-loop control system was defined. This structure allows the use of different control approaches.

• The second contribution of the article is the finding that adaptive control is very convenient for the control of the time course of the fermentation product in batch bioreactors. A study of various adaptive theories was made. Model reference adaptive control based on almost strictly positive real theory proved to be convenient for the implementation of the founded control structure. This control approach assures stability, easy realization, and an undemanding choice of adaptation coefficients. The proposed adaptive control system was compared with the conventional linear control system. The advantages of the developed adaptive control system are to ensure the desired course of the fermentation process even when the parameters of the mathematical model of the fermentation process are unknown. An additional and important advantage of the presented adaptive control system is that it ensures the same performance even in the case of significantly different fermentation processes.

In such a way, the batch bioreactors, thanks to the advanced control theory, easily and cheaply acquire the possibility to significantly improve their performance. The implementation of the developed adaptive control system does not the require major modification of batch bioreactors, and all basic advantages of these reactors are retained. The adaptive control system is easy to start and does not require time-consuming bioreactor identification and the controller's parameter setting.

The shorter fermentation time and higher quality of the obtained fermentation products are guaranteed, which means greater efficiency of operation. In addition to simulations, the efficiency and stability of the proposed adaptive control system have also been proven by experiments on a laboratory bioreactor. Although the applicability of the adaptive control system is confirmed in the case of CO2 production during milk fermentation, the proposed control system is universal and is suitable for controlling various fermentation processes in batch bioreactors.

The originally presented novelties in this article are:


#### **2. Materials and Methods**

#### *2.1. Studied Fermentation Process*

The presented study focused on the production of CO2 during milk fermentation with kefir grains. Traditionally, kefir is produced by inoculating kefir grains, which are a mixture of proteins, polysaccharides, mesophilic, homofermentative, and heterofermentative lactic acid streptococci, thermophilic and mesophilic lactobacilli, acetic acid bacteria, and yeast. The fermentation of milk by the inoculum proceeds for ca. 24 h, during which time, homofermentative lactic acid streptococci grow rapidly, initially causing a reduction in pH. This low pH favors the growth of lactobacilli but causes the streptococci number to decline. The presence of yeasts in the mixture, together with fermentation temperature, encourages the growth of aroma-producing heterofermentative streptococci. As fermentation proceeds, the growth of lactic acid bacteria is favored.

For the original fermentation, before the fermentation, kefir grains (40 g) were activated for 5 successive days so that they were washed daily with cold water and put into 500 mL of fresh pasteurized whole-fat milk at room temperature. To start the fermentation, 500 mL of fresh pasteurized whole-fat milk was preheated in the fermenter to the desired temperature and then inoculated with 40 g of active kefir grains. For the original fermentation, the desired starting milk temperature was 22 ◦C, and fully activated (5 days activation) kefir grains were used. Different modified fermentation processes were obtained by means of differently activated kefir grains.

During the fermentation, carbon dioxide, acetic acid, ethyl alcohol, and several other substances are formed, and these give the products their characteristic aroma. Milk fermentation with kefir grains propagation is an inherently very complex process because of the specific nature of the microbial metabolism, as well as the non-linearity of its kinetics. Therefore, fermentation control is extremely important to obtain high-quality products.

#### *2.2. Laboratory Equipment*

#### 2.2.1. Batch Bioreactor

Laboratory fermentations were performed in the reaction calorimeter RC1e from Mettler Toledo. It is a computer-controlled benchtop batch bioreactor with a working volume of 0.7 L. By using specific modifications in hardware and software, it was used as a bioreactor. A more detailed description of RC1e can be found in [31].

#### 2.2.2. Heating/Cooling System

The tested batch bioreactor was factory equipped with the combined heating/cooling (H/C) system. The silicone oil used as a heat transfer agent is pumped through the double jacket of the reactor in a closed circulation system. H/C system is equipped with an integrated closed-loop temperature control system with a proportional-integral (PI) controller. The H/C system enables the changing of the temperature of the bioreactor's contents in the range from 5 ◦C to 50 ◦C. The temperature control system enables operation without steady-state error for a constant reference temperature. The delay in the temperature control system is very short compared to the dynamics of the fermentation process. The H/C system was identified and modelled. The 1st-order differential equation with unit gain and estimated time constant *Tϑ*cs = 0.1 h represents a satisfactory description of its dynamics.

#### 2.2.3. Dissolved CO2 Measurement

The selection of the output quantity that could be used as the feedback variable in the control system is crucial for the implementation of the control theory and the realization of the theoretical approach. It is necessary that the measured quantity contains as much information on the fermentation process as possible. At the same time, it is also important that the measurement should be accurate and could be performed on-line.

In the fermentation processes, dissolved oxygen and cell culture measurement are essential for ensuring optimal conditions for cell growth. The oxygen levels in bioreactors can have an impact on the growth rate, nutrients' uptake, cellular morphology, and metabolite synthesis, leading to end-product quality. Accurate oxygen control is only possible if measurements from dissolved oxygen sensors installed in fermenters/bioreactors are reliable. Biomass concentration is another critically needed measurement in fermentation studies.

In performing laboratory tests, it is not always possible to measure these two biochemical quantities and, thus, conclude whether their trajectories are such as to ensure the

desired course of the fermentation process with a high-quality end product. This is the reason that in the proposed study, the measurement of the CO2 dissolved in the bioreactor's medium was introduced. CO2 is a product of the cellular metabolism of microorganisms. Assuming the growth medium with a sufficient carbon source, the measured CO2 concentration profile could also be the indicator of the fermentation progress [32]. Accurate, real-time data on the concentration of CO2 increases the understanding of the fermentation process and can get a better insight into cell metabolism, cell culture productivity, and other changes within bioreactors [33]. The distribution of the CO2 in the bioreactor medium is very homogeneous. The sensors for the measurement of CO2 concentration are reliable, accurate, maintenance free, have a long lifetime, and have a known measurement curve [33]. The duration of the measurement process is short; therefore, these sensors are convenient for implementation in real-time control systems.

For the measurement of the dissolved CO2 in the laboratory bioreactor the ISE51B (Mettler Toledo) ion-selective electrode was used. A measuring system can be modelled with the 1st-order differential equation. The laboratory measuring system can be matched with the mathematical model with a gain *k*CO2ms = 1 mmol/g and a time constant *T*CO2ms < 0.01 h. The time constant of the measurement system is almost negligible compared to the inherently slow dynamics of the biotechnological systems.

#### 2.2.4. Equipment for Data Acquisition and Control

For the connection of the dissolved CO2 measurement sensor and signal adjustment, the SevenMulti (Mettler Toledo) basic device with an expansion module was used. The analogue 1st-order low-pass filter for the elimination of sensor noise is integrated into the expansion module.

For the transfer of measured signals from the SevenMulti basic unit to PC, the basic device was equipped with a digital output module (USB). For the comprehensive measurement of several quantities over a long time period and for the necessary signal processing, software LabX direct pH 2.3 was installed on the PC. This is professional equipment used for a data logger and a data analysis. The selected sampling time was 10 min. This sampling time was sufficient due to the slow dynamics of the fermentation process. During the performing the experiments, the sampling time was changed and adjusted to the dynamics of the measured signal. The measured data were saved into Microsoft Office 365 Excel documents, transferred into MathWorks MATLAB, and processed using MATLAB with its Optimization toolbox functions [7].

For the implementation of the control system, a dSpace 1103 PPC controller board was utilized. The controller is equipped with 16-bit A/D and D/A converters as well as serial and CAN interfaces [7]. An analogue output module of the basic device SevenMulti was used for the transfer of the measured signal of the CO2 concentration from the bioreactor system to the controller's analogue input. The additional analogue 1st-order low-pass filter was used at the dSpace analogue input to eliminate the superposed noise signal. The analogue output signal from the controller is sent to the input of the heating/cooling system. To enable this connection, the heating/cooling system was equipped with an additional electronic interface.

#### 2.2.5. Reference Profile Generation

The quantity and quality of the product in the batch bioreactor are decisively dependent on the trajectories of the biological quantities in the fermentation process, affecting the kinetics of the bioprocess. The developed control system makes the influencing of the time responses of the biological quantities possible. With the developed control system, we can change the time course of biological quantities in a batch bioreactor. In this way, we can influence the fermentation process and its result. The question arose about how to choose a reference trajectory. The reference trajectory selected should provide that the generated product will be high quality, abundant, and that the process will end in a shorter time, with as little energy and material resources as possible. There are many professional

and scientific publications where the methods for determining the optimal trajectory for different fermentation processes for fed-batch bioreactors are discussed that could also be useful for batch bioreactors [3]. The presented article does not deal with the methods of determining the optimal trajectory. The primary purpose of this study is the development of a control system that will ensure that the fermentation process quantities will follow the previous set reference trajectory. Therefore, the reference trajectory used in this paper was determined by the empirically obtained expert knowledge of the consumers of the bioreactor's technology [33]. The reference trajectory of the dissolved CO2 course was generated by means of dSpace 1103 PPC controller board.

#### *2.3. Laboratory Set-Ups for Parameter Estimation and Control*

To perform the parameter estimation and fermentation control, the laboratory batch bioreactor was supplemented with the controlled heating/cooling system, measuring system, PC for parameter estimation, and dSpace for control implementation. The laboratory set-up for the **measurement** of the time response of the dissolved CO2 production on the temperature changes and **estimation** of model parameters is shown in Figure 1a. Laboratory set-up for the **control** of the dissolved CO2 production is shown in Figure 1b.

**Figure 1.** (**a**) Laboratory system for **measurement** of the time response of the dissolved CO2 production on the temperature changes and **estimation** of model parameters. (**b**) Laboratory system for the **control** of dissolved CO2 production.

#### *2.4. Mathematical Model of the Fermentation Process*

Fermentation is described as a process in which an agent causes an organic substance to break down into simpler substances. The agents are mainly microorganisms, the source substance is named a substrate, and the final substance is named a product [7].

Fermentation is a non-linear, time-dependent complex system with a poorly known structure and unknown parameters. There are many mathematical models of the fermentation process of different types and degrees of complexity. Almost all models are derived from the mass balance of microorganisms, substrate, and product [5].

The fundamental mathematical model of the fermentation process in batch bioreactor represents a state-space non-linear model of the 3rd order [2–5]. The state-space variables of this model are the concentrations of the microorganisms, substrate, and product. This model is autonomous—it has no input variable. This is expected because batch bioreactors do not have an input quantity to control the fermentation process. The transients of the model's variables are obtained as the response to the initial values of the substances. During the fermentation process, the quantity of the microorganisms and product increases, and the quantity of substrate decreases. All parameters of the fundamental kinetic model are supposed to be constant throughout the duration of the fermentation process.

The commonly accepted fundamental kinetic mathematical model of the fermentation process enables the simple and efficient simulation and analysis of the fermentation process in cases of different initial concentrations. In many studies, it has been proven that the profiles of the fermentation process substances can be influenced by changing the operating conditions during fermentation. The profiles are most easily influenced by the bioreactor's heating/cooling system and the stirrer system. In [6,30], an analysis of the influence of temperature change on the course of the fermentation process is made, and the influence of stirrer speed change is discussed in [6,7,31]. The fundamental mathematic model does not enable the evaluation of the impact of temperature changes on the time courses of concentrations of individual substances of the fermentation process. The knowledge of this dependence is essential for the design and synthesis of convenient control systems. This is the reason that in the article, a new model that involves the phenomenon of the impact of temperature on the fermentation process was derived and presented.

The derived model is the non-autonomous non-linear 4th-order state-space mathematical model, whose input is the reference temperature of the heating system, and the model's state variables are the concentrations of microorganisms, substrate, fermentation product, and bioreactor's temperature. The impact of temperature on the fermentation process is taken into account by assuming that temperature influences the fundamental model parameters. The derived model is presented with (1)–(4):

$$\dot{\mathbf{x}}\_1(t) = \frac{\mu\_\mathrm{m} \left(1 + k\_{\mu\_\mathrm{m}} (\mathbf{x}\_4(t) - \theta\_0) \right) \left(1 - \frac{1}{T\_i} \mathbf{x}\_3(t) \right) \mathbf{x}\_2(t)}{S\_\mathrm{m} + \mathbf{x}\_2(t) + \frac{1}{S\_i} (\mathbf{x}\_2(t))^2} \mathbf{x}\_1(t) \tag{1}$$

$$\dot{\mathbf{x}}\_{2}(t) = -\frac{\mu\_{\rm m} \left(1 + k\_{\mu\_{\rm m}} (\mathbf{x}\_{4}(t) - \vartheta\_{0})\right) \left(1 - \frac{1}{F\_{\rm i}} \mathbf{x}\_{3}(t)\right) \mathbf{x}\_{2}(t)}{S\_{\rm m} + \mathbf{x}\_{2}(t) + \frac{1}{S\_{\rm i}} (\mathbf{x}\_{2}(t))^{2}} \mathbf{x}\_{1}(t) \tag{2}$$

$$\dot{\mathbf{x}}\_{3}(t) = \left(\mathbf{a} \cdot \frac{\left(1 + k\_{\mathrm{a}} \left(\mathbf{x}\_{4}(t) - \theta\_{0}\right)\right) \mu\_{\mathrm{m}} \left(1 + k\_{\mu\_{\mathrm{m}}} \left(\mathbf{x}\_{4}(t) - \theta\_{0}\right)\right) \left(1 - \frac{1}{T\_{\mathrm{l}}} \mathbf{x}\_{3}(t)\right) \mathbf{x}\_{2}(t)}{\mathbf{S}\_{\mathrm{m}} + \mathbf{x}\_{2}(t) + \frac{1}{T\_{\mathrm{l}}} \left(\mathbf{x}\_{2}(t)\right)^{2}} + \beta\right) \mathbf{x}\_{1}(t) \tag{3}$$

$$
\dot{\mathbf{x}}\_4(t) = \frac{1}{T\_{\text{dvs}}} \qquad \qquad \left(\boldsymbol{u}(t) - \boldsymbol{x}\_4(t)\right) \tag{4}
$$

where the input of the non-autonomous state-space model is:

*u(t)*—the reference temperature of the bioreactor's temperature control system (◦C). The state-space variables of the mathematical model denote the following biological and thermal quantities:

*x*1(*t*)—the concentration of the microorganisms (g/L);

*x*2(*t*)—the concentration of the substrate (g/L);

*x*3(*t*)—the concentration of the product (g/L);

*x*4(*t*)—the temperature in the bioreactor (◦C).

Additionally, the parameters of the mathematical model are:

*μ*m—the maximum microorganisms' growth rate (h<sup>−</sup>1);

*P*i—the product inhibition constant (g/L);

*S*m—the substrate saturation constant (g/L);

*S*i—the substrate inhibition constant (g/L);

*α*—the parameter that describes the relation between product yield and microorganism growth;

*β—*the parameter that describes the product yield that is independent of the microorganism growth (h<sup>−</sup>1);

*ϑ*0—the temperature of the bioreactor's contents at the beginning of the fermentation process (◦C), normally *ϑ*<sup>0</sup> is equal to the outside temperature;

*kμ*m*—*the coefficient that describes the impact of the temperature changing on the maximum microorganisms' growth rate *μ*<sup>m</sup> ( ◦C);

*kα—*the coefficient that describes the impact of temperature changing on the parameter that describes the relation between product yield and microorganism growth (◦C);

*Tϑ*cs*—*time constant of the simple 1st-order model of the controlled heating system (h).

#### *2.5. Conventional Control System with a Linear Controller*

In order to improve the economy of the fermentation and the quality and quantity of the fermentation product, it is necessary to ensure that the actual time profile of the yield of the fermentation product is as close as possible to the reference one. The fermentation process is a non-linear process, but the deviation between the response of the non-controlled fermentation process and the reference trajectory is relatively small. Therefore, the control of the yield of the fermentation product is also possible with the conventional control system with a linear controller. By selecting the performance index and using the optimization method, we can ensure that the controller will provide optimum performance in the broadest possible operating range. The block diagram of the fermentation process control system with a linear controller is shown in Figure 2.

**Figure 2.** Block diagram of the conventional control system with linear controller.

The main disadvantage of this approach is the need for knowledge of the accurate mathematical model of the batch bioreactor's fermentation process. The structure and parameters of the mathematical model must be known to perform the tuning of the control system. Determining the appropriate mathematical model of a batch bioreactor is hugely time consuming. It is necessary to execute the whole fermentation process with a constant temperature and, after that, repeat the fermentation with the same charge but a changeable temperature. From the responses, all the parameters of the non-linear model (*μ*m, *P*i, *S*m, *S*i, *α*, *β*, *kμ*<sup>m</sup> , *k*α, and *Tϑ*cs) must be estimated by means of the optimization technique. Finally, the control system tuning must be made by means of the estimated mathematical model. Due to the time-consuming and challenging identification procedure for determining the mathematical model, the use of the conventional linear control system proved to be less appropriate for industrial applications. It makes sense to use a control approach that will not require knowledge of the batch bioreactor's mathematical model.

#### *2.6. Adaptive Control System*

The adaptive theory represents an ideal tool for developing a control system for batch bioreactors. Adaptive control systems do not require accurate knowledge of the controlled plant's mathematical model and can adapt their parameters to the changing dynamics of the controlled plant. An additional reason that justifies the use of adaptive strategies for the control of batch bioreactors is that the fermentation processes are executed very slowly, allowing the unproblematic implementation of computationally complex adaptive algorithms.

There are two main approaches to the development of adaptive control systems. The first approach is called indirect adaptive control or self-tuning control (STC) [34]. The advantage of indirect control is its modularity, which allows a combination of different identification methods (least squares, maximum likelihood, instrumental variables, corrector least squares) and different tuning procedures (deterministic and stochastic).

The second approach is termed direct adaptive control because control input is, in general, calculated directly, without preliminary determination of the controlled plant mathematical model. Due to the mandatory reference model, this adaptive control is also called model reference adaptive control (MRAC). Almost all modern MRAC systems can be classified as evolving from one of the three following adaptive approaches:


MRAC-ASPR is not new, but is more recent than the previously mentioned adaptive approaches. This approach is an output feedback method that requires neither full state feedback nor adaptive observers. The essential improvement of the MRAC-ASPR concept related to the other STC and MRAC concepts is that the MRAC-ASPR theory is also applicable for non-linear controlled plants [38,39]. The other significant qualities of this class of algorithms are given as follows:


Because of all these advantages, the MRAC-ASPR theory was used to develop the adaptive control system to control the fermentation process in a batch bioreactor. Due to the simple realization of this type of adaptive control system, the name simple adaptive control instead of MRAC-ASPR will also be used.

The proposed MRAC-ASPR was revealed primarily to control the continuous linear systems subject to uncertainty in the parameters [37]. Such consideration coincides with the derived and verified linearized mathematical model of the fermentation process of a batch bioreactor obtained with the linearization of the non-linear model around the fermentation process's trajectory. In 2009, the extension of the MRAC-ASPR theory to minimum-phase nonstationary and non-linear systems was made [38]. Reference [39] shows a detailed and complete description of this theory, with added new results considering non-linear system stability analysis. The MRAC-ASPR concept has been used successfully in different engineering areas to control non-linear controlled plants (electrical drives, robotics, power systems, and chemistry). The MRAC-ASPR concept was also used to design an adaptive system that controls the fermentation process in bioreactors by varying the rotational speed of the mixing system [7]. However, there are no publications showing the use of MRAC-ASPR to control the fermentation process in batch bioreactors by changing the temperature of the heating system.

The following is a brief description of the controller's adaptive algorithm. The MRAC-ASPR will be presented for the control of the controlled plant, which is described by a state-space model [38]: .

$$
\dot{\mathbf{x}}(t) = \mathbf{A}(\mathbf{x}, t)\mathbf{x}(t) + \mathbf{b}(\mathbf{x}, t)u(t) \tag{5}
$$

$$\mathbf{y}(t) = \mathbf{c}^T(\mathbf{x}, t)\mathbf{x}(t) \tag{6}$$

where:

*x*(*t*), *u*(*t*), and *y*(*t*) are the state-space vector, input scalar, and output scalar of the mathematical model of the controlled plant;

*A*(*x*,*t*), *b*(*x*,*t*), and *c*T(*x*,*t*) are the non-linear functions of the mathematical model of the controlled plant.

The desired static and dynamic behaviour of the closed-loop controlled system are defined with the state-space reference model [39]:

$$
\dot{\mathbf{x}}\_{\rm m}(t) = \mathbf{A}\_{\rm m} \mathbf{x}\_{\rm m}(t) + \mathbf{b}\_{\rm m} \boldsymbol{\mu}\_{\rm m}(t) \tag{7}
$$

$$y\_{\mathbf{m}}(t) = \mathbf{c}\_{\mathbf{m}}^{\mathrm{T}} \mathbf{x}\_{\mathbf{m}}(t) \tag{8}$$

where:

*x*m(*t*), *u*m(*t*), and *y*m(*t*) are the state-space vector, input scalar, and output scalar of the reference model, and

*A*m, *b*m, and *c*<sup>T</sup> <sup>m</sup> are the system matrix, input vector, and output vector of the reference model.

The reference model is assumed to be bounded-input/bounded-state stable. The task of the reference model is only to represent the desired input–output behaviour. The number of state-space variables of the reference model can be significantly less than the number of state-space variables of the controlled plant, as described by the equation:

$$
\dim[\mathfrak{x}\_{\mathfrak{m}}(t)] \ll \dim[\mathfrak{x}(t)]\tag{9}
$$

Since the order of the reference model is in general not the same as the order of the mathematical model of the controlled plant, it is not possible to require the state-space variables of the controlled plant to follow the state-space variables of the reference model. Instead, a request is made that the controlled plant output *y*(*t*) follows the output of the reference model *y*m(*t*) asymptotically. The output tracking error *ey*(*t*) is defined with:

$$x\_{\mathcal{Y}}(t) = y\_{\mathcal{m}}(t) - y(t) \tag{10}$$

The extension of the Lyapunov stability theory to non-linear non-autonomous systems was applied for the derivation of the adaptive control algorithm [37–39]. The main request by the derivation of the adaptive control algorithm was to ensure the stability of the entire control system. The final goal was to obtain an adaptive algorithm that will generate such controlled plant input signal *u*(*t*) which will assure that the controlled plant output *y*(*t*) will approximate "reasonably well" the output of the reference model *y*m(*t*) without explicit knowledge of the controlled plant functions *A*(*x,t*), *b*(*x,t*) and *c*T(*x,t*) [32]. The determined adaptive control algorithm is expressed with:

$$
\mu\_{\mathbb{P}}(t) = \mathbb{K}\_{\mathfrak{e}}(t)\varepsilon\_{\mathfrak{Y}}(t) + \mathbb{K}\_{\mathfrak{x}}(t)\mathbf{x}\_{\mathfrak{m}}(t) + \mathbb{K}\_{\mathfrak{u}}(t)\mu\_{\mathfrak{m}}(t) \tag{11}
$$

where scalar *Ke*(*t*) is the stabilizing output feedback parameter, and matrix *Kx*(*t*) and scalar *Ku*(*t*) are control gains. Parameters *Ke*(*t*), *Kx*(*t*) and *Ku*(*t*) can be united in a vector of adaptive gains *K*(*t*), and the variables *ey*(*t*), *x*m(*t*) and *u*m(*t*) can be linked in a vector of control variables *r*(*t*):

$$\mathbf{K}(t) = \begin{bmatrix} \ \mathbf{K}\_{\ell}(t) & \mathbf{K}\_{x}(t) & \mathbf{K}\_{u}(t) \end{bmatrix} \tag{12}$$

$$\mathbf{r}^{\mathrm{T}}(t) = \begin{bmatrix} \ \varkappa\_{\mathcal{Y}}(t) & \varkappa\_{\mathrm{m}}(t) & \imath\_{\mathrm{m}}(t) \ \end{bmatrix} \tag{13}$$

The adaptive gains *K*(*t*) can be represented as the sum of the two terms: of the proportional term *K*p(*t*) and integral term *K*i(*t*), as written in (14) [37].

$$\mathbf{K}(t) = \mathbf{K}\_{\mathbb{P}}(t) + \mathbf{K}\_{\mathrm{i}}(t) \tag{14}$$

The proportional- and integral terms can be calculated with the following non-linear equations [37]:

$$\mathbf{K}\_{\mathbf{P}}(t) = \boldsymbol{e}\_{\mathbf{y}}(t) \; \mathbf{r}^{\mathrm{T}}(t) \; \mathbf{T}' \tag{15}$$

$$
\dot{\mathbf{K}}\_{\mathbf{i}}(t) = \boldsymbol{\varepsilon}\_{\mathbf{Y}}(t) \; \mathbf{r}^{\mathbf{T}}(t) \; \mathbf{T} \tag{16}
$$

where *T*is a positive semi-definite matrix and *T* is a positive definite matrix.

The proportional term *K*p(*t*) drives the system very quickly towards a small tracking error, and the integral term *K*i(*t*) guarantees convergence. In the MRAC-ASPR concept, we cannot talk about the optimal gain value that the adaptive controller wants to achieve. The gain varies during operation according to the error [7].

In order to improve the convergence of the adaptive system, the following modification of the integral term was proposed [37]:

$$\dot{\mathbf{K}}\_{\mathbf{i}}(t) = \boldsymbol{e}\_{\mathbf{y}}(t) \; \mathbf{r}^{\mathrm{T}}(t) \; \mathbf{T} - \sigma \mathbf{K}\_{\mathbf{i}}(t) \tag{17}$$

where the task of the *σ*-term is to protect the integral gains from divergence if there are disturbances.

The block diagram of the control system with simple adaptive controller is shown in Figure 3.

**Figure 3.** Block diagram of the control system with simple adaptive controller (MRAC-ASPR).

#### **3. Results**

#### *3.1. Estimation of Model Parameters*

The parameters *μ*m, *P*i, *S*m, *S*i, *α, β*, *kμ*<sup>m</sup> , *k*α, and *Tϑ*cs depend on the quality and quantity of the substances. They remain almost constant during the fermentation process. They can be calculated for the real bioreactors by different optimization methods from the measured trajectories of the bioreactors' substances. For the studied fermentation process in a laboratory bioreactor, the Particle Swarm algorithm was used to obtain the mathematical model's parameters. The integral absolute error between measured and model fermentation product variables was used as the optimization method's performance index.

For the estimation of the parameters, the studied fermentation process was executed two times in the laboratory bioreactor.

First, an appropriate amount of fully activated microorganisms (kefir grains) and substrate (milk) was introduced into the bioreactor. The dissolved CO2 was selected as the fermentation product. The initial concentrations of microorganisms, substrate, and fermentation product were measured. The obtained values are given in Table 1. The fermentation process was then performed at a constant temperature. The time courses of concentrations of all substances were measured. From the obtained measurements, the parameter *μ*m, *P*i, *S*m, *S*i, *α*, and *β* were estimated by means of particle swarm optimization.

**Table 1.** Initial values of the fermentation process in the studied bioreactor.


Then, the fermentation process with the equal initial substances (fully activated kefir grains) was performed again. This time, during the operation, the reference temperature value of the heating system was changed from 22 ◦C to 29 ◦C. The step-change of the reference temperature (i.e., the input signal of the controlled plant) occurs in the fermentation's growing phase, 2 h after the beginning of the fermentation. The courses of the substances' concentrations were measured again, and the model parameters *kμ*<sup>m</sup> , *kα*, and *Tϑ*cs were estimated.

The parameters of the identified mathematical model of the milk fermentation process in the laboratory batch bioreactor where fully activated kefir grains were used are presented in Table 2.

**Table 2.** Parameters of the Mathematical Model for the Original Fermentation Process in the Studied Laboratory Batch Bioreactor where **fully activated kefir grains** were used.


**Table 2.** *Cont.*


The matching of the response of the measured CO2 concentration in the laboratory bioreactor with the response of the CO2 concentration calculated with the identified mathematical model is displayed in Figure 4. It shows the results of the fermentation with the changeable bioreactor's temperature. Note, in the experiment and in the simulations, the step increase in the reference temperature from 22 ◦C for 7 ◦C occurred at *t* = 2 h.

**Figure 4.** Measured and simulated time courses of dissolved CO2 concentration during the fermentation process with changeable bioreactor temperature (step change of temperature from 22 ◦C to 29 ◦C occurred at time t = 2 h).

The simulation results show that the derived model can justifiably be used for bioprocess analysis and control system development. The calculation (with optimization techniques) of the model parameters is not complicated but can take a lot of time.

For the evaluation of the efficiency of the control system for different fermentations, the modified fermentation process was executed and identified. The difference between the original and modified fermentation process was in the kefir grains used for the fermentation. While kefir grains activated by washing with cold water and transferred into fresh milk for 5 successive days were used for the original fermentation, inactivated kefir grains were used in the modified process. This resulted in a slower fermentation and a lower final value of the fermentation product. The parameters of the mathematical model of the modified fermentation process are shown in Table 3.

**Table 3.** Parameters of the mathematical model for the modified fermentation process in the studied laboratory batch bioreactor where **inactivated kefir grains** were used.


#### *3.2. Results Obtained with the Conventional Control System*

The use of a linear controller makes sense since the analysis of a linearized mathematical model in the vicinity of the trajectory of the non-controlled fermentation process showed a relatively small range of variations in the model's parameters.

A simple PI-controller with transfer function *G*PI(*s*) (18) is used to demonstrate the efficiency of the conventional control system with linear controller for comparison with the advanced adaptive control system,

$$G\_{\rm Pl}(s) = k\_{\rm P} \frac{sT\_{\rm i} + 1}{sT\_{\rm i}} \tag{18}$$

where *k*<sup>p</sup> is the gain and *T*<sup>i</sup> is the time constant of the PI-controller.

The controller synthesis was done using the optimization method for the integral time square cost function *J* of the output error variable and input variable. The cost function *J* is presented with [30]:

$$J = \int\_{0}^{t\_f} \left\{ Q\left[r(t) - \boldsymbol{y}(t)\right]^2 + \mathcal{R}\left[\boldsymbol{u}(t) - \theta\_0\right]^2 \right\} dt \tag{19}$$

where:

*u*(*t*) is the input variable of the mathematical model of the controlled plant (i.e., the reference temperature of the bioreactor's temperature control system (◦C));

*y*(*t*) is the output variable of the mathematical model of the controlled plant (i.e., the output of the measurement system for the dissolved CO2 concentration (mmol/L));

*r*(*t*) is empirically determined reference trajectory for the dissolved CO2 concentration; *ϑ*<sup>0</sup> is the temperature of the bioreactor's mixture at the beginning of the fermentation process (◦C), normally *ϑ*<sup>0</sup> is equal to the outside temperature;

*Q*, *R*—are the weighting parameters of the quadratic cost function;

*t*<sup>f</sup> is the final time.

For the tested fermentation process in the laboratory bioreactor, the following reference trajectory *r*(*t*) for the dissolved CO2 was chosen:

$$r(t) = 0.8 \left(1 - e^{-t/1.5} \right) \text{ mmol/L} \tag{20}$$

This reference trajectory was determined based on the dissolved CO2 trajectory of the uncontrolled fermentation process in this bioreactor. The modification of the trajectory was made in such a way that the controlled fermentation process will finish in a shorter time and that the amount of the generated product will be higher. The biological limitations must be taken into consideration. It is necessary to ensure that the reference trajectory does not deviate excessively from the CO2 concentration trajectory of the autonomous fermentation process.

The trajectory of the actual dissolved CO2 of the batch bioreactor without a control system, and the reference (desirable) trajectory of the dissolved CO2 of the batch bioreactor, are shown in Figure 5. The task of the developed control system is to ensure that the actual output value will follow the prescribed reference trajectory as closely as possible.

**Figure 5.** The trajectory of the dissolved CO2 of the original fermentation process in batch bioreactor without a control system (solid line) and the reference trajectory of the dissolved CO2 of the batch bioreactor (dashed line); data of the original fermentation process with fully activated kefir grains are shown in Table 2; the reference trajectory is described with Equation (20).

The cost function (19) was calculated by means of simulations of the closed-loop control system. Simulations were made with a non-linear model of the controlled plant (1)–(4) with the parameters from Table 2 and the initial concentration values given in Table 1.

In optimization calculations, the parameters *k*<sup>p</sup> and *T*<sup>i</sup> of the PI-controller were changed in order to obtain the minimum value of the cost function. Particle swarm optimization (PSO) was used for the calculation of the controller's parameters. PSO is a metaheuristic procedure that may provide a sufficiently effective solution to an optimization problem in cases where there are few, incomplete, imperfect or no assumptions about the problem being optimized. Functions from MathWorks MATLAB/Optimization Toolbox library were used for faster realization of the PSO for the calculation of the parameters of the mathematical model. Matlab function *particleswarm.m* is based on the algorithm described in [40], using the modifications suggested in [41,42]. The details of the PSO algorithm in the *particleswarm.m* function are written in [43].

The simulations were calculated for the time period from *t* = 0 h to *t* = 10 h. The weighting coefficients *Q* and *R* have been selected so that both terms of the cost function were proportionally weighted and that with the controller calculated reference temperature of the heating system remained within the realizable range. For the chosen cost function's parameters, *Q*, *R*, *t*f, and the constant initial temperature of the bioreactor's filling, *ϑ*0,

$$\mathcal{Q} = 1 \,\, \mathcal{R} = 0.1 \,\, t\_{\mathrm{f}} = 10 \,\, h \,\, \theta\_0 = 2 \,\Theta \,\, ^{\circ} \mathcal{K} \,\, ; \tag{21}$$

the following parameters of the PI-controller were calculated:

$$k\_{\rm p} = 22.0 \, T\_{\rm i} = 1.5 \,\text{h} \tag{22}$$

The obtained control results are presented in Figures 6 and 7. The time response of the actual dissolved CO2 concentration of a batch bioreactor controlled with a conventional PIcontroller, together with the reference trajectory, is shown in Figure 6. The bioreactor's inner temperature *x*4(*t*), resultantly to the control of the heating/cooling system, is presented in Figure 7. No limiters or anti-windup were used. The controller's output stays in the feasible range, and it does not exceed the maximum or minimum limits.

**Figure 6.** Time responses of the reference and actual dissolved CO2 concentration of the original fermentation process in the batch bioreactor; the conventional control system with the linear controller with calculated parameters was used; data of the controlled original fermentation process with fully activated kefir grains are shown in Table 2; the controller parameters are shown in (22).

**Figure 7.** Time response of the temperature of the original fermentation process in the batch bioreactor and the constant outside temperature, corresponding to Figure 6.

It is expected that the controller provides good control of the fermentation process, for which its parameters have been optimized. Conversely, we cannot expect that the same controller will optimally control other fermentation processes.

The efficiency of the optimized control system was evaluated for the modified fermentation process. The parameters of the modified fermentation process are written in Table 3. Figure 8 shows the trajectory of the dissolved CO2 of the modified fermentation process without a control system and the reference (desirable) trajectory of the dissolved CO2.

**Figure 8.** The trajectory of the dissolved CO2 of the modified fermentation process in batch bioreactor without a control system (solid line) and the reference trajectory of the dissolved CO2 of the batch bioreactor (dashed line); data of the modified fermentation process with inactivated kefir grains are shown in Table 3, and the reference trajectory is described in Equation (20).

Figures 5 and 8 seem similar, but there is a significant difference in the dynamics of the fermentation process. While the original fermentation process is completed in ca. 6 h, the modified fermentation process lasts more than 10 h.

The results of the control of the modified fermentation process with parameters in Table 3 with the PI-controller with original (non-modified) parameters (22) are shown in Figure 9.

**Figure 9.** Time responses of the reference and actual dissolved CO2 concentration of the modified fermentation process in the batch bioreactor; the conventional control system with the linear controller with calculated parameters was used; data of the controlled modified fermentation process with inactivated kefir grains are shown in Table 3; the controller parameters are shown in (22).

#### *3.3. Results Obtained with the Simple Adaptive Control System*

A simple adaptive control system based on the MRAC-ASPR control theory was used for the batch bioreactor's control implementation.

The presented adaptive control system assures that the batch bioreactor's output (i.e., the measured dissolved CO2 concentration) follows the output of the reference model in the case of unknown and variable bioreactor's kinetics. In such a way, the adaptive controller enables that the bioreactor's dynamics stay the same during repetitions of the batch processes. The presented results were obtained for the adaptive control system with the reference model represented with the 1st-order term with gain *k*rm = 0.8 and the time constant *T*rm = 1.5 h. This reference model produces step response equal to the reference signal in (20). The parameters of the adaptation mechanism were obtained on the basis of numerical simulations with the non-linear model. No optimization technique was used to find the optimal values for the adaptation mechanism's parameters. Numerical simulations were used only to determine the approximate values of the parameters of the adaptation mechanism. The obtained values are convenient for different size batch bioreactors. An accurate setting of the parameters is not necessary. The following adaptation coefficient matrix based on a positive definite identity matrix:

$$T = 4000 \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} \\ T' = 4000 \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} \tag{23}$$

were used to carry out the adaptive control.

In addition, the *σ*-term wasused to avoid the divergence of integral gains in the presence of a disturbance.

$$
\sigma = 0.95\tag{24}
$$

The results of the simple adaptive control technique for the fermentation process in the batch bioreactor are shown in Figures 10 and 11. Figure 10 shows the reference and the actual time response of the dissolved CO2 concentration. The time response of the generated product of the fermentation process follows the reference variable despite the unknown parameters of the controlled plant and its structure uncertainties. The temperature of the bioreactor's filling, which was necessary to assure that actual dissolved CO2 concentration follows the reference trajectory, is shown in Figure 11. The controller's output stays in the feasible range, and it does not exceed the maximum or minimum limits.

**Figure 10.** Time responses of the reference and actual dissolved CO2 concentration of the original fermentation process in the batch bioreactor; simple adaptive control was used; data of the controlled original fermentation process with fully activated kefir grains are shown in Table 2, the adaptation mechanism parameters in (23) and (24).

**Figure 11.** Time response of the temperature of the original fermentation process in the batch bioreactor and the constant outside temperature when the simple adaptive control was used, corresponding to Figure 10.

The results of the control of the modified fermentation process with parameters in Table 3 with the simple adaptive control (23) and (24) are shown in Figure 12. The time response of the dissolved CO2 concentration of a batch bioreactor controlled with the simple adaptive controller, together with the reference trajectory, is shown.

**Figure 12.** Time responses of the reference and actual dissolved CO2 concentration of the modified fermentation process in the batch bioreactor; simple adaptive control was used; data of the controlled modified fermentation process with inactivated kefir grains are shown in Table 3, the adaptation mechanism parameters in (23) and (24).

#### *3.4. Experimental Results Obtained with the Simple Adaptive Control System*

Developed control systems were tested on the laboratory batch bioreactor. HW and SW equipment described in Sections 2.2.4 and 2.3 was used for the implementation of control systems. From the simulations was seen that the differences between responses are not significant. The results of laboratory tests were comparable. Due to additional reasons related to the realization and equipment used, it is difficult to objectively evaluate individual control concepts' effectiveness from the test results. Figure 13 shows the

time responses of the reference and actual dissolved CO2 concentration obtained with the experiment where the simple adaptive control was used for control of fermentation process of laboratory batch bioreactor with fully activated kefir grains. It can be seen from Figure 13 that the developed adaptive control system ensures the tracking of the actual dissolved CO2 concentration to the reference trajectory. The deviation at the beginning of the transient is due to zero initial values in the integral elements of the adaptation mechanism. The reference trajectory tracking can be further improved by selecting the adaptation mechanism's initial values and weighting coefficients adjusted to the fermentation process. The response to the control of the fermentation process with inactivated kefir grains was very similar despite the fact that the controller's parameters stay unchanged.

**Figure 13.** Time responses of the reference and actual dissolved CO2 profiles obtained with the experiment where the simple adaptive control was used for control of fermentation process of laboratory batch bioreactor with fully activated kefir grains.

#### **4. Discussion**

At first sight, the results obtained with both presented control systems are excellent and very similar, especially for the fermentation process with parameters in Table 2. Almost identical dynamics of the fermentation process were obtained, as defined with the reference trajectory. To achieve these responses, acceptable changes were requested in the bioreactor's inner temperature.

Figures 5–7 show clearly that the developed linear controller provides very good tracking of the actual CO2 concentration to the reference value for the original fermentation process for which controller's parameters were optimized. In this way, the fermentation process was made significantly more economical. The fermentation time was shortened. The duration of the non-controlled fermentation is about 6 h, and the duration of the controlled fermentation is approx. 5 h. An increase in concentration was also obtained of approx. 0.1 mmol/L. The efficiency of the same controller is lower if it is used to control modified fermentation processes, which is seen in Figures 8 and 9. Slight oscillations are visible from the results. The difference between the original and the modified fermentation process is that in the case of the original fermentation process, fully activated kefir grains were used. In the case of the modified fermentation process, the used kefir grains were inactivated. Original control parameters do not ensure optimal behavior in the case of the modified fermentation process. In this case, the fermentation process should be reidentified, and a new tuning of the controller parameters should be performed.

Figures 10 and 11 show the results obtained with the developed adaptive controller. Results are very similar to the results of the optimized linear controller. The advantage of the adaptive controller is visible when used to control fermentation processes that

have different dynamics. The presented adaptive control system assures that the batch bioreactor's output (i.e., the measured dissolved CO2 concentration) follows the output of the reference model in the case of unknown and variable bioreactor's kinetics. It can be seen from Figure 12 that the adaptive controller maintains the same time course of the output quantity, even in the case of significantly changed (and unknown) parameters of the fermentation process. In this case, the duration of the fermentation process was shortened from 10 h to 5 h, while an increase in concentration was also obtained of approx. 0.2 mmol/L.

To obtain better insight into the performances of the control systems, an evaluation was made based on the Performance Index. Since the purpose was to evaluate both control concepts as accurately as possible, these calculations were made on the basis of simulation results. The experimental results are affected by additional random external disturbances that obscure the comparison of control algorithms. The integral quadratic Performance Index, the same as the cost function shown in (19), was used for the comparative calculations. The same parameters of the Performance Index as for the PI-controller optimization were used to estimate the control quality (21). Disturbances and noise were added to the measured fermentation product variable to achieve the most realistic conditions, equal for both control systems. Disturbances and noise were estimated from the measured results. Band-limited white noise with the correlation time 0.1 h and the noise power 0.01 was used. The disturbances were generated by a PRBS signal with the amplitude 0.05, which was filtered through the transfer function *G*(*s*) = *<sup>s</sup>* (5*s*2+4*s*+1) . Results for both controllers for two fermentations processes are shown in Table 4.


**Table 4.** Performance indexes for the studied bioreactor's control systems.

The difference between the calculated performance indexes for the original fermentation process (fermentation process data in Table 2) was minimal. It was expected that the conventional control system with the PI-controller would obtain good results because its parameters were optimized with the same cost function. On the other hand, it is encouraging that the simple adaptive control system led to almost the same results, even though the initial parameters of the control algorithm were zero, and those weighting coefficients of the adaptation mechanism were chosen very easily, without any optimization approach. The important advantage of the simple adaptive controller is visible in the control of the modified fermentation process (fermentation process data in Table 3). The results obtained with a linear regulator, which was not optimized for this process, were significantly worse (more than 10%) than the results of the adaptive controller, which itself adapted to the changing dynamics of the modified fermentation process.

Despite the similar performance indexes, the proposed adaptive control approach presents a much better choice for developing the control system for the batch bioreactor. The main advantage of the adaptive control system is that the detailed knowledge of the batch bioreactor and the substances used is not necessary. The simple adaptive controller adapts its operation automatically to the different dynamics of the fermentation processes. The pre-operation tuning is minimal. On the other hand, if we want to use a conventional linear controller with constant parameters, a preliminary determination of the mathematical model of the fermentation process is mandatory to ensure satisfactory control. Determining

a mathematical model is time-consuming and involves determining a non-linear model and its linearization.

#### **5. Conclusions**

The article combines the fields of Control Engineering and Bioprocess Engineering. It shows the applicability of the conventional and advanced control approaches for the control of the fermentation processes in the batch bioreactors.

There are some important conclusions and contributions of this paper:


The similarity of the results obtained with the optimized conventional linear control system and advanced non-linear adaptive control system could lead to the opinion that both presented control concepts' efficiencies are very similar. However, there is a major difference between the tuning procedure and the related usability of both concepts. While the use of linear control with constant parameters requires knowledge of the exact mathematical model of each fermentation process, the adaptive control ensures the desired course of the fermentation process, even when the structure and parameters of the mathematical model are unknown.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

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

#### **References**


### *Article μ***-Synthesis for Fractional-Order Robust Controllers**

**Vlad Mihaly \*, Mircea ¸Su¸sc ˘a \*, Dora Morar †, Mihai St ˘anese † and Petru Dobra †**

Department of Automation, Technical University of Cluj-Napoca, Str. G. Bari¸tiu nr. 26-28, 400027 Cluj-Napoca, Romania; Dora.Sabau@aut.utcluj.ro (D.M.); mihai.stanese@aut.utcluj.ro (M.S.); Petru.Dobra@aut.utcluj.ro (P.D.)

**\*** Correspondence: vlad.mihaly@aut.utcluj.ro (V.M.); mircea.susca@aut.utcluj.ro (M. ¸S.)

† These authors contributed equally to this work.

**Abstract:** The current article presents a design procedure for obtaining robust multiple-input and multiple-output (MIMO) fractional-order controllers using a *μ*-synthesis design procedure with *D*–*K* iteration. *μ*-synthesis uses the generalized Robust Control framework in order to find a controller which meets the stability and performance criteria for a family of plants. Because this control problem is NP-hard, it is usually solved using an approximation, the most common being the *D*–*K* iteration algorithm , but, this approximation leads to high-order controllers, which are not practically feasible. If a desired structure is imposed to the controller, the corresponding *K* step is a non-convex problem. The novelty of the paper consists in an artificial bee colony swarm optimization approach to compute the nearly optimal controller parameters. Further, a mixed-sensitivity *μ*-synthesis control problem is solved with the proposed approach for a two-axis Computer Numerical Control (CNC) machine benchmark problem. The resulting controller using the described algorithm manages to ensure, with mathematical guarantee, both robust stability and robust performance, while the high-order controller obtained with the classical *μ*-synthesis approach in MATLAB does not offer this.

**Keywords:** *μ*-synthesis; robust control; fractional-order control; swarm optimization; artificial bee colony optimization; CNC machine; mixed sensitivity; *D*–*K* iteration; Linear Matrix Inequality

#### **1. Introduction**

One of the active problems with major impact which have been studied for years in Control Theory refers to robustness. Robustness encompasses the sensitivity of a control system with respect to both internal and external disturbances. Several robust methods have been developed in order to achieve robust performance and stability in the presence of uncertainties. Robust control problems use H<sup>2</sup> and H<sup>∞</sup> norms defined in frequency domain as a performance measure. To solve H2/H<sup>∞</sup> control problems, there are several approaches. One possible solution is presented in [1] and is based on Algebraic Riccati Equations (AREs). A more numerically stable approach to solve ARE was developed using Popov triplets in [2], approach recently implemented in an open-source manner in [3], with an iterative refinement method presented in [4] , but an ARE-based solution presents a limitation due to the impossibility of solving singular problems. An alternative way which manages to solve such problems was introduced in [5], where AREs were replaced by Algebraic Riccati Inequalities (ARIs). ARIs are solved through Linear Matrix Inequalities (LMIs), while regular assumptions are no longer needed due to LMI system versatility. An open-source solver for Robust Control problems using LMIs is presented in [6].

The H2/H<sup>∞</sup> approach designs a suitable controller for the nominal plant, therefore only nominal stability and nominal performance are fulfilled. Additionally, generalized Robust Control framework allows to impose robust stability and robust performance, which cover the previous two aspects for an entire family of physical processes. As such, the *μ*synthesis approach extends the H<sup>∞</sup> optimization in order to obtain a robust controller for the uncertain plant which includes parametric and dynamic uncertainties [7,8]. *μ*-synthesis

**Citation:** Mihaly, V.; ¸Su¸sc ˘a, M.; Morar, D.; St ˘anese, M.; Dobra, P. *μ*-Synthesis for Fractional-Order Robust Controllers. *Mathematics* **2021**, *9*, 911. https://doi.org/10.3390 /math9080911

Academic Editor: António M. Lopes

Received: 28 February 2021 Accepted: 16 April 2021 Published: 20 April 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

45

is based on using structured singular values to quantify robustness margins and also on using linear fractional descriptions of the control problem containing the nominal plant model and uncertainty weighting functions. In [9], the authors present the *μ*-synthesis problem used with the so-called *D*–*K* iteration, which, in essence, provides two steps iteratively repeated until the robust performance stops improving: designing a H<sup>∞</sup> control law and *μ* analysis on closed-loop system.

*μ*-synthesis is, however, a non-convex problem and the *D*–*K* iteration represents only an approximation, without any convergence guarantees. Another significant concern of *D*–*K* iteration is that the method generates high order controllers. In order to solve this issue, various approaches based on fixed structure controller are proposed in different papers [10–12]. The method presented in [10] uses nonsmooth techniques for H<sup>∞</sup> synthesis. Then, using the same technique, the *μ*-synthesis was solved using *D*–*K* iteration and the result are presented in [13].

The main issue which appears when controller structure constraints are imposed is that the optimization problem in no longer convex and also, *μ*-synthesis is in general, considered nondeterministic polynomial time hard (NP-hard). A possible solution to that are swarm optimization algorithms. There are different approaches presented in papers [14–16] based on Genetic Algorithms (GA) and Particle Swarm Optimization (PSO). A solution for imposing a fixed structure controller, such as low-order or decentralized, was proposed in paper [14], which splits the problem in two parts: the convex part, solved using the classical ARE approach, and the non-convex part, solved using GA. The same authors proposed in [16] a new technique based on an evolutionary *D*–*KD*<sup>0</sup> iteration method, which combines the classical *D*-step with a *KD*<sup>0</sup> algorithm based on also a GA. Authors of the paper [15] propose an evolutionary approach to solve the *μ*-synthesis problem without order reduction by using an improved PSO.

Artificial Bee Colony (ABC) can also be used to solve complex optimization problems with constraints and could possibly outperform the other approaches and return the best solution in shorter execution time. The initial idea was presented in [17] as an extension of another metaheuristic algorithm, namely Honey Bee Swarm (HBS). The efficiency of the algorithm for several state-of-the-art optimization problems, along with an improvement for the stopping criterion, were underlined in [18].

One possible fixed structure controller is fractional-order proportional-integral-derivative (FO-PID). FO-PID is one of the most remarkable fractional order techniques with great interest in research [19]. It is used to generalize the classical PID control by adding extra degrees of freedom [20]. Compared to the integer PID controller, FO-PID brings the advantage of improving the robustness and providing better performance. In [21], the authors propose a FO-PID controller for a fractional-order plant model, presenting an analysis in both frequency and time domains, proving that achieving better control performance is one of the advantages of this approach. The FO-PID was used on a benchmark problem, i.e., the speed control of a DC motor [22], obtaining good results in terms of performance and robustness. Two generalized versions of Kessler's magnitude method with fractional order controllers were developed in [23,24]. A detailed comparison between classical modelling approaches and a fractional integrator approximation as a control baseline model is presented to the servo problem in [25]. A graphical method was developed in [26], while in [27] a fractional order internal model controller with event-based implementation was developed. Other applications comprise in an optimal FO-PID controller for a PMSM speed control, presented in [28], while a robust controller for a steam turbine was developed in [29].

In this paper, we present a new technique to design FO-PID robust controllers using *μ*-synthesis. The novelty of the current approach consists in implementing an algorithm able to find the nearly optimal values of the controller parameters using an artificial bee colony optimization. The cost function to be minimized is the H<sup>∞</sup> norm of the closed-loop system, when stable, and, otherwise, a large value affinely dependent on the largest real part of the eigenvalues of the closed-loop state matrix. Therefore, the non-convex part of the NP-hard *μ*-synthesis problem is solved using such a swarm optimization, while the *D* step is solved using the classical LMI technique. More than that, the realp object from MATLAB's Robust Control Toolbox embodies a limitation because it cannot be used as an exponent, necessary in approximating the fractional element with an integer-order system. Our approach manages to deal with this limitation in order to obtain the controller parameters, because the only information necessary in our approach is the range of the controller's parameters stored in such variables, which can be replaced with a simpler software object. Additionally, using our approach, a numerical example illustrates that the resulting controller manages to fulfill the robust stability and performance, while the controller obtained using unstructured *μ*-synthesis does not rigorously guarantee these specifications. Therefore, our method proposes a general framework able to synthesize arbitrary fixed structure fractional order controllers by optimizing their parameters in terms of robustness and performance, surpassing the well-established approach of manually tuning them for a desired problem, harnessing the Robust Control framework's design strongness.

We illustrate our proposed method on a benchmark problem: obtaining a controller for a two axis computer numerical control (CNC) system by solving a mixed-sensitivity *μ*-synthesis problem. Several control methods using the state space model of the machine are presented in literature. A comparison between the classical pole-placement method and Linear Quadratic Regulator (LQR) method is presented in [30]. For the LQR problem, an energy-based minimization algorithm was proposed, which proves to be suitable in terms of stability and robustness. As presented in [31], a different approach is recommended, in order to obtain a PI controller for each axis, using the state-feedback control algorithm. In this case, the state space model is augmented with an extra state which represents the integral of the position. The PI regulator parameters are obtained from the state-feedback gains.

The paper is organized in four sections. Section 2 introduces several ideas relevant to the proposed method, such as a mathematical foundation of FO-PID, continuing with the fundamental robust control problem based on *μ*-synthesis, and, finally, the ABC optimization algorithm. After that, the last subsection focuses on solving the non-convex problem of computing fixed structure controllers. Section 3 illustrates an application of the proposed method for position control of a two axis CNC machine, along with numerical results. In Section 4, the previously mentioned results are compared with those obtained using the well-established algorithms from MATLAB. Finally, conclusions are presented in Section 5.

#### **2. Materials and Methods**

In this section we present a controller synthesis procedure which manages to find a fixed structure fractional-order controller using the *μ*-synthesis technique from the Robust Control framework, where the non-convex subproblem involved in the classical *D*–*K* iteration is replaced by a swarm optimization algorithm. First, the mathematical background comprised in fractional-order control, robust control and artificial bee colony optimization is underlined, while the fourth subsection presents the proposed design procedure using all the mechanisms briefly described.

#### *2.1. Fractional-Order Controller*

The classical integer-order calculus was extended by Riemann and Liouville to fractional-order calculus by introducing the fractional integral operator [32]:

$$\mathcal{Z}\_a^a \{ f(t) \} = \frac{1}{\Gamma(a)} \int\_a^t f(\tau) (t - \tau)^{a-1} d\tau,\tag{1}$$

where <sup>Γ</sup>(*α*) : <sup>C</sup><sup>+</sup> <sup>→</sup> <sup>C</sup> is the Euler Gamma function and the order of the integral operator is the complex parameter *<sup>α</sup>* <sup>∈</sup> <sup>C</sup>+. This extension develops a new area of research in the Control System domain. A commonly used definition of this operator was introduced in [33] as:

$$\mathcal{J}\_{\mathbb{C}}^{a}\{f(t)\} = \frac{1}{\Gamma(a)} \int\_{0}^{t} (t-\tau)^{a-1} f(\tau)d\tau = \mathcal{I}\_{0}^{a}\{f(t)\},\tag{2}$$

with *<sup>t</sup>* <sup>&</sup>gt; 0 and *<sup>α</sup>* <sup>∈</sup> <sup>R</sup>+, having the Laplace transform [34]:

$$
\mathcal{L}\{\mathcal{J}\_{\varepsilon}^{a}\{f(t)\}\}(s) = s^{-a}F(s), \tag{3}
$$

where *F*(*s*) = L{ *f*(*t*)}(*s*). One of the most common controller structures used in practice is the proportional-integral-derivative (PID) controller, having three degrees of freedom. Using fractional-order calculus, two new degrees of freedom can be added to a PID, having the notation PI*λ*D*μ*. As such, the fractional order PID (FO-PID) has, as extra degrees of freedom, the order *<sup>λ</sup>* <sup>∈</sup> <sup>R</sup><sup>+</sup> of the integrator and the order *<sup>μ</sup>* <sup>∈</sup> <sup>R</sup><sup>+</sup> of the differentiator, with the resulting transfer function:

$$H\_{\mathbb{C}}(\mathbf{s}) = K\_P + \frac{K\_I}{s^{\overline{\lambda}}} + K\_D s^{\mu}. \tag{4}$$

The time domain expression of the command signal *c*(*t*) can be expressed using the error signal *ε*(*t*) as:

$$
\varepsilon(t) = K\_p \cdot \varepsilon(t) + K\_I \cdot \mathcal{J}\_c^{\lambda} \{\varepsilon(t)\} + K\_D \cdot \mathcal{J}\_c^{-\mu} \{\varepsilon(t)\}.\tag{5}
$$

One of the major issues of such a fractional element, i.e., <sup>J</sup> *<sup>λ</sup> <sup>c</sup>* or <sup>J</sup> <sup>−</sup>*<sup>μ</sup> <sup>c</sup>* , is its implementation. In order to solve this problem, the Oustaloup recursive approximation (ORA) was introduced [35], and allows the approximation of the fractional-order element with an LTI system of pre-specified order *N*:

$$s^{\lambda} = \prod\_{k=1}^{N} \frac{1 + s/\omega\_{z,k}}{1 + s/\omega\_{p,k}},\tag{6}$$

where the frequency values of the singularities are obtained based on the desired fractional order *λ* ∈ (0, 1), the integer order of the approximation *N*, along with the frequency range in which the approximation is valid [*ωl*, *ωu*]. Using the following two coefficients:

$$
\varepsilon = \left(\frac{\omega\_{\rm l}}{\omega\_{\rm l}}\right)^{\frac{\lambda}{N}} \quad \text{and} \quad \eta = \left(\frac{\omega\_{\rm l}}{\omega\_{\rm l}}\right)^{\frac{1-\lambda}{N}},\tag{7}
$$

the above mentioned frequencies can be computed using:

$$
\omega\_{\overline{z},1} = \omega\_{\overline{l}} \sqrt{\eta},
\tag{8}
$$

$$
\omega\_{p,n} = \omega\_{z,n} \cdot \varepsilon, \ n = \overleftarrow{1}, \overline{N}, \tag{9}
$$

$$
\omega\_{z,n+1} = \omega\_{p,n} \cdot \eta\_{\prime} \cdot n = \overline{1,N-1}.\tag{10}
$$

For the rest of the possible real values of *λ*, the approximation can be easily extended as: for *λ* ∈ (−1, 0) by inverting the relation (6), while for |*λ*| ≥ 1, the components could be the integer part [*λ*] and the fractional part {*λ*}, with the fractional part only approximated using (6).

#### *2.2. Robust Control*

The Robust Control framework assumes to minimize the H2/H<sup>∞</sup> norm of the lower linear fractional transformation (LLFT) of a plant *P* and a controller *K*:

$$P\_{\mathcal{O}} = \text{LLFT}(P, K) = P\_{11} + P\_{12}K(I - P\_{22}K)^{-1}P\_{21} \tag{11}$$

where the plant *P* can be written, in general form, as:

$$P: \begin{pmatrix} P\_{11} & P\_{12} \\ P\_{21} & P\_{22} \end{pmatrix} = \begin{pmatrix} A & B\_w & B\_u \\ \hline C\_z & D\_{zw} & D\_{zu} \\ C\_y & D\_{yw} & D\_{yu} \end{pmatrix} \tag{12}$$

where the signals involved in the above relation will be further detailed in a more general context. One approach to solving H2/H<sup>∞</sup> problems is using AREs, which presents several limitations that are removed by the LMI approach. However, this framework can be used to ensure nominal stability and nominal performance only , but, the plant *P* must also contain an augmented model of the real process in which uncertainties are also present. There are two classic uncertainties types: *parametric*, represented by *δI*, where *δ* is the maximum bound of the parameter for a physical variable, and *unstructured*, represented by a full block <sup>Δ</sup> <sup>∈</sup> <sup>R</sup>*m*×*m*. The latter illustrates neglected or unknown dynamics uncertainties. In the mixed-scenario case, the following set is considered:

$$\Delta = \left\{ \Delta = \text{diag}\left(\delta\_1 I\_{n\_1}, \dots, \delta\_s I\_{n\_s}, \Delta\_1, \dots, \Delta\_f\right) \middle| \delta\_k \in \mathbb{R}, \ \Delta\_j \in \mathbb{R}^{m\_j \times m\_j}, \ k = \overline{1, s}, \ j = \overline{1, f} \right\}. \tag{13}$$

In the Robust Control field, one of the main tools used for robustness analysis is the structured singular value, defined as follows.

**Definition 1.** *For a square matrix <sup>M</sup>* <sup>∈</sup> <sup>C</sup>*N*×*<sup>N</sup> the structured singular value with respect to the set* **Δ** *is:*

$$\mu\_{\Delta}(M) = \frac{1}{\min\_{\Delta \in \Delta} \{ \overline{\varepsilon}(\Delta) | \det(I - M\Delta) = 0 \}},\tag{14}$$

*if there exists* Δ ∈ **Δ** *such that the matrix I* − *M*Δ *is rank deficient, otherwise* 0*.*

For an LTI system described by the transfer matrix *M*(*s*) and an upper linear fractional transformation (ULFT) connection shown in Figure 1 (left), the structured singular value *μ*Δ(*M*) can be defined as:

$$\mu\_{\mathsf{A}}(M(s)) = \sup\_{\omega \in \mathbb{R}\_{+}} \mu\_{\mathsf{A}}(M(j\omega)). \tag{15}$$

**Figure 1.** (**Left**) The generalized M-Δ structure containing the plant and the uncertainty block Δ. (**Right**) The closed-loop P-Δ-K structure containing the plant, controller and uncertainty block Δ.

Now, considering *M*(*s*) = LLFT(*P*, *K*)(*s*) as being the lower linear fractional transformation (LLFT) between plant *P* and controller *K*, the connection illustrated in Figure 1 (right) results. The generalized plant structure is:

$$P\_{\Lambda}(\mathbf{s}) = \begin{pmatrix} P\_{\text{val}}(\mathbf{s}) & P\_{\text{vw}}(\mathbf{s}) & P\_{\text{vu}}(\mathbf{s}) \\ P\_{\text{zd}}(\mathbf{s}) & P\_{\text{zw}}(\mathbf{s}) & P\_{\text{zu}}(\mathbf{s}) \\ P\_{\text{yd}}(\mathbf{s}) & P\_{\text{yw}}(\mathbf{s}) & P\_{\text{yu}}(\mathbf{s}) \end{pmatrix} \Leftrightarrow P\_{\Lambda} : \begin{pmatrix} \dot{\mathbf{x}}(t) \\ \mathbf{v}(t) \\ \mathbf{z}(t) \\ \mathbf{y}(t) \end{pmatrix} = \begin{pmatrix} A & B\_{d} & B\_{w} & B\_{u} \\ \mathbb{C}\_{v} & D\_{vd} & D\_{vw} & D\_{vu} \\ \mathbb{C}\_{z} & D\_{zd} & D\_{zw} & D\_{zu} \\ \mathbb{C}\_{y} & D\_{yd} & D\_{yw} & D\_{yu} \end{pmatrix} \begin{pmatrix} \mathbf{x}(t) \\ \mathbf{d}(t) \\ \mathbf{w}(t) \\ \mathbf{u}(t) \end{pmatrix},\tag{16}$$

where three types of input signals are present—the command input **<sup>u</sup>** <sup>∈</sup> <sup>R</sup>*nu* , the performance input **<sup>w</sup>** <sup>∈</sup> <sup>R</sup>*nw* , and the disturbance input **<sup>d</sup>** <sup>∈</sup> <sup>R</sup>*nd*—and three types of outputs—the measurements vector **<sup>y</sup>** <sup>∈</sup> <sup>R</sup>*ny* , the performances vector **<sup>z</sup>** <sup>∈</sup> <sup>R</sup>*nz* , and the disturbance output **<sup>v</sup>** <sup>∈</sup> <sup>R</sup>*nv* .

Besides the well-known H2/H<sup>∞</sup> methods, a controller that meets robust stability and robust performance alike can be computed using the *μ*-synthesis framework. Robust stability implies that a specific controller manages to stabilize all the processes described by the upper linear fractional transformation (ULFT) presented in Figure 1 (left), while robust performance implies that the controller is able to impose the desired closed-loop performance in the worst case scenario. In order to have a mathematical guarantee that a controller *K* meets the robust stability and performance, the Main Loop theorem can be used. It implies that closed-loop system meets robust stability and performance if and only if the structural singular value of the LLFT of the plant and controller, with respect to **Δ**, fulfills:

$$\sup\_{\omega \in \mathbb{R}\_+} \mu\_\Delta(\text{LFFT}(P, \mathbb{K})(j\omega)) < 1. \tag{17}$$

Therefore, the robust control problem can be written as:

$$\inf\_{\mathcal{K}\text{ stable}} \sup\_{\omega\in\mathbb{R}\_{+}} \mu\_{\mathbf{A}}(\text{LLF}(P,\mathcal{K})(j\omega)),\tag{18}$$

which is not convex. More than that, the structural singular values are hard to be explicitly computed. In practice, there are various bounds which can be used to approximate the structural singular value. One of the most used approximations of the upper bound is in [9]:

$$\mu\_{\mathbf{A}}(M) \le \inf\_{D \in \mathbf{D}} \overline{\varphi}(DMD^{-1}),\tag{19}$$

where *σ* denotes the largest singular value, and the set *D* is defined as:

$$D = \left\{ \text{diag}\left(D\_1, \dots, D\_s, d\_1 I\_{\mathfrak{m}\_1}, \dots, d\_f I\_{\mathfrak{m}\_f}\right) \middle| D\_k = D\_k^\top \in \mathbb{R}^{n\_k \times n\_k}, \, d\_j > 0, \, k = \overline{1, s}, \, j = \overline{1, f} \right\}. \tag{20}$$

Based on this upper bound, a good approximation of the initial non-convex problem can be employed by solving the following quasi-convex problem:

$$\inf\_{K \text{ stab.}} \sup\_{\omega \in \overline{\mathbb{R}}\_{+}} \inf\_{D \in \mathcal{D}} \overline{\sigma} \Big( D(j\omega) \cdot \text{LLFT}(P, K)(j\omega) \cdot (D(j\omega))^{-1} \Big). \tag{21}$$

If the scaling factor, represented by the system *D*, is fixed, then the problem (21) is nothing but a H<sup>∞</sup> optimization problem. On the other hand, fixing the controller *K*, the *D* scaling step can now be obtained by solving a Parrot problem for a desired frequency set Ω = {*ω*1,..., *ωN*} using the following generalized eigenvalue problem:

$$\begin{aligned} \min \quad & \gamma, \\ \text{s.t. } (\text{LLFT}(P, K)(j\omega\_i))^\* \cdot X \cdot \text{LLFT}(P, K)(j\omega\_i) \le \gamma^2 X, \end{aligned} \tag{22}$$

where from the solution *X* = (*D*(*jωi*)) <sup>∗</sup> · *D*(*jωi*), the matrix *D*(*jωi*) can be extracted using a singular value decomposition. After all Parrot problems are solved, a minimum phase system is found in order to approximate the analytical solution *D*(*s*). In summary, an iterative algorithm which solves the *μ*-synthesis problem starts by setting *D* = *I*, with the following steps applied successively:

**1:** Fix *D* and solve the H<sup>∞</sup> optimal problem to find a controller *K*:

$$K = \arg\inf\_{K \text{ stable}} ||\text{LLFT}(P, K)||\_{\infty}. \tag{23}$$

**2:** Fix the controller *K* and solve the set of convex problems:

$$D(j\omega) = \arg\inf\_{D \in D} \overline{\sigma} \left( D \cdot \text{LLFT}(P, K)(j\omega) \cdot D^{-1} \right), \tag{24}$$

for a given frequency range Ω and, then, fit a stable minimum phase transfer matrix *D*(*s*).

Steps **1** and **2** are executed in a loop sequence until the difference between two consecutive H<sup>∞</sup> norms is less than a prescribed tolerance or the maximum number of iterations is reached.

#### *2.3. Artificial Bee Colony Optimization*

The artificial bee colony (ABC) optimization is a nature-inspired algorithm used to minimize a cost function:

$$f: D \to \mathbb{R}, \text{ where } D = [lb\_1, ub\_1] \times [lb\_2, ub\_2] \times \cdots \times [lb\_d, ub\_d] \subset \mathbb{R}^d. \tag{25}$$

The ABC algorithm mimics the behaviour of real honeybees, where each food source represents a possible solution of the optimization problem described above. The location and the amount of nectar correspond to the design variables and the cost function, respectively. The bees are divided in two main groups: employed and unemployed bees, while the unemployed bees could be of two types as well: onlooker and scout bees. The employed bees are the ones that investigate the food source and return to the hive to inform the others by performing the waggle dance; the onlooker bees are the ones that watch the dance and decide whether or not a food source is worthy of being searched or not; the scout bees are former employed bees that have abandoned their previous food source, due to lack of nectar, and which now search for a new one. The Best Solution is represented by the food source, and the quality (or cost) of the solution is represented by the amount of nectar.

The number of employed bees coincides with number of the onlooker bees and represents the dimension of the swarm problem, denoted by *N*. The employed bees start the foraging process by randomly searching an initial position **x** (0) *<sup>i</sup>* in the domain *D*:

$$\mathbf{x}\_{i}^{(0)} = \begin{pmatrix} lb\_{1} + \boldsymbol{\Phi}\_{i,1}^{(0)} \cdot (\boldsymbol{\mu}b\_{1} - lb\_{1}) \\ lb\_{2} + \boldsymbol{\Phi}\_{i,2}^{(0)} \cdot (\boldsymbol{\mu}b\_{2} - lb\_{2}) \\ \vdots \\ lb\_{d} + \boldsymbol{\Phi}\_{i,d}^{(0)} \cdot (\boldsymbol{\mu}b\_{d} - lb\_{d}) \end{pmatrix} \in D,\tag{26}$$

where *φ*(0) *<sup>i</sup>*,1,*<sup>d</sup>* <sup>∈</sup> [−1, 1] are random numbers. After this initialization step, the first Best Solution appears.

Each employed bee searches a new food source based on the location of the current food source **x** (*k*) *<sup>i</sup>* and another food source **x** (*k*) *<sup>j</sup>* randomly selected. The new possible position is:

$$\mathbf{x}\_{i}^{(k)} = \mathsf{sact}\left(\mathbf{x}\_{i}^{(k)} + \boldsymbol{\phi} \odot (\mathbf{x}\_{i}^{(k)} - \mathbf{x}\_{j}^{(k)})\right),\tag{27}$$

where *φ* ∈ [−1, 1] *<sup>d</sup>* is an array of random numbers, is the element-wise multiplication, and sat is the saturation function that does not allow the position to be outside the searching domain *D*. Now, the position of the *i*th employed bee for the next iteration will be:

$$\mathbf{x}\_{i}^{(k+1)} = \arg\min \{ f(\mathbf{x}\_{i}^{(k)}), f(\mathbf{x}\_{i}^{(k)}) \},\tag{28}$$

which means that an employed bee will never choose a source with less nectar. If the position for the next iteration will not be changed, the abandonment counter of the *i*th employed bee increments.

The onlooker bees use the information shared by each employed bee and choose a location around the position of the employed bees. The fitness value of a solution **x** (*k*) *<sup>i</sup>* is given by:

$$\log \mathcal{W}(i) = \frac{-f(\mathbf{x}\_i^{(k)})}{\frac{1}{N} \sum\_{j} f(\mathbf{x}\_j^{(k)})},\tag{29}$$

and the probability that *i*th bee's source will be selected by an onlooker bee is:

$$p\_i = \frac{\mathcal{W}(i)}{\sum\_{j} \mathcal{W}(j)}.\tag{30}$$

Now, using a roulette wheel selection method, the onlooker bee will choose a source *i* and, using the same searching technique as an employed bee, a new position is computed using (27). If the outlooker bee founds a better solution than the *i*th employed bee, they change their roles, otherwise the abandonment counter for the *i*th source increments. After this step, we have *N* employed bees and *N* unemployed bees. However, if the abandonment counter for the *i*th source exceeds a threshold, the *i*th employed bee becomes a scout and tries to find a new location using the relation (26).

After every loop corresponding to employed, outlooker and scout bees, it is checked if there is a food source with a solution better than the last one. The algorithm is over when the maximum number of cycles is reached or when there is no improvement of the Best Solution after a prescribed number of cycles.

#### *2.4. Proposed Method*

The solution of the problem described in (21) using the classical *D*–*K* iteration with H2/H<sup>∞</sup> framework leads to a high-order controller. As a solution to this issue, a fixed structure family of controllers K can be considered, and the problem (21) becomes:

$$\inf\_{\substack{K \in \mathcal{K} \\ K \text{ stab}}} \sup\_{\omega \in \mathbb{R}\_+} \inf\_{D \in \mathcal{D}} \overline{\sigma} \Big( D(j\omega) \cdot \text{LFFT}(P, K)(j\omega) \cdot (D(j\omega))^{-1} \Big). \tag{31}$$

The new problem has the disadvantage of being non-convex in terms of the parameters of the proposed controller structure. However, the problem described in (31) will also be solved using a *D*–*K* iterative procedure, but the non-convex part of the problem has fewer degrees of freedom and it will be managed with an ABC optimization.

Starting with the model of the process *G*, a plant *P* is obtained after the augmentation step:

$$P: \begin{pmatrix} \dot{\mathbf{x}}(t) \\ \hline \mathbf{z}(t) \\ \mathbf{y}(t) \end{pmatrix} = \begin{pmatrix} A & B\_w & B\_u \\ \hline C\_z & D\_{zw} & D\_{zu} \\ C\_y & D\_{yw} & D\_{yu} \end{pmatrix} \begin{pmatrix} \mathbf{x}(t) \\ \hline \mathbf{w}(t) \\ \mathbf{u}(t) \end{pmatrix},\tag{32}$$

where the meaning of the inputs and outputs remains the same as in Section 2.2. Considering the advantages of the fractional-order controllers, the proposed structure of the controller is:

$$K^{\theta}(\mathbf{s}) = \begin{pmatrix} \mathsf{C}\_{FO}^{(1,1)}(\mathbf{s}) & \mathsf{C}\_{FO}^{(1,2)}(\mathbf{s}) & \dots & \mathsf{C}\_{FO}^{(1,n\_y)}(\mathbf{s})\\ \mathsf{C}\_{FO}^{(2,1)}(\mathbf{s}) & \mathsf{C}\_{FO}^{(2,2)}(\mathbf{s}) & \dots & \mathsf{C}\_{FO}^{(2,n\_y)}(\mathbf{s})\\ \vdots & \vdots & \ddots & \vdots\\ \mathsf{C}\_{FO}^{(n\_u,1)}(\mathbf{s}) & \mathsf{C}\_{FO}^{(n\_u,2)}(\mathbf{s}) & \dots & \mathsf{C}\_{FO}^{(n\_u,n\_y)}(\mathbf{s}) \end{pmatrix}' \tag{33}$$

where *<sup>C</sup>*(*i*,*j*) *FO* is a fractional order controller from the *i*th input to the *j*th output and has the form:

$$\mathcal{K}\_{FO}^{(i,j)}(s) = K\_P^{(i,j)} + \frac{K\_i^{(i,j)}}{s^{\lambda^{(i,j)}}} + K\_D^{(i,j)} s^{\mu^{(i,j)}},\tag{34}$$

with the tunable parameters described by the vector:

$$\theta^{(i,j)} = \begin{pmatrix} \mathcal{K}\_p^{(i,j)} & \mathcal{K}\_i^{(i,j)} & \lambda^{(i,j)} & \mathcal{K}\_D^{(i,j)} & \mu^{(i,j)} \end{pmatrix}^\top \in \mathcal{D}\_{ABC}^{(i,j)} \subset \mathbb{R}^5. \tag{35}$$

Using these considerations, the desired family of the fixed structure controllers can be described as follows:

$$\mathcal{K} = \left\{ K^{\theta}(\mathbf{s}) \, \middle| \, \theta \in D\_{ABC} \equiv D\_{ABC}^{(1,1)} \times D\_{ABC}^{(1,2)} \times \cdots \times D\_{ABC}^{(u\_u, u\_y)} \right\},\tag{36}$$

where all parameters are stored in a single vector *θ* describing all degrees of freedom of the tunable controller. Using the ORA mechanism, each component *<sup>K</sup><sup>θ</sup>* (*s*) ∈ K has a state-space representation:

$$K^{\theta}: \begin{pmatrix} \dot{\mathbf{x}}\_{K}(t) \\ \mathbf{u}(t) \end{pmatrix} = \begin{pmatrix} A\_{K}(\theta) & B\_{K}(\theta) \\ \hline \mathbb{C}\_{K}(\theta) & D\_{K}(\theta) \end{pmatrix} \begin{pmatrix} \mathbf{x}\_{K}(t) \\ \mathbf{y}(t) \end{pmatrix} \tag{37}$$

Next, we denote by *P<sup>θ</sup> <sup>o</sup>* the closed-loop system represented by the lower linear fractional transformation between the augmented plant *P* and controller *Kθ*, which can be represented as:

$$P\_o^{\theta} = \text{LLFT}(P, K^{\theta}) : \begin{pmatrix} \dot{\mathbf{x}}\_o(t) \\ \overline{\mathbf{z}\_o(t)} \end{pmatrix} = \begin{pmatrix} A\_o(\theta) & B\_o(\theta) \\ \overline{\mathbf{C}\_o(\theta)} & D\_o(\theta) \end{pmatrix} \begin{pmatrix} \mathbf{x}\_o(t) \\ \overline{\mathbf{w}\_o(t)} \end{pmatrix},\tag{38}$$

where state vector, input vector and output vector of the closed-loop system are:

$$\mathbf{x}\_0 = \begin{pmatrix} \mathbf{x} \\ \mathbf{x}\_K \end{pmatrix}, \quad \mathbf{w}\_0 \equiv \mathbf{w} \quad \text{and} \quad \mathbf{z}\_0 \equiv \mathbf{z}. \tag{39}$$

In Algorithm 1 the main steps necessary to obtain the parameters of the controller having the structure (33) are presented. The inputs of the algorithm are the closed-loop plant *P<sup>θ</sup> <sup>o</sup>* , containing the tunable controller parameters *θ*, and the parameters *α* and *β* which describe the cost function that needs to be minimized using an ABC optimization , but, *P<sup>θ</sup> o* must also contain the varying parameters and unmodelled dynamics. Therefore, the plant *P*<sup>Δ</sup> obtained after the augmentation step with uncertainties Δ has the form presented in (16). Thus, the first step made in Algorithm 1 consists in transforming the closed-loop system *Pθ <sup>o</sup>* in the generalized closed-loop system *P<sup>θ</sup> <sup>o</sup>*,<sup>Δ</sup> described as follows:

$$P\_{o, \Lambda}^{\theta} = \text{LLFT}(P\_{\Lambda \nu} K^{\theta}) : \begin{pmatrix} \dot{\mathbf{x}}\_o(t) \\ \overline{\mathbf{z}}\_o(t) \end{pmatrix} = \begin{pmatrix} \overline{A}\_o(\theta) & \overline{B}\_o(\theta) \\ \overline{C}\_o(\theta) & \overline{D}\_o(\theta) \end{pmatrix} \begin{pmatrix} \mathbf{x}\_o(t) \\ \overline{\mathbf{w}}\_o(t) \end{pmatrix}, \tag{40}$$

where the new extended performance inputs and outputs are:

$$
\overline{\mathbf{w}}\_{\mathcal{o}} = \begin{pmatrix} \mathbf{d} \\ \mathbf{w}\_{\mathcal{o}} \end{pmatrix} \quad \overline{\mathbf{z}}\_{\mathcal{o}} = \begin{pmatrix} \mathbf{v} \\ \mathbf{z}\_{\mathcal{o}} \end{pmatrix} \tag{41}
$$

As mentioned in Section 2.2, the structured singular value can be bounded using two *D*-scaling factors, one for the left and one for the right scaling, denoted *DL* and *DR*, respectively. As it can be notice in Figure 2, a new closed-loop plant *<sup>P</sup><sup>θ</sup> <sup>o</sup>* is obtained:

$$
\overline{P}\_o^{(\theta)}(\mathbf{s}) = D\_L(\mathbf{s}) \cdot P\_{o,\mathbf{A}}^{\theta}(\mathbf{s}) \cdot D\_R^{-1}(\mathbf{s}),\tag{42}
$$

having the state-space representation:

$$\overline{\mathcal{P}}\_o^{\theta} : \begin{pmatrix} \dot{\mathbf{k}}\_o(t) \\ \dot{\mathbf{z}}\_o(t) \end{pmatrix} = \begin{pmatrix} \dot{A}\_o(\theta) & \dot{B}\_o(\theta) \\ \overline{\mathcal{C}}\_o(\theta) & \overline{D}\_o(\theta) \end{pmatrix} \begin{pmatrix} \dot{\mathbf{x}}\_o(t) \\ \dot{\mathbf{w}}\_o(t) \end{pmatrix}. \tag{43}$$

All the above mentioned plants are presented in Figure 2. First, the generalized plant *P*<sup>Δ</sup> has a LLFT connection with the controller *Kθ*, resulting the closed-loop plant *P<sup>θ</sup> <sup>o</sup>*,Δ, having the input vector **<sup>w</sup>***<sup>o</sup>* and the output vector **<sup>z</sup>***o*. After the *<sup>D</sup>*-scaling step, a new plant *<sup>P</sup><sup>θ</sup> <sup>o</sup>* is obtained, having the input vector **w**ˆ *<sup>o</sup>* and the output vector ˆ**z***o*.

**Figure 2.** The augmented plant with uncertainties *P*<sup>Δ</sup> in LLFT connection with controller *K<sup>θ</sup>* forms the closed-loop plant *P<sup>θ</sup> <sup>o</sup>*,Δ. After each *D*-scale step, the plant used to find the controller parameters is *<sup>P</sup><sup>θ</sup> o* .

Before starting the while loop of Algorithm 1, an initialization of the generalized closedloop plant with *<sup>D</sup>*-scale *<sup>P</sup><sup>θ</sup> <sup>o</sup>* is performed with the initial scale factors *DL* = *Inw* and *DR* = *Inz* , as seen in line 2. As noticed in line 4, the *K* step is performed using this generalized plant having as degrees of freedom the tunable parameters *θ*. In order to compute the controller parameters *θ*∗, the ABC optimization will be used. The cost function to be minimized is:

$$f: D\_{ABC} \to \mathbb{R}\_+, \ f(\theta) = \begin{cases} ||\overline{P}\_o^{\theta}||\_{\infty^\prime} & \text{if } \overline{P}\_o^{\theta} \text{ is stable} \\ a\lambda\_{\text{max}}(\vec{A}\_o) + \beta\_\prime & \text{if } \overline{P}\_o^{\theta} \text{ is unstable} \end{cases} \tag{44}$$

where the operator *λmax* is defined by:

$$
\lambda\_{\max} \colon \mathbb{R}^{M \times M} \to \mathbb{R}, \ \lambda\_{\max}(A) = \max \{ \text{Re}(\lambda) \mid \lambda \in \Lambda(A) \}. \tag{45}
$$

**Algorithm 1:** Fixed Structure *μ*-Synthesis.

**Input:** *P<sup>θ</sup> <sup>o</sup>* , *α*, *β* **Output:** *Kθ*- **<sup>1</sup>** get uncertain closed-loop plant *P<sup>θ</sup> <sup>o</sup>*,<sup>Δ</sup> as in (40) **<sup>2</sup>** set *DL* <sup>=</sup> *Inw* and *DR* <sup>=</sup> *Inz* and compute *<sup>P</sup><sup>θ</sup> <sup>o</sup>* <sup>=</sup> *DL* · *<sup>P</sup><sup>θ</sup> <sup>o</sup>*,<sup>Δ</sup> · *<sup>D</sup>*−<sup>1</sup> *R* **<sup>3</sup> while** *Niter* ≤ *MAX\_ITER and exists\_improvement* **do <sup>4</sup>** *<sup>P</sup>θ*<sup>∗</sup> *<sup>o</sup>* <sup>=</sup> computeKstep(*P<sup>θ</sup> <sup>o</sup>*, *α*, *β*) **<sup>5</sup>** update the uncertain plant *Pθ*- *o*,Δ **<sup>6</sup>** *Pθ*<sup>∗</sup> *<sup>o</sup>*,*nom* = getNominalPlant(*Pθ*<sup>∗</sup> *<sup>o</sup>*,Δ) **<sup>7</sup>** [*DL*, *DR*] = computeDstep(*Pθ*<sup>∗</sup> *<sup>o</sup>*,*nom*) **<sup>8</sup>** *<sup>P</sup>θ*- *<sup>o</sup>* <sup>=</sup> *DL* · *<sup>P</sup>θ*- *<sup>o</sup>*,<sup>Δ</sup> · *<sup>D</sup>*−<sup>1</sup> *R* **<sup>9</sup>** check if improvement exists and increase *N*iter

The procedure computeKstep used to obtain the controller parameters is briefly presented in Algorithm 2 and will be described below. The inputs of the algorithm are the generalized closed-loop plant with *<sup>D</sup>*-scaling step *<sup>P</sup><sup>θ</sup> <sup>o</sup>*, along with the parameters *α* and *β*

which describe the cost function (44). The first step of this routine consists in computing the domain *DABC* of the cost function based on the constraints of the tunable parameters. The main limitation is represented by the fractional orders of the integral and derivative effects of the controller which must remain in (0, 1), according to ORA.

In the second step of routine Algorithm 2, an initial population is created. Let *N* be the dimension of the swarm problem. This parameter can be given as input, but as a good practice, this can be chosen 100 times larger than the number of tunable parameters. The initialization step consists in randomly generating the positions *θ* (0) <sup>1</sup> , *θ* (0) <sup>2</sup> , ... , *θ* (0) *<sup>N</sup>* of the food sources for each employed bee in the domain *DABC* using relation (26). After the initialization step, the first Best Solution (BS) is computed as:

$$\theta^{\star} = \arg\min \left\{ f(\theta\_i^{(k)}) \mid i = \overline{1, N} \right\} \Rightarrow BS = f(\theta^{\star}).\tag{46}$$

Using this initial population, the main while loop starts. In line 4, the employed bees step is performed. In this step, each employed bee searches a new position around using relation (27), resulting *N* new possible positions for the next step, denoted by *θ* (*k*) <sup>1</sup> , *θ* (*k*) <sup>2</sup> , ... , *θ* (*k*) *<sup>N</sup>* , and the proposed positions of the employed bees at step *k* + 1 will be:

$$\theta\_i^{(k+1)} = \arg\min \{ f(\theta\_i^{(k)}), f(\overline{\theta}\_i^{(k)}) \}, \ i = \overline{1, N}. \tag{47}$$

If, for a specific food source *i*, the proposed position coincides with the previous position, the abandonment counter increments.

Using the proposed solutions of the above step, each onlooker bee selects a new possible solution based on the roulette wheel selection mechanism and relation (27), resulting a new set of proposed solutions: ˜ *θ* (*k*) <sup>1</sup> , ˜ *θ* (*k*) <sup>1</sup> , ... , ˜ *θ* (*k*) *<sup>N</sup>* . If the *i*th onlooker bee has a better solution than *i*th employed bee, they exchange their roles, otherwise the abandonment counter for the *i*th food source increments. After this step, the new set of proposed positions for the employed bees are:

$$\hat{\theta}\_{i}^{(k+1)} = \arg\min \{ f(\tilde{\theta}\_{i}^{(k)}), f(\hat{\theta}\_{i}^{(k+1)}) \}, \ i = \overline{1, N}. \tag{48}$$

**Algorithm 2:** Compute *K* Step.

**Input:** *<sup>P</sup><sup>θ</sup> <sup>o</sup>*, *α*, *β* **Output:** *<sup>P</sup>θ*- *o* **<sup>1</sup>** compute the domain *D* of the optimization problem **<sup>2</sup>** create an initial population of employed bees using (26) and select the first Best Solution **<sup>3</sup> while** *Ncycles* < *MNC and exists\_improvement* **do <sup>4</sup>** perform the employed bees step **<sup>5</sup>** perform the outlooker bees step **<sup>6</sup>** perform the scout bees step **<sup>7</sup>** find the new Best Solution, check if improvements exist and increase *N*cycles **<sup>8</sup> end**

After performing the outlooker bees step from line 5, the abandonment counter for each active food source will be interrogated. If the abandonment counter of the *i*th position exceeds a prescribed threshold, denoted by LIMIT, the employed bee becomes a scout bee and its new position is obtained using (26). As a good practice, this paper proposed an improved mechanism of converting employed bees in scout bees. If the value of the cost function at the proposed position *f*(ˆ *θ* (*k*+1) *<sup>i</sup>* ) is over *β*, this means that, in the case of a good calibration of parameters *α* and *β*, the solution corresponds to an unstable closed-loop system and can be dropped. The positions of the employed bees for the next iteration become *θ* (*k*+1) <sup>1</sup> , *θ* (*k*+1) <sup>2</sup> ,..., *θ* (*k*+1) *<sup>N</sup>* .

The last step of the main while loop, presented in line 7, consists in computing the Best Solution after this new iteration:

$$\theta^\* = \arg\min \left\{ f(\theta\_{old}^\*), f(\theta\_1^{(k)}), f(\theta\_2^{(k)}), \dots, f(\theta\_N^{(k)}) \right\} \Rightarrow BS = f(\theta^\*), \tag{49}$$

and, then, checking if there exist any improvements after this step. In order to have a good trade-off between execution time and solution accuracy, it can be useful to establish a threshold for the number of steps when no improvement appears in Best Solution and mark if there exists such an improvement. Being a metaheuristic optimization algorithm, the runtime can be made deterministic and theoretically finite by imposing the variable *MNC*, without convergence guarantees. In practice, such methods have been successfully employed in various global optimization problems and, being that it is an offline optimization, it is not problematic for our approach.

Returning to Algorithm 1, after the *K* step is performed, a new parameter vector *θ*- results, which leads to a new generalized closed-loop plant *<sup>P</sup>θ*- *<sup>o</sup>* and to a new uncertain plant *Pθ*- *<sup>o</sup>*,Δ. The closed-loop plant *<sup>P</sup>θ*- *<sup>o</sup>*,<sup>Δ</sup> is used to compute the next *<sup>D</sup>*-scale factors. From *<sup>P</sup>θ*- *o*,Δ we extract a nominal plant *Pθ*- *<sup>o</sup>*,*nom* by fixing the tunable parameters of the controller with the values determined in step 4.

The computeDstep routine from line 7 receives as input this nominal plant and returns the left and the right *D*-scale factors. Based on the poles and the transmission zeros of the nominal plant *Pθ*- *<sup>o</sup>*,*nom*, a set Ω = {*ω*1, *ω*2, ... , *ωF*} of frequencies is generated. Then, we need to get the frequency response data for each scaling factor by solving the following generalized eigenvalue problem:

$$\min \ \gamma\_{\prime}$$
 
$$\text{s.t. } \overline{\sigma} \left( D\_L(j\omega\_i) \cdot P\_{o,nom}^{\theta^\*}(j\omega\_i) \cdot D\_R^{-1}(j\omega\_i) \right) < \gamma\_{\prime} \tag{50}$$

for each *i* = 1, *F*, which is nothing but a Parrot problem which can be solved point by point using LMI techniques, as mentioned in Section 2.2. Once the frequency response data points are obtained for each value in Ω, we need to fit two minimum phase systems, one for each scaling factor, then perform the *D*-scaling step, giving a new generalized closed-loop system:

$$
\overline{P}\_o^{\theta^\*}(s) = D\_L(s) \cdot P\_{o,\Lambda}^\star(s) \cdot D\_R^{-1}(s). \tag{51}
$$

In a similar manner with the computeKstep routine, there are possible stopping criteria which can be used. First, a threshold for the maximum number of *D*–*K* iterations can be imposed. Another important stopping condition appears if the upper bound of the structural singular value is less than 1, because this fact already guarantees that the controller ensures robust stability and robust performance. In accordance with the allowed maximum number of steps, a stopping criterion could be to check if there are any improvements after a certain number of steps.

#### **3. Numerical Results**

In this section we illustrate how the proposed method can be used on a benchmark problem. The process is represented by a Computer Numerical Control (CNC) machine with two orthogonal axis which are operated by two servo DC motors. A Trio Motion Coordinator family controller was used for the CNC motors. The programming language was Trio Basic, which provides various functions such as linear, circular and helical interpolation, variable speed and acceleration profile functions and control functions to ensure smooth and synchronized motions.

A mathematical model for each axis was determined on the basis of measured data: angular speeds *ω<sup>x</sup>* and *ωy*, and angular positions *θ<sup>x</sup>* and *θy*. The state space mathematical model of the machine is described as follows:

$$G: \begin{pmatrix} \dot{\omega}\_{\mathcal{X}} \\ \dot{\theta}\_{\mathcal{x}} \\ \dot{\omega}\_{\mathcal{Y}} \\ \frac{\dot{\theta}\_{\mathcal{Y}}}{\theta\_{\mathcal{Y}}} \\ \theta\_{\mathcal{Y}} \end{pmatrix} = \begin{pmatrix} -\frac{1}{T\_{\max}} & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 \\ 0 & 0 & -\frac{1}{T\_{\max}} & 0 \\ 0 & 0 & 1 & 0 \\ \hline 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 \end{pmatrix} \begin{pmatrix} \omega\_{\mathcal{X}} \\ \theta\_{\mathcal{X}} \\ \omega\_{\mathcal{Y}} \\ \theta\_{\mathcal{Y}} \\ \frac{\theta\_{\mathcal{Y}}}{\mu\_{\mathcal{X}}} \\ \mu\_{\mathcal{Y}} \end{pmatrix},\tag{52}$$

where the state vector is **x** = *ω<sup>x</sup> θ<sup>x</sup> ω<sup>y</sup> θ<sup>y</sup>* , the input vector is **u** = *ux uy* and the output vector is **y** = *θ<sup>x</sup> θ<sup>y</sup>* . The model parameters, along with their nominal values and uncertainty range are detailed in Table 1.

**Table 1.** Nominal values and uncertainty ranges of the CNC model parameters.


For this control problem a mixed-sensitivity loop shaping technique is used, which provides a good trade-off between performance and robustness. In order to use this technique, a new plant model will be obtained after the augmentation process, as in Figure 3. The performance inputs for the resulting augmented plant *P* are the references for both axis **w** ≡ **r** = *rx ry* . For the augmentation procedure, the closed-loop transfer functions need to be weighted from the reference signals **r** to their corresponding error signals **e**, output signals **y** and command signals **u**, which are named: sensitivity function *<sup>S</sup>* = (*<sup>I</sup>* + *GK*)−1, complementary sensitivity function *<sup>T</sup>* = *<sup>I</sup>* − *<sup>S</sup>* and control effort *KS*, respectively. The performance output vector is composed from the weighted outputs of these three vector-valued functions:

$$\mathbf{z} = \begin{pmatrix} \mathbf{z}\_S \\ \mathbf{z}\_T \\ \mathbf{z}\_{KS} \end{pmatrix}, \text{ where } \mathbf{z}\_S = \begin{pmatrix} z\_{S,x} \\ z\_{S,y} \end{pmatrix}, \mathbf{z}\_T = \begin{pmatrix} z\_{T,x} \\ z\_{T,y} \end{pmatrix} \text{ and } \mathbf{z}\_{KS} = \begin{pmatrix} z\_{KS,x} \\ z\_{KS,y} \end{pmatrix}. \tag{53}$$

**Figure 3.** Closed-loop augmented plant.

In order to ensure good disturbance rejection, good reference tracking and stabilization of an unstable plant, the sensitivity function must have small magnitude, which means that the magnitude of the open loop must be large. On the other hand, in order to ensure mitigation of measurement noise and robust stability, the complementary sensitivity function must have small magnitudes, which implies that the magnitude of the open loop system must be small. More than that, the command signal must have small magnitude, which implies that the control effort transfer function must also have small magnitude. However, although these requirements seem to be conflicting, the frequency range where the magnitude of the open loop must be small and high are mostly disjunctive: the magnitude should be high for low frequencies and should be low for high frequencies. In order to ensure the desired shape of these three functions, three weighting functions must be designed, respectively.

The sensitivity function is a very good indicator of the closed-loop system tracking performance and has the advantage of being sufficient to consider only the magnitude. Typical specifications for sensitivity weighting functions are: minimum bandwidth frequency *ω*- *<sup>B</sup>*, maximum steady-state error *A* and maximum peak magnitude *M*, imposed by the following model [36]:

$$\mathcal{W}\_{\mathcal{S}}(\mathbf{s}) = \frac{\frac{1}{M}\mathbf{s} + \omega\_{\mathcal{B}}^{\*}}{\mathbf{s} + \omega\_{\mathcal{B}}^{\*}A}. \tag{54}$$

In a similar manner, the weighting function for the complementary sensitivity must be designed using the following specifications: the maximum peak amplitude *MT*, the maximum value for high frequencies *AT*, the minimum bandwidth *ω*- *BT* and the roll-off *n*, formulated as:

$$\mathcal{W}\_T(s) = \frac{(s + \omega\_{BT}^\*)^n}{\left(A\_T^{1/n}s + \omega\_{BT}^\* M\_T^{1/n}\right)^n}.\tag{55}$$

For the control effort weighting function, the main performance specifications are the maximum value of the magnitude at low and high frequencies, denoted by *DC* and *HF*, respectively, and an intermediate point of interest. Sometimes, the main goal is simply to maintain the command signal under a prescribed value due to physical limitations of the system or other causes.

The major advantage of this approach consists in sculpting the relevant loop functions to impose performances implying good tracking and dynamic behaviour. Of great use are the rise time limitation through *ωB*, steady-state error through *A*, while the roll-off slope of the closed-loop system imposed using *n* is directly coupled with sensor noise characteristics. These performances are specified for different frequency ranges, using the adequately selected weighting functions presented above.

Being a MIMO system with two inputs and two outputs, all weighting functions must be described by 2 × 2 transfer matrices , but, following a standard decoupling procedure, the weighting functions will be 2 × 2 diagonal transfer matrices. For the sensitivity, we consider two nearly similar weighting transfer functions, one for each axis, having the maximum bandwidth *ω*- *<sup>B</sup>*,*<sup>x</sup>* <sup>=</sup> <sup>3</sup> [rad/s] and *<sup>ω</sup>*- *<sup>B</sup>*,*<sup>y</sup>* = 5 [rad/s], the maximum steady-state error *Ax* = *Ay* = 10−<sup>2</sup> and the desired maximum sensitivity peak *Mx* = *My* = 1.5, resulting in:

$$\mathcal{W}\_{\mathbb{S}}(\mathbf{s}) = \begin{pmatrix} \mathcal{W}\_{\mathbb{S},\mathbf{r}}(\mathbf{s}) & \mathbf{0} \\ \mathbf{0} & \mathcal{W}\_{\mathbb{S},\mathbf{y}}(\mathbf{s}) \end{pmatrix}, \quad \text{where} \quad \mathcal{W}\_{\mathbb{S},\mathbf{r}}(\mathbf{s}) = \frac{0.6667 \mathbf{s} + 3}{\mathbf{s} + 0.03} \text{ and } \mathcal{W}\_{\mathbb{S},\mathbf{y}}(\mathbf{s}) = \frac{0.6667 \mathbf{s} + 5}{\mathbf{s} + 0.05}. \tag{56}$$

For the complementary sensitivity weighting function, the same 2 × 2 diagonal structure approach will be used, imposing the same parameters for both axis: maximum complementary bandwidth *ω*- *BT*,*<sup>x</sup>* = 50 [rad/s], maximum peak magnitude *MT*,*<sup>x</sup>* = *MT*,*<sup>y</sup>* = 1.5, maximum magnitude at high frequencies *AT*,*<sup>x</sup>* = *AT*,*<sup>y</sup>* = 10−<sup>2</sup> and roll-off *nx* = *ny* = 1, resulting in:

$$\mathcal{W}\mathbf{r}(\mathbf{s}) = \begin{pmatrix} \mathcal{W}\_{T,\mathbf{x}}(\mathbf{s}) & \mathbf{0} \\ \mathbf{0} & \mathcal{W}\_{T,\mathbf{y}}(\mathbf{s}) \end{pmatrix}, \quad \text{where} \quad \mathcal{W}\mathbf{r}\_{\cdot,\mathbf{x}}(\mathbf{s}) = \mathcal{W}\mathbf{r}\_{\cdot,\mathbf{y}}(\mathbf{s}) = \frac{\mathbf{s} + 50}{0.01\mathbf{s} + 75}, \tag{57}$$

while the control effort weighting function being designed to encompass only the physical limitation of the command signal (between −1 and 1), resulting the transfer matrix:

$$\boldsymbol{W}\_{\rm KS}(\mathbf{s}) = \begin{pmatrix} \boldsymbol{W}\_{\rm KS,x}(\mathbf{s}) & \mathbf{0} \\ \mathbf{0} & \boldsymbol{W}\_{\rm KS,y}(\mathbf{s}) \end{pmatrix}, \quad \text{where} \quad \boldsymbol{W}\_{\rm KS,x}(\mathbf{s}) = \boldsymbol{W}\_{\rm KS,y}(\mathbf{s}) = 1. \tag{58}$$

The proposed structure of the controller is a decentralized one with two *PIλD<sup>μ</sup>* controllers:

$$\mathcal{K} = \left\{ \mathcal{K}^{\theta}(\mathbf{s}) = \begin{pmatrix} \mathcal{K}\_{\mathcal{P}, \mathbf{x}} + \mathcal{K}\_{\mathcal{I}, \mathbf{s}} \mathbf{s}^{-\lambda\_{\mathbf{x}}} + \mathcal{K}\_{\mathcal{D}, \mathbf{x}} \mathbf{s}^{\mu\_{\mathbf{x}}} & \mathbf{0} \\ \mathbf{0} & \mathcal{K}\_{\mathcal{P}, \mathbf{y}} + \mathcal{K}\_{\mathcal{I}, \mathbf{y}} \mathbf{s}^{-\lambda\_{\mathbf{y}}} + \mathcal{K}\_{\mathcal{D}, \mathbf{y}} \mathbf{s}^{\mu\_{\mathbf{y}}} \end{pmatrix} \middle| \theta \in D \subset \mathbb{R}^{10} \right\},\tag{59}$$

where the tunable parameters are:

$$
\theta = \begin{pmatrix} \mathcal{K}\_{P,x} & \mathcal{K}\_{I,x} & \lambda\_x & \mathcal{K}\_{D,x} & \mu\_x & \mathcal{K}\_{P,y} & \mathcal{K}\_{I,y} & \lambda\_y & \mathcal{K}\_{D,y} & \mu\_y \end{pmatrix}^\top. \tag{60}
$$

The problem to be solved with the proposed method is the mixed-sensitivity fixed structure *μ*-synthesis one, described as:

$$\begin{array}{lcl}\min\_{\begin{subarray}{c}K\in\mathcal{K}\\K\text{ stable}\end{subarray}}\sup\_{\omega\in\mathbb{R}\_{+}}\inf\_{D\in\mathcal{D}}\overline{\sigma}\big(D(j\omega)\cdot\mathsf{LLFT}(P,K)(j\omega)\cdot(D(j\omega))^{-1}\big),\\\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\tag{61}\\ \text{s.t.}\quad\left|\quad\,\,^{W\_{S}}\overline{\mathscr{U}}\_{T}\,\,^{V}\right|\_{\infty}<1.\end{array}\tag{61}$$

The settings for computeKstep used in the experiments are: the swarm dimension *N* = 1000, the maximum number of cycles *MNC* = 50, the maximum number of cycles with no improvements *NOIMP* = 10, the limit for the abandonment counter *LIMIT* = 10. The parameters necessary to describe the cost function (44) are *α* = 1 and *β* = 105. The maximum number of *D*–*K* iterations is *MAX*\_*ITER* = 10 and the maximum window length for assessing lack of progress is 4. Using this setup, the mixed-sensitivity fixed structure *μ*-synthesis problem (61) is solved using four *D*–*K* iterations, as noticed in Table 2. The fractional order controller has been approximated using ORA with the following parameters: the frequency range is [*ωl*, *<sup>ω</sup>u*] <sup>=</sup> [<sup>1</sup> × <sup>10</sup>−4, 1 × 103] [rad/s] and the order of the approximation is *N* = 3. Given that, the resulting controller is:

$$K^{\theta^\*} (\mathbf{s}) = \begin{pmatrix} 0.01 + 7.1116 \cdot \mathbf{s}^{-0.7648} + 0.1133 \cdot \mathbf{s}^{0.0909} & 0\\ 0 & 0.1464 + 10 \cdot \mathbf{s}^{-0.9926} + 0.1344 \cdot \mathbf{s}^{0.0549} \end{pmatrix} \tag{62}$$

**Table 2.** The evolution of the structural singular value in the *D*–*K* iteration procedure used to solve the mixed-sensitivity fixed structure *μ*-synthesis problem for the case study—FO-PID structure.


The imposed shape of the sensitivity, complementary sensitivity and control effort functions for both axis are depicted in Figure 4, along with the obtained shapes of those functions with the resulting controller for 100 Monte Carlo simulations. It can be noticed that all resulting Bode diagrams are under the prescribed shapes, which is guaranteed by the fact that the upper bound of the structured singular value *μ*<sup>Δ</sup> *Pθ*- *o*,Δ is less than 1. The

time-domain performances of the systems *rx* → *θ<sup>x</sup>* and *ry* → *θ<sup>y</sup>* are depicted in Figure 5, which are correlated with the frequency-domain performances. As such, the minimum values of the bandwidths for both *x* and *y* axis are over *ω*- *<sup>B</sup>*,*<sup>x</sup>* <sup>=</sup> 3 [rad/s] and *<sup>ω</sup>*- *<sup>B</sup>*,*<sup>y</sup>* = 5 [rad/s], which means that the rise time is less than 0.33 [*s*] and 0.2 [*s*], respectively. For the system *rx* → *θx*, the rise time of the nominal system is 0.248 [*s*] and varies from 0.227 [*s*] to 0.281 [*s*], while the settling time is 0.558 [*s*] and varies from 0.496 [*s*] to 0.664 [*s*]. On the other hand, for the system *ry* → *θy*, the rise time of the nominal system is 0.211 [*s*] and varies from 0.19 [*s*] to 0.235 [*s*], having the settling time for the nominal system 0.405 [*s*] and varying from 0.363 [*s*] to 0.454 [*s*]. According to the shape of the actual obtained sensitivity functions, there is no overshoot and no steady-state error for neither of the experiments presented using Monte Carlo simulations. Moreover, the reciprocal axis influence is small, as resulted from numerical simulations, where the peak amplitude from *ry* to *θ<sup>x</sup>* varies from 0.01 to 0.0143, and the peak amplitude from *rx* to *<sup>θ</sup><sup>y</sup>* varies from 3.55 × <sup>10</sup>−<sup>3</sup> to 4.97 × <sup>10</sup><sup>−</sup>3, respectively.

**Figure 4.** Imposed shapes of the sensitivity, complementary sensitivity and control effort frequency responses for both axis, along with 100 Monte Carlo simulations with *FO*-*PID* closed-loop systems.

**Figure 5.** Time-domain closed-loop *FO*-*PID* performances for *rx* → *θ<sup>x</sup>* and *ry* → *θ<sup>y</sup>* systems.

#### **4. Discussion**

As noticed, the resulting controller contains a small fractional *D* term, which may be negligible. As such, the controller may be resynthesized with an imposed diagonal *PI<sup>λ</sup>* structure:

$$\mathcal{K} = \left\{ K^{\theta}(s) = \begin{pmatrix} K\_{P,x} + K\_{I,x}s^{-\lambda\_x} & 0\\ 0 & K\_{P,y} + K\_{I,y}s^{-\lambda\_y} \end{pmatrix} \Big| \theta \in D \subset \mathbb{R}^6 \right\},\tag{63}$$

where the tunable parameters are:

$$
\theta = \begin{pmatrix} K\_{P,x} & K\_{I,x} & \lambda\_x & K\_{P,y} & K\_{I,y} & \lambda\_y \end{pmatrix}^\top. \tag{64}
$$

The control problem remains the same as in (61), maintaining the constraints as in (56)–(58). The settings for this experiment were kept the same as for the previous case: *N* = 1000, *MNC* = 50, *NOIMP* = 10, *LIMIT* = 10, *α* = 1, *β* = 105, *MAX*\_*ITER* = 10, [*ωl*, *ωu*] = [1e-4, 1e3] [rad/s] and *N* = 3. Using this setup, the mixed-sensitivity fixed structure *μ*-synthesis problem (61) is solved using four *D*–*K* iterations, as noticed in Table 3. The resulting controller is:

$$K\_{FO-PI}^{\theta^\*} (s) = \begin{pmatrix} 0.2229 + 5.9392 \cdot s^{-0.7792} & 0\\ 0 & 0.3949 + 10 \cdot s^{-0.9733} \end{pmatrix} . \tag{65}$$

**Table 3.** The evolution of the structural singular value in the *D*–*K* iteration procedure used to solve the mixed-sensitivity fixed structure *μ*-synthesis problem for the case study—FO-PI structure.


The imposed s hape of the sensitivity, complementary sensitivity and control effort functions for both axis are depicted in Figure 6, along with the obtained shapes of those functions with the resulting controller for 100 Monte Carlo simulations. It can be noticed that all resulting Bode diagrams are under the prescribed shapes, which is guaranteed by the fact that the upper bound of the structured singular value *μ*<sup>Δ</sup> *Pθ*- *o*,Δ is less than 1.

**Figure 6.** Imposed shapes of the sensitivity, complementary sensitivity and control effort frequency responses for both axis, along with 100 Monte Carlo simulations with actual *FO*-*PI* closed-loop systems.

The proposed method results are compared with those obtained using the musyn routine from MATLAB [37]. The musyn routine manages to solve both fixed structure and free-structure *μ*-synthesis control problems. The first solution of the problem (61) is obtained using the proposed method with results already presented in Section 3. Starting from the same control problem, the structured *μ*-synthesis version of the musyn routine with the same stopping criteria was used. The resulting controller after 2 iterations achieved its best performance *<sup>μ</sup>*Δ(*Pθ*- *<sup>o</sup>*,Δ) = 0.9842, which means that there is a mathematical guarantee for robust stability and robust performance. The transfer matrix of this controller is:

$$K^{\theta^\*} (\mathbf{s}) = \begin{pmatrix} 0.0101 + 7.4689 \cdot \mathbf{s}^{-0.7860} + 0.1729 \cdot \mathbf{s}^{0.0542} & 0\\ 0 & 0.0881 + 5.4840 \cdot \mathbf{s}^{-0.9749} + 0.2031 \cdot \mathbf{s}^{0.0348} \end{pmatrix} . \tag{66}$$

In opposition with the above approaches, the controller obtained with *μ*-synthesis procedure from MATLAB without imposing a fixed structure is of order 74 and, after 10 iterations, the best achieved performance is *<sup>μ</sup>*Δ(*Pθ*- *<sup>o</sup>*,Δ) = 1.003. The frequency-domain data for structured singular values corresponding to these three numerical simulations are presented in Figure 7. As mentioned, the peak value of the *μ* values for the unstructured problem is over the critical value 1, while the FO-PID controller manages to fulfill all requirements. A comparison between the frequency responses of the controllers is shown in Figure 8.

**Figure 7.** Comparison between structured singular values' frequency response obtained with the structured *μ*-synthesis from MATLAB (blue), with the unstructured *μ*-synthesis from MATLAB (orange) and with the proposed method (red), respectively.

**Figure 8.** Obtained controllers' frequency responses with the structured *μ*-synthesis from MATLAB (blue), unstructured (orange) *μ*-synthesis from MATLAB, and with the proposed method (red).

The integer-order approximation of a fractional element using ORA contains two exponential terms, as seen in (7), which presently cannot be treated using the realp objects in MATLAB. The actual solution used for this paper is to approximate the exponential function using Taylor series truncation. As stated in the Introduction, our approach requires only the range of the controller parameters and, thus, another object could be used instead of the entire structure of realp necessary in nonsmooth optimization-based algorithms used in MATLAB hinfstruct and systune routines. Based on this limitation, the toolbox presented in [38] will be extended in order to address the previously mentioned

mathematical issues, due to the fact that only the fixed-structure H<sup>∞</sup> synthesis algorithm uses the realp object, which can be replaced by our approach, where the NP-hard nonconvex problem is solved using an ABC swarm optimization.

Compared to other approaches previously described in the introduction, where LQR methods were considered for CNC machines, the advantages of the proposed method consist in the generality of the method and the flexibility of the robustness, with the possibility to compensate measurement noise, unmodelled dynamics and input-output disturbances. Therefore, while LQR requires the complete state vector to be measured at runtime, the proposed method requires only the provided measurements, modelled by the actual outputs of the system. Although the LQR method can be augmented with a state estimator in order to obtain output feedback, the main limitation of this approach is that the model of the plant must be accurate, while in the Robust Control framework, utilized in our method, an entire family of uncertain plants can be taken into consideration at the design phase. Moreover, it is difficult to impose exact limitations on the maximum allowed command signals, using the energy-based approach, which generally is an intrinsic limitation of the execution element.

#### **5. Conclusions and Future Work**

The current paper presents a new design method for fixed structure fractional-order controllers using the Robust Control framework. The proposed method manages to return nearly optimal parameters of a MIMO FO-PID as a solution for a mixed-sensitivity fixed structure *μ*-synthesis control problem. Although the *μ*-synthesis control problem is NPhard, the *D*–*K* iteration algorithm represents a good approximation which allows to convert it into a P-hard problem. However, the returned controller is of high order, which means that an order reduction must be performed in order to implement the control law. Therefore, the imposed structure is an increasingly explored approach, although such a problem presents a non-convex component for the *K* step. Our approach consists of an artificial bee colony swarm optimization as a solution to this non-convex fixed structure H<sup>∞</sup> subproblem. This solution requires only the range of the controller parameters, as opposed to the nonsmooth optimization-based approach from MATLAB's Robust Control Toolbox, where the parameters can be used only in polynomial structured expressions, which is an inherent limitation when fractional-order controllers are desired. Further, the case study of mixedsensitivity *μ*-synthesis position control problem for both axis of a CNC machine manages to underline the strong points of the method and of the imposed structure of the controller: it provides a mathematical guarantee for robust stability and robust performance, while the unstructured version of *μ*-synthesis from MATLAB does not manage to offer it.

As future work, we want to include our method in a toolbox, as stated in the Discussion section, which starts from an initial process model and a set of desired performances, and manages to automatically obtain the augmented plant, the controller decoupling transfer matrix, the optimal values of the controller parameters, followed by closed-loop simulations and validations. Additionally, we propose to extend this technique for certain types of nonlinear systems.

**Author Contributions:** Conceptualization, V.M. and M. ¸S.; methodology, V.M.; software, V.M.; validation, M. ¸S. and M.S.; formal analysis, V.M. and P.D.; investigation, V.M. and D.M.; resources, V.M.; data curation, D.M. and M.S.; writing—original draft preparation, M.V., D.M. and M. ¸S.; writing—review and editing, M. ¸S., D.M., M.S. and P.D.; visualization, M. ¸S.; supervision, P.D.; project administration, V.M.; funding acquisition, D.M. All authors have read and agreed to the published version of the manuscript.

**Funding:** This paper was supported by the Project "Entrepreneurial competences and excellence research in doctoral and postdoctoral programs—ANTREDOC", project co-funded by the European Social Fund.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

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

#### **Abbreviations**

The following abbreviations are used in this manuscript:


#### **References**


### *Article* **New Expressions to Apply the Variation Operation Strategy in Engineering Tools Using Pumps Working as Turbines**

**Frank A Plua 1, Francisco-Javier Sánchez-Romero 2, Victor Hidalgo 3, P. Amparo López-Jiménez <sup>4</sup> and Modesto Pérez-Sánchez 4,\***


**Abstract:** The improvement in energy saving aspects in water systems is currently a topic of major interest. The utilization of pumps working as turbines is a relevant strategy in water distribution networks consisting of pressurized pipes, using these machines to recover energy, generate green energy and reduce leakages in water systems. The need to develop energy studies, prior to the installation of these facilities, requires the use of simulation tools. These tools should be able to define the operation curves of the machine as a function of the flow rate. This research proposes a new strategy to develop a mathematics model for pumps working as turbines (PATs), considering the modified affinity laws. This proposed model, which can be input into hydraulic simulation tools (e.g., Epanet, WaterGems), allows estimation of the head, efficiency, and power curves of the PATs when operating at different rotational speeds. The research used 87 different curves for 15 different machines to develop the new model. This model improves the results of the previously published models, reducing the error in the estimation of the height, efficiency, and power values. The proposed model reduced the errors by between 30 and 50% compared to the rest of the models.

**Keywords:** PAT model; modified affinity laws; hydraulic simulation tool

#### **1. Introduction**

Mathematical models have been a very useful tool to improve the management of water networks [1]. These models improved both pressurized systems [2], as well as free surface channels [3], improving their management and behavior in steady and unsteady flows. Some of these models were focused on the integration of the management into the new sustainability challenges of the infrastructures [4].

The improvement of the sustainability has been analyzed in water systems from different points of view, such as leakage reduction [5], minimizing consumed energy in pump systems [6], and quality parameters in the water supply [7], among others. One of these strategies has been the use of pumps working as turbines (PATs). These machines replace the pressure reduction valves, taking advantage of the excess of energy in the pressurized water systems [8]. A PAT is a pump which works in reverse mode and it is cheaper than classical turbines of the same small size [9]. When this machine operates in this mode, it generates energy. The efficiency of these machines is lower than traditional turbines and its hydraulic efficiency value is between 0.6 and 0.7 [10]. The global efficiency is between 0.5 and 0.6 when all the electromechanical equipment (electric and electronic devices) is considered. The traditional machines are classified as action (e.g., Pelton,

**Citation:** Plua, F.A; Sánchez-Romero, F.-J.; Hidalgo, V.; López-Jiménez, P.A.; Pérez-Sánchez, M. New Expressions to Apply the Variation Operation Strategy in Engineering Tools Using Pumps Working as Turbines. *Mathematics* **2021**, *9*, 860. https:// doi.org/10.3390/math9080860

Academic Editors: Eva H. Dulf and Cristina I. Muresan

Received: 26 February 2021 Accepted: 12 April 2021 Published: 14 April 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

67

Turgo, among others) and reaction (Francis, Kaplan, among others), as described in [11]. In contrast, the PATs are pumps, and, therefore, their classification depends on the specific velocity (i.e., radial, mixed, or axial machines) [12,13].

Previously, different investigations were published in which the use and analysis of PATs focused on analyzing the theoretical energy recovery [11] as well as the duty point of these machines, when information about the manufacturer was not known [12]. When the curves are not known, the head, efficiency, and power curves (these curves are called characteristic curves of the PATs) should be estimated when the pump is used in turbine mode. These expressions are defined by the following equations:

$$H\_0 = A + B\mathbb{Q}\_0 + \mathbb{C}\mathbb{Q}\_0^2\tag{1}$$

$$
\eta\_0 = E\_4 Q\_0^4 + E\_3 Q\_0^3 + E\_2 Q\_0^2 + E\_1 Q\_0 + E\_0 \tag{2}
$$

$$P\_0 = P\_4Q\_0^4 + P\_3Q\_0^3 + P\_2Q\_0^2 + P\_1Q\_0 + P\_5 \tag{3}$$

where *H*<sup>0</sup> is the recovered head in nominal rotational speed in m w.c. (water column); *Q*<sup>0</sup> is the flow rate in m3/s; *A*, *B*, *and C* are the coefficients, which define the head curve of the PAT; *η*<sup>0</sup> is the efficiency of the machine for each flow (non-dimensional); *E*4, *E*3, *E*2, *E*1, *and E*<sup>0</sup> are the coefficients, which define the efficiency curve; *P*<sup>0</sup> is the generated power in kW; *P*4, *P*3, *P*2, *P*1, *and P*<sup>5</sup> are the coefficients, defining the power curve of the machine.

The head curve enables the determination of the recovered head as a function of the flow. The efficiency curve determines the efficiency of the machine according to the circulating flow; finally, the power curve establishes the generated power by the machine for each flow value. Previous references demonstrated the possibility to estimate these curves by use of non-dimensional parameters [14]. This estimation should be developed using non-dimensional parameters and they are head number (h), flow number (q), efficiency number (e), and torque number (b) [15]. The different non-dimensional parameters, which are used to regulate the machines by variation of the rotational speed, are the following:

$$q = \frac{Q\_i}{Q\_{BEP}}\tag{4}$$

$$h = \frac{H\_i}{H\_{BEP}}\tag{5}$$

$$
\varepsilon = \frac{\eta\_i}{\eta\_{BEP}} \tag{6}
$$

$$p = \frac{P\_{\bar{l}}}{P\_{BEP}} = qhc\tag{7}$$

where *q*, *h*, *e*, *and p* are the flow, head, efficiency, and power coefficients; *Qi* is any flow value of the PAT in m3/s; *Hi* is the head for *Qi* according to the head curve in m w.c.; *η<sup>i</sup>* is the efficiency of the machine when the flow is *Qi*; *Pi* is the effective power for *Qi*; *QBEP*, *HBEP*, *PBEP*, and *ηBEP* refer to the best efficiency point (BEP) of the machine, which define the best efficiency head (BEH) when the rotational speed is changed.

In line with this, the reduction of the uncertainties by estimating the characteristic curves with respect to their known behavior as pumps has been an objective of different studies [16]. Different semiempirical methods have been published, proposing polynomial expressions to estimate the PAT curves, when the machine operates with constant rotational speed [10,12,17,18]. The development of these mathematical expressions was crucial to improve the characterization of the PATs and the energy models to analyze the energy recovery.

However, the flow rate changes over time in the different pipes of the water networks due to the demands of the users. Therefore, the energy analyses are not maximized when they consider PATs, if they work under constant rotational speed. To increase energy recovery, different strategies have been published in which the energy maximization was reached when the machine operated at different rotational speeds, called the variable operation strategy (named VOS) [19]. The variation of the rotational speed is crucial to reach the best efficiency values in the water systems, and it is the focus of new challenges in hydropower systems also applied to Francis turbines [20]. Furthermore, when the rotation speed changes, it is necessary to introduce knowledge of PAT curves into mathematical models, which analyze energy recovery in water systems. The lack of mathematical expressions makes it difficult to improve energy estimates when applying the VOS strategy in the modeling of water systems [14].

In recent years, some researchers have published different methods which allow water managers and companies to estimate the characteristic curves of PATs, avoiding the experimental tests when developing preliminary energy studies. Efficiency and head curves operating without variation of rotational speed were described in [21,22]. The analysis of PAT curves was carried out using other methods, which proposed expressions considering specific speed as well as the best efficiency point [23–25]. These methods did not consider the variation in the rotational speed, which is of paramount importance to reach the maximization of the recovered energy [26].

A step forward was taken in 2014, when some researchers analyzed the variation in rotational speed through experimental tests to improve the maximization of energy recovery. Research described in [12] proposed empirical expressions using four different tested machines in 2016. These equations should only be considered when the specific speed is between 120 and 162 (m, kW). In 2018, two PATs were tested and they were used to define other expressions, which could estimate the characteristic curves when the best efficiency point was known [27]. Research published in [28] studied the efficiency, power, and head curves in one PAT, which was installed in water pressurized systems in 2020. All studies used between one and four machines [12,14,27,28]. The low number of machines reduces the applicability of the proposed expressions, when other machines are used. To solve this issue, the present research goes one step further, using 87 different tested characteristic curves (i.e., head, efficiency, and power) of the majority of hydraulic machines, which have been published in previous references.

New empirical expressions are here proposed. These expressions could be used by modelers, who could improve their energy analysis when they apply the VOS strategy in water systems. Previous research has conducted similar analyses to define the characteristic curves of the machine [12,14,27,28]. They used non-dimensional numbers (i.e., q, h, e, and p), which are calculated at the best efficiency point. These values were used to propose functions, which depended on the ratio of the rotational speed of the machine to modify the affinity laws. This proposal improves the use of PATs in the simulation tools. It will enable the reduction of the uncertainty in the previous energy analysis when the use of PATs is considered in a real case study. The proposed expressions reduced the error indexes when they were compared with the other published methods, as well as increasing the validity range. Furthermore, these expressions are based on fifteen different machines, which had 87 different curves, increasing the number of experimental curves.

#### **2. Materials and Methods**

#### *2.1. Methodology*

The methodology proposed herein is focused on obtaining some particular empiric expressions, which allow water managers to develop tools for modeling PATs in water systems, when they operate at variable rotational speed. The strategy is based on the knowledge of the operation curves (head, efficiency, and power) at nominal speed [29]. The proposed method is based on classical expressions of the hydraulic machines, proposing a strategy to modify them by the affinity laws.

The main objective of the strategy is to propose an empirical expression that allows water managers to introduce management tools to simulate the different scenarios under the VOS operation. Furthermore, the method will reduce the errors when the characteristic curves are estimated in variable velocity conditions. To achieve this, different steps were proposed to derive the new expressions considering the modification of the affinity laws of hydraulic machines. [30]. Finally, the method was validated with the different tested machines. Figure 1 shows the different proposed steps. These steps are the following:


$$H\_{\rm PC} = \frac{H\_0}{Q\_0^2} Q\_j^2 = k\_{AL} Q\_j^2 \tag{8}$$

where *Qj* is the new flow rate in m3/s in which the machine has to operate. *HPC* is a parabola, which has the same efficiency at each point. This consideration is theoretical, since (in practice) it is only acceptable for values around +/−20% of the best efficiency point of the machine [29]. This variation in the rotational speed of the machine is defined by the ratio between the rotational speed (*nj*) of the machine to reach the value (*Qj*) and the nominal rotational speed (*n*0). This ratio between *nj* and *n*<sup>0</sup> is called *α*.

The affinity laws are expressions which define points similar to each other under conditions of restricted similarity, neglecting the stresses due to viscosity. These expression are defined by the following expressions [29]:

$$\frac{Q\_1}{Q\_0} = \frac{n\_1}{n\_0} = \kappa \tag{9}$$

$$\frac{H\_1}{H\_0} = \left(\frac{n\_1}{n\_0}\right)^2 = a^2\tag{10}$$

$$\frac{P\_1}{P\_0} = \left(\frac{n\_1}{n\_0}\right)^3 = n^3\tag{11}$$

where *Q*<sup>1</sup> is the flow under the new conditions of rotational speed (*n*1) in m3/s; *H*<sup>1</sup> is the head under the new conditions in m w.c.; *P*<sup>1</sup> is the shaft power under the new conditions in kW.

When affinity laws are applied for different rotational speeds, the variable operation strategy (VOS) can be defined between ratios of *αmin* and *αmax*.

When affinity laws are applied, the dimensionless parameters are:

$$q = \mathfrak{a} \tag{12}$$

$$h = a^2 \tag{13}$$

$$e = 1\tag{14}$$

$$
\boldsymbol{\nu} = \boldsymbol{\alpha}^3 \tag{15}
$$

Applying the affinity laws, *kAL*, *BEH* is defined by the following expression, considering that the ratio *<sup>h</sup> <sup>q</sup>*<sup>2</sup> = 1 (if the classical affinity laws is applied ideally):

$$k\_{AL,BEH} = \frac{A}{Q\_{BEP}^{\*}} + \frac{B}{Q\_{BEP}} + \mathcal{C} \tag{16}$$

**Figure 1.** Methodology proposed to derive the expressions (m is the number of experimental machines, N is the maximum number of the tested machine).

3. Once the dimensionless parameters (*q*, *h*, *e*, *and p*) are defined, the best efficiency curve (BEH) of the machine is determined. BEH is the curve which establishes the recovered head for each flow, maximizing efficiency and changing the rotation speed of the machine. This curve is defined in [27].


$$k\_{MOAL,BEH} = \frac{h}{q^2} \left(\frac{A}{Q\_{BEP}} + \frac{B}{Q\_{BEP}} + \mathcal{C}\right) \tag{17}$$

6. The value of the *kMOAL*, *BEH* coefficient is defined for the different rotational speeds of the machine, determining the cut-off point with the hypothetical head surface and machine efficiency (Figure 2).

**Figure 2.** Congruence parabolas for the different values and rotational speeds when modified affinity laws (MOAL) is applied.

Once the *kMOAL*, *BEH* is defined using *QBEP* and *HBEP*, *kMOAL* is extended for different values of *Q*0, defining the *kMOAL*,*<sup>i</sup>* for each rotational speed and the intersection points with head and efficiency areas are calculated. These points are *Q*0, *H*0, *η*0, *Qi*,*α<sup>j</sup>* , *Hi*,*α<sup>j</sup>* and *ηi*,*α<sup>j</sup>* (Figure 3a,b). The values of these parameters enable definition of the new non-dimensional values, which will define the functions of the modified affinity laws. Each of these points is calculated considering the intersection point for each rotational speed curve. The new non-dimensional parameters are defined by the following expressions:

$$q\_{i,j} = \frac{Q\_{i, \alpha\_j}}{Q\_{i,0}} \tag{18}$$

$$h\_{i,j} = \frac{H\_{i, \alpha\_j}}{H\_{i,0}} \tag{19}$$

$$\eta\_{i,j} = \frac{\eta\_{i,\alpha\_j}}{\eta\_{i,0}} \tag{20}$$

**Figure 3.** (**a**) Definition of head as a function of the flow for different rotational speeds; (**b**) Definition of the efficiency as a function of the flow for different rotational speeds considering the VOS area.

7. Once the non-dimensional parameters for the different rotational speeds are defined, the regression expressions are proposed. These functions depend on rotational speed (*α*), which is a significant variable [31] when the non-dimensional parameters are defined (i.e., *h*, *q*, *and e*). Moreover, different expressions are also proposed considering the ratio *Q*/*QBEP*. This parameter is considered since it measures the gap between the flow value and the flow for the best efficiency point. The incorporation of this parameter will improve the regression coefficient of the expressions, as well as reducing the errors. The modified affinity laws are then defined according to different expressions:

$$H = h(A + B\frac{Q}{q} + \mathcal{C}\left(\frac{Q}{q}\right)^2) \tag{21}$$

$$\eta = e \left( E\_4 \left( \frac{Q}{q} \right)^4 + E\_3 \left( \frac{Q}{q} \right)^3 + E\_2 \left( \frac{Q}{q} \right)^2 + E\_1 \left( \frac{Q}{q} \right) + E\_0 \right) \tag{22}$$

$$P = p\left(P\_4\left(\frac{Q}{q}\right)^4 + P\_3\left(\frac{Q}{q}\right)^3 + P\_2\left(\frac{Q}{q}\right)^2 + P\_1\left(\frac{Q}{q}\right) + P\_5\right) \tag{23}$$

Ten different functions (*Fi*) were proposed, in order to be analyzed and obtain the best one to estimate the behavior of the machine when it operates at variable rotational speed. Table 1 shows the proposed functions in which the different coefficients (*βi*) are calculated as a function on the analyzed *Fi*. This analysis proposes six polynomial functions and four exponential expressions.



\* *NP* is the non-dimensional parameter. It can be *h*, *q*, *e*, *<sup>h</sup> <sup>q</sup>*<sup>2</sup> , *he q*2 .

	- (a) RMSE. This error index measures the error between the empirical expression and experimental values. When RMSE is zero, this value indicates a perfect fit. It is defined by (24):

$$RMSE = \sqrt{\frac{\sum\_{i=1}^{x} [O\_i - P\_i]^2}{x}} \tag{24}$$

where *Oi* are the estimated values; *Pi* the experimental values, and *x* is the number of observations.

(b) MAD. This index measures the average of the errors in the estimated values, using the absolute differences between estimated and experimental values. The perfect fit is defined when MAD is zero, and it is defined by the following expression (25):

$$MAD = \sum\_{1}^{\chi} \frac{1}{\chi} |O\_i - P\_i| \tag{25}$$

(c) MRD. This index considers the weight of the error to the variable value. If MRD is zero, this value indicates a perfect fit. Formally, it is defined as follows (26):

$$MRD = \sum\_{i}^{\chi} \frac{|O\_i - P\_i| / P\_i}{\chi} \tag{26}$$

(d) BIAS. The index considers the variable tendency, analyzing whether the estimated values are greater (negative value) or smaller (positive value) than experimental values. It is defined by the following expression (27):

$$BIAS = \frac{\sum\_{i=1}^{N} [O\_i - P\_i]}{\chi} \tag{27}$$

If the error values are acceptable and the goodness of the expressions is correct, the best expression is chosen in order to be applied. The best expression should set low error values, and it should consider a smaller number of variables.

#### *2.2. Materials*

The proposed methodology was applied using different experimental machines. As indicated, 15 PATs were used in this research, as shown in Table 2. The experimental database was developed from different consulted studies. These PATs were tested considering different rotation speeds (Table 3), which allowed interpolation of the different experimental values among rotation speeds. The specific speed (*nst*) of the used machines was between 5 and 50 rpm. *nst* is defined as:

$$m\_{st} = n\_0 \frac{P\_0^{\frac{1}{2}}}{H\_0^{\frac{5}{4}}} \tag{28}$$


**Table 2.** Characteristics of the used pumps working as turbines (PATs).

RS, number of experimental curves, which were tested for different rotational speeds; IP, number of interpolated parabolas using the experimental curves for each rotational speed; AP, number of analyzed points.



Table 2 also shows the number of experimental curves (RS) which were tested considering different rotational speeds for each machine, the number of interpolated curves used, as well as the number of used points to develop the regression and database analysis. The analysis of the 87 tested curves for different PATs, which operated on different rotational speeds, enabled us to obtain 10,949 interpolated parabolas, as well as 56,450 work points, to develop the surface (Q, H, *α*; Figure 2).

#### **3. Results**

#### *3.1. Proposed Function Models*

Once the experimental data from the referred 15 tested PATs were analyzed, the *β<sup>i</sup>* coefficients were determined for the different non-dimensional parameters (i.e., *q*, *h*, *e*, *p*, *h*/*q*2, *he*/*q*2). Table 3 shows the different values of coefficients *β<sup>i</sup>* for each proposed function (*Fi*) to model the non-dimensional parameters (*NP*). Table 3 also shows the regression coefficient (R2).

The goodness of these models was measured according to the different error indexes, which were described previously in the Methodology section by Equations (21)–(23). The different dimensionless parameters proposed for each machine and rotation speed were determined, defining the error rates for the ten different functions of the model. Table 4 shows the error values for each index, as well as its ranking compared among the ten functions. This table determines the average values of the error indexes, since these errors were calculated for each rotational speed in each tested machine (87 curves). BIAS shows the absolute value, in order to know the magnitude of this error in case of oversize or undersize of a variable (i.e., *H*, *η*, *and P*).

Table 4 shows the average error values for each FM. These errors values enable us to decide the best function model for each dimensionless parameter (i.e., *h*, *q*, *e*, and *p*). When the error analysis was developed, the best function model (FM) was F6 for *h* and *e* dimensionless parameters. Although different FMs could be used, F6 considered both rotational speed as well as the ratio *<sup>Q</sup> QBEP* . The use of this ratio is interesting since it measures the distance between *Q* and *QBEP*. This is an important difference, since it allows water managers to fix the operation range of flow in order for the affinity laws to be applied [29].


**Table 4.** Average error indexes for the different characteristic curves using the defined *MOAL*.

The ranking of the Fi when the error indexes are compared from (1) to (9) as indicated.

When non-parameter *p* was analyzed, the F7 function also was chosen since it only considered one variable (*α*), yielding good results in the estimation of the PATs curve. F7 was used to determine the power curve directly by expression (23). However, when water managers wish to determine the power curve by the use of Q, H, and *η*, they should use the F6 function.

#### *3.2. Error Distribution Compared to Rotational Speed*

Once F6 was chosen, the error of the modified affinity laws was compared with all tested curves. All error indexes were calculated for head, efficiency, and power.

When head was analyzed, the MRD was smaller than 0.05, with a cumulated frequency equal to 91%. The maximum value was 0.089. In head values, RMSE was smaller than 0.6 in 57 compared curves and BIAS was smaller than 0.25 in 49 compared curves.

When efficiency was compared, RMSE was smaller than 0.035 in 58% of the comparisons and it was smaller than 0.07 in 88% of the comparisons. When MRD was checked, it was smaller than 0.15, showing a BIAS value smaller than 0.069 in 92% of the cases.

When the error values for the power curve using the F6 function model were analyzed, RMSE was smaller than 0.2 (72% cumulated frequency). When MAD was analyzed, similar values were obtained. MAD was lower than 0.17, and the MRD was smaller than 0.2 in 90% of the samples.

However, when the errors of F7 were analyzed for the power curve, they showed the best approach. Figure 4 shows the error values for the power curve using the F7 expression. RMSE was analyzed (Figure 4a), and it was smaller than 0.18 (70% of cumulated frequency). This value was smaller than 0.09 in 51 cases. Moreover, when the *α* value was observed, smaller values were located between 0.8 and 1.2, reaching a minimum around 0.9.

**Figure 4.** Error values when power is determined: (**a**) root mean square error (RMSE) (**b**) mean absolute deviation (MAD); (**c**) mean relative deviation (MRD), and (**d**) absolute value of BIAS.

When MAD was analyzed (Figure 4b), similar values were obtained. In this case, MAD values were smaller than 0.16 (92% of cumulated frequency). When MRD was analyzed (Figure 4c), this value was smaller than 0.2 in 94% of the samples. This value had a value of 65% of cumulated frequency for values lower than 0.07. Finally, BIAS had good accuracy, showing values lower than 0.1 in 85% of the sample. In all cases, the minimum errors were reached when the machine operated using *α* rates between 0.8 and 1.2, being the minimum for values near 0.9.

#### *3.3. Proposed Functions vs. Other Published Functions*

Once the relative errors of the selected function model (F6) were compared for each rotational speed of the different tested machine in the different proposed functions of head, efficiency, and power, the proposed expressions were compared with other expressions which have already been published in the literature.

This research proposes the following particular functions to define the characteristic curves of the machine according to expressions (21)–(23). The model F6 was chosen when head and efficiency curves should be estimated. F6 showed the lowest errors compared to the rest of the models. Moreover, this model contained the variation of the rotational speed (*α*) as well as the use of the ratio Q/QBEP, enabling us to measure the closeness to BEP. To calculate the power, F7 was chosen since it had the minimum error values, and it uses a simpler expression. The final expressions proposed herein are:

$$q = -0.1525 \left( a \frac{Q}{Q\_{BP}} \right) + 0.1958 \left( \frac{Q}{Q\_{BP}} \right)^2 - 0.0118 \left( \frac{Q}{Q\_{BP}} \right) - 0.6429a^2 + 1.8489a - 0.2241$$

$$h = -0.31070 \left( a \frac{Q}{Q\_{BP}} \right) + 0.3172 \left( \frac{Q}{Q\_{BP}} \right)^2 - 0.0546 \left( \frac{Q}{Q\_{BP}} \right) + 0.242a^2 + 1.1708a - 0.3426$$

$$c = 0.8271 \left( a \frac{Q}{Q\_{BP}} \right) - 0.3187 \left( \frac{Q}{Q\_{BP}} \right)^2 - 0.1758 \left( \frac{Q}{Q\_{BP}} \right) - 1.035a^2 + 1.1815a + 0.5019$$

$$p = a^2 \frac{a^4 62}{}\_{\prime}$$

$$q = a^{0.7439}$$

The comparison concerns the model proposed in this research and four published proposals that are shown in Table 5.

**Table 5.** Methods used for the comparison.


Figure 5 shows the different values for error, when head, efficiency, and power were estimated using the proposed model (in black color, "this study") and the rest of the published models. In all cases, the present proposed model presented the best results.

When head curve was analyzed, the error indexes (RMSE, MAD, and MRD) were reduced between 20 and 45% compared to the second-best model (Carravetta et al.). The BIAS value for this characteristic curve was −0.005, compared to the second-best model (0.048). Similar values were shown when the efficiency curve was compared. When efficiency errors were compared, RMS, MAD, and MRD were reduced by 33% compared to the second-best model, while BIAS was ten times lower than the second-best model. Finally, when the power errors were checked using the F7 model, the error indexes were reduced between 36 and 63% compared to the second-best model. Only when BIAS was checked, the second-best value was observed. Moreover, the F6 model was also compared to the rest of the proposed models for the power curve. This model (F6) showed good accuracy and the error indexes were 0.2209 (RMSE), 0.1884 (MAD), 0.0823 (MRD), and −0.097 (BIAS). All values were better than the second-best model, except for BIAS, which was the third-best value.

Finally, a visual comparison was carried out on the proposed model and the remaining models compared to an experimental PAT curve (Figure 6). To develop this comparison, the chosen PAT was a radial machine. The specific speed was 5.67 rpm (m, kW) and its nominal rotational speed was 1100 rpm. The best operation point of this machine was defined as 9.762 l/s and 51.267 m w.c., the efficiency being equal to 0.703 [24]

**Figure 5.** Error values for head, efficiency, and power, when the models are compared.

**Figure 6.** (**a**) Head curve comparison between proposed model, experimental data, and rest of published models; (**b**) Efficiency curve comparison between proposed model, experimental data, and rest of published models; (**c**) Head curve between proposed model and experimental curve; (**d**) Efficiency curve between proposed model and experimental curve.

Figure 6a,b show the good accuracy of the proposed model compared to the rest of the models. This accuracy can be observed for each *α* value. Figure 6a shows the accuracy of the proposed study, other published models, and experimental data. All models showed good accuracy when the head curve was compared with the experimental data. However, this accuracy decreased in the rest of the models when *α* was higher than one. The accuracy of the proposed expressions was much better when the efficiency curves were compared. This visual accuracy, which can only be observed, is supported by analysis of errors indexes shown in Figure 5. In this graph, the proposed expressions reduced over 20% of the error of the other published methods. The mean reduction in the error was 60%. To improve this perception, Figure 6c,d show the comparison between the proposed model and the experimental data. In all cases, the accuracy was good but, when the *α* was between 0.8 and 1.2, the estimation of the curves showed excellent accuracy.

#### **4. Conclusions**

This research proposed a modification of the affinity laws (MOAL) of the hydraulic machines that are used as pumps working as turbines. This modification was established according to a new methodology, which was defined in this research. The research proposed an analysis with ten general expressions (polynomial and exponential), considering the most significant variables (the ratio of the rotational speed, *α*, and the ratio of *Q* and *QBEP*). Finally, a polynomial model (namely F6) depending on *α* and *<sup>Q</sup> QBEP* was selected, when head and efficiency were estimated, and a potential model (F7) if the power is to be calculated directly. All proposed models exhibited good error indexes (RMSE, MAD, MRD, and BIAS) compared to the others, reducing the errors between 30 and 50% compared to the second-best model.

In addition, the proposed models were checked and compared to 15 different machines, which were tested by varying their rotational speed and its specific speed between 5 and 50 rpm (m, kW). The present model is based on 87 different curves and 56,450 operation points, using the largest database ever published.

The use of these models, which have excellent accuracy when *α* is between 0.8 and 1.2, is crucial to the development of mathematical models. These are of paramount importance to introduce the use of PATs when the manufacturer curve is not known. This is common when PATs are used, since the manufacturers do not publish these curves in their catalogue. Therefore, the inclusion of these equations will allow water managers to develop simulation tools, which can be introduced in the management of the water systems, improving the accuracy in their operation estimation. These models are expected to give a new impetus in the inclusion of the analysis tools when PATs operate at variable speed in water systems, and water modelers need mathematical expressions to develop simulations and operational limitations. Consequently, future works should be developed in which different procedures are proposed to establish the best variable operating strategy (VOS) in order to maximize the energy recovery using these expressions.

**Author Contributions:** Conceptualization, F.-J.S.-R. and M.P.-S., methodology, F.A.P.; software, V.H.; formal analysis, F.A.P.; writing—original draft preparation, F.A.P., F.-J.S.-R. and M.P.-S.; writing review and editing, M.P.-S. and P.A.L.-J.; visualization, F.-J.S.-R. and M.P.-S.; supervision, P.A.L.-J. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

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

#### **References**


### *Article* **Statistical and Type II Error Assessment of a Runoff Predictive Model in Peninsula Malaysia**

**Lloyd Ling 1,\*, Zulkifli Yusop <sup>2</sup> and Joan Lucille Ling <sup>3</sup>**


**Abstract:** Flood related disasters continue to threaten mankind despite preventative efforts in technological advancement. Since 1954, the Soil Conservation Services (SCS) Curve Number (CN0.2) rainfall-runoff model has been widely used but reportedly produced inconsistent results in field studies worldwide. As such, this article presents methodology to reassess the validity of the model and perform model calibration with inferential statistics. A closed form equation was solved to narrow previous research gap with a derived 3D runoff difference model for type II error assessment. Under this study, the SCS runoff model is statistically insignificant (alpha = 0.01) without calibration. Curve Number CN0.2 = 72.58 for Peninsula Malaysia with a 99% confidence interval range of 67 to 76. Within these CN0.2 areas, SCS model underpredicts runoff amounts when the rainfall depth of a storm is < 70 mm. Its overprediction tendency worsens in cases involving larger storm events. For areas of 1 km2, it underpredicted runoff amount the most (2.4 million liters) at CN0.2 = 67 and the rainfall depth of 55 mm while it nearly overpredicted runoff amount by 25 million liters when the storm depth reached 430 mm in Peninsula Malaysia. The SCS model must be validated with rainfall-runoff datasets prior to its adoption for runoff prediction in any part of the world. SCS practitioners are encouraged to adopt the general formulae from this article to derive assessment models and equations for their studies.

**Keywords:** rainfall-runoff model; curve number; inferential statistics; 3D runoff difference model; model calibration

#### **1. Introduction**

Nearly 8.5 million casualties attributed to flood related disasters were reported between 1990 and 2020 all over the world, which is equivalent to one death every seven minutes. In the recent six decades, about 10,000 cases were reported with 1.3 million deaths and at least \$3.3 trillion of financial losses. This financial loss is estimated to be an equivalent rate of almost USD\$1800/s [1]. Floods are not only a nuisance to people but also impede the financial well-being, economic development, and natural and cultural heritage preservation efforts of a country. The impact is more profound amidst the COVID-19 pandemic. Uncertainties regarding different scenarios surrounding climate change also require us to safeguard agricultural production and manage water resources wisely to ensure sustainable development for the future. As such, there is an imminent need for hydrologists and modelers to reassess the rainfall-runoff model and improve the modelling approach for better applications in flood prediction.

In order to comply with the federal flood control program in 1954, the United States Department of Agriculture (USDA), Soil Conservation Services (SCS) developed a Curve Number (CN) runoff estimation procedure to implement across the nation. The hydrologic

**Citation:** Ling, L.; Yusop, Z.; Ling, J.L. Statistical and Type II Error Assessment of a Runoff Predictive Model in Peninsula Malaysia. *Mathematics* **2021**, *9*, 812. https:// doi.org/10.3390/math9080812

Academic Editor: Eva H. Dulf

Received: 17 February 2021 Accepted: 29 March 2021 Published: 8 April 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

methods which were originally developed to address specific situations were adopted immediately without professional review and critics [2–5]. The work became the basic CN rainfall-runoff model:

$$\mathbf{Q} = \frac{\left(\mathbf{P} - \mathbf{I\_a}\right)^2}{\mathbf{P} - \mathbf{I\_a} + \mathbf{S}} \tag{1}$$

Q = Amount of runoff depth (mm)

P = Depth of rainfall (mm)

S = Watershed maximum water retention potential (mm)

Ia = Rainfall initial abstraction amount (mm)

SCS also hypothesized that Ia = λS = 0.2S where λ is the initial abstraction ratio coefficient and fixed at λ = 0.2 as a constant. This equation was tenuously justified with daily rainfall and runoff data. The only official documentation source is the NRCS's National Engineering Handbook, Section 4 (NEH-4) [5]. Its substitution simplifies Equation (1) into the existing SCS CN model as:

$$\text{Q} = \frac{\text{(P} - 0.2 \text{S)}^2}{\text{P} + 0.8 \text{S}} \tag{2}$$

if P < 0.2S, Q = 0.

The SCS CN methodology has been widely accepted since its inception in 1954. It has been incorporated in various types of software, adopted by many government agencies in design and even appears in every hydrology textbook. However, studies around the world from recent decades reported that Equation (2) inconsistently under and over-predicted runoff results. Curve Number (CN) selection from the SCS handbook for a watershed runoff prediction modelling were reported as subjective and often could not represent other watershed with similar land cover [2–4].

Despite that, many recent studies started to develop and propose extended applications with Equation (2). Some researchers even proposed a global gridded CN concept for runoff modelling [6,7] while others incorporated land-use information in their studies and the GIS modelling technique [8–12]. Contrarily, some reported that the usage of CN in representing a watershed is often contradictory in describing related land cover areas [13]. Some researchers still reported difficulty to calibrate the existing model [14,15] while other studies started to incorporate soil moisture and saturation-excess concepts in their modelling approach [16–19]. US researchers [2,20] were first to conduct large scale studies on the SCS CN model by analyzing more than half a million rainfall events across 24 states in the USA and reported an optimum λ = 0.05 to achieve better runoff modelling results than Equation (2) in USA. To date, SCS practitioners do not have a systematic approach to assess the SCS CN model framework and analyze the impact on runoff prediction when the model is not calibrated.

#### **2. Data and Methods**

The SCS CN model (Equation (2)) has been adopted in Malaysia for runoff prediction studies and design. However, no attempt has been made to validate previous study findings by performing hydrological characteristics calibration on the SCS CN model and to derive the λ value with inferential statistics for the entirety of Peninsula Malaysia. The impact of not calibrating the SCS CN model and the blind adoption of Equation (2) for runoff predictions in Peninsula Malaysia are unknown. Therefore, this study extended study results from US researchers [2,20] to develop assessment methods of the SCS CN model for SCS practitioners.

Slightly larger than England (130,395 km2), the land area of Peninsula Malaysia is 132,265 km2. It shares a land border with Thailand to the north and Singapore across the strait of Johor to its south. The formation of the Malaysian Department of Irrigation and Drainage (DID) in 1932 assumed all works in connection with drainage and irrigation from the Public Works Department. Flood mitigation and hydrology was made an additional responsibility of DID from 1972 onwards after the declaration of a national disaster due to severe floods in 1971. From 1986, coastal engineering has become an added function of the DID while river management became its official duty from 1990.

The Department has moved from the Ministry of Agriculture and Agro-based Industry (MOA) to Ministry of Natural Resource and Environment (NRE) on 27 March 2004. Over the years, DID took up new and expanded responsibilities. Today, the DID's duties encompass: River Basin Management and Coastal Zone, Water Resources Management and Hydrology, Flood Management and Eco-friendly Drainage projects in Malaysia.

The rainfall-runoff dataset from the DID, Hydrological Procedure no. 27 (DID HP 27) was used in this study. It is the latest official dataset published by this federal government agency that consists of 227 different storm events recorded between October 1970 to December 2000 from 41 different rural watersheds (Figure 1) across Peninsula Malaysia. The smallest storm event had a rainfall depth of 19 mm with a measurable runoff depth of 4.8 mm while the largest recorded storm event was 420 mm with 258 mm in runoff depth [21].

**Figure 1.** Locations of 41 streamflow stations with 227 rainfall-runoff (P-Q) data pairs used for λ derivation. Modified according to [21].

Objectives of this study are:


#### *2.1. The Reverse Derivation of λ and S Value*

In hydrology, the difference between Ia and P is the effective rainfall depth (Pe) to initiate Q thus Pe = P − Ia. Substitute this relationship into SCS CN model (Equation (1)), it can be re-arranged to calculate the two key parameters of S and λ values according to the respective P-Q data pair [2,5,22]. Equation (1) can then be expressed as below after the substitution of Pe = P − Ia:

$$\mathbf{Q} = \frac{\left(\mathbf{P\_e}\right)^2}{\mathbf{P\_e} + \mathbf{S}} \tag{3}$$

rearrange Equation (3) to isolate S as:

$$\mathbf{S} = \frac{(\mathbf{P\_e})^2}{\mathbf{Q}} - \mathbf{P\_e} \tag{4}$$

Equation (4) is subjected to the constraint where S must be a positive integer. SCS also proposed the correlation of Ia = λ S thus λ can be calculated once Ia and S are known by rearranging the equation as:

$$
\lambda = \frac{\mathbf{l\_a}}{\mathbf{S}} \tag{5}
$$

Equation (5) is subjected to the constraint defined by SCS that S ≥ Ia [5], and therefore the range of λ must be (0, 1). The upper limit for λ value is equal to 1 (where Ia = S) which is hardly realized in the real world as it implies the condition of a thick canopy interception. The infiltration during early parts of the storm and surface depression storage is equal to the maximum potential retention value (S) of a watershed [5].

Past studies reported different λ values in their work for model calibration. However, the statistical assurance of those new values was hardly mentioned [4]. Latest studies in this area started to report that the modelling approach with multiple CN and Ia values can reflect the heterogeneity of a watershed and the SCS CN model must be calibrated according to local rainfall-runoff data to improve the runoff prediction accuracy. Equation (2) may no longer be valid for runoff prediction modelling [23–25]. SCS defined Ia = λS, the existence of multiple Ia values implied that multiple λ and S values can be found within a watershed. These latest study results [24,25] escalate the SCS CN model calibration difficulty to another level as SCS practitioners must identify a best collective representative Ia value to calibrate Equation (1). Therefore, this study proposed to use non-parametric inferential statistics as the guide to make a statistically significant selection of the two key parameters (S and λ values) to calibrate the fundamental SCS CN runoff framework (Equation (1)).

Under the SCS CN hydrological framework, the initial abstraction (Ia) amount must be less than the P value because Ia must first be fulfilled to initiate runoff. Therefore, a reasonable collective representative Ia value for runoff modelling must be less than the minimum P value from the entire P-Q dataset [5]. Given the P-Q dataset, an initial "Ia" value which was less than the minimum P value from the dataset was chosen as the first iterative value in order to calculate the corresponding S and λ values for each P-Q data pair according to Equations (4) and (5). In the event where either constraint in Equation (4) or (5) were to be violated, the "collective representative Ia" value must be reduced until every calculated λ and S values abide to their constraints for each P-Q data pair according to the SCS CN model framework [5].

The alpha value was set at a stringent level of 0.01 in this study to reduce the type I error in null assessment so that the SCS CN model will not be unnecessarily calibrated due to wrong null rejection under objective 1. It will also justify the urgent SCS CN model calibration need to the DID for runoff prediction work in Malaysia, review any past studies and projects that used Equation (2) when the null hypothesis is rejected. This study is only willing to accept 1% error chance because these DID processes are too costly to initiate by mistake.

According to the U.S. Geological Survey (USGS) Statistical methods in water resources guide, the minimum required sample size is 100 to be considered as a large dataset for water resources related study at the 0.01 alpha level [26]. As such, the DID HP 27 dataset will be sufficient for this study. Given the 227 rainfall-runoff (P-Q) data pairs from DID HP 27, corresponding λ and S values can be calculated. These 227 λ and S values will be bootstrapped independently with the Bias Corrected and Accelerated (BCa) procedure by using the IBM Predictive Analytics software (PASW) version 18.0 (commonly known as SPSS) [27]. The method neither assumes data normality nor has limitation to certain data distribution and performs random sampling with replacement in SPSS [27,28]. In this study, the Mersenne Twister seed number for random sampling generation was set at 2 million (by default) and 10 million to conduct 2000, 5000, and 10,000 sampling for the calculated λ and S dataset.

Consequently, the BCa option in SPSS was used to generate a sampling distribution and 99% confidence interval (CI) to optimize the parameter of interest such as S and λ. Additionally, it provides standard error statistics and CI for the median value, which are unavailable under most parametric tests in SPSS [27]. BCa procedure was chosen by this study for its ability to correct for skewness and bias in the bootstrap distribution [29]. When the dataset has a high positive skewness, BCa can also correct the issue that the bootstrap CI range might be too small [26]. BCa 99% CI has wider range than the 95% CI. Therefore, this study used BCa option in SPSS to generate 99% CI (instead of 95% CI) for both λ and S dataset so that the assessment of the initial claim from SCS that λ = 0.2 can be inferred from the wider BCa CI.

#### *2.2. Supervised Numerical Optimization Analyses*

Past researchers faced the dilemma of choosing between the mean and median of a dataset [2,30]. To address this issue, this study utilized an algorithm of numerical analysis guided by inferential statistics for decision making.

λ and S were optimized using Equation (1) with a supervised numerical analyses approach. To prevent the optimization algorithm from focusing on residual sum of squares (RSS) minimization only, the overall model bias (BIAS) will be minimized near to the value of zero concurrently during the parameter optimization process. This acts as a check with the BCa technique to ensure that the optimized λ and S value are not biased towards the dataset during the SCS model calibration. In the event of skewed data nature, the supervised numerical optimization would be conducted to search for an optimum value within the BCa median's confidence interval limits of the derived λ and S dataset, respectively. The optimized S value and its confidence interval range will lead to the calculation of CN value to represent the entire DID HP 27 dataset in Peninsula Malaysia (see Section 3.2).

#### *2.3. Null Hypotheses Assessments with Inferential Statistics*

A Null hypothesis was set up to assess the 1954 SCS proposal with inferential statistics as below:

H0: Ia = λS where λ must be 0.2 in Equation (1) (as proposed by SCS) to model runoff conditions according to the DID HP 27 dataset in Peninsula Malaysia.

H0 assesses the validity of Equation (2) for this study as pertained to the DID HP 27 dataset. The assessment of H0 will be inferred from the BCa confidence interval of λ [28]. The rejection of H0 indicates that the SCS CN model (Equation (2)) is invalid to model the dataset of this study. It requires the acceptance of H0 to adopt Equation (2) for rainfall-runoff modelling while the rejection of H0 will pave a way to derive a new λ value for the DID HP 27 dataset. The optimized λ and S values will be used to formulate a new calibrated runoff prediction model for Peninsula Malaysia. SCS practitioners are encouraged to validate the existing SCS CN model (Equation (2)) prior to runoff modelling adoption.

#### *2.4. The S General Formula*

Equation (1) was re-arranged into a general form of S<sup>λ</sup> = f (P, Q, λ) in a previous study [4]. When λ = 0.2, the corresponding S0.2 value leads to the derivation of conventional CN values in use by SCS practitioners. Any other λ values will result in S<sup>λ</sup> leading to the derivation of CN<sup>λ</sup> values which are different from the SCS tabulated CN values. The general S<sup>λ</sup> formula (see [4] for derivation steps) used by this study is:

$$\mathbf{S}\_{\lambda} = \frac{\left[\mathbf{P} - \frac{(\lambda - 1)\mathbf{Q}}{2\lambda}\right] - \sqrt{\mathbf{PQ} - \mathbf{P}^2 + \left[\mathbf{P} - \frac{(\lambda - 1)\mathbf{Q}}{2\lambda}\right]^2}}{\lambda} \tag{6}$$

S<sup>λ</sup> = Total abstraction amount of any λ value (mm).

#### *2.5. Correlation Between S*<sup>λ</sup> *and S0.2*

According to previous researchers, when the optimum λ value is different from the conventional value where λ = 0.2, a correlation between the newfound λ value and 0.2 must be used in order to calculate the curve number again [2,3,20]. US researchers termed the batch of curve numbers derived from any λ value other than λ = 0.2 as "conjugate curve numbers" denoted by CN<sup>λ</sup> which are different from the SCS tabulated curve numbers [2–4,20]. Given the P-Q dataset, S<sup>λ</sup> and S0.2 can be calculated using Equation (6). A correlation between the S<sup>λ</sup> and S0.2 dataset must be established before the calculation of conventional CN value (see Section 3.2). SCS practitioners must use the correlation equation between the S<sup>λ</sup> and S0.2 to calculate the conventional CN value to avoid the mistake of using conjugate curve number in their study.

#### *2.6. The 3D Runoff Difference Model*

Using P-Q datasets from multiple watersheds or from multiple locations within a watershed, a 3D runoff difference model can be created as a collective visual representation of multiple rainfall depths to compare with different CN0.2 scenarios. If Equation (2) fails the Null assessment, this 3D model can reflect the runoff difference between it and the new calibrated runoff model for further analyses. The model will be a guide to visualize the runoff under and over prediction zones between two models. In 1954, SCS correlated S and CN. The SI unit version of the formula is:

$$\text{S} = \frac{25,400}{\text{CN}} - 254 \tag{7}$$

Equation (7) was derived from the SCS assumption where λ = 0.2, and therefore it will be more appropriate to denote CN as CN0.2 and S with S0.2. Substituting Equation (7) into Equation (2), the SCS model can be simplified to become: Q0.2 = f (P, CN0.2) and represented in SI form of:

$$\mathbf{Q}\_{0.2} = \frac{\left[\mathbf{P} - 50.8\left(\frac{100}{\text{CN}\_{0.2}} - 1\right)\right]^2}{\left[\mathbf{P} + 203.2\left(\frac{100}{\text{CN}\_{0.2}} - 1\right)\right]} \tag{8}$$

Q0.2 = Runoff depth (mm) of λ = 0.2 where P > 0.2 S0.2 else Q0.2 = 0.

The general form of Equation (1) after the substitution of Ia = λS for any λ value becomes:

$$\mathbf{Q}\_{\lambda} = \frac{\left(\mathbf{P} - \lambda \mathbf{S}\_{\lambda}\right)^{2}}{\mathbf{P} - \lambda \mathbf{S}\_{\lambda} + \mathbf{S}\_{\lambda}}\tag{9}$$

where P > λSλ, else Q<sup>λ</sup> = 0. As such, the runoff difference between SCS model (uncalibrated) and the new calibrated runoff model (with new λ) can be quantified as the difference between Equations (8) and (9) as:

$$\mathbf{Q}\_{\mathbf{v}} = \frac{\left[\mathbf{P} - 50.8\left(\frac{100}{\text{CN}\mathbf{0}\_{2}} - 1\right)\right]^{2}}{\left[\mathbf{P} + 203.2\left(\frac{100}{\text{CN}\mathbf{0}\_{2}} - 1\right)\right]} - \frac{\left(\mathbf{P} - \lambda\mathbf{S}\_{\lambda}\right)^{2}}{\mathbf{P} - \lambda\mathbf{S}\_{\lambda} + \mathbf{S}\_{\lambda}}\tag{10}$$

Qv = Runoff depth prediction difference between 2 runoff models (mm) CN0.2 = the conventional curve number

As Equation (2) was widely adopted in many countries, it is important to assess the runoff prediction difference with Equation (10). It is a general equation that can be used by SCS practitioners to determine the impact of not calibrating Equation (2) for runoff predictions under their study.

In Equation (10), Qv will be positive when the conventional SCS runoff model (Equation (2)) over-predicted runoff when compared to the calibrated new runoff equation and vice versa. If the newly derived λ < 0.2, Equation (10) is subject to the constraint where P > λS. When the new derived λ > 0.2, Equation (10) will abide to the constraint of P > 0.2S0.2, else Qv = 0 because there is no runoff difference as Ia of the lower λ value model is yet to be fulfilled to initiate the runoff process [2,5] and produce a runoff difference between two runoff models. All in all, the smaller λ runoff model will initiate runoff ahead of the larger λ runoff model [5].

#### *2.7. Outer Boundary Equation*

Equation (2) is subject to a constraint whereP>Ia or P > λSλ, else Q<sup>λ</sup> = 0. The 3D runoff difference model captures the runoff difference of two different runoff models. When the Ia constraint of the lower λ value model has been fulfilled, runoff will be initiated. Base on this concept, the Ia constraint of the lower λ value model becomes the outer boundary of the 3D runoff difference model which also represents the runoff indifference boundary with the following general equation:

$$P = \lambda S\_{\lambda} \tag{11}$$

#### *2.8. Inner Boundary Equation*

The second boundary is the "Inner Boundary" of the 3D runoff difference model. This boundary separates the runoff under-prediction zone from the over-prediction zone of the SCS runoff model. The runoff difference is equal to zero at the crossover boundary, which is also known as the runoff indifference boundary. Therefore, when Qv = 0 (runoff indifference) in Equation (10), the form can be re-expressed as:

$$\frac{\left[\text{P} - 50.8\left(\frac{100}{\text{CN}\_{0.2}} - 1\right)\right]^2}{\left[\text{P} + 203.2\left(\frac{100}{\text{CN}\_{0.2}} - 1\right)\right]} = \frac{\left(\text{P} - \lambda\text{S}\_{\lambda}\right)^2}{\text{P} - \lambda\text{S}\_{\lambda} + \text{S}\_{\lambda}}\tag{12}$$

Equations (11) and (12) are also general equations that can be used by SCS practitioners to analyze the 3D runoff difference model (created with Equation (10)) in their study.

#### *2.9. Models Comparison*

Runoff models are compared and benchmarked for their model predictive accuracy in this paper. Model's residual sum of squares (*RSS*), predictive model *BIAS* prediction and model efficiency index (*E*), also known as Nash–Sutcliffe index, were calculated with the following formulae to draw further comparison between them.

$$RSS = \sum\_{i=1}^{n} \left( Q\_{predicted} - Q\_{observed} \right)^{2} \tag{13}$$

$$E = 1 - \frac{RSS}{\sum\_{i=1}^{n} \left(Q\_{predicted} - Q\_{mean}\right)^2} \tag{14}$$

$$BIAS = \frac{\sum\_{i=1}^{n} \left(Q\_{predicted} - Q\_{observed}\right)}{n} \tag{15}$$

*n* = Total number of data pairs.

Lower *RSS* implies a better model. Index *E* lies on a spectrum of minus 1.0 to 1.0 whereby index value = 1.0 shows an ideal conjectured model. In the instance where *E* < 0, it is inferior to utilizing an average to predict the dataset. *BIAS* is the overall model prediction error indicator. Zero *BIAS* value indicates an error free model prediction while negative value indicates the overall predictive model's under-prediction tendency and vice versa.

#### *2.10. Asymptotic Curve Number Fitting*

Other than numerical optimization technique, many researchers [31–35] used asymptotic CN fitting method (AFM) to determine the best representative CN for the watershed of interest with P-Q dataset (λ value remains as 0.20 under this method). Therefore, AFM will be used to benchmark against the proposed method in this article. Under AFM, CN cannot be determined for the Complacent behavior watershed, but Standard behavior watershed follows the following formula [33]:

$$\text{CN}(\text{P}) = \text{CN}\_{\text{@}} + (100 - \text{CN}\_{\text{@}}) \text{e}^{\left(-\frac{\text{P}}{\text{k}}\right)} \tag{16}$$

CN(P) = Fitted CN value of a specific rainfall depth

CN∞ = CN of a watershed of interest

K = Fitting parameter

Violent behavior watershed follows the following formula [33]:

$$\text{CN}(\text{P}) = \text{CN}\_{\infty} \left[ 1 - \text{e}^{-\text{k}(\text{P} - \text{P}\_{\text{th}})} \right] \tag{17}$$

Pth = Threshold Rainfall depth (mm).

#### *2.11. Critical Rainfall Amount (Pcrit)*

The concept of Pcrit was initially suggested by US researchers [2,20,22] which can only be obtained through numerical analysis solving technique or by trial and error procedure. In their work, optimum λ was reported as 0.05 and the Pcrit points were identified through the intersection of conjugate CN0.05 and CN0.2 curve on the graph in their study.

The concept of Pcrit was built upon the runoff indifference between 2 runoff models. When Qv = 0 (runoff indifference between two runoff models), Equation (10) becomes Equation (12). As such, this study introduces runoff difference curves which was created with numerical analysis technique as the visual presentation of Equation (12). Runoff difference curves can be plotted for specific CN0.2 classes across multiple rainfall depth scenarios. Unlike previous research work, it combined two curves into a single curve and identify Pcrit at where the curve crosses the x-axis.

#### *2.12. The Closed Form Equation of Critical Rainfall Amount (Pcrit)*

Through algebraic manipulation, this study successfully rearranged Equation (10) and solved the general closed-form equation of Pcrit in terms of CN0.2 when Qv = 0. The breakthrough has also proven to be able to solve for Pcrit value precisely of any pairing runoff models and replace the trial and error procedure used by previous researchers [2,20,22]. SCS practitioners can derive the Pcrit equation for their study with proposed method in this article (see Section 3.10).

#### *2.13. Critical Curve Number (CNcrit)*

With a similar concept (based upon Equation (12)) as the critical rainfall amount (Pcrit), this study also introduces "critical curve number(s)" (CNcrit) to supplement the use of Pcrit. Under a specific rainfall scenario, critical curve number value(s) can also be identified from the points where Qv = 0 between 2 runoff models. Unlike the success of the Pcrit closed-form equation derivation, the effort to realize the closed-form equation of CNcrit in term of P is still unfruitful to date. Therefore, the numerical analysis technique was applied to estimate CNcrit value(s) with visual aid from the runoff difference curves graph. Runoff difference curves methodology as Section 3.9 covered can be adopted to show that Equation (2) or Equation (8) will under-predict runoff amount in any curve number areas below the critical curve number value and vice versa.

#### *2.14. Soft Computing and Data Mining of the 3D Model*

In general, Equation (10) represents the runoff prediction errors of Equation (2) under multiple P and CN0.2 scenarios but it is difficult to visualize the quantified effect by looking at Equation (10) and solve for the global maxima and minima in order to represent the worst under and over runoff prediction amounts between two runoff models.

Based on the rainfall depth range of the dataset [21], a numerical table can be compiled with Equation (10) through the substitution of different P, CN0.2 scenarios and the λ value to quantify runoff depth prediction difference between two runoff models in a table. A 3D model can also be constructed with the collective information from the table (Section 3.7). With the visual aid of a 3D runoff difference model, it is possible to extract all minimum and maximum runoff prediction difference amount and represent them with statistically significant equations. The minimum under-prediction difference amount equation represents the worst under-design case incurred by Equation (2) and vice versa.

#### **3. Results and Discussion**

#### *3.1. The Reverse Derivation of Optimum λ and S for Peninsula Malaysia*

In all, 227 λ and S values were calculated according to corresponding rainfall-runoff (P-Q) data pairs. The calculated λ dataset was checked for normality in SPSS with Kolmogorov– Smirnov and Shapiro–Wilk test statistics, both tests concluded the λ dataset to be nonnormal (*p* < 0.001). Nearly 95% (214 out of the 227) storm events calculated λ value below 0.2 while none was equal to 0.2 as proposed by SCS.

According to Section 2.1, as defined by the SCS [5], the "collective representative Ia" was reduced to 5.9 mm to fulfil both constraints of Equations (4) and (5) for the entire dataset of DID HP 27 [21]. 227 calculated λ and S values were independently used for 2000, 5000, and 10,000 random samplings prior to CI generations and cross checking (This study found that the CI upper and lower limits only differ at the fourth decimal places with 2000, 5000, and 10,000 random samplings while there were no difference between the use of 2 million (by default) and 10 million Mersenne Twister seed numbers for random sampling generation) in SPSS. The inferential statistics of the derived λ and S values are tabulated in Tables 1 and 2.

**Table 1.** Inferential Statistics of the derived λ dataset from Malaysian Department of Irrigation and Drainage (DID) Hydrological Procedure (HP) 27.


From Table 1, neither the mean nor the median BCa λ's 99% CI include the λ value of 0.2 (In comparison, the BCa 95% mean and the median CI for λ span across smaller range (0.036, 0.084)). Therefore, H0 can be rejected at alpha = 0.01 level. As such, Equation (2) is statistically insignificant (not even significant at alpha = 0.05) and cannot be used to predict runoff conditions in this study. λ dataset is skewed (skewness of 5.125 in Table 1) thus the search of the optimum collective representative λ value via numerical optimization technique focusses on median λ's confidence interval [0.034, 0.051].

On the other hand, data distribution of the S dataset is somewhat skewed with a skewness of 1.624 (Table 2). The definition of skewness is non-uniform, some guidelines suggested skewness value less than 3.0 to be considered as normal while some set a more stringent limit at 1.0. To avoid the ambiguity of skewness determination, the search of the optimum S value was widened to include the lowest and the highest confidence interval limit of both mean and median values (118.125, 196.332) on S [2,30].

**S Statistics Bootstrap, BCa 99% Bias Std. Error Confidence Interval Lower Upper Skewness** 1.624 **Kurtosis** 4.392 **Mean** 172.297 0.002 8.649 150.952 196.332 **Median** 141.54 −0.053 10.005 118.125 170.170

**Table 2.** Inferential Statistics of derived S dataset from DID HP 27.

The optimum λ value was recognized as 0.051 (rounded) while 150.46 mm was the optimum S value in formulating the best runoff predictive model (based on Equation (1)) according to the entire dataset of DID HP 27 with an overall predictive model's *BIAS* near to zero. The collective representation of the Ia for the entire dataset was found from the product of the optimum λ and S and therefore, the best collective representative value of Ia to model the entire dataset in Peninsula Malaysia is 8.3 mm from this study.

As mentioned in Section 2.1 and 2.2, BCa technique produced confidence intervals (Tables 1 and 2) for the optimization of λ and S value to calibrate the SCS CN model. It also generated a range of λ and S value to enable the calculation of multiple Ia and CN values which is in line with the latest research development in this area [23–25]. Other than the best collective representative Ia value, SCS practitioners who use the proposed method in this article have an option to compare other possible Ia values with other research results in future.

#### *3.2. The Correlation between S*<sup>λ</sup> *and S0.2 for Peninsula Malaysia*

The derivation of S<sup>λ</sup> formula (Equation (6)) proved mathematically that even with the same P-Q dataset, as λ varies, the corresponding total abstraction amount (S) varies as well and therefore, the corresponding CN value will change also. As such, it is more appropriate to re-represent Equation (7) in general form as:

$$\text{CN}\_{\lambda} = \frac{25,400}{\text{S}\_{\lambda} + 254} \tag{18}$$

CN<sup>λ</sup> = Curve number of any λ value (dimensionless)

S<sup>λ</sup> = Total abstraction amount of any λ value (mm)

Given the P-Q dataset and λ value, the corresponding CN<sup>λ</sup> can be derived from Equation (18). When λ = 0.2, its corresponding S0.2 value gives rise to deriving the conventional curve number compiled by SCS. To differentiate the conventional SCS CN, the notation of "CN0.2" is used in the remaining of this paper. When λ = 0.2, its corresponding S<sup>λ</sup> value

derives "Conjugate Curve Number" (CNλ) [2,20,22]. As the optimum λ value = 0.051, the correlation between S0.051 and S0.2 was identified with SPSS for this study as:

S0.051 = 1.176S0.21.063 (19)

S0.051 = Total abstraction amount (mm) of λ = 0.051 S0.2= Total abstraction amount (mm) of λ = 0.2

Equation (19) has a R2-adj of 0.946, standard error of 0.15 and *p* < 0.001. Equation (19) is also the key to convert S0.051 back to its equivalent S0.2 value for the calculation of CN0.2 for SCS practitioners. The optimum S0.051 is 150.46 mm (alpha = 0.01) from the range of 118.125 to 196.332 (Table 2) in Section 3.1. The equivalent S0.2 value of S0.051 = 150.46 mm is 95.97 mm (calculated from Equation (19)). By substituting S0.2 = 95.97 mm into Equation (18), CN0.2 = 72.58; thus, new λ of 0.051 derives an equivalent CN0.2 value of 72.58 to model the entire DID HP 27 dataset. The 99% confidence interval of S0.051 ranges from 118.125 to 196.332, those values can also be used to calculate its equivalent upper and lower CN0.2 limits in the same manner through Equation (18) and therefore, for the DID HP 27 dataset [21], the best collective CN0.2 = 72.58 (99% CI ranges from 67 to 76) for runoff predictions in Peninsula Malaysia.

#### *3.3. Conjugate Curve Numbers (CN*λ*) for Peninsula Malaysia*

Given the P-Q data pairs from DID HP 27, conjugate curve number values (CNλ) of each storm event can be calculated with aforementioned equations in the following steps: Since the optimum λ value obtained was 0.051, Equation (18) becomes:

$$\text{CN}\_{0.051} = \frac{25 \text{,} 400}{\text{S}\_{0.051} + 254}$$

Substitute Equation (19) into Equation (18) will yield:

$$\text{CN}\_{0.051} = \frac{25,400}{(1.176 \text{S}\_{0.2} \, ^{1.063}) + 254} \tag{20}$$

where S0.2 values can be calculated using Equation (6) (the S general formula) when P-Q data pairs are given. CN0.051 is the conjugate curve number of CN0.2. Equation (20) proves that conjugate curve number (CNλ) is not the same as the conventional curve number CN0.2 which was derived using Equation (7). Thus, it is inappropriate to use any conjugate curve number (CNλ) with Equation (2) in any rainfall-runoff modelling work.

#### *3.4. The 3D Runoff Difference Model for Peninsula Malaysia*

According to the discussions from Sections 2.4 and 2.5, the S amount is specific to its corresponding λ value. The optimum λ value = 0.051 to model runoff conditions for the DID HP 27 dataset thus by substituting λ with 0.051 into Equation (9) yields a calibrated rainfall-runoff predictive model on Equation (1) in the form of:

$$\mathbf{Q}\_{0.051} = \frac{\left(\mathbf{P} - 0.051\mathbf{S}\_{0.051}\right)^2}{\mathbf{P} - 0.051\mathbf{S}\_{0.051} + \mathbf{S}\_{0.051}}$$

The substitution of Equations (19) and (7) further simplifies it as:

$$\mathbf{Q}\_{0.051} = \frac{\left[\mathbf{P} - 2\mathbf{1}.606 \left(\frac{100}{\mathbf{C} \mathbf{N}\_{0.2}} - 1\right)^{1.063}\right]^2}{\left[\mathbf{P} + 402.547 \left(\frac{100}{\mathbf{C} \mathbf{N}\_{0.2}} - 1\right)^{1.063}\right]} \tag{21}$$

Equation (21) re-expressed the runoff model in term of P and CN0.2 and subjects to the constraint.

P > 21.606 <sup>100</sup> CN0.2 − 1 1.063 else Qv = 0 on the 3D model CN0.2 = Conventional SCS tabulated curve number Q0.051 = Runoff depth (mm) of λ = 0.051 Equation (8) is the re-expression of Equation (2) in term of P and CN0.2.

> Q0.2 = ) <sup>P</sup> <sup>−</sup> 50.8 <sup>100</sup> CN0.2 − 1 \*<sup>2</sup> ) P + 203.2 <sup>100</sup> CN0.2 − 1 \* (22)

It subjects to the constraint P > 50.8 <sup>100</sup> CN0.2 − 1 else Qv = 0.

Equation (8) or Equation (2) represents the un-calibrated SCS CN model. The runoff depth prediction differences between Equations (8) and (21) were collectively quantified by Equation (22) of which the 3D runoff difference model (Section 3.7 and Figure 2) was constructed with. Equation (22) also quantifies type II errors from Equation (2) (existing SCS model) if it is not calibrated for runoff prediction in Peninsula Malaysia.

#### *3.5. Outer Boundary Equation*

As per Section 2.7, the calibrated new λ value (0.051) is less than 0.2; thus, its model's constraint can be adopted to represent the runoff indifference boundary where runoff has not been initiated. Therefore, Equation (22) is also subject to the constraint, P > 0.051 S0.051 or P > 21.606 <sup>100</sup> CN0.2 − 1 1.063 else Qv = 0. Equation (19) can be substituted into 11 to preserve the conventional curve number (CN0.2) through following the steps.

**Figure 2.** *Cont*.

**Figure 2.** (**a**) The 3D runoff difference model (between Equations (2) and (21)) of Peninsula Malaysia with DID HP 27 dataset for Type II error assessment. (**b**) Top view of the 3D runoff difference model for Peninsula Malaysia with DID HP 27 dataset.

(**b**)

Substitute λ with 0.051, Equations (7) and (19) into Equation (11) yields:

$$P = 21.606 \left( \frac{100}{\text{CN}\_{0.2}} - 1 \right)^{1.063} \tag{23}$$

Equation (23) is the runoff indifference boundary equation between two runoff models. It is otherwise recognized as the "Outer Boundary" equation of the 3D runoff difference model (Figure 2a,b).

#### *3.6. Inner Boundary Equation*

When Qv = 0 in Equation (22), the form can be expressed as:

$$\frac{\left[\text{P} - 50.8\left(\frac{100}{\text{CN}\_{0.2}} - 1\right)\right]^2}{\left[\text{P} + 203.2\left(\frac{100}{\text{CN}\_{0.2}} - 1\right)\right]} = \frac{\left[\text{P} - 21.606\left(\frac{100}{\text{CN}\_{0.2}} - 1\right)^{1.063}\right]^2}{\left[\text{P} + 402.547\left(\frac{100}{\text{CN}\_{0.2}} - 1\right)^{1.063}\right]}\tag{24}$$

Equation (24) is also known as the "Inner Boundary" equation of the 3D runoff difference model for Peninsula Malaysia that demarcates the runoff under-prediction and over-prediction zones between two runoff models in this study.

#### *3.7. The Construction of the 3D Runoff Difference Model*

DID HP 27 dataset consist of 227 storm events ranging from 19 mm to 420 mm. In order to analyze and quantify the runoff prediction depth difference between Equation (2) (or Equation (8)) and 21 under multiple rainfall and CN0.2 scenarios, rainfall depth (P) ranging from 10 mm to 430 mm across different CN0.2 values (from 26 to 98) were entered into Equation (22) to calculate the runoff depth prediction difference that can be found in Figure 3. Those tabulated values are runoff prediction errors (or type II errors) from Equation (2) which are in line with previous studies that reported more profound error in forested watersheds represented by CN0.2 values < 60 [2,20,22] Similarly, for Peninsula Malaysia, both runoff under and over prediction errors worsen when the value of CN0.2 reduces (Figure 3).


**Figure 3.** Runoff differences generated from Equation (22) for various rainfall (P) and Curve Number (CN0.2) scenarios. Note: 1 mm = 1 million liters runoff volume in a 1 km2 area.

Red zone cells in Figure 3 are where Equation (2) under-predicted runoff amount against Equation (21). On the other hand, the white zone cells are where Equation (2) over-predicted runoff amount. The empty cells on the upper left corner of the figure are where Ia has not been fulfilled yet to initiate any runoff amount. Collectively, Figure 3 can also be presented as a 3D model as seen in Figure 2a,b. Equations (23) and (24) represent boundary lines as indicated on the 3D model, respectively. SCS practitioners can refer to Figure 3 to perform runoff prediction correction on Equation (2).

For areas in Peninsula Malaysia with CN0.2 value from 67 to 76 (marked by the dash line), the existing SCS model underpredicts runoff amount as indicated in red zone when rainfall depth of a storm is < 70 or 85 mm. SCS model tends to overpredict runoff amount after 85 mm and its overprediction tendency worsens toward larger storm events as indicated in white zone. Without model calibration, the SCS model worst runoff underprediction within these areas happens at CN0.2 = 67 area at rainfall depth of 55 mm, the model underpredicted runoff amount by 2.4 million liters in 1 km<sup>2</sup> area while it nearly overpredicted runoff amount by 25 million liters when the storm depth reaches 430 mm in Peninsula Malaysia. Blind adoption of the existing SCS CN model is likely to over-predict runoff amount when the rainfall depth of a storm event is larger than 85 mm in Peninsula Malaysia. As such, any past study or engineering projects based upon the return period concept of rainfall amount below 70 mm might be under-designed.

#### *3.8. Soft Computing and Data Mining of the 3D Runoff Difference Model*

Even though the 3D runoff difference model can be expressed using the closed form Equation (22), it is not easy to obtain the minimum (global minima) or maximum (global maxima) runoff depth difference equations. However, with the 3D runoff difference model as a visual aid accompanied by soft computing techniques, the data mining of this vital information becomes attainable.

The minimum and maximum runoff depth prediction errors across multiple P and CN0.2 scenarios between the two runoff models can be extracted from Figure 3. The statistically significant equations can then be determined using the SPSS to formulate the worst under and over-estimated runoff prediction error equations from Equation (2) or Equation (8) against Equation (21).

The data mining process extracts all the minimum and maximum runoff prediction differences (bold numbers, highlighted in red and yellow color, respectively in Figure 4) according to each rainfall depth scenarios (in row).


**Figure 4.** Soft computing, data mining of minimum and maximum runoff depth difference of each rainfall class (in row). Note: 1 mm = 1 million liters runoff volume in a 1 km2 area.

Two statistically significant and best correlation equations were identified through SPSS regression modelling as:

$$\text{Min Qv} = 5.14 \times 10^{-5} \,\text{P}^2 - 0.052 \,\text{P} - 0.222 \tag{25}$$

$$\text{Max Qv} = 5.14 \times 10^{-5} \,\text{P}^2 + 0.045 \,\text{P} - 0.734 \tag{26}$$

where Min Qv represents worse under-predicted runoff scenarios while Max Qv represents the maximum over-predicted runoff scenarios. Equation (25) has an R2-adj of 0.999, standard error of 0.037 and *p* < 0.001 while Equation (26) has an R2-adj of 0.999, standard error of 0.191 and *p* < 0.001. Given a specific rainfall depth, the worst under-estimated and over-estimated runoff prediction errors of Equation (2) or Equation (8) due to a specific rainfall depth can be estimated by Equations (25) and (26), respectively.

It is also possible to employ soft computing technique to derive similar runoff prediction error equations in term of curve number. From Figure 5, the minimum and maximum

runoff prediction differences can be extracted as per their respective curve number (in column) which induced the runoff difference (bold numbers, highlighted in red and yellow color, respectively in Figure 5).

Two statistically significant and best correlation equations from SPSS regression modelling results are:

$$\text{Min Q}\_{\text{V}} = 2.594 - \text{(329.896/CN}\_{0.2}) \tag{27}$$

$$\text{Max Q}\_{\text{V}} = 2.2 \times 10^{-4} \,\text{CN}\_{0.2}\,\,^3 - 0.061 \,\text{CN}\_{0.2}\,\,^2 + 4.77 \,\text{CN}\_{0.2} - 86.519 \tag{28}$$

where Min Qv, Max Qv and CN0.2 have been defined earlier. Equation (27) has an R2-adj of 0.992, standard error of 0.242 and *p* < 0.001 while Equation (28) has an R2-adj of 0.999, standard error of 0.255 and *p* < 0.001. Given a specific curve number, the worst underestimated and over-estimated runoff prediction errors of Equation (2) or Equation (8) due to a specific CN0.2 area can be estimated with Equations (27) and (28), respectively.


**Figure 5.** Soft computing, data mining of minimum and maximum runoff depth difference of each CN0.2 class (in column). Note: 1 mm = 1 million liters runoff volume in a 1 km2 area.

The dash line on the 3D model in the valley of the red zone is described by Equations (25) and (27) while Equations (26) and (28) represent the dash line found on the ridge of the 3D runoff difference model (see Figure 2a). SCS practitioners can adopt Equations (25)–(28) to estimate the worst-case runoff prediction errors of Equation (2) when compared to the newly found λ (0.051) model in Peninsula Malaysia. On the other hand, regional or watershed specific equations can also be established by SCS practitioners for their study as proposed.

#### *3.9. Runoff Difference Curves of the Critical Rainfall Amount*

This study introduced runoff difference curves which were created with numerical analysis technique to visually present Equation (22) and to identify Pcrit. Runoff difference curves graph combines two runoff curves (of conjugate curve numbers) into a single runoff difference curve to represent the concept of 2 previous studies [2,20,22] in another view. The graph can be plotted for specific CN0.2 classes across multiple rainfall depth scenarios to show Pcrit at where the curve crosses x-axis (Figure 6).

**Figure 6.** Runoff difference curve graph of Peninsula Malaysia. The graph was created to identify Pcrit point(s) of different CN0.2 classes. Pcrit is/are the point(s) where the runoff difference curve crosses x-axis, marked by circle(s) with solid down arrow lines. The dotted down arrow line estimates the rainfall depth of maximum "under-design" risk for CN0.2 = 46. Note: When CN0.2 = 46 (dash line curve), Equation (29) solved Pcrit = 199.6 mm (right bold down arrow). Equation (23) calculated the outer boundary is at P = 25.6 mm while the lower Pcrit value = 45.2 mm (left bold down arrow). In conclusion, for CN0.2 = 46, Equation (2) under predicts runoff amount from any rainfall depth >25.6 mm until 199.6 mm (Pcrit) and over predicts runoff amount for any rainfall depths >199.6 mm when compared to Equation (21).

Runoff difference curve can be used as a visual aid to identify the Pcrit amount where the curve intersects the x-axis (when Qv = 0). Possible true solution(s) as initial guess(es) of the trial and error process from the curve can be visually identified rather than guessing an arbitrary starting point for numerical solution as proposed by previous researchers [2,20]. Equation (22) is a quadratic model that yields two potential Pcrit solutions.

Figure 6 illustrates the use of runoff difference curves to identify the "critical rainfall amount" (Pcrit) of several CN0.2 scenarios. For example, at CN0.2 = 46 (dash line curve), Pcrit is approximately 40 mm and 205 mm (eyeballed from the graph, Pcrit points are marked by solid downwards arrow where the curve intersects the x-axis, implying that Qv is near to 0). However, the Ia amount has not been initiated for rainfall less than 40 mm according to Figure 3 and therefore, only 205 mm was used as the original trial and error estimate to satisfy Equation (22) and solve for the final solution of Pcrit of CN0.2 = 46.

Runoff difference curve provides a brief overview and shows that Equation (2) will under-predict runoff amount at CN0.2 area of 46 with any rainfall depths below the Pcrit value (around 205 mm) and becomes an over-prediction thereafter. A non-linear underdesign risk is therefore exhibited in the curve, with a peak of approximately 115 mm in rainfall depth (shown as dotted downwards arrow). Runoff difference curve provides additional insight of the worst under-estimated and over-estimated runoff prediction errors due to Equation (2) of specific rainfall depth which can be estimated with Equations (25) and (26), respectively.

#### *3.10. The Critical Rainfall Amount (Pcrit) Closed Form Equation*

Through completing the square technique, this study has successfully used Equation (22) to obtain the closed form equation of Pcrit in terms of CN0.2. The closed form equation can be applied to solve for the Pcrit in any pairing runoff models with any λ values. The equation can calculate the Pcrit amount precisely and replace the trial and error

procedure mentioned in Sections 2.11 and 2.12. SCS practitioners can refer to the proposed method in this article to derive the specific Pcrit equation for their studies.

The derivation of the closed form equation of the critical rainfall depth (Pcrit) from this study is shown below. From Equation (22),

$$\mathbf{Q}\_{\mathrm{V}} = \frac{\left[\mathrm{P} - 50.8\left(\frac{100}{\mathrm{CN}\_{02}} - 1\right)\right]^2}{\left[\mathrm{P} + 203.2\left(\frac{100}{\mathrm{CN}\_{02}} - 1\right)\right]} - \frac{\left[\mathrm{P} - 21.606\left(\frac{100}{\mathrm{CN}\_{02}} - 1\right)^{1.083}\right]^2}{\left[\mathrm{P} + 402.547\left(\frac{100}{\mathrm{CN}\_{02}} - 1\right)^{1.063}\right]}$$

$$\text{Let } \mathbf{A} = 21.606 \left(\frac{100}{\mathrm{CN}\_{02}} - 1\right)^{1.063}$$

$$\text{Let } \mathbf{B} = 50.8\left(\frac{100}{\mathrm{CN}\_{02}} - 1\right)$$

When Qv = 0 (Runoff indifferent between 2 models), substitute A and B and solve for P (Pcrit).

$$\frac{\left[\text{P} - \text{B}\right]^2}{\left[\text{P} + 4\text{B}\right]} = \frac{\left[\text{P} - \text{A}\right]^2}{\left[\text{P} + 18.631\text{A}\right]}$$

After grouping and simplifying, P (**Pcrit)** can be solved via quadratic form as below:

$$\mathbf{a} = 4\mathbf{B} - 2\mathbf{A} + 2\mathbf{B} - 18.631\mathbf{A}$$

$$\mathbf{b} = \mathbf{A}^2 - 8\mathbf{A}\mathbf{B} - \mathbf{B}^2 + 2(18.631)\mathbf{A}\mathbf{B}$$

$$\mathbf{c} = 4\mathbf{B}\mathbf{A}^2 - 18.631\mathbf{A}\mathbf{B}^2$$

$$\mathbf{P}\_{\rm crit} = \frac{-\mathbf{b} \pm \sqrt{\mathbf{b}^2 - 4\mathbf{a}\mathbf{c}}}{2\mathbf{a}}\tag{29}$$

Pcrit = Critical rainfall depth (mm)

CN0.2= Conventional curve number of a watershed

Equation (29) is a quadratic model that yields two potential Pcrit solutions. The outer boundary (Equation (23)) can be used as checkpoint to determine if the lower Pcrit value is a valid solution because any rainfall depths beyond the outer boundary will start to yield runoff difference between the two models after fulfilling the Ia requirement. The lower Pcrit value is usually discarded due to its proximity to (or less than) the outer boundary.

If the Pcrit value < the P value of Equation (23) (outer boundary equation), the Ia is yet to be fulfilled thus it is impossible to have any runoff or runoff difference amount. Runoff difference curves graph is also an effective visual aid to supplement the Pcrit closed-form equation (refer to Figure 6 example).

Results from several derived formulae were compiled in Table 3 to provide another quick overview of the Pcrit for Peninsula Malaysia across multiple CN0.2 scenarios. According to the DID HP 27 dataset, the lowest calculated CN0.2 is 48.8; hence, column A tabulates CN0.2 range from 47 to 99 to cover the entire possible CN0.2 scenario in Peninsula Malaysia. Column B and D were calculated using Equation (6), column C used Equation (20) and column E used Equation (29). Column F calculated CN0.2 percentage change into CN0.051.

Column A and E can be used to construct another Pcrit overview curve across multiple CN0.2 scenarios (Figure 7) with a statistically significant equation regressed via SPSS as:

$$P\_{\rm crit} = -245.4 \ln(\text{CN}\_{0.2}) + 1132.6 \tag{30}$$

Equation (30) has an R2-adj of 0.997, standard error of 3.047 and *p* < 0.001. Given CN0.2 value of a watershed, the corresponding Pcrit value can be estimated with Equation (30). Equation (2) under predicts runoff amount at any rainfall depths below the Pcrit overview curve in Figure 7 and vice versa. Figure 7 is also in line with the research outcome reported by [2] that Equation (2) had the tendency to under-estimate runoff amount in rural and forested watersheds as CN0.2 decreases.


**Table 3.** Conjugate CN0.051 and Pcrit for Peninsula Malaysia.

**Figure 7.** Pcrit overview curve for Peninsula Malaysia. Equation (2) under predicts runoff amount for any rainfall depths below the curve at respective CN0.2 area. The underprediction tendency worsens as CN0.2 value decreases.

Using the same concept as presented in **??** and Section 3.10, the closed form Pcrit can also be derived to verify previous study results where the optimum λ value was identified as 0.05 in the USA. The correlation between S<sup>λ</sup> and S0.2 is best represented by *S*0.05 = 1.33*S*0.21.15 [2,20,22]. It is noteworthy to mention that US researchers used inches in their dataset; hence, Equation (18) (CN formula, SI version) needs to be converted and CN<sup>λ</sup> = <sup>1000</sup> <sup>S</sup>λ+<sup>10</sup> should be used instead. The closed form Pcrit equation can be derived with the same method as proposed in Section 3.10 to verify their published Pcrit (inches) values (Table 4) in USA [2,22].


**Table 4.** The Pcrit (inches) values with its corresponding CN0.2 and CN0.05 values for runoff prediction studies in USA (Modified from [2,22]).

Note: (4.51)\* old value for CN0.2 = 65. (5.35)\*\* old value for CN0.2 = 50.

The closed form Pcrit equation verified all Pcrit values in Table 4 except for CN0.2 = 50\*\* and 65\*. For CN0.2 = 50\*\*, the calculated Pcrit using the closed form equation method is 5.33 inches (instead of 5.35 inches)\*\*. The variance to the published value is about 0.5 mm. However, for CN0.2 = 65\*, the calculated Pcrit is 3.52 inches (instead of 4.51 inches)\*, which is much lower than the published value by about 25 mm.

Verification of Table 4 Pcrit values prove that the Pcrit closed form equation can be used to calculate the exact Pcrit value for any comparing SCS CN models for SCS practitioners. The success in the closed form equation derivation narrows the study gap from previous work. It can be adopted to replace the trial and error technique used by previous researchers [2,20,22].

#### *3.11. Critical Curve Number (CNcrit)*

Equation (29) will yield two possible CNcrit solutions (when Qv = 0 in Equation (22)). Although it is possible for those CNcrit values to exist, all values must be verified. Potential CNcrit solution(s) as the initial guess(es) to the trial and error process to satisfy Equation (22) can be identified when visually aided by runoff difference curves.

For an example, when rainfall = 100 mm (dash line curve in Figure 8), potential CNcrit value is about 66 (marked by bold solid down arrows where the curve intersects with the x-axis or Qv = 0). Other possible CNcrit value were discarded because the dash line curve intersects the x-axis at the left end at CN0.2 around 22 and 99 on the right end, those values remain as a theoretical CN0.2 value only.

#### *3.12. Asymptotic Curve Number of Peninsula Malaysia*

According to the AFM (Section 2.10), the DID HP 27 dataset resembles the standard behavior pattern (Figure 9) and thus Equation (16) was adopted to derive CN∞ as the best representative CN0.2 value for the dataset. Through least square fitting method under AFM, the fitting parameter k was identified to be 40.79 and CN∞ = 67.77. When rounded to the closest positive integer, CN<sup>∞</sup> = CN0.2 = 68.

**Figure 8.** Runoff difference curves between Equation (2) or Equation (8) and (21). CNcrit is the point that the runoff difference curve intersects the x-axis, marked by circle with solid down arrows lines. The dotted down arrow lines estimate the rainfall depth of maximum "under and over-design" risk for P = 100 mm, respectively. Note: when rainfall = 100 mm (dash line curve), runoff difference curve also suggests that the return period design base on rainfall depth of 100 mm is likely to cause under-design risk (negative Qv) in watersheds where CN0.2 value(s) is (are) <66, meanwhile incurring over-design risk (positive Qv) in CN0.2 values >66. Estimated worst under-design risk (marked with dotted down arrows) occurs around CN0.2 = 42 while the worst over-design risk at about 86. The worst under and over-estimated runoff prediction errors due to Equation (2) of those CN0.2 area can be estimated with Equations (27) and (28), respectively.

**Figure 9.** Asymptotic CN fitting of the dataset. For standard behavior pattern, CN∞ is the point where a near to stable state of CN0.2 fits to the higher rainfall depths.

The AFM CN∞ result is in proximity to the equivalent CN0.2 value of 72.58 which was derived in Section 3.2, whereas CN<sup>∞</sup> = 68 also falls within the 99% CN0.2 confidence interval of this study. This proves that the proposed SCS CN model calibration methodology in this article is capable to produce results that are in line with other method introduced by previous study.

Using Equation (18), the calculated S0.2 value of the AFM CN is 120.78 mm and Ia = 0.20 × 120.78 mm = 24.16 mm. These numbers are used in formulating the SCS runoff model with Equation (1) for benchmarking (Table 5).


**Table 5.** Asymptotic CN fitting method (AFM) and new λ runoff model's residual analyses comparison with descriptive and inferential statistics at alpha = 0.01 level.

The newly calibrated λ model has lower *RSS* with higher *E* index compared to the runoff model formulated with the Asymptotic CN value. The models' residual skewness is near to zero, thus the mean residual value can act as an indicator for the predictive model's accuracy. The new λ model has lower mean residual with 99% confidence interval range which spans across zero, indicating its capability to achieve zero (residual) runoff prediction error. On the other hand, the AFM model tends to under-predict runoff volumes since their mean residual confidence interval range is within negative value range. The descriptive statistics indicates that the AFM model has a lower residual range. However, the standard deviation and variance in the model's residual are lower in the new λ model with smaller confidence interval ranges. Hence, the new λ model has higher stability and reliability for the dataset of this study.

AFM model faced another issue, whereby the calculated Ia value (24.16 mm) is larger than nearly 3.10% (seven recorded rainfall events) of the DID HP 27 dataset. According to the runoff constraint defined by SCS (as stated in Section 2.1) any rainfall depths < Ia value would not initiate any runoff; hence, AFM model failed to comply with the SCS constraint for those seven P-Q data pairs. On the other hand, New λ model does not have this issue.

#### **4. Conclusions**

This article presented the methodology to perform the SCS CN model calibration under the guide of inferential statistics with regional rainfall-runoff data. The study honed the runoff prediction accuracy of a popular rainfall-runoff model and based on its mathematical framework to develop engineering applications. Key highlights are as below:


**Author Contributions:** Conceptualization, L.L. and Z.Y.; methodology, L.L.; software, L.L. and J.L.L.; validation, L.L. and Z.Y.; formal analysis, L.L.; investigation, L.L. and Z.Y.; resources, L.L. and Z.Y.; data curation, L.L.; writing—original draft preparation, L.L. and J.L.L.; writing—review and editing, L.L., J.L.L., and Z.Y.; visualization, L.L. and J.L.L.; supervision, Z.Y.; project administration, L.L. and Z.Y.; funding acquisition, L.L. and Z.Y. All authors have read and agreed to the published version of the manuscript.

**Funding:** The authors would like to thank the Institute of Postgraduate Studies & Research (IPSR) of Universiti Tunku Abdul Rahman (UTAR) for financial support in this study (IPSR/RMC/UTARRF/2019- C2/L07). This study was also partly supported by the Brunsfield Engineering Sdn. Bhd., Malaysia (Brunsfield 8013/0002) and partly funded by FRGS (RJ130000.7809.4F208) from the Centre for Environmental Sustainability and Water Security of Universiti Teknologi Malaysia.

**Acknowledgments:** The authors appreciate the guidance from R. H. Hawkins at The University of Arizona, Tucson, AZ, USA and 3 anonymous reviewers who provided their feedback during the review process of this article.

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

#### **References**


### *Article* **Unified CACSD Toolbox for Hybrid Simulation and Robust Controller Synthesis with Applications in DC-to-DC Power Converter Control**

**Mircea ¸Su¸sc ˘a \*, Vlad Mihaly \*, Mihai St ˘anese †, Dora Morar † and Petru Dobra †**

Department of Automation, Technical University of Cluj-Napoca, Str. G. Bari¸tiu nr. 26-28, 400027 Cluj-Napoca, Romania; mihai.stanese@aut.utcluj.ro (M.S.); Dora.Sabau@aut.utcluj.ro (D.M.); Petru.Dobra@aut.utcluj.ro (P.D.)

**\*** Correspondence: mircea.susca@aut.utcluj.ro (M. ¸S.); vlad.mihaly@aut.utcluj.ro (V.M.)

† These authors contributed equally to this work.

**Abstract:** The current article presents the design, implementation, validation, and use of a Computer-Aided Control System Design (CACSD) toolbox for nonlinear and hybrid system uncertainty modeling, simulation, and control using *μ* synthesis. Remarkable features include generalization of classical system interconnection operations to nonlinear and hybrid systems, automatic computation of equilibrium points for nonlinear systems, and optimization of least conservative uncertainty bounds, with direct applicability for *μ* synthesis. A unified approach is presented for the step-down (buck), step-up (boost), and single-ended primary-inductor (SEPIC) converters to showcase the use and flexibility of the toolbox. Robust controllers were computed by minimization of the H<sup>∞</sup> norm of the augmented performance systems, encompassing a wide range of uncertainty types, and have been designed using the well-known mixed-sensitivity closed loop shaping *μ* synthesis method.

**Keywords:** CACSD toolbox; operating point linearization; automatic uncertainty bound computation; Model-in-the-Loop simulation; hybrid simulation; robust control; H<sup>∞</sup> control; *μ* synthesis; DC-to-DC power converters; buck; boost; SEPIC

#### **1. Introduction**

Robust Control represents a massive point of interest when it comes to Control Theory, which has been heavily studied over the past decades. However, albeit Robust Control brings many benefits, it is still an open field in research which gathers increasingly more approaches over time. Basically, the goal of a robust controller is to accomplish a specified set of performances for bounded model uncertainties which can occur in practice due to various reasons. In other words, closed loop stability and performance are maintained even for model parameter variations and unmodeled dynamics alike.

Over the years, multiple and various approaches for designing robust controllers have been presented, some of them being implemented into dedicated toolboxes, such as MATLAB's Robust Control Toolbox [1]. This toolbox gathers the most efficient ones based on H2, H∞, and *μ* synthesis methods, and it is often considered a reference in research. However, while using these types of toolboxes leads to controllers which are optimal for their prescribed criterion, they are not necessarily best in terms of conventional performances. Additionally, of great use for defining and optimizing difficult robust control problems is the Global Optimization Toolbox from in [2], providing ready-to-use solvers using various state-of-the-art algorithms, such as Particle Swarm Optimization (PSO) and Genetic Algorithms (GA). An important work in this direction, for computing optimal weighting functions for the generalized plant model, is presented in [3].

Even though there is a large variety of CACSD toolboxes in the field, their number is still expanding due to the necessity of overcoming drawbacks that the already existing

**Citation:** Su¸ ¸ sc ˘a, M.; Mihaly, V.; St ˘anese, M.; Morar, D.; Dobra, P. Unified CACSD Toolbox for Hybrid Simulation and Robust Controller Synthesis with Applications in DC-to-DC Power Converter Control. *Mathematics* **2021**, *9*, 731. https:// doi.org/10.3390/math9070731

Academic Editor: Aleksandr Rakhmangulov

Received: 28 February 2021 Accepted: 23 March 2021 Published: 28 March 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

ones have. At this point, the purpose of new toolboxes is not only to determine robust controllers for a specific process class, but to use a unified approach that would make them work for more types of systems, even multiple interconnected systems, in various configurations. User experience is also more accentuated, which is why some of them incorporate graphical user interfaces (GUIs), for improved usability.

An example is Multivar, which is a MATLAB-based application used for multipleinput and multiple-output (MIMO) control design, presented in [4]. This toolbox supports two working modes. It allows the user to work both in function and GUI mode (which represents a configuration wizard for determining the controller). Multivar can be used for LTI systems with or without time delay and it allows creating a model; converting, approximating, and analyzing it; input–output pairing and decoupling; and controller design and evaluation. Besides this, the user is able to export the control design and compare it with other saved designs. Another GUI-based robust controller design tool, which was created in LabVIEW, is presented in [5], based on the H<sup>∞</sup> loop shaping method. However, the goal was to provide a simple, user-friendly interface to make it easier to use, especially for educational purposes. Therefore, as mentioned by the authors, it does not provide the same flexibility as other design tools on the market.

LCToolbox, as presented in [6], is another MATLAB software package which is used for robust controller design. One of the advantages of using this toolbox instead of classic MATLAB routines is the fact that it gathers all necessary steps for controller design in one place, while cutting the need of preprocessing steps such as separate construction of the plant, and postprocessing steps, such as closed loop simulation. LCToolbox can be used for both linear time-invariant (LTI) and linear parameter-varying (LPV) models, and it also incorporates system identification methods. The controller is obtained by using the H<sup>∞</sup> loop shaping method. Other H∞-based CACSD toolboxes have been presented over the past years. One example is represented in [7], which is based on linearizing or convexifying the conventional non-convex constraints on the classical robustness margins of H<sup>∞</sup> constraints. The controller parameters are then computed by using an optimization solver. This toolbox was created for MATLAB, and some of its main features are represented by the large variety of control problems in which it could be used, such as multi-model systems; the toolbox is designed to work with the output data of MATLAB's System Identification Toolbox [8]. The output of the toolbox is represented by a PID controller, which can be easily implemented. Another example of a H∞-based CACSD toolbox is shown in [9], in which the main advantage is the reduced conservatism of almost all types of model uncertainties which are defined.

Controller order is an important factor when implementing it on real systems. Therefore, this might be an issue in some cases. However, methods that are determining a fixed structure controller are already presented, such as in [10], which is based on the H<sup>2</sup> controller design method, but can be cumbersome to compute. In order to deal with the high order controller problem, other toolboxes include controller simplification steps to avoid the necessity of postprocessing, as presented in [11].

Currently acknowledged problems in this domain regard closed loop simulation, where performance validation is generally treated ad hoc, from one control problem to another. Another difficulty encountered is when the test cases were done only on the linearized system for which the controller is designed, without checking if the initially proposed performance values are additionally verified for the nonlinear plant model, and, also, uncertainty modeling is a very cumbersome operation. The purpose of the paper is to provide means for treating the previously stated problems in a unified manner, such as implementing automated testing, performance validation, and report generation.

In this current iteration of the toolbox, robust controllers were designed using the wellestablished routines from in [1]. The interface is scalable and the control logic and validation can be replaced with other user-defined methods, or the current robust control approach can be replaced with open source alternatives for the H<sup>2</sup> and H<sup>∞</sup> optimization problems, such as presented in the thesis [12], with the possibility to refine the necessary solutions

of the Algebraic Riccati Equations (AREs) using the algorithms from [13], while for the *μ* synthesis problem, the thesis [14] provides a flexible, open-source implementation using linear matrix inequalities (LMIs). A clear advantage over the ARE approach is that LMIs are capable of solving singular and close to singular problems. Alternatively, a mixed H2/H<sup>∞</sup> approach for stabilization and optimization using fixed-order controllers can be found in [15]. As such, the current iteration of the proposed toolbox is MATLAB-dependent for certain key functionalities, especially with regards to numerical simulation, robust control, and optimization, although the exposed ideas and mathematical framework can be directly implemented in other software environments, such as Python, Scilab, or LabVIEW.

The remainder of the paper is structured in the following manner. Section 2 describes the software structure and features of the proposed toolbox; Section 3 describes a proposed end-to-end workflow exemplified using modeling, control, validation, and simulation of several DC-to-DC converter topologies; and Section 4 illustrates comparative discussions, proposed improvements, and completions for future work and conclusions.

#### **2. Toolbox Structure and Functionalities**

The proposed toolbox has been designed with the target of end-to-end design and implementation of closed loop control systems, starting from the definition of the uncertainty set of plants to be controlled, their required operating point, along with control performance specifications and controller synthesis, and ending with the controller validation for the initial desired plant set.

#### *2.1. Toolbox Features*

Proposed features and advantages over existing toolboxes available in the literature:


#### *2.2. Systems Specification*

The scope of software classes implemented and described in this section aims to provide a flexible framework for simulation by using the ordinary-differential equation ode solver exclusively, with the low-level requirement of integrating a differential state equation. As such, exogenous signals would be reference signals and disturbances, known a priori in a simulation context. The intrinsic signals, i.e., commands and corresponding measurements, are passed to their corresponding subsystems by means of ode. Figure 1 encompasses an overview of the toolbox classes described in Sections 2.2–2.4. When the relationship between two classes is of type *inheritance*, the inherited class will not redundantly recall all previous properties and methods from the base class in the diagram, unless they overload the methods and is explicitly noted.

**Figure 1.** Class diagram for general-purpose nonlinear, LTI, linearized, and hybrid system implementations, along with the uncertain plant factory class, interconnections, and main functionalities.

#### 2.2.1. Nonlinear Systems

For the purpose of this paper, we will focus on finite-dimensional systems: deterministic and stochastic. The so-called explicit or standard system form is obtained by writing the plant model in the following canonical form, using a set of differential equations and a set of output equations:

$$\begin{cases} \dot{\mathbf{x}}(t) = F(\mathbf{x}(t), \mathbf{u}(t), t); \\\\ \mathbf{u} \end{cases} \tag{1a}$$

$$\mathbf{y}(t) = h(\mathbf{x}(t), \mathbf{u}(t), t), \tag{1b}$$

with the vector maps *F* and *h* being Lipschitz functions. The input signal **u**(*t*) has dimension *m*, state signal **x**(*t*) with dimension *n*, and output signal **y**(*t*) with dimension *p*, with *t* ≥ 0. The initial conditions of the system are **<sup>x</sup>**(0) = **<sup>x</sup>**<sup>0</sup> <sup>∈</sup> <sup>R</sup>*n*.

Dynamical systems of the form (1) are implemented in class System. This will be the baseline interface for all systems the toolbox works with. Its most important methods are sim, findEqPoint, and linearize, which will be briefly described. The method sim simulates the dynamical system described by Equation (1a) from the initial condition x0, using the exogenous signal u(t), which is a predetermined anonymous function with at least the input argument time. tfin can be a scalar time value representing the final simulation time, a simulation interval, or a vector of predetermined time values. The solver options and type are based on MATLAB's ode framework options and are sent directly to it. The solver type can be selected from any of the supported functions: ode113, ode15s, ode15i, ode23, ode23t, ode23s, ode23tb, or ode45. After integrating the state equation, the output signal **y**(*t*) can be directly computed using the memoryless function *h* from (1b). A useful particularization is also the method simInitCond, with the only difference being that it replaces the time-varying input signal **u**(*t*) with a constant value **u**0, thus obtaining an impulse response. The method findEqPoint deduces an equilibrium point for the system given a set of specifications on the input, state, or output vectors and is described in detail in Section 2.4. After obtaining a valid equilibrium point, a linearized system can be obtained using the method linearize, also described there.

#### 2.2.2. Linear Systems

Of particular interest for the framework and for control systems in general are linear time-invariant systems, which inherit the software interface from the System class, are implemented in the class LTISystem and are defined by

$$\int \dot{\mathbf{x}}(t) = A\mathbf{x}(t) + B\mathbf{u}(t);\tag{2a}$$

$$\mathbf{y}(t) = \mathbb{C}\mathbf{x}(t) + D\mathbf{u}(t). \tag{2b}$$

Separately, a nonlinear system can be linearized in the vicinity of an operating point, which is an equilibrium point for said system. The operating point (**u**0, **x**0, **y**0, *t*0) can be provided by the user or can be computed using the functionality from Section 2.4. The linearized system will work with variations of the initial variables and have the following model:

$$\begin{cases} \Delta \dot{\mathbf{x}}(t) = A \cdot \Delta \mathbf{x}(t) + B \cdot \Delta \mathbf{u}(t);\\ \Delta \mathbf{y}(t) = \mathbb{C} \cdot \Delta \mathbf{x}(t) + D \cdot \Delta \mathbf{u}(t); \end{cases} \Leftrightarrow \begin{cases} \dot{\mathbf{x}}(t) = A(\mathbf{x}(t) - \mathbf{x}\_0) + B(\mathbf{u}(t) - \mathbf{u}\_0);\\ \mathbf{y}(t) = \mathbb{C}(\mathbf{x}(t) - \mathbf{x}\_0) + D(\mathbf{u}(t) - \mathbf{u}\_0) + \mathbf{y}\_0. \end{cases} \tag{3}$$

This latter structure is useful for MiL simulations and is implemented in the auxiliary class LTIEqSystem, seen as an affine nonlinear system. The great advantage of having the system from Equation (3) readily available is that it is interchangeable with the initial nonlinear interface in a closed loop context without making further adaptations in the source code and can be used to study the performance degradation obtained by replacing the controller from the linearized system to the nonlinear plant.

#### 2.2.3. Hybrid Systems

A useful extension of framework (1) for hybrid systems, to account for system discontinuities, is with structures described in [16,17]:

$$\{\cdot \mid \dot{\mathbf{x}}(t) = F(\mathbf{x}(t), \mathbf{u}(t), t), \ (\mathbf{x}, \mathbf{u}, t) \in \mathcal{C};\tag{4a}$$

$$\dot{\mathbf{x}}^{+}(t) = G(\mathbf{x}(t), \mathbf{u}(t), t), \ (\mathbf{x}, \mathbf{u}, t) \in \mathcal{D};\tag{4b}$$

$$\mathbf{y}(t) = h(\mathbf{x}(t), \mathbf{u}(t), t), \tag{4c}$$

with *<sup>F</sup>* : <sup>R</sup>*n*+*m*+<sup>1</sup> <sup>→</sup> <sup>R</sup>*<sup>n</sup>* as the flow function, *<sup>G</sup>* : <sup>R</sup>*n*+*m*+<sup>1</sup> <sup>→</sup> <sup>R</sup>*<sup>n</sup>* the jump function, and *<sup>h</sup>* : <sup>R</sup>*n*+*m*+<sup>1</sup> <sup>→</sup> <sup>R</sup>*<sup>p</sup>* the output function, while C ⊂ <sup>R</sup>*n*+*m*+<sup>1</sup> represents the flow set and D ⊂ <sup>R</sup>*n*+*m*+<sup>1</sup> is the jump set. When executing an ode simulation, a jump condition trigger is permanently verified and, based on the selected configuration, it allows prioritizing the flow logic, the jump logic, or a stochastic behavior which includes randomly selecting any of them. This jump condition will also be needed for hybrid system interconnections.

We propose a separate class in the toolbox, called HybridSystem, which inherits the previously described class System, includes the ode event-based mechanism from HyEQ Toolbox [16], and is extended to support time-varying differential equation systems and exogenous input signals. Besides the base interface from System, it also provides methods for functions *G*, C, and D. It also provides a wrapper function to promote any System object to the type HybridSystem, by adding dummy *G*, C, and D methods, in order to be compatible for use in hybrid system interconnections. The flexibility added by this class in the toolbox allows model-in-the-Loop simulations using physical processes with hybrid dynamics, such as switching systems, i.e., electrical machines and power converters, or simulations of the closed loop control system, seen as hybrid system through the interconnection of a continuous-time process and a discrete-time controller, allowing the user to assess several performance analysis steps.

#### *2.3. System Interconnections*

After defining individual or *atomic* systems as in previous sections, the necessity for composing system interconnections readily appears. The classical interconnection operations are the series, parallel, lower, and upper linear-fractional transformations (LLFT and ULFT). Moreover, two separate approaches have been considered, i.e., to interconnect general-purpose nonlinear systems modeled by the class System and hybrid systems modeled by the class HybridSystem separately. The first case is useful for linearization near an operating point, studying its system theoretical properties, and designing control techniques, while the latter becomes useful in a model-in-the-Loop simulation context and for closed loop system property analysis. All provided system interconnections are implemented in classes which inherit the base class System.

The software classes presented in this section extend the series, parallel, feedback, and lft functions from MATLAB for nonlinear and hybrid systems, based on the interfaces from Equations (1) and (4). For hybrid system interconnections, the continuous and discrete dynamics sets C and D, respectively, are obtained using union and intersection set operations.

Moreover, the next discrete state for each subsystem is triggered by its own logic, predefined in the jump function *G* and only when necessary; otherwise, it remains unchanged. For specifying this next discrete state **x**<sup>+</sup> logic, as in the interface from Equation (4c), we will use the notation IF(CONDITION, THEN, ELSE), where CONDITION will be true when the point in the state-space is in the jump set, i.e., (**x**, **u**, *t*) ∈ D or (**x**, **u**, *t*) ∈ C; THEN gives the next state if a jump needs to be performed; and ELSE gives the next discrete state otherwise.

The state, output, and hybrid domain equations for nonlinear and hybrid system series connection, with the notations used in Figure 2, upper row, implemented in classes SeriesConnectionSystem and HybridSeriesConnectionSystem, are as follows:

 **x**˙ 1 **x**˙ 2 = *F*1(**x**1, **u**, *t*) *F*2(**x**2, *h*1(**x**1, **u**, *t*), *t*) ; **y** = *h*2(**x**2, *h*1(**x**1, **u**, *t*), *t*). **x**˙ 1 **x**˙ 2 = *F*1(**x**1, **u**, *t*) *F*2(**x**2, *h*1(**x**1, **u**, *t*), *t*) ; **x**+ 1 **x**+ 2 = if(jump1, *G*1(**x**1, **u**, *t*), **x**1) if(jump2, *G*2(**x**2, *h*1(**x**1, **u**, *t*), *t*), **x**2) ; C(**x**, **u**, *t*) = C1(**x**1, **u**, *t*) ∩ C2(**x**2, *h*1(**x**1, **u**, *t*), *t*); D(**x**, **u**, *t*) = D1(**x**1, **u**, *t*) ∪ D2(**x**2, *h*1(**x**1, **u**, *t*), *t*); **y** = *h*2(**x**2, *h*1(**x**1, **u**, *t*), *t*). (5)

Given two initial subsystems Sys1 and Sys2 with dimensions (*m*1, *n*1, *p*1) and (*m*2, *n*2, *p*2), respectively, the resulting series connection system will have dimensions (*m* = *m*1, *n* = *n*<sup>1</sup> + *n*2, *p* = *p*2).

**Figure 2.** Series and parallel interconnections for general-purpose and hybrid systems.

The state, output, and hybrid domain equations for nonlinear and hybrid system parallel connection, with the notations used in Figure 2, bottom row, implemented in the classes named ParallelConnectionSystem and HybridParallelConnectionSystem, are as follows:

 **x**˙ 1 **x**˙ 2 = *F*1(**x**1, **u**, *t*) *F*2(**x**2, **u**, *t*) ; **y** = *h*1(**x**1, **u**, *t*) + *h*2(**x**2, **u**, *t*). **x**˙ 1 **x**˙ 2 = *F*1(**x**1, **u**, *t*) *F*2(**x**2, **u**, *t*) ; **x**+ 1 **x**+ 2 = if(jump1, *G*1(**x**1, **u**, *t*), **x**1) if(jump2, *G*2(**x**2, **u**, *t*), **x**2) ; C(**x**, **u**, *t*) = C1(**x**1, **u**, *t*) ∩ C2(**x**2, **u**, *t*); D(**x**, **u**, *t*) = D1(**x**1, **u**, *t*) ∪ D2(**x**2, **u**, *t*); **y** = *h*1(**x**1, **u**, *t*) + *h*2(**x**2, **u**, *t*). (6)

Given two initial subsystems Sys1 and Sys2 with dimensions (*m*1, *n*1, *p*1) and (*m*2, *n*2, *p*2), respectively, the resulting parallel connection system will have dimensions (*m* = *m*<sup>1</sup> = *m*2, *n* = *n*<sup>1</sup> + *n*2, *p* = *p*<sup>1</sup> = *p*2).

The state, output, and hybrid domain equations for nonlinear and hybrid system lower linear fractional trasformation (LLFT) connection, with the notations used in Figure 3, upper row, implemented in classes LLFTConnectionSystem and HybridLLFTConnectionSystem, are as follows:

 **x**˙ 1 **x**˙ 2 = - *F*1 **x**1, **u**LLFT <sup>1</sup> , *t F*2 **x**2, **u**LLFT <sup>2</sup> , *t* . ; **y** = *h*1 **x**1, **u**LLFT <sup>1</sup> , *t h*2 **x**2, **u**LLFT <sup>2</sup> , *t* . . **x**˙ 1 **x**˙ 2 = - *F*1 **x**1, **u**LLFT <sup>1</sup> , *t F*2 **x**2, **u**LLFT <sup>2</sup> , *t* . ; **x**+ 1 **x**+ 2 = if jump1, *G*<sup>1</sup> **x**1, **u**LLFT <sup>1</sup> , *t* , **x**<sup>1</sup> if jump2, *G*<sup>2</sup> **x**2, **u**LLFT <sup>2</sup> , *t* , **x**<sup>2</sup> ; C(**x**, **u**, *t*) = C<sup>1</sup> **x**1, **u**LLFT <sup>1</sup> , *t* ∩ C2 **x**2, **u**LLFT <sup>2</sup> , *t* ; D(**x**, **u**, *t*) = D<sup>1</sup> **x**1, **u**LLFT <sup>1</sup> , *t* ∪ D2 **x**2, **u**LLFT <sup>2</sup> , *t* ; **y** = *h*1 **x**1, **u**LLFT <sup>1</sup> , *t h*2 **x**2, **u**LLFT <sup>2</sup> , *t* . , (7)

with the predefined notations:

$$\mathbf{u} = \begin{bmatrix} \mathbf{u}\_{1} \\ \mathbf{u}\_{2} \end{bmatrix} = \begin{bmatrix} \mathbf{u}\_{11} \\ \mathbf{u}\_{12}^{ref} \\ \mathbf{u}\_{21}^{ref} \\ \mathbf{u}\_{22} \end{bmatrix}, \quad \mathbf{u}\_{1}^{\text{LLFT}} = \begin{bmatrix} \mathbf{u}\_{11} \\ \mathbf{u}\_{12}^{ref} + \mathbf{y}\_{21} \end{bmatrix} \equiv \begin{bmatrix} \mathbf{u}\_{11} \\ \mathbf{u}\_{12} \end{bmatrix}, \quad \mathbf{u}\_{2}^{\text{LLFT}} = \begin{bmatrix} \mathbf{u}\_{21}^{ref} + \mathbf{y}\_{12}^{-} \\ \mathbf{u}\_{22} \end{bmatrix} \equiv \begin{bmatrix} \mathbf{u}\_{21} \\ \mathbf{u}\_{22} \end{bmatrix}. \tag{8}$$

The common convention in the literature is to consider the last NCON values from the input vector **u**1, i.e., **u**12, as control input signals, while the last NMEAS values from the output vector **y**1, i.e., **y**12, as measurements signals. Only the vector **u** will be an exogenous signal, as the feedback components **y**− <sup>12</sup> and **y**<sup>−</sup> <sup>21</sup> are local and private feedback components computed implicitly at the previous time step, dictated by the selected ode solver. The exogenous signals **<sup>u</sup>**<sup>11</sup> and **<sup>u</sup>**<sup>22</sup> are seen as disturbance signals, while the signals **<sup>u</sup>***ref* <sup>12</sup> and **u***ref* <sup>21</sup> are seen as reference signals.

Given two initial subsystems Sys1 and Sys2 with dimensions (*m*1, *n*1, *p*1) and (*m*2, *n*2, *p*2), respectively, the resulting LLFT connection system will have dimensions (*m* = *m*<sup>1</sup> + *m*2, *n* = *n*<sup>1</sup> + *n*2, *p* = *p*<sup>1</sup> + *p*2). The subsystem Sys1 is usually seen as the controlled plant, while Sys2 is seen as the controller. In order to assure compatibility between the two, several assertions must be made: NMEAS = length(**y**12) = length(**u**21) and NCON = length(**y**21) = length(**u**12).

The state, output, and hybrid domain equations for nonlinear and hybrid system upper linear fractional trasformation (ULFT) connection, with the notations used in Figure 3, bottom row, implemented in classes ULFTConnectionSystem and HybridULFTConnectionSystem, are as follows:

 **x**˙ 1 **x**˙ 2 = - *F*1 **x**1, **u**ULFT <sup>1</sup> , *t F*2 **x**2, **u**ULFT <sup>2</sup> , *t* . ; **y** = *h*1 **x**1, **u**ULFT <sup>1</sup> , *t h*2 **x**2, **u**ULFT <sup>2</sup> , *t* . . **x**˙ 1 **x**˙ 2 = - *F*1 **x**1, **u**ULFT <sup>1</sup> , *t F*2 **x**2, **u**ULFT <sup>2</sup> , *t* . ; **x**+ 1 **x**+ 2 = if jump1, *G*<sup>1</sup> **x**1, **u**ULFT <sup>1</sup> , *t* , **x**<sup>1</sup> if jump2, *G*<sup>2</sup> **x**2, **u**ULFT <sup>2</sup> , *t* , **x**<sup>2</sup> ; C(**x**, **u**, *t*) = C<sup>1</sup> **x**1, **u**ULFT <sup>1</sup> , *t* ∩ C2 **x**2, **u**ULFT <sup>2</sup> , *t* ; D(**x**, **u**, *t*) = D<sup>1</sup> **x**1, **u**ULFT <sup>1</sup> , *t* ∪ D2 **x**2, **u**ULFT <sup>2</sup> , *t* ; **y** = *h*1 **x**1, **u**ULFT <sup>1</sup> , *t h*2 **x**2, **u**ULFT <sup>2</sup> , *t* . , (9)

with the predefined notations:

$$\mathbf{u} = \mathbf{u}\_{12} \quad \mathbf{u}\_1^{\text{ULFT}} = \begin{bmatrix} \mathbf{y}\_2^- \\ \mathbf{u}\_{12} \end{bmatrix}, \quad \mathbf{u}\_2^{\text{ULFT}} = \mathbf{y}\_{11}^-. \tag{10}$$

The common convention in the literature is to consider the first NU values from the input vector of the plant subsystem, i.e., **u**11, as input uncertainty signals, while the first NY values from the output vector of the plant, i.e., **y**11, as output uncertainty signals. Only the vector **u** ≡ **u**<sup>12</sup> will be an exogenous signal, as the feedback components **y**<sup>−</sup> <sup>11</sup> and **y**<sup>−</sup> 2 are local and private feedback components computed implicitly at the previous time step, dictated by the selected ode solver. The exogenous signal **u**<sup>12</sup> is seen as set of performance and control signals for the plant, without any reference signals recalled explicitly compared to the LLFT case.

Given two initial subsystems Sys1 and Sys2 with dimensions (*m*1, *n*1, *p*1) and (*m*2, *n*2, *p*2), respectively, the resulting ULFT connection system will have dimensions (*m* = *m*<sup>1</sup> + *m*2, *n* = *n*<sup>1</sup> + *n*2, *p* = *p*<sup>1</sup> + *p*2). The subsystem Sys1 is usually seen as the augmented controlled plant, while Sys2 is seen as the unstructured uncertainty block. In order to assure compatibility between the two, several assertions must be made: NY = length(**y**11) = length(**u**2) and NU = length(**y**2) = length(**u**11).

**Figure 3.** Upper (ULFT) and lower (LLFT) linear fractional transformation interconnections for general-purpose nonlinear and hybrid systems, with the ability to impose external reference signals.

#### *2.4. Automatic Equilibrium Point Computation*

Given a nonlinear system as in Equation (1), which may also include interconnections of systems, an operating point is desired with some of the input, state, and output variables imposed, such as a water level in a tank *yh*(*t*) controlled through two pumps **u***flow*(*t*), one with variable flow and one with a fixed flow, or a mechanical transportation system having a desired velocity *yω*(*t*) with respect to input forces and loads **u**(*t*). As such, a mechanism to automatically compute a partially imposed equilibrium point for an entire family of uncertain plants, relative to one which is considered nominal at the design phase, is proposed in this paragraph.

Starting from the system definition with dimensions *m*, *n*, and *p*, consider the sets of indexes, denoted by I, and prescribed values, denoted by V, for the input, state, and output variables, respectively:

$$\mathcal{I}\left\{\mathcal{Z}\_{\mathbf{u}} := \left\{i\_1^{\mathbf{u}}, i\_2^{\mathbf{u}}, \dots, i\_{\left\|\mathbf{l}\right\|\_{\mathbf{u}}\right\}, \mathcal{V}\_{\mathbf{u}} := \left\{\overline{\mathbf{u}}(i\_1^{\mathbf{u}}), \overline{\mathbf{u}}(i\_2^{\mathbf{u}}), \dots, \overline{\mathbf{u}}\left(i\_{\left\|\mathbf{l}\right\|\_{\mathbf{u}}\right)\right\}, \quad 0 \le \overline{m}\_{\mathbf{u}} \le m;\tag{11a}$$

$$\mathcal{Z}\_{\mathbf{x}} := \left\{ \vec{r}\_1^{\mathbf{x}}, \vec{r}\_2^{\mathbf{x}}, \dots, \vec{r}\_{\mathbf{l}\_x}^{\mathbf{x}} \right\}, \quad \mathcal{V}\_{\mathbf{x}} := \left\{ \vec{\mathbf{x}}(\vec{r}\_1^{\mathbf{x}}), \vec{\mathbf{x}}(\vec{r}\_2^{\mathbf{x}}), \dots, \vec{\mathbf{x}}(\vec{r}\_{\mathbf{l}\_x}^{\mathbf{x}}) \right\}, \quad 0 \le \overline{\pi}\_{\mathbf{x}} \le n;\tag{11b}$$

$$\mathcal{I}\_{\mathbf{y}} := \left\{ \mathbf{i}\_1^y, \mathbf{i}\_2^y, \dots, \mathbf{i}\_{\overline{p}\_y}^y \right\}, \quad \mathcal{V}\_{\mathbf{y}} := \left\{ \mathbf{\overline{y}} \left( \mathbf{i}\_1^y \right), \mathbf{\overline{y}} \left( \mathbf{i}\_2^y \right), \dots, \mathbf{\overline{y}} \left( \mathbf{i}\_{\overline{p}\_y}^y \right) \right\}, \quad 0 \le \overline{p}\_y \le p\_\prime \tag{11c}$$

along with their complementary sets of values for the indexes, denoted by U I, and the values, denoted U V, to be computed through optimization by solving a system of equations:

$$\begin{cases} l\mathcal{U}\mathcal{T}\_{\mathbf{u}} := \left\{ \begin{smallmatrix} \bar{u}\_{1}^{\boldsymbol{u}}, \bar{i}\_{2}^{\boldsymbol{u}}, \dots, \bar{i}\_{m\_{\boldsymbol{u}}}^{\boldsymbol{u}} \end{smallmatrix} \right\}\_{\mathcal{I}}, \operatorname{l}\mathcal{V}\mathcal{V}\_{\mathbf{u}} := \left\{ \begin{smallmatrix} \tilde{\mathbf{u}}(\bar{i}\_{1}^{\boldsymbol{u}}), \tilde{\mathbf{u}}(\bar{i}\_{2}^{\boldsymbol{u}}), \dots, \tilde{\mathbf{u}}\left(\bar{i}\_{m\_{\boldsymbol{u}}}^{\boldsymbol{u}}\right) \end{smallmatrix} \right\}, \quad 0 \le \tilde{m}\_{\boldsymbol{u}} \le m; \tag{12a} \\\ l\mathcal{U}\mathcal{T}\_{\mathbf{v}} := \left\{ \begin{smallmatrix} \tilde{\mathbf{x}}^{\boldsymbol{x}}, \bar{i}\_{1}^{\boldsymbol{x}} & \bar{i}\_{2}^{\boldsymbol{x}} \end{smallmatrix} \right\} \_ \operatorname{l}\mathcal{U}\mathcal{V}\_{\mathbf{u}} := \left\{ \begin{smallmatrix} \tilde{\mathbf{x}}(\bar{i}\_{1}^{\boldsymbol{u}}), \tilde{\mathbf{x}}(\bar{i}\_{2}^{\boldsymbol{u}}) \end{smallmatrix} \right\} \quad 0 \le \tilde{m}\_{\boldsymbol{u}} \le m; \tag{12b} \end{cases}$$

$$\begin{cases} \mathcal{U}\mathcal{Z}\_{\mathbf{x}} := \left\{ \mathbf{i}\_{1}^{\overline{x}}, \mathbf{i}\_{2}^{\overline{x}}, \dots, \mathbf{i}\_{\overline{n}}^{\overline{x}} \right\}, \quad \mathcal{U}\mathcal{V}\_{\mathbf{x}} := \left\{ \widetilde{\mathbf{x}}(\mathbf{i}\_{1}^{\overline{x}}), \widetilde{\mathbf{x}}(\mathbf{i}\_{2}^{\overline{x}}), \dots, \widetilde{\mathbf{x}}\left(\mathbf{i}\_{\overline{n}\_{\overline{x}}}^{\overline{x}} \right) \right\}, \quad \mathbf{0} \le \widetilde{\mathbf{n}}\_{\mathbf{x}} \le \mathbf{n}; \quad \text{(12b)}\\ \mathcal{U}\mathcal{Z}\_{\mathbf{y}} := \left\{ \mathbf{i}\_{1}^{\overline{y}}, \mathbf{i}\_{2}^{\overline{y}}, \dots, \mathbf{i}\_{\overline{p}}^{\overline{y}} \right\}, \quad \mathcal{U}\mathcal{V}\_{\mathbf{y}} := \left\{ \widetilde{\mathbf{y}}\left(\mathbf{i}\_{1}^{\overline{y}}\right), \widetilde{\mathbf{y}}\left(\mathbf{i}\_{2}^{\overline{y}}\right), \dots, \widetilde{\mathbf{y}}\left(\mathbf{i}\_{\overline{p}}^{\overline{y}}\right) \right\}, \quad \mathbf{0} \le \widetilde{p}\_{\mathbf{y}} \le p\_{\mathbf{y}} \end{cases}$$

$$\mathcal{U}\mathcal{U}\_{\mathbf{Y}} := \left\{ \mathbf{i}\_1^y, \mathbf{i}\_2^y, \dots, \mathbf{i}\_{\overline{p}\_y}^y \right\}, \quad \mathcal{U}\mathcal{V}\_{\mathbf{Y}} := \left\{ \widetilde{\mathbf{y}}\left(\mathbf{i}\_1^y\right), \widetilde{\mathbf{y}}\left(\mathbf{i}\_2^y\right), \dots, \widetilde{\mathbf{y}}\left(\mathbf{i}\_{\overline{p}\_y}^y\right) \right\}, \quad 0 \le \widetilde{p}\_y \le p\_\prime \tag{12c}$$

with

$$\begin{cases} \overline{m}\_{\text{u}} + \widetilde{m}\_{\text{u}} = m, \ \mathcal{Z}\_{\text{u}} \cup \mathcal{U}\mathcal{Z}\_{\text{u}} = \{1, 2, \dots, m\}, \ \mathcal{Z}\_{\text{u}} \cap \mathcal{U}\mathcal{Z}\_{\text{u}} = \mathcal{Q};\\ \overline{m}\_{\text{r}} + \widetilde{n}\_{\text{r}} = n, \ \mathcal{Z}\_{\text{r}} \cup \mathcal{U}\mathcal{Z}\_{\text{r}} = \{1, 2, \dots, n\}, \ \mathcal{Z}\_{\text{r}} \cap \mathcal{U}\mathcal{Z}\_{\text{r}} = \mathcal{Q};\end{cases} \tag{13a}$$

*nx* <sup>+</sup> *<sup>n</sup>*1*<sup>x</sup>* <sup>=</sup> *<sup>n</sup>*, <sup>I</sup>*<sup>x</sup>* ∪ UI*<sup>x</sup>* <sup>=</sup> {1, 2, . . . , *<sup>n</sup>*}, <sup>I</sup>*<sup>x</sup>* ∩ UI*<sup>x</sup>* <sup>=</sup> <sup>∅</sup>; (13b)

$$\{\ \overline{p}\_y + \hat{p}\_y = p, \ \mathcal{Z}\_y \cup \mathcal{U}\mathcal{Z}\_y = \{1, 2, \dots, p\}, \ \mathcal{Z}\_y \cap \mathcal{U}\mathcal{Z}\_y = \mathbb{Q}.\tag{13c}$$

a set of permutation matrices *<sup>P</sup>***<sup>u</sup>** <sup>∈</sup> <sup>R</sup>*m*×*m*, *<sup>P</sup>***<sup>x</sup>** <sup>∈</sup> <sup>R</sup>*n*×*n*, *<sup>P</sup>***<sup>y</sup>** <sup>∈</sup> <sup>R</sup>*p*×*<sup>p</sup>* are obtained after sorting the indexes such as the following system of vector-valued equations needs to be solved:

> ⎧ ⎪⎪⎪⎨

$$\mathbf{0}\_{\begin{array}{c} \\ \end{array}} = F \left( P\_{\mathbf{x}} \cdot \begin{bmatrix} \overleftarrow{\mathbf{x}} \\ \overleftarrow{\mathbf{x}} \end{bmatrix}\_{\prime} \, \, P\_{\mathbf{u}} \cdot \begin{bmatrix} \overleftarrow{\mathbf{u}} \\ \overleftarrow{\mathbf{u}} \end{bmatrix}\_{\prime} \, \widetilde{\mathbf{f}} \right); \tag{14a}$$

$$\left\{ \begin{array}{c} P\_{\mathbf{y}} \cdot \begin{bmatrix} \overline{\mathbf{y}} \\ \widetilde{\mathbf{y}} \end{bmatrix} = h \left( P\_{\mathbf{x}} \cdot \begin{bmatrix} \overline{\mathbf{x}} \\ \widetilde{\mathbf{x}} \end{bmatrix} \Big| \,^{\prime}P\_{\mathbf{u}} \cdot \begin{bmatrix} \overline{\mathbf{u}} \\ \widetilde{\mathbf{u}} \end{bmatrix} \Big| \,^{\prime}\widetilde{\mathbf{f}} \right) . \tag{14b}$$

The system from Equation (14) becomes equivalent to directly solving a system of equations of the form **0** = F(**z**) in the vector-valued unknown:

$$\mathbf{z} = \begin{bmatrix} \widetilde{\mathbf{x}}^T & \widetilde{\mathbf{u}}^T & \widetilde{\mathbf{y}}^T & \widetilde{t} \end{bmatrix}^T \in \mathbb{R}^{\overline{n}\_x + \overline{m}\_u + \overline{p}\_y + 1}. \tag{15}$$

If the dynamical system is time-invariant or if the required time value is known a priori, then the time variable can be removed from the solver or it can be imposed to a certain value *t* in the same manner as the for the other signals. Moreover, the method is flexible and allows imposing and solving only the subsystem (14a) if the output variables coincide with the states. The unknown variables from Equation (15) can be initialized to random values or a rough estimate for the entire family of uncertain plants can be obtained with the simulation to a step response of the nominal plant at the required amplitudes. All systems in the uncertain physical plant set will be found in the same mathematical vicinity. After solving the preferred algebraic system configuration from Equation (14), the desired equilibrium point **u**, **x**, **y**, **t** can be reconstructed using the inverse permutation matrices *P*−<sup>1</sup> **<sup>u</sup>** , *P*−<sup>1</sup> **<sup>x</sup>** , *P*−<sup>1</sup> **<sup>y</sup>** and the notations from Equations (11) and (12). The method findEqPoint from class System forms and solves the system (14) and computes the desired equilibrium point for its predefined dynamical system based on the specifications from Equations (11) and (12) given in the structure eqOpts.

After acquiring the desired equilibrium point, the system linearization can be easily deduced through numeric differentiation methods. The most straightforward method is to compute the first-order Jacobian matrices of the functions *F* and *h* with respect to the state and input signals **x** and **u**, respectively:

$$A = \frac{\delta F}{\delta \mathbf{x}}\bigg|\_{\left(\mathbf{x}\_{0}, \mathbf{u}\_{0}, \mathbf{t}\_{0}\right)};\ B = \frac{\delta F}{\delta \mathbf{u}}\bigg|\_{\left(\mathbf{x}\_{0}, \mathbf{u}\_{0}, \mathbf{t}\_{0}\right)};\ \mathbf{C} = \frac{\delta h}{\delta \mathbf{x}}\bigg|\_{\left(\mathbf{x}\_{0}, \mathbf{u}\_{0}, \mathbf{t}\_{0}\right)};\ D = \frac{\delta h}{\delta \mathbf{u}}\bigg|\_{\left(\mathbf{x}\_{0}, \mathbf{u}\_{0}, \mathbf{t}\_{0}\right)}.\tag{16}$$

The method linearize(**x**0,**u**0,*t*0) from class System of Section 1 computes the matrices from Equation (16) with a first-order derivative approximation and also the output equilibrium value **y**<sup>0</sup> = *h*(**x**0, **u**0, *t*0):

$$A\_{\overline{\mathbf{1}},\overline{\mathbf{u}},i} \approx \frac{F(\mathbf{x}\_0 + \Delta \mathbf{x}\_0^i, \mathbf{u}\_0, t\_0) - F(\mathbf{x}\_0, \mathbf{u}\_0, t\_0)}{\Delta \mathbf{x}}; \quad B\_{\overline{\mathbf{1}},\overline{\mathbf{u}},j} \approx \frac{F(\mathbf{x}\_0, \mathbf{u}\_0 + \Delta \mathbf{u}\_0^j, t\_0) - F(\mathbf{x}\_0, \mathbf{u}\_0, t\_0)}{\Delta u}, \quad j = 1, \ldots, N$$

(17)

following that the output matrices *C* and *D* to be computed in a similar manner by replacing *F* with *h* in the above formulas. The shorthand notations are Δ**x***<sup>i</sup>* <sup>0</sup> = 0 ··· 0 Δ*x* 0 ··· 0 *T* and Δ**u***<sup>j</sup>* <sup>0</sup> = 0 ··· 0 Δ*u* 0 ··· 0 *<sup>T</sup>* for the disturbance vectors corresponding to the state with the index *i* ∈ 1, *n* or input with index *j* ∈ 1, *m*, respectively, while the optimal [18] unit perturbations are, using double precision, Δ*x* = tol · (1 + ||**x**0||) and Δ*u* = tol · (1 + ||**u**0||), tol = 10−5. Obviously, when linearizing the system, the static amplification of the initial nonlinear system is not accounted in the procedure, but will not be relevant in the actual control design process and implementation due to the consideration of only Lipschitz function-based systems and, as such, it will be correctly compensated. The correct simulation of the linearized system near the operating point is done using the class LTIEqSystem.

#### *2.5. Automatic Least Conservative Uncertainty Bound Computation*

Figure 4 encompasses an overview of the toolbox classes described in Sections 2.5 and 2.6, along with showing their relationship with the classes from the previous sections. Based on any desirable combination of the above system classes, i.e., System, LTISystem, LTIEqSystem, HybridSystem, and their interconnections, we propose a new functionality to aid in uncertain system modeling, ready for use in augmenting the plant for *μ* synthesis, implemented in the classes UncertainPlantFactory, seen in Figure 1, along with UncertaintyBoundOptimizationProblem, seen in Figure 4.

The common uncertainty model types considered in practice are gathered in Table 1. Besides the definition of the uncertain plant *G*(*s*) starting from a nominal model *Gn*(*s*) in relation to the uncertainty block Δ(*s*), the mathematical expression of Δ(*s*) is necessary to experimentally deduce its frequency response. Left and right coprime factor uncertainties are described by two blocks: Δ*<sup>M</sup>* and Δ*N*, and one of them can be selected as a free term, i.e., one degree of freedom (1-DOF). The class UncertainPlantFactory provides an interface to define a nominal plant and a random plant from a prespecified set. Besides the methods getNominalPlant and getRandomPlant, both returning a System object, it implements each uncertainty type Δ(*s*) from Table 1, obtained through Monte Carlo simulation using the magnitude characteristic in the frequency domain.

**Figure 4.** Closed loop control problem class which encompasses an uncertain plant set with operating point specification, options for automatically modeling the plant uncertainty, specifying robust control performances, synthesizing controller, and validating obtained results.


**Table 1.** Commonly used classes of perturbation and uncertainty models for multiple-input and multiple-output (MIMO) systems, implemented in class UncertainPlantFactory.

The frequency domain relevant for the studied plant is defined in logarithmic scale as

$$
\Omega = \{ \underline{\omega} = \omega\_1 < \omega\_2 < \dots < \omega\_{N-1} < \omega\_N = \overline{\omega} \},
\tag{18}
$$

along with the magnitude characteristic values sampled at points from Ω. By convention, ||Δ(*jω*)||<sup>∞</sup> ≤ 1, ∀*ω* ≥ 0; thus, the worst-case uncertainty deduced experimentally through Monte Carlo simulation is written as Δ(*s*)*Wexp*(*s*). As an example for the additive uncertainty type, the uncertain plant family will be *G*(*s*) = *Gn*(*s*) + Δ(*s*) · *Wexp*(*s*), with ||Δ(*jω*)||<sup>∞</sup> ≤ 1, ∀*ω* ≥ 0 and the toolbox returns the worst-case experimental magnitude characteristic of *Wexp*(*s*), sampled at points from *j*Ω through the high-level method getUncertaintyModel-Boundary from class UncertainPlantFactory, which wraps over low-level methods such as getAdditiveUncBoundary, getInverseAdditiveUncBoundary etc.

Due to the fact that the sampled points from the previous paragraph cannot be directly accounted for in robust control synthesis and, moreover, they may not represent an actual transfer function, it appears the need to compute a least conservative low-order transfer function to model the desired uncertainty family. This problem has been solved by employing a global optimization algorithm, such as PSO, described in [19]. The PSO algorithm has been considered in favor of other global optimization algorithms, such as GA, due to its inherent structure of addressing semi-continuous functions, such as our strongly nonlinear semi-continuous function described in Equation (21) in the variable from Equation (19).

A particle **x** := *x*<sup>1</sup> *x*<sup>2</sup> ··· *xn*<sup>4</sup> *<sup>T</sup>* of the optimization problem is defined as the transfer function

$$\mathcal{W}\_{\mathbf{x}}(\mathbf{s}) = \frac{k}{s^{\mathcal{P}}} \cdot \frac{\prod \left(\overset{\circ}{\mathbf{\hat{r}}}\mathbf{s} + 1\right) \prod \left(\frac{\mathbf{s}^{2}}{\stackrel{\circ}{\boldsymbol{\omega}\_{n}^{2}}} + \frac{\overset{\circ}{\mathbf{\hat{r}}}\mathbf{s} + 1}{\stackrel{\circ}{\boldsymbol{\omega}\_{n}}}\right)}{\prod (\mathbf{\hat{r}} + 1) \prod \left(\frac{\mathbf{s}^{2}}{\stackrel{\circ}{\boldsymbol{\omega}\_{n}^{2}}} + \frac{\mathbf{s}^{2}}{\stackrel{\circ}{\boldsymbol{\omega}\_{n}}}\mathbf{s} + 1\right)} = \frac{\mathbf{x}\_{1}}{\stackrel{\circ}{\mathbf{s}^{\mathcal{P}}}} \cdot \frac{\prod\_{n=1}^{n\_{1}} (\mathbf{x}\_{k}\mathbf{s} + 1) \prod\_{n\_{1}+1}^{n\_{2}} \left(\frac{\mathbf{s}^{2}}{\mathbf{x}\_{k}^{2}} + \frac{2\mathbf{x}\_{k+1}}{\mathbf{x}\_{k}}\mathbf{s} + 1\right)}{\prod\_{n\_{2}+1}^{n\_{1}} (\mathbf{x}\_{k}\mathbf{s} + 1) \prod\_{n\_{3}+1}^{n\_{4}} \left(\frac{\mathbf{s}^{2}}{\mathbf{x}\_{k}^{2}} + \frac{2\mathbf{x}\_{k+1}}{\mathbf{x}\_{k}}\mathbf{s} + 1\right)},\tag{19}$$

with optimization variables

$$k>0; \left\{ \stackrel{\circ}{T}\_i \in \left[ \frac{1}{\overline{\omega}}, \frac{1}{\underline{\omega}} \right] \right\}, i \in \overline{2 : n\_1}; \quad \left\{ \stackrel{\circ}{T}\_i \in \left[ \frac{1}{\overline{\omega}}, \frac{1}{\underline{\omega}} \right] \right\}, i \in \overline{n\_2 + 1 : n\_3}; \tag{20a}$$

$$\left\{ \left( \stackrel{\circ}{\zeta}\_i \in (0,1), \stackrel{\circ}{\omega}\_{n,i+1} \in [\underline{\omega}\vartriangleleft \overline{\omega}] \right) \right\}\!\!/\!i \in \overline{n\_1 + 1:2:n\_2}\!\!/\! \tag{20b}$$

$$\{ \left( \zeta\_i^{\epsilon} \in (0, 1), \widehat{\omega}\_{n, i+1} \in [\underline{\omega}, \overline{\omega}] \right) \}, i \in \overline{n\_3 + 1 : 2 : n\_4}. \tag{20c}$$

The cost functional found to provide good results for most initial particle swarms is

$$J\_{\Omega, \mathcal{W}\_{\text{exp}}}(\mathcal{W}\_{\text{x}}) = \sum\_{k=1}^{N} \left| |\mathcal{W}\_{\text{exp}}(j\omega\_{k})|^{\text{dB}} - |\mathcal{W}\_{\text{x}}(j\omega\_{k})|^{\text{dB}} \right| \cdot \boldsymbol{\mathcal{op}}\_{\text{N}}(k) + \sum\_{|\mathcal{W}\_{\text{x}}(j\omega\_{k})| < |\mathcal{W}\_{\text{exp}}(j\omega\_{k})|} \lambda\_{\text{e}} \tag{21}$$

where *<sup>ϕ</sup><sup>N</sup>* : {1, 2, . . . , *<sup>N</sup>*} <sup>→</sup> <sup>R</sup><sup>+</sup> from the first sum is a windowing function, based on the Gaussian window function, meant to amplify the penalization for low- and high-frequency components, while the second sum adds a high-cost term *λ* = 10<sup>9</sup> for each frequency point *jω<sup>k</sup>* for which the candidate function *Wx* is below the experimental reference uncertainty weight *Wexp*. The windowing function considered is defined by

$$\varphi\_N(k) = \left( 3 - 2 \cdot w\_N\left(k - \frac{N+1}{2}\right) \right)^2,\tag{22}$$

with the Gaussian function *wN* : <sup>R</sup> <sup>→</sup> <sup>R</sup><sup>+</sup> and value *<sup>α</sup>* <sup>=</sup> 2.5:

$$w\_N(\mathbf{x}) = e^{-\frac{1}{2}\left(\mathbf{a}\frac{\mathbf{x}}{(N-1)/2}\right)^2} = e^{-\frac{\mathbf{x}^2}{2\sigma^2}} \iff \log w\_N(\mathbf{x}) = -\frac{1}{2}\left(\mathbf{a}\frac{\mathbf{x}}{(N-1)/2}\right)^2 = -\frac{\mathbf{x}^2}{2\sigma^2}.\tag{23}$$

The cost functional *J*(*Wx*) is configurable, such that a different windowing function may be provided, or that the difference between *Wexp* and *Wx* in the integral may be considered in absolute magnitude values instead of decibels. An alternative formulation of this minimization problem would be to use a GA, where the optimization variable **x** = *Wx*(*s*) could mutate in order to obtain different transfer function structures: add or remove real poles and zeros or, also, complex conjugate pole and zero pairs.

This functionality is implemented in the class UncertaintyBoundOptimizationProblem, using the methods getTransferFunctionCandidate for Equation (19), computeCandidate-Fitness and fitnessIntegral for Equation (21) based on the magnitudes of |*Wexp*(*jω*)| and |*Wx*(*jω*)| for *ω* ∈ Ω from Equation (18) and optimize to use the PSO algorithm to compute the best candidate transfer function *Wx*,*optim*(*s*). The plot function has been overloaded to facilitate seeing the fitness function values in real-time and, moreover, the Bode plot for the best candidate *Wx*(*s*) compared to the experimental data *Wexp*(*s*).

#### *2.6. Robust Synthesis and Closed Loop Validation*

Classical solutions to the H2/H<sup>∞</sup> problems are presented in [20–24] and others. The control problem is typically formulated for the nominal plant using the generalized framework depicted in Figure 5a.

**Figure 5.** (**a**) Generalized plant framework; (**b**) generalized plant framework with uncertainties.

This generalized plant is obtained by augmenting the physical process model with a set of mathematical signals which aid the optimization procedure and has the following structure:

$$
\begin{pmatrix} \mathbf{z}(t) \\ \mathbf{y}(t) \end{pmatrix} = \begin{pmatrix} P\_{11} & P\_{12} \\ P\_{21} & P\_{22} \end{pmatrix} \begin{pmatrix} \mathbf{w}(t) \\ \mathbf{u}(t) \end{pmatrix}, \quad \text{with} \quad \begin{pmatrix} P\_{11} & P\_{12} \\ P\_{21} & P\_{22} \end{pmatrix} = \begin{pmatrix} A & B\_1 & B\_2 \\ \hline \mathbb{C}\_1 & D\_{11} & D\_{12} \\ \mathbb{C}\_2 & D\_{21} & D\_{22} \end{pmatrix}, \tag{24}
$$

where **<sup>w</sup>** <sup>∈</sup> <sup>R</sup>*nw* is the exogenous input vector, **<sup>u</sup>** <sup>∈</sup> <sup>R</sup>*nu* is the control input vector, **<sup>z</sup>** <sup>∈</sup> <sup>R</sup>*nz* is the error (output, performance) vector, and **<sup>y</sup>** <sup>∈</sup> <sup>R</sup>*ny* is the measurement vector. The closed loop system is given by the LLFT interconnection of *P* and *K*:

$$P\_{\mathbf{zw}} = \text{LLFT}(P, \mathbf{K}) = P\_{11} + P\_{12}\mathbf{K}(I - P\_{22}\mathbf{K})^{-1}P\_{21} \tag{25}$$

For the nominal plant, the target of the robust control problem is to minimize the H<sup>∞</sup> norm using a stabilizing controller *K*, which can be written as

$$\min\_{K \text{ stat.}} \|P\_{\mathbf{zw}}\|\_{\infty} = \min\_{K \text{ stat.}} \sup\_{\omega \in \mathbb{R}^+} \overline{\sigma}(P\_{\mathbf{zw}}(j\omega)),\tag{26}$$

obtaining a (sub)optimal value *γ* by iteration, which minimizes the effects of the input vector **w**(*t*) as seen through the performance output vector **z**(*t*).

However, this problem ensures only nominal stability and nominal performance. However, the plant is a model of a physical process, having uncertainties. There are two types of uncertainties: unstructured, which illustrates neglected and unmodelled dynamics and which are represented by a full block <sup>Δ</sup> <sup>∈</sup> <sup>R</sup>*m*×*m*, and parametric, which are represented by *δI*, where *δ* is the maximum bound of the variable parameter. In a mixed-scenario, the following set is considered:

$$\Delta = \left\{ \Delta = \text{diag}\left(\delta\_1 I\_{\mathbb{H}\_1}, \dots, \delta\_\delta I\_{\mathbb{H}\_\delta}, \Delta\_1, \dots, \Delta\_f \right) \middle| \delta\_k \in \mathbb{R}, \ \Delta\_j \in \mathbb{R}^{\mathfrak{m}\_j \times \mathfrak{m}\_j}, \ k = \overline{1, s}, \ j = \overline{1, f} \right\}. \tag{27}$$

In Figure 5b, the closed loop system containing a LLFT connection between plant *P* and controller *K* and an ULFT connection between plant *P* and uncertainty block Δ is presented. In this case, the generalized plant contains one extra input vector, i.e., disturbance inputs **<sup>d</sup>** <sup>∈</sup> <sup>R</sup>*nd* , and one extra output vector, i.e., disturbance outputs **<sup>v</sup>** <sup>∈</sup> <sup>R</sup>*nv* , giving the following structure:

$$P\_{\Delta}(\mathbf{s}) = \begin{pmatrix} P\_{\text{vd}}(\mathbf{s}) & P\_{\text{vw}}(\mathbf{s}) & P\_{\text{vu}}(\mathbf{s}) \\ P\_{zd}(\mathbf{s}) & P\_{zw}(\mathbf{s}) & P\_{zu}(\mathbf{s}) \\ P\_{yd}(\mathbf{s}) & P\_{\text{yw}}(\mathbf{s}) & P\_{\text{yu}}(\mathbf{s}) \end{pmatrix} \Leftrightarrow P\_{\Delta} : \begin{pmatrix} \dot{\mathbf{x}}(t) \\ \mathbf{v}(t) \\ \mathbf{z}(t) \\ \mathbf{y}(t) \end{pmatrix} = \begin{pmatrix} A & \| & B\_{d} & B\_{w} & B\_{u} \end{pmatrix} \begin{pmatrix} \mathbf{x}(t) \\ \mathbf{d}(t) \\ \mathbf{C}\_{z} \\ \mathbf{C}\_{y} & D\_{zd} & D\_{zw} \end{pmatrix} \begin{pmatrix} \mathbf{x}(t) \\ \mathbf{d}(t) \\ \mathbf{w}(t) \\ \mathbf{u}(t) \end{pmatrix}. \tag{28}$$

A mathematical tool used for studying the robustness is the *structured singular value*, defined for a square matrix *<sup>M</sup>* <sup>∈</sup> <sup>C</sup>*N*×*<sup>N</sup>* with respect to the set **<sup>Δ</sup>** as

$$\mu\_{\Delta}(M) = \frac{1}{\min\_{\Delta \in \Delta} \{ \overline{\sigma}(\Delta) | \det(I - M\Delta) = 0 \}},\tag{29}$$

if there exists Δ ∈ **Δ** such that the matrix *I* − *M*Δ is rank deficient; otherwise, it is 0. For the system presented in Figure 5b, the structured singular value of LLFT(*P*, *K*), according to Δ, can be defined as

$$\mu\_{\Delta}(\text{LLFT}(P,K)(s)) = \sup\_{\omega \in \mathbb{R}\_+} \mu\_{\Delta}(\text{LLFT}(P,K)(j\omega)).\tag{30}$$

Besides the classical H2/H<sup>∞</sup> techniques, the *μ* synthesis framework manages to design a controller that meets the robust stability and robust performance specifications. The robust stability implies that a certain controller manages to stabilize all processes described by the upper linear fractional transformation between plant and uncertainty block, while the robust performance means that the controller is able to impose the desired closed loop performance in the worst-case scenario. Based on the main loop theorem, a controller *K* meets the robust stability and robust performance if and only if the structural singular value of the lower linear fractional transformation with respect to **Δ** is smaller than 1. Therefore, the minimization problem can be written as

$$\inf\_{\mathcal{K}\text{ stable}} \sup\_{\omega\in\mathbb{R}\_{+}} \mu\_{\mathbf{A}}(\text{LLF}(P,\mathcal{K})(j\omega)),\tag{31}$$

which is not a convex problem. Additionally, the structural singular values are difficult to be explicitly computed. In order to solve this problem, the following upper bound is used [25]:

$$\mu\_{\Delta}(\text{LLFT}(P,K)(j\omega)) \le \inf\_{D \in \mathcal{D}} \overline{\sigma}(D \cdot \text{LLFT}(P,K)(j\omega) \cdot D^{-1}),\tag{32}$$

where the set *D* is defined in relation to the uncertainty set **Δ** as

$$D = \left\{ \text{diag}\left(D\_1, \dots, D\_5, d\_1 l\_{\mathfrak{m}\_1}, \dots, d\_f l\_{\mathfrak{m}\_f}\right) \middle| D\_k = D\_k^\top \in \mathbb{R}^{n\_k \times n\_k}, \, d\_j > 0, \, k = \overline{1, s}, \, j = \overline{1, f} \right\}. \tag{33}$$

Now, using this bound, the solution of the initial non-convex problem can be practically approximated by solving the following quasi-convex problem:

$$\inf\_{\mathcal{K}\text{ stab.}} \sup\_{\omega\in\overline{\mathbb{R}}\_{+}} \inf\_{D\in\mathcal{D}} \overline{\sigma} \Big( D(j\omega) \cdot \text{LLFT}(P,\mathcal{K})(j\omega) \cdot (D(j\omega))^{-1} \Big). \tag{34}$$

Finally, if the system *D* is fixed, the problem (34) is nothing but a H<sup>∞</sup> control problem, in this case called the *K* step. Furthermore, for a fixed controller *K*, the *D* scale step can be obtained by solving a Parrot problem for a desired set of frequencies Ω = {*ω*1, ... , *ωN*} using a LMI and then obtain a minimum phase system after performing an identification step. Using these, an iterative algorithm, based on alternative *D-K* iterations, manages to solve the *μ* synthesis problem. This procedure starts with *D* = *I* and successively applies a *K* step and a *D* scaling step until a stopping criterion is reached.

Of great use in the controller design phase are the sensitivity, complementary sensitivity, and control effort functions, respectively, defined by

$$S := (I + GK)^{-1};\tag{35a}$$

$$T := \mathcal{G}K(I + \mathcal{G}\mathcal{K})^{-1};\tag{35b}$$

$$\mathcal{R} := \mathcal{K}(I + \mathcal{G}\mathcal{K})^{-1} = \mathcal{K}\mathcal{S},\tag{35c}$$

where *G* is the open loop model. The great advantage of considering this approach is that it allows sculpting the relevant loop functions to impose steady-state and transitory regime performances, which are specified for different frequency ranges, using adequately selected weighting functions. Besides the minimization from Equation (34), different constraints can be added to the optimization problem to obtain a compromise between *S*, *KS*, and *T* at various frequencies:

$$\inf\_{\mathcal{K}\text{ stab.}} \sup\_{\omega\in\mathbb{R}\_{+}} \inf\_{D\in\mathcal{D}} \overline{\sigma} \Big( D(j\omega) \cdot \text{LLFT}(P,\mathcal{K})(j\omega) \cdot (D(j\omega))^{-1} \Big),\tag{36a}$$

$$\text{such that } \left\| \begin{pmatrix} \mathcal{W}\_S S & \mathcal{W}\_T T & \mathcal{W}\_{KS} K S \end{pmatrix}^T \right\|\_{\infty} < 1,\tag{36b}$$

also known as the mixed-sensitivity closed loop shaping *μ* synthesis method. The approach considered in this first iteration of the toolbox uses closed loop shaping with *μ* synthesis for the controller. Using the work in [26] as a starting point, different frequency response specifications, directly correlated with desired time-response performances, can be imposed in the weighting functions. The sensitivity weighting function *WS* depends on four parameters as in

$$W\_S(s) = \left(\frac{\frac{1}{M^{1/n}}s + \omega\_B}{s + \omega\_B A^{1/n}}\right)^n \,\,\,\,\tag{37}$$

where *ω<sup>B</sup>* represents the imposed bandwidth of the system; *M* imposes the H<sup>∞</sup> norm of the sensitivity function, in order to limit the overshoot of the system; *n* imposes the slope of the sensitivity function for low frequencies; and *A* imposes the maximum allowed steady-state error.

On the other hand, the complementary sensitivity weighting function *WT* can be generally defined by the following structure, in a *symmetrical* manner compared to *WS*:

$$\mathcal{W}\_{T}(\mathbf{s}) = \left(\frac{\mathbf{s} + \omega\_{\mathrm{BT}}}{A\_{T}^{1/n}\mathbf{s} + \omega\_{\mathrm{BT}}M\_{T}^{1/n}}\right)^{n} \text{ \textit{\textsuperscript{\rm T}}} \tag{38}$$

with *ωBT* being the imposed bandwidth of the system; *MT* imposes the H<sup>∞</sup> norm of *T*(*s*); *n* imposes the roll-off slope of the closed loop system, which should be directly coupled with sensor noise characteristics; and *AT* imposes the least required attenuation for high frequencies. In practice, the complementary sensitivity bandwidth *ωBT* can be adapted to the characteristics of the sensor in order to account for high-frequency noise.

Finally, the control effort weighting function with desired specifications *M*<sup>0</sup> := |*WKS*(0)|, *M*<sup>∞</sup> := |*WKS*(∞)| and |*WKS*(*j* · *ωd*)| = *Md*, *M*<sup>0</sup> < *Md* < *M*<sup>∞</sup> can be synthesized by the following formula:

$$\mathcal{W}\_{\rm KS}(s) = \frac{M\_{\infty}s + M\_0\omega\_d\sqrt{\frac{M\_{\infty}^2 - M\_d^2}{M\_d^2 - M\_0^2}}}{s + \omega\_d\sqrt{\frac{M\_{\infty}^2 - M\_d^2}{M\_d^2 - M\_0^2}}}. \tag{39}$$

A higher-order counterpart can be generalized as for the previous cases, but was not found necessary for the proposed case studies and other tested benchmark plants.

Class RobustControlSynthesisProblem uses the nominal linearized plant around a required operating point using the system (14) and options (11)–(13), with a specified uncertainty type from Table 1, modeled through class UncertaintyBoundOptimization-Problem, allows imposing closed loop performance specifications with frequency weights (37)–(39), and synthesizes controller solutions for the problem (36) which cover the robust stability and robust performance problems. Additionally, the class also allows controller postprocessing, using order-reduction methods to compute easily implementable controllers. The aforementioned controller synthesis problem is illustrated in Figure 6, while the resulting LTI controller can be used in a MiL simulation context using the interface from class LTIEqSystem, encompassing system (3).

**Figure 6.** Robust controller synthesis diagram for the plant *G*, with the uncertainty set Δ determined a priori using the functionality from Section 2.5, linearized at the operating point (**u**0, **x**0, **y**0); by convention, control inputs Δ**u***<sup>c</sup>* of the linearized plant *G* are indexed after disturbance inputs Δ**u***d*.

Class ClosedLoopControlProblem gathers all data, options, computations, and results from the previously presented individual blocks. It is used to define the end-to-end control problem by aggregating the uncertain plant family with its corresponding least conservative bound optimization; the robust control synthesis procedure and metadata; and allows Model-in-the-Loop simulations with the nonlinear, linearized, and hybrid system models, with automatic validation of imposed performances for the nonlinear plant in the frequency and time-domain alike.

#### **3. Results**

To showcase the ease of use and functionalities of the proposed toolbox, a set of case studies will be illustrated for DC-to-DC power converter circuits in a unified manner to encompass modeling, control synthesis and performance validation, considering the topologies buck, boost, and single-ended primary-inductor converter (SEPIC). DC-to-DC converters have been considered as a case study due to their ubiquity in various practical domains and applications, as presented in [27], ranging from renewable energy, hybrid and electric vehicles, controlled power sources, and many more. They can be seen as a good benchmark for control systems, due to their switching behavior, nonlinear dynamics, and different tried and tested control methods, such robust techniques in [28], Lyapunov methods in [29], passivity theory in [30], or sliding mode control as in [31].

This section will be split in a subsection which presents the converter mathematical models, a subsection with a suggested workflow for a general purpose control problem, followed by a subsection with numerical results and simulations for each of the studied converter topologies. For the SEPIC converter, having the most highly nonlinear behavior, thus being more difficult to control, we will illustrate and detail all plots generated by the toolbox, while for the buck and boost circuits, for brevity, we will show only the relevant figures and maintain the mathematical results and discussions.

#### *3.1. Mathematical Modeling*

The nonideal step-down (buck), step-up (boost), and single-ended primary-inductor converter (SEPIC) circuits are presented in Figure 7, where each component is described as follows.

**Figure 7.** DC-to-DC power converter circuit topologies considered in the case studies: step-down (buck), step-up (boost), and single-ended primary-inductor (SEPIC).


Each converter has one control switching device *S*1, while the other one, *S*2, will be complementary to the former. Although, typically *S*<sup>2</sup> is a diode, it is preferable to use two encapsulated transistors for *S*<sup>1</sup> and *S*2. When working in continuous conduction mode (CCM), all converters will have an *ON* state, corresponding to *S*<sup>1</sup> being on and *S*<sup>2</sup> off, along with an *OFF* state, for its complementary behavior. The corresponding LTI models, for a constant load resistance *R*, for the *ON* and *OFF* states will be presented using the following structure with the external voltage seen as disturbance input *u*(*t*) = *E*(*t*), the voltage drops *VF*<sup>1</sup> and *VF*<sup>2</sup> as constant DC inputs, states from the inductor currents and capacitor voltages, and the load resistor voltage as measured output:

$$
\left(\begin{array}{c|c} A & \overline{B} \\ \hline \mathcal{C} & \overline{D} \end{array}\right) = \left(\begin{array}{c|c} A & B \ \vdots \ B\_V \\ \hline \mathcal{C} & D \ \vdots \ D\_V \end{array}\right), \tag{40}
$$

where:

$$\begin{cases}
\dot{\mathbf{x}} = A\_{ON}\mathbf{x} + B\_{ON}E + B\_{V,ON} \begin{bmatrix} V\_{\text{F1}}V\_{\text{F2}} \end{bmatrix}; \quad \begin{cases}
\dot{\mathbf{x}} = A\_{OFF}\mathbf{x} + B\_{OFF}E + B\_{V,OFF} \begin{bmatrix} V\_{\text{F1}}V\_{\text{F2}} \end{bmatrix}; \\
\mathbf{y} = \mathbf{C}\_{ON}\mathbf{x} + D\_{ON}E + D\_{V,ON} \begin{bmatrix} V\_{\text{F1}}V\_{\text{F2}} \end{bmatrix}; \quad \begin{cases} \dot{\mathbf{y}} = A\_{OFF}\mathbf{x} + D\_{OFF}E + D\_{V,OFF} \begin{bmatrix} V\_{\text{F1}}V\_{\text{F2}} \end{bmatrix}. \end{cases} \end{cases} \tag{41}$$

The control variable is the duty cycle of the switching devices *μ*(*t*) ∈ [0, 1]. Using a convex combination of the *ON* and *OFF* equation systems from Equation (41), an averaged state-space nonlinear model of the process is obtained close to the hybrid model's behavior given a sufficiently high PWM frequency:

$$\dot{\mathbf{x}}(t) = \mu(t) \cdot \mathbf{x}\_{\rm ON}(t) + (1 - \mu(t)) \cdot \mathbf{x}\_{\rm OFF}(t) \equiv F\left(\mathbf{x}(t), [E(t), \mathbb{R}(t), \mu(t)]^T, t\right). \tag{42}$$

As such, an affine nonlinear system, with respect to *μ*, with the state function *F* as above can be implemented by inheriting the class System from the toolbox. The disturbances which affect the system are the voltage source *E* and variable output load *R*, which are stochastic in nature, along with uncertainties of its components due to manufacturing tolerances, relevant on inductors and capacitors. As the toolbox easily allows using the output capacitor voltage or output load voltage with minor modifications, we used the resistor voltage as measurement variable due to its corresponding practical control use cases. By inheriting the class UncertainPlantFactory, a set of tolerances can be imposed on all relevant circuit parameters and, also, an LTI uncertain set can be automatically computed with the provided mechanisms. The equilibrium point will have only the steady-state values of *E*, *R*, and *uR* imposed, with the following structure:

$$(\overline{\mathbf{u}}, \overline{\mathbf{x}}, \overline{\mathbf{y}}) = \left( [\overline{E}, \overline{\mathbb{R}}, \overline{\mu}], [\overline{i}\_{L\_1}, \overline{u}\_{\mathbb{C}1'}, \dots], \overline{u}\_{\mathbb{R}}) \right. \tag{43}$$

After synthesizing a robust controller, model-in-the-loop simulations would be desired for the averaged state-space models and, also, for a hybrid model description of the converters. For the hybrid approach, the class UncertainPlantFactory is inherited again, this time with individual plants of type HybridSystem. For the general approach for CCM, based on the structure from Equation (4), the input vector is comprised of **u** = [*E*, *R*, *μ*] *<sup>T</sup>*, the state vector is extended to **x** := **z***T*, *q*, *τ T* , with **z** = *iL*<sup>1</sup> , *uC*<sup>1</sup> ,...*<sup>T</sup>* being the physical continuous states; *q* ∈ {0, 1} the discrete state number, i.e., *ON* and *OFF*; and *τ* ∈ [0, *TPWM*) the time values for a single PWM period. After each PWM period completion, the auxiliary time state *τ* is reinitialized to 0. The model description becomes, for the state-space description

$$\begin{cases} \begin{bmatrix} \dot{\mathbf{z}}(t) \\ \dot{q}(t) \\ \dot{\tau}(t) \end{bmatrix} = \begin{bmatrix} (1-q) \cdot \left( A\_{ON} \mathbf{z}(t) + \overline{B}\_{ON} \mathbf{u}(t) \right) + q \cdot \left( A\_{OFF} \mathbf{z}(t) + \overline{B}\_{OFF} \mathbf{u}(t) \right) \\ 0 \\ 1 \end{bmatrix}, \ (\mathbf{x}, \mathbf{u}, t) \in \mathcal{C}; \tag{44a}$$
 
$$\begin{cases} \mathbf{z}^{+}(t) \\ q^{+}(t) \\ \tau^{+}(t) \end{bmatrix} = \begin{bmatrix} \mathbf{z}(t) \\ 0, \text{ if } q = 0 \\ \begin{bmatrix} 0, \text{ if } q = 1 \\ \end{bmatrix}, \ (\mathbf{x}, \mathbf{u}, t) \in \mathcal{D}, \\ \begin{bmatrix} \tau, \text{ if } q = 0 \\ 0, \text{ if } q = 1 \end{bmatrix} \end{cases} \tag{44b}$$

while the flow, jump, and output functions are

$$\begin{cases} \mathcal{C}(\mathbf{x}, \mathbf{u}, t) = \{ ((q == = 0) \land (\tau \le \mu(t) \cdot T\_{\text{PWM}})) \lor ((q == = 1) \land (\tau > \mu(t) \cdot T\_{\text{PWM}})) \}; & \text{(45a)}\\ \mathcal{D}(\mathbf{x}, \mathbf{u}, t) = \{ ((q == = 0) \land (\tau > \mu(t) \cdot T\_{\text{PWM}})) \lor ((q == = 1) \land (\tau > T\_{\text{PWM}})) \}; & \text{(45b)}\\ \mathbf{y}(t) = h(\mathbf{x}(t), \mathbf{u}(t), t). & \end{cases} \tag{45c}$$

In order to encompass DCM regimes, the number of discrete states must be extended with new LTI blocks obtained by adding the mathematical constraint of canceling the diode *S*<sup>2</sup> voltage and, as such, the corresponding current signal for that branch, along with more sophisticated jump functions, flow and jump sets. For brevity, we will not insist on these extensions, although an example described for the boost converter can be found in [32].

#### *3.2. Toolbox Workflow*

A suggested end-to-end workflow for the toolbox can be summarized in the following steps, all of which should be run from intermediary methods of an instance of class ClosedLoopControlProblem:


#### *3.3. Numerical Results*

We will briefly present the obtained results for the three converters using the approaches established in Sections 3.1 and 3.2.

#### 3.3.1. SEPIC Converter

The SEPIC converter state-space model for the *ON* state of switch *S*1, as structured in Equation (41), is

$$\begin{pmatrix} -\frac{1}{r\_{\text{in}}^{\prime}\cdot\text{C}\_{\text{in}}} & 0 & 0 & 0 & 0\\ \frac{1}{L\_{1}} & -\frac{r\_{\text{C}\_{\text{in}}} + r\_{\text{L}\_{1}} + r\_{\text{DS}\_{1}}}{L\_{1}} & 0 & \frac{r\_{\text{DS}\_{2}}}{L\_{1}} & 0\\ 0 & 0 & 0 & \frac{1}{L\_{1}} & 0\\ 0 & -\frac{r\_{\text{DS}\_{1}}}{L\_{2}} & -\frac{1}{L\_{2}} & -\frac{r\_{\text{DS}\_{1}} + r\_{\text{C}\_{1}} + r\_{\text{L}\_{2}}}{L\_{2}} & 0\\ 0 & 0 & 0 & 0 & -\frac{1}{(R + r\_{\text{C}\_{2}})\text{C}\_{2}}\\ \hline \\ 0 & 0 & 0 & 0 & \frac{R}{R + r\_{\text{C}\_{2}}} & 0 & \vdots\\ \hline \end{pmatrix},\tag{46}$$

while for the *OFF* state of the switch *S*<sup>1</sup> is


with the auxiliary notation *raux* = *rL*<sup>1</sup> + *rC*<sup>1</sup> + *rDS*<sup>1</sup> + *rC*<sup>2</sup> + *rCin* .

The nominal SEPIC converter parameters and their tolerances are presented in Table 2.


**Table 2.** Single-ended primary-inductor converter (SEPIC) converter parameters, values, and corresponding tolerances.

The desired operating point specifications are output signal *y*(*t*) ≡ *uR*(*t*) is at 400 [V], with nominal voltage source and load inputs *u*1(*t*) = *E* = 300 [V], *u*2(*t*) = *R* = 80 [Ω]. The initial guesses for the state equilibrium values where <sup>1</sup>**<sup>x</sup>** = [30, 0.5, 30, <sup>−</sup>0.5, 30] and *<sup>u</sup>*3(*t*) = *<sup>μ</sup>* = 0.57 for the duty cycle control input. After computation, the actual equilibrium point is (**u**, **x**, **y**) = ([300, 80, 0.5788], [300, 6.8711, 297.722, −5, 400], 400).

An input multiplicative uncertainty model, i.e., *G*(*s*) = *Gn*(*s*)[1 + Δ(*s*)*Wunc*(*s*)], ||Δ||<sup>∞</sup> ≤ 1, as in Table 1 has been automatically computed from input *u*3(*t*) to output *y*1(*t*), with tolerances ±10 [V] and ±5 [Ω] for inputs *u*1(*t*) = *E* and *u*2(*t*) = *R*, based on 1000 Monte Carlo simulations. The relevant frequencies vary in the interval *ω* = 10<sup>−</sup>2, *ω* = 108 , with 300 equally distributed samples in log domain. A successful set of hyperparameters for the particle swarm optimization algorithm is comprised of a swarm size of 1000, initial swarm span of 104, minimum neighbors fraction of 0.9, and inertia range of [0.1, 1.1], for a transfer function structure as in Equation (19), with a complex pole pair and a complex zero pair, resulting in

$$\mathcal{W}\_{unc}(s) = \frac{0.67275 \left(s^2 + 941.1s + 2.222 \times 10^5\right)}{s^2 + 147.3s + 5.422 \times 10^7}.\tag{48}$$

The linearized SEPIC plant family is comprised of fourth-order stable systems, in minimal form, with four zeros, three of which are of nonminimum phase. The nominal model is

$$G\_n(s) = 4.1368 \frac{(s + 8.003 \text{e} + 5)(-s + 2.304 \text{e} + 4)(s^2 - 717.4 \text{s} + 5.145 \text{e} + 7)}{(s^2 + 2673 \text{s} + 3.749 \text{e} + 7)(s^2 + 1339 \text{s} + 6.493 \text{e} + 7)}. \tag{49}$$

The entire uncertainty family has the same structure with poles, zeros, and equilibrium points in the vicinity of the nominal counterparts. The uncertain SEPIC plant family structure and behavior, along with the PSO conservative bound computation are illustrated in Figure 8. Figure 8-1 illustrates the pole-zero plot for the linearized uncertain SEPIC converter family, Figure 8-2 shows the best particle frequency-response fit *Wx*(*s*) as in Equation (19) on the right *y* axis, and, also, the best functional fit on the left *y* axis, Figure 8-3 and 8-4 show the frequency response of the plant *G*(*s*) family and uncertainty family Δ(*s*)*Wunc*(*s*), respectively, while Figure 8-5 illustrates the system states and outputs for a 2% step disturbance relative to the equilibrium input value *μ*<sup>0</sup> = 0.5788.

**Figure 8.** SEPIC multiplicative uncertainty set computation and open loop responses for the operating point with *E* = 300[*V*], *R* = 80[Ω], *UR* = 400[*V*]: step and frequency response, pole-zero placement; the step response is simulated for nonlinear plants sampled using UncertainPlantFactory.

For controller synthesis, the preferred loop shaping specifications were selected to highly penalize the control effort near the system resonance, as the obtained controllers would be difficult to implement in practice, needing high sampling frequencies, i.e., *fe* > 20 [kHz]. As such, for the sensitivity function: *ω<sup>B</sup>* = 200 [rad/s], *A* = 10<sup>−</sup>2, *M* = 2, *n* = 1; for the complementary sensitivity function: *ωBT* = 2000 [rad/s], *AT* = 10−4, *MT* = 2, *<sup>n</sup>* = 2; and for the control effort *<sup>M</sup>*<sup>0</sup> = 100, *<sup>M</sup>*<sup>∞</sup> = 105, |*WKS*(*<sup>j</sup>* · <sup>200</sup>)| = 250, resulting in

$$\mathcal{W}\_{\rm S}(\mathbf{s}) = \frac{0.5\mathbf{s} + 200}{\mathbf{s} + 2},\\\mathcal{W}\_{\rm T}(\mathbf{s}) = \frac{\mathbf{s}^2 + 4000\mathbf{s} + 4 \times 10^6}{1 \times 10^{-4} \mathbf{s}^2 + 56.57\mathbf{s} + 8 \times 10^6},\\\mathcal{W}\_{\rm KS}(\mathbf{s}) = \frac{10^5 \mathbf{s} + 8.729 \times 10^6}{\mathbf{s} + 8.729 \times 10^4}.\tag{50}$$

From the *μ* synthesis procedure, a controller of order 21 is obtained. After order reduction, the smallest controller which manages to assure all imposed specifications for the plant family, with a peak value *μ***Δ**(LLFT(*P*, *K*)) ≤ 0.8361 < 1, is given by the third-order system

$$K\_{red}^{SEPIC} = \begin{pmatrix} -1.997 & 3.056 & 3.227 & -0.5018 \\ -3.057 & -2197 & -6118 & \begin{vmatrix} -0.5018 \\ -0.3838 \\ \hline \end{vmatrix} & -0.3838 & \begin{vmatrix} -0.3838 \\ 0.4055 \\ \hline \end{vmatrix} \\ \hline \end{pmatrix} \tag{51}$$

The controller design phase, order reduction, and frequency response closed loop performance of the reduced-order one for the uncertain plant family are illustrated in Figures 9 and 10. In this case, the control system has very large stability margins, with a phase margin of ≈ 82.1[ ◦] and gain margin in the interval [19.4, 20.3] [dB]. Additionally, as specified by the *n* = 2 and *AT* = 10−<sup>4</sup> parameters of the complementary sensitivity weighting function, *WT*, the closed loop control system mitigates sensor noise signals with a considered spectrum starting from *ωBT* > 2000 [rad/s], using an initial roll-off of −40 [dB/dec], followed by an attenuation of at least four orders of magnitude. In the actual MiL simulations, the attenuation does not stop at the prescribed value, as the system manages to maintain at least a −20 [dB/dec] roll-off.

**Figure 9.** SEPIC-synthesized (order 21) vs. reduced (order 3) controllers; the peak *μ* value does not monotonically decrease with respect to controller order due to the influence of the ≈3750 [rad/s] notch over the converter resonance, which was not taken into account by the order reduction mechanism.

**Figure 10.** SEPIC open loop plant family with *S*, *T*, and *KS* functions using the reduced-order controller, which retains all imposed performance specifications for all test cases, provides high phase and gain margins, and guarantees closed loop response practically similar to that of a first-order low-pass filter; a relatively low bandwidth was imposed to compensate the SEPIC converter resonance and presence of multiple nonminimum phase zeros.

From Figure 11, the closed loop bandwidth can be observed as *ω<sup>B</sup>* > 200 [rad/s], equivalent to a rise time less than ≈5 [ms], a negligible steady-state error of ≈10−<sup>2</sup> × (*yss* − *y*0) = 0.2 [V], where *yss* represents the steady state value of the system, relative to the desired equilibrium value *y*0. Moreover, the system has no overshoot, and it behaves like a first-order low-pass filter by design. The nonlinear MiL simulation options are *N* = 50 random plants from the uncertainty set, solver is ode15i, due to the difficulty of simulating the closed loop plant otherwise (it is numerically unstable), with a step on the reference signal of 5% from its initial equilibrium value of approximately 400 [V] and a simulation time of 0.05 [s]. Almost the same conditions apply to the hybrid MiL simulation, with the solver switched to ode113, as ode15i is not supported here, and a PWM period selected randomly for each experiment from a nominal value *TPWM* = 17.5 [μs] with a ±20% fluctuation from one simulation to another. A comparison of the nonlinear and hybrid cases is presented also in Figure 11, where it can be seen that the transitory regime is practically identical, but for the hybrid case, a slightly lower command signal is necessary in steady state. Due to working with *uR*(*t*) instead of *uC*(*t*) only for the output signal, the current ripple is propagated into the measured voltage.

**Figure 11.** SEPIC-averaged state-space and hybrid model Monte Carlo closed loop simulations; due to a relatively low bandwidth imposed in order to obtain good stability margins and easily implementable controllers, all plants respond almost identically, although component tolerances reach values of ±20%; the initial transients exist due to starting the simulations from the nominal equilibrium point only.

#### 3.3.2. Buck Converter

The buck converter state-space models for the *ON* and *OFF* states of switch *S*1, respectively, as in Equation (41), are

$$\begin{pmatrix} -\frac{r\_p + r\_{DS\_1}}{L} & -\frac{R}{(R+r\_C)L} \\ \frac{R}{(R+r\_C)\mathbb{C}} & -\frac{1}{(R+r\_C)\mathbb{C}} \\ \frac{r\_C R}{R+r\_C} & \frac{R}{R+r\_C} & 0 \end{pmatrix} \begin{pmatrix} \frac{1}{L} & -\frac{1}{L} & 0 \\ 0 & 0 & 0 \\ \vdots & \vdots & 0 & 0 \end{pmatrix}; \quad \begin{pmatrix} -\frac{r\_p - r\_{DS\_2}}{L} & -\frac{R}{(R+r\_C)L} & 0 & 0 & -\frac{1}{L} \\ \frac{R}{(R+r\_C)\mathbb{C}} & -\frac{1}{(R+r\_C)\mathbb{C}} & 0 & 0 & 0 \\ \hline \frac{r\_c R}{R+r\_C} & \frac{R}{R+r\_C} & 0 & 0 & 0 \end{pmatrix}, \tag{52}$$

with the auxiliary notation *rp* = *rL* + *rCR <sup>R</sup>*+*rC* = *rL* + *rC*||*R*.

The nominal buck converter parameters and their tolerances are presented in Table 3.

**Table 3.** Buck and boost converter parameters, values, and corresponding tolerances.


The desired operating point specifications are as follows: the output signal *y*(*t*) ≡ *uR*(*t*) is at 5 [V], with nominal voltage source and load inputs *u*1(*t*) = *E* = 12 [V], *u*2(*t*) <sup>=</sup> *<sup>R</sup>* <sup>=</sup> <sup>15</sup> [Ω]. The initial guesses for the state equilibrium values where <sup>1</sup>**<sup>x</sup>** = [1.25, 5] and *u*3(*t*) = *μ* = 0.5 for the duty cycle control input. After computation, the actual equilibrium point is (**u**, **x**, **y**) = ([12, 15, 0.4335], [0.333, 4.999], 5).

An input multiplicative uncertainty model, i.e., *G*(*s*) = *Gn*(*s*)[1 + Δ(*s*)*Wunc*(*s*)], ||Δ||<sup>∞</sup> ≤ 1, as in Table 1, has been automatically computed from input *u*3(*t*) to output *y*1(*t*), with tolerances ±1 [V] and ±1 [Ω] for inputs *u*1(*t*) = *E* and *u*2(*t*) = *R*, respectively, based on 1000 Monte Carlo simulations. The relevant frequencies vary in the interval *ω* = 101, *ω* = 10<sup>7</sup> , with 200 equally distributed samples in log domain. A successful set of hyperparameters for the particle swarm optimization algorithm is comprised of a swarm size of 1000, initial swarm span of 104, minimum neighbors fraction of 0.9, and inertia range of [0.1, 1.1] for a transfer function structure as in Equation (19), with a real pole and a real zero, resulting in

$$\mathcal{W}\_{\rm unc}(\mathbf{s}) = \frac{0.51758(\mathbf{s} + 510.5)}{\mathbf{s} + 290\mathbf{6}}.\tag{53}$$

The linearized buck plant family is comprised of second-order stable systems, in minimal form, with one zero. The nominal model is

$$G\_{\rm tr}(s) = \frac{59178(s + 8333)}{s^2 + 5261s + 4.114 \times 10^7} \,\text{.}\tag{54}$$

The entire uncertainty family has the same structure with poles, zeros, and equilibrium points in the vicinity of the nominal counterparts. The uncertain buck plant family structure and behavior, along with the PSO conservative bound computation are illustrated in Figure 12.

**Figure 12.** Buck multiplicative uncertainty set computation and open loop responses for the operating point with *E* = 12[*V*], *R* = 15[Ω], *UR* = 5[*V*]: step and frequency response, pole-zero placement; the step response is simulated for nonlinear plants sampled using UncertainPlantFactory.

For controller synthesis, the weighting function specifications were for the sensitivity function *ω<sup>B</sup>* = 1200 [rad/s], *A* = 10−4, *M* = 2, *n* = 1; for the complementary sensitivity function *<sup>ω</sup>BT* = <sup>12</sup> × 103 [rad/s], *AT* = <sup>10</sup>−4, *MT* = 2, *<sup>n</sup>* = 2; and for the control effort *M*<sup>0</sup> = 0.1, *M*<sup>∞</sup> = 100, |*WKS*(*j* · 1200)| = 2, resulting in

$$\mathcal{W}\_{\rm S}(s) = \frac{0.5s + 1200}{s + 0.12},\\\mathcal{W}\_{\rm T}(s) = \frac{s^2 + 24000s + 1.44 \times 10^8}{1 \times 10^{-4}s^2 + 339.4s + 2.88 \times 10^8},\\\mathcal{W}\_{\rm KS}(s) = \frac{100s + 6006}{s + 6.006 \times 10^4}.\tag{55}$$

As specified by the *n* = 2 and *AT* = 10−<sup>4</sup> parameters of the complementary sensitivity weighting function, *WT*, the closed loop control system mitigates sensor noise signals with a considered spectrum starting from *ωBT* > 12,000 [rad/s], using an initial roll-off of −40 [dB/dec], followed by an attenuation of at least four orders of magnitude. From the *μ* synthesis, a controller of order 17 is obtained. After order reduction, the smallest controller which manages to assure all imposed specifications for the plant family, with a peak *μ***Δ**(LLFT(*P*, *K*)) ≤ 0.97 < 1, is

$$K\_{rd}^{Buck} = \begin{pmatrix} -0.12 & -0.003479 & -0.4751 & \vert & 12.68\\ -0.0001768 & -2.304 & -1.241 \times 10^4 & \vert & -0.1827\\ -0.4611 & 1.241 \times 10^4 & -4.522 \times 10^4 & 25.09\\ \hline 12.68 & 0.1838 & 25.09 & 0 \end{pmatrix} . \tag{56}$$

The nonlinear MiL simulation options are *N* = 50 random plants from the uncertainty set, with the ode23t solver, with a step on the reference signal of 5% from its initial equilibrium value of approximately 5 [V] and a simulation time of 0.02 [s]. The simulation conditions for the hybrid MiL case are identical, with an additional PWM period selected randomly for each experiment from a nominal value *TPWM* = 17.5 [μs] with a ±20% fluctuation from one simulation to another. A comparison of the nonlinear and hybrid cases is presented in Figure 13, where it can be seen that the transitory regime is practically

identical. Due to working with *uR*(*t*) instead of *uC*(*t*) only for the output signal, the current ripple is propagated into the measured voltage.

**Figure 13.** Buck averaged state-space and hybrid model Monte Carlo closed loop simulations with a closed loop bandwidth *ω<sup>B</sup>* > 1200 [rad/s], equivalent to a rise time of ≈0.83 [ms], negligible steady-state error, and no overshoot.

#### 3.3.3. Boost Converter

The boost converter state-space models for the *ON* and *OFF* states of switch *S*1, respectively, as in Equation (41), are

$$\begin{pmatrix} -\frac{r\_L + r\_{DS\_1}}{L} & 0\\ 0 & -\frac{1}{(R+r\_C)\mathbb{C}} \\ \hline 0 & \frac{R}{R+r\_C} & 0 \end{pmatrix}, \begin{pmatrix} \frac{1}{L} \vdots - \frac{1}{L} & 0\\ 0 \vdots & 0 & 0\\ \vdots & 0 & 0 \end{pmatrix}; \quad \begin{pmatrix} -\frac{r\_{\rm diff}}{L} & -\frac{R}{(R+r\_C)\mathbb{C}} & \left| \begin{array}{c} \frac{1}{L} \vdots & 0 & -\frac{1}{L}\\ 0 & 0 & 0 \end{array} \right|\\ \hline \frac{r\_C R}{R+r\_C} & \frac{R}{R+r\_C} & \left| \begin{array}{c} 0 \ \vdots \end{array} \right| \end{pmatrix}, \tag{57}$$

with the auxiliary notation *raux* <sup>=</sup> *rL* <sup>+</sup> *rDS*<sup>2</sup> <sup>+</sup> *rCR <sup>R</sup>*+*rC* = *rL* + *rDS*<sup>2</sup> + *rC*||*R*. The nominal boost converter parameters and their tolerances are presented in Table 3, as they correspond with the buck converter parameters.

The desired operating point specifications are as follows: the output signal *y*(*t*) ≡ *uR*(*t*) is at 24 [V], with nominal voltage source and load inputs *u*1(*t*) = *E* = 12 [V], *u*2(*t*) = *<sup>R</sup>* <sup>=</sup> <sup>15</sup> [Ω]. The initial guesses for the state equilibrium values where <sup>1</sup>**<sup>x</sup>** = [3, 24] and *u*3(*t*) = *μ* = 0.5 for the duty cycle control input. After computation, the actual equilibrium point is (**u**, **x**, **y**) = ([12, 15, 0.5179], [0.3189, 23.999], 24).

An input multiplicative uncertainty model, i.e., *G*(*s*) = *Gn*(*s*)[1 + Δ(*s*)*Wunc*(*s*)], ||Δ||<sup>∞</sup> ≤ 1, as in Table 1, has been automatically computed from input *u*3(*t*) to output *y*1(*t*), with tolerances ±1 [V] and ±1 [Ω] for inputs *u*1(*t*) = *E* and *u*2(*t*) = *R*, respectively, based on 1000 Monte Carlo simulations. The relevant frequencies vary in the interval *ω* = 101, *ω* = 10<sup>7</sup> , with 200 equally distributed samples in log domain. A successful set of hyperparameters for the particle swarm optimization algorithm is comprised of a swarm size of 1500, initial swarm span of 104, minimum neighbors fraction of 0.9, and inertia range of [0.1, 1.1] for a transfer function structure as in Equation (19), with two real poles and two real zeros, resulting in

$$\mathcal{W}\_{unc}(s) = \frac{0.26592(s + 512.5)\left(s + 3.535 \times 10^4\right)}{(s + 4016)(s + 1.389 \times 10^4)}.\tag{58}$$

The linearized boost plant family is comprised of second-order stable systems, in minimal form, with two zeros, one being of nonminimum phase. The nominal model is

$$G\_{\rm n}(s) = \frac{0.65505(-s + 8.551 \times 10^4)(s + 8333)}{s^2 + 2988s + 9.746 \times 10^6}.\tag{59}$$

The entire uncertainty family has the same structure with poles, zeros, and equilibrium points in the vicinity of the nominal counterparts. The uncertain boost plant family structure and behavior, along with the PSO least conservative second-order bound computation are illustrated in Figure 14.

**Figure 14.** Boost multiplicative uncertainty set computation and open loop responses for the operating point with *E* = 12[*V*], *R* = 15[Ω], *UR* = 24[*V*]: step and frequency response, pole-zero placement; the step response is simulated for nonlinear plants sampled using UncertainPlantFactory.

For controller synthesis, the weighting function specifications were for the sensitivity function *ω<sup>B</sup>* = 650 [rad/s], *A* = 10−4, *M* = 2, *n* = 1; for the complementary sensitivity function *ωBT* = 3250 [rad/s], *AT* = 10−4, *MT* = 2, *n* = 1; and for the control effort *M*<sup>0</sup> = 0.1, *M*<sup>∞</sup> = 100, |*WKS*(*j* · 650)| = 2, resulting in

$$W\_{\mathbb{S}}(s) = \frac{0.5s + 650}{s + 0.065}, \; W\_T(s) = \frac{s + 3250}{0.0001s + 6500}, \; W\_{\mathbb{KS}}(s) = \frac{100s + 3253}{s + 3.252 \times 10^4}.\tag{60}$$

An intrinsic limitation for the boost converter is that the bandwidth must not be imposed more than half of the value of the right-half plane non-minimum phase zero of the process, i.e., *<sup>ω</sup><sup>B</sup>* <sup>≤</sup> *<sup>z</sup>* <sup>2</sup> ≈ 43,000 [rad/s]. For this problem, this is a sufficiently high margin, as we also imposed a limitation for the command signal through *WKS*. As specified by the *n* = 2 and *AT* = 10−<sup>4</sup> parameters of the complementary sensitivity weighting function, *WT*, the closed loop control system mitigates sensor noise signals with a considered spectrum starting from *ωBT* > 3250 [rad/s], using an initial roll-off of −40 [dB/dec], followed by an attenuation of at least four orders of magnitude. From the *μ* synthesis, a controller of order 17 is obtained. After order reduction, the smallest controller which retains all imposed specifications for the plant family, with a peak value *μ***Δ**(LLFT(*P*, *K*)) ≤ 0.9547 < 1, is

$$K\_{\rm rad}^{\rm Bosot} = \begin{pmatrix} -0.065 & 0.8025 & -0.002966 & 5.007 \\ 0.7116 & -9.715 \times 10^4 & 1.066 \times 10^4 & -30.91 \\ 0.002575 & -1.065 \times 10^4 & -1.422 & -0.113 \\ \hline 5.007 & -30.91 & 0.1142 & 0 \end{pmatrix} \tag{61}$$

With this regulator, the boost converter control system with parameters from Table 3 has very large stability margins, with phase margins between [81, 101] [ ◦] and gain margins in the interval [40, 46] [dB]. The obtained sensitivity bandwidths vary between [828, 2510] [rad/s], all of them better than the prespecified value of 800.

Nonlinear MiL simulation options are *N* = 50 random plants from the uncertainty set, with the ode15i solver, with a step on the reference signal of 5% from its initial equilibrium value of approximately 5 [V] and a simulation time of 0.02 [s]. The simulation conditions for the hybrid MiL case are almost identical, with the use of the ode113 solver instead, set to a relative tolerance of 10<sup>−</sup>8, and with an additional PWM period selected randomly for each experiment from a nominal value *TPWM* = 17.5 [μs] with a ±20% fluctuation from one simulation to another. A comparison of the nonlinear and hybrid cases is presented in Figure 15, where it can be seen that the transitory regime is practically identical. Due to working with *uR*(*t*) instead of *uC*(*t*) only for the output signal, the current ripple is propagated into the measured voltage.

**Figure 15.** Boost averaged state-space and hybrid model Monte Carlo closed loop simulations with a closed loop bandwidth *ω<sup>B</sup>* > 650 [rad/s], equivalent to a rise time less than ≈1.53 [ms], negligible steady-state error and no overshoot.

#### **4. Conclusions and Future Work**

There are several aspects to be discussed with regards to the presented toolbox and, additionally, including future work to be implemented in upcoming iterations.

The main reason for which the hybrid system framework is considered for the proposed toolbox is that the continuous-time plant needs to be regulated with a numerical controller. The hybrid system context may include LTI or nonlinear systems, switching systems (which are hybrid by nature), and singular systems, represented using differential-algebraic equations (DAEs). As such, for a continuous-time plant, a continuous-time controller is designed using the robust control framework. The controller is required to be numerically implementable, therefore two interfaces are necessary, which lead to a hybrid system. The numerical implementation must be easily obtained and automatically validated using rapid control prototyping (RCP) techniques. However, the properties of the closed loop system need to be reanalyzed after the discretization of the controller. Differential-algebraic equations represent a useful framework for modeling dynamical systems in engineering with a network-based structure of components. They are used in various industry fields such as mechanics (e.g., multiple-link mobile manipulator model), chemical engineering (modeling of chemical reactions), electrical engineering, cyber-physical systems, etc. All categories of processes taken into consideration in the hybrid framework are described using an approximate model that incorporates their relevant behavior. However, these types of systems have model and structure uncertainties. Moreover, the nonlinear systems that are linearized around an equilibrium point introduce such uncertainties as well. Therefore, to consider these uncertainties for the controller design, the robust control framework is mandatory. The first main applicability of RCP was to derive the necessary C/C++ source code with drivers for a given target microprocessor, and to simulate in reproducible conditions the behavior of a complex system. For the latter case, the most relevant simulation types, given in increasing order of complexity and closeness to reality, are Model-in-the-Loop (MiL), Software-in-the-Loop (SiL), and Hardware-in-the-Loop (HiL).

Many modeling software programs return circuits or mechanical systems already in DAE form, and it would be difficult, or sometimes impossible, to reformulate them in an ODE form without changing variables and losing their intended physical significance. In the context of the robust control framework used for DAEs, a significant work is the monograph in [33]. Although the robust control theory was well formulated in the previous years, this is still an open domain for research and publication, as surveyed and described in [34]. The difficulty of using methods which work correctly for multiple operating points is mitigated by using adaptive methods, such as gain scheduling for tracking problems. Furthermore, other relevant problems are automatic C/C++ code generation for controller implementation and the commutation between the prescribed operating points. Considering use cases for modeling, simulation, computer-aided design, and RCP, a relevant set of examples in the domain of power electronics, hybrid vehicles, and renewable energy systems is given in [35,36], where, although the main limitation is that analysis, control, and implementation aspects must be performed individually for the presented applications, they can be generally included under the same software framework, with

the important exception of the robust control design and verification, along with the quantization sensitivity analysis in a unitary manner.

The main hindrance is that the majority of applications involve DAE systems of index greater than 1, meaning they necessitate more than one derivation step in order to formulate the problem, so there is a great need of tools that can also deal with high order DAEs, i.e., index 2 or 3 [37–39]. Another reason for the proposal of considering DAEs model is that they are also explicitly related to control issues, regarding both physical and operational constraints. Two illustrative examples are the case of improper systems, such as an ideal PID controller, and the elements that realize the decoupling in the MIMO systems case and when the plant has impulsive dynamics. The robust control techniques' drawback is that the closed loop H2/H<sup>∞</sup> norm must be minimized using the prescribed weighting functions that penalize the exogenous outputs and these weighting functions need to be found ad hoc, which sometimes lead to some intermediary bad controllers and work overhead. Furthermore, after numerical implementation, the discrete controller loses a part of the imposed performances due to an inadequate sampling period or badly selected quantization levels. Although there are solutions in the literature, there is no unified approach to solve all these mentioned problems. As an extension to the framework and mindset given by the two previously mentioned RCP use cases, the current project proposed a highly automated toolbox for robust control design, which, in the current state-of-the-art is a highly iterative design process, when taking into consideration plant uncertainties, although the mathematical background for solving the optimization problems is well established. It proposes to eliminate design overhead when considering and modifying a specification set, manually redesigning the weighting functions, the optimization procedure, discretization of the regulators, quantization analysis, and closed loop analysis for the linearized and initial hybrid plant. Furthermore, in unison with high-performance numerical toolboxes, a justified report should automatically result after its use and explicitly state when unrealistic design specifications were considered.

**Author Contributions:** Conceptualization, M. ¸S. and V.M.; methodology, M. ¸S.; software, M. ¸S.; validation, V.M. and P.D.; formal analysis, M. ¸S. and P.D.; investigation, M. ¸S. and M.S.; resources, M. ¸S.; data curation, D.M.; writing—original draft preparation, M. ¸S., M.S., and V.M.; writing—review and editing, V.M., D.M., and M.S.; visualization, M. ¸S. and D.M.; supervision, P.D.; project administration, M. ¸S.; funding acquisition, D.M. All authors have read and agreed to the published version of the manuscript.

**Funding:** This paper was supported by the Project "Entrepreneurial competences and excellence research in doctoral and postdoctoral programs—ANTREDOC", project co-funded by the European Social Fund.

**Conflicts of Interest:** The authors declare no conflicts of interest.

**Sample Availability:** Relevant source code implementation, including classes, objects, scripts, and data to reproduce the results presented in this paper are available from the GitHub repository: roconsys-toolbox-public.

#### **Abbreviations**

The following abbreviations are used in this manuscript:



#### **References**


### *Article* **Robust Fractional-Order Control Using a Decoupled Pitch and Roll Actuation Strategy for the I-Support Soft Robot**

**Jorge Muñoz 1,\*, Francesco Piqué 2,3, Concepción A. Monje <sup>1</sup> and Egidio Falotico 2,3**


**Abstract:** Tip control is a current open issue in soft robotics; therefore, it has received a good amount of attention in recent years. The desirable soft characteristics of these robots turn a well-solved problem in classic robotics, like the end-effector kinematics and dynamics, into a challenging problem. The high redundancy condition of these robots hinders classical solutions, resulting in controllers with very high computational costs. In this paper, a simplification is proposed in the actuation setup of the I-Support soft robot, allowing the use of simple strategies for tip inclination control. In order to verify the proposed approach, inclination step input and trajectory-tracking experiments were performed on a single module of the I-Support robot, resulting in zero output error in all cases, including those where the system was exposed to disturbances. The comparative results of the proposed controllers, a proportional integral derivative (PID) and a fractional order robust (FOPI) controller, validate the feasibility of the proposed approach, showing a clear advantage in the use of the fractional robust controller for the tip inclination control of the I-Support robot compared to the integer order controller.

**Keywords:** soft robotics; robust control; fractional calculus

#### **1. Introduction**

Soft robotics is a growing research field which aims to incorporating softness in robotic bodies or in novel end effectors, enabling safe and adaptive interactions [1]. Soft robotics is bio-inspired, since it tries to reproduce the abilities of certain animals, such as worms, snakes or the octopus [2], to move without a rigid skeleton or exoskeleton, exploiting their softness in order to squeeze, and adapt to unstructured environments. The stiffness characteristics of traditional industrial robots were desirable because they enabled the fast, reliable and precise performance of tasks, such as those required in factory lines. Conversely, soft robotics finds application in tasks where safety and adaptability to unstructured environments is of paramount importance [1]. Such tasks include delicate food handling, medical procedures, and assistive tasks.

The compliance which characterizes soft robots, besides granting the desired properties, also introduces challenges from the perspective of modeling and control [3]. The hysteresis of the materials and their high redundancy, due to the virtually infinite number of degrees of freedom (DoF) of soft robots, makes them hard to model with high accuracy. Closed-form equations for describing the dynamics of soft robots are available [4], but are too computationally demanding for efficient use in control. The constant curvature (CC) or the piecewise constant curvature (PCC) approaches [5], which assume either all of the robot's body, or a number of robot sections, to be circular arcs, are computationally efficient, but tend to fail when the robot is highly nonlinear.

**Citation:** Muñoz, J.; Piqué, F.; Monje, C.A.; Falotico, E. Robust Fractional-Order Control Using a Decoupled Pitch and Roll Actuation Strategy for the I-Support Soft Robot. *Mathematics* **2021**, *9*, 702. https://doi.org/ 10.3390/math9070702

Academic Editor: Eva H. Dulf

Received: 28 February 2021 Accepted: 22 March 2021 Published: 24 March 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

A different approach is to rely on neural networks [6] or reinforcement learning [7] for data-driven modeling of the soft robot. In [6], a dynamic model of a soft robot is learned through supervised learning using an auto-regressive network, and is employed for closedloop control by model-based reinforcement learning. In [7], a multiagent reinforcement learning approach is used to learn the kinematic model of a robotic arm. A trajectory optimization method is also exploited for open-loop control of dynamic reaching tasks [8]. In [9], it was shown that data-driven models can exploit the retraining of their networks' weights to accommodate external disturbances. An extensive discussion of the challenges of such platforms can be found in [10]. While these data-driven approaches can accurately capture the nonlinearities of soft robot dynamics, their drawback is that neural networks are black box models which are unfit for the traditional controller design methods usually employed for state-space models.

Due to these limitations, many workspace control strategies applied to soft robots are based on nonlinear model-based controllers or linear model-free controller schemes. In the last case, as no model is available for the controller tuning, different alternatives must be used. For instance, an empirical estimation of the kinematic Jacobian matrix is proposed in [11], and later used in an optimal control scheme. Only the works in [12] propose workspace linear controllers, but use very complex control laws, involving the robot's Jacobian matrix and its derivative. See [3] for a complete survey on different soft robot control strategies.

Feedback control of nonlinear or time-varying systems has been a challenging problem not just for soft robotics, but since the early nonlinear control attempts at the beginning of the last century. Among the approaches proposed for dealing with nonlinearities, robust control has been extensively used for that purpose. This strategy aims to achieve constant system performance (in the sense of behavior), despite potential plant changes.

Some examples of robust control approaches can be found in [13], where a fractional controller is proposed in the robust control of a soft neck, or in [14], where a fuzzy approach is used to model a nonlinear plant (car steering), proposing an output feedback controller to obtain a robust behavior. Other, more advanced, control strategies have also been used, such as the sliding mode control of a wind turbine generator shown in [15], where a robust behavior is obtained in simulations under the conditions of variable wind-speed inputs and other parameter uncertainties. For a detailed discussion of nonlinear system control problems and possible solutions, see [16].

A desirable feature in robust systems consists of providing a constant overshoot despite changes in the plant parameters (usually the gain). This feature, often called iso-damping in the literature, provides a significant advantage in the control of timevarying or nonlinear systems. Often, this robustness specification is based on Bode's ideal function (see [17]), which features a flat phase diagram, and thus a constant damping. For instance, in [18], the tuning of a proportional integral derivative (PID) controller based on this flat-phase condition is proposed, showing the benefits of this robust specification in several case studies. A similar approach is found in [19], where a relay test is proposed to find the plant parameters, followed by the application of a tuning method based on the aforementioned condition.

Using that robust specification, a wide range of solutions are possible, from the use of a PID control, as described above, to more advanced strategies. A very interesting approach to the robust control problem is found using fractional calculus. Fractional order controllers (FOCs), based on non-integer-order derivative/integral operators, show greater flexibility in fulfilling the flat-phase condition compared to their integer-order alternatives, while keeping most of their benefits. An extensive review of fractional calculus applications in the field of robust control can be found in [20,21], including system modeling and controller design.

Although many fractional controller definitions have been proposed since the first works in [22], the non-integer-order generalization of the classic PID is generally preferred, probably due to its simple control law and strong similarities with the ubiquitous PID controller, allowing classic design tools to be adapted from integer to fractional exponents.

As described in [23], the fractional order PID (FOPID) controllers defined using Equation (1) are able to provide a robust performance despite plant parameter changes and nonlinearities

$$FOPID(s) = k\_{\mathcal{P}} + k\_i \frac{1}{s^{\overline{\mathcal{A}}}} + k\_d s^{\mu} \, , \tag{1}$$

where *kp*, *ki*, *kd* are the controller gains, and *λ*, *μ* are the fractional operator orders.

Given its benefits and convenience, the FOPID controllers have received particular attention in recent decades. Approaches using the definition in Equation (1) are found in many works. For instance, in [24], new tuning and auto-tuning methods are proposed for the controller parameters, showing excellent results in the control of real plants, like a water circuit or a servomotor. The same controller is used for the control of a DC motor model in [25], also proposing the possible electronic realization of the system. Again, in [26], an optimization method is proposed for the tuning of the same controller, showing excellent results in the control of a real servomotor system.

In this paper, a fractional-order robust control is proposed for I-Support, an assistive soft robot [27]. The particular cases of proportional integral derivative (PID) and fractionalorder proportional integral controller (FOPI) are considered due to their plant and model characteristics. As a novelty, a dynamic model of the plant will be used for the controller tuning, achieving excellent results. This is an important contribution, as similar previous works are based on very complex control laws, while the proposed control scheme is based on simple PID or FOPI controllers.

In the following sections, the robotic platform hardware and the chosen model are described. In order to obtain a suitable model, the robot inputs are redefined, allowing for a direct relationship between the actuation variables and the work-space variables, such as orientation and inclination angles. Then, a plant model is obtained using a recursive least squares (RLS) parameter identification method, as described in [28]. Since the identification is done offline, other, simpler methods could be used, such as least-squares fit; however, given the tuning method proposed, the control strategy might be upgraded to an adaptive scheme, as in the case of [29]. Therefore, a recursive identification algorithm like RLS may have future advantages.

Once a plant model is available, it can be used for controller tuning. According to the iso-m procedure explained in [30], the magnitude, phase and slope of the plant are needed, which can be obtained from the RLS identification. In addition, the system's behavior must be defined using standard performance specifications, like the damping ratio (phase margin) and peak time (crossover frequency). The resulting controller parameters will be used in the robust control scheme proposed for the I-Support robot. See [30] for details on the method application.

It will be shown that the proposed controllers can track the robot's end effector configuration in termso f its orientation and inclination angles, and can effectively reject external disturbances, despite inaccuracies in the plant's model, thanks to the robust fractional order control.

#### **2. Materials and Methods**

A soft robotic manipulator for the assistance of elderly people, called I-Support, has been used in this work [27] ( Figure 1). It belongs to the class of continuum manipulators that receive inspiration from biological models like elephant trunks or snakes. It is composed of three modules, each of them actuated by three coupled McKibben actuators and three tendon-driven actuators. In this work, the proximal module of the robot was selected and used independently of the others. McKibben actuators are artificial pneumatic muscles, based on an internal latex balloon surrounded by a bellow-shaped braid. The braided structure allows the McKibben actuator to perform uni-directional bending when inflated. The pneumatic actuators are placed within the module at 120° to enable the bending and

elongation of the module in all directions. The cable-driven actuation, which was not used in this work for simplicity, allows for shortening and stiffness variation in the module. The McKibben actuators are controlled by Camozzi K8P pneumatic valves, which are controlled by an Arduino Due board. The Arduino is, in turn, controlled by a PC using a serial port within the Matlab environment. The module is kept together by plastic discs placed 10 mm from each other. An internal central channel is built to hold the hose, to provide water and/or soap.

**Figure 1.** I-Support kinematic description.

#### *2.1. Plant Model*

According to [31,32], this robot is hyper-redundant, making the term degrees of freedom (DOF) not applicable in the classical sense. Nevertheless, in this specific case, the actuation parameters have a direct effect on measurable outputs like tip position and orientation. A correlation between the three available system inputs and the measurable outputs can be found and used to find a plant model.

The I-Support arm module is actuated through three evenly spaced, pressure-driven McKibben pneumatic actuators. As described in [33], the actuator elongation depends on the input pressure, which, in time, produces a change in the position and orientation of the end-effector according to its relative location within the robot. In this case, given the actuator disposition, the different input pressures result in a specific rotation and displacement, depending on the actuator used, as shown in Figure 1. Note that, as there is only one input variable per actuator, its resulting translations and rotations must be bounded.

The combined action of the three actuators produce the final end-effector's position and orientation in the workspace (Figure 2). As in a three-dimensional environment, the final orientation of the end effector can be defined using three Euler angles. More specifically, in our case, where the rotation in *Z* axis (yaw) cannot change, the final orientation can be described using two rotation angles in *X* and *Y*: pitch and roll. Therefore, the combination of the three angles produced by each actuator will result in a final rotation that can be defined or measured with two angles.

Given that translations and rotations are bound, either can be considered as an output. In this case, end-effector rotations will be considered as the system output. A deeper study of the robot geometry will show how the actuator pressure inputs are related to these final angle outputs.

**Figure 2. Left**: elongated I-Support module, with three equally actuated chambers. **Right**: bended module with only one chamber inflated.

Starting with a single actuator (*A*1), and making its rotation axis parallel to the *X* axis in the frame of reference (see Figure 1), results in an output angle directly related to the input pressure of its chamber. Given that the angles can be negative, the pressures are also negative for the moment. Although the system does not allow this configuration, it can be solved later by adding an offset. Considering this actuator, with the index number 1, the equations describing angle *α* in *X* are as follows

$$
\mathfrak{a}\_1 = f(P\_1). \tag{2}
$$

where *α*<sup>1</sup> is the angle contribution from the first actuator to the final *X* axis angle (*α*), *P*<sup>1</sup> is the actuator input pressure and *f* is a nonlinear function describing the relationship between them.

However, there are other two actuators with an effect on the final angle *α*. Given the proposed vertical robot setup, and using the same actuator type at all locations, we can assume that functions *f* relating the input pressure and actuator angle are also similar. Therefore, the same function applies, but including a projection factor that depends on the actuator relative angle (*γ*), resulting in

$$\mathfrak{a}\_2 = \cos(\gamma\_2) f(P\_2),\tag{3}$$

$$\mathfrak{a}\_{\mathfrak{J}} = \cos(\gamma\_{\mathfrak{J}}) f(P\_{\mathfrak{J}}).\tag{4}$$

In fact, we can generalize the previous functions as follows

$$\alpha\_i = \cos(\gamma\_i) f(P\_i). \tag{5}$$

Although the *f* functions are nonlinear, the resulting tip angles depend on the forces produced by the linear actuators; therefore, given the robot construction, the angles can be considered additive. The final angle in the *X* axis is then found by addition of the three actuator angles

$$\mathfrak{a} = \mathfrak{a}\_1 + \mathfrak{a}\_2 + \mathfrak{a}\_3 = \cos(\gamma\_{11})f(P\_1) + \cos(\gamma\_{12})f(P\_2) + \cos(\gamma\_{13})f(P\_3). \tag{6}$$

Since the three actuators are symmetrically arranged, the angles are *γ*<sup>11</sup> = 0 deg, *γ*<sup>12</sup> = 120 deg and *γ*<sup>13</sup> = 240 deg, and Equation (6) results in

$$\alpha = f(P\_1) - 0.5f(P\_2) - 0.5f(P\_3) = f(P\_1) - 0.5[f(P\_2) + f(P\_3)].\tag{7}$$

This result shows how both actuators', *A*<sup>2</sup> and *A*3, effects on the angle *α* are divided by two, with an opposite direction to actuator *A*1. This leads to the first result of our approach. The *α* angle is defined by the pressure difference, which is positive when *P*<sup>1</sup> is larger than 0.5(*P*<sup>2</sup> + *P*3), and negative otherwise. In the case of *P*<sup>1</sup> = *P*<sup>2</sup> = *P*3, angle *α* = 0, leading to different robot elongations depending on the pressure value, form zero (*P*<sup>1</sup> = *P*<sup>2</sup> = *P*<sup>3</sup> = 0) to full-length ( *P*<sup>1</sup> = *P*<sup>2</sup> = *P*<sup>3</sup> = *Pmax*).

Now, *β* angle is defined as the rotation around *Y* axis. Using the previous reasoning, but projecting in the *Y* axis (using sin(*γ*))

$$\beta = \beta\_1 + \beta\_2 + \beta\_3 = \sin(\gamma\_1)f(P\_1) + \sin(\gamma\_2)f(P\_2) + \sin(\gamma\_3)f(P\_3). \tag{8}$$

In the case of *γ*<sup>1</sup> = 0 deg, *γ*<sup>2</sup> = 120 deg and *γ*<sup>3</sup> = 240 deg, Equation (8) results in

$$\beta = 0.866f(P\_2) - 0.866f(P\_3) = 0.866[f(P\_2) - f(P\_3)].\tag{9}$$

Note that the value of *β* angle depends on the difference between *P*<sup>2</sup> and *P*3, and the effects of the *A*<sup>1</sup> actuator cannot change it. Again, the angle depends on a pressure difference, and the elongation is a function of the minimum pressure values. For the case *P*<sup>1</sup> = *P*<sup>2</sup> = *P*3, angle *β* = 0, leading to the previous result regarding robot elongation. As there are just two actuators involved in this case, the final elongation depends on the minimum values between those two pressures.

At this point, we can see that *α* and *β* angles depend on the pressure difference of actuators *A*1, *A*<sup>2</sup> and *A*3, and the elongation depends on the minimum of these values. Based on that, we can define the new input variables *βi*, *α<sup>i</sup>* and *li*, as a linear combination of the pressure inputs without loss of generality.

Using the results from Equations (7) and (9), and considering the description for the elongation behavior of the robot, the following input redefinition is proposed

$$\alpha\_i = P\_1 - 0.5(P\_2 + P\_3)\_\prime \tag{10}$$

$$
\beta\_i = 0.866(P\_2 - P\_3),
\tag{11}
$$

$$l\_i = \min(P\_1, P\_2, P\_3). \tag{12}$$

As *β* depends only on the input pressure difference of the actuators *A*2 and *A*3, the change in *β<sup>i</sup>* will only lead to a change in *β* output angle. Likewise, *α<sup>i</sup>* and *li* inputs will affect only the output values of *α* and *l*.

Based on thid, the I-Support can be modeled as three decoupled single-input, singleoutput (SISO) systems. The transfer functions *Gα*, *Gβ*, and *Gl* will model the actual outputs (*α*,*β*, *l*) as a function of the new inputs (*αi*,*βi*,*li*), defined by Equations (10)–(12). Given the simplifications we have considered, the reality will be different in several aspects, such as the interference between actuators and the nonlinear plant behavior, as will be shown in the experimental sections. To deal with these problems, we propose use of a robust controller, since this will provide a constant behavior despite the plant parameter changes or nonlinearities, as discussed above in Section 1.

In order to find these models, recursive least squares (RLS) system identification is proposed. Based on the above discussion, redefined inputs (*αi*, *β<sup>i</sup>* and *li*) were considered instead of pressure inputs. Note that these are just the pressure input redefinition, and the output angles still depend on the system dynamics. Although *f* functions are unknown, they are considered within the resulting models, but the nonlinear part will be neglected due to the identification method. As a robust controller is proposed, the performance results will be constant in the entire operation range of the robot, despite these nonlinearities.

As the control system is now defined through angle and elongation inputs, the equivalence between these inputs and the pressure of each actuator is required in order to operate the robot. In that direction, Equations (10) and (11) can be used to solve *P*<sup>1</sup> and *P*2.

$$P\_2 = \beta\_i + P\_{3\prime} \tag{13}$$

$$P\_1 = \alpha\_i + 0.5(P\_2 + P\_3) = \alpha\_i + \frac{\beta\_i}{2} + P\_3. \tag{14}$$

Note that values of *P*<sup>1</sup> and *P*<sup>2</sup> depend on *α<sup>i</sup>* and *β<sup>i</sup>* inputs, and also depend on *P*3, according to Equations (13) and (14). Using these results in Equation (12) provides

$$l\_i = \min(\mathfrak{a}\_i + \frac{\beta\_i}{2} + P\_{3\prime}\beta\_i + P\_{3\prime}P\_3) = \min(\mathfrak{a}\_i + \frac{\beta\_i}{2}, \beta\_{i\prime}0) + P\_{3\prime} \tag{15}$$

where the min function properties are applied to obtain *P*<sup>3</sup> value out of the min function, leading to the definition of *P*<sup>3</sup> value based on the inputs *αi*, *βi*, and *li* detailed in the following equation

$$P\_3 = l\_i - \min(a\_i + \frac{\beta\_i}{2}, \beta\_{i\prime}0). \tag{16}$$

This result means all the pressure results will be positive as long as *li* is greater than zero, which means that this input variable actually controls the robot elongation, as described before.

Once our system is defined, a model is needed for controller tuning and simulation. Given the complex behavior of the robot, system identification is the best option to obtain a linear model from captured data. This means that we neglect the possible nonlinear behavior, but, thanks to the proposed robust controller, a good performance will be obtained despite the model mismatch.

Using the described inputs and outputs definition, a set of experiments were carried out for different target inclinations in order to obtain a plant model. The experimental setup consists of different identification experiments where a changing target was set at one of the three inputs (for instance, *αi*), while keeping the other two inputs fixed (for instance, *βi*, and *li*). A motion-capture system was used to record the real plant behavior, and later used to obtain the output angles (*α* and *β*) variation.

For example, Figure 3 shows the input and output captured data during two specific identification experiments.

**Figure 3.** Two examples of identification experiments. The **left** figure shows the system response to variations in the input *αi*, while the other inputs are kept constant (*β<sup>i</sup>* = 30 and *li* = 0). **Right** figure shows the system response to variations in the input *βi*, while the other inputs are kept constant (*α<sup>i</sup>* = 20 and *li* = 0).

Note that quite different behaviors can be observed for ascending and descending steps. This is probably due to the compressed air valve setting, which can result in plant differences when the air is pushed or released.

A relatively stable output is obtained for the fixed angle, despite the important variations in the changing angle, showing that the systems obtained are mainly decoupled, but a minimal influence still exists. Note that although the input values considered in the identification are *αi*, *β<sup>i</sup>* and *li*, the resulting model includes Equations (13), (14) and (16) dynamics (just the linear behavior, of course).

An appropriate number of experiments were performed in the I-Support, covering the entire robot workspace for different input combinations, resulting in a total of 62 separate datasets. Each set consists of the system input data (*αi*,*βi*) and the response obtained (*α*,*β*) over a period of 20 s (as shown in Figure 3). Then, RLS identification was applied to selected parts of the captured data, as shown in Figure 4. As expected, the system has an important variation in response over the range of possible inputs. The identification results show how the systems clearly split into two different classes, coincident with the two main observed behaviors. Figure 4 shows a validation example of the RLS results.

**Figure 4.** Validation example of the identified models showing two different behaviors. Data obtained from the case of variations in Alpha input ranging from 10 deg to 20 deg (left of Figure 3). Showing the Step input (Alpha input), and the Real response (Alpha output) used in the RLS identification. Resulting model time response is also shown for comparison.

Note that although the linear model captures the system behavior quite well, there are mismatches due to plant nonlinearity. In this case, the identification data were extracted from the capture data shown on the left side of Figure 3, but a different identification procedure was performed for every experiment.

Using RLS identification in every dataset will result in a different model for every single experiment. The frequency responses of these models are shown on the left side of Figure 5, using one color label for each identified model, showing experiment number, *αi*, *βi*, *l*. Note that two groups of frequency responses can be observed in the figure. One group shows a decayed resonance with low stationary gain values (*Mag* < 0 dB when *Freq* → 0 rad/s), and the other group shows a significant resonant peak and higher stationary gain values (*Mag* > 0 dB when *Freq* → 0 rad/s). These groups are highlighted on the right side of this figure, where only the systems with maximum and minimum gains are shown. In addition, an average model, obtained as the mean value of all resulting RLS parameters, is shown on the right side of Figure 5.

**Figure 5.** Frequency response of the models obtained using RLS, showing all the identification experiments (**left**) and the three most representative examples: Lowest, Average and Maximum Gains (**right**).

The transfer functions that describe these extreme systems are

$$G\_{\rm min} = \frac{311.86}{(s + 3.154)(s^2 + 2.949s + 210.9)}, \qquad G\_{\rm max} = \frac{3294.8}{(s + 17.29)(s^2 + 3.382s + 155.5)}, \tag{17}$$

and the average system transfer function, with poles and gain found as the arithmetic mean of the poles and gain obtained from each dataset, is

$$G\_{\rm avg} = \frac{1403}{(s + 8.665)(s^2 + 3.462s + 176.7)}.\tag{18}$$

Therefore, two classes can be used to model the I-Support system behavior. One class is the low stationary gain case (*Gmin*), consisting of a pair of complex conjugate poles shaped by the influence of a non-negligible real pole (three dominant poles). The other class shows a higher stationary gain, and is described by (*Gmax*), with two complex dominant poles and one negligible real pole.

The unit input time response and *s* plane pole locations are shown in Figure 6 for the three described system models. An under-damped behavior is observed for the systems with negligible real poles (*Gmax*, *Gavg*), while an oscillating over-damped response can be observed in the case with three dominant poles (*Gmin*).

Note how the systems with less than 0 dB gain (*Gmin*, *Gavg*) show stationary responses below the unit input value, while the other system (*Gmax*) stationary response rises above this input level.

**Figure 6.** Zero-pole representation (**left**) and unit input time response (**right**) for the three most representative models obtained: Lowest Gain (*Gmin*), Average Gain (*Gavg*) and Maximum Gain (*Gmax*) models.

Given these results, a control scheme could be designed using two controllers, one for each system class (two in this case), with a switching supervisor applying the correct controller for each case. Nevertheless, the causes that affect the system behavior are not clear; therefore, the supervisor implementation is not possible in this case. That strategy could be considered in the future if the underlying reason leading to the differences in the plant parameters is found.

#### *2.2. Control Strategy*

Considering these conditions, a solution will be proposed using robust control techniques. As discussed before, robust controllers are able to show a constant performance despite plant parameter variations or nonlinearities. Therefore, the average plant parameters can be used for a robust controller tuning, in this way granting an invariant performance in the final system behavior despite changes in the plant parameters (usually gain) or neglected nonlinear plant dynamics.

As discussed in Section 1, the fractional order generalization of the integer order PID controller defined by Equation (1) is a convenient robust control approach, and it is suitable in this case. Given the plant characteristics, the derivative part of the controller is not needed and will only bring noise amplification. Therefore, the fractional order proportional integral (FOPI) variant of the controller, defined by Equation (19), will be used.

$$FOPI(s) = k\_p + k\_i \frac{1}{s^{\overline{\lambda}}}.\tag{19}$$

The three parameters (*kp*, *ki*,*λ*) must be tuned in order to achieve the desired system performance. Usual control specifications are stability and responsiveness, normally defined through frequency and damping ratio.

In order to provide a way to compare the robustness between the experiments, a small overshoot will be forced using a target damping ratio lower than 1. As described in [34], a phase margin of 70 deg will result in a damping ratio of 0.8, enough for a significant overshoot. This allows us to compare the overshoot between experiments, providing a measure of the system robustness by comparison. The design frequency must be low enough to avoid the resonance influence in the vicinity of 10 rad/s in order to enforce stability, with the fastest possible response. Based on this, the performance specifications are the following


With the defined specifications, several tuning methods are available. The recently published iso-m method, described in [30], is straightforward and easy to apply. In order to tune a fractional order controller, a series of simple operations involving basic math and the use of a graph to find the fractional exponent are needed. Therefore, this method can be applied in the tuning of the controller described in Equation (19).

Using the average model defined in Equation (18) and the iso-m tuning method, the controller parameters shown in Table 1 were found.

**Table 1.** Fractional order controller parameters.


Based on these parameters, the resulting controller is defined as follows

$$FOPI(s) = 0.1878 + 1.8279 \frac{1}{s^{1.19}}.\tag{20}$$

An implementation of the fractional operator (*s*1.19) is then needed in order to apply the previous controller in the feedback control scheme of the I-Support robot. One of the most common techniques is the equivalent pole-zero approximation described in [35], based on the operator frequency response (see, for example, [24] or [36]). Using that approximation, the *s*1.19 operator implementation results in

$$s^{1.19} = \frac{0.6614s^3 + 1.763s^2 + 0.4491s + 0.01586}{s^4 + 1.589s^3 + 0.2861s^2 + 0.007414s + 2.53E - 06}. \tag{21}$$

The frequency response of the open-loop system cascading the controller and the average plant model (*FOPI*(*s*) · *Gavg*(*s*)), and the closed-loop time response, are shown in Figure 7.

**Figure 7.** Frequency response (**left**) and time response (**right**) for the fractional order controller system.

Note that, in the left side of the figure, the phase is completely flat in the vicinity of the crossover frequency, leading to the desired iso-damping property and providing a constant overshoot in the expected step response, shown on the right side of Figure 7.

In a similar way, the same specifications and tuning method were used in an equivalent integer-order controller with the intention of a robustness comparison. The resulting parameters are shown in Table 2.

**Table 2.** Integer order controller parameters.


With these parameters, the resulting controller is

$$IOPI(s) = 0.0071 + 1.6402 \frac{1}{s}. \tag{22}$$

Again, the frequency and time responses of the system with controller *IOPI*(*s*) are shown in Figure 8.

See the significant phase slope around the crossover frequency, leading to an important difference in phase margin in the case of a gain change. Although the simulation predicts an underdamped step response, as shown on the right side of Figure 8, in the experimental section, how the overshoot variability is bigger in the case of the integer-order controller will be shown.

A set of experiments were performed for both fractional- and integer-order controllers. The results are shown and discussed in the following section.

**Figure 8.** Frequency response (**left**) and time response (**right**) for the integer order controller system.

#### **3. Results and Discussion**

The experiments performed with the controllers defined in Equations (20) and (22) were designed to assess and compare their performance and robustness properties. As discussed earlier, the goal of robust control is to keep performance characteristics (like overshoot) invariant despite changes in plant parameters (like gain). In this case, we have seen that these parameters change for the different positions attained on the robot and, therefore, a robust system should provide a constant overshoot percentage despite the end effector position changes.

The first experiment consists of exciting the system with two-step input target angles *α* and *β* at the same time, showing the controller robustness by overshoot comparison. Tip orientation angles are recorded with an electromagnetic sensor (NDI Aurora®), as shown in Figure 9. Note that a robust system is expected to have the same performance despite plant parameter variations. Given the specifications defined, the difference in overshoot percent values will show the system robustness, with the results showing similar overshoot percentages in both output signals being more robust. An example of this first experiment for target angles *α* = 10 and *β* = 30 is shown in Figure 10 for the FOPI and IOPI controllers.

Since the plant parameters change with the inclination, introducing two different references for the target angles (*α* = 10, *β* = 30) allows us to observe the dynamic behavior for two different parameter cases in a single experiment. Observe that, for the fractionalorder controller system (left), the overshoot variation is much lower (from 11% to 16%) despite the difference in plant parameters compared to the integer controller (right), which shows a higher overshot difference (from 0% to 17%).

A video recording of this experiment is available at https://vimeo.com/517321273 (accessed on 26 February 2021) for the case of the robust controller, showing the overshoots during the tip positioning and the final controlled angles (Supplementary Material).

**Figure 10.** Experiment 1. Time response (**above**) and control signal (**below**) for the two controllers tested, fractional (**left**) and integer (**right**) orders.

The second experiment is a disturbance response test, showing how the control schemes respond to system disturbances. The targets from the first experiment are kept, but, in this case, a constant mass of 150 g is used as a disturbance during the experiment. The setup consists of a metal bar tied to the robot scaffolding in collision with the robot, which can be manually attached or released at any time. In this experiment, the mass was applied at *t* = 5 s, and removed at *t* = 10 s, both producing a sudden change in the feedback error, as shown in Figure 11. Disturbance rejection was correct for both controllers.

**Figure 11.** Experiment 2. Disturbance rejection. Time response for the two controllers tested, fractional (**left**) and integer (**right**) orders.

The third experiment is a trajectory in space describing a square of four targets. This experiment is the most demanding of all the experiments performed, presenting the most extreme parameter variations. In this experiment, a changing reference was programmed, following a trajectory of four positions. The references and points are shown in Table 3.


**Table 3.** Trajectory for experiment 3.

The results are shown in Figure 12.

**Figure 12.** Experiment 3. Trajectory tracking. Time response for the two controllers tested, fractional (**left**) and integer (**right**) orders.

Note how the performances are varied in the case of the IOPI controller, ranging from under-damped to over-damped systems, which cannot be considered as robust in the sense described before. In contrast, the FOPI controller keeps a constant performance, showing similar overshoots and time responses during the whole trajectory, which is considered as a robust behavior, known in the literature as iso-damping.

Although elongation input was included to provide larger plant parameter variations, the feedback loop is only applied to orientation control (*α* and *β*). Therefore, as elongation positions are not feedback-controlled, their results show an important error. The position and elongation control of the I-Support robot will be addressed in future works.

#### **4. Conclusions**

A robust control for the I-Support soft robot tip orientation is proposed in this paper through the use of a FOPI controller, and compared to a similar PID controller in terms of performance and robustness.

Given the specific robot characteristics, a previous input variable transformation has been applied in order to split the MIMO system into three decoupled SISO systems. This new approach allows to define the model of each system independently and to apply a different feedback loop to each control variable.

With these decoupled SISO systems defined, a feedback control loop was designed and implemented in these systems, steering the robot tip orientation actuation (*α* and *β* angles). Given the simplifications made in the model, a robust controller is proposed to deal with the parameter variations and neglected dynamics.

The proposed robust control scheme is based on a fractional-order, proportional integral FOPI controller, tuned through a recent method (iso-m) that provides an easy and straightforward solution to the controller parameters. This is considered a major contribution of this paper, as the previous works using similar control strategies show higher control law complexity, resulting in much higher computational costs. This is probably

the reason for the restriction of these control strategies to the simulation environment; therefore, none of these works provide experimental results.

Experimentation is then considered as another important contribution of this paper, as a thorough experimental comparison has been carried out between the two proposed controllers in the real I-Support soft robot platform.

The excellent results obtained for the I-Support tip angle control validate the application of this modeling and control scheme and open up the possibilities of position and elongation feedback control of the platform, which will be proposed in future works.

Besides, a further comparison with previous works based on open-loop configuration can be made in the future, to highlight the pros and cons of each control approach and show some hybrid (feedback-machine learning) control possibilities with that can be applied to the I-Support robot or similar platforms.

**Supplementary Materials:** The following are available online at https://www.mdpi.com/2227-739 0/9/7/702/s1.

**Author Contributions:** conceptualization, J.M., F.P., C.A.M. and E.F.; methodology, J.M. and F.P.; software, J.M. and F.P.; validation, J.M. and F.P.; formal analysis, J.M.; investigation, J.M. and F.P.; resources, C.A.M. and E.F.; data curation, J.M.; writing—original draft preparation, J.M. and F.P.; writing—review and editing, J.M., F.P., C.A.M. and E.F.; visualization, J.M. and F.P.; supervision, C.A.M. and E.F.; project administration, C.A.M. and E.F.; funding acquisition, C.A.M. and E.F. All authors have read and agreed to the published version of the manuscript.

**Funding:** The research leading to these results has received funding from the project Desarrollo de articulaciones blandas para aplicaciones robóticas, with reference IND2020/IND-1739, funded by the Comunidad Autónoma de Madrid (CAM) (Department of Education and Research), from HUMASOFT project, with reference DPI2016-75330-P, funded by the Spanish Ministry of Economy and Competitiveness, and from RoboCity2030-DIH-CM, Madrid Robotics Digital Innovation Hub (Robótica aplicada a la mejora de la calidad de vida de los ciudadanos, FaseIV; S2018/NMT-4331), funded by "Programas de Actividades I+D en la Comunidad de Madrid" and cofunded by Structural Funds of the EU. This work was also funded by the European Union's Horizon 2020 research and innovation programme under grant agreement No. 863212 (PROBOSCIS) and No. 824074 (GROWBOT).

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

#### **Abbreviations**

The following abbreviations are used in this manuscript:

PID Proportional integral derivative

FOPID Fractional order proportional integral derivative

FOPI Fractional order proportional integral

#### **References**


### *Article* **Tuning Rules for Active Disturbance Rejection Controllers via Multiobjective Optimization—A Guide for Parameters Computation Based on Robustness**

**Blanca Viviana Martínez \*, Javier Sanchis, Sergio García-Nieto and Miguel Martínez**

Instituto Universitario de Automática e Informática Industrial, Universitat Politècnica de València, 46022 Valencia, Spain; jsanchis@isa.upv.es (J.S.); sgnieto@isa.upv.es (S.G.-N.); mmiranzo@isa.upv.es (M.M.) **\*** Correspondence: blamarca@doctor.upv.es

**Abstract:** A set of tuning rules for Linear Active Disturbance Rejection Controller (LADRC) with three different levels of compromise between disturbance rejection and robustness is presented. The tuning rules are the result of a Multiobjective Optimization Design (MOOD) procedure followed by curve fitting and are intended as a tool for designers who seek to implement LADRC by considering the load disturbance response of processes whose behavior is approximated by a general first-order system with delay. The validation of the proposed tuning rules is done through illustrative examples and the control of a nonlinear thermal process. Compared to classical PID (Proportional-Integral-Derivative) and other LADRC tuning methods, the derived functions offer an improvement in either disturbance rejection, robustness or both design objectives.

**Keywords:** active disturbance rejection control (ADRC); multiobjective optimization; time delay systems; tuning rules

#### **1. Introduction**

Active Disturbance Rejection Control (ADRC) [1] was proposed as an alternative for PID (Proportional-Integral-Derivative) control and has become a new control paradigm. It inherits from the PID controller its independence from the plant model and seeks to compensate its weaknesses through the concept of disturbance estimation and rejection.

The ADRC lumps together the non-modeled dynamics and non-manipulable external signals affecting the system in a single total perturbation. This signal is treated as an extended state to be estimated by an Extended State Observer (ESO) and its impact on the output is rejected by the control action. As a result, the ADRC loop induces the real plant to behave like a set of cascade integrators facilitating the control design.

The fact that the extended observer jointly treats external perturbations and modeling uncertainties highlights its attractiveness in the engineering field, since the knowledge of the process model is kept to minimum in order to design the control loop. What is more, in contrast with model-based approaches, the ADRC assumes a canonical form regardless of the process dynamics and unifies the unknown discrepancies between the canonical form and the real plant in the total perturbation [2]. The effectiveness of the ADRC has been tested in a variety of fields including power electronics, motion and process control. A summary of recent experimental studies in the aforementioned areas can be found in [3]. The emergence of innovative ADRC solutions, particularly in industrial control, is a motivation to consider this control approach for processes where a precise dynamic model is difficult to obtain and a simplified approximation could be used instead.

The implementation of the ADRC requires the order of the system and the nominal value of its critical gain; being the latter the parameter that usually relates the control input with the highest order derivative of the output. When the ESO and the control law are designed by evaluation of nonlinear functions, the algorithm is called NADRC (Nonlinear

**Citation:** Martínez, B. V.; Sanchis, J.; García-Nieto, S.; Martínez, M. Tuning Rules for Active Disturbance Rejection Controllers via Multiobjective Optimization: A Guide for Parameters Computation Based on Robustness. *Mathematics* **2021**, *9*, 517. https://doi.org/ 10.3390/math9050517

Academic Editors: Eva H. Dulf and Cristina I. Muresan

Received: 27 January 2021 Accepted: 23 February 2021 Published: 2 March 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

157

ADRC). On the other hand, if a linear observer together with a linear control law are used, the control strategy is called LADRC (Linear ADRC).

The LADRC has gained popularity due to its simple structure and the reduced amount of parameters to be tuned in comparison with the NADRC. The bandwidth parameterization [4] formulates the observer and control law gains as functions of two main parameters the observer bandwidth and the controller bandwidth. Usually, their selection is based on the closed loop desired behavior and is adjusted by trial and error turning the tuning problem into an empirical process.

The tuning of the LADRC is considered a research area of interest. It has been addressed taking as a starting point PID controllers operating in the control system [5,6] or strictly proper controllers with integrator [7], which state the desired disturbance rejection performance.

The inclusion of the nominal value of the process critical gain as the third tuning parameter (in addition to the two bandwidths) has been discussed in [8,9]. In [10], the nominal value of the critical gain is tuned through an online optimization process for a tank level control problem. The main disadvantage of this approach is the time required to perform the optimization search on the loop.

To avoid the computational cost related to the online tuning, some researches have determined a set of functions to obtain the three main parameters (nominal value of critical gain, observer bandwidth and controller bandwidth). In [11] a tuning method for LADRC suitable for the control of a type of high-order systems is presented. It is based on the interpretation of the maximum sensitivity (MS) in the Nyquist diagram of the loop transfer function.

High-order plants can be used as approximations for some industrial processes. Nevertheless, the First Order Plus Dead Time (FOPDT) model is also a very common approximation which takes into account delays due to mass or energy transport, or limitations related to measuring and energy conversion devices [12]. The interest in the control of the FOPDT processes has inspired control strategies as the fractional order internal model controller (FO-IMC) from [13], where phase margin and gain crossover frequency specifications are employed to formulate a system of nonlinear equations which needs to be solved for the controller design.

On the other hand, tuning rules for the second order LADRC applied to FOPDT plants have been proposed in [14] through formulation of an optimization problem following the Aggregate Objective Function (AOF) approach. This is, two performance indices of interest as the settling time and the Integral of Squared Error (ISE) were merged in the Integral of Time Weighted Squared Error (ITSE) for minimization. In addition, a robustness measure was used as a fixed constraint.

The aforementioned work pointed out the importance of balancing the disturbance rejection performance with the closed loop robustness. However, including the robustness just as a constraint for the optimization problem could result in solutions offering an optimized performance (in terms of the index selected) but with a robustness measure that tends to be in the upper limit allowed. This may be enough for some designers, but for others, given the complexity of the process, robustness also becomes a design objective and a balance among all performance indices is required. As alternative, in the Generate-First Choose-Later (GFCL) multiobjective approach the objectives are optimized simultaneously providing a set of solutions, with different compromise, to be examined by the designer who makes the final decision.

Some contributions to the LADRC tuning have been made in the GFCL context. Nevertheless, they use the multiobjective approach to select some of the LADRC parameters to control a particular system or the optimization process needs to be performed for each design. For example, in [15] the Integral of Absolute Error (IAE) and the MS are simultaneously minimized to select the LADRC bandwidths for the control of a power plant. In [16] a tuning scheme for the modified ADRC (MADRC) [17] for unstable time delay systems has been formulated as a multiobjective optimization problem regarding

the setpoint following and disturbance rejection. This methodology is intended to be performed adapting the problem according to the system to be controlled. It means that the proper MADRC order should be selected and the optimization and decision making stages need to be carried out for each study case in order to obtain the control law and observer gains.

Motivated by the above, this paper explores the GFCL approach to provide a set of tuning rules for the second-order LADRC parameters computation applicable to the control of FOPDT systems. A Multiobjective Optimization Design (MOOD) procedure is used over a group of nominal plants to obtain a set of Pareto optimal solutions with a compromise between the step load disturbance response and robustness. Then, the LADRC parameters are fitted to functions of the normalized delay and finally, these functions are scaled to make them suitable for the control of a general first order system with delay. Even though the LADRC has a certain level of robustness because it addresses the differences between the actual system and the assumed plant in the total perturbation, its tuning considering the robustness as an objective design balances this feature with the closed loop performance and this is reflected in the derived tuning rules.

The tuning rules presented here have prominent advantages for the control engineer:


The paper is organized as follows—in Section 2 the time domain and frequency domain formulation of the second-order LADRC as well as the loop parameterization are presented. In Section 3, a concise description of the Multiobjective Optimization Design procedure is given and the pertinence of this approach in the tuning of LADRC is addressed. Section 4 describes in detail the tuning of LADRC by means of the MOOD procedure whose results were fitted to the rules presented in Section 5. A summary guide for the LADRC parameters computation based on the proposed rules and the interactive tuning tool are also provided in this Section. Section 6 presents the validation of the proposal by the simulation of two examples. Performance comparison with classical PID tuning methods and the LADRC tuning rules from [11,14] are also presented. In Section 7 a nonlinear thermal process is controlled by the LADRC designed according to the proposed tuning method and, finally, Section 8 draws the conclusions.

#### **2. Linear Active Disturbance Rejection Control**

This section introduces the Linear Active Disturbance rejection control (LADRC) algorithm for single-input single-output systems.

The LADRC loop is mainly comprised of three blocks as shown in Figure 1.


**Figure 1.** Active Disturbance Rejection Control (ADRC) loop.

For the LADRC implementation, the system order *n* and the nominal value of its critical gain *b*<sup>0</sup> are required. Many practical applications can be approximated through first or second order models. Moreover, if the plant is open loop stable, a low order LADRC can be implemented and closed loop stability can be achieved by proper selection of the LADRC parameters [5].

In this work, the second-order LADRC was selected as control algorithm for FOPDT systems. The LADRC theoretical formulation in time domain and frequency domain, as well as the closed loop parameterization used for the development of the tuning rules are explained next.

#### *2.1. Time Domain Formulation*

Consider the following input-output model of a second order system.

$$
\ddot{y} = -a\_1 \dot{y} - a\_0 y + bu\_\prime \tag{1}
$$

where *y* is the controlled output, *u* is the control action, *a*<sup>0</sup> and *a*<sup>1</sup> are constants determining the location of the system poles and *b* is known as critical gain.

The state space representation of (1) is given by (2), where *w* has been included to indicate the load disturbances acting on the system.

$$\begin{cases} \dot{\mathbf{x}}\_1 = \mathbf{x}\_2\\ \dot{\mathbf{x}}\_2 = -a\_0 \mathbf{x}\_1 - a\_1 \mathbf{x}\_2 + bu + w\\ y = \mathbf{x}\_1. \end{cases} \tag{2}$$

In the case that *a*<sup>0</sup> and *a*<sup>1</sup> are unknown, the first two terms in the right side of the expression for *x*˙2 can be lumped in a function called total perturbation which also includes load disturbances and the difference between the real value of *b* and its known nominal value denoted by *b*0. Thus,

$$f = -a\_0 \mathbf{x}\_1 - a\_1 \mathbf{x}\_2 + (b - b\_0)\mu + w. \tag{3}$$

The model (4) is obtained by replacing (3) in (2).

$$\begin{cases} \begin{aligned} \dot{\mathbf{x}}\_1 &= \mathbf{x}\_2 \\ \dot{\mathbf{x}}\_2 &= f + b\_0 \mu \\ y &= \mathbf{x}\_1. \end{aligned} \end{cases} \tag{4}$$

As the total perturbation is an unknown function, *f* is treated as an additional state that must be estimated and compensated by the control loop. The resulting extended state space model with *x*<sup>3</sup> *f* and *h* = ˙ *f* unknown is

$$\begin{cases} \begin{aligned} \dot{\mathbf{x}}\_1 &= \mathbf{x}\_2 \\ \dot{\mathbf{x}}\_2 &= \mathbf{x}\_3 + b\_0 u \\ \dot{\mathbf{x}}\_3 &= h \\ y &= \mathbf{x}\_1 \end{aligned} \end{cases} \tag{5}$$

The estimation of states in (5) is achieved through the Linear Extended State Observer (LESO) (6) whose inputs are the measured output *y* and the control action *u*. The *zi* correspond to the estimated states and *Li* are the observer gains. Note that, although the LESO has a similar structure to a traditional observer, it estimates not only the system states but also the information of the total perturbation contained in *z*3. In contrast with the traditional observer, the LESO keeps the required amount of plant information to a minimum. The analysis of convergence and experimental validation of LESO are addressed in [19].

$$\begin{cases} \dot{z}\_1 = z\_2 + L\_1(y - z\_1) \\ \dot{z}\_2 = z\_3 + b\_0 u + L\_2(y - z\_1) \\ \dot{z}\_3 = L\_3(y - z\_1). \end{cases} \tag{6}$$

According to Figure 1, the control law acting on the real plant is

$$
\mu = \frac{u\_0 - z\_3}{b\_0}.\tag{7}
$$

Therefore, the double integrator (8) is obtained by replacing (7) in (4) and assuming that *z*<sup>3</sup> ≈ *f* .

$$\begin{cases} \dot{\mathbf{x}}\_1 = \mathbf{x}\_2\\ \dot{\mathbf{x}}\_2 = \mathbf{u}\_0\\ y = \mathbf{x}\_1 \end{cases} \tag{8}$$

Equation (8) represents a disturbance-free modified plant which is controlled by the feedback law

$$u\_0 = k\_1(\overline{r} - z\_1) - k\_2 z\_2,\tag{9}$$

where *r*˜ is the setpoint and *k*<sup>1</sup> and *k*<sup>2</sup> are gains selected taking into account the desired closed loop performance. Note that *r*˜ has been set as the reference in (9). This can be done in practice if the tracking differentiator is omitted or the setpoint derivatives are unbounded [20].

#### *2.2. Frequency Domain Formulation*

The block diagram from Figure 1 can be reformulated as the two degree-of-freedom configuration of Figure 2. The direct loop transfer function *GC*(*s*) and the feedback transfer function *GF*(*s*) are derived as follows.

**Figure 2.** 2-degree-of-freedom (DOF) configuration of ADRC.

The linear extended state observer (6) in frequency domain is given by

$$\begin{cases} sZ\_1 = Z\_2 + L\_1(Y - Z\_1) \\ sZ\_2 = Z\_3 + b\_0lI + L\_2(Y - Z\_1) \\ sZ\_3 = L\_3(Y - Z\_1)\_r \end{cases} \tag{10}$$

where *s* is the complex variable, *Y* is the Laplace transform of the output, *U* is the Laplace transform of the control action and *Zi* are the Laplace transforms of the states.

The expressions (11)–(13) are obtained by solving the system of Equation (10).

$$Z\_1 = \frac{b\_0 \text{s}}{\text{s}^3 + L\_1 \text{s}^2 + L\_2 \text{s} + L\_3} \mathcal{U} + \frac{(L\_1 \text{s}^2 + L\_2 \text{s} + L\_3)}{\text{s}^3 + L\_1 \text{s}^2 + L\_2 \text{s} + L\_3} \mathcal{Y} \tag{11}$$

$$Z\_2 = \frac{b\_0(s^2 + sL\_1)}{s^3 + L\_1s^2 + L\_2s + L\_3} \mathcal{U} + \frac{(L\_2s^2 + L\_3s)}{s^3 + L\_1s^2 + L\_2s + L\_3} \mathcal{Y} \tag{12}$$

$$Z\_3 = \frac{-L\_3 b\_0}{s^3 + L\_1 s^2 + L\_2 s + L\_3} lI + \frac{L\_3 s^2}{s^3 + L\_1 s^2 + L\_2 s + L\_3} Y. \tag{13}$$

The control action (14) is deduced by combining the frequency domain expressions of (7) and (9), with *R* being the Laplace transform of the reference.

$$
\delta L = \frac{1}{b\_0} (k\_1 R - k\_1 Z\_1 - k\_2 Z\_2 - Z\_3). \tag{14}
$$

Therefore, substituting (11)–(13) in (14) and reorganizing terms, *U* is rewritten as

$$\begin{split} II &= \frac{k\_1}{b\_0} \left[ \frac{s^3 + L\_1 s^2 + L\_2 s + L\_3}{s^3 + (L\_1 + k\_2)s^2 + (k\_2 L\_1 + L\_2 + k\_1)s} \right] \mathbb{R} \\ &- \left[ \frac{(k\_1 L\_1 + k\_2 L\_2 + L\_3)s^2 + (k\_1 L\_2 + k\_2 L\_3)s + k\_1 L\_3}{b\_0 (s^3 + (L\_1 + k\_2)s^2 + (k\_2 L\_1 + L\_2 + k\_1)s)} \right] \mathbb{Y} .\end{split} \tag{15}$$

From Figure 2 and in the absence of load disturbance (*d* = 0)

$$
\delta I = G\_{\mathbb{C}}(\mathbf{s})R - G\_{\mathbb{C}}(\mathbf{s})G\_{\mathbb{F}}(\mathbf{s})\mathbf{Y}.\tag{16}
$$

Hence, the resulting direct loop transfer function (17) and the feedback transfer function (18) are obtained comparing the factors of *R* and *Y* in (15) with those in (16).

$$G\_{\mathbb{C}}(s) = \frac{k\_1}{b\_0} \left( \frac{s^3 + L\_1 s^2 + L\_2 s + L\_3}{s^3 + (L\_1 + k\_2)s^2 + (k\_2 L\_1 + L\_2 + k\_1)s} \right) \tag{17}$$

$$G\_F(\mathbf{s}) = \frac{(k\_1 L\_1 + k\_2 L\_2 + L\_3)\mathbf{s}^2 + (k\_2 L\_3 + k\_1 L\_2)\mathbf{s} + k\_1 L\_3}{k\_1(\mathbf{s}^3 + L\_1\mathbf{s}^2 + L\_2\mathbf{s} + L\_3)}.\tag{18}$$

Finally, the transfer function from output to load disturbance is

$$G\_D(s) = \frac{G(s)}{1 + G(s)G\_C(s)G\_F(s)}\tag{19}$$

and the transfer function from control action to output is

$$G\_{ll}(\mathbf{s}) = -G\_{\mathbb{C}}(\mathbf{s})G\_{\mathbb{F}}(\mathbf{s}).\tag{20}$$

Equation (19) describes the system response to a load disturbance and (20) represents the LADRC transfer function for disturbance rejection.

#### *2.3. Control Loop Parameterization*

The control loop parameterization seeks a set of parameters that allows the computation of the complete set of LADRC gains. In addition, if an LADRC is designed for the control of a nominal system (e.g., a nominal FOPDT system), the loop parameterization also allows the parameters scaling in order to make the controller suitable for other systems of the same nature.

Consider the following theorem related to the scaling and bandwidth parameterization of the LADRC loop.

**Theorem 1.** *[4] Assuming Ga*(*s*) *is a stabilizing controller for plant Gn*(*s*) *and the loop gain crossover frequency is ωc, then the controller*

$$\bar{\mathbf{G}}\_{\rm H}(\mathbf{s}) = \frac{1}{k} \mathbf{G}\_{\rm H} \left( \frac{\mathbf{s}}{\omega\_p} \right) \tag{21}$$

*will stabilize the plant <sup>G</sup>*¯*n*(*s*) = *kGn*(*s*/*ωp*) *and the new loop gain* <sup>L</sup>¯(*s*) = *<sup>G</sup>*¯*n*(*s*)*G*¯ *<sup>a</sup>*(*s*) *will have a bandwidth of ωcωp, and the same stability margins of* L(*s*) = *Gn*(*s*)*Ga*(*s*)*.*

In (21), *k* represents the gain scaling of plant *kGn*(*s*) respect to *Gn*(*s*) and *ω<sup>p</sup>* is the frequency scaling of plant *Gn*(*s*/*ωp*) respect to *Gn*(*s*).

Let *GA*(*s*) be the transfer function obtained by multiplying *GC*(*s*) and *GF*(*s*) in the right hand side of (20). This is,

$$G\_{A}(\mathbf{s}) = \frac{(k\_{1}L\_{1} + k\_{2}L\_{2} + L\_{3})\mathbf{s}^{2} + (k\_{2}L\_{3} + k\_{1}L\_{2})\mathbf{s} + k\_{1}L\_{3}}{b\_{0}(\mathbf{s}^{3} + (L\_{1} + k\_{2})\mathbf{s}^{2} + (L\_{2} + k\_{2}L\_{1} + k\_{1})\mathbf{s})}.\tag{22}$$

Equation (22) is function of *b*0, the observer gains *Li* and the controller gains *ki*. The bandwidth parameterization is used to reduce the calculation of the *Li* to the selection of the parameter *ω<sup>o</sup>* named observer bandwidth. Likewise, the *ki* values are made dependent on the parameter *ω<sup>c</sup>* known as controller bandwidth.

Consider the state space representation of the extended model (5)

$$
\begin{bmatrix}
\dot{\mathbf{x}}\_1 \\
\dot{\mathbf{x}}\_2 \\
\dot{\mathbf{x}}\_3
\end{bmatrix} = \underbrace{\begin{bmatrix}
0 & 1 & 0 \\
0 & 0 & 1 \\
0 & 0 & 0
\end{bmatrix}}\_A \begin{bmatrix}
\mathbf{x}\_1 \\
\mathbf{x}\_2 \\
\mathbf{x}\_3
\end{bmatrix} + \underbrace{\begin{bmatrix}
0 \\
b\_0 \\
0 \\
\mathbf{b}
\end{bmatrix}}\_B \mathbf{u} + \underbrace{\begin{bmatrix}
0 \\
0 \\
1
\end{bmatrix}}\_E \mathbf{h} \tag{23}
$$

$$
\mathbf{y} = \underbrace{\begin{bmatrix}
1 & 0 & 0 \\
1 & 0 & 0
\end{bmatrix}}\_C \begin{bmatrix}
\mathbf{x}\_1 \\
\mathbf{x}\_2 \\
\mathbf{x}\_3
\end{bmatrix}
$$

whose matrix form is

$$
\dot{\mathbf{x}} = A\mathbf{x} + Bu + Eh \tag{24}
$$

$$
\mathbf{y} = \mathbf{C}\mathbf{x},
$$

with *x* = [*x*<sup>1</sup> *x*<sup>2</sup> *x*3] . Similarly, the matrix form of observer (6) is given by (25) with *z* = [*z*<sup>1</sup> *z*<sup>2</sup> *z*3] and *L* = [*L*<sup>1</sup> *L*<sup>2</sup> *L*3] .

$$
\dot{z} = Az + Bu + L(\mathbb{C}x - \mathbb{C}z).\tag{25}
$$

Let *e* = *x* − *z* be the estimation error. Its dynamic behavior is given by (26) and it is obtained after subtracting (25) from (24).

$$
\dot{\varepsilon} = (A - L\mathbb{C})\varepsilon + Eh.\tag{26}
$$

Assuming that *h*, even it is unknown, it is also differentiable and bounded, the observer gains can be calculated through pole placement. In [4], it is proposed that the three poles be located at position −*ω<sup>o</sup>* in the left semi-plane such as

$$sI - (A - L\mathbb{C}) = (s + \omega\_o)^3. \tag{27}$$

Thus, the parameterization of the observer gains (28) is obtained as a function of *ω<sup>o</sup>* by solving for both sides of (27) and comparing factors.

$$L\_1 = 3\omega\_o \quad L\_2 = 3\omega\_o^2 \quad L\_3 = \omega\_o^3. \tag{28}$$

On the other hand, the controller gains design takes into account the frequency representation of the modified plant (8) and the control action (9) to obtain the closed loop transfer function

$$G\_{\varGamma}(s) = \frac{k\_1}{s^2 + k\_2s + k\_1}.\tag{29}$$

According to the characteristic equation of (29), the closed loop poles depends on selection of the gains *k*<sup>1</sup> and *k*2. Then, following the approach from [4], the poles are located at −*ω<sup>c</sup>* as in (30) and the controller gains parameterization of (31) is derived.

$$s^2 + k\_2s + k\_1 = (s + \omega\_\mathcal{E})^2\tag{30}$$

$$k\_1 = \omega\_\varepsilon^2 \quad k\_2 = 2\omega\_\varepsilon. \tag{31}$$

The bandwidth parameterization from (28) and (31) is used in (22) to obtain

$$\mathcal{G}\_A(\mathbf{s}) = \frac{(3\omega\_c^2\omega\_o + 6\omega\_c\omega\_o^2 + \omega\_o^3)\mathbf{s}^2 + (2\omega\_c\omega\_o^3 + 3\omega\_c^2\omega\_o^2)\mathbf{s} + \omega\_c^2\omega\_o^3}{b\_0[\mathbf{s}^3 + (3\omega\_o + 2\omega\_c)\mathbf{s}^2 + (3\omega\_o^2 + 6\omega\_c\omega\_o + \omega\_c^2)\mathbf{s}]}.\tag{32}$$

Therefore, by proper selection of *b*0, *ω<sup>c</sup>* and *ωo*, the second-order LADRC estimates and rejects the load disturbances acting on the loop.

Now, let the following FOPDT system be the plant to be controlled

$$G(\mathbf{s}) = \frac{K}{T\mathbf{s} + \mathbf{1}} e^{-l\mathbf{s}}\,, \tag{33}$$

where *K* is the static gain, *T* is the apparent time constant and *l* is the apparent delay or dead time [21].

If *Gn*(*s*) is considered as a nominal FOPDT plant, then, following the scaling and bandwidth parameterization theorem [see (21)], the model (33) can be treated as a scaled version of (34) in which *k* = *K*, *ω<sup>p</sup>* = 1/*T* and Θ = *l*/*T* as shown in (35).

$$G\_{\rm II}(s) = \frac{1}{s+1} e^{-\Theta s} \tag{34}$$

$$G(s) = K \left( \frac{1}{\frac{s}{1/T} + 1} \right) e^{-\frac{l}{T} \frac{s}{1/T}}.\tag{35}$$

Hence, through some mathematical manipulation, the scaled controller *G*¯ *<sup>A</sup>*(*s*) = (1/*k*)*GA*(*s*/*ωp*) leads to the definition of the new set of LADRC parameters

$$
\bar{h}\_0 = \frac{Kb\_0}{T^2} \quad \bar{\omega}\_0 = \frac{\omega\_c}{T} \quad \bar{\omega}\_0 = \frac{\omega\_o}{T}. \tag{36}
$$

In conclusion, if a stable second-order LADRC with parameters *b*0, *ω<sup>c</sup>* and *ω<sup>o</sup>* is designed for the nominal system (34), then, the scaled LADRC with parameters ¯ *b*0, *ω*¯ *<sup>c</sup>* and *ω*¯ *<sup>o</sup>* is suitable for the control of the general FOPDT plant (33).

#### **3. Multiobjective Optimization Design Procedure**

In this section, the generalities of the multiobjective optimization approach used to address the LADRC tuning problem are presented. Particularly, the steps of a Multiobjective Optimization Design (MOOD) procedure are briefly explained and the pertinence of this approach for the tuning problem is explored by means of a numerical example.

When designing a controller, the tuning process or solution obtained is strongly dependent on the desired performance for the closed loop. The behavior of the output, control action, and any other signals of interest is usually measured through some performance indices or design objectives. If these indices are wanted to be minimized or maximized, then, an optimization statement can be formulated.

For each minimized or maximized index, a particular solution is obtained. Therefore, if different design objectives are optimized simultaneously, then, multiple solutions can be suitable for the tuning of the same controller, not implying that one is better than the other, but suggesting that a solution can be selected with a particular trade-off among the aforementioned conflicting objectives. In this case, if the designer is interested, for example, in the simultaneous minimization of two performance indices, a MOOD procedure could aid in the tuning problem.

A MOOD procedure comprises three fundamental steps [22].


As an example, Figure 3 illustrates the concepts of Pareto dominance, Pareto Front and Pareto Set for the biobjective optimization problem min*<sup>θ</sup> J*(*θ*)=[*J*1(*θ*), *J*2(*θ*)] with decision variables *θ* = [*θ*1, *θ*2]. The decision vectors *θ*1, ..., *θ*<sup>5</sup> dominates the vectors *θ*<sup>6</sup> and *θ*<sup>7</sup> because the objective vectors *J*(*θ*1), ..., *J*(*θ*5) are not worse than *J*(*θ*6), *J*(*θ*7) in both objectives and are better in at least one objective.

In order to explore the suitability of the multiobjective optimization approach for the LADRC tuning problem, the responses to an unitary step load disturbance (*r*˜ = 0, *d* = 1) and to an unitary step setpoint (*r*˜ = 1, *d* = 0) of the closed loop of Figure 2 with *G*(*s*) as (37) were obtained for different combinations of the three LADRC tuning parameters in the search space: *b*<sup>0</sup> ∈ [5, 35], *ω<sup>c</sup>* ∈ [1, 25] rad/s, *ω<sup>o</sup>* ∈ [1, 25] rad/s, and following a grid method with Δ*b*<sup>0</sup> = 1 and Δ*ω<sup>o</sup>* = Δ*ω<sup>c</sup>* = 0.2 rad/s.

$$G\_{\mathfrak{e}}(\mathbf{s}) = \frac{1}{\mathfrak{s} + 1} \mathfrak{e}^{-\mathfrak{s}}.\tag{37}$$

Initially, the LADRC stability region was analyzed. Figure 4 shows the pairs (*ωc*, *ωo*) for the critical gain nominal values *b*<sup>0</sup> = 5, 15, 35 that produce a stable output in system (37). From this figure, it is noted that as the nominal value of the critical gain increases, more pairs (*ωc*, *ωo*) appears in the stability region which represent more possible combinations for the LADRC tuning. In other words, there exists a stability bound that moves in the (*ωc*, *ωo*) increasing direction as a higher value of *b*<sup>0</sup> is selected.

**Figure 3.** Pareto dominance, Pareto Front and Pareto set in a bidimensional case. There are no solution vectors dominating *θ*1, ..., *θ*<sup>5</sup> so these solutions are the approximation of the Pareto Set and their corresponding objective vectors *J*(*θ*1), ..., *J*(*θ*5) are the approximation of the Pareto Front.

**Figure 4.** Closed loop stability regions for *Ge*(*s*). Each point in the region represents a combination of parameters producing a stable output. For each value of *b*<sup>0</sup> ∈ [5, 35] there exist pairs (*ωc*, *ωo*) that produce a stable output. The *b*<sup>0</sup> = 5, 15, 35 values are plotted as examples to illustrate the shape and behavior of the stability region.

Once the LADRC stability region was obtained, interest was put in the performance computed with those combinations of parameters. Particularly, the ITSE for load disturbance rejection, the robustness, and the Total Variation of control action (TV) were defined as design objectives as stated in Table 1.



Closed loop robustness is usually measured through the maximum peak of the sensitivity function MS and the maximum peak of the complementary sensitivity function MT such as 1.3 < MS < 2 and MT < 1.25 [23]. In this work, a robustness measure denoted by *ε* is adopted which is defined in [24] as the structured singular value of matrix *M* from a *M* − Δ configuration with a diagonal block structure.

The *ε* index has been previously used in [14] to quantify the robust stability of the closed loop system with the LADRC and is computed as the maximum peak of the sum of the magnitudes of the frequency responses of the sensitivity function *S*(*jω*) and the complementary sensitivity function *T*(*jω*). The lower the value of *ε*, the more robust the closed loop system.

A first look at the minimum ITSE value inside the stability region shows that ITSEmin1 = 0.82 for the solution *b*<sup>01</sup> = 17, *ωc*<sup>1</sup> = 1.8 rad/s, *ωo*<sup>1</sup> = 23.6 rad/s. However, the associated robustness of *ε*<sup>1</sup> = 5.93 is regarded as poor. If the constraint *ε* ≤ 3 is imposed on the robustness index, then a new solution *b*<sup>02</sup> = 24, *ωc*<sup>2</sup> = 2 rad/s, *ωo*<sup>2</sup> = 21 rad/s is found with an ITSEmin2 = 1.13 and a corresponding robustness of *ε*<sup>2</sup> = 2.99.

On the other hand, a search for the most robust controller results in the parameters *b*<sup>03</sup> = 15, *ωc*<sup>3</sup> = 19.8 rad/s, *ωo*<sup>3</sup> = 1 rad/s which produce *ε*min3 = 1.38 but with a extremely high ITSE value of ITSE3 = 113.51. Also, if the ITSE is constrained such as ITSE ≤ 2, then the new solution is *b*<sup>04</sup> = 19, *ωc*<sup>4</sup> = 21 rad/s, *ωo*<sup>4</sup> = 2.8 rad/s with a robustness *ε*min4 = 2.02 and a time performance index ITSE4 = 1.99.

Table 2 comprises the solutions and performance comparison discussed above. Some additional indices as MS, MT, total variation of control action for disturbance rejection (TV*d*), and total variation of control action for setpoint following (TV*s*) are included as complementary information. Note that each of the LADRC set of parameters can be considered as optimal only respect to the corresponding minimized index. For example, the solution (*b*02, *ωc*2, *ωo*2) is optimal respect to the ITSE, but the robustness obtained is the maximum allowed according to the constraint.



In addition to the solutions reported in Table 2, there are other sets of LADRC parameters within the stability region that offer a compromise between disturbance rejection, quantified by ITSE, and robustness. To search for these alternatives, the Pareto dominance definition was applied over the total of parameters combinations, restricting the robustness measure to the range *ε* ∈ [2, 3] which represents a maximum sensitivity in the range MS ∈ [1.3, 2] and a maximum complementary sensitivity in the interval MT ∈ [1, 1.4].

Figure 5a shows the Pareto Front approximation for the simultaneous minimization of ITSE for disturbance rejection and robustness. As expected, the ITSE can not be improved (decreased) without weakening the robustness. Likewise, a more robust closed loop system is possible as long as the ITSE value is allowed to increase. The solutions (*b*02, *ωc*2, *ωo*2) and (*b*04, *ωc*4, *ωo*4) from Table 2 would be located around the upper and bottom ends of the Pareto Front approximation, respectively.

**Figure 5.** Pareto Fronts and Pareto Sets approximations for minimization of two design objectives *J*<sup>1</sup> and *J*2. (**a**) the Pareto Front approximation for the simultaneous minimization of ITSE for disturbance rejection and robustness. (**b**) the Pareto Front approximation for minimization of ITSE and TV for disturbance rejection (TV*d*). (**c**) the approximation of the Pareto Front when the ITSE for disturbance rejection is minimized simultaneously with the TV of the unitary setpoint (TV*s*). (**d**) the Pareto Sets approximations for the three said cases.

From other point of view, Figure 5b is the Pareto Front approximation for minimization of ITSE and TV for disturbance rejection (TV*d*) and Figure 5c is the approximation of the Pareto Front when the ITSE for disturbance rejection is minimized simultaneously with the TV of the unitary setpoint (TV*s*). This figures show that there is also a compromise between the ITSE performance and the control efforts.

Finally, the Pareto Sets approximations for the three said cases are presented in Figure 5d. Note that the optimal values for the nominal critical gain are higher than *b*<sup>0</sup> = 1, which would be the nominal value (*b*<sup>0</sup> = *K*/*T*) computed from the model (37), as is commonly suggested in literature. Moreover, in the solutions with a compromise between ITSE and robustness, the controller bandwidth can be selected to be greater than the observer bandwidth (*ω<sup>c</sup>* > *ωo*) or vice versa (*ω<sup>c</sup>* < *ωo*). Nevertheless, for a compromise between ITSE and the total variation of the control action, a selection of parameters in which *ω<sup>c</sup>* < *ω<sup>o</sup>* seems more appropriated.

The case study addressed in this section gave some insight into the LADRC performance in the control of a FOPDT system. In summary, there exist a trade-off between the disturbance rejection performance of the LADRC and its robustness. The LADRC parameters that produce this compromise are Pareto optimal and can be searched through an optimization process were the objectives related to disturbance rejection and robustness are minimized simultaneously. Besides, the definition of constraints over the objective and search spaces could drive the optimization process to solutions that meet some desired additional performance. If the aforementioned optimization procedure is applied over a group of plants of the same kind, then the Pareto optimal alternatives could be used to derive tuning rules reflecting the desired trade-off.

#### **4. LADRC Tuning by Multiobjective Optimization**

For the tuning problem of the second-order LADRC related to the control of FOPDT systems, a MOOD procedure was applied to a group of nominal plants in the form of (34) which was obtained by varying the nominal delay from Θ = 0.5 to Θ = 5 with a change of ΔΘ = 0.1.

The FOPDT systems can be characterized based on the normalized dead time *τ* = *l*/(*l* + *T*) with 0 ≤ *τ* ≤ 1 [25]. Particularly, a system is lag-dominated if *τ* is small, balanced if *τ* is around 0.5 and delay-dominated if *τ* is large [26]. In terms of the nominal delay, *τ* can be written as

$$
\pi = \frac{\Theta}{\Theta + 1}.\tag{38}
$$

Thus, the MOOD procedure was applied to plants with *τ* ranging from 0.09 to 0.83, which includes lag-dominated, balance, and delay-dominated processes. The MOOD results were used to fit the optimal solutions for the LADRC parameters and the fitting curves were scaled to obtain the tuning rules as functions of the known FOPDT parameters. In this section, each step of the MOOD procedure and the data processing of solutions are explained in depth.

#### *4.1. MultiObjective Problem Definition*

The first stage of the MOOD procedure implies the definition of the decision space, the objective space, and the possible constraints. The decision variables are selected from the parametric controller; the objective space is related to the desired performance, and finally, constrains are the design limitations imposed on the overall concept.

The plant to be controlled corresponds to the FOPDT nominal model (34). Note that any controller designed for this plant can be scaled afterwards according to (36).

The following scaling for observer bandwidth were also adopted:

$$
\omega\_o = k\_o \omega\_c \text{ } k\_o > 1 \text{ } \tag{39}
$$

which indicates that LADRC parameters meeting the relation *ω<sup>c</sup>* < *ω<sup>o</sup>* are preferred. This additional scaling is commonly suggested in literature (e.g., in [4,11,12]).

The transfer function (40) is obtained by substituting (39) in (32).

$$G\_{A}(s) = \frac{(3k\_{o}\omega\_{c}^{3} + 6k\_{o}^{2}\omega\_{c}^{3} + k\_{o}^{3}\omega\_{c}^{3})s^{2} + \left(2k\_{o}^{3}\omega\_{c}^{4} + 3k\_{o}^{2}\omega\_{c}^{4}\right)s + k\_{o}^{3}\omega\_{c}^{5}}{b\_{0}[s^{3} + (3k\_{o}\omega\_{c} + 2\omega\_{c})s^{2} + (3k\_{o}^{2}\omega\_{c}^{2} + 6k\_{o}\omega\_{c}^{2} + \omega\_{c}^{2})s]}. \tag{40}$$

Choosing a value of *ko* = 10, the corresponding controller to tune is

$$G\_A(s) = \frac{1630\omega\_c^3 s^2 + 2300\omega\_c^4 s + 1000\omega\_c^5}{b\_0(s^3 + 32s^2 + 361\omega\_c^2 s)},\tag{41}$$

with the decision variables:

$$
\theta = [b\_{0\prime} \,\omega\_{\mathcal{C}}].\tag{42}
$$

Two design objectives were selected: the ITSE for the response to a unitary step load disturbance and the mixed robustness index *ε*. Thus, the complete multiobjective problem is stated as

$$\min\_{\theta} J(\theta) = [J\_1(\theta), J\_2(\theta)] \tag{43}$$

$$J\_1(\theta) = \text{ITSE}(\theta) \tag{44}$$

$$J\_2(\theta) = \varepsilon(\theta) \tag{45}$$

$$\theta = [b\_{0\prime} \,\omega\_{\mathcal{L}}]\_{\prime} \tag{46}$$

subject to

Stable in closed loop

$$\begin{array}{ccccc} & f\_1(\theta) & \le & \text{ITSE}\_{\text{SIMC}} \\ 2 & \le & f\_2(\theta) & \le & 3 \\ 1 & \le & b\_0 & \le & 200 \\ 0.1 & \le & \omega\_c & \le & 20 \end{array} \tag{47}$$

The constraints on design objectives were selected taking into account the performances offered over the group of nominal plants by classical PID tuning rules as IMC [27], SIMC [28], and AMIGO [29], and the LADRC tuning method from [14]. The upper limit of *J*1(*θ*) was set as the ITSE value obtained with the SIMC approach such that the desired closed loop time constant was equal to the apparent delay *l*. The SIMC tuning produced the highest ITSE for each plant compared to the LADRC from [14] and the other PID controllers.

Similarly, the lower limit of *J*2(*θ*) is the approximation of the robustness obtained with the AMIGO tuning rules, and its upper limit is approximately the robustness computed with the IMC method. The other controllers offer a robustness measure between these limits for all plants. What is more, the *ε*(*θ*) limits are related to the commonly adopted limits for maximum sensitivity and maximum complementary sensitivity.

The search space for decision variables was specified following the results from Section 3 where it was shown that to increase *b*<sup>0</sup> contributes to a bigger stability region in terms of the bandwidths and, as a consequence, lower performance indices can be computed.

#### *4.2. Optimization Process*

The evolutionary multiobjective algorithm− MOGA [30] was used to perform the optimization process. This algorithm uses the epsilon-dominance concept to obtain Pareto Front and Pareto Set approximations with limited memory resources and preserving the diversity of the Front by adjusting its limits dynamically [31]. The algorithm parameters were set to 200 individuals for main population, 8 individuals for auxiliary population, 1000 generations and 1000 divisions per dimension.

The Pareto Fronts and Pareto Sets approximations obtained for the complete group of nominal plants are presented in Figure 6. From Figure 6b, an interesting behavior is observed. The range of the decision variables for plants with *τ* ≤ 0.5 is wider than for plants with *τ* > 0.5. For instance, a robustness measure between 2 and 3 can be obtained for the plant with *τ* = 0.09 if the LADRC parameters are selected in the ranges *b*<sup>0</sup> ∈ [86, 115], *ω<sup>c</sup>* ∈ [11.6, 6.6], whereas the same variation in robustness for plant with *τ* = 0.833 is achieved with *b*<sup>0</sup> ∈ [6.2, 9.2], *ω<sup>c</sup>* = [0.73, 0.71]. Another important feature is the decreasing trend in the decision variables as the normalized delay increases. However, the rate of change in both parameters tends to be greater for plants with *τ* ≤ 0.5 than for plants with *τ* > 0.5.

(**b**) Pareto Sets approximations

**Figure 6.** Results from the optimization process for the complete group of nominal plants. Pareto Sets approximations for plants with *τ* ≤ 0.5 (black) show that the LADRC parameters for this group have a wider range of variation and the rate of change in both parameters is greater compared to plants with *τ* > 0.5 (gray). An inset showing the Pareto Sets approximations for plants with *τ* > 0.5 is included for better visualization.

#### *4.3. Multicriteria Decision Making*

Once the Pareto Fronts and Pareto Sets approximations have been obtained, the last step in the MOOD procedure is the selection of the solution or candidate solutions preferred by the designer. Even if most of the preferences were taken into account in the optimization process, a final selection is needed. Depending on the number of design objectives, the visualization and graphical interpretation of the Pareto Front approximation is crucial. Some novel ideas to rank the potential solutions obtained by evolutionary algorithms in application to engineering problems are exposed in [32]. Likewise, an approach to the knee solution of the Pareto Front approximation for optimization problems with many objectives is addressed in [33].

According to the results from the optimization process, the following aspects were considered for the decision making stage.


Consider the first group of nominal plants (*Group 1*). In order to select the three desired design alternatives, let the Pareto Fronts to be divided in two regions according to bounds imposed on the mixed robustness measure. The upper region comprises solutions for which 2.5 ≤ *ε*(*θ*) ≤ 3 and the lower region includes those with 2 ≤ *ε*(*θ*) < 2.5.

On each region, a point corresponding to the Nash solution was calculated by solving the problem [34]:

$$\max\_{\left(f\_1(\theta), f\_2(\theta)\right)} \left( f\_1\left(\theta^2\right) - f\_2(\theta) \right) \left( f\_2\left(\theta^1\right) - f\_1(\theta) \right), \tag{48}$$

where *J*<sup>1</sup> *θ*2 is the optimal value (minimum) of the first design objective and *J*<sup>2</sup> *θ*1 is the point that minimizes the second cost function. The Nash solution (*J*1(*θ*), *J*2(*θ*)) is considered a *fair* selection because it dominates the larger number of points in the rectangular area *J*1 *θ*2 − *J*2(*θ*) *J*<sup>2</sup> *θ*2 − *J*1(*θ*) [34].

The third solution for *Group 1* was selected as the midpoint of the Pareto Fronts. This is, the solution meeting the condition *ε*(*θ*) = 2.5.

For the second group of plants (*Group 2*) the three selected solutions corresponds to the two ends of the front and the Nash solution.

Figure 7 illustrates the concepts explained and solutions selected taking as an example the Pareto Fronts approximations of the nominal plants with *τ* = 0.5 (*Group 1*) and *τ* = 0.75 (*Group 2*).

The complete set of Pareto Fronts approximations and selected solutions are presented in Figure 8. For comparison purposes, the performance obtained with the PID tuning methods IMC, SIMC, AMIGO, and the rules from [34] (SNS) are included for *group 1*. For *group 2*, the Pareto alternatives are compared with the SIMC and AMIGO approaches. Performance corresponding to the LADRC tuning rules from [14] (ADRCZ) are also shown for both groups. Note that the fronts move to the right in the objective space as the normalized delay increases. From this figure, the following remarks are derived.

**Figure 7.** Location of the selected solutions into the Pareto Fronts approximations taking as example two nominal plants. (**a**) For plants in *Group 1*, selected solutions are the Nash solution from upper region NS1, the midpoint MP, and the Nash solution from lower region NS2. (**b**) For plants in *Group 2* the selected solutions are the upper end UP, the Nash solution NS, and the bottom end BP.


With the MOOD procedure developed for the tuning problem of the second-order LADRC applied to FOPDT nominal systems, a set of Pareto optimal solutions with a trade-off between disturbance rejection and robustness was obtained. The distribution of these solutions in the decision search space can lead to different fitting curves depending on the preferred level of compromise between objectives. This idea is the core of the fitting procedure presented in the next section.

**Figure 8.** Pareto Fronts approximations and selected solutions for the complete set of nominal plants. Performance points obtained with the PID tuning methods IMC, SIMC, AMIGO, and SNS [34] as well as the LADRC tuning rules from [14] (ADRCZ) are included for comparison. The SIMC points have been excluded from (**b**) for proper visualization because these alternatives are always dominated by the Pareto optimal solutions. Information related to the same plant has been plotted in the same color.

#### **5. Tuning Rules for LADRC**

The solutions obtained from the MOOD procedure correspond to the Pareto optimal LADRC parameters suitable to control FOPDT plants in the form of (34). These data were initially fitted to functions of the normalized delay *τ*. Afterwards, the resulting expressions were scaled to obtain the LADRC tuning rules applicable to the control of the general FOPDT system (33).

Data were fitted separately for the two previously defined groups of plants. This was mainly because of the behavior observed in the rate of change of the parameters with respect to the variation in the normalized delay (see Figure 6b). Additionally, in each group, the three optimal solutions selected were used to fit three curves related to different levels of robustness taking *τ* as independent variable. These levels of robustness were defined as follows.


The nominal values for the critical gain were fitted to power functions in the case of systems with *τ* ≤ 0.5 and to polynomial functions for systems with *τ* > 0.5 such as

$$b\_0 = \begin{cases} \left. k\_b \left( \frac{\tau}{1-\tau} \right)^{n\_b} \right|, & \tau \le 0.5 \\\\ a\_b \left( \frac{\tau}{1-\tau} \right)^2 + b\_b \left( \frac{\tau}{1-\tau} \right) + c\_{b\prime} & \tau > 0.5, \end{cases} \tag{49}$$

where *kb*, *nb*, *ab*, *bb* and *cb* are constants.

On the other hand, the controller bandwidth values were fitted for both groups to power functions of the form

$$
\omega\_{\varepsilon} = k\_{\omega} \left( \frac{\tau}{1 - \tau} \right)^{n\_{\omega}},
\tag{50}
$$

with *kω* and *nω* as constants.

The resultant fitting functions are presented in Figures 9 and 10, and the corresponding parameters for expressions (49) and (50) are reported in Table 3.

(**a**) Fitting for *Group 1* (*τ* ≤ 0.5)

(**b**) Fitting for *Group 2* (*τ* > 0.5)

**Figure 9.** Tuning for nominal values of the LADRC critical gain. Markers indicate the optimal solutions NS1 (), MP (), NS2 (). Lines are the fitting functions for robustness levels *ε*low (−−), *ε*med (··· ), *ε*high (-·-).

**Figure 10.** Tuning for LADRC controller bandwidth. Markers indicate the optimal solutions UP (), NS (), and BP (). Lines are the fitting functions for robustness levels *ε*low (−−), *ε*med (··· ), and *ε*high (-·-).

As last step in the data processing, (49) and (50) were substituted in the corresponding scaled parameters of (36) to obtain the general LADRC tuning rules

$$\bar{b}\_{0} = \begin{cases} \frac{K}{T^{2}} \left[ k\_{b} \left( \frac{\tau}{1-\tau} \right)^{n\_{b}} \right], & \tau \le 0.5 \\\\ \frac{K}{T^{2}} \left[ a\_{b} \left( \frac{\tau}{1-\tau} \right)^{2} + b\_{b} \left( \frac{\tau}{1-\tau} \right) + c\_{b} \right], & \tau > 0.5 \end{cases} \tag{51}$$
 
$$\tau = 1 \left[ \tau\_{\perp} \left( \tau \right)^{n\_{\omega}} \right] \tag{52}$$

$$
\bar{\omega}\_{\varepsilon} = \frac{1}{T} \left[ k\_{\omega} \left( \frac{\tau}{1 - \tau} \right)^{n\_{\omega}} \right] \tag{52}
$$

$$
\text{to } r \quad \text{or} \quad \omega\_{\varepsilon} \ge n\_{\omega, \gamma}
$$

$$
\bar{\omega}\_{\vartheta} = \frac{10}{T} \left[ k\_{\omega} \left( \frac{\tau}{1 - \tau} \right)^{n\_{\omega}} \right]. \tag{53}
$$

Equations (51)–(53) are now dependent on the three FOPDT plant parameters which can be easily obtained for many processes by identification techniques.

As a summary, in Table 3 a guide for the tuning of the LADRC for the control of FOPDT plants is presented. Each of the defined levels of robustness represents a compromise between this objective and the disturbance rejection performance. This way, the designer is provided with three closed loop stable candidate controllers that could be tested on the system for the final decision.

**Table 3.** LADRC tuning guide.

1. Approximate the process dynamics with the First Order Plus Dead Time (FOPDT) model

$$G(\mathbf{s}) = \frac{\mathbf{K}}{\mathbf{T}\mathbf{s} + 1} \mathbf{e}^{-ls}.$$

2. Compute the normalized dead time. Note that the resulting normalized dead time meets the condition 0 ≤ *τ* ≤ 1

$$
\tau = \frac{l}{T+l}.
$$



5. Substitute the coefficients selected in step 4, the static gain, and the apparent time constant in the following rules to compute the LADRC parameters

$$b\_{0} = \begin{cases} \frac{K}{T^{2}} \left[ k\_{b} \left( \frac{\tau}{1-\tau} \right)^{n\_{b}} \right], & \tau \le 0.5\\\\ \frac{K}{T^{2}} \left[ a\_{b} \left( \frac{\tau}{1-\tau} \right)^{2} + b\_{b} \left( \frac{\tau}{1-\tau} \right) + c\_{b} \right], & \tau > 0.5 \end{cases} \\ \phi\_{\varepsilon} = \frac{1}{T} \left[ k\_{\omega} \left( \frac{\tau}{1-\tau} \right)^{n\_{\omega}} \right] \\ \text{ } \phi\_{\sigma} = \frac{10}{T} \left[ k\_{\omega} \left( \frac{\tau}{1-\tau} \right)^{n\_{\omega}} \right].$$

6. Implement the second-order LADRC using the time domain or the frequency domain formulation.

Furthermore, the designer could vary the values of the LADRC parameters in the intervals obtained based on the proposed rules to adjust the performance according to the preferences. To help in this task, the tuning tool of Figure 11 has been developed in Matlab App Designer and is available at Matlab Central [18]. It requires as inputs the FOPDT model and through interaction with robustness level and manual tuning sliders, the user

can visualize the closed loop response and evaluate the second-order LADRC performance with the aid of some measures.

**Figure 11.** LADRC tuning tool. This Matlab App allows the automatic computation of the nominal value of the critical gain *b*0, the controller bandwidth *ωc*, and the observer bandwidth *ω<sup>o</sup>* of the second-order LADRC for the control of a system approximated by a FOPDT model. Available at [18].

The tuning rules proposed in this section together with the developed tuning tool allow some degree of the designer involvement in the final selection of the LADRC parameters, but eliminates the time and complexity of performing the entire optimization process. The parameters computed by the proposed rules ensure closed loop stability as well as a reasonable compromise between disturbance rejection and loop robustness.

#### **6. Validation of the LADRC Tuning Rules**

In this section, two examples are presented to validate the proposed tuning rules. The load disturbance and setpoint responses are compared with the performance obtained from other controllers such as PID and LADRC tuned by different methods.

The performance indices in frequency domain MS, MT, *ε* and in time domain ITSE, TV, and settling time (t98%, in seconds) were calculated.

#### *6.1. Example 1: A Lag-Dominated System*

Consider the FOPDT lag-dominated system.

$$G\_1(\mathbf{s}) = \frac{1}{10\mathbf{s} + 1} e^{-2\mathbf{s}}.\tag{54}$$

The Tuning Guide is used to illustrate the parameters computation. Following the steps from Table 3:

$$1. \qquad \text{From (54), } K = 1, T = 10, \text{ and } l = 2.$$

2. The normalized dead time is

$$
\pi = \frac{2}{10+2} = 0.17.\tag{55}
$$


$$\bar{b}\_0 = \frac{1}{100} \left[ 27.952 \left( \frac{0.17}{1 - 0.17} \right)^{-0.518} \right] = 0.643 \tag{56}$$

$$
\bar{\omega}\_{\varepsilon} = \frac{1}{10} \left[ 1.093 \left( \frac{0.17}{1 - 0.17} \right)^{-0.604} \right] = 0.503 \tag{57}
$$

$$
\bar{\omega}\_{\vartheta} = 1.903 \left( \frac{0.17}{1 - 0.17} \right)^{-0.604} = 5.031 \tag{58}
$$

6. The parameters computed in step 5 can be used in the second-order LADRC for the control of plant (54).

Note that steps 4 and 5 from the above procedure must be repeated if a different robustness is desired. The LADRC parameters for the three levels of robustness (*ε*low, *ε*med, *ε*high) are listed in Table 4. Parameters obtained with the tuning rules proposed in [14] (ADRCZ) are also listed together with those corresponding to the PID controllers tuned by the IMC, SNS (from [34]), SIMC and AMIGO methods. Figures 12 and 13 show the time responses.

**Table 4.** Parameters for the control of *G*1(*s*).


The resulting values for the performance indices are reported in Table 5. It can be seen that each of the proposed controllers offers a robustness level similar to one of the PID alternatives with a lower ITSE for disturbance rejection. Also, the output backs to steady state faster than with the IMC and SIMC.

Compared with the ADRCZ tuning rules, the three proposed controllers have a lower ITSE value and return the output to steady state faster in the case of a load disturbance. Note that with the *ε*high controller, a higher robustness level and better disturbance rejection performance can be achieved. Also, the total variation of the control action is lower for this alternative.

On the other hand, for setpoint following operation, a similar ITSE than ADRCZ is obtained with the *ε*low controller. However, it is worth noting that control actions produced by the three alternatives are smoother, which is reflected in the total variations indices calculated. This is mainly because the initial values of the control signals (sometimes

referred in literature as *proportional kick*) are significantly lower than those reached by the ADRCZ controller.

**Figure 12.** Closed loop time response of *G*1(*s*) with the second-order LADRC tuned with the proposed rules. Comparison with the performance of ADRCz controller.


**Table 5.** Performance comparison of proposed tuning rules with other tuning methods for control of *G*1(*s*). The *ε*high controller is more robust and offers a lower ITSE for disturbance rejection than the ADRCZ controller.

**Figure 13.** Closed loop time response of *G*1(*s*) with the second-order LADRC tuned with the proposed rules. Comparison with the performance of PID controllers.

*6.2. Example 2: A Delay-Dominated System*

As second example, the following FOPDT delay-dominated system is analyzed:

$$G\_2(\mathbf{s}) = \frac{\mathbf{3}}{0.25\mathbf{s} + 1} e^{-\mathbf{s}}.\tag{59}$$

The normalized delay for this plant is *τ* = 0.80. The PID tuning rules IMC, SIMC and AMIGO, and the LADRC tuning rules from [14] (ADRCz) were used for comparison. In addition, the tuning rules for the second-order LADRC from [11] (ADRCH) were also taken into account. The latter are proposed for the control of high order plants, but can be used for self-regulatory FOPDT systems with nominal delay (*τ*/*T*) above 0.46 by approximating the plant into the form *K*/(*Ts* + 1)*<sup>n</sup>* (Note that *K* and *T* have a different meaning than in (33)).

Figures 14 and 15 show the closed loop time response of *G*2(*s*) with the LADRC and the PID controllers, respectively. The computed parameters are listed in Table 6 and performance indices are reported in Table 7.


**Table 6.** Parameters for the control of *G*2(*s*).

According to the indices obtained for disturbance rejection, the proposed controllers can improve the performance in at least one of the design objectives when compared to the PIDs. For example, The *ε*med controller is more robust and produces a lower ITSE than the PID tuned by the SIMC method. The same controller offers an improvement in robustness and disturbance rejection in comparison with ADRCZ.

On the other hand, the ITSE calculated from the load disturbance response with the three proposed controllers are lower than the ITSE obtained with the ADRCH controller. The corresponding total variations of control signals are also lower and the system output stabilizes faster, even in the case of a setpoint change. It should be noted that LADRC parameters for ADRCH were obtained setting an required additional tuning parameter *k* as 3.25 after some trial and error tests to guarantee the stability.

**Figure 14.** Closed loop time response of *G*2(*s*) with the second-order LADRC tuned with the proposed rules. Comparison with the performance of ADRCz and ADRCH controllers.

(**a**) Load disturbance response (**b**) Set point response

**Figure 15.** Closed loop time response of *G*2(*s*) with the second-order LADRC tuned with the proposed rules. Comparison with the performance of PID controllers.

**Table 7.** Performance comparison of proposed tuning rules with other tuning methods for control of *G*2(*s*). For all controllers MT = 1. The *ε*med controller is more robust and offers a lower ITSE for disturbance rejection than the ADRCZ controller. The three proposed alternatives offers a better disturbance rejection performance than the ADRCH controller with similar or better robustness.


#### **7. Control of a Peltier Thermoelectric Module**

The proposed tuning rules were used to design a second-order LADRC for the control of a thermoelectric module operating on the Peltier principle. It is assumed that the real behavior of the Peltier cell is modeled by the nonlinear differential equations presented in [35].

The thermal balance in the cold face is described by

$$\begin{aligned} Q\_{cf} &= 9.2\hat{T\_c} \\ Q\_{cf} &= Q\_{acf} - Q\_{pcf} - Q\_j + Q\_{ccond} \\ Q\_{acf} &= 11.75 - 0.5T\_c \\ Q\_{pcf} &= 0.041T\_cI\_p \\ Q\_j &= 0.41I\_p^2 \\ I\_p &= \frac{1}{0.82}[V\_{in} - 0.041(T\_h - T\_c)] \\ Q\_{cond} &= 0.2(T\_h - T\_c). \end{aligned} \tag{60}$$

The thermal balance in the hot face is

$$\begin{aligned} Q\_{hf} &= 13T\_h \\ Q\_{hf} &= Q\_{rhf} + Q\_{phf} + Q\_j - Q\_{cond} \\ Q\_{rhf} &= 9.59(T\_r - T\_h) \\ Q\_{phf} &= 0.041T\_h I\_p \end{aligned} \tag{61}$$

And finally, the radiator equilibrium corresponds to

$$\begin{aligned} Q\_{rf} &= 722.55 \dot{T}\_r \\ Q\_{rf} &= Q\_{acc} - Q\_{rhf} \\ Q\_{acc} &= 167.09 - 7.11 T\_r \end{aligned} \tag{62}$$

The controlled output is the temperature on cold face *Tc* ∈ [−12.0, 6.0] ◦C and the manipulated input is the applied voltage *Vin* in percentage of its range. A block diagram representing (60)–(62) is presented in Figure 16 and the corresponding description of variables is listed in Table 8.

**Figure 16.** Block diagram of the thermoelectric module.


**Table 8.** Description of variables for the Peltier cell model.

The Peltier cell behavior in the freeze zone (≈−8.0 ◦C) can be approximated by the FOPDT nominal model [36]

$$G\_p(s) = \frac{-0.315}{3.192s + 1}e^{-0.4s}.\tag{63}$$

The normalized delay for (63) is *τ* = 0.11. By substituting this value in the corresponding tuning rules, the three second-order LADRC parameters sets (*ε*low, *ε*med, *ε*high) from Table 9 are obtained. Two additional controllers are also included for comparison purposes: the LADRC tuned using the proposal from [14] (ADRCZ) and a PID whose parameters were calculated by the SIMC method.


**Table 9.** Parameters for the control of a thermoelectric module.

*ε*low −2.885 2.744 27.439 *ε*med −2.758 2.496 24.957 *ε*high −2.532 2.090 20.905


**Table 10.** Performance comparison of proposed tuning rules with reference controllers for the load disturbance response of the Peltier cell.


As expected, the *ε*low controller produces the response with lower ITSE due to the relaxation in the robustness requirement. In addition, the total variation of control action and settling time are the lowest among the three proposals.

**Figure 17.** Closed loop time response of the Peltier thermoelectric module with the second-order LADRC tuned with the proposed rules. Comparison with the performance of ADRCZ and SIMC controllers.

On the other hand, the *ε*med controller offers an improvement over the performance obtained with the ADRCZ tuning method. The robustness index is slightly lower which indicates a more robust closed loop system and the ITSE value reflects that the output stabilizes faster with less overshoot.

The most robust controller *ε*high produces a time response similar to the ADRCZ but the ITSE and TV values are slightly lower. Note that this controller also has a better disturbance rejection and robustness level than the PID tuned by the SIMC method.

The thermoelectric module can be operated at different temperatures. Due to the nonlinearities, the transient temperature response shows different behavior depending on the magnitude and direction of the setpoint changes. An additional simulation was performed to test the LADRC alternatives under this scenario.

In Figure 17b the time response of the cold face temperature with different setpoints is presented. The corresponding indices are reported in Table 11.

The three controllers designed with the proposed tuning rules guarantee the setpoint following and the steady state is reached in less time than with the other controllers. However, the ITSE values are above those calculated for the PID and ADRCZ. To clarify this behavior, the output overshoot (in % of the setpoint change) has been included in Table 11. As can be noticed, the SIMC method produces the lowest overshoot followed by the *ε*low, *ε*med and *ε*high controllers. As expected, the overshoot in output increases for high changes in the magnitude of setpoint due to the nonlinear nature of the system.

Finally, in Figure 17b it is also shown that the three design alternatives can lead to a lower variation of the control action in contrast with the abrupt change produced by the other controllers when the setpoint changes. Note that this kind of peaks may be damaging for the system. The corresponding TV indices from Table 11 support this idea.


**Table 11.** Performance comparison of proposed tuning rules and reference controllers for the setpoint response of the Peltier cell.

#### **8. Conclusions**

In this paper, a set of tuning rules for the second-order LADRC which offer three different levels of compromise between disturbance rejection and robustness for the control of FOPDT systems were presented. A MOOD procedure was performed to address the tuning problem. It was focused on the simultaneous minimization of the integral of time weighted squared error and a robustness measure. The tuning rules were obtained by fitting a set of Pareto optimal solutions as functions of the normalized delay and the FOPDT model parameters. Hence, all the LADRC parameters: nominal value of critical gain, controller bandwidth, and observer bandwidth can be computed by selecting a desired quality of robustness (i.e., low, medium or high) and substituting the FOPDT parameters in the given rules.

An interactive tuning software was presented as complementary material. This tool is based on the proposed rules and allows the user to adjust the LADRC parameters by varying the robustness specification between the low and high levels. On the other hand, the designer can modify the LADRC parameters within predefined intervals to evaluate the overall performance of the closed loop.

The use and convenience of the tuning rules were exemplified with the control of lagdominated and delay-dominated systems, as well as the control of the temperature in the cold face of a thermoelectric module. The examples showed that the proposed tuning method offers satisfactory performance for load disturbance rejection and setpoint following.

As part of the conceptual framework, an overall analysis on the conflicting objectives regarding the tuning of the LADRC was done. This allows to identify as future research the possibility of expand the objective space to include other performance criteria; for example, the total variation of the control signal. The parameterization adopted in this paper for the observer bandwidth oriented the optimization process to a particular area of the stability region and as a result, smooth manipulated signals were obtained. It would be of interest to analyze the trade-offs among other design objectives.

**Author Contributions:** Conceptualization, Methodology and Writing, B.V.M. and J.S.; Review and Supervision S.G.-N. and M.M.; and Software developed, B.V.M. All authors have read and agreed to the published version of the manuscript.

**Funding:** This work was supported in part by the Ministerio de Ciencia, Innovación y Universidades, Spain, under Grant RTI2018-096904-B-I00.

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

#### **Abbreviations**

In the following, the most important symbols and abbreviations used in this manuscript are listed.



#### **References**


### *Article* **Study on the Intelligent Modeling of the Blade Aerodynamic Force in Compressors Based on Machine Learning**

**Mingming Zhang 1, Shurong Hao <sup>1</sup> and Anping Hou 2,\***


**Abstract:** In order to obtain the aerodynamic loads of the vibrating blades efficiently, the eXterme Gradient Boosting (XGBoost) algorithm in machine learning was adopted to establish a three-dimensional unsteady aerodynamic force reduction model. First, the database for the unsteady aerodynamic response during the blade vibration was acquired through the numerical simulation of flow field. Then the obtained data set was trained by the XGBoost algorithm to set up the intelligent model of unsteady aerodynamic force for the three-dimensional blade. Afterwards, the aerodynamic load could be gained at any spatial location during blade vibration. To evaluate and verify the reliability of the intelligent model for the blade aerodynamic load, the prediction results of the machine learning model were compared with the results of Computation Fluid Dynamics (CFD). The determination coefficient R2 and the Root Mean Square Error (RMSE) were introduced as the model evaluation indicators. The results show that the prediction results based on the machine learning model are in good agreement with the CFD results, and the calculation efficiency is significantly improved. The results also indicate that the aerodynamic intelligent model based on the machine learning method is worthy of further study in evaluating the blade vibration stability.

**Keywords:** machine learning; eXterme Gradient Boosting; Computation Fluid Dynamics; blade vibration; unsteady aerodynamic model

#### **1. Introduction**

With the development of high load and high efficiency in compressors, the centrifugal load and aerodynamic load are endured by the blade due to the strong unsteady flow in the field. Also, the problem of blade vibration has become increasingly prominent. Therefore, the accurate prediction of the internal flow and blade aerodynamic force in the compressor is of great significance for evaluating the reliability of blade vibration in the design stage.

The traditional Computation Fluid Dynamics (CFD) technology can perform a highfidelity simulation of the linear or non-linear blade vibration in the flow field [1–3]. However, it requires high computational expenses for the large-scale calculation. This is not suitable for the rapid evaluation of blade vibration reliability. To overcome the shortcomings of calculation costs [4], the reduced order models of unsteady flow field are proposed here based on the CFD model [5–12]. Proper Orthogonal Decomposition (POD) and Dynamic Mode Decomposition (DMD) are two typical modal decomposition methods, which are based on the flow field feature extraction technology. The complex unsteady flow field is represented with a set of characteristic modes of low-dimensional variables [5–9]. Another kind of reduced-order model based on the system identification technique has been used for the fluid problem [10–12]. Simple mathematical mapping was employed to describe the relationship between flow disturbances and aerodynamic characteristics.

In recent years, research on knowledge extraction and data visualization has promoted the exploration of artificial intelligence methods for crossing with fluid mechanics. Machine learning builds a powerful information processing framework with accurate algorithms and

**Citation:** Zhang, M.; Hao, S.; Hou, A. Study on the Intelligent Modeling of the Blade Aerodynamic Force in Compressors Based on Machine Learning. *Mathematics* **2021**, *9*, 476. https://doi.org/10.3390/math9050476

Academic Editor: Eva H. Dulf

Received: 28 December 2020 Accepted: 22 February 2021 Published: 25 February 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

generalization capabilities. Efforts have been made for the application of machine learning in fluid mechanics [13–21]. The interaction of fluid mechanics and machine learning is summarized by Brunton [13], as well as the development trend of the interdisciplinary approach. It is believed that the application of machine learning can enhance the current fluid mechanics research. Deep Neural Networks (DNN) were stated to play a key role on modeling complex flow by Kutz [14]. A reduction model by DNN was designed based on the data of Direct Numerical Simulation (DNS) by Zhang [15]. The results show that DNN can predict the anisotropic Reynolds stress effectively. Chen [16] proposed the use of a deep Convolutional Neural Network (CNN) to extract flow information, and established a composite network to solve the problem of input with different variables. The hybrid deep neural network framework was used by Han [17] to directly capture the characteristics of unsteady flow in the field. The field predicted by DNN was in agreement with the result calculated by CFD solver. Hasegawa [18] constructed a reduced-order model combined with a CNN auto encoder and Long Short-Term Memory network (LSTM). The model proved to be able to predict the unsteady flow of bluff bodies. Also, the multi-core neural network was adopted by Kou [19] to achieve the correction from the low-order model to the high-fidelity results. A model was constructed with a combination of the Adaptive Simulated Annealing algorithm (ASA) and Recursive Radial Basis Function neural network (RRBF) for the cascade by Hu [20]. It was proven that the ASA-RRBF model has a higher accuracy than the single RRBF model.

The data-driven optimization of machine learning and the application of regression technology can map a high-dimensional flow field to a low-dimensional space, which can effectively solve the high-dimensional nonlinear problems. The ability of machine learning could simplify the treatment of the exploration and visualization of the high-dimensional database, which can greatly improve performance optimization and reduce the convergence cost [13]. The intelligent method provides a useful technology to extract relevant information, which promotes a rapid development of flow dynamics. The constructed reduced-order aerodynamic force model based on the machine learning can predict the unsteady aerodynamic force of the blade with a reasonable accuracy and a low computation cost [21].

Note that the current applications of artificial intelligence method in the fluids are mostly focused on the modeling of flow characteristics, while the modeling of blade aerodynamic force in vibration rarely involves the intelligence method. For this paper, the XGBoost algorithm was applied for the first time to the aerodynamic modeling of an actual compressor blade. A reduced-order intelligent model of the three-dimensional unsteady aerodynamic force of the blade was established for consideration of machine learning and CFD. By learning a small amount of CFD sample data, the trained low-dimensional XGBoost model could effectively capture the characteristics of the unsteady flow. The aerodynamic load of the compressor blade during the vibration process can be obtained by the intelligence model through the input and output mathematical mapping. Compared with the deep learning, the XGBoost model is suitable for data with a small number of variables. It has the advantages of model interpretability and invariance of input data. Also, it is convenient for parameter adjustment to achieve default predictions through automatic iteration. Under the premise of ensuring the accuracy, this reduced-order model presented can greatly reduce the calculation costs.

#### **2. Description of the Machine Learning Algorithm**

The eXtreme Gradient Boosting algorithm is an integrated machine learning algorithm based on a decision tree, which is in the foundation of gradient boosting framework. It is proposed to build an efficient and flexible algorithm by Chen [22] according to the secondorder information [23]. This algorithm is a scalable machine learning system in the lifting method, which is integrated by multiple regression trees to form a strong classifier. The problem of overfitting in tree model can be effectively avoided [24]. After parallelization, it is more than one order of magnitude faster than similar algorithms under the same

conditions [25]. The excellent performance in high-dimensional data analysis shows a strong ability in modeling the complex process [26]. Because of its high performance and low requirement, XGBoost has been widely used in disease prediction, credit debt default risk prediction, driving evaluation, route planning and so on [27–30].

The principle of its algorithm is to update iteratively the parameters of the previous classifier to reduce the gradient of the loss function and generate a new classifier [31]. By reducing the error of prediction through several regression trees, the regression tree group is guaranteed to have the maximum generalization ability. The regular term is added to the loss function of the model. Then the second-order Taylor expansion of the loss function is solved to determine the split node on the basis of the minimum loss function. The second-order derivative information and the addition of regularization method have improved the performance of generalization and calculation [32]. The structure of the XGBoost algorithm is indicated in Figure 1.

**Figure 1.** The Structure of the eXterme Gradient Boosting (XGBoost) Algorithm.

The given sample data set is:

$$\eta = \{ (\mathbf{x}\_{i\\_CFD}, y\_{i\\_CFD}) \} \text{ (\$i = 1, 2, \dots\$, \$n\$, \$\mathbf{x}\_{i\\_CFD} \in \mathbb{R}^m\$, \$y\_{i\\_CFD} \in \mathbb{R} )\tag{1}$$

where *xi*\_*CFD* represents the *i*-th feature value of the sample data, *yi*\_*CFD* represents the experiment value of the *i*-th label of the sample data and *xi*−Pr*<sup>e</sup>* represents the predicted value of the *i-th* label of the model. Define the loss functions of *yi*\_*CFD* and *yi*\_Pr*e*:

$$l(y\_{i\\_CFD}, y\_{i\\_Pr}) = (y\_{i\\_CFD} - y\_{i\\_Pr})^2 \tag{2}$$

Where *yi*\_Pr*<sup>e</sup>* is the prediction in the integration model of the XGBoost system, which uses the sum of the predicted value of each tree (the total number of trees is K) for the sample. Assuming that the tree model to be trained in the *k*-th iteration is *fk*(*x*), the prediction function was defined as follows:

$$\begin{aligned} \mathbf{y}\_{i\square\text{Pre}} &= \sum\_{k=1}^{K} f\_k(\mathbf{x}\_i), & f\_k \in \Gamma\\ \Gamma = \mathbf{f}(\mathbf{x}) &= \omega\_\emptyset(\mathbf{x}) \quad \text{ ( $q: R\_m \to T$ ,  $\omega \in R\_T$ )} \end{aligned} \tag{3}$$

As Γ is the space of Classification and Regression Trees (CART) numbers, *q* represents the score of the structure of each tree mapping each sample to the corresponding leaf node; *ωq*(*x*) represents the set of scores for all leaf nodes of tree *q*. The optimized parameter in the XGBoost algorithm is defined as the function of *f*(*x*). While a tree is added into

the model each time, the loss of the objective function was expected to be decreased. The iteration functions could then be expressed as:

$$\begin{array}{l} y\_{i\text{-}Pr}(0) = 0\\ y\_{i\text{-}Pr}(1) = f\_1(\mathbf{x}\_i) = y\_{i\text{-}Pr}(0) + f\_1(\mathbf{x}\_i)\\ y\_{i\text{-}Pr}(2) = f\_1(\mathbf{x}\_i) + f\_2(\mathbf{x}\_i) = y\_{i\text{-}Pr}(1) + f\_2(\mathbf{x}\_i)\\ \dots\\ y\_{i\text{-}Pr}(t) = \sum\_{k=1}^t f\_k(\mathbf{x}\_i) = y\_{i\text{-}Pr}(t^{-1}) + f\_t(\mathbf{x}\_i) \end{array} \tag{4}$$

The objective function could then be expressed as:

$$\begin{cases} obj = \sum\_{i=1}^{n} l(y\_{i\\_CFD\_{\prime}} y\_{i\\_Pr}) + \sum\_{i=1}^{K} \Omega(f\_i) \\ \Omega(f) = \gamma T + \frac{1}{2}\lambda \left\|\omega\right\|^2 \end{cases} \tag{5}$$

where *<sup>K</sup>* ∑ *i*=1 Ω(*fi*) indicates the regularization term of the loss function, which is the sum of the complexity of all K trees. The number of leaf nodes *T* is limited with a penalty term Ω(*fi*) so as to prevent overfitting. *ω* represents the set of scores for all the leaf nodes of each tree, while *γ* and *λ* represent the coefficients. In order to solve the optimal objective function, the second-order Taylor expansion of the *t-th* tree *ft*(*xi*) in Equation (4) is performed with bringing into the objective function. As the loss function *l*(*yi*\_*CFD*, *yi*\_Pr*<sup>e</sup>* (*t*−<sup>1</sup>)) is a constant, it can be ignored. And the leaf nodes of all trees can be regrouped. Then the node number and leaf weights are used to optimize the regularization term of the loss function. All samples *xi* of leaf nodes are divided into a sample set, denoted as *Ij* = {*i*|*q*(*xi*) = *j*}. The objective function could be rewritten as:

$$\begin{split}obj &= \sum\_{i=1}^{n} \left[ I(y\_{i\subset FCD}, y\_{i\text{Pre}}(t^{-1})) + g\_{if} f\_{\text{(}x\_{i}\)} + \frac{1}{2} h\_{if} f\_{\text{(}x\_{i}\text{)}}^{2}(x\_{i}) \right] + \Omega(f\_{\text{I}}) + const \tan t \\ &\approx \sum\_{i=1}^{n} \left[ g\_{if} f\_{\text{(}x\_{i}\text{)}} + \frac{1}{2} h\_{if} f\_{\text{(}x\_{i}\text{)}}^{2}(x\_{i}) \right] + \Omega(f\_{\text{I}}) \\ &= \sum\_{i=1}^{n} \left[ g\_{if} f\_{\text{(}x\_{i}\text{)}} + \frac{1}{2} h\_{if} f\_{\text{(}x\_{i}\text{)}}^{2}(x\_{i}) \right] + \gamma T + \frac{1}{2} \lambda \sum\_{j=1}^{T} \omega\_{j}^{2} \\ &= \sum\_{i=1}^{n} \left[ g\_{i} \omega\_{\text{(}}(\text{x}\_{i}) + \frac{1}{2} h\_{if} \omega\_{\text{(}}^{2}(\text{x}\_{i}) \right] + \gamma T + \frac{1}{2} \lambda \sum\_{j=1}^{T} \omega\_{j}^{2} \right] \\ &= \sum\_{j=1}^{T} \left[ (\sum\_{i \in I\_{j}} g\_{i}) \omega\_{j} + \frac{1}{2} (\sum\_{i \in I\_{j}} h\_{i} + \lambda) \omega\_{j}^{2} \right] + \gamma T \\ &= \sum\_{j=1}^{T} \left[ G\_{j} \omega\_{j} + \frac{1}{2} (H\_{j} + \lambda) \omega\_{j}^{2} \right] + \gamma T \end{split} \tag{6}$$

where *gi* <sup>=</sup> *<sup>∂</sup>l*(*yi*\_*CFD*,*yi*\_Pr*<sup>e</sup>* (*t*−<sup>1</sup>)) *∂yi*\_Pr*<sup>e</sup>* (*t*−1) , *hi* <sup>=</sup> *<sup>∂</sup>*2*l*(*yi*\_*CFD*,*yi*\_Pr*<sup>e</sup>* (*t*−<sup>1</sup>)) *∂*(*yi*\_Pr*<sup>e</sup>* (*t*−<sup>1</sup>)) <sup>2</sup> , *Gj* = ∑ *i*∈*Ij gi*, *Hj* = ∑ *i*∈*Ij hi*, *f*(*t*) = *ωq*(*x*), *<sup>ω</sup>* <sup>∈</sup> *<sup>R</sup><sup>T</sup> <sup>q</sup>* : *<sup>R</sup><sup>d</sup>* <sup>→</sup> {1, 2, ··· , *<sup>T</sup>*} .

The smaller the value of the objective function is, the smaller the prediction error is, with a better generalization ability and robustness of the model. By using the highest value formula of the quadratic function, the weight *ωj* ∗ of each leaf node could be obtained. The optimal objective function can then be expressed as:

$$
\omega \jmath^\* = -\frac{G\_{\dot{j}}}{H\_{\dot{i}} + \lambda'} \, ab \jmath = -\frac{1}{2} \sum\_{j=1}^{T} \frac{G\_{\dot{j}}^2}{H\_{\dot{i}} + \lambda} + \gamma T. \tag{7}
$$

The modeling advantage of in XGBoost method can be concluded to the adjunction of regularization items displayed in the objective function. The regularization items are related to the number and the value of leaf nodes in the tree. In addition, the sparse value of the training data in the XGBoost algorithm should be noted. The default direction of the branch is specified for missing values, which greatly improves the efficiency of the algorithm [33]. As an advanced machine learning method developed in recent years, this method has a good performance in processing high-dimensional data with the reduction of the overfitting.

#### **3. Methodology of Aerodynamic Intelligent Model**

#### *3.1. Data Collection for Machine Learning*

The high accuracy data is the key to establishing an accurate unsteady aerodynamic model of blade in compressor. The training process of the XGBoost model in this paper was mainly driven by the database obtained from the CFD fluid-structure coupling computation. The research object was a 1.5 stage axial compressor, including struts, inlet guide vanes, first stage rotor and stator. Detailed introductions for the rig are presented in Zhang [34].

The unsteady flow field in the compressor was solved by using the numerical solution of 3-D Navier-Stokes equations adopted in software ANSYS Package. The spatial discretization of the flow governing equations was employed on an upwind scheme, and a second-order backward differencing was integrated for the time-accurate solution [35]. Boundary conditions imposed on the inlet consist of total pressure and total temperature. A specified average static pressure was implemented at the exit boundary. Smooth, adiabatic and no-slip wall boundary conditions were applied for the flow field solution [36]. While considering the fluid-structure interaction, the blade vibration was computed under the response to the flow. The detail simulation process of the compressor is described in reference [34]. The structural equations for mechanical blade were solved by the finite element method. Within each time step, the flow equations and the structural equations were solved simultaneously, exchanging information on the fluid-structure interface. This procedure was repeated until the flow and displacements were converged, before proceeding to the next time step. The numerical model of the 1.5-stage turbocompressor is shown in Figure 2.

**Figure 2.** Numerical Model of the 1.5 Stage Turbocompressor.

After the convergence of the simulation, the results computed by the commercial CFD software were used for the current data learning, including the spatial unsteady flow data and aerodynamic force on blade surface in time domains. The snapshot data of the unsteady flow was captured at each time step, including pressure and aerodynamic force of the blades at modal coordinates. The data set for training/testing was composed with five variables, such as Cartesian coordinates, pressure and aerodynamic force. The three-dimensional coordinate (*X*, *Y*, *Z*) of the structure space was taken as an input, and the aerodynamic force was taken as an output to form the sample data *S* = (*X*, *Y*, *Z*, *Force*). The flow snapshot data extracted from CFD was arranged in time series as a sequence {S1, S2, S3, ··· , S*N*}, where *Si* = / *Xij*,*Yij*, *Zij*, *Forceij*0 , *i* = 1, 2, ··· , *N*, *j* = 1, 2, ··· , *n*. The distribution of the aerodynamic force on the blade surface is shown in Figure 3, which was extracted in the CFD fluid-structure coupling simulation at a single time. It can be seen that the distribution of aerodynamic force was not uniform on both the pressure side

(PS) and suction side (SS). Because of the unsteady flow in the field, the aerodynamic force that acted on the blade appears in a non-linear state, which resulted in the vibration blade indicating complex dynamic behaviors.

**Figure 3.** Distribution of the aerodynamic force on the blade.

#### *3.2. Procedure of Aerodynamic Modeling Based on the XGBoost Algorithm*

In this part, the methodology of aerodynamic modeling based on XGBoost algorithm is introduced in detail. The procedure can be concluded as follows.

Step 1: Data preprocessing.

After the data collection from CFD, the features of acquired data may have different magnitudes. When the gradient is updated, it may oscillate back and forth, and take a long time to reach the local optimal value or the global optimal value. In order to improve the training efficiency and avoid the numerical error caused by the size difference of the features, the data were handled in normalization. This ensured that the same dimension was achieved for different features, so that the descent of gradient could be a quick convergence. The normalized function form used in this article is shown as follows:

$$X = \frac{\mathbf{x}\_k - \mathbf{x}\_{\min}}{\mathbf{x}\_{\max} - \mathbf{x}\_{\min}}.\tag{8}$$

In machine learning algorithms, feature engineering is an important step in the process of modeling. The original data were transformed into the training data with feature engineering, providing the training model with a better robustness and generalization ability. This paper provides three characteristics of index, distance and average value of three-dimensional coordinates based on data information.

Step 2: Training set construction.

The training set was used to estimate the parameters in the intelligent model. As a result, the accuracy and efficiency of the model were determined by the selection of the training set. In order to optimize the effect of the model, the dichotomy process was adopted to partition the training set. That is to say for N samples, each segment was divided into the length of [*C*/2], where *<sup>C</sup>* = [*N*], [*N*/2], [*N*/22], ··· , 2. Then take a representative data set from each segment to form a training set. Taking into account of the accuracy and running time in calculation, two snapshots as {S1, S[*N*/2] were selected to form the training set to train the model in this paper.

Step 3: Training process.

The training set after data preprocessing was substituted into the initial XGBoost model established for training. The effect of prediction by the model was evaluated by the comparison to the [*N*/2] + 1 snapshot data, which were selected as the test set. The establishment of the model required the setting of hyper-parameters. The hyper-parameters used in this article were defined as: Max-depth (the maximum depth of the tree), Learningrate (the learning rate), n-estimators (the number of sub-models) and objective (the given loss function). The hyper-parameters for the initialization model are given in Table 1.


**Table 1.** Parameters for XGBoost Model Initialization.

Step 4: Parameter Adjustment.

The adjustment of the hyper-parameters in the XGBoost model played a key role in affecting the training performance of the XGBoost algorithm. So, the GridSearchCV function was employed to adjust the parameters of the XGBoost model. The hyper-parameters after seeking are shown in Table 2.

**Table 2.** Parameters in XGBoost Model after Adjustment.


Step 5: Evaluation Criteria.

The indicators as the coefficient of determination R2 and the root mean square error (RMSE) were introduced to evaluate the accuracy of the established XGBoost model. The fitness of the prediction to the observation can be represented by the coefficient of determination R2, which was defined as the ratio of the regression sum of squares to the total sum of squares. This coefficient is often used to evaluate the merits and demerits of a regression model. If the coefficient of determination R2 is calculated to be close to 1, it indicates that the regression model is effective. RMSE is the square root of the ratio, which is the square sum of the errors of prediction values to the number of observations. The optimal parameters of the model and the optimal prediction results were obtained through model training

$$R^2 = 1 - \frac{\sum\_{i} \left( \overline{CFD}\_i - Pr\_i \right)^2}{\sum\_{i} \left( \overline{CFD}\_i - \overline{CFD}\_i \right)^2} \tag{9}$$

$$RMSE = \sqrt{\frac{\sum\_{i=1}^{n} \left(CFD\_i - Pre\_i\right)^2}{num}},\tag{10}$$

where *CFDi* represents the *i-th* label in the sample data which is captured from CFD simulation, *CFDi* represents the average value of the label in the sample set, and *Prei* represents the predicted value of the *i-th* label in the XGBoost model. And prediction error is defined as: *error* = *Pre* − *CFD*, which is the difference between the prediction of the XGBoost model and the CFD result. The whole procedure of aerodynamic modeling based on the XGBoost algorithm is shown in Figure 4.

**Figure 4.** Procedure of Aerodynamic Modeling.

#### **4. Modeling of Blade Aerodynamic Pressure Based on Machine Learning**

In this section, the intelligent modeling is first performed for the three-dimensional unsteady pressure of the blade during the vibration process. Also, the effectiveness and accuracy of the model are evaluated based on the XGBoost algorithm. The three-dimension coordinate (*X*, *Y*, *Z*) of the state space in blade vibration was taken as the input, and the pressure data was taken as the output to form sample data *S* = (*X*, *Y*, *Z*, *Pressure*). According to the procedure of aerodynamic modeling described above, the gradient descent method was used to find the optimal solution. After the dimensionless processing on pressure data, the training set was collected to train the XGBoost model. Also, the test set was brought into the trained optimal prediction model for comparison. Finally, the prediction on the blade aerodynamic pressure was obtained with the XGBoost model established.

The prediction results of the aerodynamic pressure of blade are shown in Figure 5 at a certain time. The predicted values of pressure in the XGBoost model were compared with the data in CFD simulation at 80% of the blade span. It can be seen that the curves predicted are in good accordance with each other, indicating the accuracy of the XGBoost model.

**Figure 5.** Comparison between XGBoost Model and Computation Fluid Dynamics (CFD).

We unfolded the three-dimensional compressor blade along the leading edge, and displayed the pressure surface (PS Side) and suction surface (SS Side) of the compressor blade on the same coordinate plane. The pressure contour predicted by the XGBoost model is exhibited in Figure 6, as well as the result simulated by CFD. The two contours look almost the same, but there are still errors located under 40% of span, which are revealed in Figure 7. In addition, under the program running with 0.3 s, the coefficient of determination R<sup>2</sup> was computed to be 0.99947. The RMSE was obtained as 1012.4 by the model, which is approximately a 0.3% error rate to the average pressure of the blade. Compared with CFD simulation data, the three-dimensional aerodynamic pressure model of the blade based on the XGBoost intelligent method reflects a good accuracy and efficiency. The current study demonstrates that it is sufficient to predict the blade aerodynamic force by capturing the characteristic of flow based on the machine learning method.

**Figure 6.** Pressure Contours of the Blade: (**a**) CFD; (**b**) XGBoost Model.

**Figure 7.** Error Contour for Pressure.

#### **5. Modeling of Blade Aerodynamic Force Based on Machine Learning**

Under the verification for the effectiveness of the intelligent modeling method, the XGBoost algorithm was then used to model the unsteady aerodynamic force for the threedimensional blade in this section. The aerodynamic force on the blade surface was obtained based on the integral of the pressure over the mesh grid area in CFD. Because of the micro size of grid at the blade edge, the value of force at the blade edge was much smaller. In order to restore the distribution of force on the blade, the process of dimensionless was performed for the aerodynamic force *Df* on the blade surface

$$Df = \frac{F}{\overline{S} \times P'} \tag{11}$$

where *F* is the aerodynamic force data on the blade surface in CFD, *S* is the average area of the blade surface mesh and *P* equals the standard atmospheric pressure. Next, the distribution of aerodynamic force on the blade surface was predicted by the XGBoost model at any position during the vibration process.

The predicted values of aerodynamic force in the XGBoost model were chosen here to compare with the data in CFD simulation at 3%, 80% and 90% of the blade span, respectively, as shown in Figure 8. It can be seen that the aerodynamic force of the blade increases sharply from the leading edge, and decreases at the trailing edge. It was found that the values of aerodynamic force appear to have significant differences along the variation of the blade span. The aerodynamic forced distributed along the direction of the blade spanwise presents a nonlinear characteristic.

This appearance can also be observed at the distribution of force at the three-dimension surface of the blade. The 3D plots are adopted here to show the distribution of aerodynamic force at a blade modal location. As indicated from Figure 9, it can be seen that the distribution of the aerodynamic force predicted by the XGBoost model is accordant with the CFD data on the pressure surface of the blade. The load of blade is mainly concentrated in the middle part of the blade, corresponding to the region of high aerodynamic force. Because of the non-linear feature, the unsteady force is not easy to express. According to the errors displayed in Figure 10, the nodes of aerodynamic force modeling by XGBoost method show good agreement with the CFD data. Although the existence of error was discovered

at certain points, the effectiveness of the aerodynamic force model is still verified through the comparison.

**Figure 8.** Unsteady aerodynamic value of the blade section.

**Figure 9.** Aerodynamic Force at the Blade Pressure Side: (**a**) CFD; (**b**) XGBoost Model.

**Figure 10.** Aerodynamic Force Error on Blade.

The dimensionless aerodynamic force contour predicted by the XGBoost model is expressed in Figure 11, along with the contour simulated by CFD. The two aerodynamic clouds coincide exactly with each other. Also, the errors inevitably appear in the comparison of XGBoost model with CFD, as indicated in Figure 12. But it can be seen that the errors emerge mostly in the region with a large gradient. The values of error oscillate around 0 with the maximum value as 0.06, which is relatively small in contrast to the dimensionless aerodynamic force of the blade. At the running of program with 0.23 s, the coefficient of determination R<sup>2</sup> of the XGBoost model was computed to be 0.99998, which is very close to 1. Also, the RMSE was obtained as 0.005846 by the model, which is approximately a 0.1% error to the average dimensionless aerodynamic force of the blade. With the comparison to the CFD simulation data, this shows a good accuracy and reliability of predicting the aerodynamic force by the three-dimension aerodynamic force model of the blade based on the XGBoost intelligent method.

**Figure 11.** Aerodynamic Force on the Blade: (**a**) CFD; (**b**) XGBoost Model.

**Figure 12.** Error Contour for Aerodynamic Force.

To check the generalization ability and robustness of the XGBoost model, snapshot data sets with the blade vibration at different times were used as the testing set. The trained XGBoost model was also used to predict the aerodynamic force of each snapshot data in the testing set. The results of prediction are revealed in Figure 13, as represented by the coefficient of determination R2 and RMSE for different testing data. For the trained aerodynamic force XGBoost model, the prediction accuracy also shows a slight discrepancy compared to different positions of blade vibration. The maximum coefficient of determination R<sup>2</sup> of the prediction model is 0.99999, with the minimum value as 0.99987. The maximum RMSE value is 0.01852, with the minimum value to be 0.00519. The coefficients of determination R<sup>2</sup> are all above 0.9998, and the RMSE values are all less than 0.0186. This means that the XGBoost model reflects a good generalization ability with high robustness. From all analysis above, it can be concluded that the three-dimension aerodynamic model based on the XGBoost algorithm can accurately predict the aerodynamic force of the blade on the basis of any spatial position in the blade vibration process.

**Figure 13.** Graphs of Error at different testing data: (**a**) CFD; (**b**) XGBoost Model.

#### **6. Discussion**

With the assistance of CFD technology, the unsteady flow field simulation of the compressor is considered as a full-order solution to the system. Although the data obtained is regarded as being accurate, it is not convenient for the rapid qualitative analysis of the system with a high time cost and low efficiency [4]. With the simple control equation of the reduced-order model, the data can significantly reduce computation expenses and improve calculation efficiency [10]. The mathematical mapping between the input and output can be set up by solving the complex Navier-Stokes equations once for training. Then the fluid-structure coupled solution in the CFD solver can be replaced by the intelligent model.

Recently there has been research conducted on the aerodynamic reduction modeling of wings by artificial intelligent methods. But there are considerable differences between blades and wings. Compared with isolated wings, there is an obvious unsteady aerodynamic interference effect in the blade row [36]. Therefore, the aeroelastic analysis of blades is different from the traditional vibration analysis of wings in outflow. Since the internal flow is a very complex full three-dimensional unsteady viscous flow field, the aerodynamic interference between the blades is very prominent. It is impossible to use theory to predict the unsteady aerodynamic force of vibrating blades with so many parameters [37]. In nonlinear dynamic analysis, it is assumed that the blade is flat with no thickness, reducing the real three dimensions to two dimensions. However, an efficient and accurate aerodynamic model of the three-dimension blade is the basis for the analysis of the nonlinear dynamic system. The vibration modeling of the actual three-dimensional blades was rarely used in the previous research.

In this paper, the XGBoost algorithm of machine learning was used to establish a reduced-order model of the unsteady aerodynamic force for a vibrating blade. By learning from the high-fidelity sample data, the aerodynamic distribution of a three-dimensional blade could be quickly predicted accurately at any spatial position of the blade during the vibration process. This provides a basis for the further nonlinear dynamic analysis of the blade. But how to incorporate this into the nonlinear dynamics equations with an appropriate format remains a question. It is also worth conducting further integration with fluid mechanics to evaluate the blade vibration stability.

#### **7. Conclusions**

The internal field of the compressor is essentially a three-dimensional unsteady flow. The flow around the blade is very complex. In order to achieve an unsteady aerodynamic load on the blade, a reduced-order intelligent model of the three-dimensional blade in compressor was established in this paper based on a machine learning algorithm for the first time. The main conclusions are as follows:


**Author Contributions:** Conceptualization, M.Z. and S.H.; methodology, M.Z. and S.H.; software, S.H.; validation, M.Z. and S.H.; formal analysis, S.H.; writing—original draft preparation, S.H.; writing—review and editing, M.Z.; supervision, A.H.; project administration, A.H.; funding acquisition, A.H. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by the National Science and Technology Major Project, grant number 2017-II-0009-0023.

**Acknowledgments:** The authors would like to acknowledge the funding support from BIC-ESAT in Peking University.

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

#### **Abbreviations**


#### **References**


### *Article* **Flow towards a Stagnation Region of a Vertical Plate in a Hybrid Nanofluid: Assisting and Opposing Flows**

**Iskandar Waini 1,2, Anuar Ishak 2,\* and Ioan Pop <sup>3</sup>**


**Abstract:** This study investigates a hybrid nanofluid flow towards a stagnation region of a vertical plate with radiation effects. The hybrid nanofluid consists of copper (Cu) and alumina (Al2O3) nanoparticles which are added into water to form Cu-Al2O3/water nanofluid. The stagnation point flow describes the fluid motion in the stagnation region of a solid surface. In this study, both buoyancy assisting and opposing flows are considered. The similarity equations are obtained using a similarity transformation and numerical results are obtained via the boundary value problem solver (bvp4c) in MATLAB software. Findings discovered that dual solutions exist for both opposing and assisting flows. The heat transfer rate is intensified with the thermal radiation (49.63%) and the hybrid nanoparticles (32.37%).

**Keywords:** hybrid nanofluid; dual solutions; mixed convection; stagnation point; radiation; stability analysis

#### **1. Introduction**

The phenomenon of the flow on a stagnation region commonly occurs in aerodynamic industries and engineering applications. To name a few, such applications are polymer extrusion, drawing of plastic sheets, and wire drawing. Hiemenz [1] was the first researcher to consider the boundary layer flow toward a stagnation point on a rigid surface. Besides this, the axisymmetric flow was considered by Homann [2], whereas the oblique stagnationpoint flow was studied by Chiam [3]. Further, Merkin [4] studied a similar problem by considering the mixed convection flow. He discovered that the solution is not unique for the opposing flow case. However, Ishak et al. [5] exposed that the dual solutions exist for both opposing and assisting flows, and these behaviours were also reported by several researchers [6–9].

In 1995, Choi and Eastman [10] presented a new type of heat transfer fluid called nanofluid, which is a mixture of single type nanoparticles and the base fluid, to enhance the thermal conductivity. Some works on such fluids can be found in [11–16]. Recently, some studies have shown that advanced nanofluids composed of other types of nanoparticles mixed with regular nanofluids could improve their thermal properties, and this mixture is termed "hybrid nanofluid". The earlier experimental works on the hybrid nanofluid have been done by Turcu et al. [17], Jana et al. [18], and Suresh et al. [19]. Besides, the numerical studies on the hybrid nanofluid flow were studied by Devi and Devi [20]. They observed that the heat transfer rate of the hybrid nanofluid is higher than that of the regular nanofluid. Moreover, the non-uniqueness of the solutions in the hybrid nanofluid flow was examined by Waini et al. [21–27] Other physical aspects were considered by several authors [28–35]. Furthermore, the review papers can be found in [36–41].

**Citation:** Waini, I.; Ishak, A.; Pop, I. Flow towards a Stagnation Region of a Vertical Plate in a Hybrid Nanofluid: Assisting and Opposing Flows. *Mathematics* **2021**, *9*, 448. https:// doi.org/10.3390/math9040448

Academic Editor: Eva H. Dulf

Received: 4 February 2021 Accepted: 20 February 2021 Published: 23 February 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

Different from the above-mentioned studies, this paper considers the assisting and opposing buoyant flows of a hybrid nanofluid containing Al2O3-Cu hybrid nanoparticles when the effect of thermal radiation is taken into consideration. The governing equations along with the boundary conditions are transformed into a system of ordinary differential equations using a similarity transformation. The system of equations is then solved numerically using the boundary value problem solver (bvp4c) in MATLAB software. Most importantly, in this study, two solutions are discovered for both opposing and assisting flows. Then, further analysis is performed to study the temporal stability of these solutions as time evolves.

#### **2. Mathematical Formulation**

Consider the flow configuration as shown in Figure 1. The free stream velocity is *U*(*x*) = *ax* and the surface temperature is *Tw*(*x*) = *T*<sup>∞</sup> + *bx*, where *a* and *b* are constants. Meanwhile, the ambient temperature *T*∞ is assumed to be constant. Accordingly, the hybrid nanofluid equations are as follows ([5,14]):

$$\frac{\partial \mu}{\partial x} + \frac{\partial \upsilon}{\partial y} = 0 \tag{1}$$

$$u\frac{\partial u}{\partial x} + v\frac{\partial u}{\partial y} = \mathcal{U}\frac{d\mathcal{U}}{dx} + \frac{\mu\_{\text{hnf}}}{\rho\_{\text{hnf}}}\frac{\partial^2 u}{\partial y^2} + \frac{(\rho\mathcal{G})\_{\text{hnf}}}{\rho\_{\text{hnf}}}(T - T\_{\infty})g\tag{2}$$

$$u\frac{\partial T}{\partial \mathbf{x}} + v\frac{\partial T}{\partial y} = \frac{k\_{\text{huf}}}{(\rho \mathbb{C}\_p)\_{\text{huf}}} \frac{\partial^2 T}{\partial y^2} - \frac{1}{(\rho \mathbb{C}\_p)\_{\text{huf}}} \frac{\partial q\_r}{\partial y} \tag{3}$$

subject to

$$\begin{array}{ccccc}\upsilon = 0, & \mathsf{u} = 0, & T = T\_w(\mathsf{x}) = T\_{\infty} + b\mathsf{x} & \mathsf{at} & \mathsf{y} = 0\\\mathsf{u} \to \mathsf{U}(\mathsf{x}) = a\mathsf{x}, & T \to T\_{\infty} & \mathsf{as} & \mathsf{y} \to \infty \end{array} \tag{4}$$

where *u* and *v* represent the velocity components along the *x*- and *y*- axes. Besides, *g* and *qr* are the acceleration caused by the gravity and the radiative heat flux, respectively. Meanwhile, the temperature of the hybrid nanofluid is given by *T*.

The expression of the radiative heat flux is ([42,43]):

$$q\_{\varGamma} = -\frac{4\sigma^\*}{3k^\*} \frac{\partial T^4}{\partial y} \tag{5}$$

where *σ*∗ and *k*∗ denote the Stefan-Boltzmann constant and the mean absorption coefficient, respectively. Following Rosseland [42], after employing a Taylor series, one gets *T*<sup>4</sup> ∼= 4 *T*<sup>3</sup> <sup>∞</sup> *<sup>T</sup>* − <sup>3</sup>*T*<sup>4</sup> <sup>∞</sup>. Then, the Equation (3) turns to [43]:

$$
\ln \frac{\partial T}{\partial \mathbf{x}} + v \frac{\partial T}{\partial y} = \frac{1}{(\rho \mathbb{C}\_p)\_{\text{lnf}}} \left[ k\_{\text{lnf}} + \frac{16 \sigma^\* T\_{\infty}^3}{3k^\*} \right] \frac{\partial^2 T}{\partial y^2} \tag{6}
$$

Further, the thermophysical properties can be referred to in Tables 1 and 2. Data from these tables are adapted from Oztop and Abu-Nada [13], Devi and Devi [20], and Waini et al. [21]. Note that *ϕ*<sup>1</sup> (Al2O3) and *ϕ*<sup>2</sup> (Cu) are the nanoparticles volume fractions, and the subscripts *n*1 and *n*2 are corresponded to their solid components, while the subscripts *f* , *n f* , and *hnf* signify the base fluid, nanofluid, and hybrid nanofluid, respectively.

To get a similarity solution, we employ the following similarity transformation ([5,14]):

$$\psi = \sqrt{a\nu\_f} \mathbf{x} f(\eta), \qquad \theta(\eta) = \frac{T - T\_{\infty}}{T\_w - T\_{\infty}}, \qquad \eta = y \sqrt{\frac{a}{\nu\_f}} \tag{7}$$

where *ψ* is the stream function defined as *u* = *∂ψ*/*∂y* and *v* = − *∂ψ*/*∂x*, then one gets

$$u = a\mathbf{x}f'(\eta), \qquad v = -\sqrt{a\nu\_f}f(\eta) \tag{8}$$

**Table 1.** Thermophysical properties of nanoparticles and water.


**Table 2.** Thermophysical properties of nanofluid and hybrid nanofluid.


Furthermore, the continuity equation, i.e., Equation (1), is identically satisfied. Now, Equations (2) and (6) respectively reduce to:

$$\frac{\mu\_{\ln f}/\mu\_f}{\rho\_{\ln f}/\rho\_f} f'' + f f'' - f'^2 + 1 + \frac{(\rho \beta)\_{\ln f} / (\rho \beta)\_f}{\rho\_{\ln f}/\rho\_f} \lambda \theta = 0 \tag{9}$$

$$\frac{1}{\Pr} \frac{1}{(\rho \mathbb{C}\_{\mathcal{P}})\_{\text{hnf}} / (\rho \mathbb{C}\_{\mathcal{P}})\_{f}} \left( \frac{k\_{\text{hnf}}}{k\_{f}} + \frac{4}{3}R \right) \theta^{\eta} + f \theta^{\prime} - f^{\prime} \theta = 0 \tag{10}$$

subject to the boundary conditions:

$$\begin{array}{cccc} f(0) = 0, & f'(0) = 0, & \theta(0) = 1, \\ & f'(\infty) = 1, & \theta(\infty) = 0 \end{array} \tag{11}$$

where ( ) represents the differentiation with respect to *η*, Pr is the Prandtl number, *R* and *λ* signify the radiation and the mixed convection parameters, given by:

$$\text{Pr} = \frac{\left(\mu \mathcal{C}\_p\right)\_f}{k\_f}, \quad R = \frac{4\,\sigma^\* T\_\infty^3}{k^\* k\_f}, \quad \lambda = \frac{\text{g}\mathcal{B}\_f b}{a^2} = \frac{\text{Gr}\_x}{\text{Re}\_x^2} \tag{12}$$

Further, *Grx* = *<sup>g</sup><sup>β</sup> <sup>f</sup>*(*Tw* − *<sup>T</sup>*∞)*x*3/*ν<sup>f</sup>* <sup>2</sup> corresponds to the local Grashof number and *Rex* = *ax*2/*ν<sup>f</sup>* stands for the local Reynold's number. Note that *λ* < 0 signifies the opposing and *λ* > 0 signifies the assisting flows, while the forced convection flow (no buoyancy effects) is given by *λ* = 0.

The skin friction coefficient *Cf* and the local Nusselt number *Nux* are defined as [43]:

$$\mathcal{C}\_{f} = \frac{\mu\_{\text{hf}f}}{\rho\_{f}L^{2}} \left(\frac{\partial u}{\partial y}\right)\_{y=0} \quad \text{Nu}\_{x} = \frac{\text{x}}{k\_{f}(T\_{w} - T\_{\infty})} \left(-k\_{\text{hvf}} \left(\frac{\partial T}{\partial y}\right)\_{y=0} + (q\_{r})\_{y=0}\right) \tag{13}$$

By employing Equation (7), one gets:

$$\operatorname{Re}\_x^{1/2} \mathcal{C}\_f = \frac{\mu\_{\text{lnf}}}{\mu\_f} f''(0),\\\operatorname{Re}\_x^{-1/2} \mathcal{N} u\_x = -\left(\frac{k\_{\text{lnf}}}{k\_f} + \frac{4}{3}\mathcal{R}\right) \theta'(0) \tag{14}$$

#### **3. Stability Analysis**

The temporal stability of the dual solutions as time evolves is studied. This analysis was first introduced by Merkin [44] and then followed by Weidman et al. [45] Firstly, consider the new variables as follows:

$$\psi = \sqrt{a\nu\_f} x f(\eta, \tau), \quad \theta(\eta, \tau) = \frac{T - T\_{\infty}}{T\_w - T\_{\infty}}, \qquad \eta = y \sqrt{\frac{a}{\nu\_f}}, \tau = at \tag{15}$$

Now, the unsteady form of Equations (2) and (3) are considered, while Equation (1) remains unchanged. On using (15), one obtains:

$$\frac{\mu\_{\text{hnf}}/\mu\_{f}}{\rho\_{\text{hnf}}/\rho\_{f}}\frac{\partial^{3}f}{\partial\eta^{3}}+f\frac{\partial^{2}f}{\partial\eta^{2}}-\left(\frac{\partial f}{\partial\eta}\right)^{2}+1+\frac{(\rho\beta)\_{\text{hnf}}/(\rho\beta)\_{f}}{\rho\_{\text{hnf}}/\rho\_{f}}\lambda\theta-\frac{\partial^{2}f}{\partial\eta\partial\tau}=0\tag{16}$$

$$\frac{1}{\Pr} \frac{1}{\left(\rho \mathbb{C}\_p\right)\_{\mathrm{hnf}} / \left(\rho \mathbb{C}\_p\right)\_f} \left(\frac{k\_{\mathrm{hnf}}}{k\_f} + \frac{4}{3} \mathbb{R}\right) \frac{\partial^2 \theta}{\partial \eta^2} + f \frac{\partial \theta}{\partial \eta} - \frac{\partial f}{\partial \eta} \theta - \frac{\partial \theta}{\partial \tau} = 0 \tag{17}$$

subject to:

$$\begin{cases} f(0, \boldsymbol{\tau}) = 0, & \frac{\partial f}{\partial \boldsymbol{\eta}}(0, \boldsymbol{\tau}) = 0, \quad \boldsymbol{\theta}(0, \boldsymbol{\tau}) = 1, \\\ \frac{\partial f}{\partial \boldsymbol{\eta}}(\infty, \boldsymbol{\tau}) = 1, & \boldsymbol{\theta}(\infty, \boldsymbol{\tau}) = 0 \end{cases} \tag{18}$$

Then, consider the following perturbation functions [45]:

$$f(\eta, \tau) = f\_0(\eta) + e^{-\gamma \tau} F(\eta), \quad \theta(\eta, \tau) = \theta\_0(\eta) + e^{-\gamma \tau} G(\eta) \tag{19}$$

Here, Equation (19) is introduced to apply a small disturbance on the steady solution *f* = *f*0(*η*) and *θ* = *θ*0(*η*) of Equations (9)–(11). The functions *F*(*η*) and *G*(*η*) in

Equation (19) are relatively small compared to *f*0(*η*) and *θ*0(*η*). The sign (positive or negative) of the eigenvalue *γ* determines the stability of the solutions. By employing (19), Equations (16)–(18) become:

$$\frac{\mu\_{\text{hnf}}/\mu\_f}{\rho\_{\text{hnf}}/\rho\_f}F'' + f\_0 F' + f\_0'' F - 2f\_0' F' + \frac{(\rho \pounds)\_{\text{hnf}}/(\rho \pounds)\_f}{\rho\_{\text{hnf}}/\rho\_f} \lambda G + \gamma F' = 0 \tag{20}$$

$$\frac{1}{\Pr} \frac{1}{\left(\rho \mathbf{C}\_p\right)\_{hff} / \left(\rho \mathbf{C}\_p\right)\_f} \left(\frac{k\_{hff}}{k\_f} + \frac{4}{3} \mathbb{R}\right) \mathbf{G}'' + f\_0 \mathbf{G}' + \theta\_0' \mathbf{F} - f\_0' \mathbf{G} - \theta\_0 \mathbf{F}' + \gamma \mathbf{G} = \mathbf{0} \tag{21}$$

subject to:

$$\begin{array}{ccc} F(0) = 0, & F'(0) = 0, & G(0) = 0, \\ F'(\infty) = 0, & G(\infty) = 0 \end{array} \tag{22}$$

Without loss of generality we set *F* (0) = 1 [46] to get the eigenvalues *γ* in Equations (20) and (21). The stability of the solutions as time evolves is determined by examining the values of the smallest eigenvalue that was obtained. As time passes, there is an initial decay of disturbance if *γ* is positive (see Equation (19)), and thus the solution is stable and physically reliable in the long run. On the other hand, if *γ* is negative, there is an initial growth of disturbance, hence the solution is unstable.

#### **4. Results and Discussion**

Equations (9)–(11) were solved numerically by utilising the boundary value problem solver (bvp4c) in MATLAB software, which employs the 3-stage Lobatto IIIa formula [47]. This is a collocation formula and provides a continuous solution with fourth-order accuracy. The effectiveness of this solver ultimately counts on our ability to provide the algorithm with an initial guess for the solution. Moreover, the suitable value of the boundary layer thickness must be chosen depending on the values of the parameters applied. To solve this boundary value problem, it is necessary to first reduce the equations to a system of first-order ordinary differential equations. The effects of the physical parameters such as Al2O3 (*ϕ*1) and Cu (*ϕ*2) nanoparticles volume fractions, the Prandtl number Pr, the radiation parameter *R*, and the mixed convection parameter *λ* on the flow behaviour are examined.

The values of the skin friction coefficient *f* (0) and the local Nusselt number −*θ* (0) for several values of Pr when *R* = 0, *λ* = 1, and *ϕ*<sup>1</sup> = *ϕ*<sup>2</sup> = 0 (regular fluid) are compared with published results of Ishak et al. [5], as presented in Table 3. It should be mentioned that Ishak et al. [5] solved their problem by the Keller-box method. Meanwhile, the boundary value problem solver (bvp4c) is employed in this study. It is found that the results are in excellent agreement. This gives confidence to the validity and accuracy of the numerical results for other values of parameters. Besides, the values of *f* (0) show a decreasing behaviour, while the values of −*θ* (0) increase for larger Pr. Additionally, Table 4 describes the values of *Re*1/2 *<sup>x</sup> Cf* and *Re*−1/2 *<sup>x</sup> Nux* for Cu/water nanofluid when *ϕ*<sup>1</sup> = *R* = 0 and Pr = 6.2 with different values of *λ* and *ϕ*2. Here, we note that the values of both *Re*1/2 *<sup>x</sup> Cf* and *Re*−1/2 *<sup>x</sup> Nux* increase with the increasing of *λ* and *ϕ*2. Besides, dual solutions are found for opposing (*λ* = −1) and assisting (*λ* = 1) flows, whereas the unique solution is obtained for *λ* = 0 (force convection flow). Furthermore, the values of *Re*1/2 *<sup>x</sup> Cf* for *λ* = 0 provided in the same table are compared with those of Bachok et al. [14], and the results are in excellent agreement, which thus gives confidence to the results for other values of *λ*.


**Table 3.** Values of *f* (0) and −*θ* (0) for different values of Pr when *ϕ*<sup>1</sup> = *ϕ*<sup>2</sup> = 0 (regular fluid), *R* = 0, and *λ* = 1.

Results in "[ ]" are the lower branch (second) solutions.

**Table 4.** Values of *Re*1/2 *<sup>x</sup> Cf* and *Re*−1/2 *<sup>x</sup> Nux* for Cu/water nanofluid when *<sup>ϕ</sup>*<sup>1</sup> = *<sup>R</sup>* = 0 and Pr = 6.2 under various values of *λ* and *ϕ*2.


Results in "[ ]" are the lower branch (second) solutions.

Moreover, Table 5 shows the effect of *λ*, *R* and *ϕ*<sup>2</sup> on *Re*1/2 *<sup>x</sup> Cf* and *Re*−1/2 *<sup>x</sup> Nux* when Pr = 6.2 for nanofluid (Cu/water) and hybrid nanofluid (Cu-Al2O3/water). For the first solutions, we found that the values of *Re*1/2 *<sup>x</sup> Cf* are accelerated with the increasing of *λ* and *ϕ*2; however, they are decelerated with *R*. Besides, the values of *Re*−1/2 *<sup>x</sup> Nux* enhance with increasing values of these parameters. The local Nusselt number *Re*−1/2 *<sup>x</sup> Nux* enhance up to 32.37% for Cu-Al2O3/water (*ϕ*<sup>1</sup> = 0.1, *ϕ*<sup>2</sup> = 0.04) compared to the regular fluid (*ϕ*<sup>1</sup> <sup>=</sup> *<sup>ϕ</sup>*<sup>2</sup> <sup>=</sup> <sup>0</sup>) when *<sup>λ</sup>* <sup>=</sup> <sup>−</sup>1, *<sup>R</sup>* <sup>=</sup> 0, and Pr <sup>=</sup> 6.2. Meanwhile, the values of *Re*−1/2 *<sup>x</sup> Nux* are prominent for larger radiation (*R* = 1) with 49.63% enhancement compared to the non-radiant case (*R* = 0) when *λ* = −1, *ϕ*<sup>1</sup> = 0.1, *ϕ*<sup>2</sup> = 0.04, and Pr = 6.2. Moreover, the rise in *<sup>λ</sup>* from <sup>−</sup>1 to 1 contributes to the increment in the values of *Re*−1/2 *<sup>x</sup> Nux* up to 8.66% when *R* = 1, *ϕ*<sup>1</sup> = 0.1, *ϕ*<sup>2</sup> = 0.04, and Pr = 6.2.

**Table 5.** Values of *Re*1/2 *<sup>x</sup> Cf* and *Re*−1/2 *<sup>x</sup> Nux* when Pr = 6.2 for different physical parameters.


Results in "[ ]" are the lower branch (second) solutions.

The variations of the skin friction coefficient *Re*1/2 *<sup>x</sup> Cf* and the local Nusselt number *Re*−1/2 *<sup>x</sup> Nux* against *λ* for several values of *ϕ*<sup>2</sup> and *R* are illustrated in Figures 2–5. The dual solutions of Equations (9)–(11) are possible for both assisting (*λ* > 0) and opposing (*λ* < 0) flows. The flow is accelerated for *λ* > 0 because there is a favourable pressure gradient induced by the buoyancy forces, which results in larger heat transfer and skin friction coefficients rather than the case of *λ* = 0 (non-buoyant case). We note that the separation of the boundary layer occurs when *λ* < 0. The dual solutions happen for *λ* > *λ<sup>c</sup>* and no solution for *λ* < *λc*. The curve terminates at *λ* = *λ<sup>c</sup>* (critical value) and this point is known as the bifurcation point of the solutions. Separately, Figures 2 and 3 display the variations of *Re*1/2 *<sup>x</sup> Cf* and *Re*−1/2 *<sup>x</sup> Nux* against *λ* for different values of *ϕ*<sup>2</sup> when Pr = 6.2 and *ϕ*<sup>1</sup> = 0.1 in the absence of *R*. It is observed that the values of *Re*1/2 *<sup>x</sup> Cf* and *Re*−1/2 *<sup>x</sup> Nux* enhance with the rising of *ϕ*2. Moreover, it is noticed that the boundary layer separation is delayed with the added hybrid nanoparticles. The critical values are *λ<sup>c</sup>* = −4.6983, −5.1215, and <sup>−</sup>5.5404 for *<sup>ϕ</sup>*<sup>2</sup> <sup>=</sup> 0, 0.02 and 0.04, respectively. Apart from that, the variations of *Re*1/2 *<sup>x</sup> Cf* and *Re*−1/2 *<sup>x</sup> Nux* with *λ* for different values of *R* when Pr = 6.2, *ϕ*<sup>1</sup> = 0.1, and *ϕ*<sup>2</sup> = 0.04 are illustrated in Figures 4 and 5. In the presence of *R*, we found that the skin friction coefficient *Re*1/2 *<sup>x</sup> Cf* decreases for *λ* < 0 but increases for *λ* > 0, whereas the local Nusselt number *Re*−1/2 *<sup>x</sup> Nux* enhances for both cases. Besides, we notice that the domain of *λ* for the existence of the dual solutions decreases for larger values of *R* where the critical values of *λ* slightly increase. Note that the critical values *λ<sup>c</sup>* for *R* = 0, 1, and 2 are *λ<sup>c</sup>* = −5.5404, −4.7843, and −4.4030, respectively. It is observed in Figures 3 and 5, the second solutions of *Re*−1/2 *<sup>x</sup> Nux* are boundless as *<sup>λ</sup>* <sup>→</sup> <sup>0</sup><sup>−</sup> and as *<sup>λ</sup>* <sup>→</sup> <sup>0</sup><sup>+</sup> .

**Figure 2.** The variations of the skin friction coefficient *Re*1/2 *<sup>x</sup> Cf* against the mixed convection parameter *λ* for different values of the Cu nanoparticle volume fractions *ϕ*2.

**Figure 3.** The variations of the local Nusselt number *Re*−1/2 *<sup>x</sup> Nux* against the mixed convection parameter *λ* for different values of the Cu nanoparticles volume fractions *ϕ*2.

**Figure 4.** The variations of the skin friction coefficient *Re*1/2 *<sup>x</sup> Cf* against the mixed convection parameter *λ* for different values of the radiation parameter *R*.

**Figure 5.** The variations of the local Nusselt number *Re*−1/2 *<sup>x</sup> Nux* against the mixed convection parameter *λ* for different values of the radiation parameter *R*.

The impact of *ϕ*<sup>2</sup> and *R* on the velocity *f* (*η*) and the temperature *θ*(*η*) profiles for the case of the opposing (*λ* = −1) and assisting (*λ* = 1) flows are presented in Figures 6–13. There exist dual solutions for *f* (*η*) and *θ*(*η*) which satisfy the infinity boundary conditions (11) asymptotically. The rising of *ϕ*<sup>2</sup> leads to an upsurge in the values of *f* (*η*) and *θ*(*η*) on the first solutions for both cases when Pr = 6.2, *ϕ*<sup>1</sup> = 0.1, and *R* = 0 as shown in Figures 6–9. Meanwhile, the velocity *f* (*η*) decreases when *λ* = −1 but increases when *λ* = 1 on the first solutions for larger values of *R* when Pr = 6.2, *ϕ*<sup>1</sup> = 0.1, and *ϕ*<sup>2</sup> = 0.04. The effect of *R* is to increase the temperature *θ*(*η*) inside the boundary layer for both cases as displayed in Figures 10–13. The radiation is dominant over conduction for larger values of *R*, causing a rise in the fluid temperature. It is also noticed that the solutions of the lower branch for the velocity have negative values (*f* (*η*) < 0), which implies that the reverse flow occurs away from the wall, and these behaviors are displayed in Figures 6, 8, 10 and 12. The behaviors of *θ*(*η*) with different values of *ϕ*<sup>2</sup> and *R* for both cases are given in Figures 7, 9, 11 and 13. The overshoot of the temperature *θ*(*η*) near the wall is observed when *λ* = −1, and *θ*(*η*) < 0 when *λ* = 1 for the second solution.

The variations of *γ* against *λ* when Pr = 6.2, *ϕ*<sup>1</sup> = 0.1, *ϕ*<sup>2</sup> = 0.04 and *R* = 1 are described in Figure 14. For positive values of *<sup>γ</sup>*, it is noted that *<sup>e</sup>*<sup>−</sup> *γτ* <sup>→</sup> <sup>0</sup> as time evolves ( *<sup>τ</sup>* <sup>→</sup> <sup>∞</sup> ). In the meantime, for the negative value of *<sup>γ</sup>*, *<sup>e</sup>*<sup>−</sup> *γτ* <sup>→</sup> <sup>∞</sup>. These behaviors show that the first solution is stable and physically reliable, while the second solution is unstable in the long run.

**Figure 6.** The velocity profiles *f* (*η*) for different values of the Cu nanoparticles volume fractions *ϕ*<sup>2</sup> when *λ* = −1 (opposing flow).

**Figure 7.** The temperature profiles *θ*(*η*) for different values of the Cu nanoparticles volume fractions *ϕ*<sup>2</sup> when *λ* = −1 (opposing flow).

**Figure 8.** The velocity profiles *f* (*η*) for different values of the Cu nanoparticles volume fractions *ϕ*<sup>2</sup> when *λ* = 1 (assisting flow).

**Figure 9.** The temperature profiles *θ*(*η*) for different values of the Cu nanoparticle volume fractions *ϕ*<sup>2</sup> when *λ* = 1 (assisting flow).

**Figure 10.** The velocity profiles *f* (*η*) for different values of the radiation parameter *R* when *λ* = −1 (opposing flow).

**Figure 11.** The temperature profiles *θ*(*η*) for different values of the radiation parameter *R* when *λ* = −1 (opposing flow).

**Figure 12.** The velocity profiles *f* (*η*) for different values of the radiation parameter *R* when *λ* = 1 (assisting flow).

**Figure 13.** The temperature profiles *θ*(*η*) for different values of the radiation parameter *R* when *λ* = 1 (assisting flow).

**Figure 14.** Variations of the smallest eigenvalues *γ* against the mixed convection parameter *λ*.

#### **5. Conclusions**

The stagnation point flow towards a vertical plate in a hybrid nanofluid with thermal radiation was examined in the present paper. Findings revealed that dual solutions appeared for both assisting (*λ* > 0) and opposing (*λ* < 0) flows. The dual solutions were found for *λ* > *λ<sup>c</sup>* and no solution for *λ* < *λc*, while the solutions bifurcated at *λ* = *λc*. In addition, the consequence of the copper nanoparticle volume fractions *ϕ*<sup>2</sup> is to enhance the skin friction coefficient *Re*1/2 *<sup>x</sup> Cf* and the local Nusselt number *Re*−1/2 *<sup>x</sup> Nux* for both cases. However, the values of *Re*1/2 *<sup>x</sup> Cf* decreased for *λ* < 0, but increased for *λ* > 0, whereas the values of *Re*−1/2 *<sup>x</sup> Nux* were intensified for both cases in the presence of the radiation parameter *R*. From these findings, the increments of the local Nusselt number *Re*−1/2 *<sup>x</sup> Nux* are observed in the range of 8.66% to 49.63% for the pertinent physical parameters considered. Besides, we noticed that the domain of the mixed convection parameter *λ* where the dual solutions are in existence decreased for larger *R*. Further, the first solution of the velocity *f* (*η*) and the temperature *θ*(*η*) profiles enlarged with the increase of the copper nanoparticles volume fractions *ϕ*2. Moreover, the effect of the radiation parameter *R* is to increase the temperature *θ*(*η*) inside the boundary layer for both cases. Lastly, it was discovered that between the two solutions, the solution with lower boundary layer thickness is stable and thus physically reliable in the long run.

**Author Contributions:** Conceptualization, I.P.; funding acquisition, A.I.; methodology, I.W.; Project administration, A.I.; supervision, A.I. and I.P.; validation, I.P.; writing—original draft, I.W.; writing review and editing, A.I., I.P. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by Universiti Kebangsaan Malaysia (Project Code: DIP-2020-001).

**Acknowledgments:** The authors would like to thank the anonymous reviewers for their constructive comments and suggestions. The financial supports received from the Universiti Kebangsaan Malaysia (Project Code: DIP-2020-001) and the Universiti Teknikal Malaysia Melaka are gratefully acknowledged.

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

#### **References**


### *Article* **Improving the Gridshells' Regularity by Using Evolutionary Techniques**

**Marjan Goodarzi 1, Ali Mohades 1,\* and Majid Forghani-elahabad <sup>2</sup>**


**Abstract:** Designing and optimizing gridshell structures have been very attractive problems in the last decades. In this work, two indexes are introduced as "length ratio" and "shape ratio" to measure the regularity of a gridshell and are compared to the existing indexes in the literature. Two evolutionary techniques, genetic algorithm (GA) and particle swarm optimization (PSO) method, are utilized to improve the gridshells' regularity by using the indexes. An approach is presented to generate the initial gridshells for a given surface in MATLAB. The two methods are implemented in MATLAB and compared on three benchmarks with different Gaussian curvatures. For each grid, both triangular and quadrangular meshes are generated. Experimental results show that the regularity of some gridshell is improved more than 50%, the regularity of quadrangular gridshells can be improved more than the regularity of triangular gridshells on the same surfaces, and there may be some relationship between Gaussian curvature of a surface and the improvement percentage of generated gridshells on it. Moreover, it is seen that PSO technique outperforms GA technique slightly in almost all the considered test problems. Finally, the Dolan–Moré performance profile is produced to compare the two methods according to running times.

**Keywords:** gridshell structures; shape ratio; length ratio; regularity; particle swarm optimization; genetic algorithm

#### **1. Introduction**

Gridshells which are also called lattice shells or reticulated shells are generally defined as structures with the shape and rigidity of a double curvature shell consisting of a grid not a continuous surface [1]. Although gridshells come to several forms, they are usually designed with triangular, quadrilateral, or hexagonal faces (or grid cells) [1–10]. Forming and optimizing gridshell structures have been very attractive problems in the past decades. Several approaches, such as inversion method [1], dynamic relaxation [2,4,11], force density method [3,12], and so forth [10,13], have been studied so far in the literature to address the problem of forming a grid shell structure. Moreover, various techniques from gradientbased to evolutionary methods have been employed for optimization of gridshells taking into account various aspects of a gridshell such as economic, structural, or aesthetic [11–18]. The focus of this work is on the optimization problem, and it is assumed that the initial forms of the desired gridshells are given.

Bouhaya et al. [1] coupled genetic algorithms with a geometric technique, which is called compass method, to present a novel approach for generating elastic gridshells on an imposed shape with boundary conditions. The authors used three benchmarks with different Gaussian curvature to illustrate the proposed technique. These benchmarks are also employed in the present work for generating the numerical results as they contain a variety of conditions with different Gaussian curvatures. Richardson et al. [11] presented a two-phase design technique. Using a multi-objective genetic algorithm, Winslow et al. [17]

**Citation:** Goodarzi, M.; Mohades, A.; Forghani-elahabad, M. Improving the Gridshells' Regularity by Using Evolutionary Techniques. *Mathematics* **2021**, *9*, 440. https://doi.org/10.3390/math 9040440

Received: 2 January 2021 Accepted: 23 January 2021 Published: 23 February 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

established a design tool for synthesis of optimal gridshell structures taking into account two or more load cases such as wind load. Feng et al. [5] considered three categories of indexes including mechanical, geometry, and economic criteria for optimization of freeform cable-braced gridshells. Focusing on triangular gridshells and optimization over a free-form surface, Wang et al. [16] presented a framework to generate gridshells.

We note that usually the researchers have taken into account the structural aspects of gridshells in optimization phase and less attention has been heeded to improvement of the gridshells' regularity while the later can affect directly on the economy and aesthetic indexes. In fact, improving the regularity of a gridshell may lead to decreasing the number of different elements' types as well as enhancing the aesthetic aspect of the desired grids. Hence, in this work, improvement of the regularity of gridshells is considered as the main aim. To this end, two indexes are introduced to measure the regularity of a gridshell. The indexes are called "length ratio" and "shape ratio" and defined as the standard deviation of all the elements' lengths and all the inner angles in the gridshells' faces, respectively. There are a few studies in the literature which have worked on improving the regularity of gridshells. In fact, to the best of our knowledge, this is the first time that these two indexes are introduced for measuring the free-form gridshells' regularity. Considering the geodesic domes, Nooshin and his coworkers in [19] have proposed some measures for making the regularity of such structures quantifiable. Here, we compare our introduced indexes with the proposed ones in [19] on some benchmark for illustrating the practical efficiency of the introduced indexes in this work.

It is noted that although gradient-based techniques guarantee a superior convergence rate for the cases with a few number of design variables, in the cases with many design variables, generally, evolutionary methods work more appropriately. This is why we employ evolutionary techniques in this work. Among the evolutionary techniques, genetic algorithms (GAs) have been used the most in optimization of gridshells [1,3,5,8,10,11,13–18]. Another well-known evolutionary method is particle swarm optimization (PSO) to which less attention has been paid for improving the gridshell structures so far. However, it is a very powerful technique and has been applied to many other optimization problems [20–27]. Thus, these two techniques are considered in the present work.

We first present an approach, Algorithm 1, for generating initial triangular and quadrangular gridshells in MATLAB. Then, it is explained how the nodal positions in a given grid can be represented as birds (or particles) in PSO technique and as chromosomes in GA, and how these techniques can be used to improve the regularity of gridshells by bettering the nodal positions. We introduce two indexes to make the gridshells' regularity quantifiable and use them in the improvement process. Moreover, providing the numerical results, it is illustrated that our introduced indexes are practically more efficient than the existing indexes in the literature. In addition, the performances of GA and PSO techniques are compared through experimental results generated on eighteen test problems by which several interesting observations are obtained. Finally, we produce the Dolan and Moré performance profile [28] to have a more intuitive comparison between GA and PSO technique based on running times.

The rest of this work is organized as follows. Section 2 presents an algorithm to generate the initial gridshells for a given surface in MATLAB, explains briefly the GA and PSO techniques stage by stage, describes how these techniques can be used for improving the gridshells' regularity, and moreover provides the mathematical model for the problem. In Section 3, first our introduced indexes are compared to two existing ones in the literature on some benchmark, and then the performances of GA and PSO techniques are compared on three benchmarks. Finally, Section 4 provides the concluding remarks and some directions for the future works.

#### **2. Main Block**

Here, an approach, Algorithm 1, is presented to generate initial gridshells. Then, we describe the genetic algorithm (GA) and particle swarm optimization (PSO) technique briefly for making it more convenient to read this work without having previous knowledge of these methods. Next, two indexes are introduced for making the gridshells' regularity quantifiable, and finally the mathematical model of the problem is provided.

#### *2.1. Generating An Initial Gridshell*

There are several different approaches in the literature to generate an initial form of gridshell. Bouhaya et al. [1] used the compass method which is a geometric approach and allows creating a network of parallelograms on any surface. The authors then coupled the compass method with genetic algorithms to propose an optimization approach. In optimization of the cable-braced grid shells, Feng et al. [5] created the initial forms by translating the generatrix and directrix which allows the mesh to be parallelogram. The authors then proposed an optimization technique based on the usage of generatrix and directrix. Wang et al. [16] formed the surface model by using NURBS (non-uniform rational B-splines), then generated a set of uniformly distributed random points on the surface, and finally connected the points by using Delaunay-based triangularization to generate an initial triangular gridshell.

It is noted that usually the proposed optimization methods in the literature are based on some generating techniques for the initial form. However, the focus of this work is on the regularity improvement of a given gridshell without taking into account how the initial form is obtained, and hence the presented techniques here can be used for improving the regularity of any given initial form of a gridshell which is given as two sets. A set with the (Cartesian) coordinates of nodes (or vertices), which is denoted by V here, and another set which shows the faces in the grid and is denoted by F here. In fact, F is a matrix, each row of which states which vertices form the corresponding face (or grid cell). Having the set V of the initial gridshell, the proposed approach here can be employed to improve the regularity of the gridshell by bettering the positions of the nodes without making any change in the matrix F. Moreover, one can add some restrictions such as fixing the position of some nodes to the improvement process.

In this work, for convenience and not being involved in the complication of generating the initial gridshells which is not of our focus, it is assumed that the given gridshell is based on a surface F(x, y, z) = 0. In this way, to keep the nodes (vertices) on the desired surface, the improvement process is made on the first two coordinates of the vertices, i.e., x and y, and the third coordinate is always obtained by using the surface equation. Any way, we observe that the detailed approach here can be employed for any given initial gridshell.

Another aspect to notice is that although gridshells with the triangular to hexagonal grid cells have been studied in the literature, triangular grids are the most widely used in reality as they can describe any free-form shape [16]. In addition, as the triangular gridshells have less economic advantages in construction than the equivalent structures built of quadrilateral grids, many researchers have studied quadrangular gridshells [5]. As a result, one can say that triangular and quadrangular gridshells are the most important cases, and hence the focus of this work is on these two groups of gridshells.

Given a surface F (x, y, z) = 0, to build an initial gridshell, usually some uniformly distributed random points are generated on the surface and then those points are connected to construct the triangular or quadrangular grid cells. However, as our main object here is to improve the regularity of the initial gridshells, we consider the equidistant points on the surface at the beginning which is the most regular initial case, and then we see that it can be still improved by using our introduced indexes. After generating the equidistant points on the surface, we use a very nice function in MATLAB, i.e., *surf2patch*(), to transform the coordinates (x, y, z) to two matrices V and F. However, it is possible to have duplicate vertices in V as any vertex in a grid cell may belong to some other cells as well. Hence, there may also be some duplicativeness in matrix F which should be removed.

This way, we present the following algorithm which generates both triangular and quadrangular initial gridshells (matrices F, faces, and V, vertices) for any given surface F(x, y, z) = 0.

Some explanations are given in Appendix A Section on the used MATLAB functions and commands in Algorithm 1. We note that Algorithm 1 works with any generated set of points in Step 1 including the uniformly distributed random points or the equidistant points on the surface. However, in our usage of this algorithm, we generate the equidistant points on x−axis and y−axis (and then the third coordinates of the points are determined by using the given surface F(x, y, z) = 0) rather than the randomly generated points. This is only to have the most regular initial gridshell.

**Algorithm 1.** Generating initial triangular or quadrangular gridshells (matrices F and V) for a given surface F(x, y, z) = 0 with some specified domain (in MATLAB)

**Step 2.** Determine the matrices F, faces, and V, vertices, as follows.

if *ind* [F, V] = surf2patch(X, Y, Z) else, [F, V] = surf2patch(X, Y, Z, 'triangles').

**Step 3.** Remove the redundant vertices in matrices F and V as follows.

[V, ∼, I] = unique (V, 'rows'); F = I(F);

#### *2.2. Genetic Algorithm*

Here, we explain briefly the genetic algorithm (GA) to eliminate the need for previous knowledge of this technique for the readers. The genetic algorithm (GA) is an iterative search method which relies on bio-inspired operators such as selection, crossover, and mutation. This technique was developed by Holland [29] and contains six main stages explained below. It is noted that our main aim is not proposing an improved GA or tuning the best parameters of GAs on the desired problems but rather is to show how this technique can be employed to improve the gridshells' regularity by using our introduced indexes in MATLAB. By the way, we tested some of the very common values for the parameters in GA taken from the literature, and then considered the best ones in our primary generated numerical results.

(1) Generating an initial population: Based on Darwinism, in this technique it is always assumed that there is an initial population of individuals which can change partially in each generation (iteration in the algorithm) according to the fitness (or cost) function. In fact, in each iteration the weak individuals are normally removed and instead some new stronger offspring are added to the population according to the crossover and mutation processes. We note that the number of individuals in each generation are the same as the number of individuals in the initial population. To generate an initial population, usually some random solutions are generated within a certain reasonable domain. Moreover, each solution, which is a member of the initial population, should be represented as a string (vector or matrix), which is called chromosome in this technique.

It is noted that although both matrices F and V are required to draw (or drive) the desired gridshells, the matrix F does not change during the improvement process, and we only need to improve the nodal positions according to the desired cost function. Hence, only the matrix V is improved. Moreover, with the first two coordinates of each vertex, i.e., x and y, the third coordinate can be obtained by using the given surface, that is F (x, y, z) = 0. Therefore, in this work, the first two columns of the initially generated matrix V are considered as a basic solution and denoted by Vnew. Then, a population of Npop individuals is randomly generated between Vnew − *t* and Vnew + *t* as the initial population, where *t* is a tolerance. As the initially generated matrix F, which shows the faces in the gridshell, does not change in the improvement process, the same matrix is used to evaluate every individual in the population.

**Step 1.** Generating some points on the surface in the domain. This way, we obtain three matrices X, Y, and Z including the coordinates of the points. Set *ind* (0 for triangular or 1 for quadrangular case).

(2) Evaluating each solution: An important part in every improvement process is determining the fitness function (in the case of maximizing) or cost function (in the case of minimizing), and then adopting it to the process. After generating the initial population, every individual is evaluated. The newly obtained solutions in crossover and mutation processes are also evaluated.

Then, usually in the merging stage, all the solutions are sorted and the weak ones are removed. Here, the cost function is considered as one of the presented indexes or their combination. More details on the cost function in our work is given in Section 2.5.

(3) Parent selection: In genetic algorithm, two current solutions (called parents) are selected in order to create two new solutions (called offspring or children) in crossover stage. There are various methods to select parents among which the random selection, tournament selection, and roulette wheel selection are the most used [30–32]. Here, we use the roulette wheel selection method. For improving this method, we first generate a vector of probability, i.e., P = (p1, ···, pNpop), based on the Boltzmann selection technique [33,34] and using a selection pressure β as follows.

$$\begin{array}{l}(i) \ P = \exp(-\beta \times \mathbb{C} / \mathbb{C}\_{\max})\\(ii) \ P = P / \sum\_{j=1}^{N\_{pop}} p\_j \end{array} \tag{1}$$

where C is the vector of the solutions' costs and Cmax is the cost of the worst solution in the current population. According to experimental results, to improve the convergence of GA technique, for each problem, we set the selection pressure β so that the summation of the first half of components in probability vector P stays between 0.7 and 0.8. This way, we obtain some probabilities whose summation is 1. Calculating the accumulated vector and generating a random number from zero to 1, the first component in the accumulated vector which is equal to or greater than this random number gives the desired parent. The crossover percentage in GA is usually considered between 0.5 and 1 [31]. Here, it is set to pc = 0.8. It is noted that in our primary numerical experiments on desired problems here, changing the crossover percentage from 0.7 to 0.9 led to a negligible change in the final results, and so the average of pc = 0.8 is considered. Therefore, as the number of parents should be even, in each iteration Nc = 2 × [pc × Npop/2] parents are selected and the same number of offspring (children) are generated, where [•] is the nearest integer number to •.

(4) Crossover: This is an important operator in GA which mimics mating in biological populations. It propagates the good features from the current population to the next one leading to better fitness (or cost) value on average. There are several strategies to do the crossover including single point, double-point, uniform, and arithmetic crossover. Here, as the points can move continuously on the surface, we use the arithmetic crossover. In this way, we first generate a vector α of random numbers from the continuous uniform distribution, and then considering X1 and X2, the new children Y1 and Y2 are generated as follows.

$$Y\_1 = \mathfrak{a}\_\cdot \times X\_1 + (1 - \mathfrak{a})\_\cdot \times X\_2 \tag{2}$$

$$Y\_2 = \mathfrak{a}\_\cdot \times X\_2 + (1 - \mathfrak{a})\_\cdot \times X\_1. \tag{3}$$

(5) Mutation: This operator allows for global search of the solution's space, promoting the diversity in population characteristics. It also prohibits getting trapped in local minima. The mutation percentage in GA is usually chosen between 0.001 and 0.5 [31], and hence according to our primary generated numerical results *pm* = 0.3 is considered in this work. This way, in each generation (from the second generation), Nm = [*pm* × Npop] of mutants are generated. Moreover, to generate a mutant, a mutation rate less than 0.1 is usually considered in GA [31,32]. Comparing the numerical results for different values 0.01, 0.02, ···, 0.08, we consider μ = 0.02 as mutation rate which determines the number of components (or genes) which are changed in the selected solution (or chromosome), and we do the mutation by using the standard normal distribution to change the values of the selected components in each solution. In fact, μ × *Nv* component are changed in the selected

solution for mutation, where *N<sup>ϑ</sup>* is the number of vertices in the gridshells and • is the smallest integer number not less than •.

(6) Merging: After selecting parents, generating new children, and mutating some solutions, we merge all the current and newly obtained solutions leading to Npop + Nc + N*m* solutions. Then, as the number of solutions in each generation should be the same, all the solutions are sorted and arranged ascendingly according to the costs, and the first Npop ones are selected as the next population.

We note that in GA the stages (3)–(6), explained above, are repeated until some considered stop criteria is satisfied.

Stop criteria. In fact, in all the iterative processes such as GA and PSO, the algorithm needs some stopping criteria. Some common stopping criteria used in the literature are: (i) stop by exceeding the given maximum number of iterations, (ii) stop when the improvement of solution in a given number of iterations is less than a given limit, (iii) stop when a satisfactory solution is determined, and (iv) stop when the cost function slope is almost zero. Here, for both GA and PSO, we consider a maximum number of M = 2000 iteration as the stop criterion.

#### *2.3. Particle Swarm Optimization*

Here, we explain briefly the particle swarm optimization (PSO) for the reader not being required to have any previous knowledge of this technique as well. This technique is also an iterative search method, inspired from social behavior, which was initially proposed by Kennedy and Eberhart [30]. There are four main stages in PSO explained as follows.

(1) Generating an initial population: Like GA, it is assumed that there is some initial population of individuals, called particles, in PSO. Usually, all the particles in PSO move from the current positions to some new positions based on the swarm intelligence in each iteration. Here, we consider the same initial population for PSO as the GA method. It is noted that each row in the matrix Vnew, defined in Section 2.3, shows the position of a particle in the initial population and the matrix is updated whenever the position of the particles are changed. We note that the initially generated particles move toward the positions of the so-called Pbest and Gbest, explained below.

Thus, after generating the initial population, we need to evaluate them to determine Pbest and Gbest in the population.

(2) Velocity Updating: In this technique, the movement of each particle in every iteration is determined by its velocity. Let *x<sup>k</sup> <sup>i</sup>* and *<sup>v</sup><sup>k</sup> <sup>i</sup>* respectively denote the position and velocity of particle *i* in the *kth* iteration in the search space. The velocity of particle *i* for the next iteration is calculated as follows.

$$w\_{i}^{k+1} = wv\_{i}^{k} + c\_{1}r\_{1} \left(Pbest\_{i}^{k} - x\_{i}^{k}\right) + c\_{2}r\_{2} \left(Gbest^{k} - x\_{i}^{k}\right) \tag{4}$$

where *w* is the inertia factor which controls the flying dynamics, *c*<sup>1</sup> and *c*<sup>2</sup> are the acceleration factors for the experiences of Pbest and Gbest, respectively, r1 and r2 are random variables in the interval [0,1] which provide the ability of stochastic searching for PSO. The accelerating factors *c*<sup>1</sup> and *c*<sup>2</sup> compromise the trade-off between exploitation and exploration. It is noted that *Pbest<sup>k</sup> <sup>i</sup>* is the best experienced position for particle *i* until the *kth* iteration, and *Gbest<sup>k</sup>* is the best experienced position among all the particles so far. We also note that the velocities for the particles in the initial population are set initially to be zero.

There are three parameters in Equation (4) which are *w*, *c*1, and *c*2. Many studies have been done so far to determine the best parameters for PSO technique. On the inertia weight, i.e., *w*, the studies show that a fixed *w* will not get to good results, and hence several techniques have been proposed in the literature by which w is lessened along with iteration times [26]. Some researchers suggested the interval [0.9,1.2] and some others the interval [0,1] for *w* [25,26,30]. Similarly, several researchers have studied the acceleration factors *c*<sup>1</sup> and *c*2, and suggested different values for these factors. As our main aim is not tuning the best parameters for the PSO method in this area, we simply

compared the four more common strategies taken from literature [26] numerically to select the best one. The strategies are (1) *w* = 1, *wdamp* = 0.999, *c*<sup>1</sup> = 2 and *c*<sup>2</sup> = 2, (2) *w* = 1, *wdamp* = 0.999, *c*<sup>1</sup> = 2.8 and *c*<sup>2</sup> = 1.3, (3) *w* = 1, *wdamp* = 0.999, *c*<sup>1</sup> = 1.49445 and *c*<sup>2</sup> = 1.49445 and (4) Letting [*yellow*]ϕ<sup>1</sup> = 2.05, [*yellow*]ϕ<sup>2</sup> = 2.05, [*yellow*]ϕ = [*yellow*]ϕ<sup>1</sup> + [*yellow*]ϕ2, and <sup>ξ</sup> = 2/([*yellow*]<sup>ϕ</sup> − 2 + ,[*yellow*]ϕ<sup>2</sup> − <sup>4</sup>[*yellow*]ϕ), then we have *w* = <sup>ξ</sup>, *c*<sup>1</sup> = ξ × [*yellow*]ϕ1, and *c*<sup>2</sup> = ξ × [*yellow*]ϕ2. We note that in the first three strategies, the inertia weight is updated in each iteration by *w = w.wdamp*, and this is why *wdamp* is called the damping factor. It is also noted that the values of *c*<sup>1</sup> and *c*<sup>2</sup> in the strategies 3 and 4 are the same. We found the first strategy as the best among these four strategies for our desired problem, and hence we consider its parameters in this work.

We note that after updating velocities and before updating the particles' positions, it is important to check if the velocities are within a pre-specified range. In fact, to avoid violent random walking and control the global exploration of the particles, some lower and upper speed limits for each particle are determined and when the velocity of a particle exceeds one of the limits, it is replaced with the related limit. These limits do not impact on the particle position, and only lessen the step size of velocity, and hence the limits control the particles' moves and the aspects of exploration and exploitation [25,30]. Moreover, greater (smaller) speed limits lead to global (local) exploration [25,30]. The process of controlling velocity is called velocity clamping.

Although the movement of particles are controlled by velocity limits, sometimes even by using the lower limit of velocity, the new position of a particle is obtained out of the search area or feasible space. In fact, when the current position of a particle is close enough to the borders of the search area, according to the direction of velocity, even with small velocity, the new position of the particle will be out of the search area. This shows that in the next iterations, according to the inertia, this will happen again that the new position of the particle stays out of search space. Hence, to avoid such an event, the direction of velocity is changed to the opposite direction, that is its sign will be changed. This process is called "velocity mirror effect".

(3) Position Updating: Unlike the genetic technique in which usually not all the members of the population are replaced with some new children in each iteration, in the PSO method, all the particles in the population move and change in each iteration. To do so, after calculating the velocity of the particle *i*, its position is updated as follows.

$$
\mathbf{x}\_i^{k+1} = \mathbf{x}\_i^k + \mathbf{v}\_i^{k+1} \tag{5}
$$

Apart from all the modifications and limits on the velocities, the new positions of some particles may be out of the search area. Hence, the updated positions should be checked for being within the allowed domain. If the position of a particle exceeds the lower or upper bounds, the position of the particle is replaced with the associated bound.

(4) Memory updating: In this technique, in each iteration, the position of every particle may change, and it is one of the differences between GA and PSO. Therefore, after updating the positions of the particles, we need to evaluate all the particles in order to check if it is required to update the P best and Gbest variables as they play an essential role in movement of the particles. However, it is not required to sort the particles after the evaluation process, and we only need to update the memory of P best and Gbest, if it is required. In this work, the same cost function is considered for both GA and PSO techniques.

The above-mentioned stages (2)–(4) in PSO are repeated until some considered stop criteria is satisfied. As stated in the previous section, we consider a maximum number of M = 2000 iteration as stop criteria for both GA and PSO in this work.

#### *2.4. The Regularity Indexes*

Here, we explain in more detail our introduced indexes, which are length ratio and shape ratio, as well as two similar indexes introduced in [19]. As the indexes introduced by Nooshin and his coworkers have been also called length and shape ratios, to make the four indexes distinguishable, we denote our length and shape ratios by OLR and OSR, respectively, and the introduced length and shape ratios by Nooshin and his coworkers by NLR and NSR, respectively. We recall that V is a matrix containing the position of all the vertices in Cartesian coordinates with no redundant vertices. In fact, V is an Nv × 3 matrix, where Nv is the number of vertices in the gridshell. Each row in V provides the Cartesian coordinates of a vertex in the grid, and the vertices are numbered in the order of appearance in V.

In the order of appearance in V. For instance, the vertex whose coordinates are given in the third row of V is numbered 3. The matrix F gives the vertices of each face. In fact, in a triangular (quadrangular) gridshell, F is an Nf × 3 (Nf × 4) matrix, where Nf is the number of faces in the grid. Each row in F shows which vertices are in the corresponding face. To have a better understanding, a simple grid (pyramid) is given in Figure 1. The matrices F and V for this figure are as follows.


**Figure 1.** A simple grid (pyramid).

As it is seen, there are four vertices and also four faces in Figure 1. The *i*th row in V gives the Cartesian coordinates of the *i*th vertex. For example, the coordinates of vertex (1) are (0, 0.65, 0).

The *i*th row in F gives the vertices of the *i*th face in the grid. For example, the first face in the grid is the triangle consisting of vertices (1), (2) and (3).

Length ratios: Our introduced length ratio (OLR) is defined as the standard deviation of lengths of all the elements in the grid. Hence, after calculation of all the lengths, OLR can be obtained by computing the standard deviation of all the lengths. The introduced length ratio by Nooshin and his coworkers [19] (NLR) is (the shortest element's length/the longest element's length) for each face in the gridshell, and then for the gridshell is the mean value of all the calculated values for the faces.

Hence, for both OLR and NLR, one first needs to calculate the length of all the elements in the grid. To do so, we use the rows in F to find the beginning and end vertices of each element, and then use matrix V to find the coordinates of the desired vertices to compute the distance between them. For example, in Figure 1, according to the first row in F, we calculate the distance between the vertices (1) and (2), (2) and (3), and (3) and (1) by using their given coordinates in matrix V.

This way, we obtain the row [0.8078 0.8322 0.7382] as the lengths of elements in the first face in this figure. The matrix of lengths, which is denoted by L, for this figure is given below in which each row gives the lengths of the elements in the corresponding face in matrix F.


Now, OLR can be simply computed as the standard deviation of all the lengths calculated in matrix L above which is equal to 0.0398. For computing NLR, we first calculate (the shortest element's length/the longest element's length) for each face. This way, the vector [0.8870, 0.9029, 0.9171, 0.9672] is obtained in which for example the first component corresponds to the first face in the grid, that is the first row in matrix L above. Then, NLR is equal to the mean of all the calculated values in this vector, which is 0.9186 in this example. As a result, we have OLR = 0.0398 and NLR = 0.9186 in this example.

Shape ratios: Our introduced shape ratio (OSR) is defined as the standard deviation of all the angles between the elements in all the faces. Similar to the length ratio, the NSR, which is the introduced shape ratio in [19], is (the smallest internal angle/the largest internal angle) for each face in the gridshell, and then for the gridshell is the mean value of all the calculated values for the faces. This time, one needs to compute the inner angles in all the faces of the gridshell. To do so, as we have the Cartesian coordinates of the vertices from V and the faces from F, in each iteration, we consider a face, which is triangle or quadrangle, and compute its angles by using the formula *<sup>θ</sup>* = arccos( <sup>→</sup> *a* × → *b a*

*a*×*b* ), where <sup>→</sup>

and <sup>→</sup> *b* are two vectors and θ is the angle between them. This way, a matrix of size of F is obtained as a matrix of angles, denoted by A here. For example, the angles for the first face in Figure 1 are [1.1336 0.9335 1.0746] in radian and the matrix of angles (in radian) in this figure is as follows.


Now, in this example, OSR can be simply calculated as the standard deviation of all the angles calculated in matrix A above which is equal to 0.0684. To compute NSR, one first needs to calculate (the smallest internal angle/the largest internal angle) for each face. This way, the vector [0.8235, 0.8467, 0.8704, 0.9463] is obtained. Then, NSR is equal to the mean value of all the calculated values in this vector, which equals 0.8717 in this example. Briefly, we have OSR = 0.0684 and NSR0 = 0.8717 in this example.

We note that in both introduced ratios in [19], the smallest item is divided by the largest item for each face, and the average of all the calculated values is considered as the corresponding ratio. However, as the standard deviation is a very popular measure and has several advantages, we considered it instead of simply dividing the smallest value by the largest value. In fact, standard deviation measures the deviation from the mean and is based on all the items (not only the smallest and largest). Moreover, as the square is a nice function in which the numbers smaller than one become smaller and the numbers larger than one become larger, and hence we can ignore the small deviations and consider the larger ones more clearly. To show the practical efficiency of our introduced indexes, we compare the indexes on some benchmarks in Section 3.

#### *2.5. Mathematical Model of the Problem*

Now that the problem has been completely described, the general mathematical model of the problem is provided in this section as follows.

$$\begin{array}{c} \min f = \alpha \left( \frac{\sum\_{i=1}^{\mathsf{N}\mathsf{e}} \left( \mathsf{l}\_{i} - \mathsf{I} \right)^{2}}{\mathsf{N}\_{a} - 1} \right) + \mathfrak{G} \left( \frac{\sum\_{i=1}^{\mathsf{N}\mathsf{e}} \left( \mathsf{o}\_{i} - \mathsf{T} \right)^{2}}{\mathsf{N}\_{a} - 1} \right), \\ \text{s.t. } \mathsf{V}\_{\text{nuc}} \in \ \Omega, \text{ and } \mathsf{F} \text{ is given and fixed}, \end{array}$$

where α and β are constants, *Ne* the number of elements, *li* the length of the *ith* element, *l* the mean value of all the elements' lengths, the number of all the angles, θi the ith angle, and θ is the mean value of all the angles in the given gridshell. Moreover, Ω is a feasible region in the xy plane, V new an Nv × 2 matrix which contains the first two columns of V, which contains the Cartesian coordinates of the vertices, and F is a matrix which gives the faces in the desired gridshell.

Moreover, Ω is a feasible region in the xy plane, V new an Nv × 2 matrix which contains the first two columns of V, which contains the Cartesian coordinates of the vertices, and F is a matrix which gives the faces in the desired gridshell.

One can set the constants α and β according to a specific aim in the improvement process. For example, setting α = 1, β = 0 the gridshell's regularity is improved according to the length ratio while setting α = 0, β = 1 the gridshell's regularity is improved taking into account the shape ratio. Additionally, setting 0 < α, β < 1, we have a multi-objective case. We note that having V new and F, one can first calculate the third coordinates of each vertex by using the formula of the surface, and then the elements' lengths and the inner angles of all the faces. Therefore, the mathematical model of the problem is well-defined and the function f can be minimized by moving V new in Ω.

Now, having described all the processes, we are ready to provide the experimental results.

#### **3. Experimental Results**

Here, several numerical results are provided in two sections. In the first one, the practical efficiency of our introduced ratios and the presented ones in [19] are compared, and in the second one the performances of GA and PSO methods in improving the regularity of gridshells are compared.

An important stage of generating numerical results is to choose some benchmarks. The following criteria have been considered to choose some known benchmarks from the literature. (1) As the indexes in [19] are introduced for geodesic domes, to have a fairer comparison, we need some gridshell benchmark which is somehow similar to domes, and hence we consider Hemisphere surface taken from the literature [1] as one of the benchmarks in this work. (2) As the effect of Gaussian curvature of a gridshell on the other structural aspects of the gridshell and vice versa have been widely studied in the literature [1,35], for observing if the change in the Gaussian curvature has some effect on the regularity improvement process, we need to choose gridshells with different Gaussian curvatures (positive, negative, and both). (3) As it is not the focus of this work to be involved in the complication of generating the initial gridshells, we consider the gridshells which are associated with some surface equations.

This way, along with Hemisphere surface with positive Gaussian curvature, we consider two other gridshells associated with surfaces of sinusoidal, which is a surface with Gaussian positive and negative curvature, and Hyperbolic paraboloid, which is a surface with Gaussian negative curvature. All the three chosen gridshells are taken from the literature [1] and depicted in Figure 2.

**Figure 2.** Three benchmark gridshells (quadrangular) with different Gaussian curvature taken from [1].

To determine the coordinate matrices of the hemisphere gridshell, which is depicted in Figure 2a, we use the built-in sphere () command which generates the x−, y−, and z−coordinates of a unit sphere consisting of 20-by-20 faces. The first 10 faces situate under or on the xy−plane, and thus we only consider the faces numbered from 11 to 20, which are above the xy−plane, as the hemisphere.

To determine the coordinate matrices of the sinusoidal gridshell, which is depicted in Figure 2b, the equation z = 0.05xsin(x) + sin(y) is used for 0 ≤ x ≤ 10 and 0 ≤ y ≤ 4. In fact, on the *x*−axis the equidistant points with distance of 0.5 and on y−axis the equidistant points with distance of 0.4 are considered.

To determine the coordinate matrices of hyperbolic paraboloid gridshell, which is depicted in Figure 2c, the equation z = x2 − y2 is used for −2 ≤ x ≤ 2 and −2 ≤ y ≤ 2. In fact, on the *x*−axis the equidistant points with distance of 0.4 and on y−axis the equidistant points with distance of 0.25 are considered. In the last two cases, i.e., sinusoidal and hyperbolic paraboloid, the x− and y− coordinates are generated by using the *meshgrid*() command, and then the z− coordinates matrix is obtained by using the surfaces' formulas.

As our focus is on improving the regularity of gridshells, to have very regular initial grids the equidistant points are considered rather than randomly generated points. We note that the gridshells depicted in Figure 2 are the quadrangular ones. As the triangular gridshells are the same as the quadrangular ones but with the triangle faces, they are not given here to avoid the prolongation of the paper. In fact, Algorithm 1 generates the triangular gridshells by adding the diagonal of the faces in quadrangular gridshells.

To generate the numerical results, both GA and PSO algorithms and Algorithm 1, our presented approach to generate the initial gridshells, are implemented in MATLAB programming environment and the program is executed on a PC with Intel(R) Core (TM) i5-2400S Duo CPU 2.50 GHz, with GB of RAM. We note that when the primary shape of the structural appearance is ascertained, it is not allowed to make major changes and one can make only minor changes in the shape improvement process [5]. Therefore, to generate the initial populations in both GA and PSO algorithms, the feasible solution domain is restricted to a small interval around the initial equidistant generated gridshells. To this end, considering Vnew as an Nv × 2 matrix which contains the first two columns of V, the matrices Vmax = Vnew + 0.02 × **1**Nv <sup>×</sup> <sup>2</sup> and Vmin = Vnew − 0.02 × **1**Nv <sup>×</sup> <sup>2</sup> are considered as the upper and lower bounds of the feasible domain, respectively, where **1**Nv <sup>×</sup> <sup>2</sup> is an Nv × 2 matrix with all the entities being 1. Therefore, we recall that (i) the initially generated equidistant gridshells are very regular and (ii) the feasible solution domain is restricted.

As some initial conditions, we suppose that all the vertices which situate on the edges of the gridshell should be fixed which is makeable by considering the same maximum and minimum ranges for those vertices in matrices Vmax and Vmin. The upper and lower bounds on the velocities of particles in the PSO method are respectively assigned as Velmax = 0.1 × (Vmax − Vmin) and Velmin = −Velmax. The population size in GA and PSO algorithms is usually specified between 20–60 [25,26,31,32], among which we set the average value of Npop = 40 as the population size in both methods. Note that our primary experimental results did not show notable changes in the results varying the population size from 40 to 60; however, we obtained better results in both methods by increasing Npop from 20 to 40. Moreover, the stop criteria are set to a maximum number of M = 2000 iterations for both algorithms. It is recalled that the details and the selected values of parameters for both algorithms have been discussed in Sections 2.3 and 2.4, and hence we do not restate them here. The other details on the implementation of algorithms and the generated numerical results are given in the next sections.

#### *3.1. Comparison of the Regularity Indexes*

Here, our two introduced indexes, OLR and OSR, are compared to two corresponding introduced indexes by Nooshin et al. [19], i.e., NLR and NSR. As Nooshin and his coworkers have introduced the indexes for geodesic domes and not the free-form gridshells, we

compare the indexes only on the hemisphere's gridshell, depicted in Figure 2a which is the closer one to a dome. As the main aim in this section is to compare the regularity indexes, we only use the PSO method. To have a more complete comparison, both triangular and quadrangular gridshells associated with the hemisphere are generated. This way, we improve the regularity of the considered gridshells four times separately, each time applying one of the indexes as the cost function in the PSO algorithm.

The final results rounded to three decimal places on comparing the length and shape ratios are respectively stated in Tables 1 and 2. It is seen that using our proposed indexes as the cost function in the PSO algorithm, the Nooshin et al.'s indexes are also lessened (improved). For example, in Table 1, for a triangular case, the initial values of OLR and NLR are respectively 0.087 and 0.611. By applying OLR as the cost function, after 2000 iterations, the OLR and NLR are respectively equal to 0.083 and 0.615 which shows improvement in both ratios. However, by applying NLR as the cost function, after 2000 iterations, the OLR and NLR are respectively equal to 0.096 and 0.633 which shows worsening in OLR and improvement in NLR. Some similar observations can be made for quadrangular cases in this table and both cases in Table 2. We note that according to the definition, the best value of NLR or SLR is 1, and so they are improving as they are approaching 1. Therefore, as Tables 1 and 2 show, the regularity of the gridshells is practically worsened by using the introduced indexes by Nooshin et al. [19] which shows clearly the practical efficiency of our introduced indexes.

**Table 1.** The final results on comparing the length ratios.


**Table 2.** The final results on comparing the shape ratios.


#### *3.2. Improving the Regularity*

Here, the performances of GA and PSO techniques are compared together in improving the regularity of the three gridshells with different Gaussian curvature taken from the literature [1]. Both triangular and quadrangular gridshells associated with each surface are generated. The regularity of each generated gridshell is improved by applying our introduced indexes and using both GA and PSO methods. Three cost functions have been considered, (1) length ratio, (2) shape ratio, and (3) a multi-objective case by combining both length and shape ratios with the same weight. Therefore, having three surfaces, two generated gridshells on each surface, and considering three cost functions to improve the regularity makes eighteen test problems on which the performances of GA and PSO algorithms are compared. To have a better reading, all the diagrams of these two methods on each surface are grouped and depicted in a figure. This way, Figures 3–5 provide the diagrams of GA and PSO techniques on Hemisphere, Sinusoidal, and Hyperbolic Paraboloid, respectively. Note that in these figures, TH, TS, THP, QH, QS, and QHP stand for triangular hemisphere, sinusoidal, hyperbolic parabolic, and quadrangular hemisphere, sinusoidal, and hyperbolic parabolic, respectively.

For convenience, a data box has been added into each diagram in which the following information is given. (1) The applied cost function and the considered gridshell, (2) the initial cost of each method which is the value of the cost function in the first iteration, (3) the final cost of each method which is the value of the cost function in the last iteration, and (4) the improvement percentage for each algorithm which is calculated by using Equation (6). Of note is that the cost values are rounded to three decimal places and the improvement percentages are rounded to one decimal place. Hence, this is why sometimes the diagrams are not matched at the end point, that is iteration 2000, while the given final costs are equal.

$$Improvement\,\,percentage = \frac{\text{Initial cost} - \text{Final cost}}{\text{Initial cost}}\tag{6}$$

In each of Figures 3–5, there are two rows of diagrams, three diagrams in each row. The first (second) row contains the diagrams associated with triangular (quadrangular) gridshells. The applied cost functions on the diagrams in each row are always in order of length ratio, shape ratio, and multi objective case which is length ratio + shape ratio. Next, several observations concluded from the GA and PSO diagrams are stated and discussed.

(1) In almost all the cases, it is seen that the initial cost for triangular gridshells of the same surfaces are higher than the cost for the corresponding quadrangular gridshells. This is due to the higher number of elements in the triangular gridshells. To have a better understanding, the number of vertices, denoted by Nv, and faces, denoted by Nf, in the gridshells are given in Table 3. It is noted that the number of vertices for both triangular and quadrangular cases are equal because Algorithm 1 uses the same procedure for generating the initial gridshells, and the number of faces in the triangular cases are double of the one in the corresponding quadrangular one because the algorithm generates the triangular gridshells by adding the diagonal of the faces in quadrangular gridshells.


**Table 3.** The number vertices and faces in all the generated gridshells.

(2) Although the number of vertices and faces are smaller for the hyperbolic parabolic surface (see Table 3), the costs of either the initial or the final grids for this surface are greater than the ones for the other surfaces. It seems that as the Gaussian curvature is negative in this surface, considering the equidistant points do not lead to a gridshell as regular as the surfaces with positive (or positive and negative) Gaussian curvature. However, this observation needs further investigation to be validated which will be studied in our future works.

(3) It is seen that the costs of either the initial or the final gridshells in almost all the cases for the sinusoidal surface are less than the costs for the corresponding cases with the other surfaces even when the number of vertices and faces in this surface are the most ones. It seems that to generate the most regular gridshells, the surfaces with positive and negative Gaussian curvature are better than the surfaces with merely positive Gaussian curvature or the surfaces with merely negative Gaussian curvature. This observation also needs further investigations which is of our interest for the future works.

(4) Although the initial gridshells are greatly regular because of consideration of equidistant points and the feasible solution domain is restricted, the regularity of gridshells in some cases has been improved more than 50% which is significant (see the second diagram in the second row in Figure 3).

(5) In all the cases, the (initial or final) costs increase from the length ratio to the shape ratio and from the shape ratio to the multi-objective case. It shows that arriving at similar angles in all the faces of gridshells is more difficult than designing the gridshells with similar lengths in all the faces, and also that improving in both directions simultaneously is even more difficult.

(6) It is seen that the improvement percentages of both algorithms are decreased from Hemisphere to Sinusoidal and then to Hyperbolic Paraboloid surfaces in almost all the cases. It may also have a relationship with the Gaussian curvature of the surfaces as it changes from positive in the first surface to positive and negative in the second one, and finally to negative in the third surface. Hence, it seems that the possibility of improving the regularity on the gridshells with positive Gaussian curvature is higher than the other cases. This observation also needs more investigation.

(7) The improvement percentages on all the three surfaces increase from the triangular gridshells to the quadrangular ones which shows a higher possibility of regularity improvement on the quadrangular gridshells.

(8) It is seen that the behavior of both algorithms are somehow similar on all the three gridshells. Hence, it seems that changing on the Gaussian curvature or changing from triangular to quadrangular gridshells do not affect the behavior of GA or PSO methods considerably. This observation also needs more investigation.

(9) Finally, it is seen that in almost all the test problems, PSO outperforms GA slightly. We note that the focus of this work is not to tune the best parameters for GA or PSO algorithms, and hence it is possible that one gets better results on GA by changing the values of its parameters or selecting some other strategies in the stages of this algorithm, and surely the same can be happened to PSO technique. What we see in the Figures 3–5 states that the performance of the PSO method with described parameters is slightly better than the performance of GA technique with detailed parameters here in almost all the cases.

Finally, to have a comparison of running times of GA and PSO, measured in CPU seconds, on the same Np = 18 test problems provided in this section, the running times of both methods on the test problems are considered to produce the performance profile of Dolan and Moré [28]. In this performance profile, for two algorithms, the ratio of the running times of the methods versus the minimum time of the two methods is considered.

Indeed, considering ti,1 and ti,2 as the running times of GA and PSO techniques, in CPU seconds, respectively, for *i* = 1, 2, ···, 18, the performance ratios in this performance profile are *ri*,*j*<sup>=</sup> *ti*,*<sup>j</sup> min*{*ti*,*<sup>j</sup>* :*j*=1.2} , for *<sup>j</sup>* = 1, 2 [28]. The performance of each technique is calculated as *Prj*(*T*) = <sup>1</sup> *Np size*/ *i* \$ \$*ri*.*<sup>j</sup>* ≤ *<sup>T</sup>* 0 , *j* = 1, 2, where size is the number of test problems. This way, *Prj*(*t*) is the probability for method *j* (*j* = 1, 2 corresponds to GA and PSO, respectively) that a performance ratio *ri*,*<sup>j</sup>* is within the factor T. Figure 6 is the resulting CPU time performance profiles for the two methods. In this figure, the horizontal axis T gives the outcome of dividing the running time of the PSO method into the one of the GA method. This axis states that in the best case, PSO technique solves some problems (almost 10% of the test problems) around 1.45 times faster than GA method. We note that the vertical axis, that is Per(T), at time T gives the percentage of problems solved by PSO, T times faster than the GA method. Using this profile, one algorithm is preferred to another when its performance diagram lies above the other [28]. Hence, Figure 6 shows clearly that PSO is preferred to GA based on the running times. However, the differences in running times are not so significant.

**Figure 3.** The particle swarm optimization (PSO) and genetic algorithm (GA) diagrams on Hemisphere gridshell considering different cost functions.

**Figure 4.** The PSO and GA diagrams on Sinusoidal gridshell considering different cost functions.

**Figure 5.** The PSO and GA diagrams on Hyperbolic Paraboloid gridshell considering different cost functions.

**Figure 6.** Dolan–Moré diagram related to comparing PSO and GAs in improving of regularity of gridshells.

#### **4. Conclusions**

Here, we presented two indexes as length ratio and shape ratio which were defined as the standard deviation of the lengths of all the elements and the standard deviation of the inner angles between all the elements in a gridshell, respectively. The practical efficiency of our introduced indexes was shown in comparison with some available indexes in the literature. We also showed how the genetic algorithm (GA) and particle swarm optimization (PSO) technique can be utilized for improving the gridshells' regularity based on the introduced ratios. To this end, an algorithm was presented to generate initial gridshells on a given surface. Three surfaces with different Gaussian curvatures were selected from the literature to provide the experimental results on the proposed approaches for regularity improvement of gridshells. On each surface, triangular and quadrangular gridshells were generated and the regularity of each gridshell was improved by using each ratio separately and also by using a combination of both ratios with the same weight as the cost function in both techniques. This way, PSO and GA methods were compared on eighteen test problems.

Through the experimental results, we saw that (1) the initial cost for triangular gridshells on the same surfaces are usually higher than the cost for the corresponding quadrangular gridshells, (2) even the regularity of the very regular initially generated gridshells by using the equidistant points can be improved up to 56% in some cases, (3) the initial and final costs increase from the length ratio to the shape ratio and from the shape ratio to the multi-objective case in which both length and shape ratios are combined with the same weight, (4) the percentage improvement on all the three surfaces increase from the triangular gridshells to the quadrangular ones showing a higher possibility of regularity improvement on the quadrangular gridshells, and that (5) PSO method slightly outperforms GA technique on almost all the test problems.

Moreover, some interesting relationships between the regularity improvement and Gaussian curvature of the selected surfaces were observed including (1) considering the equidistant points on the surfaces with negative Gaussian do not lead to a gridshell as regular as the surfaces with positive (or positive and negative) Gaussian curvature; (2) to generate the most regular gridshells, the surfaces with positive and negative Gaussian curvature are better than the surfaces with merely positive Gaussian curvature or the surfaces with merely negative Gaussian curvature; (3) the possibility of improving the regularity on the gridshells with positive Gaussian curvature is higher than the other cases; and (4) the behavior of GA and PSO techniques do not change considerably from triangular to quadrangular gridshells or from the positive Gaussian curvature to the negative one. However, these observations need more investigation which will be made in our future works. Another idea for a future work is to consider our introduced regularity indexes and some structural aspects of gridshells such as strain energy simultaneously for proposing

some multi-objective optimization method to design gridshells. It would also be interesting to see how the regularity indexes and other structural aspects affect each other. Finally, to have an intuitive comparison between GA and PSO based on running times, the Dolan and Moré performance profile was produced taking into account the running times. This profile showed that PSO is also preferred to GA in accordance with running times.

**Author Contributions:** Conceptualization, M.G. and M.F.-e.; Data curation, M.G. and M.F.-e.; Formal analysis, M.F.-e.; Funding acquisition, M.G.; Supervision, A.M.; Writing—original draft, M.F.-e.; Writing—review and editing, M.F.-e. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Acknowledgments:** The authors are grateful to the three anonymous referees for their constructive comments and recommendations, which have significantly improved the presentation of this paper. Also, the first two authors thank Algocg group for supporting this work.

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

#### **Appendix A**

In Algorithm 1, the MATLAB function of surf2patch () is used for transforming the Cartesian coordinates (x, y, z) to two matrices V and F. However, as there is a possibility of generating duplicate vertices in V, the command unique () is used. This command in addition to remove the duplicate rows in V gives the positions of the removed rows which can be used to update the matrix F (please see Step 3 in Algorithm 1). We note that having the matrices V and F obtained by Algorithm 1, the desired gridshell can be drawn by using the command patch () in MATLAB as follows.

$$\text{Pathch} = \text{patch} \ (\text{'faces'}, \text{'F'} \text{'vertices'}, \text{'V}) \tag{A1}$$

#### **References**


### *Article* **Mathematical Calculation of Stray Losses in Transformer Tanks with a Stainless Steel Insert**

**Serguei Maximov 1, Manuel A. Corona-Sánchez 1, Juan C. Olivares-Galvan 2,\*, Enrique Melgoza-Vazquez 1, Rafael Escarela-Perez <sup>2</sup> and Victor M. Jimenez-Mondragon <sup>2</sup>**


**Abstract:** At present it is claimed that all electrical energy systems operate with high values of efficiency and reliability. In electric power systems (EPS), electrical power and distribution transformers are responsible for transferring the electrical energy from power stations up to the load centers. Consequently, it is mandatory to design transformers that possess the highest efficiency and reliability possible. Considerable power losses and hotspots may exist in the bushing region of a transformer, where conductors pass through the tank. Most transformer tanks are made of low-carbon steel, for economical reasons, causing the induction of high eddy currents in the bushing regions. Using a non-magnetic insert in the transformer tank can reduce the eddy currents in the region and as a consequence avoid overheating. In this work, analytical formulations were developed to calculate the magnetic field distribution and the stray losses in the transformer region where bushings are mounted, considering a stainless steel insert (SSI) in the transformer tank. Previously, this problem had only been tackled with numerical models. Several cases were analyzed considering different non-magnetic insert sizes. Additionally, a numerical study using a two dimensional (2D) finite element (FE) axisymmetric model was carried out in order to validate the analytical results. The solved cases show a great concordance between models, obtaining relative errors between the solutions of less than two percent.

**Keywords:** power transformer; stray losses; analytical methods; finite element method

#### **1. Introduction**

Nowadays, electric power systems (EPS) are constantly changing. The use of new technologies such as smart-grids, micro-grids and renewable energy systems demand high flexibility, performance and efficiency in the EPS. The transformer is a fundamental component in these systems, which is present in different stages of the EPS, such as at the generation, transmission and distribution stages [1,2]. Losses in transformers appear in their different components, such as: windings, insulation, core and tank. These losses depend on the operating conditions of the transformer (nominal values, DC bias, presence of harmonics, etc.) and the electrical and magnetic properties of the materials. The study of transformer losses is an active area of investigation because there is a compromise between design and cost. Power losses in transformers can be separated into two types: no-load and load losses; the no-load losses originate in the transformer core and the load losses are composed by the ohmic losses in the windings and the stray losses. As the rated power increases in transformers, the stray losses increase significantly. The stray losses in structural components, such as the tank, decrement the efficiency of the transformer considerably [3]. Losses in structural components in power transformers are due to stray fluxes; when a time varying flux impinges on a conductive element it induces a current in

**Citation:** Maximov, S; Corona-Sánchez, M.A.; Olivares-Galvan, J.C.; Melgoza-Vazquez, E.; Escarela-Perez, R.; Jimenez-Mondragon, V.M. Mathematical Calculation of Stray Losses in Transformer Tanks with a Stainless Steel Insert. *Mathematics* **2021**, *9*, 184. https://doi.org/ 10.3390/math9020184

Received: 28 November 2020 Accepted: 13 January 2021 Published: 18 January 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

it, generating Joule losses. Besides power losses, hotspots in structural components caused by this phenomenon may appear. For these reasons, there are diverse techniques to reduce losses without unduly increasing the final cost. A crucial structural part of a transformer is the tank region where the bushings are mounted. The field concentration and overheating in this zone can cause damage to the device [4].

Analytical and numerical models can be employed for the design of the transformer taking into account the well-known advantages of each one: analytic models provide accuracy, less calculation time and simplicity once the model has been developed, whereas numeric models allow one to solve complex geometries and deal with nonlinear materials. Several research works, analyzing the magnetic field distribution and the eddy current power losses in the bushing transformer region, using either numerical or analytical models, have been carried out previously [1,4–15].

An analytical model is proposed in [4,5] to determine the power losses based on Poynting's theorem. To obtain the solution some semi-empirical coefficients are required. Analytical expressions were developed in [1] to calculate the magnetic field and the stray losses in the transformer tank near the bushing. The configuration is modeled with a finite disk and a conductor in the center. It is considered that the axial component of the induced current density has only a small contribution to the power losses, and therefore it is disregarded. This automatically implies that the solution obtained will be an approximation. A study to reduce stray losses in a pad mounted transformer wall using an insert plate is presented in [6,7]. These studies were carried out using two dimensional (2D) and three dimensional (3D) finite element (FE) analysis. The results were validated with experimental tests in different combinations. Additionally, numerical results were compared with empirical formulas. In these works, it was verified that the use of non-magnetic inserts in the transformer tank reduce eddy current losses. A transient analysis was carried out in [8] to compute the power losses in the low-carbon steel tank of a current transformer, taking into account different insert configurations and materials. The analyses were done using a 3D FE model. It was also concluded that using non-magnetic inserts reduce power losses in the tank. In [9,11] the temperature distribution on transformer covers is considered. The stray losses in the tank were analytically calculated using Turowski's formula [4]. Maximov et al. [10] presented a study of eddy current losses in the tank of a transformer. Numerical results and analytical formulas were obtained for the losses as a function of the current. However, in the solution to this problem only two materials were considered: the tank and the air. In [12,13], the determination of eddy current losses and temperature distribution in the zone of the transformers bushing are presented. The study was carried out with the finite difference method. An analytical solution for the bushing regions, using the same model geometry of [10], is proposed in [14]. However in this research the presence of harmonics in the current is considered. Oliveira et al. [15] developed a time domain model to determine the eddy currents in the transformer tank walls considering different types of excitations. The results obtained with the proposed model were validated with a 3D FE solution. The tank wall was considered to be made of a single magnetic material.

As can be appreciated from the literature reviewed above, in previous research where a stainless steel insert (SSI) is added to reduce the power losses in the tank, a numerical model is employed in the analysis, whereas analytical models are developed only for the cases where the tank in the bushing region is made from a single material. In this paper a mathematical model is proposed to determine the magnetic field distribution in the tank wall bushing regions, considering a tank wall composed of two different materials, a stainless steel section representing the insert and a low-carbon steel section modeling the rest of the tank. An analytical calculation is also developed to determine the stray losses in the bushing region.

#### **2. Model**

The bushing transformer region is considered through an idealized model. Consider an infinite conductor that passes the transformer tank wall at a right angle across a circular hole. The tank is considered to have an annular shape with thickness *h* and inner and outer radii *c* and *b*, respectively. A SSI is also considered in the tank, with a radial length *c* − *a*. Figure 1 shows the geometry of the model. The analysis domain is divided into four regions: Ω<sup>1</sup> is the region existing between the conductor and the tank wall, namely, the circular hole; Ω<sup>1</sup> is defined by *r*<sup>0</sup> ≤ *r* ≤ *a*, −*h*/2 ≤ *z* ≤ *h*/2, where *r*<sup>0</sup> is the radius of the conductor. Region Ω<sup>2</sup> represents the carbon steel tank wall, that is, *c* ≤ *r* ≤ *b*, −*h*/2 ≤ *z* ≤ *h*/2. Region Ω<sup>3</sup> is the SSI, *a* ≤ *r* ≤ *c*, −*h*/2 ≤ *z* ≤ *h*/2. Finally, region Ω<sup>4</sup> is the medium at both sides of the tank wall, considered as air, *r* ≥ *r*<sup>0</sup> , |*z*| > *h*/2.

**Figure 1.** Geometry and parameters of the model.

A conductor passing through the hole transports alternating electric current of the form:

$$I(t) = I e^{i\omega t},$$

where *I* is the current amplitude. Maxwell's equations in the frequency domain, in each region Ω*k*, have the following form:

$$
\begin{array}{ll}
\nabla \times \mathbf{E}\_k = -j\omega\mu\_0\mu\_k \mathbf{H}\_{k\prime} & \nabla \cdot \mathbf{H}\_k = 0, \\
\nabla \times \mathbf{H}\_k = \sigma\_k \mathbf{E}\_{k\prime} & \nabla \cdot \mathbf{E}\_k = 0,
\end{array} \tag{1}
$$

where *k* = 1 corresponds to air and the hole (region Ω1), *k* = 2 corresponds to the carbon steel (region Ω2) and *k* = 3 is associated with the stainless insert (region Ω3). Additionally, *σ*<sup>1</sup> = 0 and *μ*<sup>1</sup> = *μ*<sup>3</sup> = 1. Because of the axial symmetry of the system and the symmetry with respect to the plane *z* = 0, the solution to the system of Equations (1) can be sought as follows:

$$\mathbf{H}\_k = H\_{k\varrho}(r, z)\mathbf{e}\_{\varrho\prime} \qquad \mathbf{E}\_k = E\_{kr}(r, z)\mathbf{e}\_r + E\_{k\varrho}(r, z)\mathbf{e}\_{\varrho\prime} \tag{2}$$

where *Hkϕ*(*r*, *z*) is an even function with respect to the variable *z*; i.e.,

$$H\_{k\,\varphi}(r, -z) = H\_{k\,\varphi}(r, z). \tag{3}$$

Due to Ampère's circuital law and axial symmetry, the magnetic field in air and the hole is:

$$H\_{1\,\varphi}(r) = \frac{I}{2\pi r}.\tag{4}$$

Boundary conditions between regions Ω<sup>1</sup> and Ω2,3 after taking into account Equation (4) assume the following form (see [10,14]):

$$\begin{aligned} \left.H\_{3\varphi}\right|\_{r=a} &= \frac{I}{2\pi a'} & H\_{2\varphi}\Big|\_{r=b} &= \frac{I}{2\pi b'}\\ \frac{1}{r}\frac{\partial \left(rH\_{3\varphi}\right)}{\partial r}\Big|\_{z=h/2} &= 0, & \frac{1}{r}\frac{\partial \left(rH\_{2\varphi}\right)}{\partial r}\Big|\_{z=h/2} &= 0, & \text{(5)}\\ H\_{3\varphi}\Big|\_{z=h/2} &= \frac{I}{2\pi r}, & H\_{2\varphi}\Big|\_{z=h/2} &= \frac{I}{2\pi r}. \end{aligned} \tag{5}$$

Additionally, on the boundary that separates regions Ω<sup>2</sup> and Ω<sup>3</sup> we have:

$$\left.H\_{3\,\varphi}\right|\_{r=c} = \left.H\_{2\,\varphi}\right|\_{r=c'} \tag{6}$$

$$\frac{1}{\sigma\_3} \frac{1}{r} \frac{\partial \left( r H\_{3\varphi} \right)}{\partial r} \bigg|\_{r=\varphi} = \frac{1}{\sigma\_2} \frac{1}{r} \frac{\partial \left( r H\_{2\varphi} \right)}{\partial r} \bigg|\_{r=\varphi} \tag{7}$$

#### **3. Analytical Solution**

Maxwell's equations in regions Ω<sup>2</sup> and Ω<sup>3</sup> reduce to:

$$\frac{1}{r}\frac{\partial}{\partial r}\left(r\frac{\partial H\_{k\varphi}}{\partial r}\right) + \frac{\partial^2 H\_{k\varphi}}{\partial z^2} - \frac{H\_{k\varphi}}{r^2} - j\omega \sigma\_k \mu\_0 \mu\_k H\_{k\varphi} = 0. \tag{8}$$

Equation (8) has been previously solved [10,14]. The solution of this equation has the following form [14]:

$$\begin{aligned} H\_{k\varphi}(r,z) &= \left(\frac{A\_k}{r} + B\_k r\right) \cosh(\beta\_k z) \\ &+ \sum\_{n=0}^{\infty} \left\{ C\_{k,n} I\_1(\lambda\_{k,n} r) + D\_{k,n} K\_1(\lambda\_{k,n} r) \right\} \cos(\varkappa\_n z), \end{aligned} \tag{9}$$

where *I*1(*λk*,*nr*) and *K*1(*λk*,*nr*) are the modified Bessel functions of the first order,

$$\begin{aligned} \beta\_k^2 &= j\omega \sigma\_k \mu\_0 \mu\_{k\prime} & \varkappa\_{\mathbb{N}} &= \frac{(2n+1)\pi}{h} \\ \lambda\_{k,n}^2 &= \varkappa\_n^2 + \beta\_k^2 & k &= 2,3, & n \in \mathbb{Z}^+. \end{aligned}$$

Constants *Ak*, *Bk*, *Ck*,*<sup>n</sup>* and *Dk*,*<sup>n</sup>* are to be obtained from boundary conditions (5)–(7). Substitution of solution (9) into the last boundary conditions of (5) yields:

$$B\_k = 0, \qquad A\_k = \frac{I}{2\pi \cosh(\beta\_k h/2)}.$$

As a result,

$$\begin{split} H\_{k\varphi}(r,z) &= \frac{I}{2\pi r} \frac{\cosh(\beta\_k z)}{\cosh(\beta\_k h/2)} \\ &+ \sum\_{n=0}^{\infty} \left\{ \mathbb{C}\_{k,n} I\_1(\lambda\_{k,n} r) + D\_{k,n} K\_1(\lambda\_{k,n} r) \right\} \cos(\varkappa\_n z), \end{split} \tag{10}$$

The convergence of the generalized Fourier-series (10) is provided by the general theory of linear partial differential equations, with Hermitian differential operators and

boundary conditions (5)–(7). However, the convergence can be also proved explicitly, which has been done, for instance, in the Appendix section of [10].

At the same time, since function cosh(*βkz*)/ cosh(*βkh*/2) can be expanded in a Fourier series as follows [10]:

$$\frac{\cosh(\beta\_k z)}{\cosh(\beta\_k h/2)} = \sum\_{n=0}^{\infty} \frac{4(-1)^n \varkappa\_n}{\lambda\_{k,n}^2 h} \cos(\varkappa\_n z),$$

then, Equation (10) takes the form:

$$\begin{split} H\_{k\varphi}(r,z) &= \sum\_{n=0}^{\infty} \left\{ \mathbb{C}\_{k,n} I\_1(\lambda\_{k,n}r) + D\_{k,n} K\_1(\lambda\_{k,n}r) \\ &+ \frac{2I}{\pi r} \frac{(-1)^n \varkappa\_{\text{fl}}}{\lambda\_{k,n}^2 h} \right\} \cos(\varkappa\_n z), \end{split} \tag{11}$$

Let us substitute general solution (11) for *H*3*ϕ*(*r*, *z*) into boundary condition *H*3*<sup>ϕ</sup>* \$ \$ \$ *r*=*a* = *I*/2*πa*. We obtain within the interval −*h*/2 ≤ *z* ≤ *h*/2:

$$\sum\_{n=0}^{\infty} \left\{ C\_{3,n} I\_1(\lambda\_{3,n} a) + D\_{3,n} K\_1(\lambda\_{3,n} a) + \frac{2I}{\pi a} \frac{(-1)^n \varkappa\_n}{\lambda\_{3,n}^2 h} \right\} \cos(\varkappa\_n z) = \frac{I}{2\pi a}. \tag{12}$$

On the other hand, within the same interval, we can write (see [10]):

$$\sum\_{n=0}^{\infty} \frac{4(-1)^n}{\varkappa\_n h} \cos(\varkappa\_n z) = 1.$$

After substituting this result into (12) we come to the following equation:

$$\begin{split} \sum\_{n=0}^{\infty} \left\{ \mathbf{C}\_{3,n} I\_1(\lambda\_{3,n} a) + D\_{3,n} K\_1(\lambda\_{3,n} a) \\ + \frac{2I}{\pi a} \frac{(-1)^n \varkappa\_{\mathfrak{n}}}{\lambda\_{3,n}^2 l} \right\} \cos(\varkappa\_{\mathfrak{n}} z) = \sum\_{n=0}^{\infty} \frac{2I}{\pi a} \frac{(-1)^n}{\varkappa\_{\mathfrak{n}} l l} \cos(\varkappa\_{\mathfrak{n}} z), \end{split} \tag{13}$$

which, in turn, leads to the following:

$$C\_{3,n}I\_1(\lambda\_{3,n}a) + D\_{3,n}K\_1(\lambda\_{3,n}a) + \frac{2I}{\pi a} \frac{(-1)^n \varkappa\_n}{\lambda\_{3,n}^2 h} = \frac{2I}{\pi a} \frac{(-1)^n}{\varkappa\_n h}.$$

This equation, after some simple algebraic operations, becomes:

$$C\_{3,n}I\_1(\lambda\_{3,n}a) + D\_{3,n}K\_1(\lambda\_{3,n}a) = \frac{2I}{\pi a} \frac{(-1)^n \beta\_3^2}{\lambda\_{3,n}^2 \varkappa\_n h}.\tag{14}$$

A similar result can be obtained from boundary condition *H*2*<sup>ϕ</sup>* \$ \$ \$ *<sup>r</sup>*=*<sup>b</sup>* <sup>=</sup> *<sup>I</sup>*/2*πb*:

$$C\_{2,n}I\_1(\lambda\_{2,n}b) + D\_{2,n}K\_1(\lambda\_{2,n}b) = \frac{2I}{\pi b} \frac{(-1)^n \beta\_2^2}{\lambda\_{2,n}^2 \varkappa\_n b}.\tag{15}$$

Boundary conditions (6) and (7) result in the following equations:

$$\begin{aligned} \mathcal{C}\_{2,n}I\_1(\lambda\_{2,n}c) + D\_{2,n}K\_1(\lambda\_{2,n}c) + \frac{2I}{\pi c} \frac{(-1)^n \varkappa\_n}{\lambda\_{2,n}^2 h} \\ &= \mathcal{C}\_{3,n}I\_1(\lambda\_{3,n}c) + D\_{3,n}K\_1(\lambda\_{3,n}c) + \frac{2I}{\pi c} \frac{(-1)^n \varkappa\_n}{\lambda\_{3,n}^2 h} \\ \frac{\lambda\_{2,n}}{\sigma\_2} \left\{ \mathcal{C}\_{2,n}I\_0(\lambda\_{2,n}c) - D\_{2,n}K\_0(\lambda\_{2,n}c) \right\} \\ &= \frac{\lambda\_{3,n}}{\sigma\_3} \left\{ \mathcal{C}\_{3,n}I\_0(\lambda\_{3,n}c) - D\_{3,n}K\_0(\lambda\_{3,n}c) \right\} \end{aligned} \tag{16}$$

The system of linear Equations (14)–(17), with respect to the constants *Ck*,*<sup>n</sup>* and *Dk*,*n*, *k* = 1, *n*, is easy to solve. However, there is no necessity to solve this system of equations exactly, since the magnetic field rapidly decays for an increasing outer radius *b*. This principle can be formally taken into account in the system of Equations (14)–(17) by considering radius *b* to be sufficiently high (formally, *b* → ∞). The validity of this assumption for the calculation of transformer tanks losses has been shown previously in [10,14]. By applying the limit to Equation (15) when *b* → ∞ and taking into account the asymptotic behavior of the modified Bessel functions *I*1(*x*) and *K*1(*x*), namely,

$$\begin{aligned} I\_1(\mathbf{x}) &\propto \frac{\varepsilon^{\mathbf{x}}}{\sqrt{2\pi\mathbf{x}}} \Big( 1 + \mathcal{O}\left(\mathbf{x}^{-1}\right) \Big), \\\ K\_1(\mathbf{x}) &\propto \sqrt{\frac{\pi}{2\mathbf{x}}} e^{-\mathbf{x}} \Big( 1 + \mathcal{O}\left(\mathbf{x}^{-1}\right) \Big), \end{aligned}$$

it follows that *C*2,*<sup>n</sup>* = 0. Through substitution of the result into Equations (14)–(17) and solving this system of equations with respect to *C*3,*n*, *D*3,*<sup>n</sup>* and *D*2,*n*, we obtain:

$$\begin{split} \mathcal{C}\_{3,\mathfrak{u}} = \frac{2I}{\pi\Delta} \frac{(-1)^{n}}{\lambda\_{3,\mathfrak{u}}^{2} \mathfrak{h}} \Bigg\{ \frac{\beta\_{3}^{2}}{\varkappa\_{3}\mathfrak{u}} \Bigg[ \frac{\lambda\_{2,\mathfrak{u}}}{\sigma\_{2}} K\_{0}(\lambda\_{2,\mathfrak{u}}c) K\_{1}(\lambda\_{3,\mathfrak{u}}c) - \frac{\lambda\_{3,\mathfrak{u}}}{\sigma\_{3}} K\_{1}(\lambda\_{2,\mathfrak{u}}c) K\_{0}(\lambda\_{3,\mathfrak{u}}c) \Bigg] \\ & - \frac{\varkappa\_{n}(\beta\_{3}^{2} - \beta\_{2}^{2})}{\lambda\_{2,\mathfrak{u}}\sigma\_{2}c} K\_{0}(\lambda\_{2,\mathfrak{u}}c) K\_{1}(\lambda\_{3,\mathfrak{u}}a) \Bigg\}, \end{split} \tag{18}$$

$$D\_{3, \mathbb{I}} = -\frac{2I}{\pi \Delta} \frac{(-1)^{\mathbb{I}}}{\lambda\_{3, \mathbb{I}}^2 h} \left\{ \frac{\beta\_3^2}{\varkappa\_{\mathbb{II}} a} \left[ \frac{\lambda\_{2, \mathbb{I}}}{\sigma\_2} K\_0(\lambda\_{2, \mathbb{I}} c) I\_1(\lambda\_{3, \mathbb{I}} c) + \frac{\lambda\_{3, \mathbb{II}}}{\sigma\_3} K\_1(\lambda\_{2, \mathbb{I}} c) I\_0(\lambda\_{3, \mathbb{I}} c) \right] \right.$$

$$-\frac{\varkappa\_{\mathbb{II}} (\beta\_3^2 - \beta\_2^2)}{\lambda\_{2, \mathbb{I}} \sigma\_2 c} K\_0(\lambda\_{2, \mathbb{I}} c) I\_1(\lambda\_{3, \mathbb{I}} a) \right\} \quad \text{(19)}$$

and

$$D\_{2,n} = \frac{2I}{\pi \Delta c} \frac{(-1)^n}{\lambda\_{3,n} \sigma\_3 \hbar} \left\{ \varkappa\_n \frac{\beta\_3^2 - \beta\_2^2}{\lambda\_{2,n}^2} \left[ K\_1(\lambda\_{3,n} a) I\_0(\lambda\_{3,n} c) + I\_1(\lambda\_{3,n} a) K\_0(\lambda\_{3,n} c) \right] - \frac{\beta\_3^2}{\varkappa\_{\rm eff} \lambda\_{3,n} a} \right\}, \tag{20}$$

where

$$
\Delta = \left[ \frac{\lambda\_{2,n}}{\sigma\_2} K\_0(\lambda\_{2,n} c) K\_1(\lambda\_{3,n} c) - \frac{\lambda\_{3,n}}{\sigma\_3} K\_1(\lambda\_{2,n} c) K\_0(\lambda\_{3,n} c) \right] I\_1(\lambda\_{3,n} a)
$$

$$
$$

Then, constant *C*2,*<sup>n</sup>* can be approximately calculated from Equation (15) as follows:

$$\mathbb{C}\_{2,n} = \frac{1}{I\_1(\lambda\_{2,n}b)} \left\{ \frac{2I}{\pi b} \frac{(-1)^n \beta\_2^2}{\lambda\_{2,n}^2 \varkappa\_n h} - D\_{2,n} K\_1(\lambda\_{2,n}b) \right\}. \tag{22}$$

Solution (10) is an infinite sum that can be truncated at a term with number *N* − 1 and by introducing the Lanczos sigma factor (see [16,17]):

$$\varsigma\_n = \frac{\sin(\pi n/N)}{\pi n/N} \tag{23}$$

to suppress Gibbs' oscillations. Then, solution (11) takes the following form:

$$\begin{split} H\_{k\rho}(r,z) &= \frac{1}{2\pi r} \frac{\cosh(\beta\_k z)}{\cosh(\beta\_k h/2)} \\ &+ \sum\_{n=0}^{N-1} \xi\_n \left\{ \mathbb{C}\_{k,n} I\_1(\lambda\_{k,n} r) + D\_{k,n} K\_1(\lambda\_{k,n} r) \right\} \cos(\varkappa\_n z), \end{split} \tag{24}$$

#### **4. Electric Field and Eddy Current Losses**

Eddy current losses in the transformer tank wall have an ohmic nature. The averaged power loss density over a period is as follows [10,14]:

$$P(r,z) = \frac{1}{T} \int\_0^T \sigma(r,z) |\mathbf{E}(r,z,t)|^2 dt = \frac{|\mathbf{j}(r,z)|^2}{2\sigma(r,z)},\tag{25}$$

where *T* = 2*π*/*ω* is the period. The tank wall conductivity *σ*(*r*, *z*) is a function of the coordinates due to the insert in the tank wall, and **j**(*r*, *z*) is the current density in the frequency domain. Then, the total losses in the tank wall are [10]:

$$P\_{\rm bot} = \int\_0^{2\pi} d\varphi \int\_a r dr \int\_{-h/2}^{h/2} dz \,\mathcal{P}(r, z) = \pi \int\_a^b r dr \int\_{-h/2}^{h/2} dz \,\frac{|\mathbf{j}(r, z)|^2}{\sigma(r, z)}$$

$$= \frac{\pi}{\sigma\_3} \int\_a^c r dr \int\_{-h/2}^{h/2} dz \left( |j\_{3, r}(r, z)|^2 + |j\_{3, z}(r, z)|^2 \right)$$

$$+ \frac{\pi}{\sigma\_2} \int\_c r dr \int\_{-h/2}^{h/2} dz \left( |j\_{2, r}(r, z)|^2 + |j\_{2, z}(r, z)|^2 \right). \tag{26}$$

The current density can be obtained from Maxwell's Equations (1) as follows:

$$\mathbf{j}\_k = \nabla \times \mathbf{H}\_k = j\_{k,r}(r,z)\mathbf{e}\_r + j\_{k,z}(r,z)\mathbf{e}\_{z\prime} \tag{27}$$

where

$$\begin{split} j\_{k,r}(r,z) &= -\frac{l\beta\_k}{2\pi r} \frac{\sinh(\beta\_k z)}{\cosh(\beta\_k h/2)} \\ &+ \sum\_{n=0}^{N-1} \zeta\_n \varkappa\_n \left\{ C\_{k,n} I\_1(\lambda\_{k,n} r) + D\_{k,n} K\_1(\lambda\_{k,n} r) \right\} \sin(\varkappa\_n z) \end{split} \tag{28}$$

and

$$j\_{k, \mathbf{z}}(r, z) = \sum\_{n=0}^{N-1} \varsigma\_{n} \lambda\_{k, n} \left\{ C\_{k, n} I\_0(\lambda\_{k, n} r) - D\_{k, n} K\_0(\lambda\_{k, n} r) \right\} \cos(\varkappa\_n z) \tag{29}$$

#### **5. Study Cases and Discussion**

Several study cases are carried out in this section with different SSI sizes in the tank wall. In order to compare the results obtained with our analytical formulas, the solution in each case is also computed with a 2D FE model [18]. The low-carbon steel has the following properties: a relative permeability *<sup>μ</sup><sup>r</sup>* = 100, a conductivity *<sup>σ</sup>* = 7.0 × 106 S/m and a relative permittivity *<sup>r</sup>* = 1. The SSI has a relative permeability *μ<sup>r</sup>* = 1.0, a conductivity *<sup>σ</sup>* = 1.1 × <sup>10</sup><sup>6</sup> S/m and a relative permittivity *<sup>r</sup>* = 1. The model dimensions in all the cases are *a* = 8.5 cm, *b* = 34 cm and *h* = 12.7 mm. The current *I* carried by the conductor is 5000 A at frequency *f* = 60 Hz. Various radial distances of the insert (*c* − *a*) are considered, which are obtained by varying the percentage of the tank wall volume that corresponds to the SSI. This means that if the insert volume is 0 %, the tank wall is made only of low-carbon steel and therefore *c* = *a*. On other hand, if the insert volume is 100%, the tank wall would be made exclusively of the stainless steel and its radial distance would be given by *c* − *a* = *b* − *a* = 255 mm.

The numerical solution is obtained with a time-harmonic 2D eddy current axisymmetric FE model. A special 2D formulation is applied considering that field configuration is such that the magnetic field has only one component normal to the plane and the current density has its components in the plane, which matches with our problem. This formulation is incorporated into our FE code FLD and has been compared with analytical and 3D FE solutions, obtaining great accuracy in all cases [18]. FLD is a set of computer programs and routines, developed by the authors, for the analysis of electromagnetic problems using the FE method, which is programmed in Fortran 95 [19]. Using a 2D FE model permits a large number of simulations in a much shorter time and without the computational cost of a 3D model. Moreover, the geometry of the proposed model is represented faithfully by a 2D axisymmetric model.

The analysis domain considered in the FE axisymmetric model is composed by regions Ω<sup>3</sup> and Ω4. A Dirichlet boundary condition, obtained by applying Ampère's circuital law (4), is assigned to nodes located at the periphery of the model. Figure 2 shows the FE meshes used to solve two different cases. Figure 2a is the mesh used for the case where the tank wall of the transformer lacks an SSI. Figure 2b shows a case where an insert exists, modeled by the left blue region. The mesh used for each case results from an automatic mesh adaptation procedure; regions with a rapid variation of the field, after the iterative procedure, will contain a higher density of elements. In all cases second order elements were employed. Details of the implementation of the automatic mesh adaptation are reported in [18]. In both cases, most of the elements are in the periphery of the region Ω2, consisting of low-carbon steel, due to the skin effect in this material.

(**b**)

**Figure 2.** Mesh of the 2D FE axisymmetric model. (**a**) Tank wall without insert, case *c* = *a*. (**b**) Tank wall considering an insert, case *c* − *a* = 85.0 mm.

> In Figure 3 the magnetic field distribution of *Hϕ*(*r*, *z*), obtained with (4) and (24), is presented for different radii of the SSI. Observe how the magnetic field penetrates the tank wall according with the SSI size. Since the low-carbon steel possesses greater permeability and conductivity than the stainless steel, it has a smaller depth of penetration (*δ*). Hence, the magnetic field decays rapidly in region Ω2, whereas the magnetic field penetrates easily to region Ω3.

**Figure 3.** Magnetic field distribution inside the tank wall. (**a**) Case *c* = *a*. (**b**) Case *c* − *a* = 11.914 mm. (**c**) Case *c* − *a* = 85 mm. (**d**) Case *c* − *a* = 183.89 mm. (**e**) Case *c* − *a* = 238.67 mm.

Figure 4 shows two cases of the magnetic field penetration in the tank wall and the eddy current density obtained with 2D FE simulation. Figure 4a is the case where there is no insert. In this solution the skin effect phenomena in the tank wall can also be seen, producing the greater magnitude of *H<sup>ϕ</sup>* in the inner radius, the nearest region to the conductor. Figure 4b presents the case in which the radial distance of the stainless insert is *c* − *a* = 85 mm. In this case, the closed path of the eddy currents in the tank can be seen. The magnitude of the eddy current density is greater in the low-carbon steel.

**Figure 4.** Magnitude of *H<sup>ϕ</sup>* (color) and eddy current density (arrows) in the tank wall. (**a**) Case *c* = *a*. (**b**) Case *c* − *a* = 85.0 mm.

Figure 5 shows the magnetic field *H<sup>ϕ</sup>* evaluated at the center of the tank wall (*z* = 0) for different insert radii. For all cases, the analytical solution, developed in this work and the numerical one obtained with the 2D FE model are compared. It can be seen that for all the cases, the values of *Hϕ* calculated analytically match very closely the values obtained numerically, demonstrating the validity of the analytical formula (24). In these graphs, the behavior of the magnetic field inside the tank wall can be noticed more clearly: when *Hϕ* penetrates in the low-carbon steel, it decreases rapidly, having a greater variation at the edges of the tank. The magnetic field outside of the tank wall decreases according to the distance to the conductor, as established in (4). Table 1 shows the relative error between the analytical solution and numerical solutions calculated for these cases. The maximum relative error obtained is 1.71%, which demonstrates the validity of the solutions.

**Table 1.** Relative error between solutions.


The relative error is calculated with

$$\text{relative error} = \frac{\max\_{i=1,n} |f\_i - g\_i|}{\max\_{i=1,n} |g\_i|} \text{ 100\%}$$

where *fi* and *gi* are the numerical and analytical solutions respectively, evaluated at point *i*, while *n* is the total number of points considered.

The eddy current losses *Pe* in the bushing region were calculated for several cases using the analytic expressions (26), (28) and (29), and were compared with the losses estimated using 2D FE simulations. Table 2 presents the eddy current power losses obtained for thirteen different configurations of the tank wall, varying the volume occupied by the stainless insert. In each case, the corresponding radial distance of the insert is shown. It can be observed that the losses calculated in all cases differ by less than 3%, which confirms the correctness of the analytical expressions presented previously. Figure 6 presents also the power losses in the tank wall, calculated with the two approaches, in a graphical way. This graph shows the reduction of the total power losses in the tank wall according to the increment of the radial distance *c* − *a*, as expected. Although these results could point to the use of transformer tanks made exclusively with stainless steel, at least in the bushing region, this material is more expensive than the low-carbon steel, meaning a greater investment to manufacture the transformer.

**Figure 5.** Magnetic field *H<sup>ϕ</sup>* evaluated at *z* = 0 and *z* = *h*/2. (**a**) Case *c* = *a*. (**b**) Case *c* − *a* = 11.914 mm. (**c**) Case *c* − *a* = 85 mm. (**d**) Case *c* − *a* = 183.89 mm. (**e**) Case *c* − *a* = 238.67 mm.


**Table 2.** Eddy current losses in the tank wall.

**Figure 6.** Power losses for different SSI dimensions.

#### **6. Limits and Applicability of the Analytical Solution**

Solution (24) was obtained under the assumption of axial symmetry. The edge effect on the external border was neglected by formally taking the limit: *b* → ∞. This approach (axial symmetry) is expected to be applicable to other cases such as when the conductor crosses the covering plate not at the plate centre, but closer to the border of the transformer cover. This is due to the skin effect, making the magnetic field decay exponentially from the hole border (see Figure 7). However, in a layer near the external border, the magnetic field increases exponentially up to values of the magnetic field outside the plate (Figure 7). Therefore, if the conductor is situated too close to the border, the edge effect may become considerable.

Nevertheless, there is a case where this effect could become considerable. Just near the external border, the magnetic field increases exponentially up to values of the magnetic field outside the plate (see Figure 7). If the conductor is far away from the external border, the magnetic field quantity near the plate border is small enough so that the external border effect can be neglected. In the case of the conductor crossing the plate nearby the plate border, the edge effect becomes considerable. However, this effect is presented only in a small region shown in Figure 8, so that its contribution to the complete value of eddy current losses is small. Therefore, the only restriction of our analytical solution is *δ*<sup>1</sup> *d*, which is normally accomplished in actual transformers.

**Figure 7.** Magnetic field behaviour in the insert and the neighbouring plate material.

**Figure 8.** Limiting case of a conductor close to the plate border.

#### **7. Conclusions**

A new analytical model to determine the magnetic field distribution around the bushing region in the transformer tank, and considering the existence of a SSI, has been developed. The results obtained with the proposed model were validated with detailed 2D FE simulations. All the cases considered show great concordance between analytical and numerical solutions. A relative error was calculated in order to compare quantitatively the analytical model with the numerical one. This way, it was shown that the solutions differed by less than 2% in all the simulated cases. A formula to calculate the eddy current losses was also developed. The power losses were calculated for a total of thirteen different cases varying the radial distance of the insert, and again the analytical results were very close to the numerical ones. The results show that stray losses in the tank are reduced with increases in the SSI dimensions. The relative errors between stray losses, calculated with the analytical and the FE models, for all cases were less than 3%.

These equations can serve as a basis to develop a thermal analysis in the bushing regions or an economical analysis of the insert cost against the savings due to the power loss reduction. Therefore, the new analytical model can be a useful tool for transformer designers who are interested in obtaining the optimal size of non-magnetic inserts in the tank wall, according to the rated values and dimensions of the transformer.

**Author Contributions:** Conceptualization, J.C.O.-G., S.M. and M.A.C.-S.; methodology, S.M., M.A.C.- S. and J.C.O.-G.; software, M.A.C.-S., E.M.-V., R.E.-P. and V.M.J.-M.; validation, S.M. and M.A.C.-S.; formal analysis, S.M. and M.A.C.-S.; investigation, S.M. and M.A.C.-S.; resources, J.C.O.-G., R.E.-P. and V.M.J.-M.; data curation, S.M. and M.A.C.-S.; writing—original draft preparation, S.M. and M.A.C.-S.; writing—review and editing, J.C.O.-G., E.M.-V. and R.E.-P.; visualization, S.M., J.C.O.-G., E.M.-V., R.E.-P. and V.M.J.-M.; supervision, S.M., J.C.O.-G., E.M.-V. and R.E.-P.; project administration, J.C.O.-G. and V.M.-J.M.; funding acquisition, J.C.O.-G., R.E.-P. and V.M.J.-M. All authors have read and agreed to the published version of the manuscript.

**Funding:** The authors are grateful for the financial support provided by the following CONACYT projects: CBS-2015/256519 and CB-2015/257598.

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

#### **References**


### *Article* **Determination of Aircraft Cruise Altitude with Minimum Fuel Consumption and Time-to-Climb: An Approach with Terminal Residual Analysis**

**Taehak Kang <sup>1</sup> and Jaiyoung Ryu 1,2,\***


**\*** Correspondence: jairyu@cau.ac.kr; Tel.: +82-2-820-5279

**Abstract:** A pandemic situation of COVID-19 has made a cost-minimization strategy one of the utmost priorities for commercial airliners. A relevant scheme may involve the minimization of both the fuel- and time-related costs, and the climb trajectories of both objectives were optimized to determine the optimum aircraft cruise altitude. The Hermite-Simpson method among the direct collocation methods was employed to discretize the problem domain. Novel approaches of terminal residual analysis (TRA), and a modified version, m-σ TRA, were proposed to determine the goals. The multi-objective cruise altitude (MOCA) was different by 2.5%, compared to the one statistically calculated from the commercial airliner data. The present methods, TRA and m-σ TRA were powerful tools in finding a solution to this complex problem. The value σ also worked as a transition criterion between a single- and multi-objective climb path to the cruise altitude. The exemplary MOCA was determined to be 10.91 and 11.97 km at σ = 1.1 and 2.0, respectively. The cost index (CI) varied during a flight, a more realistic approach than the one with constant CI. With validated results in this study, TRA and m-σ TRA may also be effective solutions to determine the multi-objective solutions in other complex fields.

**Citation:** Kang, T.; Ryu, J. Determination of Aircraft Cruise Altitude with Minimum Fuel Consumption and Time-to-Climb: An Approach with Terminal Residual Analysis. *Mathematics* **2021**, *9*, 147. https://doi.org/10.3390/math9020147

Received: 15 November 2020 Accepted: 7 January 2021 Published: 11 January 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

**Keywords:** multi-objective optimization; cruise altitude; fuel consumption; time to climb; Hermite-Simpson method; trajectory optimization; terminal residual analysis (TRA); m-σ terminal residual analysis (m-σ TRA)

### **1. Introduction**

The outbreak of COVID-19 made the year 2020 the worst year in the history of the airline industry, with a net loss of 84.3 billion dollars [1]. The official reports from the Bureau of Transportation Statistics (BTS) of U.S. already confirmed a net loss of 5.2 billion and 11 billion dollars in the first [2] and second [3] quarters, respectively, of the year 2020. Revenue passenger kilometer (RPK) fell by 55% and cargo & mail ton-kilometer (CTK) by 16.8%, and the year 2021 is also expected to be unfavorable [1]. Although Ref. [1] notes that the overall prediction of the performance of the airline industry is favorable in 2021, the end of this pandemic is still unpredictable. Amidst a harsh pandemic environment, tight cost management became even more crucial, and the authors propose a rational, cost-minimizing approach. Since fuel expenditure is almost a quarter (23.7%) of the total operating cost (TOC) [1], and the time of arrival is also as essential as fuel costs, the focus of our study is on the minimization of both the fuel consumption (FC) and the time of travel (TT).

The optimization of FC and TT indeed is one of the major priorities in the literature as multi-objective [4–10] and single-objective [11–15] studies using various methods of Gauss Pseudo-spectral method [16] (sometimes accompanied by Chebyshev direct method [4]), energy-state [11,12], genetic algorithm [5], particle swarm [10], direct collocation methods [17,18], and statistical approach [9]. The optimization of each phase in a flight profile, consisting of the climb, cruise, and descent, had distinct merits for improvements. First, the cruise phase contributes the most to the TOC, even more for a long-range flight. Aircraft under the descent phase uses all of their potential and kinetic energy for deceleration, but the optimization is primarily for safety [19,20]. During the climb phase, optimized ascension protocols such as continuous climb operations (CCOs) yield a considerable reduction in fuel consumption [21,22]. The authors chose the climb phase for multi-objective optimization because of its potential for further optimization [9,12].

Overall, the main objective of this study is to minimize both FC and TT in conjunction with the climb phase. In this case, TT became the time-to-climb (TTC) to describe the time spent to ascend to the desired optimum cruise altitude. From the perspective of aerodynamics, cruising at higher altitudes reduces the aerodynamic drag and increases cruise speed at a given thrust, but there is extra fuel consumption for ascension [23]. Cruising at a lower altitude implies more aerodynamic drag and lower aircraft speed, which resulted in increased TT. An optimally determined cruise altitude would save both fuel and time, potentially achievable by optimizing the aircraft performance during the ascending phase. This study does not adapt the conventional approach of total cost minimization involving constant cost index (CI) throughout a flight path [3,5,7] but shows that CI changes over the course of the climb path. Moreover, wind shear conditions were not considered, and only conventional International Standard Atmosphere (ISA) conditions were used. This ISA model is equivalent to the 1976 US standard atmosphere model [24], and hence the atmosphere model used in the present study was named "1976 US atmospheric model". This study presents a distinctive method, effectively determining the optimum cruise altitude of a generic supersonic aircraft using residual analysis arguments, incorporating two minimizing objectives, FC and TTC. The rationale for the use of supersonic jet data was given in the next paragraph and Section 4.

The contents start with a brief description of the indirect method and explain the difficulties involved in finding the analytic solution of complex problems in Section 2.1. Section 2.2 describes the direct methods, which had gained popularity with the increase in computing power in recent decades. The study justifies the use of direct methods over indirect methods. There are several direct methods such as the Gauss-Lobatto [25] and the Gauss Pseudo-spectral method [16], but the Hermite-Simpson method was chosen. The procedure with the chosen method for the discretization of the problem domain in Section 2.2 as well. The calculated cruise altitude result was compared to the statistically derived result from subsonic, commercial airplanes in Ref. [9]. The present study intended to calculate the cruise altitude of an aircraft by optimizing the climb trajectory in three-dimensional thrust-Mach-altitude space. Such data in the literature using subsonic commercial aircraft [9,22] was available only in stage-wise aerodynamic data having single column data at each flight stage, and hence, the authors used supersonic jet data [12,26] with boundary conditions set for subsonic operations. The details about the models were described in Section 2.3, and auxiliary models and novel methods used in this paper were noted in Sections 2.4–2.6. The optimum climb trajectories were obtained for each targeted objective, minimum FC and TTC. Then, the results (Section 3) were presented followed by discussions (Section 4) and conclusion (Section 5).

#### **2. Methods**

The following Sections 2.1 and 2.2 describe the general formulation of the optimal control problem (OCP).

#### *2.1. Optimal Control in Continuous-Time Domain*

In general, the formulation of continuous-time optimal control problem with no path constraints on the states or the control variables and fixed initial and final time *t*<sup>0</sup> and *tE* can be defined as follows:

$$J = \Phi(\mathbf{x}(t\_E)) + \int\_{t\_0}^{t\_E} L(\mathbf{x}(t), \mathbf{u}(t), t) \, dt \tag{1}$$

where the control vector trajectory *<sup>u</sup>* : [*t*0, *tE*] <sup>⊂</sup> <sup>R</sup> <sup>→</sup> <sup>R</sup>*nu* is usually minimized in the performance index *<sup>J</sup>* : [*t*0, *tE*] <sup>×</sup> <sup>R</sup>*nx* <sup>×</sup> <sup>R</sup>*nu* <sup>×</sup> <sup>R</sup> <sup>→</sup> <sup>R</sup>. Equation (1) is subject to:

$$
\dot{\mathbf{x}}(t) = f(\mathbf{x}(t), \; u(t), t), \mathbf{x}(t\_0) = \mathbf{x}\_0 \tag{2}
$$

where [*t*0, *tE*] is the time interval of the problem domain, *<sup>x</sup>* : [*t*0, *tE*] <sup>→</sup> <sup>R</sup>*nx* is the state vector, <sup>Φ</sup> : <sup>R</sup>*nx* <sup>×</sup> <sup>R</sup> <sup>→</sup> <sup>R</sup> is a terminal cost function, *<sup>L</sup>* : <sup>R</sup>*nx* <sup>×</sup> <sup>R</sup>*nu* <sup>×</sup> <sup>R</sup> <sup>→</sup> <sup>R</sup> is an intermediate cost function, and *<sup>f</sup>* : <sup>R</sup>*nx* <sup>×</sup> <sup>R</sup>*nu* <sup>×</sup> <sup>R</sup> <sup>→</sup> <sup>R</sup>*nx* is a vector field. This formulation is expressed in the Bolza form where Equation (2) describes the dynamics of the system with the corresponding initial conditions. Here, Φ(*x*(*tE*)) is the Mayer term and *L*(*x*(*t*), *u*(*t*), *t*) is the Lagrange term.

When constraints are involved, a time dependent Lagrange multiplier vector function *<sup>λ</sup>* : [*t*0, *tE*] <sup>→</sup> <sup>R</sup>*nx* , also known as co-state, is introduced to define an augmented performance index *J*, which is defined as:

$$\overline{J} = \Phi(\mathbf{x}(t\_E)) + \int\_{t\_0}^{t\_E} \left( L(\mathbf{x}(t), \mathbf{u}(t), t) + \boldsymbol{\lambda}^T(t) \left[ f(\mathbf{x}(t), \mathbf{u}(t), t) - \dot{\mathbf{x}} \right] \right) dt. \tag{3}$$

The Hamiltonian function H then is defined as:

$$\mathcal{H}(\mathbf{x}(t), u(t), \lambda(t), t) = L(\mathbf{x}(t), u(t), t) + \lambda^T(t) f(\mathbf{x}(t), u(t), t), \tag{4}$$

which can re-write Equation (3) as:

$$\mathbf{J} = \Phi(\mathbf{x}(t\_E)) + \int\_{t\_0}^{t\_E} \left( \mathcal{H}(\mathbf{x}(t), \boldsymbol{u}(t), \boldsymbol{\lambda}(t), t) - \dot{\boldsymbol{\lambda}}^T(t)\dot{\boldsymbol{\lambda}} \right) dt. \tag{5}$$

When time *t*<sup>0</sup> and *tE* are fixed, an infinitesimal variation in *u*(*t*), *x*(*t*), and *J* can be considered which are denoted as *δu*(*t*), *δx*(*t*), and *δJ*. Such can be formulated as:

$$\begin{split} \delta \overline{\mathcal{J}} &= \left[ \left( \frac{\partial \Phi}{\partial \mathbf{x}} - \boldsymbol{\lambda}^{T} \right) \delta \mathbf{x}(t) \right]\_{t=t\_{E}} + \left[ \boldsymbol{\lambda}^{T} \delta \mathbf{x}(t) \right]\_{t=t\_{0}} \\ &+ \int\_{t\_{0}}^{t\_{E}} \left( \left( \frac{\partial \mathcal{H}}{\partial \mathbf{x}} + \boldsymbol{\dot{\lambda}}^{T} \right) \delta \mathbf{x}(t) + \left( \frac{\partial \mathcal{H}}{\partial \mathbf{u}} \right) \delta \mathbf{u}(t) \right) dt. \end{split} \tag{6}$$

The Lagrange multipliers *<sup>λ</sup>* : [*t*0, *tE*] <sup>→</sup> <sup>R</sup>*nx* can arbitrarily be chosen to make *<sup>δ</sup>x*(*t*) and *δx*(*tE*) coefficient equal to zero. Hence the multipliers chosen are:

$$
\dot{\lambda}^T(t) = -\frac{\partial \mathcal{H}}{\partial \mathbf{x}}\,'\,\tag{7}
$$

$$
\lambda^T(t\_E) = \left. \frac{\partial \Phi}{\partial \mathbf{x}} \right|\_{t=t\_E}. \tag{8}
$$

The chosen multipliers change the expression for *J*. When the initial state is fixed at *δx*(*t*0) = 0:

$$
\overline{\delta\!f} = \int\_{t\_0}^{t\_E} \left[ \left( \frac{\partial \mathcal{H}}{\partial u} \right) \delta u \right] dt\_\prime \tag{9}
$$

where the stationarity condition for the minimum at *δJ* = 0 becomes:

$$\frac{\partial \mathcal{H}^T}{\partial u} = 0.\tag{10}$$

Equations (2), (7), (8) and (10) are the necessary conditions in the first order for a minimum of *J*. Equations (7) and (8) are known as the adjoint equation, describing the co-states, and the transversality conditions, describing the initial states. These are necessary optimality conditions defining a two-point boundary value problem, useful for finding analytic solutions to certain types of optimal control problems. They also are used to find solutions in general cases using numerical algorithms. Further details are described in Refs. [27–29].

**Definition 1.** *(Terminal constraints). The above formulation can be given a set of terminal constraints defined as:*

$$
\psi(x(t\_E), t\_E) = 0,\tag{11}
$$

*where <sup>ψ</sup>* : <sup>R</sup>*nx* <sup>×</sup> <sup>R</sup> <sup>→</sup> <sup>R</sup>*n<sup>ψ</sup> is in a vector form, variational analysis shows that Equations (2), (7) and (10) become necessary conditions for a minimum of J with the following terminal condition:*

$$
\left(\frac{\partial \boldsymbol{\psi}^{T}}{\partial \boldsymbol{x}} + \frac{\partial \boldsymbol{\psi}^{T}}{\partial \boldsymbol{x}} \boldsymbol{\zeta} - \boldsymbol{\lambda}\right)^{T} \Bigg|\_{t\_{E}} \delta \boldsymbol{x}(t\_{E}) + \left.\frac{\partial \boldsymbol{\psi}}{\partial t} + \left.\frac{\partial \boldsymbol{\psi}^{T}}{\partial t} \boldsymbol{\zeta} + \mathcal{H}\right|\_{t\_{E}} \delta t\_{E} = \boldsymbol{0},\tag{12}
$$

*where <sup>ζ</sup>* <sup>∈</sup> <sup>R</sup>*npsi is Lagrange multiplier for the terminal constraint, <sup>δ</sup>tE is the infinitesimal variation in tE, and δx*(*tE*) *is the infinitesimal variation in x*(*tE*).

**Definition 2.** *(Pontryagin's maximum principle). The adaptation of inequality constraints coupled to the input variables in optimal control problems is common under realistic conditions [30]. The input variable u then is restricted within the admissible compact region* Ω *, which is defined as:*

$$u(t) \in \Omega. \tag{13}$$

In this case, Equations (2), (7) and (8) become necessary conditions, and stationarity condition of Equation (10) is replaced with:

$$\mathcal{H}(\mathbf{x}^\*(t), \boldsymbol{\mu}^\*(t), \boldsymbol{\lambda}^\*(t), \mathbf{t}) = \max\_{\boldsymbol{\mu}(t) \in \mathcal{U}} \mathcal{H}(\mathbf{x}^\*(t), \boldsymbol{\mu}^\*(t), \boldsymbol{\lambda}^\*(t), \mathbf{t}), \tag{14}$$

for all admissible *u*(*t*). The superscript \* denotes the optimal variables. The above, Pontryagin's maximum principle, Hamiltonian H must be maximized over all admissible *u*(*t*) for optimal values of the state and co-state variables.

**Definition 3.** *(Path constraints). The problem domain in practical applications usually restricts the state and control trajectories where a set of constraints have to be satisfied within a time interval* [*t*0, *tE*]*. The constraint in the trajectory is given as:*

$$E(x(t), u(t), t) \le 0,\tag{15}$$

*where <sup>E</sup>* : <sup>R</sup>*nx* <sup>×</sup> <sup>R</sup>*nu* <sup>×</sup> [*t*0, *tE*] <sup>→</sup> <sup>R</sup>*nP . Additionally, equality constraints can be imposed at some intermediate point in time te, t*<sup>0</sup> ≤ *te* ≤ *tE. These interior point constraints can be expressed as:*

$$D(\mathbf{x}(t\_c), t\_c) = 0,\tag{16}$$

*where D* : <sup>R</sup>*nx* <sup>×</sup> <sup>R</sup> <sup>→</sup> <sup>R</sup>*nq . Further details are available in Ref. [31].*

**Definition 4.** *(Singular arcs). In singular arc problems, the matrix <sup>∂</sup>*2H/*∂u*<sup>2</sup> *becomes singular with external arcs satisfying Equation (10). In this case, the optimality of the singular arc should be validated [31,32]. Usually, Hamiltonian function* H *becomes linear in at least one of the control variables for certain practical cases. This causes the control not to be determined with the state and co-state by Equation (10), but by the condition where the time derivative of ∂*H/*∂u is zero along the singular arc. In such cases, supplementary conditions called the generalized Legendre-Clebsch conditions must be identified:*

$$(-1)^{k} \frac{\partial}{\partial u} \left[ \frac{d^{2k}}{dt^{2k}} \frac{\partial \mathcal{H}}{\partial u} \right] \ge 0, k = 0, 1, 2, \dots \tag{17}$$

The computational difficulty involved in singular arc problems is the non-unique control variables. The inequality constraint domains, especially, have complications of:


#### *2.2. Direct Transcription Method*

The complexity involved in solving the indirect methods questions its robustness. The direct methods, on the other hand, have advantages over indirect methods that good initial and any co-state guesses are not compulsory, making them robust by having a broad range for convergence even without optimally derived conditions and undetermined switching structure. Linear interpolation discretizes a continuous solution to a set of equations with state and control variables to solve the differential equations. As a result, this transforms an OCP into nonlinear programming (NLP) problem where the exact solution of OCP, having an infinite number of state and control variable combinations, is approximated to a finite number.

The typical methods are direct shooting, direct multiple shooting, and direct collocation. A direct collocation method is robust in problems with small perturbations, which is suitable for aircraft trajectory optimization. The present study uses the Hermite-Simpson methods with cubic polynomials to define the state trajectories and a piece-wise linear function for the control [18] (Figure 1). This method places the collocation points at the centers of the intervals and imposes constraints on the dynamic equations during the discretization process.

**Figure 1.** The main concept of Hermite collocation methods (reproduced from Figure 1, Ref. [33]). This method captures the local derivatives of the state variables to minimize the error between state derivatives from dynamics and polynomial differentiation.

First, time *tE* is discretized into *N* intervals as:

$$t\_0 = 0 \le t\_1 \le t\_2 \dots \le t\_k \le t\_{k+1} \le \dots \le t\_N = t\_E. \tag{18}$$

The states between *tk* and *tk*<sup>+</sup><sup>1</sup> can be expressed in the form of cubic polynomial as:

$$\mathbf{x}(t) = a\_{k,0} + a\_{k,1}t + a\_{k,2}t^2 + a\_{k,3}t^3,\tag{19}$$

which gives a derivative form of:

$$
\dot{x}(t) = a\_{k,1} + 2a\_{k,2}t + 3a\_{k,3}t^2,\tag{20}
$$

where *ak*,0, *ak*,1, *ak*,2, and *ak*,3 are coefficients of the polynomial approximation in *k<sup>t</sup> h* interval. Since the collocation point is the midpoint of the interval:

$$t\_{k,\varepsilon} = \frac{t\_k + t\_{k+1}}{2}.\tag{21}$$

The values of the state and its derivatives are independent to the shifting of the interval from [*tk*, *tk*<sup>+</sup>1] to [0, *h*] with *h* = *tk*<sup>+</sup><sup>1</sup> − *t*\_*k*, time interval should be shifted. Let *x*(0) = *xk*, *x*(*h*) = *x*\_(*k* + 1), . *<sup>x</sup>*(0) <sup>=</sup> . *xk*, and . *<sup>x</sup>*(*z*) <sup>=</sup> . *xk*+1, and combining Equations (19) and (20) gives:

$$
\begin{bmatrix}
\dot{\mathbf{x}}(0) \\
\dot{\mathbf{x}}(0) \\
\mathbf{x}(h) \\
\dot{\mathbf{x}}(h)
\end{bmatrix} = \begin{bmatrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
1 & h & h^2 & h^3 \\
0 & 1 & 2z & 3h^2
\end{bmatrix} \begin{bmatrix}
a\_{k,0} \\
a\_{k,1} \\
a\_{k,2} \\
a\_{k,3}
\end{bmatrix}.\tag{22}
$$

In the inverse form gives:

$$
\begin{bmatrix} a\_{k,0} \\ a\_{k,1} \\ a\_{k,2} \\ a\_{k,3} \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ -\frac{3}{h^2} & -\frac{2}{h} & \frac{3}{h^2} & -\frac{1}{h} \\ \frac{2}{h^3} & \frac{1}{h^2} & -\frac{2}{h^3} & \frac{1}{h^2} \end{bmatrix} \begin{bmatrix} \dot{\mathbf{x}}(0) \\ \dot{\mathbf{x}}(0) \\ \mathbf{x}(h) \end{bmatrix}. \tag{23}
$$

The substitution of coefficients [*ak*,0, *ak*,1, *ak*,2, *ak*,3] into Equations (19) and (20) allows for the computation of the collocation points as:

$$\mathbf{x}\_{\varepsilon}(t) = \mathbf{x}\left(\frac{h}{2}\right) = \frac{1}{2}(\mathbf{x}\_{k}(t) + \mathbf{x}\_{k+1}(t)) + \frac{h}{8}[f(\mathbf{x}\_{k}(t), u\_{k}(t)) - f(\mathbf{x}\_{k+1}(t), u\_{k+1}(t))].\tag{24}$$

In the time-derivative form, the points in the center of the interval is given by:

$$\dot{\mathbf{x}}\_{\varepsilon}(t) = \dot{\mathbf{x}}\left(\frac{h}{2}\right) = -\frac{3}{2h}(\mathbf{x}\_{k} - \mathbf{x}\_{k+1}) - \frac{1}{4}[f(\mathbf{x}\_{k}, u\_{k})].\tag{25}$$

The above equation depends on the states and control at the intervals. Appropriate values of both state and controls should be chosen for the collocation points to represent the correct physics of the system. The control at the collocation point is given by:

$$
\mu\_c = \frac{\mu\_k + \mu\_{k+1}}{2}.\tag{26}
$$

A defect Δ*<sup>k</sup>* is then described as follows:

$$\begin{array}{ll} \Delta\_{k} &= \dot{\mathbf{x}}\_{\mathcal{E}} - f(\mathbf{x}\_{\mathcal{E}}, \boldsymbol{\mu}\_{\mathcal{E}}) \\ &= -\frac{3}{2l}(\mathbf{x}\_{k} - \mathbf{x}\_{k+1}) - \frac{1}{4}[f(\mathbf{x}\_{k}, \boldsymbol{\mu}\_{k}) + f(\mathbf{x}\_{k+1}, \boldsymbol{\mu}\_{k+1})] - f(\mathbf{x}\_{\mathcal{E}}, \boldsymbol{\mu}\_{\mathcal{E}}) \\ &= -\frac{3}{2l}\Big{[}(\mathbf{x}\_{k} - \mathbf{x}\_{k+1}) + \frac{h}{6}[f(\mathbf{x}\_{k}, \boldsymbol{\mu}\_{k}) + 4f(\mathbf{x}\_{\mathcal{E}}, \boldsymbol{\mu}\_{\mathcal{E}}) + f(\mathbf{x}\_{k+1}, \boldsymbol{\mu}\_{k+1})] \Big{]}. \end{array} \tag{27}$$

State constraints then are redefined as:

$$
\Delta\_k = \left[ (\mathbf{x}\_k - \mathbf{x}\_{k+1}) + \frac{h}{6} [f(\mathbf{x}\_k, \boldsymbol{\mu}\_k) + 4f(\mathbf{x}\_c, \boldsymbol{\mu}\_c) + f(\mathbf{x}\_{k+1}, \boldsymbol{\mu}\_{k+1})] \right]. \tag{28}
$$

The last term in the above expression is implicit Hermite integration of the system dynamics which is used to solve nonlinear functions. Here, the NLP solver would select [*xk*, *uk*, *xk*+1, *uk*<sup>+</sup>1] to minimize Δ to zero for convergence of the solution.

The cost function now can be defined using numerical integration schemes. When trapezoid method is chosen, the cost function is written as:

$$J(u) = \Phi(\mathbf{x}(t\_E)) + \int\_{t=0}^{t\_E} L(t, \mathbf{x}(t), u(t)) \, dt. \tag{29}$$

Using trapezoid integration along the interval:

$$f\_{NLP} = \Phi(\mathbf{x}\_N) + \frac{1}{2} \sum\_{k=1}^{N-1} \left( L(t\_{k+1}, \mathbf{x}\_{k+1}, \boldsymbol{\mu}\_{k+1}) + L(t\_k, \mathbf{x}\_k, \boldsymbol{\mu}\_k) \right) (t\_{k+1} - t\_k). \tag{30}$$

For a special case with linear quadratic regulator and evenly discretized time points at the intervals *h*, the resultant equation is expressed as:

$$J\_{NLP} = \Phi(\mathbf{x}\_N) + \frac{1}{2} \sum\_{k=1}^{N-1} \left( \mathbf{x}\_{k+1}^T Q\_1 \mathbf{x}\_{k+1} + \mathbf{u}\_{k+1}^T Q\_2 \mathbf{u}\_{k+1} + \mathbf{x}\_k^T Q\_1 \mathbf{x}\_k + \mathbf{u}\_k^T Q\_2 \mathbf{u}\_k \right) \mathbf{h}.\tag{31}$$

In general, the problem formulation using NLP in the OCP can be rewritten as:

$$\min\_{\mathbf{x}\_{k},\mathbf{u}\_{k}} \left( \Phi(\mathbf{x}\_{N}) + \frac{1}{2} \sum\_{k=1}^{N-1} \left( \mathbf{x}\_{k+1}^{T} Q\_{1} \mathbf{x}\_{k+1} + \mathbf{u}\_{k+1}^{T} Q\_{2} \mathbf{u}\_{k+1} + \mathbf{x}\_{k}^{T} Q\_{1} \mathbf{x}\_{k} + \mathbf{u}\_{k}^{T} Q\_{2} \mathbf{u}\_{k} \right) h \right). \tag{32}$$

where *Q*<sup>1</sup> and *Q*<sup>2</sup> are linear quadratic regulators, and Equation (32) is subjected to:

$$
\Delta\_k = \left[ (\mathbf{x}\_k - \mathbf{x}\_{k+1}) + \frac{h}{6} [f(\mathbf{x}\_k, \mathbf{u}\_k) + 4f(\mathbf{x}\_\varepsilon, \mathbf{u}\_\varepsilon) + f(\mathbf{x}\_{k+1}, \mathbf{u}\_{k+1})] \right] = 0,\tag{33}
$$

with constraints on states and controls defined as:

$$\begin{array}{l} \mathfrak{u}\_{\min} \le \mathfrak{u}\_{k} \le \mathfrak{u}\_{\max}, \\ \mathfrak{x}\_{\min} \le \mathfrak{x}\_{k} \le \mathfrak{u}\_{\max}, \\ \mathfrak{C}\_{\mathbf{c}q}(\mathfrak{x}\_{k}, \mathfrak{u}\_{k}) = 0, \\ \mathfrak{C}(\mathfrak{x}\_{k'}, \mathfrak{u}\_{k}) = 0, \end{array} \tag{34}$$

where *Ceq* and *C* represent equality and inequality constraints, respectively.

The procedure described in this section was used to solve the problem in this study which is already implemented in the MATLAB-compatible toolbox ICLOCS2 [34], where nonlinear problems were solved with interior point NLP solver IPOPT [35].

#### *2.3. Aircraft Model*

The multi-objective in this study is the achievement of both minimum FC and TTC to reach the optimum cruise altitude. To achieve these objectives, the climb path to the desired altitude should be optimized. First, the equation of motion (EOM) (Figure 2) in point-mass approximation adopted from Ref. [36] can be written as follows:

$$\dot{V} = \frac{(T(M, z)\cos\alpha - F\_D)}{m} - \frac{\varepsilon}{r\_t^2}\sin\gamma\_\prime \tag{35}$$

$$\dot{\gamma} = \frac{T(M, z)\sin\alpha + F\_L}{mV} + \left[\frac{V}{r\_t} - \frac{\varepsilon}{vr\_t^2}\cos\gamma\right],\tag{36}$$

$$
\dot{z} = V \sin \gamma\_\prime \tag{37}
$$

$$
\dot{W} = -\frac{T(M, z)}{I\_{sp}},
\tag{38}
$$

where *V* is airspeed, *T* is thrust, *M* is Mach number, *FD* is drag, *FL* is lift, *W* is weight, a product of mass *m* and gravitational acceleration *g*0, *ε* is the gravitational constant, *rt* is the sum of the radius of the Earth *Re* and the altitude *z*, *γ* is the flight path angle, and *α* is angle of attack. They are subject to initial conditions of *V*(*ti*) = *Vi*, *γ*(*ti*) = *γi*, *z*(*ti*) = *zi*, and *m*(*ti*) = *mi*, where *ti* is the initial time. The aerodynamic properties of the aircraft are approximated with functions of *α*:

$$F\_L = q \mathbb{S} \mathbb{C}\_{L\_a} a\_\prime \tag{39}$$

$$F\_D = qS\left(C\_{D\_0} + \eta C\_{L\_a} \alpha^2\right),\tag{40}$$

where *q* = *ρV*3/2 denotes the dynamic pressure, *S* is the aerodynamic reference area, *η* is the efficiency factor (0 ≤ *η* ≤ 1). Both *CL<sup>α</sup>* and *CD*<sup>0</sup> are the slope coefficients of lift and zero-lift drag which are dependent on the Mach number, *M*, in most cases.

**Figure 2.** Longitudinal dynamics of an aircraft represented in point-mass approximation.

The objectives in this study are minimum FC and TTC. Hence, the cost functions for each objective are given as Equations (41) and (42), respectively:

$$\min\_{\mathbf{x}(t),\mathbf{u}(t),t\_E} -m(t\_E)\_\prime \tag{41}$$

$$\min\_{\omega(t),\omega(t),t\_E} t\_{E\prime} \tag{42}$$

The altitudes as boundary conditions were given in 1 km interval and hence the *z*(*tE*) was given a range between 1000 m to 21,000 m with an interval of 1 km. The boundary conditions and the constants were given as:

$$\begin{array}{llll} z(0) = 0 \text{ [m]}, & V(0) = 129 \text{ [m/s]}, & \gamma(0) = 0 \text{ [deg]}, & m(0) = 19,050 \text{ [kg]},\\ V(t\_E) = 295 \text{ [m/s]}, & \gamma(t\_E) = 0 \text{ [deg]}, & S = 49.24 \text{ [m}^2], &\\ \varepsilon = 3.99 \times 10^{14} \text{ [m}^3/\text{s}^2], & I\_{sp} = 1600 \text{ [s]}, & g\_0 = 9.81 \text{ [m/s}^2], & R\_c = 6,378,145 \text{ [m]}, \end{array}$$

with the bounds on the variables, given as:

$$\begin{array}{llll} 0 \le z \le 21,000 \text{ [m]} & 5 \le V \le 1200 \text{ [m/s]}, & 40 \le \gamma \le 40 \text{ [deg]},\\ 100 \le m \le 20,000 \text{ [kg]} & -20 \le u \le 20 \text{ [deg]}, & 0 \le t\_E \le 600 \text{ [s]}. \end{array}$$

where the accuracy criteria for the numerical solution was given as Table 1.

**Table 1.** Accuracy criteria for the numerical solution.


The thrust and aerodynamic data should be defined either with the experimental data or highly refined simulation data, preferably using computational fluid dynamics with direct numerical simulation (DNS) [37] sometimes coupled with linear interaction analysis (LIA) [38], or large eddy simulation (LES) [39] for an accurate description of an object moving in a compressible fluid like air. Simulation data describing the macroscopic motion

$$\begin{array}{c} 0 \le z \le 21,000 \text{ [m]}\\ 100 \le m \le 20.000 \text{ lksel} \end{array}$$

of the aircraft [26,40] also are valuable resources. In the present study, typical supersonic aircraft aerodynamic profiles employed from Refs. [12,26] were used and reproduced in Tables 2 and 3, where adjustments were made by Ref. [41] with linear interpolation to fill in the "missing" data. According to the authors in Ref. [26], the aircraft is a generic-type supersonic interceptor.

**Table 2.** Thrust as a function of altitude *z* and Mach number *M* from Ref. [12] adjusted by Ref. [41] for Aircraft 1.


**Table 3.** Lift and drag coefficients as a function of angle of attack *α* and Mach number *M* from Ref. [12] for Aircraft 1.


A second aircraft model (Tables 4 and 5) was then employed using the same approach to compare the possible difference between two aircraft models. The same cost functions and altitude range as Aircraft 1 were given with slightly different boundary and constraint conditions as shown below:

*<sup>ε</sup>* <sup>=</sup> 3.99 <sup>×</sup> <sup>10</sup><sup>14</sup> m3/s2


with the bounds on the variables, given as:


Refs. [12,26] mentions that both models were based on typical supersonic interceptors. To the best of the authors' knowledge, supersonic interceptors have two types: one is heavy, long-range, and the other is lightweight, short-range, and the authors speculated that Aircraft 1 belonged to the former, and Aircraft 2 for the latter for having different initial mass (19,050 compared to 16,329.3 kg) and maximum thrust (205.65 compared to 134.55 kN). The authors note that the cruise altitude cannot be the same for all aircraft and may vary depending on the aircraft model. The results of the aircraft model 2 and the effects of such differences were presented and discussed in Section 4.5.


**Table 4.** Thrust as a function of altitude *z* and Mach number *M* from Ref. [12] for Aircraft 2.

**Table 5.** Lift and drag coefficients as a function of angle of attack *α* and Mach number *M* from Ref. [11] for Aircraft 2.


#### *2.4. Atmospheric Model*

For a realistic approach to the problem, a 1976 US atmospheric model [24] was used. This semi-empirical model effectively describes the atmospheric conditions around an aircraft at all altitudes and made the mathematical approach in this study more realistic. The formula for the model is given as:

$$T\_M = T\_b + L\_b(z - z\_b)\_\prime \tag{43}$$

$$P = \begin{cases} \begin{array}{c} P\_b e^{\left[\frac{\Im[\mathbf{M}\_A(z-z\_b)}{kT\_b}]}\right]} & L\_b = 0; \\\ P\_b \left[\frac{T\_b}{T\_b + L\_b(z-z\_b)}\right]^{\left[\frac{\Im[\mathbf{M}\_A]}{kT\_b}\right]} L\_b \neq 0; \end{array} \end{cases} \tag{44}$$

$$
\rho = \frac{P}{R\_{sp}T} \tag{45}
$$

where *TM* is the molecular temperature, *Tb* is the base temperature at each atmospheric level, *Lb* is the base temperature lapse rate, *z* is altitude, *zb* is the base altitude at each atmospheric level, *P* is atmospheric pressure, *Pb* is the base pressure at each atmospheric level, *g*<sup>0</sup> is gravitational acceleration, *R* is universal gas constant, *MA* is molar mass of Earth's air, *ρ* is the density of air, and *Rsp* is the specific gas constant of air. The atmospheric level, and the necessary boundary and parameter values are given in Table 6.

#### *2.5. B-Spline Curve*

The optimum trajectory solutions of each target objectives, minimum FC and TTC, were generated with an altitude interval of 1000 m, and B-spline was selected for the plotting of the curve connecting the property values at the end of the climb. B-spline is the general form of the Bézier spline which builds parametric curves around the polynomial expressions [42]. When a knot vector is *B* = *β*0, *β*1, ... , *βk*, and control points *w*0, ... , *wn* are defined where *B* is a non-decreasing sequence with *β<sup>i</sup>* ∈ [0, 1], the basis functions are defined as below:

$$N\_{i, \rho}(\beta) = \begin{cases} \ 1, if \ \beta\_i \le \beta \le \beta\_{i+1} \text{ and } \beta\_i < \beta\_{i+1}; \\\ \ 0, otherwise; \end{cases} \tag{46}$$

where *j* = 1, 2, . . . , *w*. The B-spline curve then is defined as:

$$N\_{i,j}(\beta) = \frac{\beta - \beta\_i}{\beta\_{i+j} - \beta\_i} N\_{i,j-1}(\beta) + \frac{\beta\_{i+j+1} - t}{\beta\_{i+j+1} - \beta\_{i+1}} N\_{i+1,j-1}(\beta),\tag{47}$$

$$\mathcal{C}(r) = \sum\_{i=0}^{n} w\_i N\_{i,w}(\beta). \tag{48}$$

B-spline curves were used for having several advantages for the presentation of our results:


**Table 6.** 1976 US atmosphere model: boundary and parameter values from Ref. [24].


Note: ∗, Interval (Layer) Number; †, Base Geopotential Altitude Above Mean Sea Level (MSL); ‡, Base Static Pressure; §, Base Temperature; , Base Temperature Lapse Rate per Kilometer of Geopotential Altitude.

#### *2.6. Residual-Based Approach*

The Pareto-optimal nature in multi-objective optimization of cruise altitude makes the simultaneous achievement of both minimum FC and TTC impossible [43]. A Pareto-optimal set is a solution set where a trade-off between the target objectives should occur. Hence, the solution satisfying minimum FC and TTC should either be obtained or determined through other measures. Numerous approaches to solve such issues include the weighted sum method [44], the *ε*-constraint method [45], the particle swarm method [10], and the genetic algorithm hybrid [5]. The first two methods [44,45] have the advantage of having an easily acquirable set of optimal solutions with a superposition of single-objective solution sets, incorporating single-objective designs to obtain the desired range of optimal solutions.

The present study adopts the arguments in residual analysis to determine the optimal solution of the multi-objective problem. A novel method, terminal residual analysis (TRA), is proposed in this study for the selection of optimum cruise altitude achieving both the minimum FC and TTC objectives. The residual *ω* was the difference between the reference solution value *y* and the target solution value *y*ˆ:

$$
\omega(s) = \mathcal{y}(z) - \mathcal{y}(z),
\tag{49}
$$

with the use of B-spline, a set of reference solution data *K* was defined as:

$$K = \{\mathfrak{z}\_1, \mathfrak{z}\_2, \dots, \mathfrak{z}\_{n-1}, \mathfrak{z}\_n\},\tag{50}$$

$$G = \{\chi\_1, \chi\_2, \dots, \chi\_{n-1}, \chi\_n\},\tag{51}$$

where *n* is the number of points in the B-spline curve of the solution curve assuming equivalent intervals in the reference curve and the subjected target solution curve. Here, an acceptable error level (AEL) *σ* is introduced to find the maximum, potentially the terminal value among the pool of residuals *ω* in Equation (49). The selection criterion for this approach is given as:

$$\max(\omega(z)) < \frac{\sigma}{100} y\_n(z),\tag{52}$$

where *yn* was the reference solution data at *tE*. Further, a modified approach also was introduced with a marginally acceptable error level (m-*σ*) TRA to compensate the low accuracy at the low *σ* value which will be discussed in Section 3.2. In the modified version, the determined altitude value was extended with linear extrapolation from the last turning point *d*2*ν*/*dσ*<sup>2</sup> = 0 towards the value of *σ* = 0. Here, *ν* is the multi-objective cruise altitude (MOCA) which details were explained at the end of this section.

In this study, the reference data model was set to be the minimum FC solution data, where the minimum TTC solution data was considered as a deviation from the minimum FC solution data. This not only is because of the cost of fuel, taking up about 15 to 20% of total operating cost [1,46–49] but also as low CI is recommended for optimal flight operation [50]. The equation for CI in this study is as follows:

$$\text{CI} = \frac{\text{Cost of Time } [\ $/s]}{\text{Cost of Fuel } [\$ /kg]}. \tag{53}$$

CI is a dimensionless coefficient describing the relationship between the cost of time (CoT) and the cost of fuel (CoF). The unobtainable extreme values of CI are CI = 0, representing the minimum FC for the best range, and CI = *max*, representing the minimum TTC with maximum speed. CoT and CoF were assumed to be equal in the corresponding units and hence CI was calculated to represent the total cost ratio between FC and TTC during the climb.

The residuals between the minimum FC and TTC were subjected to *σ*, originating from the minimum FC curve. Such ensured the achievement of both the minimum FC and TTC conditions at a specific cruise altitude within *σ*, which was initially selected to be 1%. With the assumption that the determined cruise altitude falls within an error range of 1%. The cruise altitude was named a multi-objective cruise altitude (MOCA), *ν*, and the error range, 1%, was selected based on the statistical results from Ref. [9] that noted about 46.8% of the sample data already had less than 1% optimization potential in fuel consumption. The *σ* value of 1, therefore, was equal to additional fuel usage of 1%, of the fuel used for minimum FC climb to reach the desired altitude.

#### **3. Results**

The results in the following sections were mostly linked to the result of Aircraft 1. The results and discussion about Aircraft 2 were presented and discussed in Section 4.5.

#### *3.1. Minimum FC and TTC*

As mentioned in Section 2.6, the minimum FC and TTC solution paths were the bounds of Pareto fronts where trade-off optimal solutions lie within. The minimum FC results had almost equivalent values with the ones of minimum TTC that later diverged to take individual trajectories (Figure 3). One could even intuitively find that a diverging point of two solution trajectories occurred at around 10 to 12 km.

**Figure 3.** The minimum FC and TTC solutions at *tE* in an altitude interval of 1 km. The plots of (**a**), TTC against FC; (**b**) altitude against FC; (**c**) altitude against TTC are illustrated.

*3.2. Terminal Residual Analysis (TRA) and Modified TRA*

The residual between B-splined minimum FC and TTC solution data at *tE* was plotted with the criterion of *σ* = 1 from the minimum FC solution in Figure 4, as proposed in Section 2.6. The altitude for Aircraft 1 was 10.43 km at max(*ω*(*z*)), at which the residual value started to deviate dramatically from the *σ* range.

**Figure 4.** The plot of residuals between the minimum TTC and FC solution data which graphically illustrated the concept of the selection criterion max(*ω*(*z*)) described in the Section 2.6. *G*, residual between minimum FC and TTC solution; *σ*, acceptable error level (AEL); max(*ω*(*z*)), terminal residual.

It was clear that the optimum cruise altitude would vary depending on the value of *σ*, and the effect of the variation of *σ* was plotted in Figure 5a. Since *ν* fell dramatically after a certain level of *σ*, an extrapolated line was drawn from a point at which the first local maximum *d*2*ν*/*dσ*<sup>2</sup> = 0 counting from *σ* = 0 was located at *σ* = 1.4. The linearly extrapolated segment was named a marginally acceptable error level (m-*σ*). The MOCA value with original TRA approaching towards *σ* = 0 fell dramatically after *σ* = 1.4 but the one with m-*σ* TRA gradually fell until *σ* = 0, adapting the trends in the previous solution segments. The modified approach added a feasible tendency for the low-*σ* region.

**Figure 5.** The effect of different σ on the MOCA (**a**) and the corresponding MOCA for the minimum TTC objective (**b**) of Aircraft 1. (**a**) The AEL and the m-σ TRA line segment were plotted against the MOCA, and along the TRA line, respectively. The optimum cruise altitude to achieve absolute specific ground range (SGR) from Ref. [9] was illustrated as a star (black). The m-*σ* TRA value and the absolute maximum SGR value from the reference have an almost identical fuel-saving optimum cruise altitude. (**b**) The altitude 10.91 was the predicted minimum FC cruise altitude with m-σ TRA. The corresponding altitude along the minimum TTC trajectory is achieved with σ = 1.1. AEL, acceptable error level, σ; MOCA, multi-objective cruise altitude; TRA, terminal residual analysis; SGR, specific ground range.

The m-*σ* TRA at *σ* = 0 resulted in the minimum fuel, optimum cruise altitude of 10.91 km. This value was close to the optimum cruise altitude of 10.64 km from the Ref. [9] for the absolute maximum specific ground range (SGR). The difference in the determined MOCA of the present study to the Ref. [9] was 2.5%. When the optimum cruise altitude MOCA of 10.91 km was considered, the corresponding *σ* value for Aircraft 1 was close to 1.1 in Figure 5b. It meant that a transition in the flight mode from minimum FC to minimum TTC was possible at about 11 km, with just additional fuel usage of 1.1%. The details of this argument were further discussed in Section 4.3.

#### *3.3. Optimized Climb Trajectory to Given Altitudes*

The climb trajectories of minimum FC and TTC were analyzed by plotting the individual trajectory curves by imposing equally spaced altitude values (Figure 6). The properties of altitude *z*, fuel consumption (FC), Mach number *M*, cost index (CI), flight path angle *γ*, and angle of attack *α* were plotted. All results similar trends of diverging solutions curves from one another at a certain near-intersecting point and the dramatic differences between the trajectories after the bifurcation. One exception was *M* in Figure 6g, where the final solution set was identical in both objectives. It may be because of fixed boundary conditions for the final speed of the aircraft (*V* = 295 [m/s]) and the same target altitude. The equation for *M* is *M* = *V*/*d*, where *d* is the speed of sound, which was constant at the given elevations, hence making the calculated final *M* in both objectives equivalent.

**Figure 6.** Climb path trajectories of: altitude *z*, fuel consumption (FC), Mach Number *M*, cost index (CI), flight path angle *γ*, angle of attack *α* in terms of time *t*, *M*, and *z* for Aircraft 1 at the altitudes of interval of 2 km from 2 to 20 km. (**a**) Time against *z*; (**b**) time against FC; (**c**) time against *M*; (**d**) time against CI; (**e**) time against *γ*; (**f**) time against *α*; (**g**) *M* against *z*; (**h**) *z* against FC.

#### *3.4. Optimized Trajectory to MOCA*

As shown in Figure 7, the altitude-specific, optimized trajectories at the minimum FC and TTC demonstrated similar patterns of overlapping line segments during the initial stage of the climb. Hence, the MOCA specific, minimum FC climb paths were plotted in Figure 7, where MOCA was approximated to be 11 km (which was 10.91 km). Similar to Figure 7, the properties of altitude *z*, fuel consumption (FC), Mach number *M*, cost index (CI), flight path angle *γ*, and angle of attack *α* were plotted. Specifically, *z* continuously increased until it reached the desired MOCA (Figure 7a), and FC showed an identical trend in Figure 7b,h. *M* increased steeply until a value of 0.9 in Figure 7c, which then increased to 1.0 at the end of the trajectory. Figure 7g had a similarity with Figure 7c for having *M* in relation. *γ* and *α* varied continuously over the course of the trajectory in Figure 7e,f. CI in Figure 7d also changed over time.

**Figure 7.** Climb path trajectories of: altitude *z*, fuel consumption (FC), Mach Number *M*, cost index (CI), flight path angle *γ*, angle of attack *α* in terms of time *t*, *M*, and *z* for Aircraft 1 at the multiobjective cruise altitude (MOCA) of 11 km. (**a**) Time against *z*; (**b**) time against FC; (**c**) time against *M*; (**d**) time against CI; (**e**) time against *γ*; (**f**) time against *α*; (**g**) *M* against *z*; (**h**) *z* against FC.

#### **4. Discussion**

#### *4.1. Effectiveness of Terminal Residual Analysis (TRA) and Modified TRA*

The minimum FC and TTC trajectory solutions were generated, and the values at *tE* were plotted to show the gradual increase in minimum FC and TTC to the given altitude (Figure 3a). The trends in the ascension were similar in both trajectories but diverged from a certain altitude (Figures 3 and 6). Using the novel residual method proposed in this study, TRA, an acceptable error level *σ* was selected to be 1, which acted like a terminal residual criterion (Figure 4). In this specific application on the determination of the multi-objective cruise altitude, the residuals abruptly increase from max(*ω*(*z*)), which gave TRA-determined altitude, MOCA, satisfying the given multi-objectives. TRA initially failed to provide feasible solutions at lower *σ* values, and a modified m-*σ* TRA was proposed, which linearly extrapolated the optimized solution curve towards *σ* = 0. It took account of only the points before the first local maximum of *d*2*ν*/*dσ*<sup>2</sup> near the turning point, where *ν* represents the MOCA. Substituting the fuel-saving cruise altitude value obtained from m-*σ* TRA to the original TRA argument yielded the desired MOCA values denoting the required additional fuel usage from the minimum FC cruise altitude to achieve the minimum FC and TTC cruise altitude.

The extrapolated value from m-*σ* TRA was 10.91 km at *σ* = 0, and this value was almost equivalent to the cruise altitude of 10.64 km for absolute maximum specific ground range (SGR) from Ref. [9]. The authors believe that this was a very close estimation with computational simulation as the value from Ref. [9] was based on the accumulated, regressed statistical result of more than 200,000 actual flight data. Hence, TRA had proven its value in finding the optimum aircraft cruise altitude achieving minimum FC, which then could be implemented to acquire the minimum FC and TTC MOCA value with the supplemental method, m-*σ* TRA.

The continuous climb path in the present results was similar to the fuel consumption model in Ref. [21]. Ref. [21] adopted a CCO model to optimize fuel consumption during the climb, which introduced external influences such as crosswind. The accuracy was 96%, and the maximum amount of fuel saved was 12%. The current study also had a continuous climb path with reliable atmospheric model and aircraft aerodynamic data showing a difference of 2.5% in the altitude solution. While the model in Ref. [21] considered various external factors such as crosswind, our study did not employ any external factors in the calculation. Hence, the present study is significant in two aspects: first, the proposed novel methods, TRA and m-σ TRA, were robust even without the consideration of external factors such as crosswind, and second, such external factors were not significant in the determination of the optimized performance of long-range flight. The latter, especially, would be valid as Ref. [9] already suggested that 46.8% of 200,000 flight data already had less than 1% benefit from the optimization.

Additionally, the MOCA value within *σ* = 2.0 in the m-*σ* TRA line, fell below 12 km (Figure 5a), leading to the MOCA range of 10.91 km to 11.97 km. The optimum cruise altitudes determined in the statistical results of Refs. [9,51] were 10.64, 11.19, 11.67, and 11.46 km, which implies that the altitude range calculated in the present study was appropriate.

#### *4.2. Difference in TRA and Modified TRA*

A newly proposed method, TRA, was modified into m-*σ* TRA as the original TRA with *σ* below a certain level changed abruptly. Such abrupt change indicated that *σ* was critical in determining the multi-objective goal in this study. The residual value below the MOCA of 11.5 km was nearly constant, making a low *σ* criterion below 1.4% ineffective. The linearly extrapolated value of minimum FC at *σ* = 0 was validated with Ref. [9], as discussed in Section 4.1. Hence m-*σ* could also be an alternative approach for such cases of significantly low *σ*.

#### *4.3. Optimum Altitude MOCA with Minimum FC and TTC*

The altitude determined with the m-*σ* TRA method at *σ* = 0 was the MOCA only with minimum FC objective. As described in Section 3.2, this approach incorporated with the TRA could be utilized to determine the MOCA. MOCA satisfied both the minimum FC and TTC at any altitude with the additional fuel usage denoted as *σ*. The initial selection of *σ* = 1 was to find the cruise altitude showing the potential fuel reduction within 1%, which eventually was determined to be 10.43 km, and its difference to the altitude 11.68 km, selected on m-*σ* TRA, seemed relatively large concerning only a difference of 0.4 in the value of *σ*. Interestingly, the difference in altitudes became minimum with increasing *σ* (Figure 5). This result emphasized the difficulties in achieving both objectives simultaneously for an optimal altitude, which varies even with the slightest changes in *σ*.

Another interesting point here is that the minimum FC altitude, 10.91 km, was about 0.8 km lower than the MOCA at *σ* = 1.4 (11.68 km). As mentioned in Section 1, a climb to a higher altitude takes advantage of lower air density for reduced aerodynamic drag but consequently consumes extra fuel for ascension. Hence, cruising at the MOCA at *σ* = 1.4 may enjoy the minimum FC travel with considerably reduced travel time (TT) due to reduced aerodynamic drag, but the same at the MOCA at the adjusted *σ* = 1.1 may enjoy the fuel-economy even with higher aerodynamic drag than the former. In detail, the MOCA with the minimum FC and TTC could be achieved at an altitude of 10.91 km with an additional fuel usage of 1.1% of the fuel used for minimum fuel climb to an altitude of 10.91 km. It implies the potential for flight mode transition between the single-objective, minimum FC, and the multi-objective, minimum FC and TTC. With this argument, an aircraft cruising at an altitude of 10.91 km could switch the flight mode from the minimum FC to the minimum FC and TTC with the extra fuel usage of 1.1%. Likewise, minimum FC and TTC cruise mode could be achieved at an altitude of 11.68 km with the additional fuel usage within 1.4% of the minimum FC cruise mode. The MOCA results of different s values provided quantitative explanations for the theory and the transition criterion for the flight mode between single-objective, the minimum FC, and the multi-objective, the minimum FC and TTC. Additionally, it also demonstrated that the fuel-economy may not always be achieved just by cruising at higher altitudes.

#### *4.4. Individual Trajectory and Variable Cost Index (CI)*

The trajectory solution at the determined MOCA of 10.91 km shows the trajectory of a supersonic jet (Figure 7). These graphs clearly show the relationships between the variables and parameters in this study, as described in Section 3.4. In the initial segment of the climb path, the aircraft accelerated by increasing *T*, which increased both *V* and *M* (Figure 7c). Throughout the whole trajectory, a fluctuated to make stable transitions in g, which resulted in a continuous and smooth climb path of the aircraft in terms of *z* (Figure 7a), FC (Figure 7b,h), *M* (Figure 7c), and CI (Figure 7d).

Interestingly, CI in (Figure 7d) varied over time. As mentioned in Section 1, numerous literatures targeting for multi-objective optimization of TOC usually employ a model with constant CI throughout a flight trajectory [4,6,8]. It may be due to the difficulties involved in the estimation of actual CI or an attempt to reduce the number of variables to solve in complex total cost equation such as:

$$\mathbf{C}\_{TOT} = \int\_{0}^{T\_{flight}} fbr(t) \, dt + 60 \cdot \mathbf{CI} \cdot T\_{flight} \tag{54}$$

where *CTOT* is the total cost, CI is the cost index as defined in this study, *Tflight* is the cruise segment flight time, and *f br*(*t*) is the time-dependent aircraft fuel-burn rate function. This equation was re-written from Equation (6) of Ref. [52] by Dancila, B. D., et al. [8]. Given the number of variables involved, a range of constant CI values definitely would have made the problems more manageable. On the contrary, CI was not consistent throughout a flight path in this study (Figure 7d). Considering the realistic aspect of an actual flight path, the variation in CI during a flight is a more convincing phenomenon. This variation implies that the present approach was able to describe more pragmatic phenomena in aircraft motion.

#### *4.5. Limitations*

The first limitation is the use of aerodynamic data of a supersonic aircraft from Ref. [12] to find a multi-objective optimum cruise altitude. The selection of the optimum cruise altitude is a necessity in the economic management of airliners, and in most cases, the aircraft is subsonic. The use of a supersonic aircraft model may not be suitable to determine general cruise altitude, but as seen in Figure 7d, *M* remains subsonic before reaching the cruise altitude. Such probably may have made the MOCA result in the present study similar to the statistically optimum cruise altitude of commercial airplanes. There also was lack of available data for subsonic aircraft in terms of thrust, Mach number and altitude. Such data was necessary for climb trajectory optimization. With the inadequacy in the available data, the authors tried to maintain the feasibility of the approach and obtained confident results for cruise altitude determination of a long-range flight. Overall, a more refined study could be conducted using the aerodynamic data of a subsonic aircraft.

The second limitation may be the applicability of the present methodology to determine the optimum cruise altitude for all-range flight. As mentioned in Section 1, Aircraft 1 and 2 are different in their specifications, especially in their initial weight and maximum thrust. This difference made the authors speculate Aircraft 1 to be the heavy, long-range plane for the former and lightweight, short-range plane for the latter. The results in Figure 8 clearly shows the difference where the present approach failed to achieve reasonable cruise altitude but only showed the potential to indicate the costs for the transition between two objectives. The present methodology may only apply to the cruise altitude determination of long-range flight, but since such flights require cruise altitude optimization the most [9], our approach could be a feasible solution for a cost-minimizing strategy.

**Figure 8.** The effect of different σ on the MOCA (**a**) and the corresponding MOCA for the minimum TTC objective (**b**) of Aircraft 2. (**a**) The AEL and the m-σ TRA line segment were plotted against the MOCA, and along the TRA line, respectively. The AEL, *σ*, is plotted against multi-objective cruise altitude (MOCA) *ν*, and linearly extrapolated m-*σ* TRA is also drawn along the terminal residual analysis (TRA) line. (**b**) The altitude 10.91 km was the predicted minimum FC cruise altitude with m-σ TRA of Aircraft 1, and the corresponding altitude along the minimum TTC trajectory in Aircraft 2 is achieved with *σ* < 6.0. AEL, acceptable error level, σ; MOCA, multi-objective cruise altitude; TRA, terminal residual analysis.

This study proposed TRA and a modified TRA (m-*σ* TRA) to determine an optimum cruise altitude satisfying minimum FC and TTC. Despite the promising results for longrange flight, further investigation would be necessary whether this approach is also suitable in other multi-objective optimization problems. The multi-objective optimization of aircraft trajectory problems may be the only problem solvable using the methods proposed in this

study. Hence, this approach may need further validation in various optimization problems in future studies.

#### **5. Conclusions**

Multi-objective determination of cruise altitude of a supersonic aircraft was conducted using the Hermite-Simpson method. Individual optimum climb trajectories were generated in the discretized problem domain. A novel approach, TRA, was proposed with modified TRA, m-*σ* TRA, to select the optimum cruise altitude with the minimum FC and TTC, where *σ* also worked as a criterion to represent the magnitude of the transition between the single- or multi-objective flight mode. As a result, a multi-objective cruise altitude (MOCA) was determined to be 10.91 km for aircraft 1, which was validated with the statistical results of subsonic, commercial airliner data. The method presented in this study was found reliable in the multi-objective problem to determine the optimum cruise altitude of a long-range flight, achieving both minimum FC and TTC. Although various assumptions were used, this approach confirmed the complex multi-objective solution in aircraft cruise altitude problems in an environment formulated as realistic as possible. Further studies would be needed to verify this technique in other applications to validate its utility in other fields requiring multi-objective optimum solutions.

**Author Contributions:** Conceptualization, methodology, software, validation, formal analysis, investigation, resources, data acquisition, visualization, conclusion, and writing–original draft preparation, T.K.; writing–review, and editing, T.K., J.R.; supervision, project administration, and funding acquisition, J.R. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was supported by the National Research Foundation of Korea(NRF) grant funded by the Korean government(MEST)(No. 2019R1A2C1087763), and the Chung-Ang University Research Scholarship Grants in 2019.

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

#### **Abbreviations**

The following abbreviations are used in this manuscript:


#### **References**


### *Article* **Mathematical Approach to Improve the Thermoeconomics of a Humidification Dehumidification Solar Desalination System**

**Rasikh Tariq 1,\*, Jacinto Torres Jimenez 2, Nadeem Ahmed Sheikh <sup>3</sup> and Sohail Khan <sup>4</sup>**


**Abstract:** Water desalination presents a need to address the growing water-energy nexus. In this work, a literature survey is carried out, along an application of a mathematical model is presented to enhance the freshwater productivity rate of a solar-assisted humidification-dehumidification (HDH) type of desalination system. The prime novelty of this work is to recover the waste heat by reusing the feedwater at the exit of the condenser in the brackish water storage tank and to carry out the analysis of its effectiveness in terms of the system's yearly thermoeconomics. The developed mathematical model for each of the components of the plant is solved through an iterative procedure. In a parametric study, the influence of mass flow rates (MFRs) of inlet air, saline water, feedwater, and air temperature on the freshwater productivity is shown with and without the waste heat recovery from the condensing coil. It is reported that the production rate of water is increased to a maximum of 15% by recovering the waste heat. Furthermore, yearly analysis has shown that the production rate of water is increased to a maximum of 16% for June in the location of Taxila, Pakistan. An analysis is also carried out on the economics of the proposed modification, which shows that the cost per litre of the desalinated water is reduced by ~13%. It is concluded that the water productivity of an HDH solar desalination plant can be significantly increased by recovering the waste heat from the condensing coil.

**Keywords:** desalination; humidification-dehumidification; waste heat recovery; mathematical model; yearly analysis; thermo-economics

#### **1. Introduction**

Water covers almost 71% of the total Earth's surface [1]. Sea contains 97% of the total water of the Earth [2] and the remaining 3% is stored in the form of rivers, glaciers, underground water storage, and lakes, etc. The freshwater is not evenly distributed in the world, as some geography near the equator has less availability of freshwater. The seawater contains a large number of salts. Therefore, it is not feasible to be used for household, agricultural, or commercial purposes [3]. Considering this aspect, desalination is an important need of the human being. In this regard, Manju et al. [4] provided an extensive review of the need for a desalination system to overcome future freshwater demand for India. Among many desalination processes [5], some can be energy inefficient, costly, and/or can have environmental impacts (CO2 emissions and other dangerous byproducts as referenced by [6]) depending on the design parameters [7].

The use of solar radiation is undergoing intensive research for the desalination process [5] since solar energy is a low-grade heat source considering the exergetic useful-

**Citation:** Tariq, R.; Jimenez, J.T.; Ahmed Sheikh, N.; Khan, S. Mathematical Approach to Improve the Thermoeconomics of a Humidification Dehumidification Solar Desalination System. *Mathematics* **2021**, *9*, 33. https://dx.doi.org/10.3390/ math9010033

Received: 24 June 2020 Accepted: 15 October 2020 Published: 25 December 2020

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/ licenses/by/4.0/).

ness [8]. In this aspect, Reif et al. [9] focused on the desalination system powered by solar energy and reviewed its potential and challenges. Considering the need of the modern world, Giwa et al. [10] proposed recent advances in the solar-assisted humidificationdehumidification (HDH) type desalination system in terms of improved design and productivity. Afterwards, Kabeel et al. [11] and Hamed et al. [12] developed an experimental setup for the solar power HDH type of desalination system. Kabeel et al. [11] concluded that the condenser with a cylindrical shell and corrugated fins led to an increase in the rate of heat transfer, the cellulose of 5 mm gives higher productivity as compared to the usage of cellulose of 7 mm under both natural and forced flow circulation. Whereas, Hamed et al. [12] concluded that average productivity of the desalination unit is 22 litres per day with an estimated cost of 0.0578 USD per litre, the best operating time during the day is between 1 and 5 pm, and the productivity of the unit increases as the temperature of the water which is entering the humidifier is increased. Balaji et al. [13] carried out the numerical analysis of HDH desalination system by developing code in 'C' language to study the performance for various operating conditions. Their results have indicated that increasing the mass flow rate of air increases the gain-output-ratio and they reported that the economic feasibility of the system is in the lower range because no external sources were used.

Zhani et al. [14] also developed a prototype of a solar-assisted HDH desalination system and tested it for the weather conditions of Tunisia during the summer season (June, July, and August). They concluded that their proposed system is quite efficient technically, however it lacks in economic efficiency. Owing to the requirement of a large surface area for solar energy collection, Elminshawy et al. [15] proposed to run the desalination system using two energy sources i.e., solar as well as a low-grade heat source. Elminshawy et al. [15] also developed an analytical model and the results were compared with the experimental results. It was concluded that the cost of the water is 0.014 USD per litre, and this corresponds to a fuel-saving equivalent to 1844 kg per hour.

Narayan et al. [16] evaluated the potential of a solar-driven humidification- dehumidification desalination plant for small-scale decentralized water production, presented [17] the thermodynamic analysis of desalination cycles, introduced [18] an experimental investigation on the thermal design of humidification dehumidification desalination system, and also presented [19] a thermodynamic balancing of HDH desalination by mass extraction and injection. The authors, in their reference work [17], concluded that the air-heated cycles reported in the literature are insufficient, a dehumidifier is more vital than the humidifier to the performance of a conventional water-heated cycle, and the varied pressure systems can have a better performance than a single pressure system. The authors, in their reference work [18], summarized that, for a water-heated closed-air-open-water humidification, a dehumidification system without any mass extraction represents a maximum gained-output-ratio. Similarly, the authors in their reference work [19] concluded that the uncertainty of the final results with the approximation of the air being saturated to all the points in the humidification and dehumidification process seems to be reasonably small based on the boundary layer data from Thiel and Lienhard [20].

Summers et al. [21] presented a comparison of the energy efficiency of a single-stage membrane distillation desalination cycles in various configurations and reported that the rate-limiting processes and their impact on gained-output-ratio can be determined from the development model, and a single-stage vacuum membrane distillation is inherently limited by the low temperature of condensation which results from the reduction in pressure. McGovern [22] presented the performance limits of zero and single extraction humidification-dehumidification desalination systems and reported that the usage of an ideal gas model for water vapour and the air is highly accurate to model HDH systems, the influence of salinity at 35,000 parts per million is to reduce the change in moist air humidity ratio and enthalpy by approximating 1% and 3%, respectively, for a feed temperature of 25 ◦C and a top air temperature of 70 ◦C.

Mistry et al. [23] carried out an entropy generation analysis of desalination technologies, including multiple effect distillation, HDH, reverse osmosis, mechanical vapour compression, membrane distillation, and multistage flash, and also presented [24] the effect of entropy generation rate on the performance indicators, i.e., gained output ratio, of HDH desalination cycles. In summary, the authors in reference work [24] has reported that for any given cycle, there is a specific mass flow rate ratio that simultaneously minimizes the entropy generation rate and maximizes the gained-output-ratio; in other words, it corresponds that the minimization of specific irreversibility leads to peak performance.

Sharqaw et al. [25] presented the exergy calculations of seawater with applications in desalination systems and reported that the ideal mixture models give flow exergy values that are far from the actual ones and the exergetic efficiency can differ by 80% for some cases, and in another article, Sharqaw et al. [26] also presented the optimum thermal design of such desalination systems and reported that the optimum mass flow rate ratio is always greater than unity, as increasing the effectiveness of the humidifier and dehumidifier increases the recovery ratio almost linearly, and the higher maximum temperature can yield a higher gained-output-ratio.

Some authors like Khalifa et al. [27] carried out experimental and theoretical research on water desalination using a direct contact membrane distillation. The authors developed an analytical model based on heat and mass transfer equations and utilized it to predict the temperature difference across the membrane surfaces and then calculating the vapour pressure difference leading to the permeate flux. It was noted that the productivity of the system is very promising since a permeate flux of 100 kg/m2·h was achieved at 90 ◦C for hot feed side and 5 ◦C for cold side steam.

Several researchers also carried out investigations to integrate the desalination unit with thermal energy storage. In this case, Summers et al. [28] proposed the design and optimization of an air heating solar collector with phase changing material integrated with an HDH desalination plant. A two-dimensional transient finite element method was developed, and it was reported that a layer of phase-changing material of 8 cm below the absorber plate is sufficient to produce a consistent output temperature yielding a thermal efficiency of 35%. Moreover, the phase changing material can produce consistent air outlet temperature throughout the day or night.

Several other researchers integrated the desalination unit with other types of energy systems. In a work of Sulaiman et al. [29], the authors integrated the desalination plant with a parabolic trough solar air collector and evaluated two configurations of open-water open-air desalination units with collector installed before the humidifier or between the humidifier and dehumidifier. It was reported that the second configuration with the collector between the humidifier and the dehumidifier has much more advantages than the other configuration. Whereas the gained-output-ratio of the first and second configuration were 1.5 and 4.7, respectively. In a work of Lawal et al. [30], the authors integrated the HDH desalination system with a heat pump and concluded that the maximum gain-output-ratio of 8.88 and 7.63 is obtained at 80% components effectiveness using a mass flow rate ratio of 0.63 and 1.3 for modified air heated and water heated cycle, respectively.

Gabrielli and Mazzotti [31] presented a solar-driven HDH process for water desalination analyzed and optimized via an equilibrium theory and concluded it as an immediate tool for easily determining the optimal system operation. Gabra et al. [32] presented the mathematical models for the components constructed using CARNOT toolbox in a MAT-LAB environment and the results have shown that FOPID (fractional-proportional–integral– derivative) controlled offers a superior dynamic and static performance and reported that it can be automatically adjusted to compensate the weather changes.

As noted, significant research has been conducted on solar-assisted HDH desalination systems focusing on various design improvements with an objective to enhance the thermoeconomics of the system. One of the works in the performance and cost-effectiveness of a solar-driven humidification-dehumidification desalination system is presented by Zubair et al. [33] in which the capital cost. including supply well, equipment costs, and building costs, were considered. A multi-location (six locations in Saudi Arabia) analysis has concluded that the highest annual output is noted for Sharurah and lowest for Dhahran. Similarly, Jamil et al. [34] also reported the thermoeconomics of desalination system and concluded that the levelized cost of water production can be variable for various type of desalination system, for example, the production cost of reverse osmosis, mechanical vapour compression, multi-effect evaporation/desalination, multistage flash, and thermal vapour compression are 0.9 ± 0.3\$/m3, 1.0 ± 0.5\$/m3, 1.5 ± 0.5\$/m3, 2.0 ± 0.5\$/m3, and 2.7 ± 0.8\$/m3, respectively. Likewise, Jamil et al. [34] presented that the hybrid desalination plants like energy recovery devices along with the reverse osmosis can have the lowest water production cost at 0.7 ± 0.2\$/m3, leading us to the conclusion that further system improvement is needed to cope with the uncertain water security situation in the future.

One of the improvement can be related with the internal heat recovery mechanisms within the same desalination system and Xu et al. [35] has emphasized that the ongoing research on HDH desalination system has demonstrated that the internal heat recovery is a significant and potential method for improving the system performance and reducing the freshwater cost. Strictly speaking, conventionally, the HDH systems are driven by a low-grade heat source in the form of a waste heat recovery from another energy system. However, in this work, the authors are emphasizing the waste heat recovery option within the processing circuit of the desalination plant. Although, in literature, some research is available on different types of waste heat recovery procedures either with integration with another external energy resource or from an internal resource. However, this area needs more research to fully understand the potential and benefits of internal waste heat recovery.

Therefore, in this work, an opportunity of waste heat recovery is identified in HDH desalination and the system behaviour is reported with and without this waste heat recovery. The waste heat is recovered from the condenser coil by supplying it back to the hot water tank. Although, a variety of research is available on different strategies and methodologies of waste heat recovery within the system and/or integration with other energy systems; nevertheless, no research is focused on the practical thermoeconomic benefits of the HDH desalination plant with waste heat recovery from the condenser coil. The summary of various waste heat recovery in desalination plants is reported in Table 1 along with the identified gaps with the literature, thus highlighting the novelty of the work. Additionally, the waste heat recovery from the system would influence the system performance. However, it would also be a subject to the local conditions, either in terms of climate to influence the thermal indicators or in terms of economic conditions to influence the levelized cost of water production. Therefore, it is very important to realize the analysis of the desalination plant considering the local climatic and economic conditions. This aspect is still missing in the literature and needs more research. Another pivot point of the analysis is that a single-day demonstration of the waste heat recovery in the desalination plant might not be enough (see Table 1 as most of the analysis is based on a selected duration), because the solar integration makes the performance transient. Therefore, a yearly analysis demonstrating the pros and cons of the internal waste heat recovery has quite a significance. Therefore, in conclusion from this discussion, and based on the identified literature gaps, there is still a need to strengthen the research area of the yearly demonstration of waste heat recovery considering the local climatic and economic conditions to fully understand the gain of the system. A checklist is included in Figure 1, highlighting various literature gaps in the literature along with the novelty of the work.


**Figure 1.** Checklist of various identified literature gaps which are addressed in this work contributing towards its novelty.

In this work, using a mathematical model and simulations for actual solar irradiance, assessment of improvements in the productivity of the proposed system is presented. The improvement in the HDH system is proposed in terms of recovering waste energy from the feed water at the exit of the dehumidification part of the system. Usually, water leaving the condenser has relatively higher enthalpy. The prime novelty of this work is to present a yearly thermoeconomic analysis of the solar-assisted humidification dehumidification desalination plant by recovering the energy from the wasted feed water enthalpy while considering the local conditions.

Here, the proposed solar-assisted HDH desalination system utilizes the feed water at the exit of the condenser/dehumidification coil by reusing it in the brackish water storage tank. This allows the waste heat recovery (WHR) for the HDH desalination system and lessens the requirement of secondary energy sources. The governing mathematical model for the flat-plate solar collector, humidification chamber, and dehumidification chamber is solved through an iterative procedure [36]. The mass and energy balance on the brackish water storage is also solved including waste heat recovery from the condensing coil. A parametric study in which the influence of mass flow rate (MFR) of inlet air, saline water, feedwater, and temperature of the air on the freshwater productivity with and without waste heat recovery is conducted. Moreover, a yearly assessment of the proposed HDH system is also carried out to study the impact of waste energy recovery. In this regard, the data of the Taxila city (Pakistan) are used for solar irradiance over the complete year. A comparison of solar-assisted HDH desalination system with and without waste heat recovery is presented for the complete year; thereby indicating the impact of energy recovery. An economic analysis is also presented to reflect the advantages of waste heat recovery in terms of the cost of the desalinated water.



different than the current one.


**Table 1.** *Cont.*



**Table 1.** *Cont.*


**Table 1.** *Cont.*

#### **2. System Description**

A schematic diagram of the desalination system working on humidification and dehumidification along with waste heat recovery from the condenser/dehumidification section is presented in Figure 2. Saline water is pumped into the solar collector (state 2) from brackish water storage (state 1). Water is heated in the solar collector and re-enters the heated brackish water storage at state 3.

**Figure 2.** Desalination system scheme with waste heat recovery process (the description of the state numbers 1–12 is discussed in Section 2).

Afterwards, the salty water is pumped to the humidification section from state 4 to 5 where it comes in direct contact with the ambient air entering at state 7. Depending on the climatic conditions, ambient air blown through the humidification chamber at state 7 where it absorbs moisture from the falling film of water. The saturated moist air leaves the humidification section at state 8, whereas the remaining salty water is re-circulated to the brackish water storage. The corresponding psychometric description of this process is presented in Figure 2a1 in which the air leaves at the saturation conditions [49].

The moist air at state 8 enters the dehumidification section where feed/cooling water is circulated at a relatively high flow rate to facilitate dehumidification. As a result, fresh condensed water is collected in a tank at state 12, and the air leaves the system to the environment. The corresponding dehumidification process is described on a psychometric chart as in Figure 2a2 [49].

The feed water at exit 11 of the dehumidification section has relatively high enthalpy because it receives heat from the humid air. In this work, the heat from this feed water is recovered by supplying it back to the brackish water storage tank.

There can be many practical ways to collect the condensed water from the dehumidification section. For instance, in other configurations of thermal desalination, Patel et al. [52] and Nayi et al. [53] have shown that an outlet pipe supported with a trough placed inside assembly of a solar still can be used and finally the condensed water can be collected in a beaker outside. In a theoretical and experimental study of seawater desalination based on humidification-dehumidification technique, Mohamed et al. [54] have demonstrated that the freshwater can be collected at the bottom of the condensation coil for a vertical section. In another work, Rajaseenivasan et al. [55] presented an experimentally verified HDH system with a dual-purpose collector and employed a horizontal flow shell-and-tube heat exchanger with the condensed water collected at the bottom from the end of the dehumidifier. Another configuration is demonstrated by Xu et al. [56] in which a novel enhanced HDH method with weakly compressed air and internal heat recovery based on traditional mechanical vapour compression is developed in which the moist air is used as a working fluid instead of a vapour. In this experimentally developed configuration [57], the freshwater is extracted from the evaporator-condenser assembly having airflow in the horizontal direction.

#### **3. Mathematical Model**

The thermal performance of the solar-assisted desalination plant is evaluated by developing a mathematical [58] expression of the components involved such as solar collector, brackish water storage, humidifier [59], and dehumidifier.

#### *3.1. Flat Plate Solar Collector*

Ioan Sarbu and Calin Sebarchievici [60] have reported that the flat-plate collectors are the heart of any solar energy collection system designed for operation in the lowtemperature range (less than 60 ◦C) [60] or the medium temperature range (less than 100 ◦C) [60]. It is used to absorbed solar energy, convert it into heat, and then to transfer that heat to a stream of liquid (as in this case). They use both direct and diffuse solar radiations [60], do not require tracking of the sun [60], and require little maintenance [60]. They are mechanically simpler than concentrating collectors [60]. The major applications of these units are in solar water heating, building heating, air conditioning, and industrial process heating [60]. For quasi-steady-state conditions [61] at a given solar time, along with other standard assumptions [62–64], the following energy balance equation can be written

$$Q\_u^s = A\_c^s \left[ S^s - \mathcal{U}\_L^s \left( T\_p^s - T\_{amb} \right) \right] = A\_c^s F\_R^s \left[ S^s - \mathcal{U}\_L^s \left( T\_2^s - T\_{amb} \right) \right] = m\_{w,1}^s c\_{p,w} \left( T\_3^s - T\_2^s \right) \tag{1}$$

where:

$$F\_R^s = \frac{m\_{w,1}^s c\_{p,w}}{A\_c^s L\_L^s} \left[1 - \exp\left(\frac{A\_c^s L I\_L^s F^\rho}{m\_{w,1}^s c\_{p,w}}\right)\right] \tag{2}$$

$$F^{\mathfrak{s}} = \left[ \mathcal{W}^{\mathfrak{s}} \mathcal{U}\_{L}^{\mathfrak{s}} \left( \frac{1}{\mathcal{U}\_{L}^{\mathfrak{s}} \left[ D^{\mathfrak{s}} + (M^{\mathfrak{s}} - D^{\mathfrak{s}}) \mathcal{F}^{\mathfrak{s}} \right]} + \frac{1}{\pi D\_{i}^{\mathfrak{s}} h\_{\mathfrak{c}, \mathfrak{w}}^{\mathfrak{s}}} \right) \right]^{-1} \tag{3}$$

$$F^s = \frac{\tanh[\zeta^s (M^s - D^s)/2]}{\zeta^s (M^s - D^s/2)} \tag{4}$$

$$\mathcal{L}^s = \sqrt{\frac{\mathcal{U}\_L^s}{k\_p^s t\_p^s}}\tag{5}$$

The temperature of the absorber plate is calculated through an iterative method by the solution of Equations (1)–(5) coupled with:

$$T\_p^s = T\_2^s + \frac{Q\_u^s / A\_c^s}{F\_R^s L\_L^s} (1 - F\_R^s) \tag{6}$$

The total absorbed solar radiation (*S*) is evaluated by considering the beam and diffused components of incident solar radiation along with the incorporation of optical losses (i.e., transmittance-absorptance product).

$$S^s = I\_b^s (\tau \mathfrak{a})\_b^s + I\_d^s (\tau \mathfrak{a})\_d^s \tag{7}$$

The transmittance-absorptance product is calculated separately for beam and diffused radiation.

$$(\tau a)^{s}\_{b,d} = \frac{\tau^{s}\_{b,d} a^{s}\_{p}}{1 - \left(1 - a^{s}\_{p}\right) \mathfrak{R}^{s}} \tag{8}$$

Fresnel's expressions [61] are derived for the reflection of unpolarized radiation passing from medium 1 to medium 2 with different refractive indexes given the angle of incidence and refraction for the parallel and perpendicular components of the beam and diffused radiation. This procedure gives two Fresnel's expressions of the beam and diffused radiation with averaged parallel and the perpendicular component of each one, and finally, it is used to calculate the transmissivity of solar radiation from the glass cover to the absorber plate.

Along with that, the incident angle for direct radiation is the angle of incidence, given by:

$$\cos\theta\_b^s = \sin\delta^s \sin\phi^s + \cos\delta^s \cos\phi^s \cos\omega^s \tag{9}$$

Afterwards, Snell's law [61] is utilized to obtain the refractive angles from the glazing. By taking into account the top heat loss coefficient only, the overall heat loss coefficient *Us top* is computed as follows.

$$\mathcal{L}I\_{top}^s = \left[\frac{1}{h\_{c,\emptyset-a}^s + h\_{r,\emptyset-a}^s} + \frac{1}{h\_{c,p-\emptyset}^s + h\_{r,p-\emptyset}^s}\right]^{-1} \tag{10}$$

The bottom and side heat loss coefficients are considered negligible. Practically, it can be made possible through the usage of insulation materials which can be glass mineral roll [65], rice husk and sunflower stalks [66], petiole piece, fibres and gypsum [67], and mineral wool [68]. The convective heat transfer coefficient is calculated using [61,69]:

$$h\_a^s = 5.7 + 3.8v\_a^s \tag{11}$$

The method proposed in [70] is used to compute the Nusselt number between the absorber plate and the glass cover.

$$Nu\_{p-\mathcal{G}}^{s} = 1 + \left[ \left( \frac{Ra\_{p-\mathcal{G}}^{s}}{5830} \right)^{1/3} - 1 \right]^{+} + 1.44 \left[ 1 - \frac{1708}{Ra\_{p-\mathcal{G}}^{s}} \right]^{+} \tag{12}$$

The radiative heat transfer coefficient is given by:

$$h\_{r,p-\mathcal{g}}^{s} = \frac{\sigma \left(T\_p^s + T\_{\mathcal{g}}^s\right) \left(T\_p^{s^2} + T\_{\mathcal{g}}^{s^2}\right)}{\left(1/\varepsilon\_p^s\right) + \left(1/\varepsilon\_{\mathcal{g}}^s\right) - 1} \tag{13}$$

#### *3.2. Water Storage Tank*

In this research study, the feed water of the dehumidifier is being re-used in the brackish water storage, therefore, a mass and energy balance is of key importance. A mass and energy balance applied on the storage tank yields:

$$m\_3 + m\_6 + m\_{11} - m\_1 - m\_4 = 0\tag{14}$$

$$m\_3h\_3 + m\_6h\_6 + m\_{11}h\_{11} - m\_1h\_1 - m\_4h\_4 = 0\tag{15}$$

#### *3.3. Humidifier*

The humidification section consists of a falling film of water with accompanying airflow. It is assumed that the process is quasi-steady with negligible heat loss. The falling film is an assumed laminar with a smooth liquid-gas interface. Figure 3 shows a typical element in the humidifier section with accompanying zones. The mean velocity of a falling film is calculated using the following equation [71]:

$$
\mu\_w^h = \frac{\rho\_w g \delta\_w^2}{3\mu\_w} \tag{16}
$$

With the thickness of the falling film, given by [72]:

The energy balance equation is [72,73]:

$$
\mu\_w^h \frac{\partial T\_w^h}{\partial z} = \alpha\_w \frac{\partial^2 T\_w^h}{\partial y\_2^2} \tag{18}
$$

The solution of Equation (18) requires the following boundary condition [73]:

$$\left. \alpha\_w \frac{\partial T}{\partial y} \right|\_{y=0} = -\alpha\_s \left. \frac{\partial T\_w}{\partial y\_2} \right|\_{y\_2=0} + \frac{\lambda \mathcal{W}\_j}{\rho\_s c\_{p,a}} \tag{19}$$

Eams [74] predicted the water evaporation rate as shown in Equation (20).

$$\mathcal{W}\_{\dot{\jmath}} = \varepsilon \ast \left( P\_{\sharp} - P\_{\upsilon} \right) \sqrt{M / 2 \,\pi R T\_n} \tag{20}$$

Knudson constant of evaporation [75] *ε*∗ is written in terms of the coefficient of evaporation:

$$
\varepsilon\* = \frac{2\varepsilon}{2-\varepsilon} \tag{21}
$$

whereas the coefficient of evaporation is calculated using [74]:

$$
\varepsilon = h \ast \sqrt{\frac{2\pi R T\_s}{M}} \frac{T\_s}{\rho\_v \lambda^2} \tag{22}
$$

Considering the evaporation affecting the heat transfer coefficient *h*∗, the concept of wet bulb coefficient of heat transfer as proposed by MacLaine-Cross and Banks [76] can be used to correct the heat transfer coefficient. It can be written as:

$$h\* = h \left[ 1 + \frac{e\lambda}{\mathbb{C}\_{pa}} \right] \tag{23}$$

where *e* is derived from the wet-bulb coefficient, given by [76]:

$$
\varepsilon = \frac{\omega\_{\text{max}} - \omega\_{\text{min}}}{T\_{\text{max}} - T\_{\text{min}}} \tag{24}
$$

#### *3.4. Dehumidifier/Condenser Section*

The efficacy of the condenser, modelled as a counter-flow concentric heat exchanger, is computed using NTU (Number of Transfer Units) method [77–79] which is used to calculate the rate of heat transfer in heat exchangers when there is an insufficient data to evaluate the Log-Mean-Temperature-Difference [77–79].

Therefore, in NTU method, the effectiveness of the heat exchanger is calculated which can be converted into the actual heat transfer of the heat exchanger. It also involves the calculation of minimum heat capacity (*Cmin*) and maximum heat capacity (*Cmax*) which can be either heat capacity of the cold fluid or the hot fluid depending on whichever can be minimum or maximum. The evaluation of *U* is carried out using the thermal resistance diagram by computing the convective heat transfer coefficient of the humidifier and feed water. Once the actual heat transfer is calculated, it can be used to evaluate the outlet temperatures of both steam and finally, the mass balance can give the quantity of the condensed fresh water. This methodological framework is presented in a stepwise format as in Figure 4.

**Figure 4.** The methodological framework for the analysis of the dehumidifier.

#### *3.5. Auxilary Equations*

The auxiliary equations aids in the extraction of the temperature-dependent thermophysical properties of different fluids. These are mostly empirical equations and their usage in this work was practised with precaution in which the limit of each model is verified with the database of Engineering Equation Solver [80] before the final implementation.

The thermal conductivity of the dry air is given by [81]:

$$k\_a = -4.937787 \times 10^{-4} + 1.018087 \times 10^{-4} T\_a - 4.627937 \times 10^{-8} T\_a^2 + 1.250603 \times 10^{-11} T\_a^3 \tag{25}$$

The thermal conductivity of the water vapour is given by [81]:

$$k\_{\upsilon} = 1.3 - 46 \times 10^{-2} - 3.756191 \times 10^{-5} T\_{\text{d}} + 2.217964 \times 10^{-7} T\_{\text{a}}^2 + 1.111562 \times 10^{-14} T\_{\text{a}}^3 \tag{26}$$

The thermal conductivity of the humid air is given by [81]:

$$k\_{humid-air} = \frac{\left(\frac{1}{1 + 1.608\omega}\right) K\_a M\_a^{1/3} + \left(\frac{\omega}{\omega + 0.622}\right) K\_v M\_v^{1/3}}{\left(\frac{1}{1 + 1.608\omega}\right) M\_a^{1/3} + \left(\frac{\omega}{\omega + 0.622}\right) M\_v^{1/3}}\tag{27}$$

The latent heat of vaporization is given by [82]:

$$i\_v = 3483181.4 - 5862.7703T + 12.139568T^2 - 0.0140290431T^3 \tag{28}$$

The specific heat of dry air is given by [81]:

$$c\_a = 1045.356\_a + 0.0007083814T\_a^2 - 2.705209 \times 10^{-7}T\_a^3 - 0.3161783T \tag{29}$$

The specific heat of water vapour is given by [81]:

$$\mathcal{L}\_{\upsilon} = 1360.5 + 2.31334 T\_a - 2.46 \times 10^{-10} T\_a^5 + 5.9 \times 10^{-13} T\_a^6 \tag{30}$$

Finally, the specific heat of humid air is calculated using [81]:

$$
\mathcal{L}\_{humid-air} = \mathcal{c}\_a + \omega \mathcal{c}\_v \tag{31}
$$

The dynamic viscosity of dry air in terms of the temperature is given by [81]:

$$
\mu\_a = 2.287973 \times 10^{-6} + 6.259793 \times 10^{-8} T\_a - 3.131956 \times 10^{-11} T\_a^2 + 8.15038 \times 10^{-15} T\_a^3 \tag{32}
$$

The dynamic viscosity of water vapour is given by [81]:

$$
\mu\_{\upsilon} = 2.562435 \times 10^{-6} + 1.816683 \times 10^{-8} T\_{\mathfrak{a}} - 2.579066 \times 10^{-11} T\_{\mathfrak{a}}^2 - 1.067299 \times 10^{-14} T\_{\mathfrak{a}}^3 \tag{33}
$$

Finally, for the humid air, the dynamic viscosity is [81]:

$$
\mu\_{humid-air} = \frac{\left(\frac{1}{1 + 1.608\omega}\right)\mu\_d M\_a^{0.5} + \left(\frac{\omega}{\omega + 0.622}\right)\mu\_v M\_v^{0.5}}{\left(\frac{1}{1 + 1.608\omega}\right)M\_a^{0.5} + \left(\frac{\omega}{\omega + 0.622}\right)M\_v^{0.5}}\tag{34}
$$

#### **4. Benchmarking of Simulation Results**

The benchmarking of the current simulation results is accomplished by comparison with the experimental and the simulation results of Dai et al. [75] without considering the waste heat recovery of the feedwater from the condensing coil. A solar desalination study having humidification and dehumidification processes, both mathematically and experimentally, was presented. All of the conditions considered by Dai et al. [75] are codified in MATLAB simulation and the desired results are obtained. The initial conditions for this benchmarking are: inlet temperature of the air is 35 ◦C, inlet relative humidity is 40%, MFR of saline water is 1500 kg/h, the NTUs of condensing coil are 4, the MFR of cooling coil is 2500 kg/h, and the incident solar radiation is 700 W/m2. The humidifier is 0.6m long and has a cross-sectional area of 0.56m2. Considering these input parameters in the developed code, the compliance between the current simulation results and the simulation results of Dai et al. [75] are shown in Figure 5 in which the variation in water productivity is shown with changing MFR of working air along with different water film temperature. A maximum discrepancy of 2.33% is observed between both simulation results. The discrepancy is caused by the advanced modelling of solar collector adapted by the authors as compared to the relatively simplified mathematical model of [75]. It is to be stressed here that the feed water recirculation (waste heat recovery) [83] is not included for this comparison to fully replicate the conditions of [75].

The results of the simulation study are also benchmarked by comparison with the experimental results of Dai et al. [75]. A comparison is carried out for two cases. For the case, I, the MFR of air is 615.6 kg/h, and the ambient relative humidity is 54%. For case II: the MFR of air is 661.8 kg/h, and relative humidity is 49%. For both cases: the ambient air temperature is ~22 ◦C, the feedwater temperature is ~19 ◦C, the MFR of saline water is 2310 kg/h and the MFR of feed water in condensing coil is 3780 kg/h. Here it is stressed that the authors of [75] replaced the solar collector by a boiler to obtain quick lab results during experimentation. The authors of the current work carried out analysis by considering the solar collector. Subsequently, an analysis is also carried out by solving the boiler as a heat input. The analysis considering boiler and solar collector along with experimental data of [75] for each of the case I and case II is shown in Figure 6a,b. It can be observed here that the water productivity level for the solar collector is lower than the

experimental data points because the heat loss coefficient (UL) for the solar collector case is contributing significantly which was absent in the experimental setup of [75]. However, the water productivity level for the case in which the authors simulated the boiler is higher than the experimental data points because of the assumptions considered in Section 3.3. Based on this discussion, the maximum discrepancy observed for this benchmarking is ~8% for both cases as reported in Figure 6a,b which is a plot between the temperature of saline water and water productivity level.

**Figure 5.** Benchmarking of simulation results by comparison with simulation results of Dai et al. [75] without waste heat recovery.

**Figure 6.** Comparison of simulation results with the experimental results of Dai et al. [75] for (**a**) case I, (**b**) case II, without waste heat recovery.

#### **5. Results and Discussion**

This work aims to recover the heat from the condensing coil. Therefore, in this section, different parameters are varied to observe their effect on freshwater productivity with and without the waste heat recovery.

#### *5.1. Mass Flow Rate (MFR) of Inlet Air Effect on Freshwater Production*

The intake of MFR of air is an important parameter in a desalination unit because it determines the blowing power. Therefore, simulations are carried out to observe the influence of MFR of air on water productivity with and without waste heat recovery from the condensing coil and it is presented in Figure 7.

**Figure 7.** Effect of MFR of air on freshwater productivity with and without waste heat recovery.

It is observed that the water productivity is increased with the increase in MFR of air because the tendency of moisture transfer increases; therefore, water productivity attains a maximum value at 500–800 kg/h of MFR of air. However, water productivity decreases significantly after 1100 kg/h of MFR of air. It is because very high values of MFR of air do not give sufficient time to an air in the humidification section to cause effective evaporation; therefore, as a result, the water productivity decreases. Dai et al. [75] recommended a range of 500–800 kg/h of the MFR of air for the HDH desalination unit, which can be also observed here. It is also observed that elevating the temperature of the saline water also increases the productivity of freshwater. However, it is deduced from Figure 5 that recovering the heat from the condensing coil by reusing the feedwater in the brackish water storage significantly increases the freshwater productivity. It is reported that ~14% of freshwater productivity is increased for an MFR of 800 kg/h by waste heat recovered from the condensing coil at a saline water temperature of 85 ◦C.

#### *5.2. Mass Flow Rate (MFR) of Saline Water Effect on Freshwater Production*

Several simulations are carried out to observe the effect of MFR of saline water on freshwater productivity from the dehumidifier/condenser. It can be observed from Figure 8 that an increase in the MFR of the saline water increases the water production rate. It is because a high MFR of saline water contributes to a high Reynolds number, thus increasing the heat transfer coefficient between the water and air mixture in the humidification section, which yields higher values of water productivity. It can also observe that increasing the saline water temperature increases the freshwater productivity. Since the mass transfer coefficient is a strong function of temperature, therefore, it contributes towards a more effective mass transfer of water vapours to air. Furthermore, it is observed that the freshwater productivity also increases by waste heat recovered. Here, an increase of ~15% in water productivity is reported by waste heat recovery from the condensing coil for a saline water MFR of 1800 kg/h at a water film temperature of 85 ◦C.

**Figure 8.** Effect of MFR of saline water on water production with and without waste heat recovery.

#### *5.3. Mass Flow Rate (MFR) of Feedwater Effect on Freshwater Productivity*

The MFR of cooling water in the condensing coil is changed from 1200 kg/h to 4000 kg/h and its influence on freshwater productivity is studied. The simulation was carried out on three different values (1, 2, and 4) of NTU of the condensing coil. The influence of waste heat recovery is also presented here.

It can be witnessed in Figure 9 that the hourly freshwater production is directly proportional to the MFR of the cooling water because its increment decreases the surface temperature of the condenser which can increase condensation rate. Furthermore, water productivity is increasing with the increase in the NTU of the condensing coil. A higher value of NTU corresponds to a higher value of the overall heat transfer coefficient in the condensing coil. Therefore, it increases the actual heat transfer; and as a result, the hourly freshwater production is increased. Furthermore, here it is shown that the hourly production rate of freshwater is increased to 10% by waste heat recovered from the condensing coil at an MFR of cooling water of 4000 kg/h.

**Figure 9.** Effect of MFR of cooling water on freshwater productivity with and without waste heat recovery.

#### *5.4. Effect of the Temperature of the Air on Freshwater Productivity*

In this section, a simulation is carried out to study the effect of the ambient air temperature on the freshwater productivity. These results are important as they will govern the applicability of the desalination unit. Since this desalination unit is working on humidification principle; therefore, the ambient air conditions are crucial. The behaviour is reported in Figure 10.

**Figure 10.** Influence of temperature of the air on freshwater productivity with and without waste heat recovery.

It is observed that the hourly freshwater production rate is directly proportional to the ambient temperature of air because the increment in it enhances the heat and mass transfer characteristics in the humidification chamber. Furthermore, it is reported that the freshwater production rate is also directly proportional to the relative humidity at the exit of the humidification chamber (state 8). This is because higher relative humidity at the exit of the humidification section indicates a small difference between the dry bulb and the dew point temperature of the air which is an assertive parameter towards condensation. It is also reported here that the hourly freshwater production rate is increased to ~11% by waste heat recovered from the condensing coil at an ambient air temperature of 45 ◦C at full saturation conditions at the exit of the humidification chamber.

#### *5.5. Yearly Analysis of Freshwater Productivity with and without Waste Heat Recovery*

In this section, an analysis is carried out to observe the freshwater productivity rate yearly. As the plant uses solar radiation for heating, therefore its actual output will be important for different days of the year. For this purpose, the selected day of each month is used for the calculation of flat-plate solar collectors. Table 2 shows the representative day of each month [84] that is selected to carry out an analysis. Selected data such as ambient temperature, ambient relative humidity, and velocity for analysis purposes are reported in Table 2. The solar radiation data, including total incident, beam, and diffuse radiation for Taxila, is presented in Figure 11.


**Table 2.** Parameters for the calculation of water productivity.

**Figure 11.** Distribution of total, beam/direct, and diffused solar radiation.

Figure 12 shows the yearly freshwater productivity from the solar-assisted desalination HDH plant with and without waste heat recovery from the condensing coil. The lower freshwater production rate is observed for April and May. Although a significant amount of solar radiation is experienced in these months (Figure 11) but the region of Taxila (33.745833, 72.7875) experiences high wind velocities in these months. Therefore, it increases the overall heat transfer coefficient of the solar collector, which yields lower water production rates. The highest freshwater production rate is observed for July where the incident radiation is maximum, and the wind velocities are low. The water production rate in November, December, January, and February are relatively high. Even though low ambient temperatures are observed in these months, but relatively higher values of incident radiation and lower wind velocities are observed; therefore, the water production rate is also relatively

high. The water production rate in August is low because Taxila experiences very high humidity this month; therefore, it decreases the potential of the humidification process in the desalination unit. One important phenomenon can be observed from Figure 12 that the water production is high for each month of the year if the waste heat from the condensing coil is recovered. It is reported here that the freshwater productivity is increased by ~16% for June by recovering the waste heat from the condensing coil.

**Figure 12.** Yearly freshwater production rate with and without waste heat recovery.

#### **6. Economic Assessment**

Kaya et al. [6] carried out a levelized cost analysis for solar-energy-powered seawater desalination in the Emirate of Abu Dubai and considered multi-stage flash and multi-effect distillation coupled with thermal power plants while mentioning that these thermal desalination methods are responsible for more than 90% of the desalination capacity in the Emirate. The findings of the article [6] suggest that the analysis considering the levelized cost of water for a combination of solar PV and a reverse osmosis system is technologically well-positioned in terms of cheap and clean desalination systems. The authors of reference [6] considered total capital cost, annual energy consumption with a required solar energy system to balance a zero in the grid along with the chemical costs and overhead cost yielding a final levelized cost of water. A similar approach is adopted here in which the economic assessment involves an estimation of the levelized cost of water production using the total cost of ownership method, which involves capital cost, maintenance cost, energy cost, and salvage value. This process is depicted in Figure 13.

The following variables are considered for the economical assessment. Solar collector: The thickness of the glass cover is 3 mm, the emittance of the glass is 0.88, the refractive index of glass is 1.526, the refractive index of air is 1, the absorptance factor of the absorber plate is 0.94, the extinction coefficient of the glass is 32 m−1, the area of absorber plate is 1.5 m2, the number of tubes are 20, having an effective length of 20 m, while the spacing between the tubes is 50 mm, with each tube thickness of 1 mm, having an outdoor diameter of 10 mm, and the mass flow rate of water at the inlet of the solar collector is 0.005 kg/s. Humidifier: The length of the section is 1 m with a width of 600 mm and a height of 20 mm, the total mass flow rate is 0.05 kg/s. Dehumidifier: The total heat transfer surface area is 1.5 m2, the temperature of water at the inlet of the condenser is 20 ◦C, the feed water mass flow rate is 0.01 kg/s, the inner diameter of tubes is 5 mm, the total number of tubes are 20 having an effective length of 10 m, and the shell diameter is 200 mm. Turbomachinery: The isentropic efficiency of pumps and blowers is 0.85, the mechanical efficiency of pumps

is 0.96, and the mechanical efficiency of blowers is 0.90. Based on these data, the total initial cost of the system including the land and the equipment cost is estimated from the local manufacturers and comes out to be 18,000 PKR.

**Figure 13.** A framework of life-cycle-cost analysis adapted for the economic assessment of the desalination plant.

For an interest rate of 4%, and a life expectancy of 10 years, the capital recovery factor is given by:

$$CRF = \frac{i(1+i)^n}{(1+i)^n - 1} \tag{35}$$

The first annual cost can be calculated using the initial cost, and the capital recovery factor, given by:

$$\text{First Annual Cost} = 180,000\\\text{PKR} \times \text{CRF} \tag{36}$$

The maintenance cost is considered 5% of the first annual cost. The total running cost of the equipment involves the annual energy consumption given by:

$$\text{Annual Energy Consumption} = \text{365} \times \left( \text{W}\_{pump} + \text{W}\_{\text{llower}} \right) \times t \tag{37}$$

The energy consumption of the pump *Wpump* is calculated by considering the enthalpy difference times mass flow rate corrected by its mechanical efficiency, and it is given by [85]:

$$\mathcal{W}\_{pump} = \frac{m(H\_{out} - H\_{in})}{\eta\_m} \tag{38}$$

where *m* is the mass flow rate (kg/s) of water in the section, *H* is the enthalpy (kJ/kg) and *η<sup>m</sup>* is the mechanical efficiency of pump which is considered 0.96 [86]. The blower *Wblower* is calculated by considering the pressure drop and it is given by [87]:

$$\mathcal{W}\_{blover} = \frac{\mathcal{Q} \times \Delta P}{\eta\_0 \times \eta\_1} \times \mathbb{C} \tag{39}$$

The details of the parameters used in Equation (39) is given as follows:

1. The pressure drop is calculated by considering the hydraulic calculation formulas, and it is given by:

$$
\Delta P = \frac{ff}{\text{Re}} \cdot \frac{L}{d\_\ell} \cdot \frac{\rho u^2}{2} \tag{40}
$$

where *f f* is the friction factor, Re is the non-dimensional Reynolds number, *L* is the effective length of the channel, *de* is the hydraulic diameter, *ρ* is the density of air, and *u* is the averaged velocity of the channel calculated using the ratio of volume flow rate per unit cross-sectional area. These parameters are calculated for humidifier and dehumidifier section differently and finally, the aggregation of both pressure differences gives the total pressure difference. The friction factor (*f f*) is given by the empirical formula:

$$ff = 96\left[1 - 1.3553AR + 1.9467AR^2 - 1.7012AR^3 + 0.9564AR^4 - 0.2537AR^5\right] \tag{41}$$

The aspect ratio is a comparison between the shorter and the longer side of the cross-section of the air channel given by:

$$AR = \frac{\text{Shorter dimension of the cross} - \text{section of air channel}}{\text{Longer dimension of the cross} - \text{section of air channel}} \tag{42}$$


For an industrial rate of the cost of electricity at 12 PKR/kWh, the annual running cost is 8,176,000 PKR. The salvage value is calculated using the sinking fund factor, given by:

$$SRF = \frac{i}{\left(1 + i\right)^n - 1} \tag{43}$$

Finally, the total annual cost is calculated using the balance of life cycle costs, given by:

$$\begin{array}{rcl} \text{Total Annual cost} & = & \text{First Annual Cost} + & \text{Annual Maximumec Cost} \\ & + & \text{Annual Runtime Cost} - & \text{Annual Sales Value} \end{array} \tag{44}$$

With this methodology, the production cost of desalinated water is 17.16 PKR/litre (0.15 USD/litre) without waste heat recovery and it is 14.85 PKR/litre (0.13 USD/litre) with waste heat recovery. Therefore, the production cost of the water is decreased by ~13% by recovering the waste heat from the condensing coil.

#### **7. Conclusions**

In this research paper, a simulation is carried out for the humidification-dehumidification (HDH) type of desalination system in which the emphasis is given to the performance of the plant by recovering the heat from the condensing coil by reusing the feed water in the brackish water storage tank. The feedwater is recirculated because it has relatively high enthalpy as it absorbs energy in the dehumidification process of air. The mathematical model of the system is simulated, and the results are validated by comparing them with the previously published experimental and numerical results without waste heat

recovery. Afterwards, an extensive parametric study is conducted in which MFR of inlet air, saline water, feedwater, and the temperature of ambient air are varied. It is observed that; for all cases, the freshwater productivity rate is increased to a maximum of 15% by recovering the heat from the condensing coil. The yearly analysis of freshwater was carried out and it is observed that the freshwater productivity is increased to a maximum of ~16% in June. Furthermore, economic analysis has demonstrated that the cost of desalinated water is decreased by ~13% by recovering the heat from the condensing coil and it is 0.13 USD/litre. It is concluded that the proposed system enhances the performance of an existing HDH desalination system.

However, this work is a theoretical analysis of the waste heat recovery from the condenser of the desalination system, which is finally a physical connection, in the form of piping and tubing, from the dehumidifier to the storage tank. This piping can contribute to some practical limitation in the cycle and other studies considering the 'design for manufacturing and assembly' are suggested before the mass-scale production.

**Author Contributions:** Conceptualization, R.T., and N.A.S.; methodology, R.T., and N.A.S.; software, R.T.; validation, R.T. and N.A.S.; formal analysis, R.T., J.T.J., N.A.S., and S.K.; investigation, R.T., J.T.J., N.A.S., and S.K.; resources, J.T.J.; data curation, R.T.; writing—original draft preparation, R.T.; writing—review and editing, R.T., J.T.J., N.A.S., and S.K.; visualization, R.T.; supervision, N.A.S.; project administration, S.K.; funding acquisition, J.T.T. All authors have read and agreed to the published version of the manuscript.

**Funding:** Tecnológico Nacional de México / Instituto Tecnológico Superior de Huauchinango, Av. Tecnológico No. 80, Col. 5 de Octubre, Huauchinango 73173, Puebla, México.

**Acknowledgments:** The first author, Rasikh Tariq, is thankful for the financial support granted by CONACYT ('*Consejo Nacional de Ciencia y Tecnología*' as in Spanish); with the following details CVU no. 949314, scholarship no. 730315, to pursue a postgraduate degree in *Universidad Autónoma de Yucatán*, Mexico. The authors are thankful for the financial support of *Instituto Tecnológico Superior de Huauchinango*. The second author, Jacinto Torres Jimenez, is thankful to CONACYT for the SNI ('*Sistema Nacional de Investigadores*' as in Spanish) system.

**Conflicts of Interest:** The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.


#### **Nomenclature**


#### **References**


### **A Novel Comparative Statistical and Experimental Modeling of Pressure Field in Free Jumps along the Apron of USBR Type I and II Dissipation Basins**

#### **Seyed Nasrollah Mousavi <sup>1</sup> and Daniele Bocchiola 2,\***


Received: 7 September 2020; Accepted: 29 November 2020; Published: 3 December 2020

**Abstract:** Dissipation basins are usually constructed downstream of spillways to dissipate energy, causing large pressure fluctuations underneath hydraulic jumps. Little systematic experimental investigation seems available for the pressure parameters on the bed of the US Department of the Interior, Bureau of Reclamation (USBR) Type II dissipation basins in the literature. We present the results of laboratory-scale experiments, focusing on the statistical modeling of the pressure field at the centerline of the apron along the USBR Type I and II basins. The accuracy of the pressure transducers was ±0.5%. The presence of accessories within basinII reduced the maximum pressure fluctuations by about 45% compared to basinI. Accordingly, in some points, the bottom of basinII did not collide directly with the jet due to the hydraulic jump. As a result, the values of pressure and pressure fluctuations decreased mainly therein. New original best-fit relationships were proposed for the mean pressure, the statistical coefficient of the probability distribution, and the standard deviation of pressure fluctuations to estimate the pressures with different probabilities of occurrence in basinI and basinII. The results could be useful for a more accurate, safe design of the slab thickness, and reduce the operation and maintenance costs of dissipation basins.

**Keywords:** basinI; basinII; mean pressure head; pressure head with different probabilities of occurrence; standard deviation of the pressure fluctuations; statistical modeling; USBR

#### **1. Introduction**

Hydraulic jump with the turbulent entrainment process is a function of time and position. This phenomenon is a complex and stochastic process, so that hydrodynamic pressure fluctuations can be analyzed using statistical methods. Energy dissipation through the hydraulic jumps with the conversion of energy downstream of spillways is usually confined within the dissipation basins [1]. This type of hydraulic structure protects the soil against flow erosion, which can affect the dam's safety. Due to the large heads upstream of spillways, dissipation basins may be subjected to enormous instantaneous pressure and velocity fluctuations, causing significant stresses in such energy dissipators. This may cause the uplift of a basin lining, making it necessary to provide this structure with sufficient weight or anchorage. Through the analysis of collected data, it is possible to characterize the forces under a hydraulic jump according to the values of mean pressures, pressure fluctuations, and extreme pressures [2].

US Department of the Interior, Bureau of Reclamation (USBR) Type II dissipation basins [3] are designed to reduce excess kinetic energy downstream of the spillway [4–10], reduce largely (≈30%) the required length compared to smooth basins [11], and help in reducing the costs of the structure [12]. Furthermore, knowledge of the geometric characteristics of the hydraulic jump is fundamental for the

design of the dissipation structures. Measurement of fluctuating pressures or forces may be difficult to carry out in the field or at the scale of real structures. Overall, there is a lack of information concerning the hydrodynamic loading on the bottom slabs. Little systematic experimental investigation seems available for Type II dissipation basins, and only a general understanding of the hydraulic behavior is attained [13]. A better understanding of the distribution of pressure fluctuations may lead to a more economical design with high safety of energy dissipation structures.

Toso and Bowers [14] stated that the peak value of the pressure fluctuations intensity coefficient (*C <sup>P</sup>*) varies up to 60% when comparing results from different works. It seems that these differences were related to the degree of development (larger or smaller) of the flow boundary layer. Accordingly, the fully developed flows show lower values of *C <sup>P</sup>* than undeveloped ones. Endres [15] developed a real-time acquisition system and treatment of data representative of the instantaneous pressure fields in a hydraulic jump by analyzing instantaneous pressures downstream of a spillway. Pinheiro [16] measured the pressure fields inside the hydraulic jump downstream of a spillway. He concluded that the pressure fields near the bottom and along the hydraulic jump are lower than the corresponding depth of the mean flow. Marques et al. [17] measured pressures within a dissipation basin with the smooth bed downstream of a spillway. They proposed a dimensionless methodology that groups the fluctuating pressures with different incident Froude numbers (Fr1) in a single trend, being a function of the jump position. The values of Fr1 used by Endres [15], Pinheiro [16], and Marquez et al. [17] were in the range of 4.2 to 8.6, 6 to 10, and 5 to 8, respectively. Based on the pressure data by Enders [15], Teixeira [18] proposed second-order polynomial relationships for estimating different pressure parameters in smooth dissipation basins.

According to Alves [2], the measurement of fluctuating pressures is highly influenced by laboratory conditions. This may include the Reynolds number of flow, transducer accuracy, transducer installation method, hose length, pressure point diameter, channel width, model roughness, etc. Farhoudi et al. [19] studied the pressure fluctuations around some chute blocks in a St. Anthony Fall (SAF) type dissipation basin. Novakoski et al. [20] showed that the negative pressures in the zone near the spillway toe represent the risk of cavitation in the dissipation basin. They concluded that the extreme pressures with the probabilities of occurrence equal to 0.1% and 1% require careful assessment. Macián-Pérez et al. [21] used a numerical model to analyze pressure distributions in a USBR Type II dissipation basin. Hampe et al. [22] estimated extreme pressures in hydraulic jumps with low Froude numbers. Samadi et al. [23] used some explicit data-driven approaches to estimate the *C <sup>P</sup>* coefficient underneath hydraulic jumps on a sloping channel.

Mousavi et al. [24] focused on the minimal and maximal pressures, the pressure coefficients, the power spectral density (PSD), the probability density function (PDF), and the uncertainty analysis of the pressures along a USBR Type I basin (basinI). Mousavi et al. [25] assessed the statistical parameters of free jumps, including mean pressure (*P\* <sup>m</sup>*), the standard deviation of pressure fluctuations (σ*\* <sup>X</sup>*), the probability distribution coefficient (*NK%*), and the pressures with different probabilities (*P\* K%*) along basinI. Mousavi et al. [26] evaluated artificial intelligence models to estimate the *C <sup>P</sup>* coefficient for the free and submerged jumps at the bottom of a USBR Type II basin (basinII). The results showed the deep learning model could estimate the *C <sup>P</sup>* coefficient more accurately.

However, pressure patterns on the apron of basinII have not been widely investigated in the literature. We designed and pursued experiments to obtain some information about the effect of chute blocks and dentated end sill on the free jumps' characteristics and pressure fluctuation. Experiments were conducted in the centerline of the apron along basinI and basinII with the incident Froude numbers (Fr1) in the range of 6.14 to 8.29. In summary, the differences between the previous works and the present paper are explained as follows:


the fluctuating pressures at different pressure points and investigation of the skewness and kurtosis coefficients, *P\* <sup>m</sup>*, extreme pressures (*P\* min* and *P\* max*), σ*\* <sup>X</sup>*, *NK*%, and *P\* <sup>K</sup>*% along basinI and basinII. For reference, we benchmarked and compared our findings with previous similar results of other authors focusing on hydraulic jumps we could retrieve in the present literature.


#### **2. Materials and Methods**

#### *2.1. Experimental Setup*

In this research, the pressure field of free jumps was investigated in the hydraulic laboratory, University of Tabriz, Iran (see Figure 1). The laboratory flume used had a length of 10 m, a width of 0.51 m, and a height of 0.5 m. The channel's bed was considered in the form of a horizontal line in all experiments. An Ogee spillway of 70 cm in height (*H*) was equipped with two different configurations of the dissipation basins, designed according to the USBR criteria [3]. In addition, the accessories of basinII, including eight chute blocks (3.2 cm width, 3 cm height, and 7.94 cm length) and a dentated end sill with 6 cm height, were designed based on the maximum flow discharge. The spillway was installed at a distance of 260 cm from the entrance head tank of the flume.

We performed some experiments on basinI and basinII with different flow discharges, ranging from 33 to 60.4 L/s, and supercritical Froude numbers (Fr1) between 6.14 and 8.29. According to the USBR recommendation, the lengths of basinI (*LI*) and basinII (*LII*) were 200 and 125 cm, respectively. The width of the basins was considered equal to the width of the flume (see Figure 2). At the end of the flume, a hinged weir was used to create and stabilize the free jump position. Therefore, the hydraulic jump was positioned at the basins' beginning and contained within the basins (i.e., jump type A-jump [28]).

The subcritical flow depth (*Y*2) at the endpoint of the jumps was measured along the flume's centerline. To do this, we used a Data logic ultrasonic sensor device model US30, made in Italy with a nominal accuracy of 1 mm. The discharge in the flume (*Q*) was measured with a transit-time clamp-on ultrasonic flow meter. The values of supercritical flow depth (*Y*1) were calculated using the Bélanger's equation [27,29,30], which is defined as follows:

$$\frac{\chi\_1}{\chi\_2} = \frac{1}{2}(-1 + \sqrt{1 + 8\operatorname{Fr}\_2^2})\tag{1}$$

$$\text{Fr2} = \frac{V\_2}{\sqrt{\text{g} \times \text{Y}\_2}} \tag{2}$$

where *V*<sup>2</sup> is the mean subcritical velocity, calculated using the continuity law, Fr2 is the subcritical Froude number, and *g* is the gravitational acceleration.

**Figure 1.** Laboratory flume and experimental setup. (**a**) Hydraulic jump during an experiment, (**b**) basinII with chute blocks and dentated end sill, (**c**) Data logic ultrasonic sensor device model US30, and (**d**) pressure transducers (Atek BCT 110 series with 100 mbar-A-G1/4 model).

**Figure 2.** Dimensions of spillway and accessories installed in basinII.

To measure the (dynamic) pressure fluctuations, 25 measurement points were considered along the centerline of the apron inside and outside the basinII (see Figure 3). Pressure therein was measured by way of piezometers installed at the centerline of the apron along the basins. The position of the pressure points (*X*) was from 2.5 cm (piezometer No. 1) to 189 cm (piezometer No. 25). The instantaneous pressures were measured with pressure transducers (Atek BCT 110 series with 100 mbar-A-G1/4 model). The pressure transducers used a 6-channel digital board and have an accuracy of ±0.5% within the range of −1.0 to 1.0 m [24–26].

**Figure 3.** Distribution of the pressure points at the centerline of the apron along basinII.

Pressure transducers were calibrated before the experiments using a static pressure gauge in the laboratory. Therefore, the mean fluctuating pressures were approximately equal to the static pressures. The transducers were mounted on a support plate, placed under the bottom of the flume. Thus, it was possible to eliminate possible distortion effects in the pressure signal due to the connection with rubber hoses. The transparent plastic hoses used here had an internal diameter of 3 mm and were 200 cm in length. Hydrodynamic pressure data were measured in time series. Accordingly, some statistical methods were used to analyze the collected pressure data.

#### *2.2. Statistical Parameters*

Investigation of the pressure head (cm) parameter is a first step to describe the pressure field in the hydraulic jump. The pressure parameters at each point (*PX*) include the minimum pressure (*Pmin*), the mean pressure (*Pm*), the maximum pressure (*Pmax*), and the pressure with a certain probability of occurrence (*PK*%). Marques al. [17] proposed *P\* <sup>X</sup>* = (*PX*−*Y*1)/(*Y*2−*Y*1) for the dimensionless form of pressure parameters as a function of the dimensionless position of each point (*X\** ), defined as *X\** = *X*/(*Y*2−*Y*1), where *X* is the longitudinal position of each point inside the hydraulic jump. As the upstream part of the jump exhibited significant air bubbles, it seems that the scaling of *Y*2−*Y*<sup>1</sup> is not appropriate for the non-dimensional position of the pressure point. As a result, in the present study, the *X\** parameter was defined as *X*/*Lj*, where *Lj* is the hydraulic jump length.

Knowledge of the extreme pressure heads in the dissipation basins helps to understand the energy dissipation of the hydraulic jumps. In the present study, the extreme pressure heads (*P\* min* and *P\* max*) were investigated in detail. Marques et al. [17] proposed (σ*\* <sup>X</sup>*/ *El*) × (*Y*2/*Y*1) to analyze the dimensionless standard deviation of the pressure fluctuations at point *X*. There, *El* is energy head loss (cm) along the hydraulic jump. The experimental values of *PK%* were achieved using the pressure time series data collected at each pressure point. The statistical coefficient of the probability distribution (*NK%*) can be varied at different points of the dissipation basins. Therefore, it is necessary to determine the longitudinal distribution of *NK%* to estimate the *P\* K%* parameter with a probability to be less than or equal to a certain value (*K*) along basinI and basinII. As the estimated values of *Pm*, σ*X*, and *NK%* were determined at each point inside the basins, the values of *PK%* can be estimated using equation *PK%* = *Pm* + *NK%* × σ*\* <sup>X</sup>* [17].

In this study, a new statistical methodology was proposed to estimate the values of *P\* K%* in basinI and basinII. To evaluate the estimated values of pressure parameters, some statistical performance criteria were determined [31–34]. The PDF function of the normalized pressures along the hydraulic jumps was calculated according to *P*∗ (*Z*)=(1/ √ <sup>2</sup>π) <sup>×</sup> *Exp*(−*Z*2/2). The normalized pressure variable (*Z*) was defined as (*P*[*X*,*t*]) − *Pm*/σ*X*, where *P*[*X*,*t*] is the instantaneous pressure [35]. We pursued an analysis of the skewness and kurtosis coefficients of pressure fluctuations [36]. Due to the high variation in *S* and *K* coefficients, it is difficult to define a single statistical distribution to describe the overall behavior along the jump.

#### **3. Results and Discussion**

#### *3.1. Flow Characteristics*

Table 1 presents some experimental and calculated parameters of the flow downstream of the spillway in two dissipation basins under different free jump conditions.


**Table 1.** Experimental parameters in two dissipation basins.

<sup>1</sup> Supercritical flow, <sup>2</sup> Subcritical flow.

Re1 is the Reynolds number for the supercritical flow of the hydraulic jump. The mean velocity of the incoming flow to the dissipation basins (*V*1) was computed using the continuity law. According to Table 1, the *Y*<sup>2</sup> parameter in basinII decreases compared to those in the basinI case (classical hydraulic jump). As *Q* increases, *Y*<sup>1</sup> increases faster than *V*1. Accordingly, the Froude number reduces when increasing flow discharges. The flow conditions downstream of the spillways are different compared to the sluice gates. The *Y*<sup>1</sup> parameter has an essential role in determining the values of Fr1. Reducing Fr1 with increasing *Q* for the free jumps downstream of the spillway has been confirmed in previous similar results we were able to retrieve in the present literature [13,17,37,38].

#### *3.2. Power Spectral Density Analysis*

The power spectral density (PSD) analysis of the pressure data demonstrates the variation of the PSD parameter in a wide range of frequencies. According to Figure 4, the maximum values of the amplitude corresponding to the dominant frequency decrease by increasing distance from the jump toe. The results indicated that the maximum variation of the PSD parameter in free jumps within basinII was achieved at frequencies less than 5 Hz. It should be noted that the PSD analysis of the fluctuating pressures for different points of basinI with free jumps has been studied by Mousavi et al. [24]. The minimum frequency of pressure transducers is considered to be almost twice the dominant frequency of the signal in the literature [39]. In the present study, a pressure data collection frequency of 20 Hz for 90 s was used for each pressure point. The maximum amplitude at low frequencies along the free jumps indicates large-scale vortices, which is due to the dominance of gravitational forces [40]. Therefore, the Froude law is valid for modeling fluctuating pressures in free jumps.

**Figure 4.** Power spectral density (PSD) analysis of fluctuating pressures for basinII (Fr1 = 6.14).

#### *3.3. Probability Density Function*

In this section, the *P\* (Z)* parameter is plotted as a function of the normalized pressure level (*Z*). Furthermore, the appropriate probability distributions for each pressure point are compared with the normal distribution. The PDF histograms of pressure fluctuations at some points on the bed of basinII in free jumps are shown in Figure 5. In addition, the PDF function of the fluctuating pressures for different points of basinI with the free jumps has been previously investigated by Mousavi et al. [24]. The results indicate that the PDF function does not follow the normal distribution at different points along the free jumps, especially for the initial points of basinII. In other words, the *S* and *K* coefficients do not match with the normal distribution values.

**Figure 5.** *Cont.*

**Figure 5.** Probability density function (PDF) histograms of fluctuating pressures at some points of basinII (Fr1 = 6.14): (**a**) point 1; (**b**) point 8; (**c**) point 11; (**d**) point 21; (**e**) point 22; (**f**) point 25.

According to Fiorotto and Rinaldo [35], positive pressure fluctuations at the beginning of the basins have a relatively high frequency compared to negative pressure fluctuations. In this zone, the *S* coefficient has positive and maximum values, and the PDF curve tail is drawn to the right. The *K* values are more than the normal distribution, and the PDF curve is drawn upwards at these points.

At the characteristic point of *X\* <sup>d</sup>* (point of expected flow detachment), the frequency of positive and negative pressure fluctuations is almost identical, and *S* ≈ 0 (pressure point No. 11). At this point, pressure values distribution is somewhat similar to the normal distribution. For point No. 21, located at *X\* <sup>r</sup>* (endpoint of the roller), the *S* coefficient has negative values. Also, the *K* coefficient is greater than the normal distribution value. For points located at *X\* <sup>j</sup>* (endpoint of the hydraulic jump), the *S* values tend to move towards zero, and the data somewhat follow the normal distribution. Pressure point No. 25 is outside basinII, and it has a normal distribution. The flow energy of the incoming jet is dissipated after passing through the roller point of the jump, and the uniform flow is established almost downstream of the basin. Due to the presence of accessories in basinII, all the considered characteristic points are closer than in the absence of such structures.

#### *3.4. Extreme Pressures*

Figure 6 represents variations of the dimensionless minimum, mean, and maximum (scaled) pressures (*P\* min*, *P\* <sup>m</sup>*, and *P\* max*) as a function of *X\** in basinII and basinI for different values of Fr1. It is observed that the *P\* min* data reach lower values and have more significant fluctuations concerning the *P\* m* data at the position nearest to the spillway toe (probably due to the incidence of flow in the basin).

**Figure 6.** Distribution of the experimental and estimated values of *P\* <sup>X</sup>*: (**a**) basinII; (**b**) basinI.

The *P\* min* data reach negative values around −0.2 approximately at *X\** ≤ 0.20 for basinII, and of −0.4 at *X\** ≤ 0.30 for basinI, increasing with oscillations after that. This may indicate zones subject to low pressure, which may be associated with erosion or cavitation processes. Therefore, basinII is more reliable than basinI in terms of the possibility of cavitation. At the position of *X\* <sup>j</sup>*, *P\* min* data begin to oscillate near the value 1.0 and slightly lower. Concerning the values of *P\* max*, the higher and more disparate values versus the *P\* <sup>m</sup>* values occur near the spillway, caused by the direct impact of the flow jet on the dissipation basins. The values of extreme pressures in basinII are lower than those for basinI. There is a narrower pressure range in basinII compared to basinI. The results indicate that *P\* max* seemingly decreases with the increasing Froude number, with *P\* <sup>m</sup>* and *P\* min* somewhat constant, in the explored range. Using the results obtained in the present study by adjusting the values of *P\* X*, including *P\* min*, *P\* <sup>m</sup>*, and *P\* max*, a new second-order rational expression was developed for basinII and basinI. Equation (3) is valid for 0 < *X\** ≤ 1.85 in basinII and 0 < *X\** ≤ 1.30 in basinI. According to Figure 6, one can estimate *P\* <sup>X</sup>* using Equation (3). The values of α, β, γ, and δ to estimate *P\* <sup>X</sup>* for basinII and basinI are provided in Table 2.

$$P\_X^\* = \frac{\alpha + \beta \, X^\*}{1 + \gamma \, X^\* + \delta \, X^{\*2}} \tag{3}$$


**Table 2.** Coefficients of α, β*,* γ, δ, and the statistical performance criteria to estimate *P\* X*.

*\** Dimensionless value.

#### *3.5. Standard Deviation of Fluctuating Pressures*

The σ*\* <sup>X</sup>* parameter is a function of the flow discharge and the pressure point position relative to the beginning of the jump. In Figure 7, increasing flow discharge (i.e., decreasing Froude number) results in σ*\* <sup>X</sup>* increasing. As *Q* increases, the dynamic energy increases, and the fluctuating component of pressure (*P* ) increases as well, indicating the turbulence intensity of the flow. Along the jump, σ*\* <sup>X</sup>* increases to a maximum value, in the range of *<sup>X</sup>\** ≤ 0.33 for basinI and basinII, and decreases after that. It seems that the main factors for the fluctuations of pressures along the jump are turbulent flow, eddies formation, and their movement during the jump. Therefore, in some positions, the interaction of eddies and the basin bed causes a sudden increase in the bed pressure.

Figure 7b shows a comparison of the σ*\* <sup>X</sup>* values in the case of basinI with the results obtained by Pinheiro [16] and Marques et al. [17] for free jumps. It is seen that our study displays similar patterns to their work. However, in the downstream zone of the basin, σ*\* <sup>X</sup>* values are relatively higher than the results obtained by others. This is likely to be linked to the determination of *Y*<sup>1</sup> and *Y*<sup>2</sup> and identification of the initial position of the hydraulic jump. The σ*\* <sup>X</sup>* values for the smooth bed (basinI) are greater than in basinII with blocks. Accordingly, the presence of accessories within the hydraulic jumps significantly decreases σ*\* <sup>X</sup>*. Figure 7 demonstrates the values of σ*\* X max* for different Froude numbers in basinII and basinI. A high value of σ*\* X max* may indicate a considerable variation of the dynamic pressures on the bottom slab, damaging the structure. According to Figure 7, as the Froude number (Fr1) increases, the intensity of pressure fluctuations decreases. According to Teixeira [18], the average value of σ*\* X max* in a smooth basin was about 0.7.

As seen in Table 3, one has σ*\* X max* ≈ 0.50~0.68 for basinII, and σ*\* X max* ≈ 1.02~1.20 for basinI, similarly for all Froude numbers. Accordingly, the values of σ*\* X max* in basinII decreased down to about −45% compared with basinI for the free jumps. The *X\** σ*max* position in the presence of the blocks and end sill is closer to the spillway toe. The accessories on the bed of basinII may cause the jet to be spread or submerged. Due to the presence of chute blocks at some points, the bottom of basinII does not collide directly with the jet due to the hydraulic jump. Consequently, the values of pressure and

pressure fluctuations decrease mainly therein. Figure 7 illustrates the σ*\* <sup>X</sup>* values for different Froude numbers in basinI and basinII.

**Figure 7.** Distribution of the experimental and estimated values of σ*\* <sup>X</sup>*: (**a**) basinII; (**b**) basinI.


**Table 3.** Range of σ*\* X max* values and the position of *X\** σ*max*.

We optimized Teixeira's method [18] to assess σ*\* <sup>X</sup>* for basinII and basinI. A new second-order rational expression was developed in the range of 0 <sup>&</sup>lt; *X\** ≤ 1.85 for basinII and 0 <sup>&</sup>lt; *X\** ≤ 1.30 for basinI. According to Figure 7, one can estimate σ*\* <sup>X</sup>* using Equation (4). The values of *a*, *b*, *c*, and *d* to determine σ*\* <sup>X</sup>* are provided in Table 4.

$$
\sigma\_X^\* = \frac{a + b \, X^\*}{1 + c \, X^\* + d \, X^{\*2}} \tag{4}
$$

**Table 4.** Coefficients of *a*, *b, c*, *d*, and the statistical performance criteria to estimate σ*\* X*.


Therefore, the new adjustment can estimate σ*\* <sup>X</sup>* very well with a correlation coefficient (R) equal to 0.910 and 0.872 for basinII and basinI, respectively.

#### *3.6. Statistical Coe*ffi*cient of the Probability Distribution*

Figure 8 presents the distribution of the experimental values of the *NK%* coefficient obtained from the pressure data along basinII for different probabilities from 0.1% to 99.9% with different flow conditions in free jumps. The distribution of the *NK%* coefficient along basinI with the free jumps has been previously investigated by Mousavi et al. [25].

**Figure 8.** Distribution of the experimental values of the *NK%* coefficient along basinII.

From Figure 8, one can verify the dispersion of the *NK%* coefficient with the minimum and maximum extreme pressures in the initial zone of the jumps. It is observed that for probabilities greater than 50%, the *NK%* coefficient has positive values, and for probabilities less than 50%, it has negative values. At the beginning area of the basins, the values of *N*0.1% are approximately −3, and for positions *X\** ≥ 0.40, it has values less than −4. In addition, the *N*99.9% coefficient at the beginning of basinII has values around 4 to 6. At the downstream of the basins, the *NK%* values are slightly stabilized and vary in the range of 2 to 4. The results show that the variation rate of the *NK%* coefficient along basinII has decreased somewhat compared to basinI.

Teixeira [18] demonstrated that in free jumps, the longitudinal distribution of the *NK%* coefficient follows a second-order polynomial relationship. In the present study, the results show that the *NK%* coefficient has relatively constant values along the jumps, mainly for the probabilities from 5% to 95%. Accordingly, depending on the probability to be identified, the *NK%* coefficient shows a trend more or less close to a single (average) value for each probability, regardless of Fr1 values. Table 5 displays the average experimental values of the *NK%* coefficient with different probabilities along the basins.


**Table 5.** Average experimental values of *NK%* coefficient in the dissipation basins.

To develop a method for estimating the *P\* K%* parameter in the case of basinII and basinI, we identified variations in the *NK%* coefficient as a function of probability. Therefore, it was decided to use the average value of *NK%* for each probability. According to Wiest [41], there is little effect of Fr1 on *NK%*, and the latter remains constant along the dissipation basin. Accordingly, *NK%* follows a specific curve acceptably well, making it possible to establish a new adjustment for *NK%* as a function of the probability of occurrence (*K*). Therefore, we propose a second-order rational relationship to estimate *NK%*:

$$N\_{K\%} = \frac{\alpha + \beta \, K}{1 + \gamma \, K + \delta \, K^2} \tag{5}$$

Here α, β, γ, and δ are the coefficients of Equation (5), and *K* is the value of the probability in decimal. The values of coefficients in Equation (5) are shown in Table 6. The residual of the

experimental and estimated data set of the *NK%* coefficient for different probabilities in basinII and basinI is plotted in Figure 9. This parameter is defined as the difference between the experimental and estimated values of *NK%*.

**Table 6.** Coefficients of Equation (5) for estimating *NK%* coefficient in dissipation basins.

**Figure 9.** Residual plots of the experimental and estimated data set of the *NK%* coefficient for different probabilities: (**a**) basinII and (**b**) basinI.

#### *3.7. Estimation of Pressures with Di*ff*erent Probabilities of Occurrence*

In this study, new original adjustments were proposed for *P\* <sup>m</sup>* (Equation (3)), σ*\* <sup>X</sup>* (Equation (4)), and *NK%* (Equation (5)) to estimate the pressure values with different probabilities of occurrence (*PK%*). Therefore, the estimated values of *P*α*%* were determined using Equation *P*α*%* = *Pm* + *NK%* × σ*X*.

Some statistical criteria for the estimated values of the *P\* K%* parameter in basinII and basinI are presented in Table 7. For instance, the longitudinal distribution of the experimental and estimated data of the *P\* K%* parameter with different probabilities along basinII is shown in Figure 10. The distribution of the *P\* K%* parameter for different probabilities of occurrence along basinI with the free jumps has been previously investigated by Mousavi et al. [25].

**Table 7.** Statistical criteria to estimate *P\* K%* with different probabilities of occurrence.


*\** Dimensionless value.

**Figure 10.** Longitudinal distribution of the experimental and estimated data of *P\* K%* parameter with different probabilities along basinII: (**a**) *P\** 5%; (**b**) *P\** 5%; (**c**) *P\** 60%; (**d**) *P\** 95%.

#### **4. Conclusions**

In this study, a lab-scale model of an Ogee spillway, either equipped with the USBR Type I and II dissipation basins was installed downstream of an Ogee spillway, based on the USBR criteria, to investigate pressure fields therein. The present study aimed to measure and provide useful insights

about the pressure fluctuations at the bottom of basinII. We can provide here some conclusions from our research, covering the (different) patterns of pressures along the free hydraulic jumps, as follows:


**Author Contributions:** Methodology, S.N.M. and D.B.; validation, D.B.; writing—original draft, S.N.M.; writing—review and editing, D.B. Both authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Acknowledgments:** All co-authors would like to express their gratitude to the editors and reviewers for their time spent reviewing our manuscript and for helping to improve the manuscript. Daniele Bocchiola acknowledges the support from the Climate-Lab of the Polytechnic University of Milan (https://www.climatelab.polimi.it/en/), an interdepartmental laboratory on climate change at the Polytechnic University of Milan.

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

#### **Abbreviation**


#### **References**


**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## **Experimental Validation of a Sliding Mode Control for a Stewart Platform Used in Aerospace Inspection Applications**

#### **Javier Velasco 1,\*, Isidro Calvo 2, Oscar Barambones 2, Pablo Venegas <sup>1</sup> and Cristian Napole <sup>2</sup>**


Received: 20 October 2020; Accepted: 16 November 2020; Published: 17 November 2020

**Abstract:** The authors introduce a new controller, aimed at industrial domains, that improves the performance and accuracy of positioning systems based on Stewart platforms. More specifically, this paper presents, and validates experimentally, a sliding mode control for precisely positioning a Stewart platform used as a mobile platform in non-destructive inspection (NDI) applications. The NDI application involves exploring the specimen surface of aeronautical coupons at different heights. In order to avoid defocusing and blurred images, the platform must be positioned accurately to keep a uniform distance between the camera and the surface of the specimen. This operation requires the coordinated control of the six electro mechanic actuators (EMAs). The platform trajectory and the EMA lengths can be calculated by means of the forward and inverse kinematics of the Stewart platform. Typically, a proportional integral (PI) control approach is used for this purpose but unfortunately this control scheme is unable to position the platform accurately enough. For this reason, a sliding mode control (SMC) strategy is proposed. The SMC requires: (1) a priori knowledge of the bounds on system uncertainties, and (2) the analysis of the system stability in order to ensure that the strategy executes adequately. The results of this work show a higher performance of the SMC when compared with the PI control strategy: the average absolute error is reduced from 3.45 mm in PI to 0.78 mm in the SMC. Additionally, the duty cycle analysis shows that although PI control demands a smoother actuator response, the power consumption is similar.

**Keywords:** automatic optical inspection; kinetic theory; parallel robots; robust control; sliding mode control

#### **1. Introduction**

Contemporary markets tend to constantly increase the number of product variants, and product life cycles are also changing. Demand for product families in small batch sizes is increasing, therefore reconfigurable tooling is becoming a key technology for fulfilling production requirements [1–3]. For that reason, Stewart platforms, which provide precise motion in six degrees of freedom, are being introduced in production scenarios where continuous positioning and orientating is required. In addition, parallel robot architectures provide high rigidity, high payload-to-weight-ratio, high positioning accuracy, and low inertia of moving parts subjected to high loads. Compared to anthropomorphic robotic arms, they do not have such a wide range of displacements, but they present higher stiffness and precision as well as a simpler solution to the inverse kinematics equations [4,5]. Previous benefits, in addition to the reduction in hexapod production costs, justify the use of Stewart platforms in industrial applications.

Stewart platforms can be found in different domains, such as machinery [1,6], test beds [7], real-time simulators for vehicles [2,8], and antenna/solar orientation platforms [9,10]. Typically, every arm is controlled by an electro mechanical actuator (EMA), but hydraulic actuators are more suitable for large loads [2,11], and piezoelectric actuators are commonly used in micro- or nano-scale platforms (found in biomedical science, optics, and microscopical devices) [12]. Stewart platforms are frequently used as camera levelling bases in a wide range of applications. These devices can be found in rescue operations, traffic control, identification, surveillance of frontiers, agriculture control and fire detection in forest areas, among others. The use of Stewart platforms for levelling cameras has been introduced in automated non-destructive inspections (NDI) in order to reduce labour costs [13,14]. Thermographic cameras, sensitive to radiation in the infrared spectral range, are frequently used in combination with external thermal stimulation systems. Thermographic inspection is normally conducted statically by setting the infrared camera at a fixed distance from the object [15]. However, this approach is subject to the curvature changes in the object inspected so that the spatial resolution is reduced due to the difference in distance between the camera and the target. A different approach in thermographic NDIs consists of applying the inspection dynamically by moving the sensor over the surface of interest. This approach improves the inspection quality, because it permits the detection of smaller defects, but requires higher performance in positioning control systems. Figure 1 illustrates the influence of using static positioning by means of two infrared radiation (IR) images, only one being properly focused.

**Figure 1.** Comparison between a corrected IR image (**above**) and a defocused IR image (**below**).

The control of Stewart platforms must deal with a complex kinetics calculation. It is a well-known fact that, for serial robot manipulators, the solution of a forward kinematics problem is easier than an inverse kinematics problem. However, in parallel robots the situation is just the opposite [4]. Several solutions for the forward and the inverse kinematics are proposed in the literature. The inverse kinematic problem, i.e., obtaining the joint space position or the six link lengths given the position/orientation of the platform or the Cartesian space position, is straightforward to calculate at Stewart Platforms. On the contrary, the forward kinematics problem, viz. The determination of the Cartesian space position for a given joint space position, is more demanding computationally [16]. The most common approach is to calculate the closed-form solution to the inverse kinematic transformation, and then estimate the forward kinematic transformation using the Newton–Raphson method [7]. A different approach for solving the algebraic system of equations utilises the reduced Gröbner basis form of the system of equations under total degree term ordering of its monomials and Sylvester's Dialytic

elimination method [17]. Particle swamp optimisation is another powerful tool that can be used for analysing different robot configurations [18].

In some cases, the kinematic nonlinearity of robotic actuators is a source of error which requires special consideration [3,6]. The use of appropriate algorithms considerably reduces the calculation time of the kinematics, and the use of simulation software is often extended to dynamics modelling (considering the mass and the stiffness of the moving platform and legs) [19,20]. By using a combination of design and finite elements, an integrated approach can be developed that simulates the machine dynamics and solves the kinematics, taking into account rigid body dynamics, vibration and strength [21].

The control strategy must command the actuators to achieve precise positioning, minimise the error, and deal with system uncertainties. A proportional–integral–derivative controller (PID) is a simple closed-loop method to correct uncertainties, the proportional integral (PI) controller version being one of the most popular control approaches in the market. Several control strategies were proposed in the literature to improve the performance of actuators in parallel robot architectures, nevertheless, most of them were validated only through simulations. Among other schemes, the use of inverse models, which represent the behaviour of a system mathematically, may become a simple approach to improve the controller performance when compared to PI controllers. This strategy corrects known nonlinearities in open loop control, even though errors caused by uncertainties and external perturbations are not corrected. The combination of inverse models with feedback controllers [8], such as H-infinity [11] and genetic algorithms [22], enables us to achieve higher accuracy. Another approach is the use of inverse models to condition the closed loop feedback signal [9]. These schemes were validated by simulations.

Sliding mode control (SMC) is a nonlinear control approach that drives the state trajectory of the system onto a specified sliding surface and maintains the trajectory on that surface for the subsequent time under system uncertainties and perturbations. However, in conventional SMC design, a priori knowledge of the bounds on system uncertainties must be acquired [23–25]. Several SMC-based strategies to control Stewart platforms are proposed and verified by simulations: SMC with perturbation estimation [26], integral SMC [5], continuous higher order SMC [27], and SMC with fuzzy tuning design [28]. The combination of SMC with estimation techniques, such as state observers [29], allows the conditioning of high frequency input signals [13], and estimating variables when not all states are measured directly, by using super-twisting algorithms [2] and adaptive super-twisting algorithms [10].

This paper presents the development of an SMC aimed at positioning an inspection camera precisely over a Stewart platform. This device is designed to perform inspections on aeronautical coupons, which must fulfil severe quality standards, so that any positioning enhancements leads to substantial improvements in the defect detection ratio. In the literature, the application of SMC in Stewart platforms is validated mainly by simulations. In this study, the proposed SMC strategy is validated experimentally as an alternative to the vendor-provided PI controller, which was producing improperly focused images for the inspection application because it was not accurate enough. The experimental results show that the overall platform performance can be improved by using this control scheme. To develop the SMC strategy, in the first place the inspection platform is analysed and modelled in Section 2, where the inverse and forward kinetics are calculated. Additionally, the system dynamics are modelled in this section, which serve as basis to develop the SMC, in Section 3. The performance of the proposed control scheme is evaluated and compared with the vendor-provided PI controller in Section 4. As a final point, discussion conclusions are presented in Section 5.

#### **2. Stewart Platform Mathematical Modelling**

The Stewart platform presented in this paper must be controlled to ensure the position and orientation of an inspection camera. The camera must check different aeronautical samples: several sweep scans at a distance of 40 mm must be performed to ensure the quality of the specimen at different heights. The NDI system is shown in Figure 2a and the trajectory to follow when inspecting the composite panel is shown in Figure 2b.

(**a**) (**b**)

**Figure 2.** Inspection system prototype. (**a**) Test setup; (**b**) Trajectory scheme.

While recording images, it becomes essential to control the position with the greatest accuracy possible in order to ensure that the camera is on the target, and it is vitally important that the camera remains at a specific distance to the target to avoid defocusing, as shown in Figure 1. In this kind of mechatronic system, an effective control strategy is mandatory to achieve successful positioning, and consequently improve the image quality. To do this, firstly, it is necessary to perform an analysis of the system, and create a mathematical model that represents it, as accurately as possible. Creating the model according to the real needs (open or closed loop control, lifecycle, system instabilities, etc.) is vitally important, so the design is optimized and accurate. In the following subsections, the kinetic modelling and dynamic modelling are presented.

#### *2.1. Platform Kinematics*

In order to describe the Stewart platform position and orientation, six coordinates are needed. Three of these coordinates, described by *d*, are positional displacements that locate the position of a reference point in the moving platform with reference to a fixed coordinate system, selected as the base *B*. The other three coordinates are angular displacements that describe the orientation of the moving platform, represented as *e*, again with reference to a nonrotating coordinate system located in the base.

$$\mathbf{x}^B \mathbf{d} = \begin{bmatrix} \mathbf{x} & \mathbf{y} & \mathbf{z} \end{bmatrix}^T \tag{1}$$

$$\boldsymbol{\alpha}^{B}\boldsymbol{\sigma} = \begin{bmatrix} \boldsymbol{\alpha} & \boldsymbol{\beta} & \boldsymbol{\gamma} \end{bmatrix}^{T} \tag{2}$$

The platform position and orientation are controlled by the length of each actuator *li*. The calculation of the actuator lengths is required to drive the Stewart platform over a certain trajectory, this operation is done by using the Stewart platform kinematic transformations. Additionally, to develop a successful control strategy, a correct modelling of the system is required. The following subsections describe the inverse and forward kinematics [7,16] as well as the platform model.

#### 2.1.1. Inverse Kinematics

The inverse kinematics determine the required actuator length for achieving a certain position and orientation of the moving platform. Frame assignment for the robot wrist is illustrated in Figure 3, where two coordinate frames, *p* and *B*, are assigned to the payload and base platforms, respectively. The Cartesian variables are chosen to be the relative position and orientation of Frame *p* with respect to Frame *B*, where the position of Frame *p* is specified by the position of its origin with respect to Frame *B*. The position vectors of the centres of spherical joints in frame *B* and *p* can be expressed as:

$$\prescript{P}{}{p\_i} = \begin{bmatrix} r\_P \cos(\lambda\_i) & r\_P \sin(\lambda\_i) & 0 \end{bmatrix}^T \tag{3}$$

$$\begin{aligned} \,^B b\_i = \begin{bmatrix} \ \,^r r\_B \cos(\Lambda\_i) & \,^r r\_B \sin(\Lambda\_i) & \,^t \end{bmatrix}^T \end{aligned} \tag{4}$$

$$
\Lambda\_i = \frac{\pi}{3} - \frac{\Theta\_B}{2}; \lambda\_i = \frac{\pi}{3} - \frac{\Theta\_P}{2}, \text{ for } i = 1, 3, 5 \tag{5}
$$

$$
\Lambda\_i = \Lambda\_{i-1} + \theta\_B; \; \lambda\_i = \lambda\_{i-1} + \theta\_{P\_i} \text{ for } i = 2, 4, 6 \tag{6}
$$

where *rB* and *rP* are the radius of the lower and upper platforms, θ*<sup>P</sup>* = 23◦ and θ*<sup>B</sup>* = 96◦ are the platform and base angles between the first and second joints.

**Figure 3.** Stewart platform schemes: (**a**) Stewart platform frame assignment; (**b**) vector diagram for the ith actuator.

The leg vector *Bqi* pointing from attachment point *Bi* to point *Pi* can be expressed as follows:

$${}^{B}\boldsymbol{\eta}\_{i} = {}^{B}\_{P}\boldsymbol{R}^{P}\boldsymbol{p}\_{i} + {}^{B}d - {}^{B}\boldsymbol{b}\_{i} \tag{7}$$

where *<sup>B</sup> <sup>P</sup>R* is the orientation matrix required to calculate the platform spherical joint vectors in the base coordinate system used in the rest equation terms.

$${}^{B}\_{P}R = \begin{bmatrix} \cos\alpha\cos\beta & \cos\alpha\sin\beta\sin\gamma - \sin\alpha\cos\gamma & \cos\alpha\sin\beta\cos\gamma + \sin\alpha\sin\gamma\\ \sin\alpha\cos\beta & \sin\alpha\sin\beta\sin\gamma + \cos\alpha\cos\gamma & \sin\alpha\sin\beta\cos\gamma - \cos\alpha\sin\gamma\\ \sin\beta & \cos\beta\sin\gamma & \cos\beta\cos\gamma \end{bmatrix} \tag{8}$$

The length of each actuator can be calculated from the modules of the length vectors *Bqi*:

$$d\_i = \begin{vmatrix} ^B q\_i \end{vmatrix} \tag{9}$$

#### 2.1.2. Forward Kinematics

The forward kinematics allows calculating the platform position and orientation given specific actuator lengths. Equation (9) represents a set of six highly nonlinear simultaneous equations, therefore the Newton–Raphson method can be used to solve the kinematic problem. The objective is to calculate the estimated lengths *l* ∗ *<sup>i</sup>* on an iterative process given an initial position estimation *aj*−1, until the value of *aj*, which minimizes the *fi*(*d*,*e*) scalar function, is found.

$$f\_i(d, e) = l\_i - l\_i^\* \tag{10}$$

The Newton–Raphson procedure for this case is:

1. Select an initial guess (*j*−1):

$$a\_{j-1} = \begin{bmatrix} \ d^T & e^T \ \end{bmatrix}^T \tag{11}$$


$$\prescript{B}{}{q}\_{i} = \prescript{B}{}{q}\_{i} / \prescript{B}{}{q}\_{i} \Big| \tag{12}$$

5. Compute the inverse Jacobian matrix for the initial guess *J* −1 *j*−1:

$$J\_{j-1}^{-1} = \begin{bmatrix} \,^B \mathfrak{H}\_1^T & \begin{pmatrix} ^B R a\_1 \times \,^B \mathfrak{H}\_1 \end{pmatrix}^T\\ \vdots & \vdots\\ \,^B \mathfrak{H}\_6^T & \begin{pmatrix} ^B R a\_6 \times \,^B \mathfrak{H}\_6 \end{pmatrix}^T \end{bmatrix} \tag{13}$$

6. Compute the estimation *aj*:

$$a\_j = a\_{j-1} - J\_{j-1}(l\_{i\,j-1}^\* - l\_i) \tag{14}$$

7. If *l* ∗ *<sup>i</sup> <sup>j</sup>*−<sup>1</sup> − *li* is acceptable, take *aj* as the solution, otherwise repeat the procedure with the last *aj* estimation.

#### *2.2. Stewart Platform Dynamics*

The Stewart platform is moved by means of six EMAs, attached in pairs to three positions on the baseplate of the platform, crossing over to three mounting points on a top plate. The whole system can be divided in six subsystems, each composed of one EMA. In these actuators, the rotary motion of the motor is converted into linear displacements. If the interactions between actuators and external disturbances are considered as perturbations, each EMA can be modelled as a second-order model with a single element, as shown in Figure 4. *pest* represents the external forces, *mi* the mass attached to the actuator, *bi* the friction and *ki* the actuator stiffness.

**Figure 4.** Actuator models. (**a**) Actuator scheme, (**b**) actuator mechanical model.

With the proposed scheme, the equation that models the actuator dynamics results is as follows:

$$k\_i l\_i(t) + b\_i \dot{l}\_i(t) + m\_i \ddot{l}\_i(t) = F\_i(t) + p\_{\text{est}}(t) \tag{15}$$

where *t* denotes the time variable. The force applied by the actuator *Fi* is proportional to the maximum force *Fmax* and the pulse-width modulation (PMW) duty cycle *dci*.

$$F\_i(t) = d\_{ci}(t) F\_{\text{max}} \tag{16}$$

#### **3. Sliding Mode Control Calculation**

The control strategy must command each actuator in order to achieve the desired trajectory with a precise platform positioning and orientation, minimizing error and dealing with system uncertainties. The proposed control scheme is shown in Figure 5. The platform setpoint is given in terms of position and orientation (a), so at first the trajectory must be transformed to the equivalent actuator length setpoint (b) by using the inverse kinematics explained in Section 2.1. Then, an SMC closed loop control estimates the voltage outputs (c) that are needed to achieve each actuator length, based on the EMA setpoints (b) and the measured lengths (e). The Stewart platform EMAs are controlled by the SMC voltage input (c) and affected by possible disturbances (e.g., external forces, non-linearities) (d). Finally, the EMA lengths (e) are measured by the encoders and transformed to the equivalent platform position (f), which is done using the forward kinematics shown in Section 2.2. The inverse and forward kinematics have been studied previously, therefore in this section the SMC strategy is developed.

**Figure 5.** Stewart platform control scheme. The inverse and forward kinematics are used to calculate the actuator length for a determined platform position, and vice versa. The sliding mode control (SMC) generates the control action to bring the Stewart platform to the desired position.

The Stewart platform native closed loop control was a PI control strategy that provided a stable response. The major drawback of this control was that it did not provide an accurate platform control, therefore the NDI camera produced a low-quality IR image. To improve the positioning accuracy of the platform, an SMC strategy was chosen, because it showed accurate results in previous studies. SMC is a nonlinear control approach that drives the state trajectory of the system onto a specified sliding

surface and maintains the trajectory on that surface for the subsequent time. However, in conventional SMC design, a priori knowledge of the bounds on system uncertainties must be acquired in order to calculate the sliding gain value that can surmount these uncertainties [23]. Perturbation estimation strategies were studied in the literature [23,30]: one common approach to estimating perturbation *pest* is as in Equation (15). Then, the system model becomes the following:

$$k\_i l\_i(t) + b\_i \dot{l}\_i(t) + m\_i \ddot{l}\_i(t) = F\_{\text{max}} d\_{ci}(t) + p\_{\text{est}}(t) + \overline{p}(t) \tag{17}$$

where *p*(*t*) <sup>=</sup> *<sup>p</sup>*(*t*) <sup>−</sup> *pest*(*t*) represents the error between the real and estimated perturbations at the system. To design the SMC controller, the position error is defined as follows:

$$e(t) = l\_i(t) - l\_{di}(t) \tag{18}$$

where *ldi* represents the desired length. In the rest of this section, the time indices have been omitted for the sake of brevity. Because the dynamic system of the EMA is a second-order system, a second-order PID sliding surface was selected:

$$s = \dot{\varepsilon} + \lambda\_P \varepsilon + \lambda\_I \int e \, dt \tag{19}$$

where λ*<sup>P</sup>* is the proportional sliding gain and λ*<sup>I</sup>* is the integral sliding gain. Studies show that the use of output integral sliding mode control considerably improves the stabilisation of the desired position of platform *p* as well as the velocity with which it stabilises [13].

For the system represented with Equation (17), with sliding surface defined in Equation (19) and the position error given by Equation (18) which satisfies lim t→0 *e*(*t*) = 0, the control law results as follows, as proved in [30]:

$$d\_{\rm ci} = \frac{m\_i}{F\_{\rm max}} \left(\frac{b\_i}{m\_i} - \lambda\_P\right) \dot{l}\_i + \frac{m\_i}{F\_{\rm max}} \left(\frac{k\_i}{m\_i} - \lambda\_I\right) l\_i - \frac{1}{F\_{\rm max}} p\_{\rm ext} + \frac{m\_i}{F\_{\rm max}} \left(\ddot{l}\_{di} + \lambda\_P \dot{l}\_{di} + \lambda\_I l\_{di}\right) - \eta \text{sgn}(s) \tag{20}$$

where η is a positive switching gain and *sgn(s)* represents the signum function, as defined in the following expression:

$$sgn(s) = \begin{cases} -1, \text{ for s < 0} \\ 0, \text{ for s = 0} \\ 1, \text{ for } s > 0 \end{cases} \tag{21}$$

The following candidate Lyapunov function was selected for analysing the stability of the system. Its first derivative can be obtained as: .

$$
\dot{V} = m\_l \dot{\mathbf{s}} \tag{22}
$$

By taking the time derivative of both sides of Equation (19), the following sliding dynamics can be generated:

$$\begin{aligned} \dot{s} &= \ddot{e} + \lambda\_P \dot{e} + \lambda\_I \varepsilon &= -\left(\ddot{l}\_i - \ddot{l}\_{di}\right) - \lambda\_P \left(\dot{l}\_i - \dot{l}\_{di}\right) - \lambda\_I (l\_i - l\_{di}) \\ &= -\left(\frac{b\_i}{m\_i} - \lambda\_P\right)\dot{l}\_i - \left(\frac{k\_i}{m\_i} - \lambda\_I\right)l\_i + \frac{d\_i F\_{max}}{m\_i} + \frac{1}{m\_i}(p\_{ext} + \overline{p}) - \ddot{l}\_{di} - \lambda\_P \dot{l}\_{di} - \lambda\_I l\_{di} \end{aligned} \tag{23}$$

Then, substituting Equation (23) into Equation (22) with Equation (20) also taken into account yields:

$$\begin{split} \dot{V} &= -m\_i(\frac{b\_i}{m\_i} - \lambda\_P)\dot{l}\_i \mathbf{s} - m\_i(\frac{k\_i}{m\_i} - \lambda\_I)l\_i \mathbf{s} + d\_{c1}\mathbf{F}\_{\max}\mathbf{s} + (p\_{c\mathbf{c}t} + \overline{p})\mathbf{s} \\ &-m\_i(\stackrel{\cdot}{l}\_{di} + \lambda\_P \dot{l}\_{di} + \lambda\_I l\_{di})\mathbf{s} = -(F\_{\max}\eta\text{sgn}(\mathbf{s}) - \overline{p})\mathbf{s} = -(F\_{\max}\eta|\mathbf{s}| - \overline{p}\mathbf{s}) \end{split} \tag{24}$$

If the gain is designed to meet the condition

$$
\eta > \frac{\left| \overleftarrow{p} \right|}{F\_{\text{max}}} - \frac{\varepsilon}{F\_{\text{max}}} \tag{25}
$$

where ε > 0 is an arbitrary constant, then it follows that for |*s*| -0,

$$
\eta \|\mathbf{s}\| \ge \frac{\|\overrightarrow{p}\|}{F\_{\text{max}}} \|\mathbf{s}\| + \frac{\varepsilon}{F\_{\text{max}}} \|\mathbf{s}\|\tag{26}
$$

$$
\sigma \eta \text{|s|} - \frac{\overleftarrow{p}}{F\_{\text{max}}} \text{s} > \frac{\varepsilon}{F\_{\text{max}}} \text{|s|}\tag{27}
$$

$$\|F\_{\text{max}}\eta\|\text{s}\|-\widetilde{\text{p}}\text{s} > \|\text{s}\|\tag{28}$$

$$-\left(F\_{\max}\eta|\mathbf{s}|-\widetilde{\mathbf{p}}\mathbf{s}\right) < -\varepsilon|\mathbf{s}|\tag{29}$$

Hence, considering Equations (24) and (29), one can derive that

$$
\dot{V} < -\varepsilon|\mathbf{s}|\tag{30}
$$

It can be concluded that the states can reach the switching surface *s* = 0 in finite time. Equation (30) also ensures that the states will be confined to the surface *s* = 0 for all future time, because leaving the surface requires . *V* to be positive, which is impossible as the above inequality implies. Thus, the switching variable *s* → 0 as *t* → ∞. According to the definition of *s*, we can conclude that the tracking error satisfies lim*t*→∞*e*(*t*) <sup>=</sup> 0 and lim*t*→∞ . *<sup>e</sup>*(*t*) <sup>=</sup> 0 and that *li* <sup>→</sup> *ldi* and . *li* <sup>→</sup> . *ldi* as *t* → ∞. Therefore, the SMC controller guarantees a zero steady-state tracking error [30].

Due to the discontinuity of the sign function, the control input may produce chattering. To reduce this phenomenon, the boundary layer technique was used by replacing the signum function by hyperbolic tangent function. Hence, the proposed control law in Equation (20) using a hyperbolic function and the proposed dynamic correction gives the following:

$$\begin{split} d\_{ci} &= \frac{m\_i}{F\_{\text{max}}} \left( \frac{b\_i}{m\_i} - \lambda\_P \right) \dot{l}\_i + \frac{m\_i}{F\_{\text{max}}} \left( \frac{k\_i}{m\_i} - \lambda\_I \right) l\_i - \frac{1}{F\_{\text{max}}} p\_{cst} + \frac{m\_i}{F\_{\text{max}}} \left( \ddot{l}\_{di} + \lambda\_P \dot{l}\_{di} + \lambda\_I l\_{di} \right) \\ &- \eta \tanh \left( \dot{e} + \lambda\_P \varepsilon + \lambda\_I \int e \, dt \right) \end{split} \tag{31}$$

The equivalent control scheme for Equation (31) is presented in Figure 6.

**Figure 6.** SMC scheme. The PMW outputs (*dci*) are calculated with the actuators position feedbacks (*li*) and the desired positions (*ldi*) as inputs.

#### **4. Experimental Results**

In this section, the performance of the proposed SMC strategy is analysed experimentally. In order to evaluate the SMC strategy, both accuracy and power consumption were compared with the native PI control. For each analysis, graphs and average data were used to analyse the system behaviour. NI MyRIO hardware system and NI LabVIEW 2017 software (National Instruments, Austin, TX, USA) were used to control the Acrome Stewart platform (Acrome, Istanbul, Turkey). Six linear DC actuators drove the platform and provided length feedbacks analogically. The MyRIO PWM output was applied as a voltage to the DC motor via dual H-bridge motor drivers, which actuated as current amplifiers.

The monitoring and control loops were executed in the Xilinx Z-7010 RT processor at 1 kHz. The PWM output, actuator lengths and setpoint data were registered at 50 Hz. The SMC gains were adjusted experimentally: several trials were carried out to tune the control gains adequately and obtain the optimal response of the controller. Low gain values produced high error and a slow system response. On the other hand, it was observed that using control gains that were too high led to chattering and an unstable system response. The PI original gains and the SMC-adjusted gains are displayed in Table 1.

**Table 1.** Control gains.


In order to perform the surface inspection, the platform must follow the fixed sweep path schematically marked in black in Figure 2b, which corresponds to the trajectory shown in Figure 7a. In this study, the first two sweeps were analysed to limit the amount of data. The trajectory firstly requires a displacement along the *x* axis at constant speed, and then, a second displacement in the opposite *x* direction at a different *z* level. As mentioned in Section 2, the positioning must be accurate, and particularly, so must the distance between the surface and the camera lens (*z* axis). Variations lower than +/−1 mm were required to obtain valid inspection images. By using the inverse kinematics, the required leg length setpoint profile was calculated from the inspection trajectory, which is shown in Figure 7b. Because the platform moved along the *y* axis, each pair of legs moved with the same profile with the following combinations: *l1*–*l6*, *l2*–*l5* and *l3*–*l4*.

**Figure 7.** Trajectories graphs: (**a**) Stewart platform absolute position and orientation (**b**) Actuator lengths.

To evaluate the positioning accuracy of each control strategy, both the trajectory error and length error were analysed. The absolute position and angles measurements were not available, therefore the forward kinetic transformation was used to calculate these data from the known actuator lengths. Figure 8a,b shows the length errors in PI and SMC strategies. The PI control produced a smooth actuator response which caused length deviations up to +/− 2.0 mm, as can be observed in Figure 8a. In this figure we can observe that the error in each pair of EMAs *l1*–*l6*, *l2*–*l5* and *l3*–*l4* is similar. The SMC provided a better performance and reduced the maximum actuator length error to less than +/− 0.5 mm, as depicted in Figure 8b.

**Figure 8.** Positioning error graphs: (**a**) proportional integral (PI) length errors; (**b**) SMC length errors graph; (**c**) PI trajectory errors graph; (**d**) SMC trajectory errors graph.

PI compared with the SMC shows a similar response during the first 0.5 s, when a continuous setpoint is required. Under those conditions, the integral gain in both control strategies reduced the error successfully. PI command was stable due to the low proportional gain, whereas SMC corrected the actuator positions continuously. Nevertheless, the accumulated error in both strategies was practically the same during this fixed period of time, as shown in Figure 9. Afterwards, as the setpoint commands changed and EMA lengths variations were required, SMC effectively controlled the EMA lengths within an error of less than 0.5 mm, proving the great response of this control strategy. On the contrary, using the PI EMAs errors increased up to 2 mm: the PI control does not provide a proper PWM command to achieve the EMAs setpoints. The PI control showed a slight difference between the

upper error (+2 mm) and lower error (−1.5 mm). This deviation was caused by the platform weight, which helps to shorten the EMAs downwards, but impedes their extension upwards.

**Figure 9.** Absolute error comparison between the two control schemes graph.

The errors in the EMAs mentioned above caused deviations in the positioning of the Stewart platform. Figure 8c,d shows that both control strategies followed the desired trajectory. However, only SMC achieved a positioning *y* error of between +/− 1 mm. Additionally, the positioning error along the *x* and *z* axes was considerably higher when using the PI control. Hence, the PI control, which is not accurate enough, caused most of the recorded images to be defocused. In both strategies, the *x* and *z* axis deviation was remarkably smaller than in the *y* axis, mainly because the movement was in the *y* direction in the plane *x*/*y*: Because each pair of actuators was symmetrically placed along the plane *x*/*y*, the control in the *z* axis was more precise and deviations were compensated between the pairs of actuators. Although SMC presented deviations higher than 1 mm in the *x* axis, the NDI exhibited a sharp image quality.

Another approach to evaluate the system accuracy is to compare the accumulated absolute EMA error, which is the sum of the absolute error of each actuator. Figure 8 represents the absolute error comparison between PI and SMC. Whereas the PI average error is 3.45 mm, the SMC average error is 0.78 mm. Only when no dynamic response of the EMAs was required, were the PI and SMC absolute errors practically the same. Hence, it may be concluded that the accuracy provided by the SMC strategy is remarkably higher.

To analyse the power consumption, its value was estimated from the duty cycle commands. Once the duty cycle and the actuator maximum consumption were known, the power of each actuator was calculated. Figure 10 shows that the PI control required a smooth power variation. The SMC, as a nonlinear control, required a more demanding peak–valley consumption. In any case, the average power consumption for both control strategies were quite similar: PI = 9.41 watts and SMC = 9.62 watts.

**Figure 10.** Power consumption comparison between the two control schemes graph.

#### **5. Conclusions**

The use of Stewart platforms as NDI orientation apparatus offers six degrees of freedom, high rigidity, a high payload-to-weight-ratio, and low moving inertia. The aeronautical inspection application presented in this paper requires highly precise positioning, otherwise, non-desirable blurred imaging is obtained affecting the quality of the inspection system. A new control strategy approach, based on the system model analysis, was proposed and validated experimentally as a solution to overcome positioning errors.

The Stewart platform is driven by six electro mechanic actuators that must be coordinated to achieve the desired trajectory and position. The calculation of the kinematics of the mechanism is necessary to obtain the relationship between the position/orientation of the platform and the EMA lengths. Whereas the inverse kinematics can be calculated directly analytically, the forward kinematics require the use of the Newton–Raphson method to find a solution. As an alternative to the native proportional integral (PI) control, which was unable to position the platform accurately enough, a sliding mode control (SMC) system was proposed. The SMC strategy was calculated based on the actuator second-order model with a single element. Interactions between actuators and external disturbances were modelled as perturbations.

The validation, which was performed in the physical technology demonstrator, shows that SMC can be a successful solution to control Stewart platform devices. In comparison with the vendor-provided PI control strategy, the SMC achieves higher performance while executing the actuators commands and desired platform positioning: the average absolute error is reduced from 3.45 mm in PI to 0.78 mm when using the SMC approach presented here. In this range of error, the NDI system succeeds in obtaining sharp images. Although the PI control demands a smoother actuator response, the experimental results prove that the power consumption is similar in both control approaches.

The proposed device was constructed to perform analyses of small plain coupons; however this control scheme can be implemented in bigger parallel platforms and anthropomorphic robotic arms aimed at structure diagnoses of bigger and more complex structures, e.g., aircraft components, car parts, etc. Future research on the topic should be focused on the comparison of SMC with other robust control schemes, such as fuzzy logic controllers, H-infinite and artificial neural networks, and on the development of a hybrid SMC, e.g., fuzzy logic SMC and artificial neural network SMC, to verify whether there is room for improvement.

**Author Contributions:** Conceptualization, O.B. and C.N.; investigation, J.V. and C.N.; software, J.V. and P.V.; validation, J.V. and P.V.; supervision, I.C. and O.B.; writing—original draft, J.V.; writing—review and editing, J.V., I.C. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by the Basque Government through the project SMAR3NAK (ELKARTEK KK-2019/00051), by the Ministerio de Economía y Competitividad (RTI2018-094669-B-C31) and by Aernnova and the Diputación Foral de Álava (DFA) through the project CONAVAUTIN 2 (Collaboration Agreement).

**Acknowledgments:** The authors wish to express their gratitude to AERNNOVA, the DFA, the Basque Government and UPV/EHU for supporting this work.

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

#### **References**


**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

#### *Article*

## **An E**ffi**cient Design and Implementation of a Quadrotor Unmanned Aerial Vehicle Using Quaternion-Based Estimator**

### **Eva H. Dulf 1,2, Mihnea Saila 3, Cristina I. Muresan 1,\* and Liviu C. Miclea <sup>1</sup>**


Received: 21 August 2020; Accepted: 14 October 2020; Published: 18 October 2020

**Abstract:** The main goal of the research is to design a low-cost, performing quadrotor unmaned aerial vehicle (UAV) system. Because of low cost limits, the performance must be ensured by other ways. The present proposal is a quaternion-based estimator used in the control loop. In order to make the proposed solution easy to be reproduced by the reader, step-by-step instructions are given, including component choices, design, and implementation. Throughout the article, detailed description of the system model is given. The efficacy of the suggested quaternion-based predictive control is evaluated by extended experimental results.

**Keywords:** unmanned aerial vehicle (UAV); quaternion-based estimator; low-cost design

#### **1. Introduction**

Unmanned aerial vehicles (UAV)s have fascinated many researchers and engineers, as they turned out to be accessible in a large variety of applications, not just for costly military operations. Nowadays, UAVs have a broad range of applications, such as: image capturing, aerial recording, military operations, operations in hard-to-reach areas, etc., [1–7]. Along with the development of wireless communications, the control of UAVs has become extremely precise, robust, and even predictive. New research results in the design of UAVs and new application areas include advanced and complex control techniques like robust and adaptive control, algorithms for different flight conditions, fault tolerance, disturbance rejection, etc., [8–13]. All these methods increase the complexity and the cost of the UAV. Because of the extremely alert technological progress registered in the past two decades, the global industrialization and the minimization of the costs of electronic components, countless researchers have shown a high interest in the development of various devices helpful for the society.

One key issue regarding the control of UAVs resides in the estimation of their position. Various methods have been proposed. An efficient method is presented in [14], both from the point of view of the algorithm's performance and from the point of view of using the processing capacity of a microcontroller. Several estimation algorithms are compared in [15], with the results showing that the extended Kalman algorithm is slower in terms of processing time than Madgwick algorithm [15].

The approach of estimating the pitch and roll coordinates presented in [16] constitutes a reference that fits perfectly in the context of the present paper. For the application of the algorithm proposed in the paper, a method of fusion of the data received from an accelerometer, a gyroscope, and a magnetometer was used to estimate, accurately, the position of a flight apparatus. A combination of the extension of the classical Kalman filtering algorithm and the sequential geometric correction is proposed, completely eliminating the magnetic distortions captured by the sensor. In addition, the paper offers a clear and concise comparison between certain popular approaches to the problem of estimating the coordinates of a flight apparatus and the method proposed by the author. Both the improvements and the problems that arise in the implementation of this method are presented.

From all the knowledge resulting from this state-of-art, it can be concluded that UAVs can be made at a relatively lower cost. Simple transducers can be used, as long as this is compensated by a high performance and optimized estimation algorithm. The authors already designed a cheap and easy to use two-rotor equipment, in order to be multiplied for laboratory works [17,18].

Quaternion framework is widely used today to avoid locks and to ensure better computational efficiency [19,20]. The field of application is large, ranging from mechanical systems [21] and medical robots [22] to neural networks [23] and human activities and postures recognition [24], all research papers reporting remarkable results. Quaternions are also used in UAV control with great success. In [25], the authors developed a nonlinear state space model using the quaternion and angular velocity as state variables, which simplifies the system dynamics. The main focus of the research is directed toward the feedback linearization of the model. The simulation results are presented solely for the attitude stabilization task of the quadcopter. A quaternion representation of the attitude of a quadrotor is also used in [26], where various control methods are discussed and compared, such as the PD, LQR, and backstepping methods. Various case scenarios are discussed including noisy data, actuator restrictions, external disturbances. The attitude control of a quadrotor is designed in a quaternion framework in [27], to avoid gimbal lock and for better computational efficiency. The controllers are tuned based on third-order sliding mode control, with a low-pass filter to reduce chattering and a disturbance observer to cover disturbance estimation problems. To ensure the robustness, a disturbance compensation term is also included in the control law. The simulation results show that the proposed method is efficient. In [28], two variants of adaptive state space controllers for attitude stabilization and self-tuning of a quadrotor are proposed. The effectiveness of the approach is demonstrated through simulations that use a quaternion-based nonlinear dynamic model of a quadrotor. A quaternion representation of the attitude of a quadrotor is also used in [29], where a quaternion-energy-based control law is defined as a Lyapunov function, with the control laws described with unit quaternions and their axis-angle representation. Various simulation and experimental results are presented. Unit quaternions are also used in [30] to describe a simple yet complete dynamic model for the rotational and translational dynamics of unmanned aerial vehicles, whereas dual quaternions are explained and used for robotic systems with multiple rotations and translations. An unmanned aerial vehicle described with unit quaternions is presented in [31]. In this case, a quaternion-passivity-based control is derived. The experimental results and numerical simulations validate the results. Intermediary quaternions are used in the design of a backstepping control technique with integral properties in [32]. Compared to classical quaternions, the proposed approach has also the advantage that one specific orientation corresponds to only one intermediary quaternion, which helps coping with the unwinding phenomenon. Numerical simulations, as well as experimental tests, are presented. The robustness of the algorithm is also tested during the numerical simulations only. In [33], a quaternion-based guidance law is proposed which feeds into an attitude control system based on a PD+ control law. A quaternion control scheme for a quadrotor is also proposed in [34]. An attitude control algorithm is developed to stabilize the vehicle's heading and an additional position control law for stabilization of the vehicle in all states. In this case also, numerical and experimental results are presented to validate the approach. An advanced control scheme, also based on quaternions, is presented in [35] for the attitude control of a quadrotor. Here, both the model and the proportional squared control algorithm are implemented in the quaternion space. Extended simulation results are included to demonstrate the efficacy of the suggested novel approach. Quaternions for attitude control are also used in [36], where a quaternion multiplicative formula is proposed to obtain the change of the attitude angle of a quadrotor. Only some practical solutions are presented.

Other recent significant results in UAV control includes more complex structures or calculus. In [37], a control structure based on a hierarchical scheme is proposed, consisting of an energy-based control to stabilize the vehicle translational dynamics and to attenuate the payload oscillation and a nonlinear state feedback controller based on a linear matrix inequality (LMI) to control the quadrotor rotational dynamics. The authors of [38] propose a neuroadaptive integral robust controller, while [39] discusses the dynamic motion planning and control of an UAV using Direct and the Second Method of Lyapunov. An interesting, but complex solution is proposed in [40], where the dynamic system is divided in two subsystems driven by the translational and the rotational dynamics, based on a linear parameter-varying model.

All these approaches have in common the use of advanced control algorithms, with the major drawback of requiring expensive hardware for implementation purposes. Thus, the main objective of the present work is to design and implement a low-cost, easy to use quadrotor UAV, accessible for any user. A quaternion-based estimator is proposed, similarly to existing research studies. However, in terms of the proposed control strategy, the classical PID controller is used, instead of advanced control algorithms. In this way, the implementation of the control strategy is simplified, which triggers the possibility of using low-cost devices for measurement and control. The final control structure includes four controllers, one for each direction of movement. Step by step design and implementation details are presented in order to be easily reproduced by the reader. Using simulation and experimental data, the proposed method is validated. The results show that similar closed loop performance can be achieved using our proposed approach, compared to other more advanced control strategies. The major advantage is that using our proposed method, these results are achieved using a low-cost UAV with a simple, yet efficient control strategy. The novelty of this work consists, thus, in a quaternion-based estimator and classical Proportional-Integral-Derivative (PID) control strategy, implemented using low-cost microcontroller and sensors. For the proposed remote control, performances are imposed in terms of rejecting a moderate range of disturbances and filtering sensor noisy signals.

The rest of this paper is organized as follows. The materials and methods used are presented in the next section. The resulting quadrotor UAV prototype, along with experimental data, is detailed in Section 3. Finally, conclusions are presented in Section 4.

#### **2. Materials and Methods**

From construction point of view, the system includes the following elements: plastic skeleton for the flight apparatus; support for the electrical circuit of the remote control; electrical circuits; ATmega32U4 and ATmega 328 microcontrollers; four DC motors; four electronic velocity controllers; four propellers; two wireless remote communication modules and a position detection module.

The main aspects of the flight apparatus described in this work are defined by: the number of engines, the position of the support arms, the mass and the center of gravity of the whole assembly. The arms are mounted in "X," to allow easy change of direction, and the center of gravity is fixed at the intersection of the axes of the arms. The change of direction is facilitated by the control of the angular velocity of the engines. The motors are positioned as follows: two motors on one diagonal are rotated in the same direction, while the remaining two motors on the other diagonal rotate in the opposite direction. Viewed as a whole, the system is composed of a four-arm flight apparatus mounted in "X" and a remote control that provides references to the control circuit located on the quadrotor. They communicate via the UART protocol, using two RF transmission and reception modules. Two-way data exchanges are made between the quadrotor and the remote control, so both items send data and await receipt.

Regarding the mechanical design of the system, a variety of computer-aided design environments could be used to create 3D drawings and model the parts necessary for the physical realization of the system. In the present work AutoCAD and SolidWorks were adopted. In addition, Ultimaker Cura–a G code generator and a 3D printer that could correctly interpret the generated code—was operated to create the remote control.

After choosing the components, measuring their dimensions and making the connections, an electrical scheme could be conceived. The present practice used a CAD/CAM environment provided by Autodesk, called Eagle.

The device is designed in such way that the center of gravity coincides with the geometric one, also serving as the center of the coordinate system attached to the quadrotor. This coordinate system describes the relative movements of the flight apparatus to a fixed coordinate system, with an axis perpendicular to the earth's surface. The other two axes of the fixed coordinate system can be chosen so as to coincide with cardinal points whose axes are perpendicular (for example north-east or south-west).

Like any aerial vehicle, this system has also six degrees of freedom, meaning three movements of translation and three of rotation. All these movement possibilities are strongly dependent on the velocity and implicitly the angular velocity of the four engines. Therefore, depending on these aspects, the following kinetic forces and moments developed and applied to the quadrotor can be distinguished: the altitude advance, the gyroscopic effect, the yaw moment, the pitch moment, the roll moment and, of course, the force of gravitational attraction. The increase or decrease of altitude is possible by simultaneously increasing or decreasing the velocity of all engines. In order to maintain a constant altitude it is necessary to drive the engines at the same velocity, each developing the same angular velocity. Unlike the altitude movement, the kinetic yaw, pitch, and roll momenta are obtained by differentiating the engine velocity. The yaw moment, or rotation around the vertical axis, is obtained by simultaneously increasing the velocity of two motors rotating in the same direction. Depending on the chosen engine group, the flight apparatus will rotate clockwise or trigonometrically.

#### *2.1. Quaternion-Based Estimator*

In order to obtain the orientation angles and to facilitate the calculus, two representations can be used, namely: Euler angles and quaternions.

Quaternions are used to express the orientation of a coordinate system to a reference system [41]. Given an angle of rotation Ψ about the axis "r, an orientation of the coordinate system B can be represented with respect to the system A as follows [41]:

$$\mathbf{q}^{\mathbf{A}}\mathbf{\hat{q}} = \left[\mathbf{q}\_1\mathbf{q}\_2\mathbf{q}\_3\mathbf{q}\_4\right] = \left[\cos\frac{\mathbf{\varPsi}}{2} - \mathbf{\hat{r}}\_\mathbf{x}\sin\frac{\mathbf{\varPsi}}{2} - \mathbf{\hat{r}}\_\mathbf{y}\sin\frac{\mathbf{\varPsi}}{2} - \mathbf{\hat{r}}\_\mathbf{x}\sin\frac{\mathbf{\varPsi}}{2}\right] \tag{1}$$

The terms "rx, "ry, "rz represent the components of the unity vector "r of the reference system A.

A very important advantage presented by this angle expression method is that the product of two quaternions <sup>C</sup> <sup>D</sup>qˆ and <sup>D</sup> <sup>E</sup> qˆ represents the orientation of the system E with respect to the reference system C.

Moreover, the orientation described by a quaternion <sup>A</sup> <sup>B</sup> qˆ <sup>=</sup> q1 q2 q3 q4 can be expressed by the rotation matrix <sup>A</sup> <sup>B</sup> R, representing the rotation of the coordinate system B with respect to the reference system A. The dependence between the quaternion terms and the rotation matrix is presented in Equation (2) [16,20].

$$\mathbf{A}\_{\mathbf{B}}^{\Lambda}\mathbf{R} = \begin{bmatrix} 2\mathbf{q}\_1^2 + 2\mathbf{q}\_2^2 - 1 & 2(\mathbf{q}\_1\mathbf{q}\_4 + \mathbf{q}\_2\mathbf{q}\_3) & 2(\mathbf{q}\_2\mathbf{q}\_4 - \mathbf{q}\_1\mathbf{q}\_3) \\ 2(\mathbf{q}\_2\mathbf{q}\_3 - \mathbf{q}\_1\mathbf{q}\_4) & 2\mathbf{q}\_1^2 + 2\mathbf{q}\_3^2 - 1 & 2(\mathbf{q}\_1\mathbf{q}\_2 + \mathbf{q}\_3\mathbf{q}\_4) \\ 2(\mathbf{q}\_1\mathbf{q}\_3 + \mathbf{q}\_2\mathbf{q}\_4) & 2(\mathbf{q}\_3\mathbf{q}\_4 - \mathbf{q}\_1\mathbf{q}\_2) & 2\mathbf{q}\_1^2 + 2\mathbf{q}\_2^4 - 1 \end{bmatrix} \tag{2}$$

Although, from a computational point of view, obtaining orientation using quaternions is more efficient, they are hard to interpret physically. Thus, in order to have a clear picture of the real movement, the orientations expressed by quaternions are transformed into representations using Euler angles. To carry out these transformations, Equations (3)–(5) could be used [21].

$$\Psi = \operatorname{atan} \left( 2\mathbf{q}\_2 \mathbf{q}\_3 - 2\mathbf{q}\_1 \mathbf{q}\_{4'} \ 2\mathbf{q}\_1^2 + 2\mathbf{q}\_2^2 - 1 \right) \tag{3}$$

$$\theta = \arcsin\left(2\mathbf{q}\_1\mathbf{q}\_3 + 2\mathbf{q}\_2\mathbf{q}\_4\right) \tag{4}$$

$$\Phi = \operatorname{atan} \left( 2\mathbf{q}\_3 \mathbf{q}\_4 - 2\mathbf{q}\_1 \mathbf{q}\_{2'} \ 2\mathbf{q}\_1^2 + 2\mathbf{q}\_4^2 - 1 \right) \tag{5}$$

In order to obtain the real values of the angles, a sensor with 9 degrees of freedom was used, consisting of an accelerometer, a gyroscope, and a magnetometer. The sensor used is from the MPU9250 family and communicates with the microcontroller via the I2C interface, at a frequency of 400 kHz. The I2C protocol is a very popular data transmission protocol, due to the multitude of advantages it presents [42]. For data filtering and estimating the orientation of the aerial vehicle, the quaternion representation described above was used. With a physical interpretation much closer to reality, the data provided by the gyroscope are filtered and estimated easily. Thus, the angular positions on the X, Y, and Z axes are arranged in a vector W as described in Equation (6). In addition to these three elements, on the first position in the vector is inserted the term 0 in order to be able to perform quaternion products.

$$\mathbf{W} = \begin{bmatrix} 0 \ \mathbf{w}\_{\mathbf{x}} \ \mathbf{w}\_{\mathbf{y}} \ \mathbf{w}\_{\mathbf{z}} \end{bmatrix} \tag{6}$$

$$\mathbf{q}\_{\text{Sensor}} \stackrel{\text{Ref}}{\mathbf{q}} \dot{\mathbf{q}} = \mathbf{q}\_{\text{Sensor}} \mathbf{q} \otimes \mathbf{W} \tag{7}$$

With the angular position arranged in the vector W it is possible to compute the orientation change of the coordinate system given by the earth to the coordinate system attached to the UAV. This calculus is represented in Equation (7).

Where the term Ref Sensorq represents the current orientation of the coordinate system given by the earth to the quadrotor coordinate system.

In order to obtain an orientation of the coordinate system attached to the quadrotor with respect to the reference one, at a time t it is necessary to perform the mathematical operations detailed in Equations (8) and (9).

$$\mathbf{^{\tiny Sensor}}\_{\mathbf{Ref}} \mathbf{\dot{q}}\_{\mathbf{g} \text{vro}, \mathbf{k}} = \frac{1}{2} \mathbf{^{\tiny Sensor}}\_{\mathbf{Ref}} \mathbf{q}\_{\text{est, k-1}} \otimes \mathbf{W} \tag{8}$$

$$\mathbf{^S r}\_{\mathbf{Ref}} \mathbf{q}\_{\mathbf{f} \circ \mathbf{r} \circ \mathbf{s}} = \mathbf{^S r}\_{\mathbf{Ref}} \mathbf{q}\_{\mathbf{est}, \ k-1} + \mathbf{^{Serors}}\_{\mathbf{Ref}} \dot{\mathbf{q}}\_{\mathbf{f} \circ \mathbf{r} \circ \mathbf{s}} \mathbf{T}\_{\mathbf{s}} \tag{9}$$

where TS represents the sampling time, and t = k·TS.

Because of the nature of the data from the accelerometer, an optimization problem can be formulated in which the orientation of the sensor Sensor Ref qˆ and, implicitly of the flight system, is given by minimizing the difference between the orientation of the reference system of the earth dref and that of the sensor, dsensor. The objective function to be minimized of is described by Equations (10) and (11), with the components detailed in (12)–(14).

$$\text{of}\begin{pmatrix} \text{Sensor} \\ \text{Rcf} \end{pmatrix} \mathbf{d}\_{\text{ref}} \text{ } \mathbf{d}\_{\text{sensor}} \text{ } \mathbf{d}\_{\text{sensor}} \text{ } \mathbf{f} \text{ } \begin{pmatrix} \text{Sensor} \\ \text{Rcf} \end{pmatrix} \otimes \begin{pmatrix} \text{Sensor} \\ \text{Rcf} \end{pmatrix} \mathbf{\hat{d}} - \mathbf{d}\_{\text{sensor}} \tag{10}$$

$$\begin{aligned} \text{of}\begin{pmatrix} \text{Sensor}\_{\text{f}} \mathbf{q}\_{\text{f}} \text{ d}\_{\text{ref}} \text{ d}\_{\text{sonos}} \end{pmatrix} =\\ \begin{bmatrix} 2\text{d}\_{\text{rx}} \Big( \frac{1}{2} - \mathbf{q}\_{3}^{2} - \mathbf{q}\_{4}^{2} \Big) + 2\text{d}\_{\text{ry}} \Big( \mathbf{q}\_{1}\mathbf{q}\_{4} + \mathbf{q}\_{2}\mathbf{q}\_{3} \Big) + 2\text{d}\_{\text{rx}} \Big( \mathbf{q}\_{2}\mathbf{q}\_{4} - \mathbf{q}\_{1}\mathbf{q}\_{3} \Big) - \mathbf{d}\_{\text{sx}} \\ 2\text{d}\_{\text{rx}} \Big( \mathbf{q}\_{2}\mathbf{q}\_{3} - \mathbf{q}\_{1}\mathbf{q}\_{4} \Big) + 2\text{d}\_{\text{ry}} \Big( \frac{1}{2} - \mathbf{q}\_{2}^{2} - \mathbf{q}\_{4}^{2} \Big) + 2\text{d}\_{\text{rx}} \Big( \mathbf{q}\_{1}\mathbf{q}\_{2} + \mathbf{q}\_{3}\mathbf{q}\_{4} \Big) - \mathbf{d}\_{\text{sy}} \\ 2\text{d}\_{\text{rx}} \big( \mathbf{q}\_{1}\mathbf{q}\_{3} + \mathbf{q}\_{2}\mathbf{q}\_{4} \Big) + 2\text{d}\_{\text{ry}} \Big( \mathbf{q}\_{3}\mathbf{q}\_{4} - \mathbf{q}\_{1}\mathbf{q}\_{2} \Big) + 2\text{d}\_{\text{rx}} \Big( \frac{1}{2} - \mathbf{q}\_{2}^{2} - \mathbf{q}\_{3}^{2} \Big) - \mathbf{d}\_{\text{sz}} \end{bmatrix} \end{aligned} \tag{11}$$

$$
\mathbf{^G}\_{\text{Ref}} \mathbf{^G \dot{q}} = \begin{bmatrix} \mathbf{q}\_1 \ \mathbf{q}\_2 \ \mathbf{q}\_3 \ \mathbf{q}\_4 \end{bmatrix} \tag{12}
$$

$$\mathbf{d}\_{\rm ref} = \begin{bmatrix} 0 \ \mathbf{d}\_{\rm rx} \ \mathbf{d}\_{\rm ry} \ \mathbf{d}\_{\rm rx} \end{bmatrix} \tag{13}$$

$$\mathbf{d}\_{\text{sensor}} = \begin{bmatrix} 0 \ \mathbf{d}\_{\text{sx}} \ \mathbf{d}\_{\text{sy}} \ \mathbf{d}\_{\text{sz}} \end{bmatrix} \tag{14}$$

In order to solve this optimization problem, the conjugate gradient method is used, a simple, efficient method that requires a relatively low computing power [43]. However, the conjugate gradient

method presents a number of disadvantages related to the algorithm step, μ and the initial point Sensor Ref qˆ 0. Equations (15) and (16) describe the estimation of future orientation Sensor Ref qˆ <sup>k</sup>+1.

$$\mathbf{^S\_{Ref}}\hat{\mathbf{q}}\_{k+1} = \mathbf{^S\_{Ref}}\hat{\mathbf{q}}\_k - \mu \frac{\mathbf{F}}{\|\mathbf{F}\|}\tag{15}$$

$$\mathbf{F} = \frac{\partial \mathbf{f}^{\text{(Serson)}}\_{\text{Ref}} \mathbf{\hat{q}}\_{\text{\prime}} \mathbf{d}\_{\text{ref}\prime} \mathbf{d}\_{\text{sersor}}}{\partial \mathbf{\hat{f}}^{\text{(Serson)}}\_{\text{Ref}} \mathbf{\hat{q}}\_{\text{\prime}} \mathbf{d}\_{\text{ref}}} \text{cf}^{\text{(Serson)}}\_{\text{Ref}} \mathbf{\hat{q}}\_{\text{\prime}} \text{d}\_{\text{ref}\prime} \text{d}\_{\text{sersor}} \text{)} \tag{16}$$

The general cost function of given in (10) can be simplified to be easy to implement even in a low-cost microcontroller. Because of the fact that by convention gravitational acceleration determines only the Z axis of the reference system, this objective function can be expressed as in Equation (17), while the vectors dref and dsensor are given in (18) and (19).

$$\mathbf{M} \mathbf{f} \begin{pmatrix} \mathbf{S}\_{\text{sensor}} \mathbf{q}\_{\text{}} \ \mathbf{d}\_{\text{ref}} \ \mathbf{d}\_{\text{ref}} \ \mathbf{d}\_{\text{sensor}} \end{pmatrix} = \begin{bmatrix} 2 \begin{pmatrix} \mathbf{q}\_{2} \mathbf{q}\_{4} - \mathbf{q}\_{1} \mathbf{q}\_{3} \end{pmatrix} - \mathbf{d}\_{\text{x}} \\ 2 \begin{pmatrix} \mathbf{q}\_{1} \mathbf{q}\_{2} + \mathbf{q}\_{3} \mathbf{q}\_{4} \end{pmatrix} - \mathbf{d}\_{\text{y}} \\ 2 \begin{pmatrix} \frac{1}{2} - \mathbf{q}\_{2}^{2} - \mathbf{q}\_{3}^{2} \end{pmatrix} - \mathbf{d}\_{\text{z}} \end{bmatrix} \tag{17}$$

$$\mathbf{d}\_{\text{ref}} = \begin{bmatrix} 0 \ 0 \ 0 \ 1 \end{bmatrix} \tag{18}$$

$$\mathbf{d}\_{\text{sensor}} = \begin{bmatrix} 0 \ \mathbf{d}\_{\text{x}} \ \mathbf{d}\_{\text{y}} \ \mathbf{d}\_{\text{z}} \end{bmatrix} \tag{19}$$

The data obtained from the magnetometer will be processed in the same way as the data obtained from the accelerometer, but with a more laborious processing given by the decomposition of the earth's magnetic field in both a component on the X axis and one on the Z axis. To obtain the next orientations Sensor Ref qˆ <sup>k</sup>+1, the same conjugate gradient algorithm will be used. Equation (20) describes the objective function, with the terms detailed in (21) and (22), while Equation (23) presents the gradient of the objective function.

$$\text{of}\begin{pmatrix} \text{Sensor}\_{\text{f}} \mathbf{\hat{q}}\_{\text{f}} \text{ m}\_{\text{ref}} \text{ m}\_{\text{sero}} \end{pmatrix} = \begin{bmatrix} 2\text{m}\_{\text{rx}} \begin{pmatrix} \frac{1}{2} - \mathbf{q}\_{3}^{2} - \mathbf{q}\_{4}^{2} \end{pmatrix} + 2\text{m}\_{\text{rx}} \begin{pmatrix} \mathbf{q}\_{2} \mathbf{q}\_{4} - \mathbf{q}\_{1} \mathbf{q}\_{3} \end{pmatrix} - \mathbf{m}\_{\text{sx}} \\ 2\text{m}\_{\text{rx}} \begin{pmatrix} \mathbf{q}\_{2} \mathbf{q}\_{3} - \mathbf{q}\_{1} \mathbf{q}\_{4} \end{pmatrix} + 2\text{m}\_{\text{rx}} \begin{pmatrix} \mathbf{q}\_{1} \mathbf{q}\_{2} + \mathbf{q}\_{3} \mathbf{q}\_{4} \end{pmatrix} - \mathbf{m}\_{\text{sy}} \\ 2\text{m}\_{\text{rx}} \begin{pmatrix} \mathbf{q}\_{1} \mathbf{q}\_{3} + \mathbf{q}\_{2} \mathbf{q}\_{4} \end{pmatrix} + 2\text{m}\_{\text{rx}} \begin{pmatrix} \frac{1}{2} - \mathbf{q}\_{2}^{2} - \mathbf{q}\_{3}^{2} \end{pmatrix} - \mathbf{m}\_{\text{sz}} \end{pmatrix} \end{pmatrix} \tag{20}$$

$$\mathbf{m\_{ref}} = \begin{bmatrix} 0 \ \mathbf{m\_{rx}} \ 0 \mathbf{m\_{rz}} \end{bmatrix} \tag{21}$$

$$\mathbf{m}\_{\text{seristor}} = \begin{bmatrix} 0 \ \mathbf{m}\_{\text{sx}} \ \mathbf{m}\_{\text{sy}} \ \mathbf{m}\_{\text{sz}} \end{bmatrix} \tag{22}$$

$$\mathbf{F} = \frac{\partial \text{of}\left(^{\text{Sensor}}\_{\text{Ref}} \mathbf{\hat{q}}\_{\text{}} \cdot \mathbf{m}\_{\text{ref}} \cdot \mathbf{m}\_{\text{sensor}}\right)}{\partial \left(^{\text{Sensor}}\_{\text{Ref}} \mathbf{\hat{q}}\_{\text{}} \cdot \mathbf{m}\_{\text{ref}}\right)} \text{of}\left(^{\text{Sensor}}\_{\text{Rcf}} \mathbf{\hat{q}}\_{\text{}} \cdot \mathbf{m}\_{\text{ref}} \cdot \mathbf{m}\_{\text{sensor}}\right) \tag{23}$$

In order to obtain both a measurement and an accurate estimation of the orientation of the quadrotor, it is necessary to compose the two objective functions presented in Equations (10) (or the simplified form in (17)) and (20). Also, the gradient of both functions will be used to implement the conjugate gradient algorithm for the combination of functions. The composition will be noted with fcom and the gradient of this compound function will be noted by Fcom. In addition, to make the algorithm more efficient, the step μ will be variable and recomputed at each iteration, as shown in Equation (24). The algorithm and the gradient of the new objective function are presented in Equations (25) and (26):

$$\mu\_{\mathfrak{k}} = |\mathfrak{a}|^{\text{Actual}}\_{\text{Ref}} \dot{\mathfrak{q}}\_{\text{\textquotedblleft}\text{\textquotedblright}\text{\textquotedblright}\text{\textquotedblright}\text{\textquotedblleft}\text{\textquotedblright}\text{\textquotedblright}}\tag{24}$$

$$\mathbf{F}\_{\text{Sref}}^{\text{Serors}} \mathbf{q}\_{\text{com},\text{k}} = \mathbf{\tilde{s}}\_{\text{Ref}}^{\text{Serors}} \mathbf{\hat{q}}\_{\text{est,k}-1} - \mu\_{\text{t}} \frac{\mathbf{F}\_{\text{com}}}{\|\mathbf{F}\_{\text{com}}\|} \tag{25}$$

$$\mathbf{F}\_{\text{Com}} = \begin{bmatrix} \frac{\partial \mathbf{f}\left(\frac{\text{Sensor}}{\text{Ref}}\mathbf{\hat{d}}\_{\text{Out},k-1}, \mathbf{d}\_{\text{Sensor}}\right)}{\partial \left(\mathbf{\hat{S}}^{\text{Sensor}}\mathbf{\hat{d}}\_{\text{Out},k-1}\right)} \mathbf{f}\left(\mathbf{\hat{S}}^{\text{Sensor}}\mathbf{\hat{d}}\_{\text{Cost},k-1}, \mathbf{d}\_{\text{Sensor}}\right) \\\frac{\partial \mathbf{f}\left(\mathbf{\hat{S}}^{\text{Sensor}}\mathbf{\hat{d}}\_{\text{Out},k-1}, \mathbf{m}\_{\text{ref}}, \mathbf{m}\_{\text{Sensor}}\right)}{\partial \left(\mathbf{\hat{S}}^{\text{Sensor}}\mathbf{\hat{d}}\_{\text{Ref}}\mathbf{\hat{d}}\_{\text{ref},k-1}, \mathbf{m}\_{\text{ref}}\right)} \mathbf{f}\left(\mathbf{\hat{S}}^{\text{Sensor}}\mathbf{\hat{d}}\_{\text{Cost},k-1}, \mathbf{m}\_{\text{ref}}, \mathbf{m}\_{\text{Sensor}}\right) \end{bmatrix} \tag{26}$$

where α is a constant chosen experimentally to minimize the measurements noise from the accelerometer and magnetometer, TS is the sampling period, Actual Ref . qgyro,k, represents the orientation given by the gyroscope, computed using Equation (8).

Because of the fusion of measurements from the gyroscope, Sensor Ref qgyro,k and those from the accelerometer and magnetometer Sensor Ref qcom,k, a weighted, very accurate estimate is obtained, as presented in Equation (27). The weight Pk will be computed at each iteration based on the step μt, a control constant β, and the sampling period TS, as in (28).

$$\mathbf{P}\_{\text{Safe}}^{\text{Sensor}} \mathbf{\hat{q}\_{\text{est,k}}} = \mathbf{P}\_{\text{k}} \mathbf{^{Sensor}} \mathbf{q\_{com,k}} + (1 - \mathbf{P}\_{\text{k}}) \mathbf{^{Sensor}}\_{\text{Ref}} \mathbf{q\_{glyro,k}} \tag{27}$$

$$P\_{\mathbf{k}} = \frac{\beta}{\frac{\mu\_{\mathbf{t}}}{\Gamma\_{\mathbf{E}}} + \beta} \tag{28}$$

The proposed filter in (27) and (28) ensures an accurate estimation such that Sensor Ref qˆ est,k <sup>→</sup> Sensor Ref qk as k→∞. This can be easily proved using the classical Lyapunov function.

At each iteration, after obtaining the current estimate, Equations (3)–(5) are used to express the Euler angle orientation, which gives a much easier to understand perspective on the movement of the quadrotor.

After obtaining the orientation angles and converting them from quaternions to Euler angles, at each iteration the rotation matrices Rx(Φ), Ry(θ), and Rz(Ψ) will be constructed. With these matrices, the rotation matrix of the entire system Rxyz(Ψ, θ, Φ) is computed, as described in Equations (29)–(32).

$$\mathbf{R}\_{\mathbf{x}}(\Phi) = \begin{bmatrix} 1 & 0 & 0 \\ 0 & \mathbf{c}(\Phi) & -\mathbf{s}(\Phi) \\ 0 & \mathbf{s}(\Phi) & \mathbf{c}(\Phi) \end{bmatrix} \tag{29}$$

$$\mathbf{R}\_{\mathbf{Y}}(\boldsymbol{\theta}) = \begin{bmatrix} \mathbf{c}(\boldsymbol{\theta}) & \mathbf{0} & \mathbf{s}(\boldsymbol{\theta}) \\ \mathbf{0} & \mathbf{1} & \mathbf{0} \\ -\mathbf{s}(\boldsymbol{\theta}) & \mathbf{0} & \mathbf{c}(\boldsymbol{\theta}) \end{bmatrix} \tag{30}$$

$$\mathbf{R}\_{\mathbf{x}}(\Psi) = \begin{bmatrix} \mathbf{c}(\Psi) & -\mathbf{s}(\Psi) & 0\\ \mathbf{s}(\Psi) & \mathbf{c}(\Psi) & 0\\ 0 & 0 & 1 \end{bmatrix} \tag{31}$$

$$\begin{bmatrix} \mathbf{R}\_{\mathbf{xyz}}(\Phi,\theta,\Psi) = \mathbf{R}\_{\mathbf{x}}(\Psi) \cdot \mathbf{R}\_{\mathbf{y}}(\theta) \cdot \mathbf{R}\_{\mathbf{z}}(\Phi) = \\ \mathbf{c}(\theta) \mathbf{c}(\Psi) & \mathbf{s}(\Phi) \mathbf{s}(\theta) \mathbf{c}(\Psi) - \mathbf{c}(\Phi) \mathbf{s}(\Psi) & \mathbf{c}(\Phi) \mathbf{s}(\theta) \mathbf{c}(\Psi) + \mathbf{s}(\Phi) \mathbf{s}(\Psi) \\ \mathbf{c}(\theta) \mathbf{s}(\Psi) & \mathbf{s}(\Phi) \mathbf{s}(\theta) \mathbf{s}(\Psi) + \mathbf{c}(\Phi) \mathbf{c}(\Psi) & \mathbf{c}(\Phi) \mathbf{s}(\theta) \mathbf{s}(\Psi) - \mathbf{s}(\Phi) \mathbf{c}(\Psi) \\ - \mathbf{s}(\theta) & \mathbf{s}(\Phi) \mathbf{c}(\theta) & \mathbf{c}(\Phi) \mathbf{c}(\theta) \end{bmatrix} \tag{32}$$

where c(Ψ) = cos(Ψ), s(Ψ) = sin(Ψ), c(θ) = cos(θ), s(θ) = sin(θ), c(Φ) = cos(Φ), s(Φ) = sin(Φ).

#### *2.2. Quadrotor Kinematic and Dynamic Model*

In order to establish an efficient mathematical model, as close as possible to the reality, which ensures greater system controllability, it is necessary to use the Equations of Newton classical mechanics and of Euler for angular motions. It is also necessary to take into account both the relative movements of the fixed coordinate system (in this case, the earth), as well as the relative dynamics of the coordinate system attached to the quadrotor. Thus, two vectors, Pp and Pa, will be used, described

by Equations (33) and (34). Pp is the vector of the linear and angular positions of the flight system relative to earth, while Pa is the vector of the linear and angular velocities of the quadrotor.

$$P\_{\mathcal{P}} = \left[ \begin{array}{cccc} \times & \text{y} & \text{z} & \Phi & \theta & \Psi \end{array} \right]^{\text{T}} \tag{33}$$

$$P\_\mathbf{a} = \begin{bmatrix} \mathbf{u} & \mathbf{v} & \mathbf{w} & \mathbf{p} & \mathbf{q} & \mathbf{r} \end{bmatrix}^\mathrm{T} \tag{34}$$

To link these two vectors, the rotation matrix Rxyz(Φ, θ, Ψ) and a matrix of angular velocity transformations, Tv(Φ, θ) is used, derived from the inverse of the derivative of the Euler angle change rate. Thus in Equations (35)–(40) the dependencies between the vectors Pp and Pa are detailed.

$$\mathbf{v}\_{\mathbf{P}} = \begin{bmatrix} \ \dot{\mathbf{x}} & \ \dot{\mathbf{y}} & \ \dot{\mathbf{z}} \end{bmatrix}^{\mathrm{T}} \tag{35}$$

$$
\boldsymbol{\omega}\_{\mathcal{P}} = \begin{bmatrix} \dot{\boldsymbol{\Phi}} & \dot{\boldsymbol{\Phi}} & \dot{\boldsymbol{\Psi}} \end{bmatrix}^{\mathrm{T}} \tag{36}
$$

$$\mathbf{v\_{a}} = \begin{bmatrix} \mathbf{u} & \mathbf{v} & \mathbf{w} \end{bmatrix}^{\mathrm{T}} \tag{37}$$

$$
\omega\_{\mathbf{a}} = \left[ \begin{array}{cc} \mathbf{p} & \mathbf{q} & \mathbf{r} \end{array} \right]^{\mathrm{T}} \tag{38}
$$

$$\mathbf{v}\_{\mathbf{P}} = \mathcal{R}\_{\mathbf{xyz}}(\Phi, \theta, \Psi) \cdot \mathbf{v}\_{\mathbf{a}} \tag{39}$$

$$
\omega\_{\mathbf{p}} = \operatorname{T}\_{\mathrm{V}}(\Phi, \theta) \cdot \omega\_{\mathbf{a}} \tag{40}
$$

The vectors vp and ω<sup>p</sup> are the derivatives of the linear and angular positions of Pp, while va and ω<sup>a</sup> are the linear and angular velocities of the vector Pa. The matrix of angular velocity transformations Tv(Φ, θ) is constructed as described by Equation (41).

$$\mathbf{T}\_{\mathbf{v}}(\Phi,\boldsymbol{\theta}) = \begin{bmatrix} 1 & \mathbf{c}(\boldsymbol{\Phi})\tan(\boldsymbol{\theta}) & \mathbf{c}(\boldsymbol{\Phi})\tan(\boldsymbol{\theta}) \\ 0 & \mathbf{c}(\boldsymbol{\Phi}) & -\mathbf{s}(\boldsymbol{\Phi}) \\ 0 & \frac{\mathbf{s}(\boldsymbol{\Phi})}{\mathbf{c}(\boldsymbol{\Phi})} & \frac{\mathbf{c}(\boldsymbol{\Phi})}{\mathbf{c}(\boldsymbol{\Phi})} \end{bmatrix} \tag{41}$$

Performing the multiplications leads to the kinematic model:

$$\begin{cases}
\dot{\mathbf{x}} = \mathbf{u}\mathbf{c}(\Psi)\mathbf{c}(\theta) - \mathbf{v}[\mathbf{c}(\Phi)\mathbf{s}(\Psi) - \mathbf{c}(\Psi)\mathbf{s}(\Phi)\mathbf{s}(\theta)] + \mathbf{w}[\mathbf{s}(\Phi)\mathbf{s}(\Psi) + \mathbf{c}(\Phi)\mathbf{s}(\Psi)\mathbf{s}(\theta)] \\
\dot{\mathbf{y}} = \mathbf{u}\mathbf{c}(\theta)\mathbf{c}(\Psi) + \mathbf{v}[\mathbf{c}(\Phi)\mathbf{c}(\Psi) + \mathbf{s}(\Phi)\mathbf{s}(\theta)\mathbf{s}(\Psi)] - \mathbf{w}[\mathbf{c}(\Psi)\mathbf{s}(\Phi) - \mathbf{c}(\Phi)\mathbf{s}(\Psi)\mathbf{s}(\theta)] \\
\dot{\mathbf{z}} = -\mathbf{u}\mathbf{c}(\theta) + \mathbf{v}\mathbf{c}(\theta)\mathbf{s}(\Phi) + \mathbf{w}\mathbf{c}(\Phi)\mathbf{c}(\theta) \\
\dot{\Phi} = \mathbf{p} + \mathbf{q}\mathbf{s}(\Phi)\mathbf{t}(\theta) + \mathbf{r}\mathbf{c}(\Phi)\mathbf{t}(\theta) \\
\dot{\Phi} = \mathbf{q}\mathbf{c}(\Phi) - \mathbf{r}\mathbf{s}(\Phi) \\
\dot{\Psi} = \mathbf{q}\frac{\mathbf{s}(\Phi)}{\mathbf{c}(\Phi)} + \mathbf{q}\frac{\mathbf{c}(\Phi)}{\mathbf{c}(\Phi)} \\
\end{cases} \tag{42}$$

From Newton's laws, the forces acting on the quadrotor can be determined. These will be denoted with vector Fa and calculated as described in Equations (43) and (44).

$$\mathbf{F\_a = m\_q(\omega\_\mathbf{a} \times \mathbf{v\_a + \dot{v}\_a)}} \tag{43}$$

$$\mathbf{F\_a} = \begin{bmatrix} \ f\_\mathbf{x} & \ f\_\mathbf{y} & \ f\_\mathbf{z} \end{bmatrix}^\mathrm{T} \tag{44}$$

where mq denotes the mass of the quadrotor, " × " is the vector product of the linear and angular velocity relative to the quadrotor coordinate system, while . . va is the linear acceleration.

Similar to the computation of the force, the angular velocity applied to the quadrotor will also be determined from Euler's Equation. These velocities will be noted with Ma, and are strongly dependent on the inertia matrix I, as it is presented in Equations (45)–(47).

$$\mathbf{M\_{a}} = \mathbf{I} \cdot \dot{\boldsymbol{\omega}}\_{a} + \boldsymbol{\omega}\_{a} \times (\mathbf{I} \cdot \boldsymbol{\omega}\_{a}) \tag{45}$$

$$\mathbf{M\_{3}} = \begin{bmatrix} \mathbf{m\_{3}} & \mathbf{m\_{Y}} & \mathbf{m\_{3}} \end{bmatrix}^{\mathrm{T}} \tag{46}$$

$$\mathbf{I} = \begin{bmatrix} \mathbf{I}\_{\mathbf{x}} & \mathbf{0} & \mathbf{0} \\ \mathbf{0} & \mathbf{I}\_{\mathbf{y}} & \mathbf{0} \\ \mathbf{0} & \mathbf{0} & \mathbf{I}\_{\mathbf{z}} \end{bmatrix} \tag{47}$$

Combining Equations (44) and (46), the dynamic model of the quadrotor relative to its own coordinate system can be expressed as:

$$\begin{cases} \mathbf{f}\_{\mathbf{x}} = \mathbf{m}(\dot{\mathbf{u}} + \mathbf{q}\mathbf{w} - \mathbf{r}\mathbf{v}) \\ \mathbf{f}\_{\mathbf{y}} = \mathbf{m}(\dot{\mathbf{v}} - \mathbf{p}\mathbf{w} + \mathbf{r}\mathbf{u}) \\ \mathbf{f}\_{\mathbf{z}} = \mathbf{m}(\dot{\mathbf{w}} + \mathbf{p}\mathbf{v} - \mathbf{q}\mathbf{u}) \\ \mathbf{m}\_{\mathbf{x}} = \dot{\mathbf{p}}\mathbf{I}\_{\mathbf{x}} - \mathbf{q}\mathbf{r}\mathbf{I}\_{\mathbf{y}} + \mathbf{q}\mathbf{r}\mathbf{I}\_{\mathbf{z}} \\ \mathbf{m}\_{\mathbf{y}} = \mathbf{p}\mathbf{r}\mathbf{I}\_{\mathbf{x}} + \dot{\mathbf{q}}\mathbf{I}\_{\mathbf{y}} - \mathbf{p}\mathbf{r}\mathbf{I}\_{\mathbf{z}} \\ \mathbf{m}\_{\mathbf{z}} = -\mathbf{p}\mathbf{q}\mathbf{I}\_{\mathbf{x}} + \mathbf{p}\mathbf{q}\mathbf{I}\_{\mathbf{y}} + \dot{\mathbf{r}}\mathbf{I}\_{\mathbf{z}} \end{cases} \tag{48}$$

The forces and velocities described above can also be expressed by Equations (49) and (50).

$$\mathbf{F\_a = m\_q g R\_{xyz} \left(\Phi, \Theta, \Psi\right)^T \cdot \mathbf{\dot{e\_z} - f\_p} \cdot \mathbf{\dot{e\_3} + f\_v}}\tag{49}$$

$$\mathbf{M\_a = \tau\_a - g\_a + \tau\_v}\tag{50}$$

In the above expression mq means the total mass of the quadrotor, g is the gravitational acceleration, eˆz and eˆ3 are the unit vectors on the Z axis of the reference coordinate system, respectively of the coordinate system attached to the quadrotor. The element fp represents the total propulsion force developed by the engines, and fv <sup>=</sup> fvx fvy fvz <sup>T</sup> represents the disturbances or forces that are opposed to the rotation of each engine, caused by air currents. τ<sup>a</sup> represents the angular velocity generated by the velocity differences of the four motors, while τ<sup>v</sup> stands for the angular velocities produced by air currents on each motor, detailed in Equations (51) and (52). ga are the gyroscope moments caused by the combined velocities of the four motors. Given the fact that the inertia of the motors is negligible compared to the developed force, the gyroscopic moments may be neglected from Equation (50).

$$
\boldsymbol{\tau\_{\mathbf{a}}} = \begin{bmatrix} \ \boldsymbol{\tau\_{\mathbf{x}}} & \ \boldsymbol{\tau\_{\mathbf{y}}} & \ \boldsymbol{\tau\_{\mathbf{z}}} \end{bmatrix}^{\mathrm{T}} \tag{51}
$$

$$
\boldsymbol{\pi}\_{\rm V} = \begin{bmatrix} \boldsymbol{\pi}\_{\rm vx} & \boldsymbol{\pi}\_{\rm vy} & \boldsymbol{\pi}\_{\rm vz} \end{bmatrix}^{\rm T} \tag{52}
$$

Replacing these new Equations for forces and velocities, a new dynamic model is obtained:

$$\begin{cases} \begin{aligned} &-\mathbf{m\_{q}gs(\boldsymbol{\theta})} + \mathbf{f\_{vx}} = \mathbf{m\_{q}(\dot{u} + \mathbf{q}\mathbf{v} - \mathbf{r}\mathbf{v})} \\ &\mathbf{m\_{q}gc(\boldsymbol{\theta})s(\boldsymbol{\theta}) + \mathbf{f\_{vy}} = \mathbf{m\_{q}(\dot{v} - \mathbf{p}\mathbf{v} + \mathbf{r}\mathbf{u})} \\ &\mathbf{m\_{q}gc(\boldsymbol{\theta})c(\boldsymbol{\theta}) + \mathbf{f\_{vz}} - \mathbf{f\_{P}} = \mathbf{m\_{q}(\dot{w} + \mathbf{p}\mathbf{v} - \mathbf{q}\mathbf{u})} \\ &\mathbf{\tau\_{x} + \tau\_{\forall\mathbf{x}} = \dot{\mathbf{p}}\mathbf{I\_{x}} - \mathbf{q}\mathbf{r}\mathbf{I\_{y}} + \mathbf{q}\mathbf{r}\mathbf{I\_{z}} \\ &\tau\_{\mathbf{y}} + \tau\_{\forall\mathbf{y}} = \mathbf{p}\mathbf{r}\mathbf{I\_{x}} + \dot{\mathbf{q}}\mathbf{I\_{y}} - \mathbf{p}\mathbf{r}\mathbf{I\_{z}} \\ &\tau\_{\mathbf{z}} + \tau\_{\forall\mathbf{z}} = -\mathbf{p}\mathbf{q}\mathbf{I\_{x}} + \mathbf{p}\mathbf{q}\mathbf{I\_{y}} + \dot{\mathbf{r}}\mathbf{I\_{z}} \end{aligned} \tag{53}$$

In order to control the quadrotor, the dependence between the propulsion force fp, velocity <sup>τ</sup>a, and the motor's angular velocities <sup>Ω</sup><sup>a</sup> <sup>=</sup> Ω<sup>1</sup> Ω<sup>2</sup> Ω<sup>3</sup> Ω<sup>4</sup> needs to be introduced in the model, using Equation (54).

$$\begin{cases} \mathbf{f}\_{\mathbf{p}} = \mathbf{b} \big( \Omega\_1^2 + \Omega\_2^2 + \Omega\_3^2 + \Omega\_4^2 \big) \\ \quad \pi\_{\mathbf{x}} = \mathbf{b} \big( \Omega\_1^2 + \Omega\_2^2 - \Omega\_3^2 - \Omega\_4^2 \big) \\ \quad \pi\_{\mathbf{y}} = \mathbf{b} \big( \Omega\_1^2 + \Omega\_4^2 - \Omega\_2^2 - \Omega\_3^2 \big) \\ \quad \pi\_{\mathbf{z}} = \mathbf{d} \big( \Omega\_1^2 + \Omega\_3^2 - \Omega\_2^2 - \Omega\_4^2 \big) \end{cases} \tag{54}$$

where b is a propulsion coefficient and d is the aerodynamic resistance coefficient. The term l represents the distance from the center of gravity of the quadrotor to the center of rotation of the engine. This term is equal for all four arms of the quadrotor. In addition, replacing the terms obtained from Equation (54) in (53) leads to a new expression of the dynamic model, given by:

⎧ ⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎨ ⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎩ −mqg s(θ) + fvx = mq . <sup>u</sup> <sup>+</sup> qw <sup>−</sup> rv mqg c(θ)s(Φ) + fvy = mq( . v − pw + ru) mqgc(θ)c(Φ) + fvz − b Ω<sup>2</sup> <sup>1</sup> <sup>+</sup> <sup>Ω</sup><sup>2</sup> <sup>2</sup> <sup>+</sup> <sup>Ω</sup><sup>2</sup> <sup>3</sup> <sup>+</sup> <sup>Ω</sup><sup>2</sup> 4 = mq . <sup>w</sup> <sup>+</sup> pv <sup>−</sup> qu b · l Ω<sup>2</sup> <sup>1</sup> <sup>+</sup> <sup>Ω</sup><sup>2</sup> <sup>2</sup> <sup>−</sup> <sup>Ω</sup><sup>2</sup> <sup>3</sup> <sup>−</sup> <sup>Ω</sup><sup>2</sup> 4 <sup>+</sup> <sup>τ</sup>vx <sup>=</sup> . pIx − qrIy + qrIz b · l Ω<sup>2</sup> <sup>1</sup> <sup>+</sup> <sup>Ω</sup><sup>2</sup> <sup>4</sup> <sup>−</sup> <sup>Ω</sup><sup>2</sup> <sup>2</sup> <sup>−</sup> <sup>Ω</sup><sup>3</sup> 2 <sup>+</sup> <sup>τ</sup>vy <sup>=</sup> prIx <sup>+</sup> . qIy − prIz d Ω<sup>2</sup> <sup>1</sup> <sup>+</sup> <sup>Ω</sup><sup>2</sup> <sup>3</sup> <sup>−</sup> <sup>Ω</sup><sup>2</sup> <sup>2</sup> <sup>−</sup> <sup>Ω</sup><sup>2</sup> 4 <sup>+</sup> <sup>τ</sup>vz <sup>=</sup> <sup>−</sup>pqIx <sup>+</sup> pqIy <sup>+</sup> . rIz (55)

This model will be used as predictor in the control structure.

#### *2.3. Quadrotor State Space Model Used for Controller Design*

The next step consists in the model design in a state space form, in order to easily apply the controller design methods. Therefore, the state vector X, the input vector u, and the output vector y will be chosen as it is presented below:

$$\mathbf{X} = \begin{bmatrix} \Phi & \theta & \Psi & \mathbf{p} & \mathbf{q} & \mathbf{r} & \mathbf{u} & \mathbf{v} & \mathbf{w} & \mathbf{x} & \mathbf{y} & \mathbf{z} \end{bmatrix}^{\mathrm{T}} \tag{56}$$

$$\mathbf{u} = \begin{bmatrix} \ \mathbf{f}\_{\text{P}} & \ \boldsymbol{\pi}\_{\text{X}} & \ \boldsymbol{\pi}\_{\text{Y}} & \ \boldsymbol{\pi}\_{\text{Z}} \end{bmatrix}^{\text{T}} \tag{57}$$

<sup>y</sup> <sup>=</sup> Φ θ Ψ fp <sup>T</sup> (58)

Using this state vector X and Equations (42) and (55), one can determine the derivative of this state vector, . X:

⎧ ⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎨ ⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎩ . <sup>Φ</sup> <sup>=</sup> <sup>p</sup> <sup>+</sup> qs(Φ)t(θ) <sup>+</sup> rc(Φ)t(θ) . <sup>θ</sup> <sup>=</sup> qc(Φ) <sup>−</sup> rs(Φ) . <sup>Ψ</sup> = <sup>q</sup>s(Φ) <sup>c</sup>(θ) + r c(Φ) <sup>c</sup>(θ) . <sup>p</sup> = Iy−Iz Ix qr <sup>+</sup> <sup>τ</sup>x+τvx Ix . q = Iz−Ix Iy pr <sup>+</sup> <sup>τ</sup>y+τvy Iy . <sup>r</sup> = Ix−Iy Iz pq <sup>+</sup> <sup>τ</sup>z+τvz Iz . <sup>u</sup> <sup>=</sup> rv <sup>−</sup> qw <sup>−</sup> gs(θ) <sup>+</sup> fvx <sup>m</sup> . <sup>v</sup> <sup>=</sup> pw <sup>−</sup> ru <sup>+</sup> gs(Φ)c(θ) <sup>+</sup> fvy <sup>m</sup> . <sup>w</sup> <sup>=</sup> qu <sup>−</sup> pv <sup>+</sup> gc(Φ)c(θ) <sup>+</sup> fvz−fp . <sup>m</sup> <sup>x</sup> <sup>=</sup> uc(Ψ)c(θ) <sup>−</sup> <sup>v</sup>[c(Φ)s(Ψ) <sup>−</sup> <sup>c</sup>(Ψ)s(Φ)s(θ)] <sup>+</sup> <sup>w</sup>[s(Φ)s(Ψ) <sup>+</sup> <sup>c</sup>(Φ)c(Ψ)s(θ)] . <sup>y</sup> <sup>=</sup> uc(θ)s(Ψ) <sup>+</sup> <sup>v</sup>[c(Φ)c(Ψ) <sup>+</sup> <sup>s</sup>(Φ)s(θ)s(Ψ)] <sup>−</sup> <sup>w</sup>[c(Ψ)s(Φ) <sup>−</sup> <sup>c</sup>(Φ)s(Ψ)s(θ)] . z = −us(θ) + vc(θ)s(Φ) + wc(Φ)c(θ) (59)

As can be seen from Equation (59), the system is strongly nonlinear, presenting major problems in the design of a control system based on models. In order to be linearized, a Jacobian matrix is used, at certain chosen equilibrium points. Given that it is desired that in the absence of a command the system be maintained at a fixed point at a predetermined altitude, the equilibrium points are chosen as described below.

$$\mathbf{X\_e = \begin{bmatrix} 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & \mathbf{x\_e} & \mathbf{y\_e} & \mathbf{z\_e} \end{bmatrix}^\mathrm{T} \tag{60}$$

$$\mathbf{u\_e} = \begin{bmatrix} \ m\_\mathbf{q} \cdot \mathbf{g} & 0 & 0 & 0 \end{bmatrix}^T \tag{61}$$

where g = 9.8 <sup>m</sup> s2 is the gravitational acceleration and mq is the total mass of the quadrotor.

Also, since the trigonometric dependencies between the system states do not disappear even after the linearization by the Jacobian method, a preliminary simplification is made. Thus, in order to eliminate the trigonometric functions from the system model, all the values of the sine functions are approximated with their argument, respectively the cosine functions with 1. The approximate model, resulting from the simplification, has the form as described in (62).

⎧ ⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎨ ⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎩ . <sup>Φ</sup> <sup>=</sup> <sup>p</sup> <sup>+</sup> <sup>q</sup>Φ<sup>θ</sup> <sup>+</sup> <sup>r</sup><sup>θ</sup> . <sup>θ</sup> <sup>=</sup> <sup>q</sup> <sup>−</sup> <sup>r</sup><sup>Φ</sup> . Ψ = qΦ + r . <sup>p</sup> = Iy−Iz Ix qr <sup>+</sup> <sup>τ</sup>x+τvx Ix . q = Iz−Ix Iy pr <sup>+</sup> <sup>τ</sup>y+τvy Iy . <sup>r</sup> = Ix−Iy Iz pq <sup>+</sup> <sup>τ</sup>z+τvz Iz . <sup>u</sup> <sup>=</sup> rv <sup>−</sup> qw <sup>−</sup> <sup>g</sup><sup>θ</sup> <sup>+</sup> fvx mq . <sup>v</sup> <sup>=</sup> pw <sup>−</sup> ru <sup>+</sup> <sup>g</sup><sup>Φ</sup> <sup>+</sup> fvy mq . <sup>w</sup> <sup>=</sup> qu <sup>−</sup> pv <sup>+</sup> <sup>g</sup> <sup>+</sup> fvz−fp mq . <sup>x</sup> <sup>=</sup> <sup>u</sup> <sup>−</sup> <sup>v</sup>(<sup>Ψ</sup> <sup>−</sup> <sup>Φ</sup>θ) <sup>+</sup> <sup>w</sup>(ΦΨ <sup>+</sup> <sup>θ</sup>) . <sup>y</sup> <sup>=</sup> <sup>u</sup><sup>Ψ</sup> <sup>+</sup> <sup>v</sup>(<sup>1</sup> <sup>+</sup> <sup>Φ</sup>θΨ) <sup>−</sup> <sup>w</sup>(<sup>Φ</sup> <sup>−</sup> <sup>Ψ</sup>θ) . z = −uθ + vΦ + w (62)

In the state space form, the system is . X = h(X, **u**). Applying the linearization by the Jacobian matrix method and using the equilibrium points expressed in (60) and (61), the linearized state space system became: .

$$\begin{cases} \dot{\mathbb{X}} = \mathbb{A}\_{\mathbb{e}} \cdot \mathbb{X} + \mathbb{B}\_{\mathbb{e}} \cdot \mathbf{u} \\ \mathbf{y} = \mathbb{C} \cdot \mathbb{X} \end{cases} \tag{63}$$

with

$$\mathbf{A\_{e}} = \frac{\partial \mathbf{h}(\mathbb{X}, \mathbf{u})}{\partial \mathbb{X}} \Big|\_{\mathbf{u}} \mathbb{X} = \mathbf{u\_{e}} = \begin{bmatrix} 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & -\mathbf{g} & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ \mathbf{g} & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ \end{bmatrix} \tag{64}$$

$$\mathbf{B}\_{\mathbf{c}} = \frac{\partial \mathbf{h}(\overline{\mathbf{X}}, \mathbf{u})}{\partial \mathbf{u}} \Big|\_{\mathbf{u}} \mathbf{X} = \mathbf{X}\_{\mathbf{c}} \tag{65} \\ \begin{bmatrix} 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & \frac{1}{\tau} & 0 \\ 0 & 0 & 0 & \frac{1}{\tau} \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ \frac{1}{\mathrm{Im}\_{\mathrm{q}}} & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{bmatrix} \tag{65} $$
 
$$\mathbf{C} = \begin{bmatrix} 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & -\mathrm{g} & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & -1/\mathrm{Im}\_{\mathrm{q}} & 0 & 0 & 0 \end{bmatrix} \tag{66} $$

The same model can be described as a system of Equations as indicated in (67).

$$\begin{cases} \dot{\Phi} = \mathbf{p} \\ \dot{\Phi} = \mathbf{q} \\ \dot{\mathbf{v}} = \mathbf{r} \\ \dot{\mathbf{p}} = \frac{\tau\_{\mathbf{x}} + \tau\_{\mathbf{x}\mathbf{x}}}{\frac{1}{\tau\_{\mathbf{y}}}} \\ \dot{\mathbf{q}} = \frac{\tau\_{\mathbf{y}} + \tau\_{\mathbf{x}\mathbf{y}}}{\frac{1}{\tau\_{\mathbf{y}}}} \\ \dot{\mathbf{r}} = -\mathbf{g}\boldsymbol{\Phi} + \frac{\tau\_{\mathbf{x}\mathbf{y}}}{\mathbf{m}\_{\mathbf{q}}} \\ \dot{\mathbf{v}} = \mathbf{g}\boldsymbol{\Phi} + \frac{\tau\_{\mathbf{v}\mathbf{y}}}{\mathbf{m}\_{\mathbf{q}}} \\ \dot{\mathbf{w}} = \frac{\tau\_{\mathbf{x}\mathbf{y}} - \tau\_{\mathbf{p}}}{\mathbf{m}\_{\mathbf{q}}} \\ \dot{\mathbf{x}} = \mathbf{u} \\ \dot{\mathbf{y}} = \mathbf{v} \\ \dot{\mathbf{z}} = \mathbf{w} \end{cases} (67)$$

#### *2.4. Controller Design*

The controller design method uses the linear model of the system (63). Considering that references for the orientation of the quadrotor and for the altitude of flight will be transmitted from the remote controller, and the system inputs depend on the angular velocities of the four engines, a number of four controllers will be implemented for each direction of movement. Each controller can be designed with any tuning algorithm, ensuring the cancellation of the steady state error and a short settling time. An interesting choice is presented for example in [44]. If advanced controller tuning methods are used, the performances could be increased. The idea of the present work is to implement a very low-cost quadrotor, with the simplest control algorithm, but with results comparable with advanced control methods. With this regard a simple PID controller is designed for each rotor, using the classical root locus method [45]. For this method, given the characteristic polynomial of the closed-loop system, the parameters of controller are chosen depending on the location of the poles of the system. Overshoot, settling time and steady state error cancellation are imposed for each controller. Figure 1 illustrates the block diagram of the control strategy chosen for this quadrotor, with the PID blocks detailed in Figure 2. The proposed feedback control requires feedback signals and disturbance identification. To obtain these signals, a sensor with 9 degrees of freedom, consisting of an accelerometer, a gyroscope,

and a magnetometer is used. Signals from this sensor must be processed because they suffer from noise disturbance and other drawbacks. For example the gyroscope has a flowing bias. This inconvenient is mitigated by the estimator. Both data filtering and estimating the orientation of the aerial vehicle are realized with the quaternion representation of the estimator (27,28). The nonlinear dynamic model (55) is used as predictor in the control structure.

**Figure 1.** Block diagram of the three-dimensional space orientation control.

**Figure 2.** Block diagram of each PID controller.

In Figure 2 the signals are denoted as follows: r(k) is the reference signal at current iteration k; c(k) represents the control signal at this current iteration k; y(k) is the output of the system, measured by sensors at iteration k; e(k) is the error signal at iteration k; Kp, Ki, and Kd represent the proportionality, integration, and derivation constant, respectively. Regarding the angular velocities of the motors, it is necessary to ensure that they behave according to the control signals received from the angular position and altitude controllers. In view of the microcontroller's processing capacity and the relatively large dimensions of the program used to obtain the inclination angles and the control law previously determined, four electronic speed control modules (ESCs) will be used to control the angular velocities of the motors.

The verification of the designed controllers was first performed through a numerical simulation. The non-linear model from Equation (55) was used to carry out all simulations. Several simulation scenarios were adjusted in order to set the simulation closer to reality. Furthermore, some restrictions related to the actuators were applied based on real data measurements. The delay of the actuators was implemented because of the use of the electronic speed controller (ESC). Moreover, sensor noise was implemented to the measured feedback signals. The evaluation of the designed controller was done both in disturbance free, constant disturbance, and real disturbance conditions. In each case the quadrotor has to follow the same trajectory, including takes off, flying from point A to B, and rotation around the Z axis. As quality indicators chosen to discuss the efficiency of the proposed algorithm are the steady state position error, overshoot, and settling time. In all cases the proposed simple control structure exhibit very similar behavior to advanced, expensive solutions.

#### **3. Results**

Figure 3 presents the resulted low-cost quadrotor UAV. It has four motors controlled by electronic speed controllers rotating as described in Figure 4. Each motor is mounted on a plastic arm, which in turn is attached to the carbon fiber central structure. All pieces were chosen so that the assembly has the lowest weight and, at the same time, to maintain the condition of the center of gravity described in the previous section.

**Figure 3.** The unmaned aerial vehicle (UAV) prototype.

**Figure 4.** Rotational directions.

In each step of the design, the aim was to understand the functionality of each component of the system and to describe the relationships between them using block diagrams. In this regard Figures 5 and 6 detail the block diagrams of each subsystem, highlighting the type of data provided by/for each element.

**Figure 5.** Block scheme of the quadrotor UAV.

**Figure 6.** Block scheme of the remote controller.

In accordance with these block schemes and the dimensions imposed by the mechanical elements, a series of electrical components were chosen. These have been selected so that they can achieve the specifications of the desired control, allow flexibility in resolving errors and have low cost. Also, from the point of view of the processing capacity and the number of input and output signals, respectively, a microcontroller was chosen that satisfies these conditions.

The wiring diagram and the implemented UAV system are presented in Figure 7. The corresponding remote controller schemes are in Figure 8, where (a) represents the wiring diagram designed in Eagle, while (b) is the implemented circuit.

**Figure 7.** The designed (**a**) and implemented (**b**) electronic circuit of UAV.

Measurements were realized without using the developed estimator. Figure 9 presents the raw results of the gyroscope, accelerometer and magnetometer for a linear movement. It can be concluded that in the case of noisy signals, such an approach is not usable in a feedback control structure. It is obvious the necessity of the estimator.

(**a**)

**Figure 8.** The remote controller: (**a**) the designed and (**b**) the implemented electronic circuit.

**Figure 9.** Raw measured output for the three degree of freedom.

The quaternion-based estimation algorithm described in the previous section was implemented on the microcontroller. In order to test the obtained system, a reference sequence of the form: 0, maximum value to the right, maximum value to the left was applied. The obtained results are plotted in Figure 10.

**Figure 10.** Measured output for the three degree of freedom: (**a**) pitch; (**b**) roll; (**c**) yaw.

The designed nonlinear model was tested, obtaining the results from Figure 11.

The designed control algorithms were also implemented on the microcontroller. The obtained results in the worst-case scenario, windy conditions, are plotted on Figure 12, presenting the response of the closed loop system to a step reference on each of the four directions of movement.

The performance was measured for different operation scenarios, including different step inputs on each axis, wind-free and windy conditions. The results for one of the "classical" scenarios—16◦ step input for angular position on X and Y axis and 45◦ on Z axis, 5 m altitude, with relatively high wind speed—are presented in Table 1, highlighting good performances. All these results are comparable with the results of advanced control algorithms in [25–36], without needing expensive hardware equipment. In [26], where the studied quadrotor is similar with our prototype, a LQR controller is used for altitude and a PD controller for position, resulting in a settling time for a step input between 2 and 3.7 s and overshoot 13–20%. Using a backstepping controller combined with the PD, the settling time varies between 2.10 and 3.70 s and the overshoot between 12 and 14%. The LQR controller used both for altitude and position, the settling time are 2.7–3.35 s, while the overshoot is 19–25%. The combination of the backstepping controller with LQR leads to values varying between 2.7–3.3 s, overshoot 15–25%. In our experiments the overshot does not exceed 13.75% neither in worst case and the largest settling time is 1.2 s. The model identification adaptive control (MIAC) used in [28] leads to settling time between 0.8 and 1.4 s, while with the Model Reference Adaptive Control (MRAC) from the same

study, the achieved settling time is of 0.75–2 s, very close to our values. The main advantages of these two (MIAC and MRAC) controllers are the overshoot cancellation, but the cost is the control effort. Analyzing the active disturbance rejection controller designed in [11], the presented settling times are 0.85–1.5 s for a 20◦ step input, overshoot is 7–25%, comparable with our results. The advantage of the high-order sliding mode-based fixed-time active disturbance rejection control from [11] is that it tracks the unknown disturbances in about 3 s.

**Figure 11.** The nonlinear model output for step input on each axis.


**Table 1.** The obtained performance measures.

Comparing our results with the results of the bioinspired controller from [10], the present results are still competitive. Moreover, imposing different settling time and overshoot in the design stage, it is possible to set a different transient response. Reducing the overshot will increase the settling time and vice versa. Obviously, designing an advanced controller could increase the performances, but the idea of present work was to analyze the most simple algorithm, a PID controller.

**Figure 12.** The closed loop system output for step input on each axis.

#### **4. Conclusions**

The present research is focused on a low-cost, but performing UAV system design. Taken as a whole, such a flight system presents great difficulties in obtaining positioning data, in particular due to their complex determination or estimation algorithms. In addition to the high complexity of the estimation algorithms, the problem of measurement errors and the resolution of the sensors must often be taken into consideration, so that the control structures are provided with the most accurate data. The offered solution is the quaternion-based estimation. In addition, the tuning of the proportional, integrative, and derivative terms of the control laws is another major problem of the UAV system. Also, the nonlinearities present in such a system introduce challenging problems.

The prototype described in the previous sections offers solution for all these problems.

As future works a global positioning system (GPS) would be added to the equipment model in order to acquire more functionalities.

**Author Contributions:** Conceptualization and methodology, M.S.; validation, E.H.D.; formal analysis, C.I.M. and L.C.M.; writing—review and editing, C.I.M. and E.H.D.; supervision, E.H.D.; funding acquisition, L.C.M. All authors have read and agreed to the published version of the manuscript.

**Funding:** This work was supported by a grant of the Romanian Ministry of Research and Innovation, CCCDI–UEFISCDI, project number PN-III-P1-1.2-PCCDI-2017-0734/ROBIN—"Robot,ii s,i Societatea: Sisteme Cognitive pentru Robot,i Personali s,i Vehicule Autonome," within PNCDI III. E.H.D. was funded by Hungarian Academy of Science, Janos Bolyai Grant (BO/00313/17) and the ÚNKP-19-4-OE-64 New National Excellence Program of the Ministry for Innovation and Technology. Cristina Muresan is financed by a grant of the Romanian National Authority for Scientific Research and Innovation, CNCS/CCCDI-UEFISCDI, project number P PN-III-P1-1.1-TE-2019-0745.

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

#### **Abbreviations**



#### **References**


**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

### *Article* **Solitary Wave Solutions of the Generalized Rosenau-KdV-RLW Equation**

#### **Zakieh Avazzadeh 1,2, Omid Nikan <sup>3</sup> and José A. Tenreiro Machado 4,\***


Received: 21 August 2020; Accepted: 9 September 2020; Published: 17 September 2020

**Abstract:** This paper investigates the solitary wave solutions of the generalized Rosenau–Korteweg-de Vries-regularized-long wave equation. This model is obtained by coupling the Rosenau–Korteweg-de Vries and Rosenau-regularized-long wave equations. The solution of the equation is approximated by a local meshless technique called radial basis function (RBF) and the finite-difference (FD) method. The association of the two techniques leads to a meshless algorithm that does not requires the linearization of the nonlinear terms. First, the partial differential equation is transformed into a system of ordinary differential equations (ODEs) using radial kernels. Then, the ODE system is solved by means of an ODE solver of higher-order. It is shown that the proposed method is stable. In order to illustrate the validity and the efficiency of the technique, five problems are tested and the results compared with those provided by other schemes.

**Keywords:** nonlinear wave phenomen; RBF; local RBF-FD; stability

#### **1. Introduction**

Nonlinear waves are important phenomena in scientific research. Due to that reason, a number of models have been proposed to describe their behavior. Indeed, we find a variety of mathematical descriptions of wave dynamics, such as the Rosenau, regularized-long wave (RLW), and Korteweg-de Vries (KdV) equations [1–8]. The KdV equation has been applied in the description of dynamical effects such as longitudinal astigmatic, ion sound, and magnetic fluid waves [4–9]. The convergence properties, existence and the regularity of solutions of KdV-type equation have been discussed in [10–12].

Kaya and Aassila calculated the explicit solutions of the KdV equation with an initial condition by using the Adomian decomposition method [13]. Özer and Kutluay applied an analytical–numerical method to the KdV equation [14]. The RLW equation was developed by Peregrine, as an alternative to the classical KdV formulation in order to investigate the behavior of the solution [15,16]. Benjamin et al. proved the existence and uniqueness of the solution of the RLW model and determined its exact expression subject to restrictions in the initial and boundary conditions [2]. The RLW is also adopted in the modeling of long waves with small amplitudes on the water surface [17]. A noteworthy feature of the RLW problem is that the collision between two solitary waves results either in sinusoidal solutions, or in secondary solitary waves [18]. Since the KdV cannot describe wave–all and wave–wave interactions, another model, known as the Rosenau equation, was proposed by Rosenau to describe the dynamics behavior of dense discrete systems [7]. Zuo studied the solitary wave and periodic solutions for the Rosenau-KdV model [6]. Barreto et al. discussed the existence of solutions of the

Rosenau formulation with the plus sign in the advection-like term in moving domains by means of the Galerkin, multiplier, and energy estimate techniques [3].

Hereafter, we propose a numerical method for the initial value problem of the general Rosenau-KdV-RLW equation [19–24],

$$
\mu u\_t + \mu u\_x + \beta (u^p)\_x + \gamma u\_{xxx} - \mu u\_{xxt} + \delta u\_{xxxxxt} = 0,\tag{1}
$$

with the initial condition

$$u(\mathbf{x},0) = f(\mathbf{x})\tag{2}$$

and boundary conditions

$$u(a,t) = u(b,t) = 0,\ u\_x(a,t) = u\_x(b,t) = 0,\\ u(a,t) = u(b,t) = 0,\ u\_{xx}(a,t) = u\_{xx}(b,t) = 0,\tag{3}$$

where *u* = *u*(*x*, *t*), is a real-valued function, the real constants *α*, *β*, *γ* and *μ* are non-negative, *p* ≥ 2 is a positive integer, and *f*(*x*) is a given smooth function.

**Lemma 1.** *(See [25].) The following conservative properties for the initial value problem* (1) *hold*

$$Q(t) = \int\_{a}^{b} u(\mathbf{x}, t)d\mathbf{x} = \int\_{a}^{b} u(\mathbf{x}, 0)d\mathbf{x} = Q(0) \tag{4}$$

*and*

$$E(t) = \int\_{a}^{b} (u^2 + cu\_x^2 + u\_{xx}^2) \mathrm{d}x = ||u||\_{L^2}^2 + c||u\_x||\_{L^2}^2 + c||u\_{xx}||\_{L^2}^2 = E(0),\tag{5}$$

*where Q*(0) *and E*(0) *are constants depending on the initial conditions.*

When −*a* ! 0 and *b* ! 0, the initial boundary value problem (1)–(3) is consistent and, the boundary condition (3) is reasonable [26]. Some particular cases of Equation (1) occur:

• if *α* = 0, *β* = 0.5, *γ* = 1, *μ* = 0, *δ* = 0 and *p* = 2, then expression (1) is the KdV equation [14,27–29],

$$
\mu\_t + \mu u\_x + u\_{xxx} = 0;
$$

• if *α* = 1, *β* = 0.5, *γ* = 0, *μ* = 0, *δ* = 1 and *p* = 2, then expression (1) is the Rosenau equation [30– 32],

$$
\omega\_t + \omega u\_\lambda + uu\_\lambda + u\_{\text{XXxt}} = 0 \varphi
$$

• if *α* = 1, *β* = 0.5, *μ* = 1, *γ* = 0, *δ* = 0 and *p* = 2, then expression (1) becomes the RLW equation [33]

$$
\mu\_t + \mu\_x + \mu u\_x - u\_{xxt} = 0;
$$

• if *α* = 1, *β* = 0.5, *γ* = 1, *μ* = 0, *δ* = 1 and *p* = 2, then expression (1) is the Rosenau-KdV equation [6,34,35]

$$
\mu\_t + \mu\_\chi + \mu\mu\_\chi + \mu\_{\chi\chi\chi} + \mu\_{\chi\chi\chi\chi t} = 0;
$$

• if *α* = 1, *β* = 1, *γ* = 0, *μ* = 1, and *δ* = 1, then expression (1) is the generalized Rosenau-RLW model [26]

$$
\mu\_t + \mu\_\times + (\mu^p)\_\times - \mu\_{\ge xt} + \mu\_{\ge \ge xt} = 0;
$$

• if *p* = 2, *p* = 3 or *p* ≥ 4, then expression (1) represents the classical, modified, and general Rosenau-RLW equations, respectively.

In recent years, various analytical and numerical methods have been used to approximate the solution of the initial boundary value problem (1)–(3). Razborova et al. presented a theoretical approach based on the Ansatz method for the Rosenau-KdV-RLW equation [9]. Later, Razborova et al. used a semi-inverse Variational Principle to retrieve a single solitary wave solution [22]. Additionally, Razborova et al. and Sanchez et al. discussed the solutions of the perturbed Rosenau-KdV-RLW equation [23,24]. Wongsaijai et al. constructed a three-level weighted average implicit finite difference (FD) technique [19]. Pan et al. presented a C-N pseudo-compact conservative numerical scheme based on the FD technique [20]. Fernández and Ramos investigated a three-point compact method with fourth-second accuracy [21]. Wang et al. and Hu and Wang formulated FD schemes with linear three-level [31] and high-accuracy conservative [33] characteristics, respectively. Wongsaijai et al. proposed a compact FD technique [26] and Pan et al. developed a linear-implicit FD for the usual Rosenau-RLW equation [25,36]. Zheng et al. presented an average linear FD technique [34]. Mittal et al. implemented a numerical method based on the collocation of quintic B-splines over finite elements [37]. Hu et al. considered a second-order conservative FD scheme [38]. Ari et al. adopted a meshless kernel-based approach of lines [39]. Foroutan et al. developed a modified Chebyshev rational approximation [40]. Wang et al. advanced a three-level linear conservative FD [41], while Wongsaijai et al. came with a mass-preserving scheme, namely, a nonlinear algorithm based on a modification of the FD [42].

In this paper, we use the local meshless radial basis function (RBF) for solving the general Rosenau-KdV and the Rosenau-RLW models. Section 2 formulates and discusses the local meshless RBF based on the finite difference (RBF-FD) technique for discretizing Equation (1). Section 3 provides five numerical examples and compares the results with those of other schemes proposed in the literature. Finally, Section 4 presents the concluding remarks.

#### **2. The RBF-FD Collocation Method**

A mesh-free (or meshless) method adopts an algebraic system of equations for the complete domain without requiring a pre-defined mesh discretization of the domain and its boundary [43,44]. Mesh-free techniques are used to approximate scattered data, since generating meshes is one of the most laborious tasks of mesh-based numerical processes. Indeed, a mesh-free technique provides a low-cost alternative to schemes involving finite volume, finite difference, finite element, multivariate splines, and wavelets, all requiring node connectivity. Meshless techniques eliminate the mesh generation step and a collection of scattered data can be used. The RBF is one of the most widely used meshless techniques and reveals good performance in case of multidimensional scattered data interpolation [43,44].

Given a set of scattered node data *XC* = {*x*1, ... , *xN*} ⊆ <sup>R</sup>*<sup>n</sup>* and the corresponding function values *ui* = *u*(*xi*), *i* = 1, 2, . . . , *N*, the RBF interpolant is represented in the form

$$u(\mathbf{x}) \simeq S(\mathbf{x}) = \sum\_{j=1}^{N} a\_j \phi\_j(\mathbf{x}, \mathbf{c}),\tag{6}$$

where {*αj*}*<sup>N</sup> <sup>j</sup>*=<sup>1</sup> are unknown coefficients, *φj*(*x*, *c*) = *φ*(*x* − *xj*2, *c*), *j* = 1, ... , *N*, are RBF with shape parameter *c*, and the operation ·<sup>2</sup> represents the Euclidean norm [44,45]. Some popular choices of RBF include the linear, Cubic, Multiquadric (MQ), Gaussian (GA), and thin-plate spline (TPS) versions with dependence *r*, *r*3, <sup>√</sup>*c*<sup>2</sup> <sup>+</sup> *<sup>r</sup>*2, exp (−*cr*2), and *<sup>r</sup>*<sup>4</sup> ln(*r*), respectively, where *<sup>r</sup>* <sup>=</sup> *<sup>x</sup>* <sup>−</sup> *xj*2. The coefficients {*αj*}*<sup>N</sup> <sup>j</sup>*=<sup>1</sup> of Equation (6) are computed by imposing interpolation conditions *S*(*xi*) = *ui*, *i* = 1, . . . , *N*. The relation (6) can be written in the following matrix form

$$A\_{\phi} \mathfrak{a} = f,\tag{7}$$

where

$$\mathbf{a} = \begin{bmatrix} a\_1 \\ a\_2 \\ \vdots \\ \vdots \\ a\_N \end{bmatrix}, \quad f = \begin{bmatrix} f\_1 \\ f\_2 \\ \vdots \\ \vdots \\ f\_N \end{bmatrix}, \quad A\_{\phi, ij} = \phi\_j(\mathbf{x}\_i), \quad i, j = 1, \dots, N.$$

The non-singularity of the associated linear system was proven in [46]. The main pros of the RBF collocation method when solving PDEs are its simplicity, easy application to different PDEs, and efficiency for solving problems involving complex domains. On the other hand, the major con of this method is related to the problem of full matrices. These matrices are strongly sensitive to the shape parameter *c* selected in the RBF and, therefore, they become difficult to solve in problems where we have too many unknowns. This problem arises from the fact that using the RBF interpolation increases the condition numbers of the related matrices for a large number of nodes. This occurs particularly when one selects inadequate data centers and uses basic functions that are infinitely smooth, such as the MQ, with extreme values of the shape parameter *c* [45].

The notation of local differentiation is popular in the RBF literature, particularly for time-dependent PDEs. The local radial basis function (RBF) generated by finite differences (RBF-FD), raised considerable interest owing to the structure of their differentiation and interpolation matrices [47,48]. It is possible to control the degree of sparsity of the differentiation and interpolation matrices produced by the local RBF. This sparsity can take advantage of parallelism and solve large problems [49,50]. The local RBFs have also been employed to reduce the model order. In some situations, researchers have found that the local RBF technique can produce the same degree of accuracy as the global RBF technique with a smaller mesh size [49–53]. Although small mesh sizes result in smaller ODE systems, the overall accuracy is maintained. Interested readers can find examples of the application of local RBFs to problems in the geosciences in [54,55]. Garshasbi et al. used the RBF collocation method for approximating the shallow water model named the Camassa–Holm equation [56]. Uddin connected the RBF to the pseudo-spectral method, known as RBF-PS method to approximate the equal width equation [57]. Nikan et al. solved numerically the nonlinear KdV-Benjamin-Bona-Mahony-Burgers (KdV-BBM-B) with the help of the RBF-PS [58]. Dehghan and Shafieeabyaneh addressed the RLW and extended Fisher-Kolmogorov (EFK) equations using local meshless RBF-FD [59]. Ebrahimijahan and Dehghan proposed a numerical technique for solving the nonlinear generalized BBBM-B and RLW equations based on the integrated RBF [60]. Rashidinia et al. implemented the local RBF-FD meshless method for generalized Korteweg-de Vries-Burgers [61] and Kawahara [62] equations.

Let us consider that *Ii* = {*xi*<sup>1</sup> , *xi*<sup>2</sup> , ... , *xini* } is a stencil of *xi*. In the local RBF-FD collocation method, the linear differential operator L at every point can be approximated only the stencil instead of applying the complete number of point, i.e.,

$$\mathcal{L}\,u(\mathbf{x}\_{i}) = \sum\_{j=1}^{n\_{i}} w\_{j}u(\mathbf{x}\_{i\_{j}}),\tag{8}$$

where *xi* = *xi*<sup>1</sup> is the center point of stencil *Ii*. Figure 1 gives an example of a domain with 9 grid points and a stencil size of *ni* = 4. At the point *x*3, the *ni* − 1 = 3 nearest neighbors are used in the computation. Figure 2 shows the sparsity patterns for *N* = 50 for two stencil sizes *ni* = 11 and *ni* = 15.

**Figure 1.** Illustration of one-dimensional case of stencil.

**Figure 2.** Sparsity patterns for *N* = 50 and two stencil sizes *ni* = 11 (**a**) and *ni* = 15 (**b**).

By deriving the RBF expansion of *u*(*x*) in Equation (8), the weighted differences of stencil node can be obtained from the system as:

$$A\_{\Phi}w = l\,,$$

where

$$w = \begin{bmatrix} w\_1 \\ w\_2 \\ \vdots \\ w\_{n\_i} \end{bmatrix}, l = \begin{bmatrix} \mathcal{L}\phi\_{i\_1}(\mathbf{x})|\_{\mathbf{x}=\mathbf{x}\_i} \\ \mathcal{L}\phi\_{i\_2}(\mathbf{x})|\_{\mathbf{x}=\mathbf{x}\_i} \\ \vdots \\ \mathcal{L}\phi\_{i\_{n\_i}}(\mathbf{x})|\_{\mathbf{x}=\mathbf{x}\_i} \end{bmatrix}, \quad A\_{\phi,\vec{\eta}} = \phi\_{\vec{\eta}\_i}(\mathbf{x}\_{\vec{\eta}\_j}), \quad i, j = 1, \dots, n\_i. \tag{10}$$

Indeed, it is necessary to solve a small-sized linear system with a conditionally positive definite coefficient matrix in each stencil. The weighted differences of the stencil nodes *w*1, *w*2, ... , *wni* can be determined from the above system.

The first, second and third order derivatives can be approximated with the help of the function values at a set of *ni* nodes (including *xi*) in the stencil of *xi*. That is, we can write

$$\left. \frac{\partial u^k(\mathbf{x})}{\partial \mathbf{x}} \right|\_{\mathbf{x} = \mathbf{x}\_i} = \sum\_{j=1}^{n\_i} w\_{i,j}^{x,1} u^k(\mathbf{x}\_j^i) = \mathbf{W}\_{\mathbf{x}} \mathbf{u}\_{\mathbf{v}} \tag{11}$$

$$\left. \frac{\partial^2 u^k(\mathbf{x})}{\partial \mathbf{x}^2} \right|\_{\mathbf{x} = \mathbf{x}\_i} = \sum\_{j=1}^{n\_i} w\_{i,j}^{x,2} u^k(\mathbf{x}\_j^i) = \mathbf{W}\_{\mathbf{x}\mathbf{x}} \mathbf{u}\_{\mathbf{}} \tag{12}$$

$$\frac{\partial^3 u^k(\mathbf{x})}{\partial \mathbf{x}^3} \Big|\_{\mathbf{x} = \mathbf{x}\_i^\circ} = \sum\_{j=1}^{n\_i} w\_{i,j}^{x,3} u^k(\mathbf{x}\_j^i) = \mathbf{W}\_{\mathbf{xxx}} \mathbf{u}\_\prime \tag{13}$$

where *wx*,*<sup>l</sup> <sup>i</sup>*,*<sup>j</sup>* represents the weighted differences of stencil node for the order derivatives *l* = {1, 2, 3}.

We can obtain the following semi-discrete system by considering the notations above as

$$\mathbf{u}' + a\mathbf{\mathcal{W}}\_{\mathbf{x}}\mathbf{u} + \beta\mathbf{\mathcal{W}}\_{\mathbf{x}}(\mathbf{u}^p) - \mu\mathbf{\mathcal{W}}\_{\mathbf{x}\mathbf{x}}\mathbf{u}' + \gamma\mathbf{\mathcal{W}}\_{\mathbf{x}\mathbf{x}\mathbf{x}} + \delta\mathbf{\mathcal{W}}\_{\mathbf{x}\mathbf{x}\mathbf{x}}\mathbf{u}' = 0. \tag{14}$$

The above equation can be represented as

$$(\mathbf{I} - \mu \mathbf{W}\_{xx} + \delta \mathbf{W}\_{xxxx})\mathbf{u}^{'} = -a\mathbf{W}\_{x}\mathbf{u} - \beta \mathbf{W}\_{x}(\mathbf{u}^{p}) - \gamma \mathbf{W}\_{xxx}\mathbf{u}.\tag{15}$$

We must note that the matrices **A** = −*α***W***<sup>x</sup>* − *β***W***<sup>x</sup>* − *γ***W***xxx* and **B** = **I** − *μ***W***xx* + *δ***W***xxxx* are time-independent. We conclude that

$$\mathbf{u}' = \mathbf{W}\mathbf{u},\tag{16}$$

where **<sup>W</sup>** = **<sup>B</sup>**−1(−*α***W***<sup>x</sup>* − *<sup>β</sup>***W***x*(**u***p*−1) − *<sup>γ</sup>***W***xxx*). Equation (16) is of the form

$$\mathbf{u}' = F(\mathbf{u}).\tag{17}$$

Equation (17) is an ODE with respect to **u** and it can be solved by means of an ODE solver in MATLAB such as ode113 or ode45. Let *τ* = *T*/*M* and *tn* = *nτ*, for *n* = 0, 1, ... , *M*, so that the mesh {*tn* : *n* = 0, 1, ... , *M*} is uniform. The initial solution *u*<sup>0</sup> is the starting vector. The package ode45 is an explicit Runge-Kutta of order 4(5) formula of the Dormand–Prince pairs [63]. The ode45 is a one-step solver that computes *utn* given the solution at the preceding time point *utn*−<sup>1</sup> . On the other hand, the ode113 is a variable-order Predict–Evaluate–Correct–Evaluate solver of the Adams–Bashforth–Moulton type [64]. This solver might be more efficient than the ode45 for close tolerances and, in particular, when the ODE file function is particularly expensive to evaluate. A multi-step solver, such as the ode113, needs the solutions corresponding to more than one preceding time point for calculating the current solution. Hereafter, we calculate the differentiation matrices, expressed by **W***x*, **W***xx* and **W***xx*, only one time outside the time-stepping operation. Additionally, merely matrix-vector multiplications are required within the time-stepping operation.

#### *2.1. Stability Analysis*

The method of lines represents the idea of using the FD method in the time direction *t* to solve a coupled system of ODEs. The numerical stability of the method of lines is investigated by a rule of tumb. The method of lines is stable if the eigenvalues of the (linearized) spatial discretization operator, scaled by *τ*, lie in the stability region of the time-discretization operator [57,65]. One defines the stability region as the portion of a multifaceted plane consisting of eigenvalues which result in the generation of bounded solutions. The coefficient matrix eigenvalues determine the stability of Equation (16) [66]. Hence, we need only to demonstrate that every eigenvalue *Re*(*λi*) belonging to the coefficient matrix has a non-positive real term *Re*(*λi*), where *λi*, *i* = 1, 2, ... , *N*, represents of the matrix eigenvalues. In other words, for all *i* = 1, 2, ... , *N*, we must have *Re*(*λi*) ≤ 0 for obtaining stable solutions. The reader is referred to [66] for further details. In order to investigate the stable and unstable eigenvalue ranges of the Rosenau-KdV-RLW model, one must compute the eigenvalues belonging to the matrix **W**, which are scaled by *τ*.

#### **3. Computational Results and Comparisons**

This section considers five test problems assessing the effectiveness and accuracy of the proposed method for various values of *h*, *τ* and *c*. To measure the accuracy of method in comparison with the exact solution, we compute the following error norms:

$$\begin{aligned} L\_{\infty} &= \max\_{1 \le j \le M-1} |u^{\text{exact}}(\mathbf{x}\_{j}, T) - u(\mathbf{x}\_{j}, T)|, \\ L\_{2} &= \left( h \sum\_{j=1}^{N} (u^{\text{exact}}(\mathbf{x}\_{j}, T) - u(\mathbf{x}\_{j}, T))^{2} \right)^{\frac{1}{2}}, \\ RMSE &= \left( \frac{1}{N} \sum\_{j=1}^{N} (u^{\text{exact}}(\mathbf{x}\_{j}, T) - u(\mathbf{x}\_{j}, T))^{2} \right)^{\frac{1}{2}}, \end{aligned}$$

where *u* and *uexact* denote the numerical solution and exact solution, respectively. In addition, the invariants of motion are evaluated by

$$\begin{aligned} Q &= \int\_a^b u(\mathbf{x}, t) \mathbf{dx} = \sum\_{i=1}^N u\_{i\prime} \\ E &= \int\_a^b (u^2 + cu\_x^2 + u\_{xx}^2) \mathbf{dx} = \sum\_{i=1}^N \left( u\_i^2 + c(u\_x)\_i^2 + (u\_{xx})\_i^2 \right) .\end{aligned}$$

It should be noted that the Gaussian function is used as a basis and the computations were performed in MATLAB R2016a with a computer system having a configuration including Intel(R) Core(TM) i5-2330 CPU 3.60 GHz and 8.00G RAM.

**Example 1.** *Let us consider the general Rosenau-KdV-RLW model* (1) *in the case of α* = *μ* = *γ* = 1*, β* = 0.5*, p* = 2 *and δ* = 0 *in the spatial interval x* ∈ [−70, 100]*. The exact solution is <sup>u</sup>*(*x*, *<sup>t</sup>*) = *<sup>k</sup>*<sup>11</sup> sech4[*k*12(*<sup>x</sup>* <sup>−</sup> *<sup>k</sup>*13*t*)] *[38,41], where*

$$k\_{11} = -\frac{35}{24} + \frac{35}{12}\sqrt{313},\ k\_{12} = \frac{1}{24}\sqrt{-26 + 2\sqrt{313}},\ k\_{13} = \frac{1}{2} + \frac{\sqrt{313}}{26}\cdot \frac{1}{2}$$

Table 1 lists the approximation errors in terms of *L*∞, *L*<sup>2</sup> and RMS with *τ* = 0.01 and *ni* = 489. Table 2 compares the obtained results with those provided by the techniques described in [38,41]. It is seen that the errors obtained by the proposed technique are inferior to the others. Figure 3 depicts the motion of the single solitary wave with *h* = *τ* = 0.125 over the spatial intervals *x* ∈ [−40, 60] (left) and *x* ∈ [−70, 100] (right) at final times *T* ∈ {0, 30, 40}. We verify that the single solitons move to the right at a constant speed and preserve their amplitude and shape with increasing time as anticipated. Figure 4 represents the absolute errors *L*<sup>∞</sup> at final times *T* ∈ {0, 30, 40}. Figure 5 portraits the eigenvalues of the linearized differentiation operator **A** and **B** (left and right panels, respectively) with *N* = 100. We observe that the eigenvalues calculated for **A** and **B** are zero or have negative values. The eigenvalues belonging to the linearized differentiation operators are real and negative or are complex with a negative real term. Hence, the stability of the proposed system for this case is proven.

**Example 2.** *Let us consider the general Rosenau-KdV-RLW model* (1) *in the case of α* = *β* = *μ* = *γ* = 1*, p* = 5 *and δ* = 0 *over the spatial interval x* ∈ [−60, 90]*. The exact solitary wave solution is u*(*x*, *t*) = *k*<sup>21</sup> sech[*k*22(*x* − *k*23*t*)]*, where [34,41]*

$$k\_{21} = \sqrt[4]{\frac{4}{15}(-5 + \sqrt{34})},\ k\_{22} = \frac{-5 + \sqrt{34}}{3},\ k\_{23} = \frac{5 + \sqrt{34}}{10} \cdot 1$$

Table 3 reports the *L*∞, *L*<sup>2</sup> and RMS errors with *τ* = 0.01 and *ni* = 489. Table 4 compares the results with those obtained by the techniques described in [34,41]. It is clear that the results of the new method are considerably more accurate. Table 5 illustrates the conservative law of the discrete energy *E*. Figure 6 depicts the motion of single solitary wave with *h* = *τ* = 0.125 (left) and *h* = *τ* = 0.0625

(right) over the spatial interval *x* ∈ [−60, 90] at final times *T* ∈ {0, 10, 40}. The single solitons move to the right at a constant speed preserving their amplitude and shape. Figure 7 represents the absolute error *L*<sup>∞</sup> at final times *T* = {30, 40}. Figure 8 plots the eigenvalues of the matrices **A** and **B** (left and right panels, respectively) with *N* = 100. The eigenvalues calculated for **A** are negative values. For what concerns **B**, they are zero or have negative values. Therefore, the stability of the proposed system is confirmed.


**Table 1.** The *L*∞, *L*<sup>2</sup> and RMS errors with *τ* = 0.01 *N* = 100, *ni* = 589 and *c* = 1.8 for Example 1.

**Table 2.** The *L*<sup>∞</sup> and *L*<sup>2</sup> errors under different mesh steps *h* = *τ* at *T* = 40 for Example 1.


**Figure 3.** Motion of the single solitary wave with *τ* = *h* = 0.05, at various times over the intervals: *x* ∈ [−40, 60] (**a**) and *x* ∈ [−70, 100] (**b**) for Example 1.

**Figure 4.** The absolute error *L*∞ with *τ* = *h* = 0.05, at final times *T* = 30 (**a**) and *T* = 40 (**b**) over the interval *x* ∈ [−70, 100] for Example 1.

**Figure 5.** The eigenvalues of **A** (**a**) and **B** (**b**) for *N* = 1000, *ni* = 589 and *c* = 1.08 in Example 1.

**Table 3.** The *L*∞, *L*<sup>2</sup> and RMS errors with *τ* = 0.01, *N* = 900 and *ni* = 489 for Example 2.


**Table 4.** The *L*<sup>∞</sup> and *L*<sup>2</sup> errors under different mesh steps *h* = *τ* at *T* = 40 for Example 2.



**Table 5.** The energy *E* under different mesh steps *τ* = *h* for Example 2.

**Figure 6.** Motion of the single solitary wave with *h* = *τ* = 0.125 (**a**) and *h* = *τ* = 0.0625 (**b**) over the interval *x* ∈ [−60, 90] at final times *T* ∈ {0, 10, 40} for Example 2.

**Figure 7.** The absolute error *L*∞ with *τ* = *h* = 0.05, at final times *T* = 30 (**a**) and *T* = 40 (**b**) over the interval *x* ∈ [−60, 90] for Example 2.

**Figure 8.** The eigenvalues of **A** (**a**) and **B** (**b**) for *N* = 600, *ni* = 235 and *c* = 1.12 in Example 2.

**Example 3.** *We consider the general Rosenau-KdV-RLW model* (1) *corresponding to the case α* = *μ* = 1*, β* = 0.5*, p* = 2*, μ* = 0.1 *and δ* = 0 *over the spatial interval x* ∈ [−40, 100]*. The exact solution is <sup>u</sup>*(*x*, *<sup>t</sup>*) = *<sup>k</sup>*<sup>31</sup> sech4[*k*32(*<sup>x</sup>* <sup>−</sup> *<sup>k</sup>*33*t*)]*, where [19]*

$$k\_{31} = -\frac{5}{456}(25 - 13\sqrt{457}),\ k\_{32} = \left(\frac{-13 + \sqrt{457}}{288}\right)^{1/2}, k\_{33} = \frac{241 + 13\sqrt{457}}{266} \cdot \frac{1}{2}$$

Table 6 compares the results of the proposed method with those resulting from the schemes in [19,41]. The computational efficiency is clearly superior to the performance exhibited by the other schemes. Figure 9 plots the motion of single solitary wave with *h* = *τ* = 0.5, (left) *h* = *τ* = 0.25 (right) over the spatial interval *x* ∈ [−40, 100] at final times *T* ∈ {0, 30, 40}. The peak of the solitary waves remains the same during the simulation. Figure 10 shows the eigenvalues of the matrices **A** and **B** (left and right panel, respectively) with *N* = 100. The eigenvalues calculated for **A** and **B** have zero or negative values. Hence, the stability of the proposed system for this case is confirmed.


**Table 6.** The *L*<sup>∞</sup> and *L*<sup>2</sup> errors under different mesh steps *h* = *τ* for Example 3.

**Figure 9.** Motion of the single solitary wave with *h* = *τ* = 0.5 (**a**) and *h* = *τ* = 0.25 (**b**) over the interval *x* ∈ [−40, 100] at final times *T* ∈ {0, 10, 30} (**a**) and *T* ∈ {0, 20, 40} (**b**) for Example 3.

**Figure 10.** The eigenvalues of **A** (**a**) and **B** (**b**) for *N* = 5600, *ni* = 431 and *c* = 1.14 for Example 3.

**Example 4.** *Let us consider the general Rosenau-KdV-RLW model* (1) *in the case of α* = *μ* = 1*, β* = 1*, p* = 2*, γ* = 0 *and δ* = 1 *over the spatial interval x* ∈ [−50, 150] *[19,25,33,42]. The exact solution is <sup>u</sup>*(*x*, *<sup>t</sup>*) = *<sup>k</sup>*<sup>41</sup> sech4[*k*42(*<sup>x</sup>* <sup>−</sup> *<sup>k</sup>*43*t*)]*, where*

$$k\_{41} = \frac{15}{19},\; k\_{42} = \frac{\sqrt{13}}{26},\; k\_{43} = \frac{169}{133} \cdot \frac{1}{3}$$

Table 7 compares the results of proposed method with those obtained with other schemes [19,25,33,42]. In this case, the accuracy of the method is slightly better than those achieved with the rest. Figure 11 depicts the motion of the single solitary wave with *h* = *τ* = 0.4 (left) and *h* = *τ* = 0.2 (right) over the spatial interval *x* ∈ [−50, 150] at final times *T* ∈ {8, 16, 24, 32}. The crest of the soliton clearly remains the same during the simulation. Figure 12 plots the eigenvalues of the matrices **A** and **B** (left and right panels, respectively) with *N* = 100. The eigenvalues calculated for **A** are negative values, while for **B** they have zero or negative values. Hence, the stability of the proposed system for this case is verified.

**Table 7.** The *L*<sup>∞</sup> and *L*<sup>2</sup> errors under different mesh steps *h* = *τ* with *N* = 250 and *ni* = 181 at *T* = 24 for Example 4.


**Figure 11.** Motion of the single solitary wave with *h* = *τ* = 0.4 (**a**) and *h* = *τ* = 0.2 (**b**) over the interval *x* ∈ [−50, 150] at final times *T* ∈ {8, 16, 24, 32} for Example 4.

**Figure 12.** The eigenvalues of **A** (**a**) and **B** (**b**) for *N* = 1000, *ni* = 631, *p* = 8 and *c* = 0.95 in Example 4.

**Example 5.** *Consider the general Rosenau-KdV-RLW model* (1) *with parameters as α* = *β* = *μ* = *δ* = 1 *and γ* = 0, *in two spatial intervals, namely x* ∈ [−60, 120] *and x* ∈ [−30, 120]*. The exact solution is given by*

$$u(\mathbf{x},t) = \exp(k\_{51})\operatorname{sech}^{\frac{4}{p-1}}[k\_{52}(\mathbf{x} - k\_{53}t)]\_{\mathbf{x}}$$

*where*

$$\begin{aligned} k\_{51} &= \left(\ln[(p+3)(3p+1)(p+1)]/[2(p^2+3)(p^2+4p+7)]/(p-1)\right), \\ k\_{52} &= \frac{p-1}{\sqrt{4p^2+8p+20}}, \\ k\_{53} &= (p^4+4p^3+14p^2+20p+25)/(p^4+4p^3+10p^2+12p+21). \end{aligned}$$

*The initial boundary value problem (1)–(3) includes the following conservative quantities:*

$$\begin{aligned} I\_1 &= \frac{1}{2} \int\_a^b \mathbf{u} \mathbf{d} \mathbf{x} = \frac{h}{2} \sum\_{i=1}^N \boldsymbol{u}\_{i\prime} \\\ I\_2 &= \frac{1}{2} \int\_a^b (\boldsymbol{u}^2 + \boldsymbol{u}\_x^2 + \boldsymbol{u}\_{xx}^2) \mathbf{d} \mathbf{x} = \frac{h}{2} \sum\_{i=1}^N \left( \boldsymbol{u}\_i + (\boldsymbol{u}\_x)\_i^2 + (\boldsymbol{u}\_{xx})\_i^2 \right) \end{aligned}$$

*related to mass and energy. The quantities I*<sup>1</sup> *and I*<sup>2</sup> *are applied to measure the conservation properties of the present method, calculated by means of the trapezoidal rule for the Rosenau-RLW equation.*

Tables 8 and 9 compare the results of the proposed method with those obtained from the schemes presented in [26,36,37,39]. It can be observed that the computational results are clearly better than the others and that the invariants *I*<sup>1</sup> and *I*<sup>2</sup> remain constant during the simulation. Figure 13 plots the motion of the single solitary wave for various *p* at *T* = {0, 30, 60} in the spatial interval *x* ∈ [−60, 120]. The single solitons move to the right at a constant speed and conserve their amplitudes and shapes. Figure 14 shows the eigenvalues of the linearized differentiation operator **A** and **B** (left and right panels, respectively) with *N* = 100. The eigenvalues calculated for **A** and **B** are zero, or have negative values. Therefore, the stability of the proposed system for this case is confirmed.

**Table 8.** The *L*∞, *L*<sup>2</sup> and RMS errors and the invariants *I*<sup>1</sup> and *I*<sup>2</sup> with *N* = 1500, *ni* = 1089, *c* = 2.6 and *τ* = 0.01 in the spatial interval *x* ∈ [−30, 120] for Example 5.


**Figure 13.** Motion of the single solitary wave for *p* = 3 (**a**), *p* = 6 (**b**) , *p* = 4 (**c**), and *p* = 8 (**d**) at final times *T* ∈ {0, 30, 60} (**a,b**) and *T* ∈ {0, 20, 40} (**c,d**) in the spatial interval *x* ∈ [−60, 120] for Example 5.

**Table 9.** The *L*<sup>∞</sup> and *L*<sup>2</sup> errors and the quantities *Q* and *E* with *N* = 360, *ni* = 295, *c* = 0.55 and *τ* = 0.1 in the spatial interval *x* ∈ [−60, 120] for Example 5.


**Figure 14.** The eigenvalues of **A** (**a**) and **B** (**b**) for *N* = 500, *ni* = 111 and *c* = 1.26 in Example 5.

#### **4. Conclusions**

We adopted the local meshless RBF-FD to calculate the approximate numerical solutions of the general nonlinear Rosenau-RLW equation without performing any linearization or transformation of the equation. In order to demonstrate the accuracy of the proposed numerical technique, the error invariants and error norms were computed, and the results were compared with others available in the literature. The local RBF-FD technique was verified to be remarkably accurate. In conclusion, the method is sufficiently accurate and fast due to its limited computational load.

**Author Contributions:** All authors contributed equally to this paper. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Acknowledgments:** The authors are thankful to the respected reviewers for their valuable comments and constructive suggestions towards the improvement of the original paper.

**Conflicts of Interest:** The authors declare that there is no conflict of interest regarding the publication of this article.

#### **References**


© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

### *Article* **Event-Based Implementation of Fractional Order IMC Controllers for Simple FOPDT Processes**

**Cristina I. Muresan 1, Isabela R. Birs 1,2,\* and Eva H. Dulf 1,3,\***


Received: 2 August 2020; Accepted: 14 August 2020; Published: 17 August 2020

**Abstract:** Fractional order calculus has been used to generalize various types of controllers, including internal model controllers (IMC). The focus of this manuscript is towards fractional order IMCs for first order plus dead-time (FOPDT) processes, including delay and lag dominant ones. The design is novel at it is based on a new approximation approach, the non-rational transfer function method. This allows for a more accurate approximation of the process dead-time and ensures an improved closed loop response. The main problem with fractional order controllers is concerned with their implementation as higher order transfer functions. In cases where central processing unit CPU, bandwidth allocation, and energy usage are limited, resources need to be efficiently managed. This can be achieved using an event-based implementation. The novelty of this paper resides in such an event-based algorithm for fractional order IMC (FO-IMC) controllers. Numerical results are provided for lag and delay dominant FOPDT processes. For comparison purposes, an integer order PI controller, tuned according to the same performance specifications as the FO-IMC, is also implemented as an event-based control strategy. The numerical results show that the proposed event-based implementation for the FO-IMC controller is suitable and provides for a smaller computational effort, thus being more suitable in various industrial applications.

**Keywords:** fractional order IMC; first order plus dead-time processes; event-based implementation; numerical simulations; comparative closed loop results

#### **1. Introduction**

Fractional calculus has been reaching a larger part of the research community due to the numerous advantages it has. The increasing interest is mainly due to the ability to capture essential dynamics in physical phenomena. This is seconded by the demonstrated ability of fractional order controllers to meet more design specifications and provide for overall increased robustness and performance. Several researchers have used fractional order tools to model more accurately viscoelastic phenomena [1], aerodynamics [2], structural engineering [3], non-Newtonian characteristics in blood [4,5], type 1 diabetes [6], diffusion phenomena in magnetic resonance imaging [7], post-exposure prophylaxis model in HIV [8], epidemic models for infectious diseases [9], biochemical phenomena [10], etc.

In terms of fractional order control, the starting point is the generalization to arbitrary orders of the proportional-integral-derivative (PID) controller, as proposed in [11]. Ever since then, a manifold of papers have been published, presenting various modifications of the original fractional order PID (FO-PID) controller, various tuning methods and improvements. The key idea is that the generalization of the PID to a fractional order provides more flexibility in improving the system control performance [12,13]. Several enhancements for FO-PID controllers were proposed. An optimal FO-PID controller was proposed and tuned based on particle swarm optimization [14]. Designs based on phase and gain margin specifications are quite abundant [12,15,16], and quite frequently the design is based on ensuring the iso-damping property [12,16–18]. Tuning is usually performed in the frequency domain, but time domain approaches were also considered [19,20]. Autotuning methods for fractional order PID controllers were also proposed [21–23]. Some rather recent review papers on fractional order controllers can be found in [24–26] and provide an insight into fractional order control of different types. An excellent review paper on fractional order controllers, including their most widely used continuous and discrete approximation methods, as well as their digital and analogue implementation methods. The paper also presents the Matlab toolboxes that facilitate the use of fractional order calculus in modeling and control. At the same time, it clearly pinpoints the advantages and disadvantages of using fractional order calculus in control engineering [27].

For time delay systems, including first order plus dead time (FOPDT) processes, several approaches have been introduced and developed over the years. A recent review paper regarding the approaches for these types of system is given in [28]. Alternative control strategies based on fractional order calculus for variable time delay systems are proposed in [29]. For significant delays, a Smith predictor (SP) scheme can be useful. The fractional order controller design in this SP control scheme is based on several approaches. One method proposes a modified SP structure, where the tuning procedure is based on Bode's ideal transfer function and the internal model control (IMC) principle. The resulting control system is robust to changes in the process parameters [30]. A similar design for a fractional order PI controller in a SP control structure, also based on Bode's ideal transfer function, is presented in [31]. The analytical tuning rules are derived in the frequency domain and applied to various types of processes. The advantages of the method rely on a simple design scheme and a straightforward method, which can be easily implemented in the process industry. The SP control structure is also used as a means for comparing various fractional order controllers for a heat diffusion system in [32]. The research offers valuable insight into the performance of the proposed fractional order control algorithms. In [33], a time domain approach is considered for the design of fractional order controllers in a SP structure. Only two parameters need to be tuned, which simplifies considerably the design procedure. The tuning rules are derived based on an ideal closed-loop transfer function, with performance specifications imposed as overshoot and settling time.

One of the simplest tuning rules for integer order PID controllers, as well as for FO-PID controllers, highly suitable for time delay systems, is the IMC methodology. This consists in the simple inversion of the invertible part of the process model and in the addition of a properly selected filter. This method has also been tackled by researchers. For the design of a fractional order IMC controller (FO-IMC), the most widely used approach is based on using a modified fractional order filter [34]. Some tuning methods are based on the Ziegler–Nichols approach [35], Taylor series [36], dominant pole placement method [37]. Other approaches are based on frequency domain specifications, such as phase and gain margins [38–42]. Such an approach is also preferred in this research.

The FO-IMC control strategy proposed in this paper is based on specifying a certain gain crossover frequency, to ensure a specific closed loop settling time, as well as phase margin criteria to ensure a certain closed loop overshoot. The tuning rules are exemplified for first order plus dead-time processes. To implement the resulting fractional order controllers, an efficient method is used, namely the non-rational transfer function (NRTF) approximation method [43]. This allows for a more accurate approximation of the process dead-time and ensures an improved closed loop response [38]. The design is suitable for all types of FOPDT processes, but can be easily extended to higher order processes or even fractional order transfer functions [44]. The research is focused on controlling processes where CPU, bandwidth allocation, and energy usage are limited [45]. In this context, the idea of event-based control is a natural solution for controller implementation [46,47]. Such an approach has been only recently introduced to fractional order PID controllers [46,47]. The novelty of this paper resides in introducing an event-based methodology for FO-IMC controllers. The method is entirely original

compared to [46,47], where a standard fractional order PID type controller is tuned according to some frequency domain specifications. The IMC methodology presented in the current manuscript is not used in the actual tuning. Then, the event-based implementation of the fractional order PID controller in [46] is based on direct discretization methods that use direct fractional order mappers of the fractional integrator and differentiator of the fractional order PID controller. The event-based algorithm relies then on a generalization of the standard direct discretization methods for fractional order elements, where the sampling period is considered as a variable parameter (it depends on an event being triggered). The study implements the proposed strategy entirely in the control signal generator, using a single function to compute the fractional order control value. The novelty of the current manuscript, apart from a different tuning procedure and a different fractional order controller type, is based on a two-step implementation of the event-based fractional order controller. Firstly, the fractional order controller determined based on the FO-IMC methodology is decomposed into an integer order PI and a fractional order filter. Then, the NRTF approach is used to determine a standard discrete-time approximation for the fractional order filter. The remaining PI controller is implemented in an event-based approach. Numerical results are provided for lag and delay dominant FOPDT processes. For comparison purposes, an integer order PI controller, tuned according to the same performance specifications as the FO-IMC, is also implemented as an event-based control strategy. The numerical results show that the proposed event-based implementation for the FO-IMC controller is suitable and provides for a reduction in the resources used for computing the control signal.

The paper is structured as follows. In Section 2, the proposed tuning procedure for the FO-IMC controllers is detailed. This is a novel approach, being based on the NRTF approximation method. Then, the event-based algorithm for the FO-IMC controller is described and the NRTF approach is briefly presented. Section 3 presents the results obtained for lag and delay dominant FOPDT processes, in terms of reference tracking, disturbance rejection, and robustness. Comparative results are also given. Section 4 includes a brief discussion of the previously presented results, while the last section concludes the research.

#### **2. Materials and Methods**

#### *2.1. Tuning the FO-IMC Controller*

The following mathematical representation of the processes is considered:

*Hp*(*s*) <sup>=</sup> *<sup>k</sup> Ts* + 1 *e* −τ*s* , (1)

where *k* is the process gain, *T* is the time constant, τ is the time delay, and *s* is the Laplace variable. The transfer function in (1) is generally used to model various types of processes, such as thermal, chemical, biomedicine systems. For these types of processes, a FO-IMC control strategy is proposed, as indicated in Figure 1, where *Hc*(*s*) is the equivalent controller in a standard feedback structure, *Hm*(*s*) is the process model, d—is the disturbance signal, y—the output signal, r—the reference signal.

The design of the FO-IMC controller is based on the inversion of the process model. For time delay processes, the time delay cannot be inverted and needs to be approximated, using either first Taylor series or Padé approximations [39]. Current research has shown that using these widely used approximation methods leads to poorer closed loop results [38], compared to a new approach based on the non-rational transfer function (NRTF) approximation method [43]. The new approach to tuning FO-IMC controllers for FOPDT processes in (1) is detailed next.

**Figure 1.** FO-IMC closed loop control scheme.

The proposed fractional order IMC (FO-IMC) controller is given by:

$$H\_{FO-IMC}(\mathbf{s}) \;= \; \frac{\mathbf{T}\mathbf{s} + 1}{k} \frac{1}{\lambda \mathbf{s}^a + 1},\tag{2}$$

where α ∈ (0, 2) is the fractional order and λ is the FO-IMC filter time constant. For α = 1, the classical IMC controller is obtained. The limiting interval of the fractional order α is chosen such that the fractional order operation has a physical relevance from the control action point of view, as presented in [11].

Simple computations based on the diagram in Figure 1 lead to the following transfer function for the equivalent controller:

$$H\_{\mathfrak{C}}(\mathbf{s}) = \frac{\mathrm{Ts} + 1}{k(\lambda \mathrm{s}^{\alpha} + 1 - \mathfrak{e}^{-\pi s})}. \tag{3}$$

Notice the direct occurrence of the time delay in the denominator of (3). This can be further written as an integer order PI controller in series with a fractional order filter:

$$H\_f(s) = \frac{s}{\lambda s^a + 1 - e^{-\tau s}}.\tag{4}$$

To tune the parameters of the FO-IMC controller, simple tuning methods can be used. In this particular approach, the phase margin and gain crossover frequency specifications are employed. These two performance specifications refer to the loop transfer function:

$$H\_l(s) = H\_\mathcal{P}(s) \cdot H\_\mathcal{C}(s) \;= \; \frac{1}{\lambda s^a + 1 - e^{-\tau s}} e^{-\tau s} \,. \tag{5}$$

To meet the phase margin constraint, the phase equation is used:

$$
\angle H\_l(j\omega\_\varepsilon) = -\pi + PM\_\prime \tag{6}
$$

where ω*<sup>c</sup>* is the desired gain crossover frequency and PM is the desired phase margin. The phase margin is a direct measure for the stability and robustness of a system. The larger the PM is, the more robust the overall closed loop system becomes. The selection of the gain crossover frequency is based on the maximization of the delay margin associated to the closed loop system, according to:

$$w\_{\mathfrak{c}} = \frac{PM}{\tau\_m - \tau},\tag{7}$$

where τ*<sup>m</sup>* is the maximum time delay that would make the process in (1) unstable. To meet the gain crossover frequency constraint, the modulus equation is used:

$$\left|H\_l(j\omega\_c)\right| = 1.\tag{8}$$

Then, replacing (1) and (3) in (6) and (8), leads to the following system of equations:

$$\begin{cases} \lambda \frac{\tan\left(\pi - PM - \pi \omega\_{\mathcal{E}}\right) - \tan\left(\pi - PM - \pi \omega\_{\mathcal{E}}\right) \cos\left(\pi \omega\_{\mathcal{E}}\right) - \sin\left(\pi \omega\_{\mathcal{E}}\right)}{\omega\_{\mathcal{E}}^a \sin\left(\frac{4\pi}{2}\right) - \omega\_{\mathcal{E}}^a \tan\left(\pi - PM - \pi \omega\_{\mathcal{E}}\right) \cos\left(\frac{4\pi}{2}\right)},\\ \lambda^2 \omega\_{\mathcal{E}}^{2a} + 2\lambda \omega\_{\mathcal{E}}^a \left[\cos\left(\frac{4\pi}{2}\right) - \cos\left(\frac{4\pi}{2} + \pi \omega\_{\mathcal{E}}\right)\right] - 2\cos\left(\pi \omega\_{\mathcal{E}}\right) + 1 = & 0. \end{cases} \tag{9}$$

The tuning of the FO-IMC controller is completed when the system of nonlinear equations in (9) is solved [12,17]. To implement the equivalent controller, an event-based algorithm is preferred. Such an approach leads to a smaller computational effort [46] and is more suitable in various industrial applications [46].

#### *2.2. Event-Based Algorithm for FO-IMC Controllers*

The equivalent controller for a standard feedback loop, as usually encountered in industrial applications, obtained based on the IMC methodology is given in (3). To implement this controller, an alternative form is preferred, as mentioned previously, with an integer order PI controller in series with the fractional order filter in (4). The new mathematical model for this fractional order equivalent controller is given as:

$$H\_{\mathbf{c}}(\mathbf{s}) \;= \, \mathcal{C}(\mathbf{s}) H\_f(\mathbf{s}) \;= \, \frac{\, \text{Ts} + 1}{\text{ks}} H\_f(\mathbf{s}) \;= \, \frac{\, \text{T}}{\text{k}} (\mathbf{1} + \frac{1}{\text{Ts}}) H\_f(\mathbf{s}), \tag{10}$$

where *C*(*s*) is the PI controller and *Hf*(*s*) is the fractional order filter in (4).

Figure 2 presents the event-based paradigm, consisting of three components: process data measurement (data acquisition), event detector, and control input generator.

**Figure 2.** Basic paradigm of an event-based controller implementation [46].

The process output is measured at each sampling period *hnom*, chosen according to standard discretization rules. The measured output data is transferred into the event detector. The main task of the detector is to decide whether an event has occurred, and in this case to trigger the control input generator. The event detector implements a function that optimizes the control process [47–49]. One of the most widely used event detection rules is based on computing the error signal and verifying whether it lies within a predefined range [−Δ*e*, Δ*e*]:

$$\left| c(t) - c(t - h\_{act}) \right| \ge \Delta\_{\mathfrak{e}\_{\mathcal{V}}} \tag{11}$$

where *hact* denotes the elapsed time since the triggering of the previous event, *e*(*t*) is the current error signal, and *e*(*t* − *hact*) is the error at the previous event. Apart from the event triggering condition in (11), a safety condition is also used such that:

$$
\hbar\_{\text{nct}} \ge \hbar\_{\text{max}}.\tag{12}
$$

where *hmax* is the maximum time between two consecutive events [50].

Once an event has been triggered, either when (11) or (12) occurs, the control input generator computes a new value for the control signal, according to a predefined algorithm. Since the computation of the control signal value occurs at variable sampling instants, the control law is represented by a discrete-time control algorithm where the sampling time parameter is considered as a variable parameter. The algorithm proposed in this paper is detailed below.

The overall Simulink implementation of such an event-based algorithm is given in Figure 3, where the blocks stand for: *nrtf\_fo\_filter* implements the NRTF approximation of the fractional order filter in (4), event-detector implements both the event detection part, as well as the control input generator for the integer order PI controller. The fractional order filter in (4) is used to filter the error signal. This occurs at every sampling period *hnom*. The filtered error signal is then fed to the event-detector which implements the function that triggers of the control input generator. The latter is based on the standard PI controller, C(s) in (10). Thus, in the proposed approach, the PI controller is implemented in an event-based manner.

**Figure 3.** Simulink implementation of an event-based fractional order control algorithm.

Once the tuning of the FO-IMC has been performed and the two parameters, λ and α, determined, the fractional order filter in (4) is implemented in a discrete-time approximation based on the NRTF method, while the PI controller is implemented as an event-based algorithm. The control signal *U*(*s*) of the PI controller *C*(*s*) in (10) is computed based on:

$$\mathcal{U}l(\mathbf{s}) \, \, \, = \, k\_p \Big( 1 + \frac{1}{T\_{\rm i}\mathbf{s}} \Big) + \, \, E\_{f\_{\rm f}} \, \, \, \, \tag{13}$$

where *kp* and *Ti* are the proportional gain and integral time constant and *Ef*(*s*) is the Laplace transform of the filtered error signal, at the output of the fractional order filter in (4):

$$H\_f(\mathbf{s}) \, \, \, \, \frac{E\_f(\mathbf{s})}{E(\mathbf{s})}, \,\tag{14}$$

where *E*(*s*) is the Laplace transform of the error signal *e*(*t*) defined as *E*(*s*) = *Ysp*(*s*) − *Y*(*s*), *Ysp*(*s*) is the Laplace transform of the reference signal, *Y*(*s*) is the Laplace transform of the measured output signal. For the particular case of FOPDT processes, the PI controller parameters are given as: *kp* = *<sup>T</sup> <sup>k</sup>* and *Ti* = *T*, as resulting from (10) and (13). The event-based implementation of the PI controller can be achieved based on (13).

#### *2.3. Comparisons with an Event-Based PI Controller*

To compare the results, a classical integer order PI controller is designed for the same process in (1). The choice of the PI controller is based on the same number of parameters, as in the case of the FO-IMC controller, which allows for a similar tuning approach based on ensuring a certain gain crossover frequency and phase margin. The PI controller transfer function is given as:

$$C\_{PI}(s) \;= \; k\_p \Big(1 + \frac{1}{T\_i s}\Big) \tag{15}$$

where *kp* and *ki* are the proportional and integral gains. The same performance specifications are used, as in the design of the FO-IMC controller. In this case, the loop transfer function is given by:

$$H\_l(\mathbf{s}) = H\_{\mathcal{P}}(\mathbf{s}) \cdot \mathbb{C}\_{\mathcal{P}l}(\mathbf{s}) \ = k\_{\mathcal{P}} \Big( 1 + \frac{1}{T\_{\mathcal{I}}\mathbf{s}} \Big) \frac{k}{T\mathbf{s} + 1} e^{-\tau s} \,. \tag{16}$$

To meet the phase margin constraint, the phase Equation in (6) is used, leading to:

$$T\_{\rm i} = \frac{\tan\left(-\frac{\pi}{2} + PM - \angle H\_{\rm P}(j\omega\_c)\right)}{\omega\_c},\tag{17}$$

where ω*<sup>c</sup>* is the desired gain crossover frequency and *PM* is the desired phase margin. To meet the gain crossover frequency constraint, the modulus equation in (8) is used, leading to:

$$k\_p = \frac{T\_i \omega\_c}{\left| H\_p(j\omega\_c) \right| \sqrt{T\_i^2 \omega\_c^2 + 1}}.\tag{18}$$

Thus, the tuning of the PI controller is complete, with the *kp* and *ki* parameters uniquely determined based on (17) and (18). To implement the PI controller, the event-based algorithm as proposed in [46] will be used. For a fain comparison, the parameters of the event-based algorithm will be similar to those used in the event-based implementation of the FO-IMC controller.

#### *2.4. A Brief Overview of the NRTF Approximation Approach*

Various discrete-time approximation methods for fractional order systems have been proposed over the years, including direct and indirect approaches [51]. One of the advantages of direct methods lies in the expedite approximation of fractional order systems as discrete-time higher order transfer functions. Most of the existing methods deal with the direct approximation of simple fractional order elements, such as the fractional order integrator or first order filter [52]. The NRTF method has been proposed as a means to offer a discrete-time approximation of low order for any type of non-rational transfer function, including complex fractional order elements and time delays [43]. The method consists of four steps, as detailed briefly below. A more detailed analysis and comparisons of the NRTF approach with other methods can be found in [43].

Step 1: The following generating function is used to replace the Laplace variable *s* in the fractional order system:

$$w(z^{-1}) = \frac{1+\delta}{T\_S} \frac{1-z^{-1}}{1+\delta z^{-1}},\tag{19}$$

where δ [0, 1] is a shaping knob and *Ts* is the sampling period. To decrease the phase error between the approximation and the actual fractional order system, the parameter δ should be selected to be large, while a smaller value of δ decreases the magnitude error [43]. As fractional order systems have unlimited memory, the approximation is only possible within a certain limited frequency range. During this step, the maximum frequency boundary ω*<sup>h</sup>* has to be specified, according to the Nyquist sampling theorem, with ω*<sup>h</sup>* = <sup>π</sup> *Ts* . The approximation of the fractional order system will then be valid in an interval defined as (0, ω*h*).

Step 2: The frequency response of the discrete-time fractional order system obtained in Step 1 is computed. To achieve this, the discrete-time operator *z* is replaced with *ej*ω*Ts*, where <sup>ω</sup> <sup>=</sup> <sup>2</sup><sup>π</sup> *TSNS* 012 ... *NS* 2 is a vector of equally spaced frequencies and *Ns* is also a tuning knob. For a good approximation in the low frequency range, *Ns* should be large. The result of this second step consists in a vector of frequency response values of the fractional order discrete time transfer function.

Step 3: The inverse fast Fourier transform (FFT) algorithm is used to calculate the impulse response of the discrete-time fractional order system:

$$\lg[n] = \frac{1}{N\_S} \sum\_{k=0}^{N\_{S-1}} G[k] e^{+j\frac{2\pi}{N\_S nk}}, \ n = 0, 1, 2, \dots, N\_S - 1 \,\,\,\,\tag{20}$$

with *G*[*k*] denoting the frequency response of the original fractional order system. The result of this step is a vector (20) containing *Ns* impulse response values.

Step 4: The Steiglitz–McBride approach [53] is used to determine a rational discrete-time transfer function with a similar impulse response as obtained from the inverse FFT in Step 3. The order *N* of the approximation has to be specified. The larger *N* is, the better the approximation. This also results in a higher order discrete-time transfer function. A compromise should be considered. The result of this step is the final discrete-time integer order transfer function of the form:

$$\mathcal{G}(z^{-1}) = \frac{c\_0 + c\_1 z^{-1} + \dots + c\_N z^{-N}}{d\_0 + d\_1 z^{-1} + \dots + d\_N z^{-N'}} \tag{21}$$

where *c*0, *c*<sup>1</sup> ... *cN* and *d*0, *d*<sup>1</sup> ... *dN* are coefficients computed according to the SteiglitzMcBride approach.

The step-by-step design procedure for a FO-IMC controller, as proposed in this paper, is detailed below, along with the event-based implementation.

Step 1: Select the desired PM and τ*m*. Compute ω*<sup>c</sup>* based on (7).

Step 2: Solve (9) to determine the FO-IMC controller parameters, λ and α.

Step 3: Compute the PI controller parameters according to *kp* = *<sup>T</sup> <sup>k</sup>* and *Ti* = *T* and the fractional order filter as indicated in (4), for the equivalent fractional order controller as described in (3).

Step 4: Select the parameters of the NRTF approximation method for the discrete-time approximation of the fractional order filter in (4): N, ω*h*, and δ*.* The sampling period *Ts* is indirectly obtained as ω*<sup>h</sup>* = <sup>π</sup> *Ts* .

Step 5: Select the parameters for the event-based implementation of the PI controller: *h*\_*nom* = *T*\_s, Δ\_*e*, and *h*\_*max*. The event-based algorithm is implemented based on two functions: an event detector (Figure 4) and a control signal generator (Figure 5), as follows.

**Figure 4.** Event detector function.

**Figure 5.** Control input generator function.

#### **3. Results**

This section presents the main results obtained. The design is specific for FOPDT processes. Two different types will be discussed, the lag dominant and the delay dominant process. In both cases, reference tracking, disturbance rejection, and robustness to gain variations are considered as simulation tests. Reference tracking tests have been included in order to show the efficiency of the event-based controller in terms of setpoint trailing, while disturbance rejection results are considered in order to demonstrate the ability of the event-based controller to cope with external disturbances. Only step disturbance signals have been considered. As the results show, the event-based FO-IMC controller ensures better closed loop results compared to the event-based integer order PI controller, despite both controller being tuned and implemented in a similar fashion. Robustness tests are included to demonstrate that a fractional order IMC controller is intrinsically more robust to gain uncertainties, compared to a traditional integer order PI controller, even though robustness is not directly tackled in the design.

#### *3.1. The Lag Dominant FOPDT Process*

The following process model is considered for the first case study:

$$H\_p(s) \, \, = \, \frac{1}{4s+1}e^{-s} \,. \tag{22}$$

To design the FO-IMC controller based on the tuning method described in Section 2.1, a phase margin PM = 85◦ and a gain crossover frequency ω*<sup>c</sup>* = 0.3 rad/s are imposed. The solution of (9) yields λ = 1.95 and α = 0.85, with the FO-IMC controller given as:

$$H\_{FO-IMC-NRTF}(\mathbf{s}) = \frac{4\mathbf{s} + 1}{1} \frac{1}{1.95\mathbf{s}^{0.85} + 1} \,\mathrm{}\,\mathrm{}\,\tag{23}$$

while the equivalent controller is computed as:

$$H\_{\mathfrak{c}}(\mathbf{s}) = \frac{4s+1}{1.95s^{0.86} + 1 - e^{-s}}.\tag{24}$$

In this case, the parameters of the PI controller are *kp* = 4 and *Ti* = 4. The fractional order filter:

$$H\_f(\mathbf{s}) = \frac{\mathbf{s}}{1.95 \mathbf{s}^{0.8475} + 1 - \mathbf{c}^{-\mathbf{s}}} = \frac{E\_f(\mathbf{s})}{E(\mathbf{s})},\tag{25}$$

is implemented as a discrete-time transfer function based on the NRTF approach with the order *N* = 7, δ = 1 and sampling period *Ts* = 0.1 s. For the event-based PI control algorithm, the following parameters are used: *hnom* = *Ts* = 0.1 s, *hmax* = 0.5, and Δ*<sup>e</sup>* = 0.1.

For comparison purposes, a PI controller is also designed for the same performance specifications. The parameters are obtained according to (17) and (18), leading to:

$$\mathcal{C}\_{Pl}(\mathbf{s}) = 1.3841 \mathbf{(1} + \frac{1}{6.3715 \mathbf{s}}). \tag{26}$$

The controller in (26) is then implemented in an event-based algorithm with the same parameters as in the case of the FO-IMC controller.

The reference tracking, disturbance rejection and robustness results are given in Figures 6–9.

**Figure 6.** Comparison between the closed loop systems with the event-based FO-IMC and the classical proportional integral PI controllers for reference tracking (output signal in the upper plot, input signal in the lower plot).

**Figure 7.** Comparison between the closed loop systems with the event-based FO-IMC and the PI controllers for a 0.2 disturbance rejection (output signal in the upper plot, input signal in the lower plot).

**Figure 8.** Robustness validation of the event-based FO-IMC controller (output signal in the upper plot, input signal in the lower plot).

**Figure 9.** Robustness validation of the event-based PI controller (output signal in the upper plot, input signal in the lower plot).

#### *3.2. The Delay Dominant FOPDT Process*

The following process model is considered for the second case study:

$$H\_{\mathcal{P}}(\mathbf{s}) \;= \; \frac{2}{s+1} \mathbf{e}^{-2s}. \tag{27}$$

To design the FO-IMC controller based on the tuning method described in Section 2.1, a phase margin PM = 80◦ and a gain crossover frequency ω*<sup>c</sup>* = 0.3 rad/s are imposed. The solution of (9) yields λ = 0.88 and α = 0.62, with the FO-IMC controller given as:

$$H\_{\rm FO-IMC-NRTF}(\mathbf{s}) = \frac{\mathbf{s} + 1}{2} \frac{1}{0.88 \mathbf{s}^{0.62} + 1} \,\mathrm{}\,\mathrm{}\,\mathrm{s} \tag{28}$$

while the equivalent controller is computed as:

$$H\_c(s) = \frac{s+1}{2(0.88s^{0.62} + 1 - e^{-2s})}.\tag{29}$$

In this case, the parameters of the PI controller are *kp* = 0.5 and *Ti* = 1. The fractional order filter:

$$H\_f(\mathbf{s}) = \frac{\mathbf{s}}{0.88\mathbf{s}^{0.62} + 1 - \mathbf{e}^{-2s}} = \frac{E\_f(\mathbf{s})}{E(\mathbf{s})},\tag{30}$$

is implemented as a discrete-time transfer function based on the NRTF approach with the order *N* = 5, δ = 0.5 and sampling period *Ts* = 0.1 s. For the event-based PI control algorithm, the following parameters are used: *hnom* = *Ts* = 0.1 s, *hmax* = 0.5 and Δ*<sup>e</sup>* = 0.1.

For comparison purposes, a PI controller is also designed for the same performance specifications. The parameters are obtained according to (17) and (18), leading to:

$$C\_{Pl}(s) = 0.3430 \left( 1 + \frac{1}{2.9055s} \right) \,\text{.}\tag{31}$$

The controller in (31) is then implemented in an event-based algorithm with the same parameters as in the case of the FO-IMC controller.

The reference tracking, disturbance rejection, and robustness results are given in Figures 10–13.

**Figure 10.** Comparison between the closed loop systems with the event-based FO-IMC and the PI controllers for reference tracking (output signal in the upper plot, input signal in the lower plot).

**Figure 11.** Comparison between the closed loop systems with the event-based FO-IMC and the PI controllers for a 0.2 disturbance rejection (output signal in the upper plot, input signal in the lower plot).

**Figure 12.** Robustness validation of the event-based FO-IMC controller (output signal in the upper plot, input signal in the lower plot).

**Figure 13.** Robustness validation of the event-based PI controller (output signal in the upper plot, input signal in the lower plot).

#### **4. Discussion**

A performance comparison regarding the two different event-based controllers is presented in Table 1, for the lag dominant process. Figure 6 depicts a comparison regarding reference tracking with the event-based FO-IMC controller and the event-based PI controller. As indicated here, the FO-IMC achieves a faster settling time, compared to the PI: 13 s, compared to nearly 25 s. The drawback is that the FO-IMC control signal is twice as large, but solely during one event. Both controllers manage to achieve this without any overshooting. Over the 40 s seconds simulation time, the event-based FO-IMC controller requires 82 control signal computations; similarly for the event-based PI controller. In a classical discrete-time approximation, both type of controllers would have needed 400 computations. This leads to an overall reduction of the resources used of 79.5%. Improved disturbance rejection results are also visible in the case of the FO-IMC controller, compared to the PI controller, as indicated in Figure 7. The settling time for the FO-IMC is approximately 8 s, compared to 16 s for the PI. In terms of control signal computations, there are 61 for the event-based FO-IMC implementation, compared to 60 for the event-based PI implementation and 300 for the standard discrete-time implementation. This leads to 79–80% reduction in the resources used. The robustness validation of the event-based FO-IMC controller is given in Figure 8, whereas the robustness tests for the event-based PI controller are indicated in Figure 9. Although none of the control strategies were designed specifically to ensure the robustness to gain variations, the simulation results in Figures 8 and 9 show that for ±50% gain variations, the event-based controllers manage to maintain 0 overshoot. A comparison between the two shows that the event-based PI controller has better chances of turning the closed loop into an underdamped response for larger positive gain variations.

**Table 1.** Performance comparison between the event-based FO-IMC and event-based PI controller for the lag dominant FOPDT process.


A performance comparison regarding the two different event-based controllers is presented in Table 2, for the delay dominant process. In this case, Figure 10 depicts a comparison regarding reference tracking with the event-based FO-IMC controller and the event-based PI controller. The event-based FO-IMC controller, proposed in this manuscript, achieves zero overshoot and a 7 s settling time. The event-based PI controller achieves no overshoot, but with an oscillatory response, as well as a larger settling time of 18 s. In terms of control effort, this is larger for the FO-IMC, compared to the PI. A comparison regarding resources used over 40 s simulation shows that the event-based FO-IMC requires 103 computations of the control signal, whereas the event-based PI controller needs solely 83. This accounts for 74% reduction in the resources used for the event-based FO-IMC and a slightly better 79% for the event-based PI controller, compared to the standard discrete-time implementation (with 400 computations over the 40 s simulation period). In terms of disturbance rejection, the comparative simulation results given in Figure 11 demonstrate the efficiency of the FO-IMC compared to the PI, with a settling time of 7 s, compared to 12 s. In this case also, the event-based FO-IMC requires 87 computations of the control signal, higher than the 61 for the event-based PI controller. The simulation period considered was 30 s, with a standard discrete-time implementation requiring 300 control signal computations overall. In this case, 71% improvement in the resources used is achieved with the event-based FO-IMC implementation and 80% with the event-based PI controller, compared to the standard discrete-time implementation. The robustness validation of the event-based FO-IMC controller is given in Figure 12, whereas the robustness tests for the event-based PI controller are indicated in Figure 13. Although none of the control strategies were designed specifically to ensure the robustness to gain variations, the simulation results in Figure 12 show that better robustness can

be achieved by using the event-based FO-IMC controller, compared to the event-based PI controller. The latter has oscillatory response and higher overshoot and nearly twice settling time.

The results obtained for the event-based FO-IMC controller show that this can be considered as a viable option for controlling processes where resources, bandwidth allocation, energy usage are limited. Furthermore, as the simulation results show, the event-based FO-IMC control strategy offers better results in terms of reference tracking, disturbance rejection, and robustness for both lag and delay dominant systems. The robustness of the event-based FO-IMC controller is significantly improved compared to the event-based PI controller, for delay dominant systems. This is an aspect intrinsic to the IMC methodology. The sole disadvantage of the event-based FO-IMC controller is that there is an increase in the control effort and in the number of events that require the computation of the control signal, compared to the event-based PI controller.


**Table 2.** Performance comparison between the event-based FO-IMC and event-based PI controller for the delay dominant FOPDT process.

Further research includes the modification of the FO-IMC tuning procedure to an optimization routine where the control effort is also directly tackled, as well as the robustness property. Additionally, an experimental validation is to be considered.

#### **5. Conclusions**

Fractional order calculus has been used to provide for a generalization of the IMC. Such an approach is usually considered for the control of dead time processes. In this paper, FOPDT processes are considered, including delay and lag dominant ones. The design is based on a new approximation approach, the NRTF method, for the equivalent controller in an IMC loop and on two performance specifications, the gain crossover frequency and the phase margin. As it has been previously demonstrated by the authors, the NRTF method allows for a more accurate approximation of the process dead-time and ensures an improved closed loop response.

The implementation of the final fractional order controller is usually a challenging task, since higher order transfer functions are used to approximate the dynamics of the original controller. In situations where CPU, bandwidth allocation, and energy usage are limited, resources need to be efficiently managed. In this paper, a solution for this is proposed, in terms of an event-based implementation of the FO-IMC controller. Such an approach, has only been recently proposed for fractional order PID-type controllers, but not for other types/structure of fractional order controllers. The originality of the approach consists in a two-step implementation. The equivalent fractional order controller, as obtained according to the proposed FO-IMC approach, is divided into an integer order PI controller and a fractional order filter. Then, the NRTF approach is used to determine a standard discrete-time approximation for the fractional order filter. The remaining PI controller is implemented in an event-based approach. Numerical results are provided for lag and delay dominant FOPDT processes. For comparison purposes, an integer order PI controller, tuned according to the same performance specifications as the FO-IMC, is also implemented as an event-based control strategy. The numerical results show that the proposed event-based implementation for FO-IMC controller is suitable and provides for better reference tracking, disturbance rejection, and robustness, compared to the integer

order event-based PI controller, as well as a smaller computational effort compared to a standard discrete-time implementation, thus being more suitable in various industrial applications where resources need to be drastically limited.

**Author Contributions:** Conceptualization, C.I.M. and I.R.B.; methodology, C.I.M.; software, I.R.B.; validation, I.R.B.; formal analysis, E.H.D.; investigation, C.I.M.; resources, I.R.B.; data curation, I.R.B.; writing—original draft preparation, C.I.M.; writing—review and editing, C.I.M. and E.H.D.; visualization, I.R.B.; supervision, C.I.M.; project administration, C.I.M.; funding acquisition, E.H.D. All authors have read and agreed to the published version of the manuscript.

**Funding:** D.E.H. was funded by Hungarian Academy of Science, Janos Bolyai Grant (BO/00313/17) and the ÚNKP-19-4-OE-64 New National Excellence Program of the Ministry for Innovation and Technology. C.I.M. and I.B. have been supported by a grant of the Romanian National Authority for Scientific Research and Innovation, CNCS/CCCDI-UEFISCDI, project number PN-III-P1-1.1-TE-2016-1396, TE 65/2018.

**Conflicts of Interest:** The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

#### **References**


© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

MDPI St. Alban-Anlage 66 4052 Basel Switzerland Tel. +41 61 683 77 34 Fax +41 61 302 89 18 www.mdpi.com

*Mathematics* Editorial Office E-mail: mathematics@mdpi.com www.mdpi.com/journal/mathematics

MDPI St. Alban-Anlage 66 4052 Basel Switzerland

Tel: +41 61 683 77 34 Fax: +41 61 302 89 18

www.mdpi.com