Structure of the evolutionary individual.

## Abstract

In this chapter, it is demonstrated that when using advanced evolutionary algorithms, whatever the adopted system model (SOSPD, nonminimum phase, oscillatory or nonlinear), it is possible to find optimal parameters for PID controllers satisfying simultaneously the behavior of the system and a performance index such as absolute integral error (IAE). The Multidynamics Algorithm for Global Optimization (MAGO) is used to solve the control problem with PID controllers. MAGO is an evolutionary algorithm without parameters, with statistical operators, and for the optimization, it does not need the derivatives, what makes it very effective for complex engineering problems. A selection of some representative benchmark systems is carried out, and the respectively two-degree-of-freedom (2DoF) PID controllers are tuned. A power electronic converter is adopted as a case study and based on its nonlinear dynamical model, a PI controller is tuned. In all cases, the control problem is formulated as a constrained optimization problem and solved using MAGO. The results found are outstanding.

### Keywords

- evolutionary algorithms
- PID controller
- nonlinear model
- MAGO
- 2DoF PID-based controllers
- SOSPD model
- control benchmark
- power electronic converters

## 1. Introduction

It is well known that most of 90% of the closed-loop implemented strategies are PI or PID controllers [1]. Since its introduction in 1940, researchers’ interest has been focused on the development on simplistic but effective tuning rules for PID controllers [2]. For any industrial plant without resonant characteristics, a SOSPD model can represent the dominant dynamics and that a suitable PID tuning can be achieved [3]. Moreover, Åström and Hägglund proposed a collection of systems models with various difficulties of control that are suitable for testing PID controllers. Those models illustrate systems with various difficulties of control. Nevertheless, SOSPD representation is limited, and a wide range of process dynamics can be found, for example, process with a non-minimum phase behavior or oscillations. Therefore, PID control traditional tuning is not well suited for most of the complex problems. The trend remains in the so-called two degree-of-freedom (2DoF) PID controllers [4]. The 2DoF PID control structure has two components: one to tune the controller considering the regulatory closed-loop mode performance and robustness and the second one to improve the servo-control behavior. 2DoF PID tuning could be also based on a system transfer function. A 2DoF PID control structure is the option to achieve simultaneously a good system performance as both regulator and servomechanism modes what is a challenge of control requirements for a traditional PID controller.

Evolutionary algorithms (EA) have been proved to be an effective tool to optimal PID controllers tuning [5]. In general, EA is considered as an optimal algorithm that is able to deal with ill-defined problem domain such as multimodality, discontinuity, time variance, randomness and noise [6]. MAGO as EA does not work with genetic operators. MAGO operators are inspired in numerical derivation applying the Nelder-Mead method, the estimation distribution of the actual population and a statistical quality control technique. Additionally, MAGO has only two tunable parameters: the population size and the number of generations. These two parameters could be removed, but they remain because in real situations they help to understand the context of the problem. Particularly, MAGO has been successfully tested for the tuning of PID controllers based on SOSPD models [7]. MAGO has been used in various fields of engineering [8], LQR tuning [9–11], drivers in tuning PID controllers [12, 13], showing successful solutions in each case applied.

Despite a lot of works in PID controllers tuning, a general concern remains because real processes have multiple operational constraints, and some exhibit high nonlinear dynamics that cannot successfully be captured by transfer functions. This chapter shows that advanced evolutionary algorithms are suitable to solve the control problem with PID controllers when the control system is formulated as an optimization problem. The evolutionary algorithm MAGO is used to solve the control problem with traditional PI and with 2DoF PID controllers. MAGO is an evolutionary algorithm without parameters; it is based on statistical operators and does not need the derivatives of the nonlinear optimization problems. Furthermore, this chapter demonstrates that whatever system model is adopted (SOSPD, non-minimum phase, oscillatory or nonlinear), it is possible to find optimal parameters for PID controllers satisfying the system behavior and a performance index such as absolute integral error (IAE). This chapter is divided into four sections as follows: in Section 2, the general problem statement of PID controllers tuning is introduced and formulated as an optimization problem. In Section 3, the (EA) MAGO is presented and the evolutionary design procedure of a PID controller is established. In Section 4, a selection of some representative benchmark systems from [5] is carried out, and the respectively 2DoF PID controllers are tuned. In Section 5, a power electronic converter (DC-DC buck converter) is adopted as a case study, and based on its nonlinear dynamical model, a PI controller is tuned by MAGO. PI-MAGO controller performance is tested, and a comparison is carried out against a PID controller tuned by the pole placement method. In all cases, the control problem is formulated as a constrained optimization problem and solved using MAGO.

