Open access peer-reviewed chapter

Design of the Second-Order Controller by Time-Domain Objective Functions Using Cuckoo Search

Written By

Huey-Yang Horng

Submitted: 17 June 2019 Reviewed: 20 September 2019 Published: 31 October 2019

DOI: 10.5772/intechopen.89832

From the Edited Volume

Swarm Intelligence - Recent Advances, New Perspectives and Applications

Edited by Javier Del Ser, Esther Villar and Eneko Osaba

Chapter metrics overview

1,359 Chapter Downloads

View Full Metrics

Abstract

The proportional-integral-derivative (PID) controllers are widely used in many industrial control applications. However, the lead-lag controllers are more practical. Traditionally, time-domain or frequency-domain methods have been used to design a lead-lag controller in order to meet the design specifications. This chapter will focus on the design of controller by optimizing the time-domain objective function. The proposed objective function includes the first peak time, maximum peak time, rise time, maximum overshoot, maximum undershoot, setting time, and steady-state error. In the study, cuckoo search algorithm is adopted to search the optimal controller parameters. Cuckoo search is a recently developed meta-heuristic optimization method, which is a population-based algorithm inspired by the behavior of some cuckoo species in combination with the Lévy flight behavior. A numerical example is simulated to illustrate the use of the proposed method.

Keywords

  • PID controller
  • lead-lag controller
  • controller design
  • cuckoo search

1. Introduction

In many industrial control applications, proportional-integral-derivative (PID) controllers are probably the most commonly used controllers. Several methods were proposed in the past for tuning the PID controller parameters [1, 2, 3, 4, 5]. It is noted the lead-lag controllers provide a more practical alternative. Tan used the Kharitonov and the Hermite-Biehler theorems to compute the parameters of lead-lag controller in [6]. Kuo et al. designed the lead-lag compensator based on vector margin and steady-state error of the step response [7]. Horng used cuckoo search to design lead-lag controllers [8]. It is easy to see that the lead-lag controller is just a special case of the general second-order controllers. Therefore, this paper extends the lead-lag controllers to general second-order controllers. The goal of this paper is to propose a simple second-order controller design procedure using the cuckoo search.

The control design specifications may usually be divided into time-domain and frequency-domain specifications. Time-domain specifications (TDS) include the lower and/or upper bounds of the quantities of the time response such as the first peak time, maximum peak time, rise time, maximum overshoot, maximum undershoot, setting time, and steady-state error. Frequency-domain specifications are usually given in terms of the resonant peak, phase margin, resonant frequency, and bandwidth. In this study, we only consider the time-domain specifications.

The main contribution of this study is that we provide a simple controller design procedure for simple second-order controllers. For the problem formulation, some of the time-domain specifications (e.g., desired peak time and maximum overshoot) can be used to fully define a desired simple second-order reference model. With this reference model, we may reasonably specify lower and/or upper bounds for other time-domain specifications. Finally, we define the deviation ratios (i.e., percentage errors) and total deviation ratio. The total deviation ratio, which is the weighted sum of the deviation ratios, will be used as the objective function for the problem. Zero objective value means that all specifications are satisfied. However, there is no guarantee of the zero objective value in the most general cases. Some specifications might actually be violated. The design goal is to choose the best controller parameters so that the objective value is as close to zero as possible.

To search for optimal controller parameters, some optimizer must be employed to solve the aforementioned optimization problem. Since there is usually no analytic formula for the objective function, evolutionary computation algorithms are well suited in this situation to solve this optimization problem. In this study, the meta-heuristic cuckoo search algorithm is adopted to search the optimal controller parameters.

Cuckoo search algorithm is one of the latest meta-heuristic techniques, developed by Yang and Deb [9, 10]. Nowadays, implementations of cuckoo search has proved to be effective in engineering optimization problems [11, 12, 13], for example, optimal power system stabilizers [14], load frequency controller design [15], optimal power system [16], synthesis of analog controller [17], etc. Cuckoo search achieved better results than available methods in most cases which appeared in the literature.

