1 Introduction

The DC motors are base elements in almost any engineering application that requires movement. These elements are presented in vehicles (Bitar et al. 2015), in robotic manipulators (Li et al. 2013) and in many industrial tools. The use of DC motors has several advantages, some of them are: their operation simplicity by varying their input voltage, their relatively low cost and the great diversity of designs that can fit to any prototype. Almost all applications that use DC motors require an accurate operation (Yang and Chou 2009) and sometimes, an efficient operation in terms of energetic consumption (Raslavičius et al. 2017). Nevertheless, one of the main problems faced by engineers is the presence of parametric uncertainties. Parametric uncertainties are due to several causes such as a variational operating environment, the presence of noise and the wear of the plant after a long and continuous use. Parametric uncertainties may be variations in DC motor parameters, noise in the input/output signal, etc., usually unpredictable and responsible of inaccuracy in the control system. In Mao et al. (2003), for example, the friction induced by a DC motor had a negative effect in the positioning accuracy of an aero-static slider.

Over time, many efforts in search for a solution to this problem have been made. One way to handle the effect of parametric uncertainties when their behavior is well known (deterministic parametric uncertainties), is by designing an optimal control system or by a correct off-line adjusting of its parameters (Hashem Zadeh et al. 2016). However, this kind of solutions is not so efficient when there are no confidence about the behavior of the uncertainties.

An approach that deal with a set of bounded uncertainties (Liu and Yao 2016) is the robust control approach where the information about the differences between the actual system and the system model (model uncertainty) are used to design a controller. Till the date, many robust control algorithms have been developed for the speed regulation task of a DC motor (Song and Jia 2016; Kim et al. 1997; Linares-Flores et al. 2012; Orozco et al. 2012). Despite the high performance of robust controllers under unknown disturbances, the main disadvantage of this approach lies in the assumption of bounded uncertainties behavior.

Another way to handle parametric uncertainties is by using the adaptive control approach. Adaptive control refers to estimate the plant parameters online using the feedback of the system (Landau et al. 2011). Then, estimated parameters are used in calculating the control signal that allows a desired system operation. Unlike robust control approach, adaptive control is not limited by or does not need information about the uncertainties bounds.

Nowadays, there are many approaches from the adaptive control theory. In nonlinear control, several adaptive control laws have been designed and are based on the system model (Slotine and Li 1991) and some controller tuning techniques have been developed to improve the effectiveness in control systems subject to uncertainties (Yavuz et al. 2012). In Kwan et al. (1996), an adaptive control law was developed to control the speed of a motor with parameter variations.

Another approach to adaptive control is based on the use of artificial intelligence (AI) techniques for online tuning of linear controllers. In Ahn and Truong (2009), a set of fuzzy rules was used to tune the gains of a PID controller online. The resulting controller was used in force control of an electro-hydraulic system. In Le et al. (2013), a neural network was used to obtain the gains of a controller online for the control of a parallel robot manipulator of two degrees of freedom. The AI approach has shown to be effective in handling parametric uncertainties; nevertheless, a disadvantage of the used AI techniques is the required system information from the earlier to be adjusted and trained off-line; in other words, they need a collection of information previously acquired, about inputs and outputs of the system to be controlled, under different operation scenarios.

With the goal of finding the controller parameters that improve the accuracy of the controlled system operation, researches have been chosen a different control approach based on the formulation of an optimization problem, which requires optimization techniques to be solved (Dasgupta and McGregor 1992; Mori and Kita 2000). There are many computational methods to solve optimization problems, among them there are the bio-inspired meta-heuristic techniques which base their operation in natural processes. This kind of techniques has taken on great importance in the scientific community, because of their ability to find appropriate solutions with reasonable computation cost in highly nonlinear optimization problems (Reeves and Sons 1993), which are commonly presented in the real-world problems (Xu et al. 2016). Another important feature of these techniques is that several mechanisms can be added in order to handle constraints presented in almost any real-world problem (Mezura-Montes and Coello 2011). An application of this kind of techniques in control area is shown in Fister et al. (2016), where the parameters of a PID controller are tuned off-line to control a SCARA robot by using different meta-heuristic techniques. After a comparative analysis among techniques, Particle Swarm Optimization (PSO) proved to be the best alternative to solve this particular problem. In Villarreal-Cervantes and Alvarez-Gallegos (2016), several variants of the Differential Evolution algorithm were used to obtain the optimal gains of a PID controller off-line. The tuned PID parameters were used in the control of a experimental parallel robot prototype in order to validate the proposed tuning method. One way to obtain the optimal gains of a controller, when the model of the system is unknown, is presented in Mishra et al. (2015). In that work, the parameters of the PI controller to control a valve were obtained off-line by using current system data which is handled by Differential Evolution. The obtained parameters were set in the real controller, and they remained fixed through the execution time. Nevertheless, one of the main issues in the bio-inspired meta-heuristic techniques is that they does not guarantee the optimality condition, such that, they require a comparative analysis to find the most suitable bio-inspired meta-heuristic technique for solving a particular problem.

In adaptive control, meta-heuristic techniques are used to find appropriate controller parameters online. In Lin et al. (2004), the parameters of a PID controller were adjusted online by using a Genetic Algorithm. The obtained controller was able to minimize the position error of a linear induction motor. The above work shows the performance of the parameter adjusting strategy based in a single meta-heuristic technique, but there are no evidence of the behavior of different commonly used or novel techniques under the optimization approach to adaptive the control parameter. When the control problem to be solved requires a quick response, one of the big problems that must be afford by the adaptive control approach based on meta-heuristic techniques, is the convergence time of the algorithms, which usually exceeds the minimum time required to update the control signal.

The estimation of the controller parameters online through the optimization approach and by using meta-heuristic techniques may reduce the negative effect of the parametric uncertainties. Nevertheless, a formal study which reveal the performance of such strategies and the viability in uncertain scenarios has not been carried out. Hence, in this work, the optimization approach is used for the adaptive control of a DC motor. The use of several adaptive control strategies based on different meta-heuristic techniques is proposed to estimate the control parameters online. The main goal of the proposed controllers is to minimize the error in the speed regulation of the motor. All techniques are adjusted and implemented pursing their real implementation feasibility, and the optimization technique parameters are obtained by using the irace package in order to make a fair comparative analysis. Through a statistical analysis from simulated results, the qualities and differences among adaptive control strategies in different scenarios of DC motor uncertainties are shown in order to find better alternatives for use under this approach.

