Performance Evaluation of Pole Placement and Linear Quadratic Regulator Strategies Designed for Mass-Spring-Damper System Based on Simulated Annealing and Ant Colony Optimization

This paper investigates the performance evaluation of two state feedback controllers, Pole Placement (PP) and Linear Quadratic Regulator (LQR). The two controllers are designed for a Mass-Spring-Damper (MSD) system found in numerous applications to stabilize the MSD system performance and minimize the position tracking error of the system output. The state space model of the MSD system is first developed. Then, two meta-heuristic optimizations, Simulated Annealing (SA) optimization and Ant Colony (AC) optimization are utilized to optimize feedback gains matrix K of the PP and the weighting matrices Q and R of the LQR to make the MSD system reach stabilization and reduce the oscillation of the response. The Matlab software has been used for simulations and performance analysis. The results show the superiority of the state feedback based on the LQR controller in improving the system stability, reducing settling time, and reducing maximum overshoot. Furthermore, AC optimization shows significant advantages for optimizing the parameters of PP and LQR and reducing the fitness value in comparison with SA optimization.

Annealing . This paper examines the performance evaluation of two strategies to design state feedback controllers, Pole Placement (PP) and Linear Quadratic Regulator (LQR), for an MSD system to stabilize the mass position to the desired input. The system consists of two masses, two springs, and one damper. The objective is to control the position of the second mass when the first mass is subject to the input force. To overcome the drawbacks of the trial and error in the selection process of the controller tuning parameters, two meta-heuristic optimizations, Simulated Annealing (SA) optimization and Ant Colony (AC) optimization, are utilized to optimize the feedback gains matrix K of PP and the weighting matrices Q and R of the LQR to make the MSD system reach stabilization and reduce the oscillation of the response. The SA and AC algorithms have been adopted by many authors as a controller-tuning technique for the PID controller, for SA Exploring the ability of SA and AC algorithms to find the best value of feedback gains matrix K of the PP and the weighting matrices Q and R of the LQR can be considered another objective of this study. The software Matlab has been used for simulations and performance analysis.

INTRODUCTION
The remainder of this paper is organized as follows: modeling of the MSD system is given in Section2. Section3 describes the design of the PP and LQR controllers. Section4 explains SA and AC optimizations. In Section5, the performance evaluation of the two controllers (PP and LQR) based on both optimizations (SA and AC) is presented via simulations. The conclusions summarize in Section6.

SYSTEM MODELING
The mechanical system shown in Fig. 1 is considered in this study. The system consists of two masses, two springs, and one damper. The system is two degrees of freedom. The first mass is attached to a fixed wall via a spring with a stiffness factor (k 1 ) N/m and a damper with a damping factor (c) Ns/m. The two masses are coupled via a spring with a stiffness factor (k 2 ) N/m. The input force (P) N is applied to the first mass. The model assumed that both the springs and the dampers are linear with negligible spring weight. The system moves linearly in the direction of springs and dampers axes. The variable states of the system are the position (x 1 and x 2 ) and velocity (ẋ1 and ẋ2) of each mass. The objective is to control the position of the second mass x 2 when the first mass is subject to the input step force P.
The equation of motion that is related to the second mass m 2 is given by (Burns, 2001):

STATE FEEDBACK CONTROLLER DESIGN
Consider open loop system dynamics represent by the following single-input-single-output continuous linear time-invariant state-space equations: is n vector represents the state of the system, n is the number of states in the system, u(t) is a scalar refers to the control action to the system. The output of the system y(t) is a scalar, A is n × n matrix defines the dynamics between the derivative states ẋ of the system and the state x, B is n × 1 vector that defines the dynamics between the derivative states ẋ and the input u, C is m × n matrix defines the dynamics between the output y and the state x. D is m × 1 matrix defines the dynamics between the output y and the input u (AL-Khazraji et al. 2017).