The novelty of this study is that the whole controller design problem can be formulated as an optimization problem by considering most important time-domain performance indices as a whole. Moreover, the meta-heuristic cuckoo search algorithm (or any other powerful evolutionary computation algorithms like genetic algorithm or particle swarm optimization) can be adopted to search for the best controller parameters. A numerical example will be provided to illustrate the design process. To show the wide applicability of the proposed method, four different plants and three different time-domain specifications will be used in the illustrative example.

Advertisement

2. Time-domain analysis of control systems

The time response of a control system is typically divided into two parts: the transient response and the steady-state response. The steady-state response is just the part of the total response which remains after the transient has died out. Hence, the steady-state response can still vary in a fixed pattern, such as a ramp function or a parabola function that increases with time.

The underdamped second-order system is a familiar model for physical problems. The detailed understanding of the underdamped response is necessary for both analysis and design. Let us begin by describing the step response for the second-order system. The transfer function of an underdamped second-order system is given by

Cs=ωn2s2+2ξωns+ωn2,0<ξ<1.E1

A typical unit-step response is shown in Figure 1. In this figure, yss, yM, and ym denote the steady-state value, maximum response value, and the response value where the maximum undershoot occurs, respectively. Moreover, Tr, Tp, and Ts are the rise time, peak time, and settling time, respectively.

Figure 1.

Unit-step response for underdamped second-order systems.

We now describe seven time-domain specifications (TDS) used in objective function in more detail:

  1. Rise time Tr. It is the time required for the step response to rise from 10 to 90% of its final value.

  2. First peak time Tf. It is the time to reach the first peak.

  3. Maximum peak time Tp. It is the time to reach the maximum peak.

  4. Maximum overshoot MOS. This is defined as

    MOS=yMyssyss,ifyM>yss,0,ifyMyss.E2

  5. Maximum undershoot MUS. It is defined as

    ym=minyt,tTf,MUS=yssymyss,ifym<yss,0,ifymyss.E3

  6. Settling time Ts. This is the time required for the step response to decrease and stay within a specified ±2% of the final value.

  7. Steady-state error Ess. It is the difference between the desired and actual responses.

Notice that for second-order systems, the first peak time is always the maximum peak time. However, for underdamped higher-order systems, they may not be the same, as illustrated in Figure 2. In general, the response of an underdamped high-order system is similar to that of an underdamped second-order system.

Figure 2.

Unit-step response for some underdamped higher-order systems.

Notice also that the following relationships hold for second-order systems, which will be used in the illustrative example:

ξ=lnMOSπ2+ln2MOSE4
ωn=πTp1ξ2E5

In the design process, a second-order system with satisfactory performances is designated as the reference standard. All the desired specifications with lower and upper bounds are tabulated. Note that the lower bounds of maximum overshot, maximum undershot, setting time, and steady error are set to zero.

Advertisement

3. Proposed controller

The transfer function of general second-order controller is written as

Gcs=Kcs2+ds+1as2+bs+1,E6

where K>0,a,b,c,d. It is easy to see that the phase lead-lag controller is just a special case of general second-order controller. The overall control system in this study is shown in Figure 3, where Gps is the transfer function of the plant. Besides, rt, yt, and et denote the reference input, output, and error signal.

Figure 3.

Unity feedback system with second-order controller.

For the feedback control system shown in Figure 3, the overall response is determined by the parameters of the controller. To establish the proposed time-domain objective function, we first define a function called the deviation ratio (DR), where TDS stands for the time-domain specifications described in Section 2:

DRTDSKabcd=TDSKabcdTDS_ubTDS_ub,ifTDSKabcd>TDS_ub,TDS_lbTDSKabcdTDS_lb,ifTDSKabcd<TDS_lb,0,otherwise,E7

where TDSKabcd is any one of the time-domain specifications defined in the last section. In practical designs, some tolerances in time-domain specifications are allowed. Therefore, each of the time-domain specifications has a corresponding lower limit (TDS_lb) and an upper bound (TDS_ub). DRTDSKabcd is a measure of how the actual quantity is close to the desired interval specified by lower limit and upper limit. For example, if the value of DRTrKabcd is zero, where the relevant quantity is the rise time, then this means that the rise time lies in the desired interval. That is, the specification is fully satisfied.

