Application of a Modified PSO Algorithm to Self-Tuning PID Controller for Ultrasonic Motor

The ultrasonic motor (USM) has a heavy nonlinearity and time-varying characteristics which vary with driving conditions. Because of no-exact mathematical model of USM, it is difficult to control USM. PID controller can be designed without using the expression model of plant, but it is hard to compensate the nonlinearity and characteristic changes of USM. This paper presents a self-tuning scheme using a modified particle swarm optimization (MPSO) for PID controller to overcome the dynamic characteristics of USM. A modified PSO employs the strategy that nonlinearity decreases the value of inertia weight from a large value to a small value. This strategy is to improve the performance of the standard PSO in global search and fine-tuning of the solution. The effectiveness of the proposed method is verified by numerical simulation and experimental investigation. The results demonstrate that the proposed method can improve the accuracy of USM.


Introduction
The ultrasonic motor (USM) is a new type motor, which is driven by the ultrasonic vibration force of piezoelectric elements.USM has excellent features, such as compact size, light-weight, high position accuracy, silence operation, high torque even at the low speed, high retention torque, quick response, power off self-brake, and unaffected by external magnetic field.Therefore, USM is capable as an excellent actuator in many applications (1)(2)(3) .However, it is difficult to control USM because of no-exact model of USM.
Since the modern controls are hard to be applied on USM, PID controller has been widely used in USM applications (4)(5)(6)(7) .However, there are limitations of the control performance using the conventional fixed-gain type PID controller because USM causes serious characteristic changes during operation and contains non-linearity.In that case, it is difficult for the conventional one to compensate such characteristic changes and non-linearity of USM.
To overcome those problems, the research on self tuning of PID controller using an intelligent soft computing, such as Neural Network (NN) and Genetic Algorithm (GA), are proceeding.Nevertheless, there are still possibilities for PID gains easily to get stuck in a local minimum and very slow convergence.
Moreover, despite the simple algorithm in PSO compare to genetic algorithm, PSO is able to solve the nonlinear optimization problem efficiently.Although PSO has the characteristics of fast convergence, good robustness, strong commonality, and has been successfully applied in many areas, it has the shortcomings of premature convergence, low searching accuracy and iterative inefficiency, especially the problems involving multiple peak values, and it is likely to fall in local optima.In order to overcome the aforementioned limitations, many researchers have attempted to improve the PSO algorithm (14)(15)(16) .
In this work, a modified PSO which employs nonlinear decreasing of inertia weight was applied to optimize the PID parameters for a positioning control of USM.To show the effectiveness of our proposed method, the numerical simulation and the experiment in real system were compared with that of the previous methods (fixed-gain type PID and PSO with linear decreasing inertia weight based PID).

Particle Swarm Optimization
PSO is a population based stochastic optimization method using the concept of cooperation inspired by the behavior of organism, such as birds flocking, in search for food.
The outline for PSO is marked as follows.Let consider the optimization problem of maximizing the evaluation function f : M→M'⊂R for variable x∈M⊂Rn .Let there be N particles (mass point) on M dimensional space, where the position vector and velocity vector of i(= 1,2,3,....,N) th particle for k searching number are The best position for each particle in the evaluation function f(x) of x i 1 ,x i 2 ,…x i k searching point is represented as Pbi (Pbest), while the best position of f(x) in the searching point for the whole particle is represented as gb (gbest).The particles are manipulated according to the following recurrence equations: where w is the inertia weight; c 1 and c 2 are cognitive and social constant; R is uniform random numbers from the interval [0, 1]. ).The velocity vector of v i k+1 is formed based on three vectors as shown in Eq. ( 1).The first one is inertia vector, which is the vector from weighting factor w and the velocity vector v i k .The remaining two are vectors for each (P bi -x i k ) and (g b -x i k ), which formed from learning factor c 1 as well as c 2 , and also [0, 1] of uniform random numbers R. From those interactions, velocity vector v i k+1 act so that the particle moves to new position, x i k+1 .

The Proposed Modified PSO
An inertia weight is important parameters to balance the exploration (global search) and exploitation (local search) ability of PSO.This balancing is a key to improve the performances of PSO.However, the adjusting of inertia weight is still unclear and more need investigation.In previous research, a linear decreasing inertia weight (PSO-LDW) was introduced and was shown to be effective in improving the fine-tuning characteristic of the PSO for determining the gains of PID controller on USM (13) .In this method, the value of w is linearly decreased from an initial value (w max ) to a final value (w min ).
In this research, we will adopt the nonlinear decreasing of inertia weight method to enhance the ability of PSO and the adjustment of w is given as: ( ) where x is the nonlinear modulation index.
The value of x will determine the degree of non-linearity function of inertia weight.This method is known as PSO with nonlinear decreasing inertia weight (PSO-NDW).The effectiveness of PSO-NDW is used to determine the gains of PID controller for positioning control of USM in real system experiment.

