PSO Optimization of the Controller Parameters for an Inherently Unstable Attraction Type Levitation System

Optimization of the controller parameters with a comparative analysis approach for a double I core actuator based inherently unstable DC attraction type levitation system (DCALS) is presented here since the classically designed controllers play a very critical role for suspension in air with no visible means of support. Here the proposed system suspends a cylindrical rod under two I core actuators to achieve pitching control of the suspended rod with single degree of freedom movement control, which is a useful application in precision instrumentation. Proposed controllers which are typically employable for suspension purpose are the classically designed controllers such as Lead or, Lead-Lag or, PID for a nominal operating air-gap (10 mm) have been optimized utilizing particle swarm optimization and a comparative analysis of the transient performances has been produced at nominal as well as off-nominal operating air-gaps (low and high). Optimization algorithms are implemented inside the MATLAB software environment. The particle swarm optimization algorithm is found to be more competent in finding optimal results. KeywordOptimization, DC attraction type levitation system (DCALS), particle swarm optimization (PSO), transient performance.

I. INTRODUCTION DC attraction type levitation system (DCALS) is inherently unstable and strongly non-linear in nature ( [1], [2]). A DCALS may be linearised for an operating air-gap and the linearised system can be stabilized using conventional classical controllers. Two I core actuator based magnetic levitation system has been proposed to suspend one cylindrical rod in air. To achieve stable suspension of the rod, linearised modeling of the system has been developed at different operating air-gaps and accordingly some conventional classical controllers (Lead, Lead-Lag, PID, PI plus Lead) have been implemented. Resulting controllers have been tuned by extremely tedious and time consuming 'trial and error' process on the 's'-plane utilizing root-locus design concept. Here, the Ziegler-Nichols tuning rule for PID controller tuning, failed straight away since the plant has one zero in the RHS of 's'-plane. It has been found that these controllers provide satisfactory performance in the neighborhood of operating point and performance degradation occurs as the operating point is changed. It becomes difficult for the controllers to maintain stability if there is wide variation of operating air-gap. Due to the inherent nonlinear nature of the system, the uncertainty in the nominal linearised model increases as one move away from the nominal operating point. As a result, the controller becomes practically invalid for large variations of the operating air-gap. But from implementation point of view there is an urgent need to enhance the capability of the controller so that the prototype can stably levitate over a large air-gap variation. One possible solution that is mostly reported in the literature is the design of a non-linear controller by considering the non-linear model of the system, and feedback linearizing controller ( [3], [4]) is normally chosen. But finding the exact non-linear model of the maglev system as well as design and implementation of the controller is not an easy task ( [28]- [30]).
Thus an optimization scheme for the proposed DCALS has to be developed so that the prototype may stably operate over a wide area maintaining good performance. For the tuning of controller parameters to get optimized performance a soft-computing technique (i) Particle Swarm Optimisation (PSO) have been implemented in this part of work and a comparative insight is given with Genetic Algorithm (GA).
GA ([5], [6]) and PSO ( [7], [8]) belonging particularly to the family of soft-computational algorithms which have been widely used in many control engineering applications. Soft-computation techniques have drawn much attention as optimization methods in the last two decades. From the optimization point of view, the main advantage of the aforesaid techniques is that they do not have much mathematical requirements about the optimization problems. All they need is an evaluation of the objective function ( [12]- [17]). They are powerful optimization algorithms that work on a set of potential solutions, which is called population and swarm respectively. GA and PSO find the optimal solution through cooperation and competition among the potential solutions ( [12]- [17]). PSO shares many common points with GA. Both algorithms start with a group of a randomly generated population, both have fitness values to evaluate the population. Both update the population and search for the optimum with random techniques. Both systems do not guarantee success. However, PSO does not have genetic operators like crossover and mutation. Particles update themselves with the internal velocity. They also have memory, which is important to the algorithm. Compared with GAs, the information sharing mechanism in PSO is significantly different. In GAs, chromosomes share information with each other. So, the whole population moves like a one group towards an optimal area. In PSO, only gBest (global best) or, pBest (local best) gives out the information to others. It is a one way information sharing mechanism. These algorithms are highly relevant for industrial applications, because they are capable of handling problems with nonlinear constraints, multiple objectives, and properties that frequently appear in real-world problems [9].