The main contribution of this work is the presentation of an adaptive control strategy based on meta-heuristic optimization, which shows to be efficient in the compensation of uncertainties presented in the DC motor and feasible in terms of practical experimental setting up. Another contribution lies in the statistical study of different meta-heuristic techniques used in the control strategy, which aids to select the most representative features that promote the searching of better solutions in order to propose more efficient techniques and also reveals their applicability in the problem of speed regulation of the DC motor.

The rest of the paper is organized as follows: In Sect. 2, the closed-loop system related with the DC motor dynamics and control system is presented. The adaptive control strategy based on an online constrained dynamic optimization problem is stated in Sect. 3. In Sect. 4 the meta-heuristic optimization techniques and the new hybrid proposal are described. The comparative analysis is performed and discussed in Sect. 5. Finally, in Sect. 6 the conclusions are drawn.

Fig. 1
figure 1

Electro-mechanic diagram of the DC motor

2 DC motor dynamics and control system

The dynamic model of the DC motor is described by (1) and its electro-mechanic diagram is shown in Fig. 1, with \(p=\left[ p_{1},p_{2},\ldots ,p_{6}\right] ^\mathrm{T}=\left[ \frac{b_{0}}{J_{0}},\frac{k_{m}}{J_{0}},\frac{k_{e}}{L_{a}},\frac{R_{a}}{L_{a}},\frac{1}{L_{a}},\frac{\tau _{L}}{J_{0}}\right] ^\mathrm{T}\), \(\bar{p}=\left[ \bar{p}_{1},\bar{p}_{2},\ldots ,\bar{p}_{6}\right] ^\mathrm{T}=\left[ \frac{\bar{b}_{0}}{\bar{J}_{0}},\frac{\bar{k}_{m}}{\bar{J}_{0}}, \frac{\bar{k}_{e}}{\bar{L}_{a}},\frac{\bar{R}_{a}}{\bar{L}_{a}},\frac{1}{ \bar{L}_{a}},\frac{\bar{\tau }_{L}}{\bar{J}_{0}}\right] ^\mathrm{T}\) the current and estimated vectors of DC motor parameters, respectively, where \(\theta _{m}\), \(\dot{\theta }_{m}\), \(\ddot{\theta }_{m}\) are the angle, the angular velocity and the angular acceleration of the shaft, respectively, \( i_{a}\) is the armature current, \(J_{0}\) is the rotor moment of inertia, \(k_{m}\) is the torque constant, \(b_{0}\) is the viscous friction constant, \(\tau _{L}\) is the load torque, \(R_{a}\) is the armature resistance, \(L_{a}\) is the armature inductance, \(k_{e}\) is the electromotive force constant and V is the input voltage.

$$\begin{aligned}&\frac{\mathrm{d}\dot{\theta }_{m}}{\mathrm{d}t}=p_{2}i_{a}-p_{1}\dot{\theta }_{m}-p_{6}\nonumber \\&\frac{\mathrm{d}i_{a}}{\mathrm{d}t}=p_{5}V-p_{4}i_{a}-p_{3}\dot{\theta }_{m} \end{aligned}$$
(1)

The dynamic model in (1) can be expressed as \(\dot{x}=f\left( p, x\left( t\right) ,u\left( t\right) \right) \), where the current state vector is proposed as \(x=\left[ x_{1}, x_{2}, x_{3} \right] ^\mathrm{T}=\left[ \theta _{m}, \dot{\theta }_{m}, i_{a} \right] ^\mathrm{T}\) and the control signal \(u=V\) is given in (2).

$$\begin{aligned} u=\frac{1}{\bar{p}_{2}\bar{p}_{5}}\left( v+\bar{p}_{1}\left( \bar{p} _{2}x_{3}-\bar{p}_{1}x_{2}-\bar{p}_{6}\right) \right) +\frac{\bar{p}_{3}}{ \bar{p}_{5}}x_{2}+\frac{\bar{p}_{4}}{\bar{p}_{5}}x_{3} \end{aligned}$$
(2)

The controller shown in (2) is used to regulate the speed of the DC motor, where \(v=k_{p}e-k_{d}\dot{x}_2\), \(k_p\) and \(k_d\) are the proportional and derivative gains, \(e=\omega _{r}-x_{2}\), \(\omega _{r}\) is the desired speed and \(\dot{x}_2=p_2 x_3 - p_1 x_2 - p_6\).

Fig. 2
figure 2

Proposed control strategy

3 Adaptive control strategy based on online optimization approach

The adaptive control strategy proposed in this work is shown in Fig. 2. The aim of this control strategy is to reduce the error in the speed regulation task of the DC motor under parametric uncertainties by obtaining the control parameters based on the motor output.

The control parameters that are obtained in this approach are those related to the estimation of the motor output.

It is important to mention that the online optimization method for the control tuning, requires solving a constrained dynamic optimization problem (CDOP) at each integration time \(\Delta t\), in order to give the optimum parameters to the control signal.

The estimation of the motor output to find the control parameters in the CDOP requires an estimated DC motor model with an estimated state vector \(\bar{x}\). Hence, the aim of the optimization problem is to find the vector of estimated parameters of the DC motor which minimizes the value of the objective function given in (3). The function in (3) equitably weights the error among each of the actual and estimated state variables in the time interval \(\Omega \in [t_\mathrm{opt}-\Delta w, t_\mathrm{opt}]\), in which \(t_\mathrm{opt}\) is the time instant when the optimization process is performed and \(\Delta w\) is the time interval in which the past states of the motor and of the dynamic model are used in the error calculation.

$$\begin{aligned} \mathbf min \ _{\bar{p} \in R^6} \ J=\sum _{k=1}^3 \left[ \ \int _{t \in \Omega } \left( x_k(t) - \bar{x}_k(t) \right) ^2 \mathrm{d}t \right] \end{aligned}$$
(3)