Numerical Simulation
To evaluate the performance of the proposed algorithm and compare to the previous method (PSO-LDW), we herein take a 2-D Sphere function: where the global best solution for the above problem is zero which is achieved when x = 15 and y = 20.We decided to use 2-D Sphere function in order to display particle's "flying" process on the computer screen to get a visual understanding of the PSO performances.
For the purpose of comparison, all the simulation deploy the same parameter settings in both PSO-LDW and PSO-NDW, such as the maximum number of iterations, = 1.0; and the dynamic range for all elements of a particle is defined as (0, 50), that is, the particles cannot move out of this range in each dimension.For the Sphere function, the dimension is 2.
The nonlinear modulation index of PSO-NDW was varied as follows: 1.2, 1.5, 4, 7, and 10.Since PSO is a stochastic algorithm that randomly searches the best solution, so for testing we have done as much as 100 runs.
The influence of the different inertia weights for PSO algorithm with number of particles, n = 4 and 9, is listed in Table 1.In Table 1, the error shows an average error in 100 runs.In order to easy see the influence of the inertia weight and number of particles, the data of Table 1 can be converted into Figure 2. In the event that the number of particles is 4, the error becomes smaller when the inertia weight is 0.7.Other event that the number of particles is 9, the error becomes smaller when the inertia weight is 0.4.It means that in order to determine the value of the inertia weight should consider the number of particles.If the number of particles is a bit, we should use the higher inertia weight and vice versa.Also by using the more particles, the error will be smaller because the ability of searching and the probability to find the solution is greater.Consequently, the time calculation is longer.
For further simulation, we use the number of particles, n = 4.The influence of the different range of inertia weight for PSO-LDW algorithm with number of particles, n = 4, is listed in Table 2.In Table 2, PSO-LDW with the range of inertia weight from 0.9 to 0.4 shows the smaller error among other ranges.Moreover, the error of PSO-LDW with this range is smaller than the error of the standard PSO with inertia weight, w = 0.7.
Based on the Table 2, PSO-NDW algorithm also uses the range of inertia weight from 0.9 to 0.4.The influence of the different of nonlinear index number is listed in Table 3.It can be seen that the proposed PSO-NDW with nonlinear index number, x = 1.5, has smaller error among other nonlinear index number.Also, the error of PSO-NDW is smaller than the PSO-LDW.It means that the solution accuracy of the proposed PSO-NDW is better than the PSO-LDW.The result can be explained that the nonlinear modulation index is a new important parameter in PSO-NDW and the proper adjustment of x can significantly improve the performance of PSO.During searching process, all particles will try to approach a best solution and have a different distance to the best solution over iteration.The average distance of all the particles shows a pattern of spread of particles to find a solution.
We call it as dispersion.Figure 3 shows the dispersion of each method during iteration.The final dispersion of the PSO-NDW and the previous methods is listed in Table 4.It is clear that the particles of PSO-NDW have more aggressive to find the best solution.In Table 4, the success rate (SR) shows the success of particles in reaching a predetermined solution value within 100 runs.If the particles can reach this value or smaller then we can say it as success.
In this case, we used 1x10 -5 as a predetermined solution value.This facts show that the proposed PSO-NDW has higher success rate than other previous methods.
The convergence speed can be seen from the speed the particle that has the gbest value as shown in Figure 4. We can see that the convergence speed of the proposed PSO-NDW is faster than the previous methods.

Application of PSO-NDW in PID Controller
In this work, the PID controller was used as controller.It is comprised of three components: a proportional part, a derivative part and an integral part.The PID controller uses the following control equation: where the K p is proportional constant, K i is integral constant and K d is derivative constant.
The main problem in PID controller is tuning process to determine the gains K p , K i and K d .The performances of system depend on this process.Improper tuning will lead to unexpected performances.The tuning process is an optimization problem to obtain the best possible performances.The tuning process will be more complex for the plant which has nonlinear properties such as USM.The ability of PSO for solving the optimization problem can be applied to the case of determining the optimal PID parameters for a position control of USM.Design of the PSO-NDW tuned PID controller for USM is shown in Figure 5.In this system, three PID parameters (K p , K i , K d ) will be tuned automatically by PSO-NDW algorithm.Because there are three parameters that should be adjusted, the PSO-NDW algorithm has three dimensions and each particle of the algorithm is candidate solution of the PID parameters.The signal e(k) will be entered for PSO-NDW algorithm and subsequently evaluated in the fitness function to guide the particles during the optimization process.
The fitness function for the proposed method is given as: Fitness shows the following-up of evaluation function for the object input.The purpose is to decrease the steady-state error by maximizing the function.The fitness is updated by each millisecond according to the value of e(k).The USM control for clockwise (CW) rotation and the counter clockwise (CCW) rotation use the different PSO in tracking the object input.Since the characteristics of USM is different depends on the rotation direction, we evaluate both rotations separately.