Next, we define the objective function TDRKabcd, called the total deviation ratio (TDR), used in this study as follows:

TDRKabcd=[w1DRTrKabcd2+w2DRTfKabcd2+w3DRTpKabcd2+w4DRMOSKabcd2+w5DRMUSKabcd2+w6DRTsKabcd2+w7DREssKabcd2]/i=17wiE8

In Eq. (8), ωi,i=1,2,,7 represents weights that reflect the relative importance of the corresponding terms.

Eqs. (6)(8) are improved versions of those in Ref. [8]. Once we defined the deviation ratio and total deviation ratio, the problem of the design controller becomes the minimization of TDRKabcd for all possible parameters. Now, we can use various optimization methods to implement the controller design. In the paper, the cuckoo search algorithm is used to minimize the objective function. Further, if the TDRKabcd is zero, all specifications are within the range of the design specifications.

Advertisement

4. Cuckoo search algorithm

In this section, the cuckoo search algorithm is briefly introduced. This algorithm was proposed by Yang and Deb in [9, 10]. Cuckoo search represents an optimized meta-heuristic algorithm that is biologically inspired by the way cuckoo looks for a nest where they could lay eggs in combination with the Lévy flight behavior of some birds and fruit flies.

Now we briefly describe some breeding behaviors of cuckoos. As pointed out in [9], some cuckoo species often lay the eggs in the nests of other host birds, especially those that just spawned eggs. Some host birds can engage direct conflict with the intruding cuckoos. If a host bird discovers the eggs are not their own, they may either throw these alien eggs away or simply abandon its nest and build a new nest elsewhere [9]. Some cuckoo species are often very specialized in the mimicry in color and pattern of the eggs of a few chosen host species, which reduces the probability of their eggs being abandoned and thus increases their reproductively.

In the optimization algorithm, each nest represents a potential solution. The process of cuckoo search algorithm is simplified by three rules [10]:

  1. Each cuckoo lays an egg in a randomly selected nest.

  2. The best nests will carry over to the next generation.

  3. The number of available host nest is fixed, and there is a positive probability that the egg laid by a cuckoo is discovered by the host bird.

There are many variants of the cuckoo search algorithms. In the following, we describe a commonly used version. This algorithm uses a combination of a local random walk and the global random walk, controlled by a switching parameter pa. This allows for proper balance between exploration and exploitation of the solution space. The local and global random walks for generating the new solution of for cuckoo i can be written as, respectively,

xit+1=xit+αsHpaεxjtxktE9
xit+1=xit+αLsλE10
Lsλ=λΓλsinπλ2π1s1+λ,ss00E11

In Eqs. (9)(11), the notations are explained as follows:

  1. xit+1 next position of cuckoo i

  2. xit current position of cuckoo i

  3. α step size scaling factor

  4. s step size

  5. entry-wise multiplication of two vectors

  6. H Heaviside function

  7. pa switching parameter used to switch local and global walks

  8. ε a random number drawn from a uniform distribution

  9. xjt, xkt current positions of cuckoos j and k selected by random permutation

  10. Lsλ Lévy distribution used to define the step size of random walk

Advertisement

5. Design procedure

In the design procedure, a second-order system with satisfactory performances is designated as the reference standard. All of the seven desired specifications with lower bounds and upper bounds are tabulated. After that, we set solution vector as Kabcd and use cuckoo search algorithm to find the minimum value of TDRKabcd in Eq. (8). To save computation time, the initial populations of 25 host nests are selected using Routh-Hurwitz criterion (for linear time-invariant plants) so that the closed-loop systems are stable.

In the following design procedure, we set maximum generation to be 1000 and pa=0.25. The optimization process is hierarchical. First, run cuckoo search 25 times to get minimum values. Then the 25 minimum values become elite group. Next, run cuckoo search one more time, and use the group as initial host nests. The final result is the parameters for the second-order controller.

