Mahmood: Digital Fractional Order PID Controller Design And

In this paper a special kind of PID controller has been designed and implemented which is called fractional order PID (FOPID) controller whose derivative and integral are fractional rather than integers. The FOPID controller has five parameters which have been tuned by using an intelligent particle swarm optimization (PSO) algorithm by minimizing the fitness function given as integral of time weighted absolute error (ITAE). The digital fractional order PID (DFOPID) controller in discrete time with suitable sampling period has been attained utilizing special approximation method called continued fraction expansion (CFE) that lead to convert the s domain transfer function into z domain using MATLAB tools. As a case of study the DFOPID controller has been designed and realized by software in C language on PIC microcontroller for DC motor as a position control. The results showed software fulfillment of DFOPID, with alike time domain performance of closed loop system for both continuous and discrete.


1-Introduction
In industries and manufactures were the process control especially position control mostly requires PID controllers as they are simple and easily tuned.The few parameters like proportional, integral and derivative actions may be tuned manually or self-adaptive tuned automatically.By using this controller, the time domain performance, like small percentage overshoot and small settling time can be obtained.Much publicized conventional tuning methods were developed using time domain approach by Zeigler and Nichol's in 1942 and frequency domain approach by Hagglund and Astrom in 1955 [1].By generalizing the derivative and integer orders, from the integer field to non-integer numbers, the fractional order PID (FOPID) control is obtained, the performance of the PID controller can be improved by using fractional order derivatives and integrals.The benefit of (FOPID) controller is flexible to design, more robust [2].The most important advantages of the fractional order PID (FOPID) controller is the better control of dynamical systems and less sensitivity to changes in parameters of a control system [3,4].Calculus generation to fractional, was proposed by Leibniz and Hopital for the first time.After words, the systematic studies in this field by many researchers such as Liouville (1832), Holmgren (1864) and Riemann (1953) were performed [5].Podlubny has proposed a generalization of the PID controller as PI λ D μ controller which is known as fractional order PID controller, where λ is the non-integer order of integrator and μ is the non-integer order of the differentiator term, he also demonstrated that the PI λ D μ controller has better response than classical PID controller [4].Many tuning techniques for obtaining the parameters of the controllers were introduced during last few decades.Tuning methods of PI λ D μ controllers are recent research subjects, the researchers oriented to the classical optimization and intelligent methods.In this paper the Particle Swarm Optimization (PSO) algorithm has been used to tune the parameter of PI λ D μ controller in order to get an optimum time domain specifications in which integral of time weighted absolute error (ITAE) has been minimized, where the five parameters (Kp, Ki, Kd, λ and μ) found directly by utilizing PSO algorithm.The key step in digital implementation of an FOC is the numerical evaluation or discretization of the fractional-order differentiator s α [2].The digital realization of the FOPID controller done by coding the discrete difference equation to PIC processor.

2-Fractional order controller (FOC)
A fractional order system is that system described by the following fractional order differential equation: where D αn = 0 , is called the fractional derivative of order αn with respect to variable t and with the starting point t = 0 , [6].The fractional order PI λ D μ controller can be described by the fractional order differential equation : Applying Laplace transform, the transfer function of the controller can be expressed by: The Figure (1) shows the control possibilities using a fractional-order PID controller, extending the four control points of the classical PID to the range of control points of the quarter-plane defined by selecting the values of λ and μ [2].
The direct discretization method using finite memory length expansion was given by Grünwald-Letnikov (GL) definition.In general, the discretization of fractional-order differentiator/integrator s ±α , (α ∈ R, where R is a real number), can be expressed by the generating function as s = w(z −1 ) .The discrete approximation of the (FOPID) controller of equation ( 3) can be expressed as: where Kp is a proportional constant, Ki is an integral constant, Kd is a derivative constant, λ is an integer order of integrator, μ is an integer order of the differentiator and w(z −1 ) is a generating function [7].

3-Particle swarm optimization (PSO) an overview
One of the update intelligent optimization technique is the particle swarm optimization that emulate the swarms of birds, fish, etc. to find the food.The main object of PSO is to solve the computationally hard Optimization problems, where it is a robust optimization technique based on the movement and intelligence of swarms and applied successfully to a wide variety of search and optimization problems.The PSO developed in 1995 by James Kennedy and Russ Eberhart.The algorithm adopted uses a set of particles flying over a search space to locate a global optimum, where a swarm of n particles communicate either directly or indirectly with one another using search directions, in each iteration of PSO, each particle updates its position depending on three components, and determines its velocity using, previous velocity, best previous position, and the best previous position of its neighborhood.Figure (2) illustrate the flow chart of PSO algorithm.The basic concept of PSO lies in accelerating each particle toward the best position found by it so far (pbest) and the global best position (gbest) obtained so far by any particle, with a random weighted acceleration at each time step, this is done by the equations ( 5) and ( 6): (5) X t+1 = X t + V t+1 (6) where: gbest = Global Best Position.pbest = Self Best Position.C 1 and C 2 = Acceleration Coefficients.W = Inertial Weight.Once the particle computes the new X t it then evaluates its new location.If fitness(X t ) is better than fitness (pbest), then pbest = X t and fitness (pbest) = fitness (X t ), in the end of iteration the fitness (gbest) = the better fitness (pbest) and gbest = pbest [8].

