1 Introduction

Fractional calculus concerns utilizing non-integer derivatives and integrals instead of the corresponding ordinary ones to increase the design flexibility and modelling precision [13]. The Fractional Order PID (FOPID) controllers with fractional order derivative and integral terms have been employed to control industrial plants [4, 5]. A lot of approaches have been proposed to design FOPID controllers for fractional order systems in the literature. Internal model based FOPID controllers have been considered in this regard [6, 7]. In [8], a Ziegler–Nichols-type tuning method for designing FOPID controllers has been provided. Designing fractional order PD (FOPD) controllers robust to gain variations has been considered [9, 10]. The same idea has been proposed for designing fractional order PI (FOPI) controllers [11]. In [12], the superiority of the FOPI controller comparing with the PI and PID controllers for controlling a time delayed system with a fractional order pole has been demonstrated. Optimization methods have been employed for designing these controllers [13]. Root locus method has been employed to design FOPID for minimum-phase fractional order systems [14].

One of the analytical approaches proposed for designing PID controllers is the moment matching method. In this method, the PID controller parameters could be obtained by matching the first three moments of the closed loop system transfer function with the desired one. In this approach, the closed loop system transfer function is expanded in terms of some orthogonal functions. For example, the MacLaurin expansion has been employed to find the PID controller parameters through a moment matching approach [15]. A PD controller for the First-Order Plus Dead Time (FOPDT) plants is designed based on the Taylor series approximation [16]. Laguerre orthogonal functions have been utilized to design PID controllers for some special case of plants [17]. A moment matching based FOPID controller, has been proposed in the literature [18]. In the proposed approach, the first three moments of the desired closed loop system transfer function obtained from a characteristic ratios assignment approach are matched with the corresponding ones in the closed loop system transfer function. The proposed method could be employed to design FOPID for commensurate fractional order systems. Block pulse, Walsh and Haar Wavelet as piecewise orthogonal functions have been employed to design FOPID for integer and fractional order systems [19].

Fractional order Laguerre orthogonal functions as a generalization of ordinary Laguerre functions have been constructed to approximate fractional order systems [20, 21].

In the current paper, the fractional order Laguerre orthogonal functions are employed to design FOPID and Fractional order PI (FOPI) controllers for fractional order systems. First, the Laguerre series coefficients of a commensurate fractional order plant are calculated. These coefficients are the inner product of the plant transfer function with their corresponding fractional order Laguerre basis functions. This idea is employed to calculate the Laguerre series coefficients of the open loop gain (the product of the FOPID controller transfer function with the plant transfer function). Matching the first three Laguerre series coefficients of the open loop gain with the desired one gives the FOPID or FOPI controller parameters. The optimum location of the fractional order Laguerre basis function pole is determined so that the best fitting to the desired loop gain is achieved. The performance of these Laguerre based FOPID and FOPI controllers is investigated through numerical simulations.

The remainder of this paper is organized as follows. A brief review on fractional calculus is given in Sect. 2. Section 3 describes the construction of the fractional order Laguerre series basis functions. The proposed FOPID and FOPI controller are presented in Sect. 4. The performance of the proposed FOPID and FOPI controllers is demonstrated by numerical simulations given in Sect. 5. Finally, Sect. 6 concludes the paper.

2 A brief review on fractional calculus

There are a lot of definitions for the fractional order derivative in the literature [1]. Due to its computation advantages, the Grunwald–Letnikov definition is utilized in this paper. According to this definition, the fractional order derivative of a function \(f(t) (D^{\rho }f(t))\) is defined as [1]

$$\begin{aligned} D^{\rho }f(t)= & {} \mathop {\lim }\limits _{h\rightarrow 0} h^{-\rho }\sum \limits _{j=0}^{\left[ \frac{t}{h}\right] } {(-1)^{j}\left( {{\begin{array}{c} \rho \\ j \\ \end{array}}} \right) f(t-jh)},\nonumber \\&\qquad (n-1<\rho \le n) \end{aligned}$$
(1)

where \(\rho \) is the fractional order. If \(\rho =1\), then the ordinary definition of derivative is obtained. The Fractional Order Transfer Function (FOTF) toolbox proposed for numerical simulation of fractional order systems is based on this definition [22]. A Linear Time Invariant (LTI) fractional order system with input u(t) and output y(t) could be described with the following differential equation

$$\begin{aligned}&a_n D^{\alpha _n}y(t)+a_{n-1} D^{\alpha _{n-1}}y(t)+\cdots +a_0 D^{\alpha _0}y(t)\nonumber \\&=b_m D^{\beta _m}u(t)+b_{m-1} D^{\beta _{m-1}}u(t)+\cdots +b_0 D^{\beta _0}u(t) \end{aligned}$$
(2)