## 2. Problem statement

### 2.1. Control system representation

Consider a single-input single-output (SISO) control system depicted in Figure 1. In this system,

The system output

The general form to represent a dynamical system is given by Eqs. (1) and (2), where *g* and

Through Taylor linearization, it is possible to obtain a linear representation of Eqs. (1) and (2) given by Eqs. (3) and (4). Where

Eqs. (3) and (4) are usually employed in control theory for designing multi-input multi-output (MIMO) control structures. However, transfer functions are a better approximation for designing SISO control structures. The realization given by Eq. (5) is obtained by applying the Laplace transform to Eqs. (3) and (4).

On the other hand, the control policy of an ideal PID controller is expressed by Eq. (6). Where

PID frequency domain representation is given by Eq. (7).

The closed-loop transfer function form for the system represented in Figure 1 considering a PID controller is given by Eq. (8).

If the system operates in the servomechanism mode, that is when disturbances are not considered, the output signal can be represented as in Eq. (9).

If the system operates in the regulation mode, that is when the signal reference is not considered, the output signal can be represented as in Eq. (10).

From Eqs. (9) and (10), both control objectives cannot be optimally achieved because the controller parameters simultaneously affect the servo and regulatory operation modes. At most, a tuning PID controller process can be carried out by establishing a servo-regulatory trade-off to obtain a closed-loop performance that is not optimum for neither servo nor regulatory operation modes, but it has an acceptable performance in both cases.

Controllers of the form given by either Eqs. (6) or (7) are known as one degree of freedom (1DoF) PID controllers. Two degree of freedom (2DoF) PID controllers are an alternative to overcome the 1DoF PID controller operation limitations. The control policy for a 2DoF PID controller is given by Eqs. (11) or (12). Considering the proportional, integral and derivative error, respectively in Eqs. (13), (14) and (15), where

with

The parameter

A compact form of Eq. (16) consistent with Figure 2 is given by Eq. (17). Where

The closed-loop transfer function form for the system represented in Figure 2 considering a 2DoF PID controller is given by Eq. (18). Where

With

From Eqs. (19) and (20), both control objectives can be achieved separately because of the possibility of tuning two different controllers, one for each operation mode.

### 2.2. Optimum control problem formulation

The usual criterion for tuning a controller is directly related to the desired closed-loop system response. Integral performance indexes allow quantifying the closed-loop system performance due to a unit step load disturbance. Most common employed indexes are integral of absolute error (IAE) (see Eq. (21)) and integral of absolute control action

For the PID case,

The load disturbance may enter at many different places, and extreme cases occur when it enters at the process input or output. However, when a feedback error appears, integral performance indexes evaluate the controller performance indistinctly, whereas load disturbance appears [14]. The abovementioned fact is the main motivation to adopt integral performance indexes.

The integrated error for a unit step disturbance at the process input is the inverse of the controller integral gain,

The controller tuning process that minimizes an integral performance index can be seen as an optimization problem where the ultimate goal is to find a controller parameters combination such that the value of an Integral Performance Index is minimized.

For the 1DoF PID controller, the optimal tuning problem consists of minimizing the objective function given by Eq. (23), where the minimum is the result of obtaining a suitable combination of the 1DoF PID parameters

Subject to a process model (see Eqs. (1)–(5)), a control action (see Eq. 6) and

Similarly, for the 2DoF PID controller, the optimal problem consists of minimizing the objective function given by Eq. (24), where the minimum is the result of obtaining a suitable combination of the 2DoF PID parameters

Subject to a process model (see Eqs. (1)–(5)), a control action (see Eq. 11) and

