1 Introduction

In a general way, orders of differential and integral are calculus of fraction, and they are called fractional calculus which greatly expands descriptive power of integer-order calculus. Researches have indicated that in many aspects, using mathematic model of fractional order calculus can describe dynamic response capability of actual system more accurately. Based on mathematic model of fractional order calculus, design, expression and controlling ability of dynamic systems can be greatly elevated. Fractional order calculus not only provides a new mathematic tool for engineering system but also provides a more perfect mathematic model for complicated nonlinear systems [1].

Since fractional order calculus was applied to control field, many researchers have launched in-depth researches on fractional order control [2, 3], e.g., Oustaloup et.al put forward CRONE control principle [4]; Matignon researched on stability and controllability of fractional order system [5]. LVZ F gave a fractional order controller through the minimum integral square error [6]. Capontto gave some examples about fractional order controllers [7]. Traditional proportional-integral-derivative (PID) control, a controlling method with broadest range of application and the most mature technique, has been widely applied to industrial process for its features like simple structure and strong robustness. Combination of fractional order control theory and PID controller setting theory has been a research focus in fractional order control field in recent years.

General format of fractional order PID controller proposed by Professor I.Podlubny is simply denoted as \(PI^{\lambda }D^{\mu }\) [8]. Introduction of differential order \(\lambda \) and fractional order \(\mu \) adds two adjustable parameters for the whole controller; consequently, setting range of controller parameters has been enlarged and the controller can control controlled objects more flexibly. By reasonably selecting parameters, fractional order PID controller can improve controlling effect of the system. Appearance of fractional order controller is a milestone in the history of fractional order control theories and lays a foundation for development of fractional order control theories. The meaning of fractional order control lies in generalization of traditional integer-order control, and it can provide and establish more models and obtain more robust controlling effect.

Orders of differentials and integrals in fractional order controller \(PI^{\lambda }D^{\mu }\) with two additional variable parameters usually are not integers, and it makes the structure more complicated while improving accuracy of parameters. Hence, parameter setting method for fractional order control systems has been a current research focus. For some complicated objects featured by high orders, time lag and nonlinear characteristics, it is hard to acquire the optimal or approximately optimal parameters by adopting some traditional setting methods like Ziegler-Nichol method when setting \(PI^{\lambda }D^{\mu }\) controller parameters. At the moment, some intelligent optimization methods like genetic algorithm (GA) and differential evolution (DE) have drawn interest of many scholars and have already been applied to parameter optimization of PID controller [9]. However, the two methods have their own deficiencies when optimizing some complicated problems, especially their optimizing efficiency obviously decreases when solving optimization problem about correlation between optimized parameters. PSO is an algorithm deriving from simulation of predatory behaviors of birds, and it guides optimizing search by generating swarm intelligence through cooperation and competition between swarm particles [10]. Compared with GA and DE algorithms, PSO has advantages of simple algorithm, easy realization, small calculated quantity and high calculation efficiency. However, similar to conventional differential evolution algorithm, standard PSO algorithm will easily be caught in local optimum phenomenon in the late phase. Although some improved methods such as enlarging particle swarm scale can improve performance of the algorithm to a certain degree, they cannot radically overcome premature convergence phenomenon. This paper suggests PSO based on strategies of adaptive dynamic weight and asynchronization adjustment YLPSO and applies this method to parameter optimization of nonlinear fractional order \(PI^{\lambda }D^{\mu }\) controller. It takes parameters in \(PI^{\lambda }D^{\mu }\) as optimization variables and system performance indexes of expected nonlinear controller as optimized target function, thus obtaining optimal parameter combination of nonlinear fractional order \(PI^{\lambda }D^{\mu }\) controller.

The structure of this paper is as follows: Sect. 2 introduces contents of fractional order calculus and fractional order controller; Sect. 2 introduces PSO based on strategies of adaptive dynamic weight and asynchronization adjustment and details method of adaptive dynamic weight adjustment of learning factors; Sect. 4 applies the new algorithm in this paper to parameter setting of fractional order \(PI^{\lambda }D^{\mu }\) controller through a simulated calculation example; and Sect. 5 draws the conclusion of the whole paper.

2 Fractional order \(PI^{\lambda }D^{\mu }\) controller

2.1 Fractional order calculus [11]

For some complicated actual systems, using fractional order calculus equation to establish a model is more concise and accurate than integer-order model. Fractional order calculus also provides a good tool for describing dynamic process. In a general way, fractional order calculus refers that orders of differentials and integrals can be arbitrary or fractional. Definition of fractional order calculus usually refers to that of Riemann–Liouville:

