PSO-based Optimal PID Controller for Twin Rotor MIMO System

Optimum design methods based on soft computing have proved their excellence in industrial automatic control systems. In this paper, a proposed system is presented to treat the tuning of proportional, integral and derivative (PID) controller parameters to control the behavior of the Twin Rotor Multi-Input-Multi-Output (MIMO) System (TRMS). The system can be decoupled into two paths the main and the tail. The use of Particle Swarm Optimization (PSO) algorithm for tuning the controller parameters aims to get a stable control system. The simulation results reveal significant improvements in the step response characteristic such as reducing the steady state error, rise time, settling time and the number of overshoots in position control of the TRMS. Thus, the PSO based PID controller in this system proves better performance compared to the traditional existing PID one.


INTRODUCTION
The Twin Rotor Multi-Input-Multi-Output System (TRMS) in control laboratories serves as a model for a helicopter and it illustrates the principle of Multi-Input-Multi-Output (MIMO) systems with nonlinear characteristics and cross coupling. The angle of attack of the two rotors is fixed and the speeds of motors are used to control the aerodynamic forces [1].
The PID controller is used to control the behavior of the TRMS. Thus, the closed loop control system of both the main and the tail rotor contain a PID controller. The nonconventional methods of control have also been applied to TRMS such as neural networks, fuzzy logic and genetic algorithms to enhance the performance of the system [2].
Nowadays, the PSO method is widely used thanks to its simplicity, low computational cost and reliability of its results. The motivation behind using PSO technique in tuning of PID parameters is to enhance the response of the mathematical model of the system. It is one of the techniques that recently used for optimization purposes. It can be considered as a kind of evolutionary computation technique which is derived from research on swarm such as fish schooling and bird flocking for competition of food. In this algorithm, instead of using evolutionary operators such as mutation and crossover to manipulate algorithms, a flock of particles are put into n-dimensional search space with randomly chosen velocities and positions knowing their best values. The velocity of each particle is adjusted according to its own flying experience and that of the other particles in the swarm.
It is well-known that PSO is a population based stochastic optimization algorithm developed by Kennedy and Eberhart in the mid nineties of the past century. It is inspired by the social behavior of fish schooling and bird flocking for finding food by cooperation and competition. The algorithm is initialized with a population of random solution, which is called particles, and each potential solution is also assigned with a random velocity [3].
The objective of this work is to design an optimal PID controller for the TRMS. It is considered as a challenging engineering problem due to TRMS complexity, nonlinearity and missing of some states. The coupling between the main and the tail rotors of the TRMS further increases the complexity.
In this paper, an optimal PID controller using PSO algorithm for the TRMS is developed. The use of such method to enhance the performance is more efficient in improving the step response characteristic such as reducing the steady state error, rise time, settling time and the number of overshoots in position control of the TRMS.
In the best of our knowledge the PSO method has not been used previously to optimize the parameters of the PID controllers of the TRMS.

PID Controller Overview
Since 1939, the PID controller has taken the major share (approximately 90%) of industrial automatic control systems despite the developments of intelligent controllers [2]. There are many well-known configurations of this controller such as Proportional (P), Proportional Integral (PI), Proportional Derivative (PD), and PID. The main function of PID controller is to provide a control signal depending on the error between the process output variable and the required set point [3]. The appealing features of this controller are simplicity, reliability, and well-known tuning methods such as Ziegler-Nichols method and Cooheen-Coon method. These tuning methods for the PID controllers lead to setting of the values of P, I, and D parameters.
The best set of the PID controller parameters must ensure an efficient performance of the closed loop control system. The parameters are adjustable and can be changed according to the process. If the process operating points are changed, then the parameters must be changed to new values and this needs a skilled operator to get an efficient performance [4].
The tuning of the PID controller is done by adjusting the gains of Kp, Ki, and Kd parameters. The required performance specifications such as stability margins, dynamic response for both transient and steady state are incurred by the best set of parameters. There are many criteria that can be used to find the best response of the control system. These criteria can be summarized as follows [5] where e(t) is the error signal.