## 3. Tuning of PID controllers using an evolutionary algorithm

From the observation of living beings, we can see that these reproduce, adapt, and evolve in relation to the environment where they develop. Some of the characteristics acquired during life may be inheritable by the next generation. The synthetic theory of evolution has been able to explain these processes and biological variations in detail [15]. This theory bases on genes as units of inheritance transfer, that is, functional units of basic information for the development of an organism. The genetic material of an individual is in its genotype. The genotype consists of an organization of hierarchical structures of genes. The complex information contained in the genotype is expressed in the phenotype, that is, the visible characteristics and functionality of individuals. In the evolutionary process, the occurrence of small variations in the phenotypes, apparently random and without a clear purpose, is recognized. Such variations which are usually called mutations prove their efficacy in the light of the environment and prevail through the selection of the individual, or otherwise they disappear. The natural needing to produce offspring motivates the selection of individuals. Because of a severe competition for reproduction, which only the fittest individuals achieve, it is assumed that the offspring overcome their parents by inheriting their mixed characteristics. When resources in the environment become insufficient, only the fittest individuals will have a better chance of survival and reproduce. The selective pressure on individuals of a species makes them continually improve with respect to its environment. Evolutionary algorithms (EA) emulate the synthetic theory of evolution.

As natural evolution, an EA begins with an initial set of potential solutions to a specific problem. This set can be composed at random in a delimited searching space or using information of the problem. EA include operators that select and create new individuals. Crossover operator exchange of genetic material among “parents” to generate new “sons,” and the mutation operator makes small variations. The new set of possible solutions is evaluated using a “fitness” function. When evaluating, the fittest are favored, leaving them as new “parents.” The process is cyclically repeated to find the best solution to the problem in a delimited searching space.

EA encompass different approaches that transfer the behavior of adaptation and evolution of species, giving rise to several methods. Among the most popular approaches are genetic algorithms, genetic programming, evolutionary strategies, and evolutionary programming. Nowadays, EA are not only based in the biological evolution, rather EA are identified as algorithms that search iteratively for a solution through a population in evolution. Some of the main reasons for new optimization heuristics are the need to identify the interrelationships between the variables used to represent individuals according to the coding applied and the need to reduce the own parameters of the classical EA. New EA use operators different to the genetic ones. Some of those algorithms are differential evolution, estimation of distribution algorithms, and the multidynamics algorithm for global optimization.

Differential evolution at first glance is not based on any natural process. The proportional difference of two randomly chosen individuals from the population is added to a third individual, also randomly chosen. From this differential mutation, a fourth individual appears. This individual is compared against its parent, the third one. The best of them is selected to the next generation. The process is repeated until a stop criterion [16].

Estimation of distribution algorithms also bases their search on populations that evolve. The new population is recreated in each generation from the probability distribution obtained from the best individuals of the previous generation. The interrelationships between the variables are expressed explicitly through that distribution. There are no crossing or mutation operators. The process is repeated until a stop criterion [17].

In MAGO, a differential crossover is applied between the target individual and its mutant coming from a numerical derivation. A tournament chooses the best of them. The interrelationships among the variables are explicit through a distribution of the population in each generation. The new population is sampled from a set composed of the best individuals until now, the historical trend and other individuals completely new. Next, this algorithm is explained in detail.

### 3.1. Multidynamics algorithm for global optimization

EA emulates the mechanisms of natural selection and genetic inheritance inspiring from the Neo-Darwinian theory of biological evolution. EA have evolved themselves to treat with artificial evolution processes. MAGO is a good example of this evolution. MAGO does not work with genetic operators [18]. MAGO starts with a random initial population on a search space bounded by the problem. To guarantee diversity and increase the exploitation of the search space, MAGO creates new individuals by means of three different subgroups of the population simultaneously. Each group has its own dynamics: a normal distribution over the searching space, a conservation mechanism of the best individual, and a strategy for maintaining diversity [19]. Because introducing statistics operators, MAGO provides a strong way to demonstrate the evolution. The mutation based on numerical derivation, generalizes the searching space where MAGO can acts. MAGO takes advantage of the concept of control limits [20] to produce individuals on each generation simultaneously from the three different subgroups. The size of the population is fixed, but the cardinality of each subgroup changes in each generation according to the first, second and third deviation of the actual population, respectively. The exploration is performed creating new individuals from these three subpopulations, individuals that are governed by any of their dynamics, the exploration is performed. For the exploitation, MAGO, looking for the goal, uses a greedy criterion in the first subset.