Advertisement

6. Illustrative example

In the section, a numerical example is provided to illustrate the design procedure. In the following simulations, four different plants are used for comparison, which are described in Table 1.

Transfer functionSystem typeClosed-loop stability
Plant 1Gps=120s2+12s+200Stable
Plant 2Gps=100s+1s10s+1s+11Stable
Plant 3Gps=100s+1s+2s+40Unstable
Plant 4Gps=1ss+11Stable

Table 1.

Description of the four plants.

As an instance, the step response of the uncompensated system of Plant 1 is shown in Figure 4. The peak time is estimated to be 2.4 s, the maximum overshoot is 26.5398%, and the steady-state error Ess is 0.5. Assume we are not satisfied with these time-domain performance indices. Consequently, compensation must be designed for better performances.

Figure 4.

Step response of the Plant 1 without controller.

Experiment 1. Keep in mind that our reference model is a simple second-order system defined in Eq. (1). Assume that the desired peak time Tp is set to be 1 s and the maximum tolerable overshoot is 0.03. Now we can use Eqs. (4) and (5) to calculate the corresponding damping ratio ξ and natural frequency ωn, respectively. This determines the desired reference model in Eq. (1). Based on the resulting reference model, we can calculate its seven performance indices depicted in Section 2 in order to establish reasonable bounds for these performance indices. We may put 2% tolerance on rise time Tr, first peak time Tf, and maximum peak time Tp. Only upper bounds are specified for the remaining four performance indices. The full specifications for Experiment 1 are listed in the second column of Table 2.

Experiment 1Experiment 2Experiment 3
Tr[0.4730, 0.4923][0.7095, 0.7385][0.9461, 0.9847]
Tf[0.9788, 1.0188][1.4682, 1.5281][1.9576, 2.0375]
Tp[0.9788, 1.0188][1.4682, 1.5281][1.9576, 2.0375]
MOS0.030.030.03
MUS0.020.020.02
Ts1.07241.60862.1448
Ess0.020.020.02

Table 2.

Design specifications.

We set all the weights to be 1, i.e., ωi=1, i=1,2,,7. Suppose the maximum steady-state error is limited to [0.001, 0.022], and then we can set the range of K to [7.4091, 166.5000]; the ranges of a, b, c, and d are all set to 100100. The specified ranges of controller parameters are listed in Table 3.

Plant 1Plant 2Plant 3Plant 4
K[7.4091,166.5000][45.4545, 1000][7.4091, 166.5000][45.4545, 1000]
a[−100,100][−100,100][−100,100][−100,100]
b[−100,100][−100,100][−100,100][−100,100]
c[−100,100][−100,100][−100,100][−100,100]
d[−100,100][−100,100][−100,100][−100,100]

Table 3.

Search ranges of controller parameters.

The resulting control parameters are shown in Table 4.

Plant 1Plant 2Plant 3Plant 4
K8.4963995.735114.6760934.2808
a100.00001.66681.7609−0.1364
b30.42298.871460.2882−0.8138
c3.133698.44280.6624−86.8253
d7.323048.79211.2683−85.5579

Table 4.

Resulting controller parameters in Experiment 1.

The time-domain performances of the resulting closed-loop systems are shown in Table 5. Notice that the final objective values for four plants shown in the final row of Table 5 are all zeros, which means that all seven design specifications are all met using our controller design methods.

Plant 1Plant 2Plant 3Plant 4
Tr0.48040.47340.49230.4735
Tf1.01311.01310.98041.0131
Tp1.01311.01310.98041.0131
MOS0.00000.02940.02970.0281
MUS0.01790.00040.00930.0004
Ts0.77171.02950.99681.0295
Ess0.01920.00100.00540.0011
TDR0000

Table 5.

Time-domain performance indices of the resulting systems in Experiment 1.

The time responses due to unit-step input of the resulting four closed-loop systems are shown in Figure 5. These responses look quite nice.

Figure 5.