Figure 2. State feedback controller configuration (Brogan, 1991).
State feedback controller is commonly used to improve the performance of the system. Often, the system matrices {A,B,C,D} cannot be changed by the designer to improve system performance. Therefore, a manipulation outside of the given open loop system needs to be added. In this study, two state feedback controllers based on pole placement (PP) and the linear quadratic regulator (LQR) are presented to stabilize the MSD system performance and minimize the position tracking error of the system output. State feedback controllers compute the control actions based on the states of the system. The assumption to design state feedback controllers is that the system completely states controllable (able to influence the system). Both controllers have the same structure, as shown in Fig. 2, where the control action is selected in the form of: ( ) = ( ) − ( ) (11) combining Eq. (9) with Eq. (11) gives: and combining Eq. (9) with Eq. (10) gives: is a vector of desired state. K is the state feedback gain matrix. F is the forward gain matrix used to scale the reference input r(t) (Brogan, 1991). However, the determination of the gains matrix K is different in both approaches.
For the Pole Placement (PP) strategy, the feedback gain matrix is selected in order to locate the closed loop poles of the system at "desired locations". On the other side, the concept of LQR is to find the optimal control action u * (t) that makes the system, given in Eq. (9) reach the steadystate and guarantee the performance index J takes a minimum value; the index J is given by ( Increasing the matrix Q value, the adjustment time of the system is reduced. Conversely, consumption of energy will be increased. The increase of the matrix R makes the energy consumed by the system less, but the adjustment time of the system increases (Fang, 2014).

META-HEURISTIC OPTIMIZATIONS
The design key of SF and LQR controllers is to find the right value of the adjusted parameters within each controller. Often, the selection of these parameters is based on trial and error. To overcome the drawbacks of using trial and error in the selection process, the tuning process in this study is formulated as an optimization problem. Then, two meta-heuristic optimizations, Simulated Annealing (SA) optimization, and Ant Colony (AC) optimization, are utilized to solve the problem.

Simulated Annealing Optimization
The Simulated Annealing (SA) algorithm is an optimization technique that mimics the physical process of thermal annealing. It was developed in 1983 by Kirkpatrick et al. The annealing process of material can be performed by introducing heat to the material and then cooling it slowly. The controlling of temperature reduction is based on the concept of Boltzmann's probability distribution. This concept states that the energy (E) of a given system in thermal equilibrium at temperature T distributes based on the following equation: ( ) = − / ( 1 5 ) where P(E) denotes the probability of obtaining the energy to the level E, K is the Boltzmann's constant. Eq. (15) shows that controlling the temperature T leads to controlling the simulated annealing process. In order to formulate this process into a minimization problem, let consider the current design to be g i with the corresponding value of the objective function f(g i ).
Based on the Metropolis method, the probability of the next design point g i+1 depends on the difference between the function values at the two design points, which is given by ∆ = ( +1 ) − ( ) ( 1 6 ) If the value of the function is reduced, ∆f < 0, then the new design has a lower function and is accepted as a point for the next step. However, if ∆f > 0, unlike most optimization algorithms, the point g i+1 cannot be accepted as the next point in the iterative process. In the SA algorithm, the move may still happen; here, the probability of jumping to higher energy depends on the current temperature T and the difference between the two functions value −∆f. The probability of accepting the point g i+1 is given by: ( 1 7 ) If the probability P(f) is greater than the random number between 0 and 1 (selected by the user), then the move is accepted. Otherwise it is rejected. The annealing process should be simulated effectively by lowering the temperature and repeating the same steps (Rao, 2009). The flow chart of the SA optimization procedure is given in Fig. 3.   Figure 3. Flow chart of SA optimization.

Ant Colony Optimization
The Ant Colony (AC) algorithm is an optimization technique that mimics real ant colonies' interaction and cooperation. It was developed by Dorigo et al. in 1996. The AC optimization constructs a solution for a given problem by exploiting pheromone information adapted based on the ants' search experience (Dorigo and Stützle, 2010; AL-MulaHumadi et al., 2018). The AC optimization consists of the following steps: for each iteration, ants explore each candidate solution of the problem and deposit a specific amount of pheromone. In the next exploration of ants (next iteration), the candidate with a higher density of pheromones, there is a higher probability that the ants select this solution. The probability of select a solution among a set of candidate solutions is given by: ( 1 8 ) where p j k is the probability of selection the solution j for the ant k. τ j is the amount of pheromone in the solution j. ∑ τ i N i=1 is the summation of pheromones of all candidate solutions. N is the total number of candidate solutions (population size). After all, ants constructed their solution, an evaluation process of the solution of each ant is applied. The pheromone of each candidate that has the best solution reinforce according to the following relations: = + ∑ ∆ ( 1 9 ) where ∑ ∆τ best k k indicates that the reinforcement is based on the number of ants with the best solution in the given iteration. The reinforcement factor is given by: where ξ is the scaling parameter. f best is the best objective found by the ants. f worst is the worst objective found by the ants. The pheromone of other ants evaporates according to the following equation: where ρ is the evaporate rate. This process is repeated until the maximum of iterations is reached (Rao, 2009). The flow chart of the AC optimization procedure is given in Fig. 4.

SIMULATION RESULTS
This section illustrates how the simulation was conducted. The Matlab software is used to perform simulations and evaluate the performance. The system parameters are selected as given in Table  1 (Salem and Aly, 2009). The objective is to control the position of second mass x 2 when the first mass subject to step input force P. Initially, the system performance was tested to the initial condition (the position of first mass x 2 was set to 0.5m) and to step input (the first mass of the system is subjected to unit step input). The two tests investigate the open loop dynamic performance of the MSD system. Fig. 5 and Fig. 6 indicate that the system has an oscillation frequency response (unstable). Therefore, two controllers (PP and LQR) are implemented to improve the dynamics of the system. Besides, two meta-heuristic optimizations (SA and AC) are utilized to find the best gains matrix K of the PP and Q matrix and R matrix of the LQR. The two controller configurations PP and LQR based on SA and AC optimization (PP controller based on SA optimization (PPSA), LQR controller based on SA optimization (LQRSA), PP controller based on AC optimization (PPAC), and LQR controller based on AC optimization (LQRAC)) are shown in Fig. 7.   Figure 5. System response to the initial condition. The cost function used to measure and improve the performance of the two controllers was built based on error criteria. A number of error criteria are available. In this paper controller's performance is evaluated in terms of Time Integral of Absolute Errors (TIAE) criterion which is given by: where t refers to the time period and e is the error. The error measures the deviation of the actual position of second mass x 2 from the desired input r. The TIAE criterion is a fit index to evaluate the system performance to eliminate steady-state error and improve settling time (Nemirsky and Turkoglu, 2017). The performance of the two controllers is compared in terms of settling time, maximum overshoot, steady-state error, and TIAE. In the case of SA optimization, the SA optimization parameters are given in Table 2. The values of the SA optimization are obtained experimentally. The experiments are performed repeatedly until the solution quality is improved. The simulations are carried out for PPSA and LQRSA, as shown in Fig. 8. The performance measured is summarized in Table 3. Table 2. SA algorithm parameters.

Initial temperature (T) 380
Reduction factor (c) 0.5 The probability of acceptance (p) 0.9 Boltzmann's constant (k) 1 Number of iteration 1000 Fig. 8 and Table 3 show that the system response with the PPSA controller has a higher settling time and a higher peak value compared to the system response with the LQRSA controller. In addition, the response with the LQRSA controller achieves zero steady-state compared to the response with the PPSA controller, where the system's response with the PPSA controller has a low oscillation frequency. As a result, the TIAE of the system with the PPSA controller is higher in comparison with the TIAE of the system with the LQRSA controller, as shown in Fig. 9. The set of the controller's parameters for the SFSA and the LQRSA are given in Table 4. Figure 8. System response to unit step input with PP and LQR controllers with SA optimization.  Table 4. Set of controller's parameters for PPSA and LQRSA.
In the case of AC optimization, the AC optimization parameters are given in Table 5. In the same way of selecting SA parameters, the values of the AC optimization are obtained experimentally. The experiments are performed repeatedly until the solution quality is improved. The simulations are carried out for LQRAC and PPAC, as shown in Fig. 10. The performance measured is summarized in Table 6.  Fig. 10 and Table 6 show that the system response with the PPAC controller has a higher settling time and a higher peak value in comparison with the system response with the LQRAC controller. Despite that both controllers archive zero steady-state, the TIAE of the system with the PPAC controller is still higher in comparison with the TIAE of the system with the LQRAC controller, as shown in Fig. 11. It can be noticed that LQRAC converges very fast. The set of the controller's parameters for PPAC and LQRAC controllers are given in Table 7.  Figure 10. System response to unit step input with PP and LQR controllers with AC optimization.   Weighting matrix R -0.012

CONCLUSIONS
In this paper, the problem of position control of a mass-spring-damper (MSD) system is considered. Two state feedback controllers (Pole Placement (PP) and Linear Quadratic Regulator (LQR)) were designed to improve the performance of the MSD system. The tuning process of the gains matrix K of the PP and the weighting matrices Q and R of the LQR was formulated as an optimization problem considering the Time Integral of Absolute Errors (TIAE) criterion as a performance index for the cost function. Moreover, two meta-heuristic (Simulated Annealing (SA) optimization and Ant Colony (AC) optimization) are developed to find the optimal solution that makes the MSD reach stabilization and reduce the oscillation in response to the input step. The simulation results show that the LQR reduced the settling time, maximum overshoot, and TIAE compared with the PP by 63.89%, 61.2%, and 73.91%, respectively, when the SA optimization handles the tuning process.
Furthermore, the LQR reduced the settling time, maximum overshoot, and TIAE compared with the PP by 64.3%, 60.6%, and 83.8%, respectively, when the AC optimization handles the tuning process. These results prove the superiority of the LQR over the PP. Finally, the results obtained from adopting AC optimization as a tuning technique for both controllers are more promising than SA optimization results. For future work, the nonlinearity in the spring and damper of the model could be considered. Furthermore, the research could be extended by utilizing another optimization technique to handle tuning the controller's parameters.