Additionally, the optimization problem is constrained by the dynamic of the current DC motor in (4) and of the estimated model in (5), by the initial conditions of the state variables in (6) and by the maximum and minimum bounds of the control signal in (7).

$$\begin{aligned}&\dot{x}=f\left( p, x , u, t \right) \end{aligned}$$
(4)
$$\begin{aligned}&\dot{\bar{x}}=f\left( \bar{p}, \bar{x} ,u, t \right) \end{aligned}$$
(5)
$$\begin{aligned}&\bar{x}(t_\mathrm{opt}-\Delta w)=x(t_\mathrm{opt}-\Delta w),\ x(0)=x_0 \end{aligned}$$
(6)
$$\begin{aligned}&u_\mathrm{min} \le u(t_\mathrm{opt}) \le u_\mathrm{max} \end{aligned}$$
(7)

4 Meta-heuristic optimizers

In this study, six different meta-heuristic techniques reported in the literature are used to find a solution to the optimization problem stated above and are detailed next. In addition, one hybrid meta-heuristic technique is proposed to enhance the capabilities in searching reliable solutions.

4.1 Differential Evolution

Differential Evolution (DE) bases its operation in the process of natural evolution (Price et al. 2005). Algorithm 1 shows the rand/1/bin variant of DE. In this variant an initial population with NP individuals is generated randomly in the search space. During \(G_\mathrm{max}\) generations, the individuals in the population can mutate using (8) which F is the mutation rate randomly selected per generation in range \([F_\mathrm{min},F_\mathrm{max}]\). Also, three randomly selected individuals are recombined using (9) where \(\mathrm{CR}\) is the crossover rate and \(r_1 \ne r_2 \ne r_3 \ne i\) are the random indexes of the parents. For a new generation, the individuals are selected according to (10). In the last generation, the best individuals will be found in population.