$$\begin{aligned}&aD^{a}_{t}f(t)=\frac{1}{\varGamma (m-a)}\left( \frac{\hbox {d}}{\hbox {d}t}\right) ^{m}\nonumber \\&\quad \left( \int ^{t}_{a}\frac{f(\tau )}{(t-\tau )^{1-(m-a)}}\hbox {d}\tau \right) \end{aligned}$$
(1)

whereby \(m-1<a<m\) and \(\varGamma (\ldots )\) refers to Euler gamma function. Another definition based on fractional differentiation method is Grunwald-Letnikov:

$$\begin{aligned} aD^{a}_{t}f(t)=\lim _{h\rightarrow 0}\frac{1}{\varGamma (m-a)}\sum _{k=0}^{(t-a)/h}\frac{\varGamma (a+\!k)}{\varGamma (k+\!1)}f(t-kh)\nonumber \\ \end{aligned}$$
(2)

whereby \(aD^{a}_{t}f(t)\) is fractional order operating factor. It can be seen that integrals and differentials can be unified together by introducing fractional order operating factor \(aD^{a}_{t}f(t)\).

Algebraic tool that is usually used to describe fractional order systems is Laplace conversion, when \(t=0\), Laplace conversion of n-order differential of added signal x(t) is:

$$\begin{aligned} L\{D^{n}x(t)\}= & {} \int _{0}^{\infty }e^{-st}_{0}D^{n}_{t}x(t)\nonumber \\= & {} s^{n}X(s)-\sum _{k=0}^{m-1}s_{0}^{k}D_{t}^{n-k-1}x(t)_{t=0} \end{aligned}$$
(3)

whereby \(m-1<n<m\), \(X(s)=L[x(t)]\) is a common Laplace conversion. For fractional order calculus equation, if there are input signal u(t) and output signal y(t) when \(t=0\), then transfer function is:

$$\begin{aligned} G(s)=\frac{a_{1}s^{\alpha _{1}}+a_{2}s^{\alpha _{2}}+\cdots +a_{ma}s^{\alpha _{ma}}}{b_{1}s^{\beta _{1}}+b_{2}s^{\beta _{2}}+\cdots +b_{ma}s^{\beta _{ma}}} \end{aligned}$$
(4)

whereby \((a_{ma}b_{ma}),(\alpha _{m},\beta _{m})\in R^{2}\).

2.2 Fractional order controller

Fractional order controller is a generalization of traditional integer-order controller, and most researchers have considered applying fractional order controller to integer-order systems in order to improve controlling effects of systems. For various actual systems in real situation, fractional order model can describe more accurately than integer-order model does, providing a good tool for describing nonlinear dynamic process. Directing at these fractional order systems, fractional order controller can better present its advantages.

Fractional order controller suggested by Podlubny is of great importance in development of fractional order theories. General form of fractional order PID controller is \(PI^{\lambda }D^{\mu }\) controller including an integral order \(\lambda \) and differential order \(\mu \). \(\lambda \) and \(\mu \) can be arbitrary real numbers, and their mathematic models can be expressed as:

$$\begin{aligned} G_{c}(s)=K_{p}+\frac{K_{i}}{s^{\lambda }}+K_{d}s^{\mu } \end{aligned}$$
(5)

Traditional integer-order PID controller is a special situation of fractional order PID controller when \(\lambda =1\) and \(\mu =1\). When \(\lambda =1\) and \(\mu =1\), it is PI controller; when = 0 and = 1, it is PD controller. It can be seen that all PID controllers of these types are a special situation of fractional order PID controller. Fractional PID controller has three advantages: (1) For dynamic systems described by fractional order mathematic model, it can achieve good controlling effect; (2) even if controlling parameters of \(PI^{\lambda }D^{\mu }\) controller are altered, parameter variation of the controller itself will not by prominent; and (3) there are two additional adjustable parameters \(\lambda \) and \(\mu \) in fractional order PID controller which can better adjust dynamic performance of control system.

Figure 1 shows a schematic diagram of fractional order PID controller in which horizontal axis is integral order and vertical axis is differential order. When \(\lambda =0\) and \(\mu =1\), it is PD controller, when \(\lambda =1\) and \(\mu =0\), it is PI controller, and when \(\lambda =\mu =1\), it is traditional PID controller. Hence, PI, PD and PID controllers are points on this plane. If \(\lambda \) and \(\mu \) can be arbitrarily selected, then it can cover the whole plane in this figure, so fractional order controller has more flexible controlling structure than integer-order controller does.