4-Design of PI λ D μ controller
In order to design the (FOPID) controller the five parameter (Kp, Ki, Kd, λ and μ) of the controller must be tuned or computed by optimization.The MATLAB simulation of a negative unity feedback control system for a plant shown in Figure (3), where the fractional order PID (FOPID) controller G c (s) implemented by using fractional control toolbox [9].The integral of time weighted absolute error (ITAE) has been chosen as objective function were applied to the plant of a permanent magnet DC motor with gearbox given as G(s) were simulation by Simulink in MATLAB toolbox.
The design FOPID controller given as: ( ) (7) and the plant transfer function given as: ( ) (8) that must minimized the given objective function:

-Particle Swarm Optimization (PSO) based tuning of FOPID controller
The PSO algorithm method has been implemented as M-file which interconnected to simulink model where the FOPID controller parameters are computed and fed to the GUI of the controller.The optimization performed with this initial parameter, number of particles (30), number of dimensions (5), maximum iteration (100), C 1 =1, C 2 =3, with the objective function (ITAE).The initial values of five parameters of the fractional order PID controller (Kp, Ki, Kd, λ and μ) will be generate in PSO program and submitted in simulation diagram in figure (3) and running the simulation automatically then compute the objective function (ITAE) and go back with value of (ITAE) to PSO program to improve the value of (Kp, Ki, Kd, λ and μ) and so on, in the end of iteration the five parameters of the fractional order PID controller (Kp, Ki, Kd, λ and μ) has been obtained directly according to the minimum value of objective function (ITAE).The obtained results shown in the table (1).The unit step response of the system illustrated in figure (4).The response of the system gives valuable information such as Maximum overshoot (M o.s %), rise time ( T r ), peak time ( T p ) and settling time (T s ).It can be observed from the table (2).

System with Tuning Method and Controller
Step Response Specification Rise time (second) (T r ) Settling Time (second) (T s ) PSO Algorithm, (FOPID) 0.008 0.0178 The continuous transfer function of the (FOPID) controller in equation ( 7) can be expressed as:

6-Digital realization of (FOPID) controller
In general, there are two discretization methods: direct discretization and indirect discretization.In indirect discretization methods, two steps are required [2], i.e. frequency domain fitting in continuous time domain first and then discretizing the fit s-transfer function.Other frequency-domain fitting methods can also be used but without guaranteeing the stable minimum-phase discretization.Existing direct discretization methods include the application of the direct power series expansion (PSE) of the Euler operator, continuous fractional expansion (CFE) of the Tustin operator, and numerical integration-based method [2].The Tustin operator-based discretization scheme exhibits large errors in high-frequency range [2].
A new mixed scheme of Euler and Tustin operators is proposed in [10] which applies the Al-Alaoui operator [11].By using this method the discrete transfer function approximating fractional order operators can be expressed as: where T is the sampling period, P and Q are polynomials of degrees p and q, respectively, in the variable z -1 .
The continuous transfer function of (FOPID) controller which is given in equation ( 10), has been transformed to discrete transfer function implementing equation (11) and with sampling period T=0.001 second, the form in equation ( 12) is got: The difference equation corresponding to the controller discrete transfer function in equation ( 12

7-Conclusion
The FOPID is a special type of conventional controller but with non-integer integration and differentiation order .The controller can be realized in both continuous and discrete time system.The tuning of the parameters have to be chosen to work as satisfactory controller for a given system.The intelligent optimization PSO method has been utilized to tune the FOPID controller for five parameters successfully.The digital FOPID controller can be realized by transform s to z, the obtained transfer function of the controller has been converted to difference equation and coded by PIC software in C language which loaded to PIC memory of microprocessor.The time response for both continuous and discrete time is identical, due to selecting suitable sampling period.The time domain performance for the system exhibits a like response for both continuous and discrete time system.The benefit of FOPID controller it is more robust and wide range tuning with wide band frequency, and improvement in time domain response of the system.