MAGO is evolutionary in the sense that works with a population of possible solutions randomly distributed throughout the searching space approaching iteratively to the final solution. MAGO is autonomous in the sense that it regulates its own behavior and does not need human intervention. Unlike other EA, MAGO has only two parameters: the population size and the number of generations. These two parameters could be removed, but they remain because in real situations they help to understand the context of the problem.

In each generation, MAGO divides the population into three subgroups. To know how many individuals will belong to each subgroup, the actual entire population is observed as having a normal distribution. The average location, the first, second and third dispersion of the whole population are calculated to form the three groups. To each subgroup is assigned many individuals as the cardinality of each different level of standard deviation. Each group has its own evolution. The cardinality of these subgroups changes autonomously in each generation.

The subgroup named Emerging Dynamics (

Emerging Dynamics: This subset is created with the N1 fittest individuals in each generation. The N1 fittest individuals within the first standard deviation of the average location of the current population of individuals move in a line toward the best one of the entire population, in a kind of mutation that incorporate information from the best of all. The mutation and selection of individuals who have obtained the best values in their objective function is based on the simplex search method of numerical derivation [21]. MAGO uses only two individuals for this mutation, the best one and the trial one. If this movement generates a better individual, this one passes to the next generation; otherwise, its predecessor passes on with no changes. This method does not require gradient information for the derivation.

The fittest individuals are ordered from the best one. Test individuals are created bringing them closer to the best one, following the rule in Eq. (25):

where

where

*Crowd Dynamics*: The number of individuals of this subgroup corresponds to the cardinality of the second deviation of the normal distribution of the actual population. This subgroup has the role of exploring the searching space in a neighborhood close to the population mean. If the population mean and dispersion matrix for generation

Initially, the neighborhood around the mean may be large, but as evolution proceeds, this neighborhood is reduced, and the population mean is getting closer to the optimal but following on another path.

*Accidental Dynamics*: This group is a smaller one in relation to its impacts on the population. N3 new individuals are created from a uniform distribution over the whole search space, as in the initial population. The two dynamics mentioned above concentrate the population around their local optima. To maintain diversity, MAGO introduces new individuals in each generation with the accidental dynamic, sampling a uniform distribution throughout the search space. This dynamic also ensures the numerical stability of the covariance dispersion matrix. The accidental dynamics always guarantees the diversity and dispersion of the population, even if the other two groups already have converged. Following, the pseudo code of MAGO is presented.

MAGO Pseudo Code.

1: 2: Random initial population generation uniformly distributed over the searching space. 3: repeat 4: Evaluate each individual with the objective function. 5: Calculate the population covariance matrix and the first, second and third dispersion. 6: Calculate the cardinalities N1, N2 and N3 of the groups 7: Select N1 fittest individuals, modify them according to Eq. (25), translate the winners toward the best one and make them compete. Pass the fittest to the next generation 8: Sample N2 individuals from a uniform distribution in hyper rectangle 9: Sample N3 individuals from a uniform distribution over the whole search space and pass them to generation 10: 11: until an ending criterion is satisfied |

*Cardinalities*. For control tables, if the process is outside the control limits, then it is assumed that the process is out of order. The next step in MAGO is a type of variance decomposition, inspired by the well-known variance analysis (ANOVA). Consider the population dispersion matrix of generation

where,

This way of defining the elements of each group is dynamical in nature and autonomous in MAGO. Cardinalities depend on the dispersion of the whole population in generation

### 3.2. Design of PI/PID controllers via an evolutionary algorithm

A feedback controller is a device that automatically manipulates a predetermined variable to ensure the balance of the system around an operating point. It compares the actual value of the controlled variable to its desired value (feedback) obtaining an error signal to calculate the control action so that it maintains or returns the system to the point of operation [9].

The output,

The fitness function for the optimization problem of a 1DoF PID controller is defined in Eq. (33). The error is calculated for each point of time,

A complete analysis of the methods of tuning controllers based on SOSPD was made in [23, 24]. Each tuning rule for PID controllers has restrictions on the behavior of the plant, expressed in the range of validity, and has only been applied to a certain group of processes. In general, those rules are based on several relationships and/or conditions of the parameters defining the process model. Most methods for optimal tuning of SOSPD systems require, from experiments carried out directly on the plant, additional critical system information. Readers are referred to [25] for a good compilation of the PID tuning rules and [26] for a complete analysis of the different tuning rules characteristics and features. It is not always possible to perform experiments such as reaction curves and closed-loop tests because the extreme stress and oscillations may create instability and damage to the system. This scenario shows that a general rule for tuning PID controllers must be sought. A tuning method that best satisfies the operation requirements of each problem and ensures optimal values for the controller parameters according to the 2DoF PID chosen criterion. This situation could be reduced to an optimization problem consisting of minimizing an objective function. A suitable combination of the three parameters required by the PID controller will be the result of minimizing a performance criterion. This is the approach taken in this chapter.

MAGO has shown a great capacity to optimize nonlinear dynamical problems in the continuous domain. Because that, it has been selected for tuning several optimal 2DoF PID controllers. Next section is concerned to optimal 2DoF PID controllers satisfying an integral performance index and not requiring additional system information coming from experiments on the plant. With MAGO, the optimization of 2DoF PID controllers is made in only one stage and simultaneously for the regulator and servomechanism modes. The flowchart for tuning of PID controller using MAGO is shown in Figure 3. In this chapter, it is not included a convergence analysis of the MAGO; however, its convergence has been previously demonstrated in [18, 19].

## 4. 2DoF PID controllers tuning on benchmark plants

A 2DoF PID controller attempts simultaneously achieve good closed-loop servo-regulatory dynamical responses. Most of the recent literature working on 2DoF PID controllers had been based on both First Order Systems plus Time Delay (FOSPD) and Second Order plus Time Delay (SOSPD) models with satisfactory results [27–30].

In [22], a set of system models as a benchmark suitable for testing PID controllers was proposed. FOSPD and SOSPD were included in the benchmark. This set of system models presents different challenges of control because PID controllers are not well suited for all of them. From the best of our knowledge, none of the PID controller tuning rules applies to obtain suitable values for its parameters for all the systems in that benchmark.

In this chapter, nine different system models are taken from the benchmark and 2DoF PID controllers are designed, one for each system model. The 2DoF PID controller parameters obtained here are compared with parameters reported in [22] for the same system models. The 2DoF PID controller-tuning problem is formulated as a constrained optimization problem based on IAE and IAU performance indexes. Then, MAGO is employed to solve the optimization problem. Consider the system models given by Eqs. (34)–(42).

Multiple equals poles:

Fourth-order system:

Right half plane zero (non-minimum phase):

Time delay and lag: (FOSPD):

Time delay and double lag (SOSPD):

Fast and slow modes:

Conditionally stable system:

Oscillatory system:

Unstable pole:

In [22], the control problem was solved as an optimization process where the objective function was a combination of the IAE and IAU performance indexes. The main features of the procedure used in to solve the control problem were: (1) not only IAE but also IAU are included in the objective function establishing a kind of trade-off between the system performance and robustness due to the restriction imposed in the controller action effort through the IAU index. (2) Four 2DoF PID controller parameters were simultaneously optimized to take the full advantage of the control structure qualities. Traditionally, the tuning process for a 2DoF PID controller is carried out in two stages as follows: firstly, values of

Subject to

Table 2 summarizes results obtained with MAGO and in [22] for 2DoF PID controller parameters. Table 3 summarizes results obtained with MAGO and in [22] for each of the IAE and IAU performance indexes.

System model | ||||||||
---|---|---|---|---|---|---|---|---|

[22] | MAGO | [22] | MAGO | [22] | MAGO | [22] | MAGO | |

0.890 | 0.9544 | 5.147 | 5.4354 | 1.999 | 1.8095 | 0.661 | 0.4453 | |

3.637 | 3.2947 | 1.334 | 1.2791 | 0.420 | 0.4270 | 0.222 | 0.3096 | |

0.335 | 0.3515 | 2.665 | 2.6949 | 0.774 | 0.7941 | 0.844 | 0.5355 | |

0.423 | 0.5278 | 0.538 | 0.5765 | 0.137 | 0.1557 | 1.000 | 0.2593 | |

0.367 | 0.5013 | 0.497 | 0.6117 | 0.103 | 0.2380 | 1.000 | 0.7687 | |

0.626 | 1.8491 | 0.441 | 0.8014 | 0.000 | 0.1580 | 0.000 | 0.9654 | |

65 | 68.4154 | 1.736 | 1.2209 | 0.632 | 0.3924 | 0.141 | 0.0228 | |

0.596 | 0.6238 | 0.424 | 0.3392 | 0.172 | 0.1877 | 1.000 | 0.4617 | |

40 | 33.7561 | 1.430 | 0.7854 | 0.297 | 0.3159 | 0.231 | 0.0486 |

System model | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|

[22] | MAGO | [22] | MAGO | [22] | MAGO | [22] | MAGO | [22] | MAGO | |

8.420 | 8.9159 | 2.878 | 1.9858 | 5.999 | 5.8509 | 7.643 | 6.8976 | 24.943 | 23.6502 | |

1.460 | 1.3676 | 1.511 | 0.6211 | 0.375 | 0.4045 | 1.692 | 0.6923 | 5.039 | 3.0855 | |

8.575 | 9.0000 | 1.969 | 1.1623 | 16.912 | 17.0410 | 9.005 | 7.8505 | 36.462 | 35.0539 | |

1.396 | 1.5763 | 1.318 | 0.4935 | 1.300 | 1.3516 | 2.338 | 1.4282 | 6.353 | 4.8496 | |

1.464 | 1.5213 | 1.351 | 0.3665 | 1.431 | 1.3194 | 2.415 | 1.3957 | 6.610 | 4.6029 | |

1.543 | 0.7787 | 1.734 | 7.8872 | 1.205 | 0.4895 | 2.311 | 0.5851 | 6.793 | 9.7405 | |

1.555 | 1.2055 | 1.212 | 11.187 | 0.027 | 0.0180 | 1.121 | 0.1752 | 3.915 | 12.5855 | |

1.176 | 1.2154 | 1.593 | 0.7958 | 1.003 | 0.9138 | 2.112 | 1.0807 | 5.883 | 4.0057 | |

1.064 | 0.7669 | 2.087 | 16.310 | 0.036 | 0.0242 | 1.173 | 0.2073 | 4.360 | 17.3089 |

From Table 2, it is seen that parameters obtained with MAGO for 2DoF PID controllers are different in all cases, although they have similar magnitude scales. This implies that MAGO found a different minimum for the objective function (see Eq. (43)).

From Table 3, it is seen that MAGO found a better minimum value for the integral performance indexes except for the performance index

Figure 4 shows the closed-loop dynamical response for systems given by Eqs. (34)–(42). To test the 2DoF PID controllers’ performance, a step change in

Figure 5 shows control actions for systems given by Eqs. (34)–(42). In Figure 5, results obtained by MAGO (dashed line) and in [22] (solid line) are contrasted. From Figure 5, it is seen that the control action effort is similar for most cases except for

From Figures 4 and 5, it is seen that MAGO solves the optimization problem satisfactorily because the control objective is achieved for all systems. For instance, MAGO is not only suitable to solve the 1DoF PID control problem based on SOSPD [6], but also to solve the 2DoF PID control problem based on a wide range of systems, each one of them with different dynamical characteristics and challenges from the control point of view.

## 5. Case study: Evolutionary PI controller tuning for a buck DC-DC converter based on its nonlinear model

Power electronic converters (PEC) are electronic circuits that are commonly designed to regulate the voltage in their output when the input is a nonregulated current or voltage source. A PEC is highly efficient, highly reliable, negligible maintenance and very small. A PEC is usually composed of switches (

DC-DC buck converters are nonlinear systems which analysis and control could be difficult. Linear techniques based on classical controller have problems related to the stability around the operation point [31]. Nonlinear controllers can be implemented to improve the stability of the converter, but such techniques could be complex [32, 33]. Control techniques-based artificial intelligence simplifies the design and implementation, not requiring the mathematical model; nonetheless, they are designed based on expert knowledge of the converter [34–36]. Sliding mode control technique has the advantage to reject easily perturbations, but variable frequency of switching may be handled [37]. There are many articles dealing with control for the DC-DC buck converter but is still no consensus on the control strategy should be implemented. This is another reason to choose a DC-DC buck converter as a study case.

DC-DC buck converter, or step-down converter, is a power converter that steps down the voltage from its supply (input) to its load (output). Figure 5 shows the equivalent circuit of the DC-DC buck converter. It is composed of an inductor (*)* and feeds in its output (*)* a resistive load (*)*. Figure 6 also depicts the reference currents and voltages of the circuit, using passive sign convention. In this chapter, it is assumed that the converter operates in continuous condition mode (CCM).

The converter has two states per switching cycle (

The DC-DC buck converter model given by Eqs. (44) and (45) describes the nonlinear dynamical evolution of the system. From the control point of view, a model given by Eqs. (44) and (45) is inconvenient, and a linear approximation is preferred. The linear DC-DC buck converter state-space representation is given by Eqs. (46) and (47). Where

Transfer functions (

Transfer function

From the control point of view, the DC-DC buck converter can operate in two modes, as regulator and servomechanism. Regulation mode objective is to maintain constant the converter output voltage against any system disturbance. Servomechanism mode objective is to track an output voltage reference. Both operation modes can be combined at any moment. For instance, the selected control strategy for the DC-DC buck converter should assure a good performance for both operation modes. In this chapter, a PI/PID-based control structure fulfills both DC-DC buck converter control objectives. A DC-DC buck converter is parameterized as follows:

A rigorous way to tune PI controllers for DC-DC buck converters is through the pole placement method [36]. As PI controller tune requirements, wide accepted specifications are a bandwidth

Sisotool is a friendly MATLAB environment to tune PI/PID controller parameters. Figure 8 shows the DC-DC buck converter root locus diagram for the PI and PID controllers. In Figure 8, points represented as cruces correspond to poles and circles correspond to zeros, the diagonal line from the origin corresponds to

PI rather than PID control structures are preferred in PECs applications because PI-based control structures significantly reduce the feedback induced noise. In this chapter is proposed an alternative way to tune PI controllers for DC-DC buck converters in order to overcome the limitations with the pole placement method. PI controller tuning problem is formulated as a constrained optimization problem and solved using MAGO as in Eq. (49).

Subject to *Buck DC-DC nonlinear dynamical model* Eqs. (43) and (45)

Main features of the formulated optimization problem are: (1) DC-DC buck nonlinear dynamical model is incorporated instead of duty to output voltage transfer function. Using the nonlinear dynamical model of the DC-DC buck converter, it is possible to solve the optimization problem simultaneously considering regulation and servomechanism operation modes. (2) Objective function includes simultaneously IAE and IAU performance indexes. The inclusion of the IAU gives a kind of closed-loop robustness because it limits the maximum control action effort avoiding system oscillations and actuator saturations. (3) The optimization process is carried out based on the temporal dynamical response of the DC-DC buck converter operating in closed-loop. For each MAGO iteration, it is necessary to solve the DC-DC buck converter nonlinear dynamical model in the closed-loop mode. To solve the nonlinear dynamical model in the closed-loop mode, it is necessary to define an experiment such that multiple set-point changes and disturbances appear through the simulation time. The solution of the optimization problem is the set of PI controller parameters that minimize both IAE and IAU indexes for the experiment setup.

The total simulation time for the DC-DC buck converter is 25 min. The experiment setup for the optimization process is as follows: for the time interval *n* and *ng* were settled in 100. The optimization problem solution using MAGO is: objective function value equals 0.1066, PI controller parameters values are

PSIM is a recognized platform to simulate and validate the control system performance for PEC. A PSIM simulation is carried out for the DC-DC buck converter to validate MAGO optimization results. A DC-DC buck converter simulation is implemented on PSIM including parasitic losses in their passive elements as equivalent series resistances (ESR). Simulation aims to test the real closed-loop system performance. Therefore, two DC-DC buck converter closed-loop simulations are carried out as follows: (1) PID controller obtained by the pole placement method is implemented and its performance is tested. (2) PI controller obtained by MAGO is implemented and its performance is tested. In both cases, the experiment setup used in MAGO optimization is applied to test PID and PI controllers’ performance.

Figure 11 shows the DC-DC buck converter closed-loop dynamical response for both PI controller tuned by MAGO (PI-MAGO) and PID controller tuned by the pole placement method. Figure 10a shows both

Figure 11b shows the dynamical closed-loop response for the DC-DC buck converter output (

Figure 11c shows the control action (

Figure 11d shows the inductor current (

In summary, both PI and PID controllers achieve the DC-DC buck converter control objective. PID controller performs better than PI controller, but the last one has a smaller induced noise in

## 6. Conclusions

A method of tuning optimal controllers on nonlinear systems through the evolutionary algorithm MAGO has been successfully developed and implemented. The MAGO resolves the tuning as a constrained nonlinear optimization problem for both 1DoF and 2DoF PI/PID controllers on several types of plants running on different modes of operation. To ensure the desired performance of the control loop, everything is reduced to the characterization and adjusting of the value of a set of tuning parameters whatever the chosen control structure is. The usual tuning controller procedures involve uncertainty and time to obtain the right parameters, generally by trial and proof by trained personal depending of the method used. This chapter showed a way to reduce these challenges. MAGO straightforwardly assesses the controller’s parameters penalizing the error between the reference value and the output of the plant and minimizing the IAE and IAU performance criteria.

Traditional PID controller tuning rules are restricted to certain values on the behavior of the system and are limited to an only one type of operation. Most methods require experiments to be carried out directly on the plant to get additional necessary system information to apply them; these activities are not always possible to achieve because the triggering of extreme stresses and oscillations of the plant which may create instability and damages on the system, so that, they are not recommended. For benchmark models, the PID controller tuning was made by the MAGO without additional knowledge of the plant. The evolutionary solution obtained with the MAGO covers all those restrictions, extends their maximum and minimum limits, and it does not need additional experimental information from the plants and is suitable for both servo and regulator operating modes. The results showed that regardless of both the plant or controller models used, MAGO gets a satisfactory closed-loop system performance in agreement with the literature reported.

A linear model without losses for the DC-DC buck converter was used to implement the control strategy while a nonlinear system which includes parasitic losses was simulated as a most realistic system in PSIM. There was a big difference between the bode diagrams of the linear model and the nonlinear system; nevertheless, the controllers tuned by MAGO have a successfully behavior in terms of performance and robustness. MAGO controllers let overcome the limitations of traditional PI controllers.

The challenge of rely on a single method to assess the controller for different kinds of plants has been solved applying the evolutionary algorithm MAGO as a tool of optimization. The MAGO was applied to a set of benchmark plants, represented in both transfer functions and differential equation systems, with a control loop operating on both servo and regulator modes. The optimal tuning values of the

This chapter showed that, although there would be options in the traditional rules of controllers tuning, the use of heuristic algorithms is indeed easy than using the classic methods of optimal tuning. The evolutionary algorithm MAGO was used as a tool to optimize the controller parameters for optimal 2DoF PID controllers working on benchmark plants and to optimize the PI controller parameters in a DC-DC buck converter application. Regardless of the operating mode of the controller and the representation type of the plant used, better results are yielded when optimization is made with the MAGO algorithm than with the traditional methods for optimal tuning.

## Acknowledgments

The authors gratefully acknowledge the University of Antioquia (UdeA) for the support of the project CODI 2015-7747. This work was partially supported by COLCIENCIAS (Fondo Nacional de Financiamiento para la Ciencia, la Tecnología y la Innovación Francisco José de Caldas) with the doctoral scholarship 727-2015.