II. DCALS MODELING
The system is composed of I core magnets as one is shown in Fig.1. It is seen what are the external forces acting on the suspended object and how the free-body diagram is being depicted herein to obtain the mathematical model. Fig.2 is showing the overall control scheme for the system where decoupled control is applied to achieve independent control of both the actuators. The force of attraction between a ferromagnetic mass and the magnet is non-linear. The force expression is given by Where, is the current through the coil and is the inductance of the coil at a particular value of air-gap length . The negative sign in the above expression indicates the direction of the generated force. The force is attractive in nature and attempts to decrease the gap length. The suspended steel mass contributes to the inductance of the electromagnet coil. As the body approaches the magnet, the magnet-coil inductance goes up. As the mass moves farther from the magnet, the inductance decreases, reaching a minimal value when the mass is too far. The inductance variation with distance for one system is shown in Fig.3. The inductance ) (x L has its largest value when the object is next to the coil and decreases to a constant value C L (this is the inductance of electromagnet-coil in the absence of the levitated object) as it is moved to x = ∞ , for the present purpose (considering operating air-gap in the medium zone) the overall inductance may be approximated as ( [10], [11]) where, 0 L is the inductance at the operating air gap of 0 x (equilibrium position), Now putting the inductance value from Eqn.2 into the force Eqn.1 one can write: where, 2 The dynamics of the object under electromagnet is given by the following equations From Eqn.3 and Eqn.5, The system dynamic equations are thus nonlinear and hence difficult to analyze. So the equations are linearised about a suitable operating point ( ) Neglecting higher order terms in Eqn.7, From Eqn.4 and Eqn.8, Taking Laplace transform on both sides of Eqn.9 and after rearranging, the transfer function of the magnetic levitation system is, III. THE CONTROL AND OPERATION Referring to the Fig. 2 herein, where the block diagram of individual unit of the DCALS is shown. Through MATLAB m-file coding [31] the model has been implemented successfully. In each case the current of the electromagnet is controlled through the DC to DC switch mode chopper circuit utilizing an outer position control loop and an inner current feedback control loop. When the two electromagnets are simultaneously excited, a net attractive force is generated between the magnet pole-faces and the ferromagnetic rod, as a result of which the magnets try to pull up the complete ferromagnetic rod. The dedicated independent controller used for each magnet tries to control the air-gap between that magnet pole-face and the cylindrical rod by maintaining the required current in the corresponding magnet-coil. With each magnet cum controller unit working satisfactorily, each side of the cylindrical rod gets the desired vertical lift and in the process the whole cylindrical rod is levitated. Since the electromagnetic levitation system is inherently unstable, the selection and design of the controller is important so that the overall closed loop system becomes stable and gives satisfactory performance. A cascade compensator is used with the position control loop for maintaining overall closed loop stability. The conventional classical controllers (Lead, Lead-Lag, PID) for the DCALS is optimized to achieve satisfactory performance over a wide range of operating air-gaps of suspension ( [28]- [30]).

IV. PARTICLE SWARM OPTIMISATION (PSO) IMPLEMENTATION
The parameters of the Lead, Lead-Lag and PID controllers were optimized using GA by Bhaduri and Banerjee [18]. Those results are now being tallied herein with PSO results as the PSO can converge to the near optimal solution in many problems where most analytical methods fail to converge.
Generally, PSO is characterized as a simple concept, easy to implement, and computationally efficient. Unlike the other heuristic techniques, PSO has a flexible and well-balanced mechanism to enhance the global and local exploration abilities [20].
PSO has some advantages over other similar optimization techniques such as GA, which are as follows ( [21], [22]): 1) PSO is easier to implement and there are fewer parameters to adjust.
2) In PSO, every particle remembers its own previous best value as well as the neighborhood best; therefore, it has a more effective memory capability than GA.
3) PSO is more efficient in maintaining the diversity of the swarm ( [23], [24]) (more similar to the ideal social interaction in a community), since all the particles use the information related to the most successful particle in order to improve themselves, whereas in GA, the worse solutions are discarded and only the good ones are saved; therefore, in GA the population evolves around a subset of the best individuals. Compared with GA, all the particles in PSO tend to converge to the best solution quickly, even in the local version in most cases.
In the PSO algorithm each individual is called a "particle", and is subject to a movement in a multidimensional space that represents the belief space. Particles have memory, thus retaining part of their previous state. There is no restriction for particles to share the same point in belief space, but in any case their individuality is preserved. Each particle's movement is the composition of a previous velocity and two randomly weighted influences: individuality, the tendency to return to the particle's best previous position, and sociality, the tendency to move towards the neighborhood's best previous position. The flow chart for PSO is as follows The modified form of PSO algorithm has been implemented [24] for better convergence. For proper convergence the acceleration coefficients (constants) should be set sufficiently high, but higher acceleration coefficients result in less stable systems in which the velocity has a tendency to explode, therefore, to fix this problem, the velocity v i is usually kept within the range [-vmax, +vmax], but still neither limiting the velocity necessarily prevents particles from leaving the search space, nor it helps to guarantee convergence. An inertia weight 'w' is introduced to control the velocity explosion. Now, if w, c 1 and c 2 are set correctly, this update rule allows for convergence without the use of vmax. The inertia weight can be used to control the balance between exploration and exploitation [24]:  w ≥ 1: velocities increase over time, swarm diverges  0 < w < 1: particles decelerate, convergence depends on c 1 and c 2 Essentially, this parameter 'w' controls the exploration of the search space, therefore an initially higher value (typically 0.9) allows the particles to move freely in order to find the global optimum neighborhood fast. Once the optimal region is found, the value of the inertia weight can be decreased (usually to 0.4) in order to narrow the search, shifting from an exploratory mode to an exploitative mode. Commonly, a linearly decreasing inertia weight (first introduced by Shi and Eberhart ([25], [26]) has produced good results in many applications; however, the main disadvantage of this method is that once the inertia weight is decreased, the swarm loses its ability to search new areas because it is not able to recover its exploration mode. In the present approach the constant inertia weight factor has been implemented and the velocity of each particle is adjusted according to its own flying experience and the other particles flying experiences. For example, the i th particle is represented as The best previous position of the i th particle is recorded and represented as: Pbest i = (Pbest i,1 , Pbest i,2 ,..., Pbest i,d ). The index of the best particle among all the particles in the group is gbest d . The velocity for particle i is represented as v i = (v i,1 , v i,2 ,….,v i,d ). The modified velocity and position of each particle can be calculated using the current velocity and the distance from Pbest i,d to gbest d as shown in the following formulae ( [19], [24], [27]): where, K is the controller gain which is d-dimensional matrix and β is the weighting factor. P M is the percentage overshoot, SS E is the steady-state error, S t is the settling time, r t is the rise time. Normally, the desired performance can be achieved implementing this performance criterion W(K) by choosing a proper value of the weighting factor β. The optimum selection of β depends on the designer's requirement and the characteristics of the plant under control. To reduce overshoot and steady state errors, β could be set higher than 0.7 and to reduce rise time and settling time it is to be set lower than 0.7; for the present work β is taken as 0.8 ([19], [27]). The termination criteria have been considered to be the attainment of the maximum number of iterations at 100.