where \(\alpha _i (i=0,\ldots ,n)\) and \(\beta _j (j=0,\ldots ,m)\) are the fractional orders and \(a_k (k=0,\ldots ,n)\) and \(b_k (k=0,\ldots ,m)\) are arbitrary constant numbers. If \(\alpha _i=iv,\;i=0,\ldots ,n\) and \(\beta _j=jv,\;j=0,\ldots ,m\) are considered, then the fractional order system (2) is called commensurate and v is called the commensurate order. Taking Laplace transform from both sides of (2) gives the transfer function of a commensurate fractional order system as

$$\begin{aligned} G(s)=\frac{Y(s)}{U(s)}=\frac{b_m s^{mv}+b_{m-1} s^{(m-1)v}+\cdots +b_0}{a_n s^{nv}+a_{n-1} s^{(n-1)v}+\cdots +a_0}. \end{aligned}$$
(3)

The controllers containing fractional order operators in their structure are called fractional order controllers. For example, the transfer function of a fractional order PID controller could be written as

$$\begin{aligned} C(s)=k_c \left( 1+\frac{1}{T_i s^{\beta }}+T_d s^{\mu }\right) \end{aligned}$$
(4)

where \(k_c \), \(T_i\) and \(T_d\) are the proportional gain, integrator and derivative coefficients, respectively. While \(\beta \) and \(\mu \) are two arbitrary real numbers belonging to (0, 2). If \(\beta =\mu =1\), then the ordinary PID controller is obtained.

3 Fractional order Laguerre orthogonal functions

In this section, fractional order Laguerre basis functions are introduced. To begin, some necessary preliminaries should be introduced. A fractional order transfer function (3) is stable if the following conditions are satisfied [23, 24]

$$\begin{aligned} 0{<}v<2, \left| {\arg (z)} \right| >\frac{v\pi }{2}, a_n z^{n}+a_{n-1} z^{n-1}+\cdots +a_0=0. \end{aligned}$$
(5)

The \(H_2\) norm of a transfer function F(s) denoted by \(\left\| F \right\| _2\) is defined as

$$\begin{aligned} \left\| F \right\| _2=\sqrt{\frac{1}{\pi }\int _0^\infty {F(j\omega )F(-j\omega )d\omega }}. \end{aligned}$$
(6)

Let denote open right half-plane (complex numbers with positive real part) with \(\mathbb {C}^{+}\) and closed right half plane (complex numbers with nonnegative real part) with \({\overline{{\mathbb {C}}^{+}}}\). Now, the space of functions which are analytical on \({\mathbb {C}}^{+}\) and continuous on \({\overline{{\mathbb {C}}^{+}}}\) with finite \(H_2\) norm are called \(H_2 ({\mathbb {C}}^{+})\).

The transfer function (3) belongs to \(H_2 ({\mathbb {C}}^{+})\) if the following inequality is fulfilled [20]

$$\begin{aligned} (n-m)v{>}0.5. \end{aligned}$$
(7)

To construct the fractional order Laguerre basis functions, the following generating functions are defined

$$\begin{aligned} F_n (s)=\frac{1}{(s^{v}+\lambda )^{n}}. \end{aligned}$$
(8)

According to (7), the generating functions in (8) belong to \(H_2 ({\mathbb {C}}^{+})\), if the following inequality holds

$$\begin{aligned} n\ge n_0, n_0=\left[ {\frac{1}{2v}} \right] +1. \end{aligned}$$
(9)

According to (9), the transfer function (8) belongs to \(H_2 ({\mathbb {C}}^{+})\) for all \(n\ge 1 (n_0=1)\) if \(v\in (0.5,2)\). Thus, in the remainder of the paper, the plant is considered a commensurate fractional order system as (3) with commensurate order \(v\in (0.5,2)\). Unfortunately, the generating functions (8) aren’t orthogonal and couldn’t be utilized directly as Laguerre basis functions [20]. Therefore, these functions are employed to generate fractional order Laguerre basis functions according to a Gram-Schmidt orthogonalization procedure [20].

Gram-Schmidt orthogonalization procedure: Consider arbitrary generating functions \(F_i (s)\in H_2 ({\mathbb {C}}^{+}), i=1,\ldots , N\). Now, the functions \(\varphi _i (s)\in H_2 ({\mathbb {C}}^{+}), i=1,\ldots , N\) obtained from the following relations are orthonormal

$$\begin{aligned} \varphi _1 (s)= & {} \frac{F_1 (s)}{\left\| {F_1 (s)} \right\| },\nonumber \\ \varphi _i (s)= & {} \frac{F_i (s)-\sum \nolimits _{j=1}^{i-1} {{<}F_i (s),\varphi _j (s){>}\varphi _j (s)}}{\left\| {F_i (s)-\sum \nolimits _{j=1}^{i-1} {{<}F_i (s),\varphi _j (s){>}\varphi _j (s)}} \right\| },\nonumber \\&\qquad i=1,\ldots , N \end{aligned}$$
(10)