Step responses of four resulting systems in Experiment 1.

Experiment 2. In this experiment, assume that the first peak time and the maximum peak time are both set to 1.5 s. Following the procedure in Experiment 1, the full design specifications for Experiment 2 are also listed in Table 2. The specified ranges of controller parameters are listed in Table 3. The resulting control parameters are shown in Table 6.

Plant 1Plant 2Plant 3Plant 4
K8.4963995.735114.6760934.2808
a100.00001.66681.7609−0.1364
b30.42298.871460.2882−0.8138
c3.133698.44280.6624−86.8253
d7.323048.79211.2683−85.5579

Table 6.

Resulting controller parameters in Experiment 2.

The time-domain performances of the resulting closed-loop systems are shown in Table 7. Notice again that the final objective values for four plants are all zeros, which means that all seven design specifications are all met using our controller design methods.

Plant 1Plant 2Plant 3Plant 4
Tr0.71330.71050.73840.7102
Tf1.51971.51971.49521.5197
Tp1.51971.51971.49521.5197
MOS0.01030.02820.02990.0281
MUS0.01280.00040.01390.0004
Ts1.09291.54421.51971.5442
Ess0.01980.00100.01290.0010
TDR0000

Table 7.

Time-domain performance indices of the resulting systems in Experiment 2.

The time responses due to unit-step input of the resulting four closed-loop systems are shown in Figure 6.

Figure 6.

Step responses of four resulting systems in Experiment 2.

Experiment 3. In this experiment, assume that the first peak time and the maximum peak time are both set to 2.0 s. Following the procedure in Experiment 1, the full design specifications for Experiment 3 are also shown in Table 2. The specified ranges of controller parameters are listed in Table 3. The resulting control parameters are shown in Table 8.

Plant 1Plant 2Plant 3Plant 4
K8.4963995.735114.6760934.2808
a100.00001.66681.7609−0.1364
b30.42298.871460.2882−0.8138
c3.133698.44280.6624−86.8253
d7.323048.79211.2683−85.5579

Table 8.

Resulting controller parameters in Experiment 3.

The time-domain performances of the resulting closed-loop systems are shown in Table 9. Notice that the final objective values for four plants are zeros, which means that all seven design specifications are met using our controller design methods.

Plant 1Plant 2Plant 3Plant 4
Tr0.96560.94680.97940.9467
Tf1.99352.02621.96092.0262
Tp1.99352.02621.96092.0262
MOS0.00240.02920.02200.0284
MUS0.01540.00040.01380.0004
Ts1.49272.05891.99352.0589
Ess0.01980.00100.01990.0011
TDR0000

Table 9.

Time-domain performance indices of the resulting systems in Experiment 3.

The time responses due to unit-step input of the resulting four closed-loop systems are shown in Figure 7.

Figure 7.

Step responses of four resulting systems in Experiment 3.

In the illustrative example above, four different plants and three different time-domain specifications were used. As illustrated in the preceding example, before searching the best controller parameters, we first use some of the time-domain specifications (e.g., desired peak time and maximum overshoot) to fully specify the desired simple second-order reference model. Then we may use this reference model to define reasonable bounds for other time-domain specifications. Finally, we define the deviation ratios (i.e., percentage errors) and total deviation ratio as the objective function. If the final value of the objective function is zero, then all seven specifications are satisfied. But, in the most general cases, there is no guarantee that the final value of the objective function will always be zero. In that case, some specifications might be violated. The design goal is to choose the best controller parameters so that the objective value is as close to zero as possible. In the simulations above, it is fortunate that the final objective values of all simulations are zeros and all seven time-domain specifications are met. This also shows that the cuckoo search is an excellent optimizer for searching best controller parameters.

Advertisement

7. Conclusion