V. RESULTS AND DISCUSSIONS
It is aimed to optimize the parameters for classical Lead, Lead-Lag and PID controller designed at 10 mm operating air-gap (nominal gap) of the proposed DCALS utilizing PSO. It is customary to 'acid test' the optimization strategy with a most basic, conventional and proven algorithm such as the GA before proceeding towards PSO. Earlier by Bhaduri and Banerjee [18] GA results were produced which now necessitate a comparative analysis with PSO.
Motivation is to operate that optimized controller of the mid-gap zone into the very low gap zone as well as higher gap zone with satisfactory transient performance criterions.  Fig.5. It is seen that PSO based optimized nominal controllers have been demonstrated with better transient performance than corresponding classical Lead controllers over a large variation of air-gap (3 mm to 17 mm). It is to be mentioned that Lead controller cannot reduce steady-state error. Again percent overshoot and steady-state error are the two conflicting parameters, so while doing optimization of controller parameters it is aimed to improve transient performance sacrificing little bit steady-state accuracy. Table 1 shows a comparative position response of DCALS with classical, GA and PSO based nominal Lead controllers while operating at nominal and other offnominal (low and high) air-gaps. It is obvious that the PSO algorithm is more competent in finding optimal results than GA. PSO based Lead controller reduces overshoot with faster transient performance (less rise time). Due to obvious reasons (as mentioned), steady-state error are relatively more in position response with optimized controllers (GA and PSO) than the response obtained with classical conventional controllers. Table 2 shows the comparative parameters of Lead Controller at 10 mm gap.  Fig.6 shows comparative position responses of the proposed DCALS with classical and PSO based nominal PID controller operating at nominal and other off-nominal (low and high) air-gaps. It is clear that PSO based optimized nominal PID controller (designed for 10 mm air-gap) has shown better performance than corresponding conventional classical PID controller irrespective of any operating air-gap. Table 3 shows a comparative position response of DCALS with classical, GA and PSO based nominal PID controllers while operating at nominal (10 mm) and off-nominal (low and high) air-gaps. It is seen that PSO based optimized nominal PID controller shows excellent performance (both in transient and steady-state) over a large operating air-gap (3 mm to 17 mm). The comparative parameters of PID Controller at 10 mm gap are shown in Table 4.  Similarly, a comparative position responses of the proposed DCALS with classical and PSO based nominal Lead-Lag controller operating at nominal and other off-nominal (low and high) air-gaps is shown in Fig.7. It is clear that PSO based optimized nominal Lead-Lag controller (designed for 10 mm air-gap) has shown better performance than corresponding conventional classical Lead-Lag controller irrespective of any operating air-gap.
A comparative position response of DCALS with classical, GA and PSO based nominal Lead-Lag controllers while operating at nominal (10 mm) and off-nominal (low and high) air-gaps. From the results of Table 5, it is clear that PSO based optimized Lead-Lag controller shows better transient performance (not in steady-state) than corresponding classical and GA based controllers. It is to be mentioned that with the use of Lead-Lag controller steady-state error cannot be reduced to zero. Table 6 shows comparative parameters of Lead-Lag Controller at 10 mm gap.   A comparison between the position responses of DCALS at nominal operating air-gap with conventional classical, GA and PSO based Lead, Lead-Lag and PID controller are shown in Fig.8, Fig.9 and Fig.10 respectively. It appears that PSO based PID controller shows the best performance at the desired operating airgap. The similar comparative results already been tabulated in Tables 1, 3 and 5 respectively. Fig.11 displays the convergence of the objective function with respect to iterations in case of PSO based PID controller, which depicts that PSO convergence is much faster than that of GA. Here convergence towards optimal solution occurs after 20th iterations. VI. CONCLUSION In this work, the parameters for different classical controllers (Lead, Lead-Lag, and PID) of the proposed DCALS at nominal operating air-gap have been optimized utilizing PSO. A comparative study has been made between the performances of classically designed and the optimized controllers at nominal as well as offnominal operating air-gaps (low and high). It is seen that optimized controllers have shown satisfactory dynamic performance over a large variation of air-gap (3mm to 17 mm), whereas there is a sharp deterioration of performance with the change of operating point in case of conventional classical controller.
It is concluded that the PSO algorithm is more competent in finding optimal results than GA. PSO based controllers not only reduces the overshoot but also makes transient performance faster than both classical and GA based controllers.