figure a
$$\begin{aligned}&v_{i}=x_{r1}+F(x_{r2}-x_{r3})\end{aligned}$$
(8)
$$\begin{aligned}&u_{i,j}=\left\{ \begin{array}{ll} v_{i,j} &{} \quad {\text {if }} rnd(0,1) \le \mathrm{CR} \\ x_{i,j}^{G} &{} \quad {\text {otherwise}} \end{array} \right. \end{aligned}$$
(9)
$$\begin{aligned}&x_{i}=\left\{ \begin{array}{ll} u_{i} &{} \quad {\text {if }} f(u_{i})<f(x_{i}) \\ x_{i} &{} \quad {\text {otherwise}} \end{array} \right. \end{aligned}$$
(10)

4.2 Particle Swarm Optimization

Particle Swarm Optimization (PSO) emulates the collaborative behavior of many species in search of food (Kennedy and Eberhart 1995). Algorithm 2 shows the basic operation of PSO where NP members of a particle swarm are initially distributed in the search space. During \(G_\mathrm{max}\) generations, particles modify their velocity using (12) where \(C_1\) and \(C_2\) are factors that weight the knowledge of the best known position by a particle and by the swarm, and \(\omega \) is a factor which reduce the velocity of all particles (Shi and Eberhart 1998) obtained with (11) within the range \([V_\mathrm{min},V_\mathrm{max}]\). Using its velocity, each particle modify its position using (13) and at the end of the cycle, the particles will be in the best places.

figure b
$$\begin{aligned} \omega =V_{\max }-\frac{G}{G_\mathrm{max}}\left( V_{\max }-V_{\min }\right) \end{aligned}$$
(11)
$$\begin{aligned} \begin{array}{c} \dot{x}_{i}=\omega \dot{x}_{i}+rnd(0,1) \cdot C_{1}\left( x_{i}^\mathrm{best}-x_{i}\right) \\ + rnd(0,1) \cdot C_{2}\left( x_\mathrm{swarm}^\mathrm{best}-x_{i}\right) \end{array} \end{aligned}$$
(12)
$$\begin{aligned} x_{i}=x_{i}+\dot{x}_{i} \end{aligned}$$
(13)

4.3 Bat Algorithm

Bat Algorithm (BAT) is based on the behavior of a group of bats in search of prey by echolocation (Yang 2010). Algorithm 3 shows the behavior of BAT where a group of NP bats is distributed in the search space. During \(G_ \mathrm{max}\) generations, each bat uses a fixed amplitude of its echolocation signal by adjusting the frequency \(Q_i\) in the range \([f_\mathrm{min},f_\mathrm{max}]\) as in (14). \(Q_i\) is used to drive the search of a bat to the best position using (15) and (16). Depending on its pulse rate \(r_i\), each bat can make a random search around the best position using (17). Each bat can fly randomly as shown in (18) with \(\bar{A}\) the average loudness of bats. If the new position of the bat improves its conditions, the bat reduces its loudness \( A_i \) and increases its pulse rate \(r_i\) using (19) and (20) with \( \alpha , \gamma \in [0,1] \) and \(r_0\) the maximum frequency. At the end generation, the bats will be near their prey.

figure c
$$\begin{aligned} f_{i}=f_{\min }+rnd(0,1)\cdot \left( f_{\max }-f_{\min }\right) \end{aligned}$$
(14)
$$\begin{aligned} \dot{x}_{i}=\dot{x}_{i}+f_{i}\left( x_{i}-x_\mathrm{swarm}^\mathrm{best}\right) \end{aligned}$$
(15)
$$\begin{aligned} x_{i}=x_{i}+\dot{x}_{i} \end{aligned}$$
(16)
$$\begin{aligned} x_{i}=\left\{ \begin{array}{ll} x_\mathrm{swarm}^\mathrm{best}+rnd(0,1)\cdot A_{i} &{} \quad {\text {if }} rnd(0,1) >r_{i} \\ x_{i} &{} \quad {\text {otherwise}} \end{array} \right. \end{aligned}$$
(17)
$$\begin{aligned} x_{i}=\left\{ \begin{array}{ll} x_\mathrm{new}=x_{i}+rnd(0,1)\cdot \bar{A} &{} \quad {\text {if }} f(x_\mathrm{new})<f(x_{i}) \\ x_{i} &{} \quad {\text {otherwise}} \end{array} \right. \end{aligned}$$
(18)
$$\begin{aligned} A_{i}=\alpha A_{i} \end{aligned}$$
(19)
$$\begin{aligned} r_{i}=r_{0}\left( 1-\exp \left( -\gamma G\right) \right) \end{aligned}$$
(20)

4.4 Firefly Algorithm

Firefly Algorithm (Yang 2009) bases its operation on the behavior of fireflies in matchmaking. Algorithm 4 shows the operation of FFA. FFA uses a population of \(\mathrm{NP}\) fireflies distributed in the search space. During \( G_\mathrm{max}\) generations, each firefly can move toward the fireflies with greater luminescence (based on the value of the objective function) using (22), (23) and (24) where r is the Euclidean distance between the positions of a pair of fireflies, \(\gamma \) is an absorption coefficient, \(\beta _\mathrm{min} \in [0,1]\) is the minimum value of \(\beta \), and \(\alpha \) is a step size. The step size is reduced in each generations as shown in (21) with \(w \in [0,1]\). At the end of the algorithm, the fireflies will have the higher luminescence.

figure d
$$\begin{aligned} \alpha =w\alpha \end{aligned}$$
(21)
$$\begin{aligned} \beta =\left( 1-\beta _{\min }\right) \exp \left( -\gamma r^{2}\right) \end{aligned}$$
(22)
$$\begin{aligned} x_\mathrm{new}=x_{i}+\beta \left( x_{j}-x_{i}\right) +\alpha \left( rnd(0,1)- \frac{1}{2}\right) \end{aligned}$$
(23)
$$\begin{aligned} x_{i}=\left\{ \begin{array}{ll} x_\mathrm{new} &{} \quad {\text {if }} f(x_{j})<f(x_{i}) \\ x_{i} &{} \quad {\text {otherwise}} \end{array} \right. \end{aligned}$$
(24)

4.5 Wolf Search Algorithm

Wolf Search Algorithm (WSA) is based on the behavior of groups of wolves in search of food (Tang et al. 2012). Algorithm 5 shows the operation of WSA where a group of \(\mathrm{NP}\) wolves are distributed in the search space. During \(G_ \mathrm{max}\) generations, each wolf can move within its radius of visibility using (25) and (30) where v is the range of visibility and \(\alpha \) is the speed factor of the wolves. Each wolf looks for the best near partner within its radius of visibility according to (26), if there is any, the wolf moves toward it using (27) and (30) with r the Euclidean distance. If there is no partner, the wolf moves again randomly. If a wolf feels threatened, it can escape to a new position in a wider radius using (28) and (29) where s is the step size for escape and \(p_a\) is the probability of not finding threat. At the end of the algorithm, the wolves will be near the food.

figure e
$$\begin{aligned} x_\mathrm{new}=x_{i}+rnd(-1,1)\cdot \alpha v \end{aligned}$$
(25)
$$\begin{aligned} x_\mathrm{best}=\left\{ \begin{array}{ll} x_{j} &{} \quad {\text {if }} f(x_{j})<f(x_{i}) {\text { and }} \mathrm{dist}\left( x_{i},x_{j}\right) \le \alpha v \\ x_{i} &{} \quad \mathrm{otherwise} \end{array} \right. \end{aligned}$$
(26)
$$\begin{aligned} x_\mathrm{new}=x_{i}+e^{-r^{2}}\left( x_\mathrm{best}-x_{i}\right) +rnd(-1,1)\cdot \alpha v \end{aligned}$$
(27)
$$\begin{aligned} x_\mathrm{new}=x_{i}+rnd(-1,1)\cdot sv \end{aligned}$$
(28)
$$\begin{aligned} x_{i}=\left\{ \begin{array}{ll} x_\mathrm{new} &{} \quad {\text {if }} rnd(0,1)<P_{a} {\text { and }} f(x_\mathrm{new})<f(x_{i}) \\ x_{i} &{} \quad {\text {otherwise}} \end{array} \right. \end{aligned}$$
(29)
$$\begin{aligned} x_{i}=\left\{ \begin{array}{ll} x_\mathrm{new} &{} \quad {\text {if }} f(x_\mathrm{new})<f(x_{i}) \\ x_{i} &{} \quad {\text {otherwise}} \end{array} \right. \end{aligned}$$
(30)

4.6 Genetic Algorithm

Genetic Algorithms (GAs) are stochastic optimization techniques whose operation is based in the processes of natural selection and evolutionary genetics (Sivanandam and Deepa 2007). Algorithm 6 shows the working of a Genetic Algorithm (GA) in which initially, a group of \(\mathrm{NP}\) chromosomes have different genotypic configurations coded with real numbers. Along \(G_\mathrm{max}\) generations, \(\mathrm{NP}\) pairs of parents are selected by tournament as shown in Algorithm 7, where \(\mathrm{TS}\) is the number of contestants. Each pair of parents is combined to generate a child chromosome using a heuristic crossover method (Michalewicz et al. 1994) according with (31) and (32), where \(\mathrm{CR}\) is the crossover rate. A child chromosome can mutate by using a non-uniform mutation operation (NUM) (Michalewicz 1995) shown in (33), (34) and (35), where F is the mutation rate and \(b=1\) is a factor that controls the non-uniformity of the mutation. At the end of the algorithm, the chromosomes will have better qualities.

figure f
figure g
$$\begin{aligned} u_{i}=\left\{ \begin{array}{ll} x_{child} &{} \quad {\text {if }} rnd(0,1) \le \mathrm{CR} \\ x_{j} | x_{k} &{} \quad {\text {otherwise}} \end{array}\right. \end{aligned}$$
(31)
$$\begin{aligned} x_{child}=\left\{ \begin{array}{ll} rnd(0,1)\cdot \left( x_{j}-x_{k}\right) +x_{j} &{} \quad {\text {if }}f(x_{j})<f(x_{k}) \\ rnd(0,1)\cdot \left( x_{k}-x_{j}\right) +x_{k} &{} \quad {\text {otherwise}} \end{array}\right. \end{aligned}$$
(32)
$$\begin{aligned} v_{i}=\left\{ \begin{array}{ll} x_\mathrm{mut} &{} \quad {\text {if }} rnd(0,1) \le F \\ u_{i} &{} \quad {\text {otherwise}} \end{array}\right. \end{aligned}$$
(33)
$$\begin{aligned} x_\mathrm{mut,j}=\left\{ \begin{array}{ll} u_{i,j}+\bigtriangleup \left( G,U_{j}-u_{i,j}\right) &{} \quad {\text {if }} rnd(0,1)<0.5 \\ u_{i,j}-\bigtriangleup \left( G,u_{i,j}-L_{j}\right) &{} \quad {\text {otherwise}} \end{array}\right. \end{aligned}$$
(34)
$$\begin{aligned} \bigtriangleup \left( G,y\right) =y\left( 1-rnd(0,1) ^{\left( 1-\frac{G}{ G\max }\right) ^{b}}\right) \end{aligned}$$
(35)

4.7 Proposed hybridization

According to the statistical study presented later in this paper, a hybridization of the most promising meta-heuristic techniques is proposed in order to enhance their capabilities in searching reliable solutions. The hybridization consists in including to the PSO a change in the velocity formula related to the essence of the DE. This modifications consider a different topology with a binomial crossover operation and the inclusion of a selection mechanism into the position and velocity of the particle.

The general operation of the PSO/DE hybridization is observed in Algorithm 8. In this proposal, \(\mathrm{NP}\) particles of a swarm are initially distributed in the search space. During \(G_\mathrm{max}\) generations, particles estimate the future velocity. The topology of the velocity equation is given in (36) where the main difference is the inclusion of two random selected particles or nodes into the graph denoted by indexes \(r_1 \ne r_2 \ne i\). The terms \(C_1\) and \(C_2\) are factors that weight the knowledge of the best known position by a particle and by the swarm, \(C_3\) weight the position of two randomly selected particles.

$$\begin{aligned} \begin{array}{l} v_{i}=\omega \dot{x}_{i}+rnd(0,1) \cdot C_{1}\left( x_{i}^\mathrm{best}-x_{i}\right) \\ \;\qquad +\,rnd(0,1) \cdot C_{2}\left( x_\mathrm{swarm}^\mathrm{best}-x_{i}\right) \\ \;\qquad +\,rnd(0,1) \cdot C_{3}\left( x_{r_1}-x_{r_2}\right) \end{array} \end{aligned}$$
(36)

The future velocity is estimated through a binomial crossover process where exchanges some components of the velocity equation between (36) and \(\omega \dot{x}_{i}\). This process is expressed in (37), where \(\mathrm{CR}\) is the probability of changing the current velocity and \(\omega \) is a factor which reduce the velocity of all particles obtained with (11) within the range \([V_\mathrm{min},V_\mathrm{max}]\).

$$\begin{aligned} \dot{x}_{i,j}^\mathrm{next}=\left\{ \begin{array}{ll} \omega v_{i,j} &{} \quad {\text {if }} rnd(0,1) \le \mathrm{CR} \\ \omega \dot{x}_{i,j} &{} \quad {\text {otherwise}} \end{array} \right. \end{aligned}$$
(37)

The future position is estimated according to (38).

$$\begin{aligned} x_{i}^\mathrm{next}=x_i + \dot{x}_{i}^\mathrm{next} \end{aligned}$$
(38)

After estimating its velocity and position, the elitist selection mechanism decides if the updated velocity and position of the \(i-th\) particle (\(\dot{x}_i^\mathrm{next}\) and \(x_i^\mathrm{next}\)) or the previous calculated one (\(\dot{x}_i\) and \(x_i\)) pass to the next generation, i.e., it decides if it is better to move to the next states or wait in the same state for the next generation. This mechanism is represented in (39) and (40). Using the appropriate decisions, each particle will be in the best position at the end of the cycle.

$$\begin{aligned} x_{i}=\left\{ \begin{array}{ll} x_{i}^\mathrm{next} &{} \quad {\text {if }} f(x_{i}^\mathrm{next})<f(x_{i}) \\ x_{i} &{} \quad {\text {otherwise}} \end{array} \right. \end{aligned}$$
(39)
$$\begin{aligned} \dot{x}_{i}=\left\{ \begin{array}{ll} \dot{x}_{i}^\mathrm{next} &{} \quad {\text {if }} f(x_{i}^\mathrm{next})<f(x_{i}) \\ \dot{x}_{i} &{} \quad {\text {otherwise}} \end{array} \right. \end{aligned}$$
(40)
figure h
Table 1 Algorithm parameters (obtained with irace)

4.8 Constraint handling

To handle the constraints of the optimization problem, the criterion of Deb was used in each algorithm to decide whether one solution is better than another (Deb 2000). Additionally to the criterion of Deb shown in the first three points of the following list, the fourth point is included to handle two solutions whose features do not allow to distinguish if one is better than other:

  • Any feasible is preferred to any infeasible solution.

  • Among two feasible solutions, the one having better objective function value is preferred.

  • Among two infeasible solutions, the one having smaller constraint violation is preferred.

  • Among two infeasible solutions with the same constraint violation, one of them is preferred randomly with same probability.

5 Results

5.1 Experiment design

In this work, three experiments were made based on different kind of parametric uncertainties in the DC motor. In each experiment, the efficacy of the strategies AC-DE, AC-PSO, AC-BAT, AC-FFA, AC-WSA, AC-GA and AC-PSO/DE (adaptive controllers based in DE, PSO, BAT, FFA WSA, GA and PSO/DE, respectively) is proven.

The aim of each adaptive control strategy is regulating the speed of a DC motor to \(\omega _r=52.35\ \mathrm{rad/s}\) within a time period of \(t \in [0,3]\, \mathrm{s}\). The current motor has the following nominal parameters: \(L_a = 102.44 \times 10^{-3} \ H\), \(R_a = 9.665\ \Omega \), \(k_m = 0.3946\ \mathrm{N\,m}\), \(k_e = 0.4133\ \mathrm{v/rad}\), \(b_0 = 5.85 \times 10^{-4}\ \mathrm{N\,ms}\) and \(J_0 = 3.45 \times 10^{-4}\ \mathrm{N\,ms}^2\). Additionally, a discontinuous load is implemented, i.e., the use of a torque load \(\tau _L=0.05\ \mathrm{N\,m}\) when \(t \in [1,2]\, \mathrm{s}\) is proposed and a torque load \(\tau _L=0\ \mathrm{N\,m}\) is used otherwise. The gains of the controller in (2) are set as \(k_p=2500\) and \(k_d=100\) and are obtained by trial and error procedure. For each adaptive strategy, a sampling time of \(\Delta t=5\ \mathrm{ms}\) is taken and the time interval \(\Delta w=50\ \mathrm{ms}\) is proposed. For the time interval \(t \in [0,\Delta w)\), a constant control signal \(u=20\ \mathrm{V}\) is used, whereas for \(t \ge \Delta w\) the control signal in (2) is given. Furthermore, the bounds of the control signal are set as \(-50\ \mathrm{V} \le u \le 50\ \mathrm{V}\).

In the first experiment named as EX1, there are no parametric uncertainties in the DC motor. For the second experiment EX2, the DC motor parameters vary dynamically \(10\%\) from their nominal parameters as: \(L_a(t)=L_a + 0.1L_a \sin (\pi t)\), \(R_a(t)=R_a + 0.1R_a \sin (2\pi t/3)\), \(k_m(t)=k_m + 0.1k_m \sin (2\pi t)\), \(k_e(t)=k_e + 0.1k_e \sin (2\pi t)\), \(b_0(t)=b_0+ 0.1b_0 \sin (\pi t)\), \(J_0(t)=J_0 + 0.1J_0 \sin (2\pi t/3)\). In the last experiment EX3, the DC motor parameters vary dynamically as in EX2 and in addition a random noise signal is added to the vector of states for each sampling instant \(\Delta t\) in order to simulate the noise in the sensor signals. The noise signal has the following maximum values: \({\pm } 0.01\), \({\pm } 0.1\) and \({\pm } 0.001\) for the angular position \(x_1\), angular velocity \(x_2\) and current \(x_3\), respectively.

In order to provide a fair comparison among the different adaptive control strategies, the parameter tuning for each algorithm was made by the irace package of the statistical analysis software R (López-Ibáñez et al. 2016), using the conditions of the first experiment. Table 1 shows the obtained parameters for each algorithm. The stop criterium is the number of evaluation of the objective function. 1500 evaluations is set as the stop criterium in the adaptive control strategy based on meta-heuristic algorithms. The lower and upper bounds of the vector of design variables \(\bar{p}\) are shown in Table 2.

Table 2 Bounds of design variables

All experiments were performed on a PC with a 3.2 GHz i5-6500 processor. The simulations were developed using C++ programming language and were compiled using Microsoft Visual C++.

Table 3 Results of the regulation problem considering the experiment EX1, i.e., static DC motor parameters
Table 4 Results of the regulation problem considering the experiment EX2, i.e., dynamic DC motor parameters
Table 5 Results of the regulation problem considering the experiment EX3, i.e., dynamic DC motor parameters and noise

5.2 Discussion

This section is divided into three discussion cases named as the Case A, the Case B and the Case C. In the Case A, the comparisons of the adaptive control strategies based on the six different meta-heuristic techniques (AC-DE, AC-PSO, AC-BAT, AC-FFA, AC-WSA and AC-GA) are detailed in order to know the most reliable strategies to solve the speed regulation problem of the DC motor under parametric uncertainties. Those comparisons are related with meta-heuristic techniques reported in the literature. Then, in the Case B, the proposed AC-PSO/DE is discussed and compared to the six meta-heuristic techniques reported in the literature. For the Case C, comparisons with a robust control approach are given.

5.2.1 Case A

For each experiment 100 different executions were performed. Tables 3, 4 and 5 contain the results obtained from the execution of each experiment using the different adaptive control strategies. In these tables, the standard deviation of the error velocity \(\mathrm{std}(\Vert e\Vert )\), the magnitude average for the velocity error \(\overline{\Vert e\Vert }\) and for the control signal \(\overline{\Vert u\Vert }\) in the time interval \(t \in [\Delta w,3]s\) from the 100 executions are shown. The best (\(\Vert e\Vert _\mathrm{best}\), \(\Vert u\Vert _\mathrm{best}\)) and the worst (\(\Vert e\Vert _\mathrm{worst}\), \(\Vert u\Vert _\mathrm{worst}\)) execution with respect to the magnitude of the velocity error and the control signal are also included. In addition, the mean time to compute the simulation results in the time period \(t \in [0,3]\,\mathrm{s}\) for 100 executions is displayed in \(\overline{t_\mathrm{exec}}\), and also the convergence time of the meta-heuristic strategies to find a new control design parameter vector at each integration time \(\Delta t\) is given in \(\overline{t_\mathrm{exec}}/n\), where n is the number of times that the meta-heuristic strategies find a new control design parameter vector in \(t \in [0,3]\,\mathrm{s}\). Boldface is used to represent the best results for each column. Figure 3 shows the motor speed behavior and the control signal applied at each time instant for the best run of each adaptive control strategies for the experiments EX1, EX2 and EX3.

Fig. 3
figure 3

Performance of adaptive controllers based on different meta-heuristic techniques in the speed regulation for the DC motor in experiments EX1, EX2 and EX3

Fig. 4
figure 4

Error behavior of the adaptive controllers based on different meta-heuristic techniques in the speed regulation of DC motor, when \(t \ge \Delta w\) for experiments EX1, EX2 and EX3. AC-DE, AC-FFA and AC-PSO show to be the best controllers for experiments EX1, EX2 and EX3, respectively

It is observed in Table 3 that AC-DE is the controller that more effectively regulates the speed of the DC motor for the experiment EX1 when there are no uncertainties. For the experiment EX2 where the DC motor parameters are dynamical, Table 4 shows that AC-PSO is more effective to compensate uncertainties. In the last experiment EX3, where additionally a noise signal is included into the system, Table 5 shows that AC-PSO is also the best controller. Figure 4 shows more clearly the behavior of the speed regulation error for the best execution of each controller. It can also be observed that almost all adaptive control strategies have a good performance in the DC motor speed regulation. When a torque load is introduced to the motor, the speed regulation error for all controllers does not surpass \({\pm } 5\%\) of the desired speed with exception of AC-BAT, which sometimes surpasses \({\pm } 10\%\). When the torque load remains fixed or is null, the speed regulation error for all controllers with exception of AC-BAT do not surpass \({\pm } 2\%\) of the desired speed.

In terms of the control signal average value (\(\overline{\Vert u\Vert }\)), it can be seen in Tables 3, 4 and 5 that all control strategies for the three experiments EX1, EX2 and EX3 have a similar energy consumption. Nevertheless, there can be noticed in \(\overline{\Vert u\Vert }_\mathrm{worst}\) that in some executions of the adaptive control strategies, the consumption is more than twice the control signal average value \(\overline{\Vert u\Vert }\). This fact indicates that some executions of the adaptive control strategies provide violations in the maximum control signal constraint, which means that those strategies are not viable to be implemented experimentally. Based on the constraint violation of the control signal from the 100 executions, the strategies that violated such constraints in the three experiments are AC-BAT, AC-WSA and AC-GA.

To ensure that one controller works better than another, it is necessary to check the statistical validity of the results using a non-parametric test as in Derrac et al. (2011). Tables 6, 7 and 8 show the results of the Wilcoxon test to compare all controllers by pairs. The winner between each pair of strategies is shown in boldface. Wilcoxon test was applied to the 100 \(\Vert e\Vert \) samples of the experiments EX1, EX2 and EX3 for each controller. The statistical significance of the test was set as \(5 \%\), and a two-sided alternative hypothesis was selected. The two-sided hypothesis establishes that two controllers have different distributions of \(\Vert e\Vert \). Additionally, the rank sums \(R_+\) and \(R_-\) expose the best algorithm of a pair when the statistical significance denoted by p value does not surpasses \(5\%\). In Table 6, it can be observed that the distribution of \(\Vert e\Vert \) for AC-DE controller is different to distributions of the other controllers. In addition, the rank sums show that the elements of the samples of AC-DE surpass to almost all elements of the samples of the other controllers, so AC-DE can be considered as the best controller for speed regulation when there are no parametric uncertainties (experiment EX1), followed by the AC-FFA and AC-GA controllers. For Tables 7 and 8, which contain the results of Wilcoxon test over the samples of \(\Vert e\Vert \) when there are uncertainties (experiments EX2 and EX3), the AC-PSO and AC-FFA controllers showed to be the best ones (based on the rank sums). Table 9 summarizes the number of wins of each controller for every experiment based on the Wilcoxon test. The results indicate that controllers can be ordered from best to worst based on their performance as follows: AC-FFA, AC-PSO, AC-GA, AC-DE, AC-WSA and AC-BAT.

Table 6 Results of Wilcoxon test for EX1
Table 7 Results of Wilcoxon test for EX2
Table 8 Results of Wilcoxon test for EX3
Table 9 Wins of each controller according to Wilcoxon test
Fig. 5
figure 5

Behavior of estimated state vector \(\bar{x}\) of the DC motor for AC-FFA controller, when \(t \ge \Delta w\) for experiment EX3

One way to observe the variations of the speed error using different adaptive control strategies is by paying attention to the rank sums of the Wilcoxon test when a controller is compared versus the worst one, which turned out to be AC-BAT (according to Table 9). Based on the information in Tables 6, 7 and 8, it is observed that in some comparisons versus AC-BAT, some strategies have a nonzero value in rank sum. This indicates that some executions of the adaptive control strategies, the error vector norm \(\Vert e\Vert \) is worse than the best execution of AC-BAT (see Tables 3, 4 and 5), i.e., \(\Vert e\Vert \ge 51.4368\). The above means that AC-GA, AC-WSA and AC-BAT present more variation in the speed error than the other adaptive control strategies and it can also be confirmed with the value of \(\mathrm{std}(\Vert e\Vert )\) in Tables 3, 4 and 5. The value of \(\mathrm{std}(\Vert e\Vert )\) indicates what extent the speed error remains without changing drastically, i.e., the variation with respect to \(\overline{\Vert e\Vert }\). Hence, using these criteria, AC-DE, AC-FFA and AC-PSO strategies are more reliable while AC-GA, AC-WSA and AC-BAT are not reliable.

The main objective in the dynamic optimization problem into the adaptive strategies is to track the current state vector x by the estimated state vector \(\bar{x}\), and using such vector \(\bar{x}\) to provide the adaptive control parameters at each time interval. In Fig. 5 it is verified that the behavior of the current state vector x and the estimated state vector \(\bar{x}\) for the AC-FFA controller (which resulted to be the most invariant with respect to the speed regulation error) is similar. In addition in Fig. 6, the behavior of the adaptive control parameters \(\bar{p}\) is shown. This behavior is related with the operation of the meta-heuristic techniques, which search into a wide space for solutions that provide the major benefits for a particular problem.

Fig. 6
figure 6

Behavior of estimated parameters \(\bar{p}\) of the DC motor for AC-FFA controller, when \(t \ge \Delta w\) for experiment EX3. The solid line indicates the behavior of p and dots are the values of \(\bar{p}\) for each instant \(\Delta t\)

On the other hand, it is an important fact to know whether the adaptive control strategies can be implemented in an embedded system. Based on the column \(\overline{t_\mathrm{exec}/n}\) in Table 3, 4 and 5, only AC-FFA cannot be used in the experimental implementation due to the convergence time of the algorithm exceeds the sampling time \(\Delta t=5ms\).

Given the statistical evidence in this work and the feasible to be experimentally implemented without violate constraints and with a computational time less than the sampling time, the AC-PSO and AC-DE are the most viable strategies to solve the speed regulation problem of the DC motor subject to parametric uncertainties. These strategies are the most effective, trustworthy and feasible for experimentally implementation, because of their capacity to regulate the motor speed with a reasonable convergence time of their algorithms.

5.2.2 Case B

The adaptive control strategy based on this PSO and DE hybridization (AC-PSO/DE) was tested over 100 independent runs under the same experiment conditions in EX1, EX2 and EX3.

The results of using AC-PSO/DE are shown in Table 10. The boldface results in Table 10 indicate the outstanding results with respect to the ones obtained from the other adaptive strategies presented in Tables 3, 4 and 5. In EX1, the AC-PSO/DE alternative has an improvement in performance with respect to AC-PSO. The AC-PSO/DE performance in EX1 is also near to the one of AC-DE which turned out to be the best alternative when there are no parametric uncertainties. For EX2 and EX3, the AC-PSO/DE alternative significantly overcomes the others according to the \(\overline{\Vert e\Vert }\) value and its behavior is more reliable if taking into account the value of \(\mathrm{std}(\Vert e\Vert )\).

Table 10 Results of the regulation problem by using the AC-PSO/DE alternative
Fig. 7
figure 7

Performance of adaptive controllers based on PSO/DE hybridization in the speed regulation for the DC motor in experiments EX1, EX2 and EX3

Fig. 8
figure 8

Error behavior of the adaptive controller based on PSO/DE hybridization in the speed regulation of DC motor, when \(t \ge \Delta w\) for experiments EX1, EX2 and EX3

Table 11 Results of Wilcoxon test for EX1 including the AC-PSO/DE alternative
Table 12 Results of Wilcoxon test for EX2 including the AC-PSO/DE alternative
Table 13 Results of Wilcoxon test for EX3 including the AC-PSO/DE alternative

The behavior of the best run of AC-PSO/DE can be observed in Fig. 7 and its error in speed regulation is shown in Fig. 8. It must be noticed that the error signals in Fig. 8 are smoother than the error signals obtained by the other adaptive controllers displayed in Fig. 4.

To ensure that the proposed AC-PSO/DE alternative has the most promising behavior, the Wilcoxon test is also performed among AC-PSO/DE and the other alternatives for EX1, EX2 and EX3 again with a statistical significance of \(5 \%\) and a two-sided alternative hypothesis. The results of the Wilcoxon test are shown in Tables 11, 12 and 13. Table 14 summarizes the overall wins of each controller including AC-PSO/DE. The results indicate that proposing AC-PSO/DE can improve the performance provided by the two best adaptive control alternatives presented in Sect. 5.2 (AC-PSO and AC-DE) and also it is feasible to be experimentally implemented due to the convergence time of the algorithm is less than the sampling time.

5.2.3 Case C

Additionally to the behavioral study of the adaptive control strategy based on different meta-heuristic techniques, it is interesting to observe the differences of this approach when compared with others such as the robust control.

For this, a generalized proportional integral observer based robust controller (RC-GPI) that works for a widely class of nonlinear systems (Sira-Ramirez et al. 2011) is implemented to perform comparisons.

Table 15 shows the results of using the RC-GPI for the experiments EX1, EX2 and EX3. The values of \(\Vert e\Vert \) and \(\Vert u\Vert \) are obtained in the time interval \(t \in [\Delta w, 3] s\) for a fair comparison. As it can be noticed, the proposed adaptive control strategy based on different meta-heuristic techniques overcomes the performance of the GPI-RC when comparing the \(\Vert e\Vert _\mathrm{worst}\) values in Tables 3, 4, 5 and 10 with the \(\Vert e\Vert \) values of the GPI-RC in Table 15.

Figure 9 shows the behavior of the RC-GPI and Fig. 10 shows at close range of the speed regulation error. In Figs. 9 and 10, the convergence of the motor speed to the reference signal is slower than the proposed adaptive control strategy. It also can be noticed in Figs. 9 and 10 that the RC-GPI present some difficulties when there are some noise in the motor states (EX3) and then the error has some oscillations proportional to the magnitude of the noise unlike the proposal.

Table 14 Wins of each controller according to Wilcoxon test including the AC-PSO/DE alternative
Table 15 Results of the regulation problem by using the RC-GPI approach
Fig. 9
figure 9

Performance of the RC-GPI in the speed regulation for the DC motor in experiments EX1, EX2 and EX3 with a zoom (right figure)

6 Conclusion and future work

The study of different optimization meta-heuristic techniques in the adaptive control shows the qualities of each technique in solving the problem of online parameter estimation of a DC motor subject to parametric uncertainties. Among the analyzed qualities are the accuracy in speed regulation, the energy consumption, the invariability with respect to error and the computational time required for each technique. The simulation results show that AC-PSO and AC-DE are the most promising adaptive strategies.

Fig. 10
figure 10

Error behavior of the RC-GPI in the speed regulation of DC motor, when \(t \ge \Delta w\) for experiments EX1, EX2 and EX3

Based on the obtained statistical results, a hybridization of the most promising meta-heuristic techniques is proposed and used in the adaptive control strategy. This alternative named as AC-PSO/DE has a significant performance improvement with respect to the most promising adaptive strategies (AC-PSO and AC-DE) in the speed regulation of the DC motor.

The parameter setting of each meta-heuristic technique is a crucial task whether it is intended to get appropriate solutions of an online optimization problem. When tuning algorithms for control tasks, it must attempted to maintain a balance between their search ability and their convergence time, so that they can obtain good solutions that fits the time constraint of the control system. If these parameters are not set correctly, the result could be an unpredictable behavior of the algorithm, with slow or premature convergence, which ultimately results in an untrustworthy behavior of the adaptive control strategy. For the above reason, the parameter tuning of each algorithm was carried out using iterative methods provided by the irace package of R software.

With the information obtained in the present work, it was observed a good estimation of the current state vectors, even with differences between the current motor parameters and the estimated ones. While it is true that the current motor parameter values in the control system minimize the error, there are also different control parameter settings that provide minimum values of the objective function. This way of conceiving the optimization problem has the advantage of not only compensate the uncertainties in the DC motor parameters, but also uncertainties caused by external agents such as noise signals.

Additionally, some comparisons with a robust control approach are performed and reveal that the proposed adaptive control strategy based in different meta-heuristic techniques presents some advantages in the velocity regulation problem under dynamic and discontinuous uncertainties.

As a future work, the adaptive control strategy based on a multi-objective problem will be considered in order to manage the trade-off between the error and the energy consumption.