Integral of Time multiplied by the Absolute of Error (ITAE) can be given by Integral of Square of Error (ISE) can be written as: Integral of Absolute of Error (IAE) is written as:


Integral of Time multiplied by Square of Error (ITSE) is written as:

PSO Algorithm
In this algorithm, particles fly around a multi-dimensional search space for adjusting its previous state and the state of its neighbors. The aim is to search for the solution space by swarming the individual towards the best fitting solution. Fitness function is specified for each solution to find the performance of each particle. The idea of modification of a searching for solution by using PSO is illustrated in Figure 1 [6].
The i-th particle in the population (swarm) can be represented by (5) In the d-dimensional search space. The velocity can be represented as (6) The best previous position of the i-th particle in the swarm can be given as (7) The best means optimal value in PSO and Gbest is the index of the best particle in the swarm. The adaptive rules of the velocity can be calculated as [7] (8) And the position is calculated as  Vi Pbest : Velocity based-on best position of particle.
Vi Gbest : Velocity of the particle based-on Gbest Group.
Each particle adjusts its trajectory towards the best solution. The fitness function evaluates the performance of particles to determine whether the best solution is incurred [8]. The performance index (PI) may be selected as one of that given in equations (1)-(4). The fitness function (f) is given by (10)

Related Work
The PSO algorithm is considered as one of the promising optimization technique in many fields due to its low computational cost, ease of implementation and efficient performance. The algorithm has been applied successfully to many applications. Several studies have explained the use of PSO in PID controllers. Some of those are briefly explained as follows: Zamani et al. [6] have employed the PSO algorithm to carry out the design of fractional order PID; whose derivative and integral orders are fractional numbers rather than integers; to an automatic voltage regulator. Mukherjee and Ghoshal [7] have used the PSO algorithm to find the optimal PID gains for a thermal power plant. They also compared both craziness based PSO and binary coded genetic algorithms tuning method.
Kim et al. [8] have proposed a tuning strategy for robust PID controllers based on the augmented Lagragian PSO approach. The problem of PID controller tuning satisfying multiple H∞ performance criteria is also considered. Kao et al. [9] have presented a design method for the self-tuning PID control in a slider-crank mechanism system by applying PSO algorithm.
Willjuice and Baskar [10] have considered the performance comparisons of evolutionary algorithms such as real coded genetic algorithm, modified PSO, covariance matrix adaptation evolution strategy and differential evolution on optimal design of multivariable PID controller design.
Chiou and Liu [11] have presented a design for fuzzy-PID controller using PSO based hybrid algorithm. Zhangjun and Kanyu [12] have proposed an optimal design of PID controller for temperature control in heating, ventilation and air conditioning systems using the PSO algorithm. Wang et al. [13] have discussed the use of PSO approach based on automatic tuning method of PID controller for the MIMO systems.

TRMS System
The TRMS is one of the systems that featured with high nonlinearity, complexity and it constrained with cross coupling between the two rotors the main and the tail. It resembles a helicopter in some aspects [14]. The system consists of two DC motors used to drive two perpendicular propellers which are joined by a beam. The beam is pivoted on its base in order to allow for free rotation in both horizontal and vertical planes [15]. Figure 2 depicts the schematic diagram of TRMS.

Fig. 2: Laboratory set up of TRMS system.
The position of the beam is controlled by applying the DC voltages to the motors. Two position angles are controlled, pitch and yaw angles. The angular momentum in steady state is balanced by a counter weight pendulum. It is difficult to design a suitable controller for the system due to cross coupling and nonlinear characteristic of the system. The block diagram of the TRMS is illustrated in figure 3. The derivation of the physical model of TRMS is illustrated in refs. [16][17].