where \({<}p,q{>}\) denotes the inner product of functions p and q defined as follows

$$\begin{aligned} {<}p,q{>}=\frac{1}{2\pi }\int _{-\infty }^{+\infty } {p(j\omega ){\overline{q(j\omega )}} d\omega }. \end{aligned}$$
(11)

Moreover, the norm of function p is defined as

$$\begin{aligned} \left\| p \right\| =\sqrt{{<}p,p{>}}. \end{aligned}$$
(12)

This yields the orthonormal fractional order Laguerre basis functions \(\varphi _i (s)\in H_2 ({\mathbb {C}}^{+}), i=1,\ldots , k\). To construct fractional order Laguerre basis functions, the inner product of a fractional order plant and the generating functions (8) should be calculated. The transfer function of any commensurate order plant with real poles could be described with a partial fractions expanded form in terms of pseudo first order terms (8). Thus, it is enough to compute the inner product of two generating functions like (8). Or

$$\begin{aligned} \theta (v,h,m,\lambda , \delta )={<}\frac{1}{(s^{v}+\lambda )^{h}},\frac{1}{(s^{v}+\delta )^{m}}{>} =\frac{1}{2\pi }\int _{-\infty }^{+\infty } {\frac{d\omega }{((j\omega )^{v}{+}\lambda )^{h}({\overline{j^{v}}} \omega ^{v}+\delta )^{m}}}.\nonumber \\ \end{aligned}$$
(13)

The relation (13) could be rewritten as

$$\begin{aligned}&\theta (v,h,m,\lambda , \delta ) =\frac{1}{2\pi }\left( \int _0^{+\infty } {\frac{d\omega }{((j\omega )^{v}+\lambda )^{h}({\overline{j^{v}}} \omega ^{v}+\delta )^{m}}}\right. \nonumber \\&\quad \left. +\int _0^{+\infty } {\frac{d\omega }{((-j\omega )^{v}+\lambda )^{h}({\overline{(-j)^{v}}} \omega ^{v}+\delta )^{m}}} \right) . \end{aligned}$$
(14)

By change of variable \(x=\omega ^{v}\) Eq. (14) is simplified as

$$\begin{aligned}&\theta (v,h,m,\lambda , \delta )\nonumber \\&\quad =\frac{1}{2\pi v\lambda ^{h}\delta ^{m}}\left[ I\left( \lambda ^{-1}e^{j\frac{\pi }{2}v},\delta ^{-1}e^{-j\frac{\pi }{2}v},\frac{1}{v},h,m\right) \right. \nonumber \\&\qquad \left. +I\left( \lambda ^{-1}e^{-j\frac{\pi }{2}v},\delta ^{-1}e^{j\frac{\pi }{2}v},\frac{1}{v},h,m\right) \right] \end{aligned}$$
(15)

where

$$\begin{aligned} I\left( \zeta , \gamma , \frac{1}{v},h,m\right) =\int _0^\infty {\frac{x^{\frac{1}{v}-1}dx}{(\zeta x+1)^{h}(\gamma x+1)^{m}}}. \end{aligned}$$
(16)

The details of computing integral (16) is illustrated in [3.194, 4 p. 285] of [25] and [20].

Now, a commensurate order strictly proper system as (3) could be described as the following fractional order Laguerre series expansion

$$\begin{aligned} G(s)=\sum \limits _{i=1}^\infty {g_i \varphi _i (s)} \end{aligned}$$
(17)

where \(\varphi _i (s)\) are the Laguerre basis functions constructed from a Gram-Schmidt procedure. The Laguerre basis functions could be parameterized as follows

$$\begin{aligned} \varphi _i (s)=\sum \limits _{j=1}^i {\frac{s_{ij}}{(s^{v}+\lambda )^{j}}} \end{aligned}$$
(18)

where \(s_{ij}, j=1,\ldots , i, i=1,2,3,\ldots \) are constant parameters obtained from the Gram-Schmidt procedure. Moreover, the Laguerre series coefficients \(g_i\) are calculated as

$$\begin{aligned} g_i={<}G(s),\varphi _i (s){>}. \end{aligned}$$
(19)

Example 1

Consider the following fractional order system

$$\begin{aligned} G(s)=\frac{2}{s^{0.7}+1}. \end{aligned}$$
(20)

Considering the Laguerre pole \(\lambda =2.5\), gives the unknown parameters of Laguerre basis functions in (18) as

