Control strategy of maglev vehicles based on particle swarm algorithm

Taking a single magnet levitation system as the object, a nonlinear numerical model of the vehicle–guideway coupling system was established to study the levitation control strategies. According to the similarity in dynamics, the single magnet-guideway coupling system was simplified into a magnet-suspended track system, and the corresponding hardware-in-loop test rig was set up using dSPACE. A full-state-feedback controller was developed using the levitation gap signal and the current signal, and controller parameters were optimized by particle swarm algorithm. The results from the simulation and the test rig show that, the proposed control method can keep the system stable by calculating the controller output with the full-state information of the coupling system, Step responses from the test rig show that the controller can stabilize the system within 0.15 s with a 2 % overshot, and performs well even in the condition of violent external disturbances. Unlike the linear quadratic optimal method, the particle swarm algorithm carries out the optimization with the nonlinear controlled object included, and its optimized results make the system responses much better.


Introduction
Levitation control, as one of the most important techniques for electromagnetic suspension (EMS) vehicles, has been always drawing the worldwide experts' attentions and favors [1,2]. Due to the guideway flexibility, the magnet couples with the elastic guideway in dynamics when levitating on it. The vehicle and the guideway may vibrate intensively if the controller is designed inappropriately, which will affect the stable operation of maglev vehicles [3]. Increase of the guideway mass and its stiffness is the common engineering application to avoid the phenomena, but this will result in a substantial increase in the construction cost of maglev line, and severely restrain the promotion of maglev transportation [4,5]. Plenty of academics have been focusing on the problem of vehicleguideway coupling vibration in recent years and some progresses have been made. Lee et al. [6] established a model of guideway beam with the modal superposition method, and studied the influence of some factors on the levitation gap and the dynamic magnification factor, such as the vehicle speed, irregularity, guideway deflection ratio, span length, span continuity, and damping ratio. Yau [7,8] investigated the influence of girder settlement on the system dynamic characteristics when the maglev vehicle moves on a series of guideways. To suppress the selfexcited vibration, Zhou and Hansen [9] proposed a concept of a virtual tuned mass damper (TMD) that used an electromagnetic force to emulate the force of a real TMD acting on the girder. Wang et al. [10,11] investigated the disadvantages that the traditional maglev line structure brings to solve the vehicle-guideway coupling vibration, and proposed a new structure of maglev line system. However, the maglev vehicle-guideway coupling system is composed of a magnet and elastic guideways. In the levitation controller, if the feedback variables cannot reflect completely the system dynamic information, the acceptable dynamic properties of system are hardly obtained. The authors' recent studies [12,13] also indicated that the introduction of guideway kinematic information into the controllers is conductive to the system stability, and they developed the full-state-feedback controllers using the linear quadratic regulator (LQR) algorithm.
For the levitation control system, the controlled object is nonlinear. When the LQR algorithm is used, however, the controller parameters are calculated based on linearized models, which is different from the objective fact. Consequently, when the system deviates far away from the equilibrium point, the system performance may go worse. Furthermore, the index function in the LQR algorithm has to be expressed in the quadratic form, which brings great restrictions. Therefore, in this work, taking the nonlinear vehicle-guideway coupling system as the controlled object, we develop a controller with the full states feedback method and calculate the output with the full dynamic information. Then, the controller parameters are optimized with the particle swarm optimization (PSO) algorithm, and the nonlinear controlled object is included in the optimization process, which distinguishes it from the traditional linear optimization algorithm. In addition, a test rig for the elastic-track single magnetic levitation system is built, on which the effectiveness of the controlled strategy is verified.