In this study, a design procedure of second-order controller for various plants has been proposed. The final controller was obtained by minimizing a time-domain cost function which is weighted sum of important time-domain performance indices including the rise time, first peak time, maximum peak time, maximum overshoot, maximum undershoot, setting time, and steady-state error. In our approach, the desired design specifications were built via a good second-order reference model. Cuckoo search algorithm was adopted to search the optimal controller parameters. Detailed simulations with different design specifications for four plants were provided to illustrate the use of the proposed design method. From the simulation results, the resulting performances of the closed-loop systems are quite good by using the proposed method, which justifies the usefulness of our method. We wish to point out that the methodology proposed in this study can easily be modified to handle the time delay or nonlinear plants. This constitutes an interesting future research topic.

References

  1. 1. Panda S, Sahu BK, Mohanty PK. Design and performance analysis of PID controller for an automatic voltage regulator system using simplified particle swarm optimization. Journal of the Franklin Institute. 2012;349(8):2609-2625
  2. 2. Perng JW, Chen GY, Hsieh SC. Optimal PID controller design based on PSO-RBFNN for wind turbine systems. Energies. 2014;7(1):191-209
  3. 3. Kesarkar AA, Selvaganesan N. Tuning of optimal fractional-order PID controller using an artificial bee colony algorithm. Systems Science & Control Engineering. 2015;3:99-105
  4. 4. Ghosal S, Darbar R, Neogi B, Das A, Tibarewala DN. Application of swarm intelligence computation techniques in PID controller tuning: A review. In: Proceedings of the InConINDIA 2012, AISC 132; 2012. pp. 195-208
  5. 5. Saroja K, Stefka Sharon R, Meena S, Chitra K. Multi-loop PID controller design for distillation column using firefly algorithm. International Journal of Engineering and Technology (IJET). 2017;9(2):1404-1410
  6. 6. Tan N. Computation of stabilizing lag/lead controller parameters. Computers and Electrical Engineering. 2003;29:835-849
  7. 7. Kuo YS, Lin JY, Tang JC, Hsieh JG. Lead-lag compensator design based on vector margin and steady-state error of the step response via particle swarm optimization. In: International Conference on Fuzzy Theory and Its Applications (iFuzzy); 2016. pp. 96-101
  8. 8. Horng HY. Design of lead-lag controller via time-domain objective function by using cuckoo search. In: Lecture Notes in Electrical Engineering (ICITES2013); Vol. 293; 2014. pp. 1083-1091
  9. 9. Yang XS, Deb S. Cuckoo search via Lévy flights. In: World Congress on Nature & Biologically Inspired Computing, December 2009; India. USA: IEEE Publications; 2009. pp. 210-214
  10. 10. Yang XS, Deb S. Engineering optimisation by cuckoo search. International Journal of Mathematical Modelling and Numerical Optimisation. 2010;1(4):330-343
  11. 11. Fister I Jr, Fister D, Fister I. Comprehensive review of cuckoo search variants and hybrids. International Journal of Mathematical Modelling and Numerical Optimisation. 2013;4(4):387-409
  12. 12. Yang XS, Deb S. Cuckoo search: Recent advances and applications. Neural Computing and Applications. 2014;24(1):169-174
  13. 13. Shehab M, Khader AT, Al-Betar MA. A survey on applications and variants of the cuckoo search algorithm. Applied Soft Computing. 2017;61:1041-1059
  14. 14. Abd Elazim SM, Ali ES. Optimal power system stabilizers design via cuckoo search algorithm. International Journal of Electrical Power & Energy Systems. 2016;75:99-107
  15. 15. Abdelaziz AY, Ali ES. Load frequency controller design via artificial cuckoo search algorithm. Electric Power Components & Systems. 2016;44(1):90-98
  16. 16. Anh L, Tam NM, Nghia LT, Anh QH. Optimal power system stabilizer parameters tuned by cuckoo search algorithm. International Journal of Engineering Research & Technology (IJERT). 2017;6(11):24-28
  17. 17. Wongkaew B, Puangdownreong D. Application of cuckoo search to synthesize analog controllersi. nternational journal of circuits Systems and Signal Processing. 2019;13:79-84

Written By

Huey-Yang Horng

Submitted: 17 June 2019 Reviewed: 20 September 2019 Published: 31 October 2019