$$\begin{aligned} \begin{array}{l} s_{11}=1.5037, s_{21}=-1.2422, s_{22}=10.8697, \\ s_{31}=-1.159, s_{32}=22.6265, s_{33}=-71.9935 \\ \end{array}. \end{aligned}$$
(21)

The first three Laguerre series coefficients of (20) obtained from (19) and (15) are

$$\begin{aligned} g_1=0.8227, g_2=0.2492, g_3=0.0826. \end{aligned}$$
(22)

To design Laguerre based FOPI and FOPID controllers, the product of each pairs of two Laguerre basis functions should be computed. By some manipulations, we have

$$\begin{aligned} \varphi _i (s)\varphi _j (s)=\sum \limits _{k=1}^{i+j} {a_{ijk} \varphi _k (s)} \end{aligned}$$
(23)

where the coefficients \(a_{ijk}\) could be obtained in terms of \(s_{ij}\) as

$$\begin{aligned} \left[ {{\begin{array}{c} {a_{ij1}} \\ \vdots \\ {a_{ij(i+j)}} \\ \end{array}}} \right]= & {} \left[ {{\begin{array}{cccc} {s_{11}}&{} {s_{21}}&{} \ldots &{} {s_{(i+j)1}} \\ 0&{} {s_{22}}&{} \ldots &{} {s_{(i+j)2}} \\ \vdots &{} \vdots &{} \vdots &{} \vdots \\ 0&{} 0&{} 0&{} {s_{(i+j)(i+j)}} \\ \end{array}}} \right] ^{-1}\nonumber \\&\times \left[ {{\begin{array}{c} 0 \\ {\sum \limits _{m=1}^j {\sum \limits _{l=1}^i {s_{il} s_{jm}, (l+m=2)}}} \\ \vdots \\ {\sum \limits _{m=1}^j {\sum \limits _{l=1}^i {s_{il} s_{jm}, (l+m=i+j)}}} \\ \end{array}}} \right] . \end{aligned}$$
(24)

4 Laguerre based design of FOPI and FOPID controllers

At first, consider a stable commensurate fractional order system with the fractional order Laguerre series expansion (17). Then, the algorithm is extended for the unstable plants, too. The controller C(s) is designed such that the open loop gain could approximate a desired open loop gain L(s). Or

$$\begin{aligned} L(s)=G(s)C(s). \end{aligned}$$
(25)

In a unit negative feedback control structure, the following desired loop gain is considered

$$\begin{aligned} L(s)=\frac{\omega _n^2}{s^{v}(s^{v}+2\eta \omega _n )} \end{aligned}$$
(26)

where \(\eta \) and \(\omega _n\) are the damping ratio and the natural frequency, respectively. The desired open loop gain isn’t a stable function. Therefore, it should be rewritten as follows