Nonlinear controlled object
Due to the application of independent controllers and mechanical decoupling devices, the single magnet levitation system can be treated as the basic unit of maglev vehicles, and its stable levitation is the basis for the system to achieve stable operation. Hence, it is feasible to investigate the dynamic properties of maglev vehicles by studying the single magnet levitation system. The schematic diagram of a single magnet-guideway coupling system is shown in Fig. 1, in which the levitation magnet is treated as a lumped mass as its length is rather smaller than the guideway span.
In terms of the Newton's second law, the magnet dynamics equation can be written as where m 2 is the magnet mass, F denotes the force between the track and the supporting beam, and f d is the constant load acting on the magnet. The voltage across the electromagnet U can be expressed as where R is the coil resistance, n is the number of coil turns, I is the current in the coil, A N is the magnet working area, d is the levitation gap, and l 0 is the vacuum permeability. The electromagnetic force between the magnet and the guideway can be expressed as [14] F To analyze the dynamic properties of the vehicleguideway coupling system, the guideway is generally treated as a simply supported Bernoulli-Euler beam [15]. According to the modal superposition theory [16], its dynamic characteristics can be described by the product of the shape function and the generalized coordinate, as follows: where q i and D i are respectively the ith modal coordinate and the order shape function of the simply supported beam.
In the normal coordinate system, the guideway vibration differential equation can be expressed as where p i and n i denote the ith modal frequency and damping ratio, respectively. The guideway span is very large in engineering practice, and it is unrealistic to build a 1:1 maglev vehicle-guideway coupling vibration test rig in laboratory. In addition, it can only guarantee the similarity in the first natural frequency when a small proportional continuous beam is built to simulate a real guideway, but almost impossible in the high-order mode. According to the vibration theory of the continuous beam, the damping effect becomes much stronger, and more vibration nodes exist at high-order modes. Therefore, compared with the lower-order modes, the high-order modes contribute less to the integrated dynamic performances. Therefore, it is reasonable to describe the guideway dynamic behaviors using its firstorder mode, as shown by Eq. (6): Fig. 1 Vehicle-guideway coupling model of the single magnet Control strategy of maglev vehicles based on particle swarm algorithm 31 If multiplying D 1 D 1 6 ¼ 0 ð Þto the both sides of Eq. (6) and setting x 1 ¼ q 1 D 1 , we can derive the following equation to describe the vibration characteristics of the guideway midpoint: Making a further transformation to Eq. (7), we can obtain where Obviously, from Eq. (8), the single magnet-guideway coupling system can be simplified to a system as shown in Fig. 2. In this figure, the suspended track system, composed of the lumped mass and the spring-damping element, is used to simulate the vibration of the specified location on the guideway.
3 Design of the control system

Control strategy
The full-state-feedback control strategy, by calculating the controller output with the full information of the coupling system, is supposed to keep the system soundly stable. However, not all the state variables are measurable in engineering practices [17]. Therefore, taking the current signal and the levitation gap signal as the outputs, we try to derive full system states through the state observer and develop a full-state controller. If we suppose that x o and y o are the system state and output gained by state observer, and G is the feedback matrix of the output errors, the schematic of control system can be illustrated by Fig. 3. In Fig. 3, where P s and P I are the gap coefficient and current coefficient, respectively; g is the magnetic flux leakage; and L is the electrical inductance. The control strategy can be expressed by the following equation , and it is the controller and its elements are successively the track vertical displacement, the track velocity, the magnet displacement, the magnet velocity, and the current in the magnet coil.

Optimization of controller parameters
The vector k can be calculated using the LQR algorithm, but this kind of algorithm is based on some linearized models. Furthermore, the index function for the LQR algorithm has to be expressed in the quadratic form, which brings great restrictions. Therefore, we take the nonlinear vehicle-guideway coupling model as a part of the closed system and optimize the controller parameters using the PSO algorithm.
The PSO algorithm is a stylized representation of the movement of organisms in a bird flock or fish school. It works by having a population (called a swarm) of candidate solutions (called particles). These particles are  moved around in the search-space according to a few simple formulae. The movements of particles are guided by their own best known positions in the searchspace, as well as the entire swarm's best known positions [18].
If we suppose that the solution space is d-dimension and the number of particles is n, the present position and historical optimal position of the ith particle can be respectively expressed by two vectors: By setting the swarm's best position g ¼ g 1 g 2 Á Á Á g d ½ , we can update their positions and velocities according to the following two equations [19]: where the subscript i is the particle identification and j the element identification; r 1 and r 2 are the random numbers within the scope 0; 1 ½ ; w is the inertia weight; c 1 and c 2 are the learning factors and they determine the influences of experiential information from the particle itself and others, respectively. A bigger w accelerates the iteration convergence speed in the early stage, but weakens the local searching ability and reduces the solution accuracy. On the contrary, a smaller w will result in a narrow searching space. In order to get a proper compromise between the searching ability and accuracy, the value of w in this paper decreases linearly with the increase of iterations, as shown by where i max represents the maximum iterations, and i is the present iteration number. According to Eq. (12), w decreases within the scope w min ; w max ð .