Fig. 1
figure 1

Schematic diagram of fractional order PID controller

3 An adaptive dynamic particle swarm optimization algorithm

3.1 Standard particle swarm optimization algorithm

Standard PSO firstly can initialize a swarm of particles in feasible solution space, and each particle represents a potential optimal solution of optimization problem and location, velocity and fitness can be used to represent features of this particle. Value of fitness is calculated by fitness function, and the value presents the quality of this particle. The particle moves in the solution space and conducts optimizing operation by tracking extreme value \(P_{t}\) of individual location and optimal location \(G_{t}\) of the swarm. Every once the particle update location and velocity, fitness will be calculated, and extreme value \(P_{t}\) of individual location and optimal location \(G_{t}\) will be updated by comparing fitness value of new particles and fitness values corresponding to individual extreme value \(P_{t}\) and swarm extreme value \(G_{t}\).

Suppose that in a swarm consisting of n particles, locations of them are \(X=(X_{1},X_{2},X_{3},\ldots ,X_{n})\) and velocities are \(V=(V_{1},V_{2},V_{3},\ldots ,V_{n})\) with each particle \(X_{i}\) corresponding to its velocity \(V_{i}\). Based on target function, fitness value of each particle at location \(X_{i}\) can be calculated, extreme value corresponding to the optimal fitness value of each particle is \(P_{t}\), and extreme value of the optimal individual location corresponding to optimal swarm fitness value is \(G_{t}\). In each iterative process of the algorithm, each particle updates its own velocity and location through individual extreme value and swarm extreme value, namely:

$$\begin{aligned} V_{t+1}= & {} \omega V_{t}+C_{1}r_{1}(P_{t}-X_{t})\nonumber \\&+\,C_{2}r_{2}(G_{t}-X_{t}) \end{aligned}$$
(6)
$$\begin{aligned} X_{t+1}= & {} X_{t}+V_{t+1} \end{aligned}$$
(7)

whereby t is the current number of iterations, \(X_{t}\) represents location of particle of t generation, \(\omega \) is inertia weight, \(C_{1}\) and \(C_{2}\) are called learning factors and they are nonnegative constants, and \(r_{1}\) and \(r_{2}\) are random numbers within [0, 1].

3.2 Adaptive weight

In order to balance global and local searching abilities of PSO algorithm, the following equation can be used to adjust inertia weight in standard PSO:

$$\begin{aligned} \omega =\left\{ \begin{array}{ll} \omega _{\hbox {min}}-\frac{(\omega _{\hbox {max}}-\omega _{\hbox {min}})*(f-f_{\hbox {avg}})}{f_{\hbox {avg}}-f_{\hbox {min}}} ,&{}f\le f_{\hbox {avg}} \\ \omega _{\hbox {max}},&{}f\ge f_{\hbox {avg}} \end{array} \right. \end{aligned}$$
(8)

whereby \(\omega _{\hbox {max}}\) and \(\omega _{\hbox {min}}\), respectively, represent maximum and minimum values of inertia weight and they represent the current target functional values of the particle, and \(f_{\hbox {avg}}\) and \(f_{\hbox {min}}\), respectively, represent average fitness value and the minimum fitness value of all current particles. In the above equation, inertia weight will automatically change with fitness functional value of particles, so it is also called adaptive weight.

When fitness values of particles tend to be identical or approximate the local optimum, inertia weight will increase. While target values of particles are disperse, inertia weight will decrease. In the meantime, for particles whose fitness functional values are superior to average target values, the corresponding inertia weight factors will be small, thus protecting the particles; on the contrary, for particles whose fitness functional values are lower than average fitness values, the corresponding inertia weight factors will be large, making these particles move to better searching region.

3.3 Asynchronization adjustment of learning factors

The second mechanism adopted by the new algorithm is to conduct dynamic change in two learning factors \(C_{1}\) and \(C_{2}\) in optimization process with the time in order to make particles have strong self-learning ability and weak social learning ability in initial phase of optimization thus intensifying global searching performance of the algorithm, while in the late phase of optimization, particles have strong social learning ability and weak self-learning ability, which is beneficial for the algorithm to converge to globally optimal solution. Dynamic changes in learning factors \(C_{1}\) and \(C_{2}\) will be implemented according to Eqs. (9) and (10):

$$\begin{aligned} C_{1}(t)= & {} C_{1}^{\hbox {ini}}+\frac{C_{1}^{\hbox {end}}-C_{1}^{\hbox {ini}}}{T} \end{aligned}$$
(9)
$$\begin{aligned} C_{2}(t)= & {} C_{2}^{\hbox {ini}}+\frac{C_{2}^{\hbox {end}}-C_{2}^{\hbox {ini}}}{T} \end{aligned}$$
(10)

whereby \(C_{1}^{\hbox {ini}}\) and \(C_{2}^{\hbox {ini}}\), respectively, represent initial values of \(C_{1}\) and \(C_{2}\) , \(C_{1}^{\hbox {end}}\) and \(C_{2}^{\hbox {end}}\), respectively, represent iterative final values of \(C_{1}\) and \(C_{2}\), and T represents total degree of arithmetic iterations.

Fig. 2
figure 2

A schematic diagram of YLPSO optimizing parameters of fractional order PID control system

3.4 Algorithm flow

  1. Step 1

    Initialize particle swarm, randomly generate locations and velocities of all particles and determine extreme value \(P_{t}\) of individual location and optimal location \(P_{t}\) of swarm;

  2. Step 2

    Calculate fitness value of each particle and compare fitness value of each particle with that corresponding to optimal location \(P_{t}\) that this particle has gone through; if the fitness value is good, then take it as a new \(P_{t}\);

  3. Step 3

    Compare fitness value of each particle with that corresponding to optimal location \(G_{t}\) that the whole swarm has gone through; if it is good, then take it as a new \(G_{t}\);

  4. Step 4

    Use Eqs. (11) and (12) to update velocity and location of particles;

    $$\begin{aligned} V_{t+1}= & {} \omega _{t}V_{t}+C_{1}(t)r_{1}(P_{t}-X_{t})\nonumber \\&+\,C_{2}(t)r_{2}(G_{t}-X_{t}) \end{aligned}$$
    (11)
    $$\begin{aligned} X_{t+1}= & {} X_{t}+V_{t+1} \end{aligned}$$
    (12)

    whereby \(\omega _{t}\) represents inertia weight of t generation particles, and \(C_{1}(t)\) and \(C_{2}(t)\) are learning factors of t generation;

  5. Step 5

    Use Eq. (8) to update weight ;

  6. Step 6

    Use Eqs. (9) and (10) to, respectively, update learning factors \(C_{1}\) and \(C_{2}\);

  7. Step 7

    If meeting conditions (generally are preset operational precision or number of iterations) are met, the search stops, and result is output; otherwise, return back to Step 2 for continuing to optimize.

Fig. 3
figure 3

Nonlinear fractional order \(PI^{\lambda }D^{\mu }\) control system model

Fig. 4
figure 4

Subsystem model of nonlinear fractional order \(PI^{\lambda }D^{\mu }\) control system

4 Simulation research

4.1 Automatic setting method of fractional order \(PI^{\lambda }D^{\mu }\) controller parameters based on YLPSO algorithm

The idea of using YLPSO algorithm to conduct automatic setting of fractional order \(PI^{\lambda }D^{\mu }\) controller is as shown in Fig. 2, that is: establish a connection between the algorithm and nonlinear controller simulation system through five parameters \((K_{p},K_{i},K_{d},\lambda ,\mu )\) of \(PI^{\lambda }D^{\mu }\) controller and their corresponding fitness values (namely: performance indexes of nonlinear controller system). Firstly, use YLPSO algorithm to generate particle swarm and successively assign values of particles of the particle swarm to five parameters of \(PI^{\lambda }D^{\mu }\) controller: \(K_{p}\), \(K_{i}\), \(K_{d}\), \(\lambda \), \(\mu \) and then operate simulation model of nonlinear fractional order control system to acquire performance indexes corresponding to this group of parameters, and these performance indexes will be transferred to YLPSO as fitness values of this particle; finally, update individual extreme value swarm extreme value as well as particle velocity and location; in the end, output the optimal parameter set through automatic setting of YLPSO based on circular condition elimination algorithm.

Algorithm flow of YLPSO optimizing parameters of fractional order PID control system is as follows:

  1. Step 1

    Determine initial parameters such as upper and lower bounds of value ranges of five variables \(K_{p}\), \(K_{i}\), \(K_{d}\), \(\lambda \), \(\mu \) of controller parameters, number N of particles in the swarm and number of iterations \(T_{\hbox {max}}\). Randomly initialize particle swarm including location vector, velocity vector, pbest and gbest of each particle;

  2. Step 2

    Define fitness function. Here ITAE index is adopted, and its expression is: \(J_{ITAE}=\int _{0}^{t}t|e(t)|dt\). Adopting ITAE index to optimize has advantages of speediness and stability. Calculate fitness value of each particle based on ITAE index;

  3. Step 3

    Compare fitness value of each particle with that corresponding to optimal location \(G_{t}\) that the whole swarm has gone through; if it is good, then take it as a new \(G_{t}\);

  4. Step 4

    Use Eqs. (11) and (12) to update velocity and location of particles; \(V_{t}\) is an N*5 matrix, and rows of this matrix, respectively, represent velocities of fractional order controller parameters \(K_{p}\), \(K_{i}\), \(K_{d}\), \(\lambda \), \(\mu \) of t generation in the swarm; \(X_{t}\) is an N*5 matrix, and rows of this matrix, respectively, represent locations of fractional order controller parameters \(K_{p}\), \(K_{i}\), \(K_{d}\), \(\lambda \), \(\mu \) of t generation in the swarm;

  5. Step 5

    Use Eq. (8) to update weight \(\omega _{t}\);

  6. Step 6

    Use Eqs. (9) and (10) to, respectively, update learning factors \(C_{1}\) and \(C_{2}\);

  7. Step 7

    If number of iterations \(t=t+1\), return to Step 2 until reaching the maximum number of iterations \(T_{\hbox {max}}\), at the moment, output gbest as the optimal parameter sequence of fractional order PID controller \(PI^{\lambda }D^{\mu }\).

Table 1 Parameter setting of three algorithms
Table 2 Optimal controller parameters and ITAE index T acquired by three algorithms
Fig. 5
figure 5

Performance index ITAE variation curve acquired by optimizing nonlinear fractional order \(PI^{\lambda }D^{\mu }\) control system

4.2 Simulation experiment

4.2.1 Model design of fractional order controller

Controlled object selected by this paper is a typical nonlinear system:

$$\begin{aligned} G(s)=\frac{2s+3}{s^{4}+5s^{3}+3s^{2}+s+0.8} \end{aligned}$$

Here, this paper designs a fractional order control system. Figure 3 is diagram of nonlinear fractional order \(PI^{\lambda }D^{\mu }\) control system, and Fig. 4 is subsystem model design in control system model as shown in Fig. 3.

4.2.2 Simulation results and discussion

In order to verify performance of the new algorithm, this paper, respectively, uses new algorithm, DE and standard PSO algorithm to optimize parameters of nonlinear fractional order \(PI^{\lambda }D^{\mu }\) control system, and parameter setting of the three algorithms is given in Table 1.

The three algorithms have operated for many times separately, and this paper selects the optimal ITAE indexes acquired by multiple operations of the three algorithms as well as corresponding optimal parameters. Whereby, optimal ITAE values and optimal parameters of the three algorithm are as shown in Table 2, and change situation of the optimal ITAE curve is as shown in Fig. 5.

It can be found from Fig. 5 that during optimization process of the three algorithms, values of performance index ITAE continuously reduce, and all of them are continuously seeking for superior parameter combination. Whereby, among them, YLPSO can acquire superior ITAE index value; thus, it can determine more reasonable parameter combination of nonlinear fractional order controller. For TLPSO algorithm, it substitutes acquired optimal parameter combination into model as shown in Figs. 3, 4 and obtains unit step response curve as shown in Fig. 6 from which it can be seen that for unstable controlled objects, the optimal nonlinear fractional order \(PI^{\lambda }D^{\mu }\) controller designed by YLPSO can control controlled objects well by reasonably determining parameters \(K_{p}\), \(K_{i}\), \(K_{d}\), \(\lambda \), \(\mu \).

Fig. 6
figure 6

Step response diagram

5 Conclusion

For some complicated actual systems, using fractional order calculus equation to establish a model is more concise and accurate than integer-order model. In particular, in recent years, actual control systems have higher and higher requirements for precision, fraction order systems have been attached with great importance in control field, and great progress has been achieved in fractional order controller design. Optimization design and setting of parameters of fractional order \(PI^{\lambda }D^{\mu }\) controller is quite significant for control system performance. This paper suggests an automatic parameter setting method of fractional order PID controller based on improved PSO. This method can adapt to change in inertia weight of particle swarm movement according to swarm fitness in searching process in order to avoid making searching process get caught in local optimization In the meantime, it improves searching precision of the algorithm and accelerate its convergence performance through the strategy of asnychronization adjustment of learning factors. It is indicated through simulation experiment of fractional order controlled objects that under optimal index of ITAE, compared with DE and standard PSO algorithm, the algorithm put forward in this paper can acquire better parameter optimization results for fractional order controller.