$$\begin{aligned} L(s)=\frac{\frac{\omega _n^2}{(s^{v}+2\eta \omega _n )(s^{v}+\lambda )^{2}}}{\frac{s^{v}}{(s^{v}+\lambda )^{2}}}=\frac{\sum \nolimits _{i=1}^\infty {l_i \varphi _i (s)}}{\sum \nolimits _{i=1}^\infty {{l}'_i \varphi _i (s)}} \end{aligned}$$
(27)

where the first three Laguerre series coefficients in (27) are calculated by partial fraction expansion as

$$\begin{aligned} l_i= & {} {{<}}\frac{\omega _n^2}{(s^{v}+2\eta \omega _n )(\lambda -2\eta \omega _n )^{2}},\varphi _i (s){>}\nonumber \\&+{<}\frac{-\omega _n^2}{(s^{v}+\lambda )(\lambda -2\eta \omega _n )^{2}},\varphi _i (s){>}\nonumber \\&+{<}\frac{\omega _n^2}{(s^{v}+\lambda )^{2}(2\eta \omega _n -\lambda )},\varphi _i (s){>}, \quad i=1,2,3.\nonumber \\ \end{aligned}$$
(28)
$$\begin{aligned} {l}'_1= & {} \frac{s_{22} +\lambda s_{21}}{s_{11} s_{22}},\quad {l}'_2=\frac{-\lambda }{s_{22}},\quad {l}'_3=0. \end{aligned}$$
(29)

The Laguerre based FOPI and FOPID design procedures are illustrated in the following subsections.

4.1 Laguerre based FOPI design for stable plants

Consider the following FOPI controller

$$\begin{aligned} C(s)=k_c \left( 1+\frac{1}{T_i s^{v}}\right) . \end{aligned}$$
(30)

The controller could be rewritten in the following Laguerre series form

$$\begin{aligned} C(s)=\frac{\frac{k_c (T_i s^{v}+1)}{T_i (s^{v}+\lambda )^{2}}}{\frac{s^{v}}{(s^{v}+\lambda )^{2}}}=\frac{\sum \nolimits _{i=1}^\infty {c_i \varphi _i (s)}}{\sum \nolimits _{i=1}^\infty {{c}'_i \varphi _i (s)}} \end{aligned}$$
(31)

where

$$\begin{aligned} c_1= & {} \frac{k_c T_i s_{22} -k_c s_{21} (-\lambda T_i +1)}{T_i s_{11} s_{22}},\nonumber \\ c_2= & {} \frac{k_c (1-\lambda T_i )}{T_i s_{22}}, {c}'_1=\frac{s_{22} +\lambda s_{21}}{s_{11} s_{22}},\quad {c}'_2=\frac{-\lambda }{s_{22}}. \end{aligned}$$
(32)

Substituting relations (17), (27) and (31) in (25) yields

$$\begin{aligned} \sum \limits _{i=1}^\infty {g_i \varphi _i (s)} \sum \limits _{i=1}^\infty {c_i \varphi _i (s)} \sum \limits _{i=1}^\infty {{l}'_i \varphi _i (s)}= & {} \sum \limits _{i=1}^\infty {l_i \varphi _i (s)}\nonumber \\&\times \sum \limits _{i=1}^\infty {{c}'_i \varphi _i (s)}. \end{aligned}$$
(33)

Considering the product property of fractional order Laguerre basis functions in (23) and matching the first two coefficients in both sides in series (33) gives the following FOPI coefficients

$$\begin{aligned} k_c=s_{11} c_1 +s_{21} c_2, T_i=\frac{s_{11} c_1 +s_{21} c_2}{s_{22} c_2 +\lambda (s_{11} c_1 +s_{21} c_2 )} \end{aligned}$$
(34)

where

$$\begin{aligned}&\left[ {{\begin{array}{c} {c_1} \\ {c_2} \\ \end{array}}} \right] =\left[ {{\begin{array}{cc} {X_1}&{} {X_2} \\ {Y_1}&{} {Y_2} \\ \end{array}}} \right] ^{-1}\left[ {{\begin{array}{c} {q_1} \\ {q_2} \\ \end{array}}} \right] ,\nonumber \\&X_i=\sum \limits _{j=1}^2 {a_{ij1} u_j}, Y_i=\sum \limits _{j=1}^2 {a_{ij2} u_j}, u_i\nonumber \\&\quad =\sum \limits _{k=1}^2 {\sum \limits _{j=1}^2 {g_j {l}'_k a_{jki}}}, q_i=\sum \limits _{k=1}^2 {\sum \limits _{j=1}^2 {l_j {c}'_k a_{jki}}},\nonumber \\&\qquad \qquad i=1,2. \end{aligned}$$
(35)

Finally, the following algorithm could be obtained for designing FOPI controllers.

Algorithm 1.

  1. a)

    Calculate \(s_{11}, s_{21}, s_{22}\) in (18) according to the Gram-Schmidt orthogonalization procedure in (10).

  2. b)

    Calculate \(l_i, {l}'_i, i=1,2\) according to (28) and (29) and \(g_i, i=1,2\) according to (19) (partial fraction expansion could be utilized).

  3. c)

    Calculate \({c}'_i, i=1,2\) according to (32) and \(c_i, i=1,2\) according to (35).

  4. d)

    Calculate FOPI controller parameters \((k_c, T_i)\) according to (34).

4.2 Laguerre based FOPID design for stable plants

The FOPID controller with the following transfer function is considered

$$\begin{aligned} C(s)=k_c \left( 1+\frac{1}{T_i s^{v}}+T_d s^{v}\right) . \end{aligned}$$
(36)

Transfer function (36) is rewritten as

$$\begin{aligned} C(s)=\frac{\frac{k_c (T_i T_d s^{2v}+T_i s^{v}+1)}{T_i (s^{v}+\lambda )^{3}}}{\frac{s^{v}}{(s^{v}+\lambda )^{3}}}=\frac{\sum \nolimits _{i=1}^\infty {c_i \varphi _i (s)}}{\sum \nolimits _{i=1}^\infty {{c}'_i \varphi _i (s)}} \end{aligned}$$
(37)

where

$$\begin{aligned} c_3= & {} \frac{k_c (T_d T_i \lambda ^{2}-T_i \lambda +1)}{s_{33} T_i},\nonumber \\ c_2= & {} \frac{-\left( k_c \left( 2\lambda \tau _d -1\right) +s_{32} c_3 \right) }{s_{22}},\nonumber \\ c_1= & {} \frac{k_c T_d -s_{31} c_3 -s_{21} c_2}{s_{11}}. \end{aligned}$$
(38)
$$\begin{aligned} {c}'_3= & {} \frac{-\lambda }{s_{33}}, {c}'_2=\frac{s_{32} \lambda +s_{33}}{s_{22} s_{33}}, {c}'_1=\frac{-\left( s_{21} {c}'_2 +s_{31} {c}'_3 \right) }{s_{11}}. \end{aligned}$$
(39)

The relation (33) could be utilized in the FOPID case, too. Thus, the following FOPID controller parameters could be obtained from relations (23), (38) and (39)

$$\begin{aligned} k_c= & {} 2s_{11} \lambda c_1 +(s_{22} +2\lambda s_{21} )c_2 +(s_{32} +2\lambda s_{31} )c_3,\nonumber \\ T_d= & {} \frac{s_{11} c_1 +s_{21} c_2 +s_{31} c_3}{k_c},\nonumber \\ T_i= & {} \frac{k_c}{\lambda ^{2}s_{11} c_1 +(\lambda s_{22} +s_{21} \lambda ^{2})c_2 +(s_{33} +\lambda s_{32} +s_{31} \lambda ^{2})c_3}\nonumber \\ \end{aligned}$$
(40)

where

$$\begin{aligned}&\left[ {{\begin{array}{c} {c_1} \\ {c_2} \\ {c_3} \\ \end{array}}} \right] =\left[ {{\begin{array}{ccc} {X_1}&{} {X_2}&{} {X_3} \\ {Y_1}&{} {Y_2}&{} {Y_3} \\ {Z_1}&{} {Z_2}&{} {Z_3} \\ \end{array}}} \right] ^{-1}\left[ {{\begin{array}{c} {q_1} \\ {q_2} \\ {q_3} \\ \end{array}}} \right] ,\nonumber \\&X_i=\sum \limits _{j=1}^3 {a_{ij1} u_j}, Y_i=\sum \limits _{j=1}^3 {a_{ij2} u_j}, Z_i=\sum \limits _{j=1}^3 {a_{ij3} u_j},\nonumber \\&u_i=\sum \limits _{k=1}^3 {\sum \limits _{j=1}^3 {g_j {l}'_k a_{jki}}}, q_i\nonumber \\&\quad =\sum \limits _{k=1}^3 {\sum \limits _{j=1}^3 {l_j {c}'_k a_{jki}}}, i=1,2,3. \end{aligned}$$
(41)

Consider that \(a_{113}=0\). Finally, the Laguerre based FOPID controller design algorithm could be summarized as

Algorithm 2.

  1. a)

    Calculate \(s_{11}, s_{21}, s_{22}, s_{31}, s_{32}, s_{33}\) in (18) according to the Gram-Schmidt orthogonalization procedure in (10).

  2. b)

    Calculate \(l_i, {l}'_i, i=1,2,3\) according to (28) and (29) and \(g_i, i=1,2,3\) according to (19).

  3. c)

    Calculate \({c}'_i, i=1,2,3\) according to (39) and \(c_i , i=1,2,3\) according to (41).

  4. d)

    Calculate FOPID controller parameters \((k_c, T_i, T_d)\) according to (40).

4.3 Laguerre based FOPI and FOPID design for unstable plants

The proposed FOPI and FOPID controllers could be utilized to control unstable plants. To achieve this goal, the plant transfer function is written as

$$\begin{aligned} G(s)=\frac{p(s)}{q_s (s)q_u (s)} \end{aligned}$$
(42)

where p(s) is the numerator of G(s) and \(q_s (s)\) and \(q_u (s)\) are the stable and unstable parts of the denominator of G(s), respectively. The transfer function (42) could be rewritten in the following Laguerre series form

$$\begin{aligned} G(s)=\frac{\frac{p(s)}{q_s (s)(s^{v}+\lambda )^{r+1}}}{\frac{q_u (s)}{(s^{v}+\lambda )^{r+1}}}=\frac{\sum \nolimits _{i=1}^\infty {g_i \varphi _i (s)}}{\sum \nolimits _{i=1}^\infty {{g}'_i \varphi _i (s)}} \end{aligned}$$
(43)

where r is the degree of \(q_u (s)\) and \(g_i \), \({g}'_i\) are the Laguerre series coefficients of \(\frac{p(s)}{q_s (s)(s^{v}+\lambda )^{r+1}}\) and \(\frac{q_u (s)}{(s^{v}+\lambda )^{r+1}}\), respectively. Now, according to (25), relation (33) should be rewritten as

$$\begin{aligned}&\sum \limits _{i=1}^\infty {g_i \varphi _i (s)} \sum \limits _{i=1}^\infty {c_i \varphi _i (s)} \sum \limits _{i=1}^\infty {{l}'_i \varphi _i (s)}\nonumber \\&\quad =\sum \limits _{i=1}^\infty {l_i \varphi _i (s)}\sum \limits _{i=1}^\infty {{c}'_i \varphi _i (s)}\sum \limits _{i=1}^\infty {{g}'_i \varphi _i (s)}. \end{aligned}$$
(44)

Now, the FOPI controller parameters could be obtained from (34) in which \(c_1, c_2\) are calculated as

$$\begin{aligned}&\left[ {{\begin{array}{c} {c_1} \\ {c_2} \\ \end{array}}} \right] =\left[ {{\begin{array}{cc} {X_1}&{} {X_2} \\ {Y_1}&{} {Y_2} \\ \end{array}}} \right] ^{-1}\left[ {{\begin{array}{c} {q_1} \\ {q_2} \\ \end{array}}} \right] ,\nonumber \\&X_i=\sum \limits _{j=1}^2 {a_{ij1} u_j},\quad Y_i=\sum \limits _{j=1}^2 {a_{ij2} u_j},\nonumber \\&u_i=\sum \limits _{k=1}^2 {\sum \limits _{j=1}^2 {g_j {l}'_k a_{jki}}}, \quad q_i=\sum \limits _{k=1}^2 {\sum \limits _{j=1}^2 {{q}'_j {c}'_k a_{jki}}},\nonumber \\&{q}'_i=\sum \limits _{k=1}^2 {\sum \limits _{j=1}^2 {{g}'_j l_k a_{jki}}} i=1,2. \end{aligned}$$
(45)

For the FOPID controller case, relation (44) and (40) could be utilized, yet. But, relation (41) should be replaced with the following relation

$$\begin{aligned}&\left[ {{\begin{array}{c} {c_1} \\ {c_2} \\ {c_3} \\ \end{array}}} \right] =\left[ {{\begin{array}{ccc} {X_1}&{} {X_2}&{} {X_3} \\ {Y_1}&{} {Y_2}&{} {Y_3} \\ {Z_1}&{} {Z_2}&{} {Z_3} \\ \end{array}}} \right] ^{-1}\left[ {{\begin{array}{c} {q_1} \\ {q_2} \\ {q_3} \\ \end{array}}} \right] ,\nonumber \\&X_i=\sum \limits _{j=1}^3 {a_{ij1} u_j}, Y_i=\sum \limits _{j=1}^3 {a_{ij2} u_j}, Z_i=\sum \limits _{j=1}^3 {a_{ij3} u_j},\nonumber \\&u_i=\sum \limits _{k=1}^3 {\sum \limits _{j=1}^3 {g_j {l}'_k a_{jki}}}, q_i=\sum \limits _{k=1}^3 {\sum \limits _{j=1}^3 {{q}'_j {c}'_k a_{jki}}}, {q}'_i\nonumber \\&\quad =\sum \limits _{k=1}^3 {\sum \limits _{j=1}^3 {{g}'_j l_k a_{jki}}} i=1,2,3. \end{aligned}$$
(46)
Fig. 1
figure 1

The closed loop system unit step responses and control signals for Example 2

Finally, the following algorithm could be employed to design FOPI or FOPID controllers for unstable plants

Algorithm 3.

  1. a)

    Calculate \(s_{11}, s_{21}, s_{22}, s_{31}, s_{32}, s_{33}\) in (18) according to the Gram-Schmidt orthogonalization procedure in (10).

  2. b)

    Calculate \(l_i, {l}'_i, i=1,2,3\) according to (28) and (29) and \(g_i, {g}'_i, i=1,2,3\) in (43) using inner product approach.

  3. c)

    Calculate \({c}'_i, i=1,2\) for FOPI according to (32) and \({c}'_i, i=1,2,3\) for FOPID according to (39) and calculate \(c_i, i=1,2\) for FOPI from (45) and \(c_i, i=1,2,3\) for FOPID from (46).

  4. d)

    Calculate FOPI controller parameters \((k_c, T_i)\) according to (34) and FOPID controller parameters \((k_c, T_i, T_d)\) according to (40).

4.4 Optimum choice of the fractional order Laguerre basis function pole

The designed FOPI and FOPID controllers have three parameters: \(\eta , \omega _n, \lambda \). The parameters \(\eta \) and \(\omega _n\) could be selected to reach a good transient response. But, the free parameter \(\lambda \) should be selected to achieve the closed loop system stability and the best compliance with the desired step response in the presence of control signal constraints. Thus, the following constrained optimization problem should be solved

$$\begin{aligned}&\min :&J(\lambda )=\frac{\int _0^T {(y(t)-y_d (t))^{2}dt}}{\int _0^T {y_d^2 (t)dt}}\nonumber \\&s.t:&u^{-} {<}u(t){<}u^{+} \end{aligned}$$
(47)

where y(t) is the closed loop system step response, \(y_d (t)\) is the desired closed loop system step response, u(t) is the control signal, \(u^{+}\) and \(u^{-}\) are its upper and lower bounds.

This means that for the FOPI and FOPID controller design, an initial value for \(\lambda \) is selected. Based on this selection, the FOPI or FOPID controller parameters are calculated. These parameters could be employed to obtain the closed loop system step response y(t) and the performance index \(J(\lambda )\). Then, the value of \(\lambda \) is changed according to an optimization loop such that the minimum performance index \(J(\lambda )\) is obtained and the control signal constraints are satisfied. MATLAB FMINCON function is utilized to solve this constrained optimization problem.

5 Simulation results

To show the performance of the FOPI and FOPID controllers, some numerical examples are provided.

Example 2

Consider the following fractional order plant

$$\begin{aligned} G(s)=\frac{2}{s^{0.9}+1}. \end{aligned}$$
(48)

Considering \(u^{+}=2,u^{-}=-2,\eta =0.5, \omega _n=6\) and the obtained Laguerre function pole \(\lambda =2\), yields the following FOPI controller transfer function

$$\begin{aligned} C(s)=1.6258\left( 1+\frac{1}{0.4521s^{0.9}}\right) . \end{aligned}$$
(49)

With the same values of \(\lambda , \omega _n\), the Laguerre function pole value for the FOPID controller is obtained as \(\lambda =1.5\). This leads to the following FOPID transfer function

$$\begin{aligned} C(s)=2.1927\left( 1+\frac{1}{0.7136s^{0.9}}-0.0785s^{0.9}\right) . \end{aligned}$$
(50)

Figure 1 compares the closed loop system unit step response obtained from the FOPI and FOPID controllers with the desired one. The FOPID shows superior performance comparing with the FOPI controller. Moreover, the control signal constraints are fulfilled.

Fig. 2
figure 2

The closed loop system unit step responses and control signals for Example 3

Fig. 3
figure 3

The closed loop system unit step responses and control signals for Example 4

Example 3

In this example, a fractional order plant with one zero and two poles is considered

$$\begin{aligned} G(s)=\frac{2(s^{1.2}+4)}{(s^{1.2}+1)(s^{1.2}+5)}. \end{aligned}$$
(51)

For the FOPI controller, considering \(u^{+}=2,u^{-}=-2,\eta =1, \omega _n=4\) yields \(\lambda =0.1\). This leads to the following FOPI controller

$$\begin{aligned} C(s)=1.0589\left( 1+\frac{1}{0.7715s^{1.2}}\right) . \end{aligned}$$
(52)

If the similar values for \(\lambda , \omega _n\) are considered for the FOPID controller, then \(\lambda =1.5\) will be obtained. The corresponding FOPID controller is given by

$$\begin{aligned} C(s)=0.9361\left( 1+\frac{1}{0.6944s^{1.2}}-0.1146s^{1.2}\right) . \end{aligned}$$
(53)

The obtained closed loop system unit step responses for the FOPI and FOPID controllers are compared with the desired step response in Fig. 2. As could be seen from Fig. 2, the step response obtained from the FOPID controller is closer to the desired step response comparing with the corresponding one obtained from the FOPI controller. Moreover, the obtained control signals are in the permissible range.

Example 4

In this example, the following unstable integer order plant is considered

$$\begin{aligned} G(s)=\frac{10}{5s-1}. \end{aligned}$$
(54)

Considering \(u^{+}=6,u^{-}=-1,\eta =1, \omega _n=26.35\) and \(\lambda =3.7\) gives the following PI controller

$$\begin{aligned} C(s)=5.77\left( 1+\frac{1}{31.67s}\right) . \end{aligned}$$
(55)

With similar values for \(\lambda , \omega _n\) and \(\lambda =11.95\) the following PID controller is obtained

$$\begin{aligned} C(s)=6.01\left( 1+\frac{1}{6.81s}-0.011s\right) . \end{aligned}$$
(56)

The comparison between the desired step response and the closed loop system step response obtained from the PI and PID controllers are given in Fig. 3. As expected, in the PID controller case, the step response is more similar to the desired step response. In addition, the control signals given in Fig. 3 are admissible.

6 Conclusions

The orthonormal Laguerre basis functions obtained from a Gram-Schmidt orthogonalization approach are employed to design FOPI and FOPID controllers for commensurate fractional order systems. The simulation results show the effectiveness of the proposed controllers. The best transient response quality based on integral square error performance index in the presence of the control signal limitations is achieved. The design approach could be utilized for commensurate fractional order plants with real poles. Extending the proposed FOPI and FOPID methods for general commensurate fractional order systems could be considered as a future research topic. Designing Laguerre based FOPID controllers for the commensurate fractional order systems with commensurate order smaller than half is another future work. The FOPD controller could be designed in the similar manner, too.