Test rig for the single magnet static-levitation system
In order to verify the effectiveness of control strategies, a test rig for the elastic-track single magnetic levitation system is built based on dSPACE. The main components and connection block diagram are shown in Fig. 4. In Fig. 4, the host PC is mainly used to develop the control strategies and provide a graphical user interface platform. The dSPACE used in this paper is a real-time control system based on the DS1104 controller board and equipped with several 16-bit A/D and D/A converters. For the single magnet levitation table, as shown in Fig. 5, the magnet is bolted at one end of the swing arm, and the other end of the arm is pined to the base, so that the movement of magnet can be regarded as a linear movement in the vertical direction when the arm swings within a small angle range. The track (the steel plate in Fig. 5) is connected to the base via the springs, and it can vibrate vertically. The elastic vibration of guideway beam in practice is simplified as the track's vibration. By alternating different springs, we can change the track natural frequency. The main parameters of the test rig are shown in Table 1.

Simulation and test on the test rig
A nonlinear model of the vehicle-guideway coupling system was established in MATLAB/Simulink according to the schematic of the closed-loop system (Fig. 3). To facilitate the comparison between the simulation results and the test rig results, the parameter values in the model are set according to Table 1. In the PSO algorithm, the fitness function is used as the criteria to judge the personal best positions and the swarm's best position. The following factors are taken into account when we set the fitness function: the levitation gap, the magnet acceleration, and the voltage across the magnet, which are, respectively, related with the driving safety, the ride comfort, and the required control energy. Therefore, the fitness function J can be written as where q 1 , q 2 , and r are the corresponding weighted coefficients. The J expressed by Eq. (13) can be also treated as  Fig. 4 Diagram of test rig for the elastic-track magnetic levitation control system Control strategy of maglev vehicles based on particle swarm algorithm 33 the index function for the LQR algorithm. Taking q 1 ¼ 1, q 2 ¼ 1 Â 10 6 , and r ¼ 1, we derive two k's with the LQR algorithm and the PSO algorithm, respectively. By setting that the initial vertical position of the magnet deviates 5 mm from the equilibrium point and the simulation time is 2 s (the same values will be taken in the following timedomain simulations unless otherwise specified), we have calculated the time-domain system responses and the results are shown in Figs. 6 and 7. In the process of PSO algorithm, the particle number n is set to 40, the inertia weight w scope is 0:6; 1:2 ð Þ , and the maximum number of iteration is 100. From Figs. 6 and 7, compared with the LQR algorithm, the PSO algorithm reduces both the number of oscillations and the vibration amplitude. The dynamic performance of the system applying the PSO algorithm is much better, and the output of the controller is cut down obviously, which means the requirement of the power source is reduced.
In addition, the fitness function in the POS algorithm can be described in a much more flexible form. To obtain a   Fig. 6 Levitation gap of the magnet better system response, we use the following equation as the fitness function: where & is the function of maximum voltage V max , f v ¼ 5 n o , and n o denotes the number of oscillations. By setting the particle number to 40, the inertia weight to 0:6; 1:2 ð , and the maximum iteration to 50, we calculated the fitness function value, and the result is shown in Fig. 8. With the optimized controller parameters, the timedomain system responses are also calculated, as shown in Figs. 9, 10, 11. From the figures, the maximum overshoot is about 2.0 % and it takes about 0.14 s for the system to reach the steady state if the stable region is set to 2 %.
The effectiveness of the control strategy is tested on the hardware-in-loop test rig. Because of the existence of highfrequency noise, the gap signal and current signal from sensors are filtered. A simple first-order low-pass filter is adopted, and the transfer function is The time-domain system responses measured from the test rig are shown in Fig. 12. In the initial condition, the magnet deviates 3.3 mm from the equilibrium point, and the track is struck at the sixth and nineth seconds, respectively. From Fig. 12, it takes about 0.15 s for the system to reach the steady state, and the stable current in the coil is 1.78 A. After suffering two times of external violent shocks, the system can quickly return to the equilibrium position. The test results verify the effectiveness of the control method.

Conclusions
A nonlinear numerical model of vehicle-guideway coupling system is established. Based on the similarity in dynamic properties, the single magnet vehicle-guideway Control strategy of maglev vehicles based on particle swarm algorithm 35 coupling system is simplified and the corresponding smallscale hard-in-loop test rig is built. A full-state-feedback controller was developed using the levitation gap signal and the current signal. The controller parameters are calculated using the LQR algorithm and the PSO algorithm, respectively. The results from the simulation and test rig show that, the control method proposed in this paper, by calculating the controller output with the full information of the coupling system, is effective to keep the system stable. Compared with the LQR algorithm, the PSO algorithm carries out the optimization directly taking the nonlinear system as the object, and its optimized results make the system responses much better.
Open Access This article is distributed under the terms of the Creative Commons Attribution License which permits any use, distribution, and reproduction in any medium, provided the original author(s) and the source are credited.