Experiment Result
The USM servo system constructed in this study is shown in Figure 6.USM, the electromagnetic brake and the encoder are connected on a same axis.The position information from an encoder is transmitted to the counter board embedded into a Personal Computer (PC).Meanwhile, according to error resulted from the comparison between the output and reference signal, the control input signal which is calculated in PC is transmitted to the driving circuit through the I/O board and oscillator.In each experiment, the load is added or not is discussed to observe the changes of the USM's characteristics.While the voltage of 12 [V] is imported, the force of 0.25 [N.m] could be loaded to the shaft of the USM.
The specifications of USM servo system is shown in Table 5.

A Conventional Hand-Tuned PID Controller
Firstly, we used the conventional method for tuning PID controller on USM servo system.This method is introduced by Ellis [17] and called the zone-based tuning.It means that the low and high frequency parts of the controller can be tuned separately, starting with the high frequency part.For a PID controller, this means that first the P-and D-action are tuned and then the I-action.The procedure with steps to follow to tune a PID controller is given as follows: 1. Set K p low, while K i = 0 and K d = 0 2. Apply square wave reference at about 10% of the desired bandwidth.Use large amplitude, but avoid saturation.3. Raise K p for approximately 10% overshoot.4. Raise K d to eliminate most overshoot.5. Raise K i to eliminate steady-state We found that K p = 0.3692, K i = 12.175 and K d = 0.000085, for the best performance after many experiments.Then, we started on USM servo system with 10 runs of clockwise (CW) direction (i.e., +45 deg) and 10 runs of counter clockwise (CCW) direction (i.e., -45 deg) for no-load condition.After that, we repeat again for with load condition, i.e., 0.25 [N.m].       Figure 7 and 8 present the position accuracy of USM in histogram for no-load and with load condition.We can say that the position accuracy of USM using a hand-tuned PID is good and reliable in no-load condition, but becomes poor and inaccurate in with load condition.The gains have been determined previously only applicable to no-load condition.If the plant's behavior is changed (i.e., due to the loading), it is necessary to re-tune PID and it is drawback of the fixed-gain PID.

Self-Tuning PID Controller using PSO-NDW
The used parameters in PSO-NDW algorithm are as follows: particles number, n = 5; cognitive constant, c 1 = 1.0; social constant, c 2 = 1.0; maximum inertia weight, w max = 0.9; minimum inertia weight, w min = 0.4.Using the same test condition as before, the PSO-NDW algorithm will tune automatically to determine the optimal gains of PID controller.For comparison, we also used the common PSO method, called the PSO with linear decreasing inertia weight or PSO-LDW with same parameters.
Figure 9 shows the influence of the nonlinear index number.From this figure, the nonlinear index number is 1.5 gives the best result.So, based on this result, we used this value for the next experiment.
Figures 10-13 show the position accuracy of USM in histogram for no-load and with load condition.It can be seen clearly that self-tuning PID controller can compensate the characteristic changes of USM due to the loading effect.The gains PID are automatically adjusted according to the plant's behavior.Thus, the position accuracy of USM can be maintained still good and reliable even though there are the characteristic changes of plant.We also found that the CW direction's characteristic is slightly different from the CCW direction's characteristic.By using self-tuning, we can easily find the optimal gains of PID.Compared to a fixed-gain PID and PSO-LDW tuned PID, the PSO-NDW tuned PID have the frequency distribution of steady-state error tends towards zero error.

Comparison of the Average Steady-state Error
Table 6 shows the comparison of the proposed method and previous methods in term of average Ess and frequency of zero error in 20 runs.The self-tuned PID controllers (i.e., PSO-LDW, PSO-NDW) can outperform a hand-tuned PID or a fixed-gain PID.The average Ess of the PSO-NDW is smallest or 18.4% (no-load condition) and 50.34% (with load condition) lower than PSO-LDW (common strategy of PSO).Moreover, the frequency of zero Ess of PSO-NDW is more often than the previous methods.It means that the proposed method can improve the position accuracy of USM.

Comparison of the Average Steady-state Error
Figure 11 shows the fitness convergence characteristics of PSO-LDW and PSO-NDW.It seen clearly that the particles PSO-NDW achieve faster convergence than the previous methods.The particles of PSO-NDW achieved convergence in 0.23 seconds, while the particles of PSO-LDW achieved convergence in 0.27 seconds.

Conclusions
In this paper, the performances of a modified PSO with variation nonlinear decreasing inertia weight based PID controller have been investigated and extensively.The results are compared with the PSO with linear decreasing inertia weight based PID controller and the fixed-gain PID controller by experimenting on positioning control of USM.The nonlinear decreasing inertia weight concept has contributed to getting minimum fitness function and to quick convergence ability with better accuracy.In general, this concept has produced a great improvement in quick convergence ability and aggressive movement narrowing towards the solution region with different of nonlinear modulation index (x).The experiment results show that the nonlinear modulation index (x) plays an important role in searching for optimal solution in PSO-NDW.

Table 1 .
Error over inertia weight.

Table 2 .
Influence of the different range of the inertia.weight

Table 3 .
Influence of the nonlinear index number.

Table 6 .
Comparison of the average steady-state error.