Mathematical Model
For simplicity in analyzing TRMS, shown in Fig. 2, the system has been decoupled into two planes separately in order to achieve the optimal values of the system parameters. Hence, TRMS system can be described using the vertical and the horizontal planes separately as shown in Figs. 4 and 5, respectively.
For more details of the derivation of the models and their respective definition of constants and variables the reader can return to the Appendix and [18].
For simplification of work, two models have been developed for one degree of freedom (1DOF) for vertical and horizontal planes using system identification tool box of Matlab. The interaction between the two loops (vertical and horizontal) has not been taken into account in the derivation of the transfer functions.
The data is obtained from the real time experiments. The vertical path of the TRMS can be given as (15) where Gm is the transfer function of the vertical path.
The transfer function of the horizontal path Gt of the TRMS is given by (16)

TRADITIONAL PID TUNING METHOD
A lot of methods have been developed for adjusting the parameters of the PID controller such as Z-N a second method, Coohen-Coons method and Astrom and Haggland method [2] . The closed loop tuning method of Z-N is used and it depends on the ultimate value of gain Gu and ultimate period of oscillation Tu. The tuning rules for finding the gains of the PID parameters are given as The complete procedure can be found in [19]. The simulation results for using this method. Both vertical and horizontal planes of TRMS will be compared with that obtained from PSO method. The tuned parameters are summarized in Table 1. Table 1. PID parameters using Z-N second method.

PSO-TUNNED PID CONTROLLER
The PSO algorithm is applied to both models of TRMS described in Fig. 2 using (14) and (15) individually. The PID parameters are optimized for each case. Figure 6 shows the block diagram of using PSO algorithm for tuning the PID parameters as a general scheme for tuning PID by PSO. The error value is used to calculate the PI and the fitness function is then used to tune the parameters of the PID controller according to PSO algorithm which is discussed thoroughly in refs. [20][21][22][23].

TRMS Settings
The simulation results for PID controller based-on PSO algorithm is implemented by using Matlab/Simulink environment. Figure7 shows the Simulink representation of the tuning method using PSO algorithm for both the vertical and horizontal planes respectively.

Fig. 7: Implementation of PSO in Simulink.
The factors that are used in building the Matlab code are defined in Table 2. Meanwhile Table 3 summarizes the fitness function values required for different methods which have been defined in (1) to (4). The fitness function ITSE has been adopted in the simulation as shown in figure 7. Table 3. Different values of fitness function.
To achieve the optimal performance, the choice is done through the selection of the criteria and the PSO algorithm factors.
The results obtained is illustrated in figures 8-10 which show the best tuning of the PID controller parameters using the PSO algorithm.

PERFORMANCE EVALUATION
The results of the tuning method by using PSO are shown in the following figures. The change of PID parameters and their relative cost function for vertical plane of the TRMS system is illustrated in figures 9 (a-d). In this paper, a time domain criterion is used for evaluating the PID controller. A good step response that results in performance criteria minimization in the time domain can be obtained from a set of good controller parameters.
The parameters of the PID controller for three methods are summarized in Table 4 and for both horizontal and vertical planes of TRMS separately. The interaction effects due to cross coupling between the two planes; vertical and horizontal is not taken into account in the experimental and Z-N methods. In the PSO method, the interaction effect between the planes is embedded in the mathematical model, since the data for identification is taken experimentally from a real TRMS.

6.CONCLUSIONS
The decoupling control of the TRMS has been studied and proposed to apply the PSO algorithm to this nonlinear system. The nonlinear problem of TRMS is identified and system model has been developed. It has been shown that the system is able to be decoupled into horizontal and vertical planes.
Optimal parameters for the PID controller have been found using PSO algorithm. The models of the TRMS have been found from a real time experiment data. The models of the TRMS are found using system identification tool box of Matlab.
The results show that the PSO based PID controller can perform an efficient search to find optimal set of parameters. The performance of the system with PSO is proven to be better than the conventional method.