Design of Magnetic Levitation Ball Control Based on Co-simulation of SIMULINK and ADAMS

Design of Magnetic Levitation Ball Control Based on Co-simulation of SIMULINK and ADAMS

Chen Chen* Yougang Sun Dashan Dong Ting Tian

College of Logistics Engineering, Shanghai Maritime University, China

Corresponding Author Email: 
1540805076@qq.com
Page: 
146-150
|
DOI: 
https://doi.org/10.18280/mmep.030306
| | | | Citation

OPEN ACCESS

Abstract: 

By establishing a magnetic levitation ball system model in ADAMS and then with a combination of MATLAB and the basis of this model, we made a co-simulation of the magnetic levitation ball with the PID(proportional integral derivative)controller. The control simulation was done in MATLAB/SIMULINK environment and on the use of visualization debugger interface and real-time monitoring to adjust the PID parameter to make the ball be stable on the equilibrium position. Analysis is made in the case of gravity, with the change of the distance between the center of the ball and the equilibrium position, change of suspension force can be simulated. According to the simulation results, the control parameters of the PID controller are optimized. On this basis, the most suitable PID parameters will be obtained.

Keywords: 

Magnetic levitation ball, MATLAB/SIMULINK, ADAMS, PID Controller, Real-time monitoring

1. Introduction

The basic working principle of magnetic levitation system as shown in Figure 1.The primary task of EMS systems is to eliminate the influence of gravity via electromagnetic forces, which can avoid contact, and thus, no friction [1-4]. If the performance of the EMS control system is less-powerful, strong coupling vibration may occur between the vehicle and the guideway endangering the stable suspension. Increasing the stiffness and damping of the guideway is the usual engineering application to eliminate this phenomenon [5-8]. magnetic levitation ball is a easy example to simulate the real maglev system. The suspended objects is  realized suspending on the equilibrium position through using electromagnet (taking the magnetic levitation ball as an example). The output signal is identified by the sensor, and acts on the controller in order to calculate the output control signal through the control algorithm. The control signal is converted to the control to the control current through the power amplifier, which generates the levitation force, so that it can interact with the gravity, so that the ball is stable at the equilibrium position [9-10].

In recent years, much effort has been directed toward the area of dynamics and control of the EMS system. With the virtual  prototyping technology gradually become a new technology in the field of design and manufacture, using virtual prototype instead of physical prototype, not only can shorting the development cycle, but also the design efficiency has been greatly improved. But each software always has its own advantages and disadvantages [11-12]. So in a single use of a software, the results are always not satisfactory. However, the co-simulation can combine the advantages of the parties and making use of their respective advantages, making the real time data exchange in the process of simulation, which can make the virtual model closer to the actual model. In this paper, PID controller’s Design for the magnetic levitation ball system is based on the combination of ADAMS and MATLAB simulation, in order to analysis the PID parameter control of the magnetic levitation ball.

Figure 1. The composition of magnetic levitation ball system

2. The Mathematical Model of Magnetic Levitation Ball System

Electromagnetic force, which is the magnetic levitation ball need to be stable in suspension, is generated by current excitation, in conjunction with the magnetic circuit aroused from the magnetic properties of suspension sphere's metal material.

Electromagnetic force formula can be obtain by Maxwell electromagnetic formula

$F=\frac{A}{{{\mu }_{0}}}{{\left( \frac{{{\mu }_{0}}NI}{\frac{{{l}_{fe}}}{{{\mu }_{r}}}+2x} \right)}^{2}}=\frac{{{\mu }_{0}}{{N}^{2}}{{I}^{2}}A}{{{\left( \frac{{{l}_{fe}}}{{{\mu }_{r}}}+2x \right)}^{2}}}$

In the case of neglecting the influence of the iron core, the electromagnetic force is:

$F(x,I)=\frac{{{\mu }_{0}}{{N}^{2}}{{I}^{2}}A}{4{{x}^{2}}}$     (1)

Where: ${{\mu }_{0}}$ is air permeability; A is air gap area; N is number of turns; $x$ is air gap

According to the Taylor formula, the electromagnetic F can be Taylor expanded at the equilibrium point $({{x}_{0}},{{I}_{0}})$(At this time, the electromagnetic force is balanced with the gravity of the suspended object). Ignoring the higher order terms, it can be depicted as:

$F(x, I)=m g+\frac{\mu_{0} N^{2} I_{0} A}{2 x_{0}^{2}}\left(I-I_{0}\right)-\frac{\mu_{0} N^{2} I_{0}^{2} A}{2 x_{0}^{3}}\left(x-x_{0}\right)$     (2)

The system displacement is in the Y direction, ${{f}_{d}}$ is the external disturbance force, the equation of motion of the suspended ball is:

$m\frac{{{d}^{2}}x}{d{{t}^{2}}}=mg-F(x,I)+{{f}_{d}}$     (3)

(2) into (3), it can be expressed as:

$m\frac{{{d}^{2}}x}{d{{t}^{2}}}=\frac{{{\mu }_{0}}{{N}^{2}}{{I}_{0}}^{2}A}{2{{x}_{0}}^{3}}x-\frac{{{\mu }_{0}}{{N}^{2}}{{I}_{0}}A}{2{{x}_{0}}^{2}}I+{{f}_{d}}$     (4)

Without considering the circumstances of external interference, so ${{k}_{xx}}=-\frac{{{\mu }_{0}}{{N}^{2}}{{I}_{0}}^{2}A}{2{{x}_{0}}^{3}}$; ${{k}_{xi}}=\frac{{{\mu }_{0}}{{N}^{2}}{{I}_{0}}A}{2{{x}_{0}}^{2}}$; (4)can be simplified as :

$m\frac{{{d}^{2}}x}{d{{t}^{2}}}+{{k}_{xx}}x+{{k}_{xi}}I=0$     (5)

${{k}_{xx}}$, ${{k}_{xi}}$ is defined as the displacement stiffness coefficient and the current stiffness coefficient of the magnetic levitation ball system, the transfer functions of the input current and the output of the breath distance. It can be expressed as follows:

$G(s)=\frac{X(s)}{I(s)}=\frac{-{{k}_{xi}}}{m{{s}^{2}}+{{k}_{xx}}}$     (6)

3. Co-Simulation

3.1 The simulation calculation

The levitation ball model is very simple, so it can be directly modeled in ADAMS. The system design can be modeled based on a MARKER point and a ball. According to the experimental needs, the establishment of the magnetic levitation ball model is shown in figure 2.

Figure 2. The magnetic levitation ball system model

Since the model is built in ADAMS, the quality of the model has been defined directly by the software. Therefore, the definition of state variables can be directly carried out on the model the model.

Table 1. Define of state variable

Input variable

Output variable

Name

Functions

Name

Functions

.xuanfuqiu. Force_In

0

.xuanfuqiu. distance

DY(ball.cm, marker_1)

Due to the magnetic levitation ball is 1-DOF simulation model, it simply needs return the distance between the center of gravity of the ball and the equilibrium position in the Y direction in the reference coordinate system.

In the Y direction, adding the suspension force F and setting the F function as VARVAL (Force_In), the value of the control variable Force_In will be obtained in real time. After that, the control parameters are derived, and the MATLAB software is turned on to establish the interface of data exchange, and the simulation results are obtained by using SIMULINK software. As shown in Figure3, 4, Figure 3(a) is open-loop control system, Figure 3(b) is closed-loop control system; Figure 4(a) is Simulation curve of open-loop control system, Figure 4(b) is Simulation curve of closed-loop control system, It can be seen that the open-loop system is unstable, and the interference signal will make it deviate from the equilibrium position. And the closed-loop system will gradually make the ball more stable with the change of PID parameters.

Figure 3 (a). A simulation of open-loop control system

Figure 3 (b). A simulation of closed-loop control system

Figure 4 (a). Simulation curve of open loop control system

Figure 4 (b). Simulation curve of closed-loop control system



Through the ADAMS module wrapping, the transfer function or state equation can be avoided to input in the MATLAB. After identifying the error between the data provided by the feedback and the reference data, the adams_sub module can directly output the control variable to control the magnetic levitation ball. The PID magnetic levitation ball control block diagram is given in the SIMULINK platform based on ADAMS, where the adams_sub is the export module in ADAMS, using the unit negative feedback to return the output variable in the feedback process.

Figure 5. Control diagram of 1-DOF simulation model in PID

After the SIMULINK simulation model is built, the simulation parameters can be set up. Setting the simulation is 15s.(the simulation results can be viewed according to different simulation time), Setting the simulation mode to ‘discrete’, animation mode is ‘interactive’, it can make numerical integration by using variable step Runge Kunge method, which is own numerical integral function ode45 (Dormand-Prince) in MATLAB, the remaining parameters can be maintained by default settings. After setting up, by adjusting the proportion of links, differential and integral parts, the co-simulation can be done in different PID parameters. After the end of the simulation, the simulation results can be viewed through the scope module. The joint simulation result file(*.res) can be import ADAMS/Postprocessor post processing module, in addition, the file can be analyzed and compared in this module. The control parameters are continuously modified until the satisfactory simulation results are obtained.

3.2 Simulation result

On the basis of modifying and adjusting the control parameters, 1-DOF simulation model is repeatedly simulated, which can achieve the best control effect.

In the simulation process, setting the MARKER_1 point as the balance position, the center of gravity of the suspension ball should be floating at the equilibrium position, the final effect is the center of the suspension ball and MARKER_1 point overlap, that is, steady suspension.  In the Y direction, the magnetic levitation ball drops under the gravity effect. An upward force is applied to the center of gravity of the magnetic levitation ball, in contrast to the gravity direction, which is used to counteract the effect of gravity, it can make the system achieve suspension effect. In ADAMS, the value of the suspension force F is generated in the MATLAB, and the VARVAL function can returned the value to the ADAMS model in real time. In addition, F also depends on the value of the air gap. Select four different PID controller parameters into the PID controller. PID controller parameters are: ${{K}_{p}}=3,{{K}_{i}}=10,{{K}_{d}}=5$; ${{K}_{p}}=18,{{K}_{i}}=5,{{K}_{d}}=3$; ${{K}_{p}}=20,{{K}_{i}}=13,{{K}_{d}}=3$; ${{K}_{p}}=10,{{K}_{i}}=5,{{K}_{d}}=12$, The control system is simulated. The simulation results are shown in Figure 6.

Figure 6. y direction vibration curve of suspension sphere in different parameter

Figure 7. y direction vibration curve of the magnetic levitation ball in random signal

Analysis of different PID parameters is in the image above. From the graph we can see that, curve obviously does not tend to be stable it has the very obvious modulation phenomenon in the fourth group. Therefore, the parameters in the PID need to be further adjusted. In the first set of data, the curve has a gradually stable trend. But because the speed is too slow, the magnetic levitation ball is still not stable at the equilibrium position after the 10s simulation. In the second sets of data, overshoot is too large and there is a steady state error. But in the third group, as times goes by, the position of the magnetic levitation ball moves to the equilibrium position, and the steady-state error is reduced. Under the disturbance of external random signals, it is still able to stabilize the equilibrium state. It was shown in Figure 7. So the PID controller system which is composed of ${{K}_{p}}=20,{{K}_{i}}=13,{{K}_{d}}=3$ has better dynamic performance and steady state performance.

4. Conclusion

In this paper, 1-DOF simulation model is established. Through the co-simulation of ADAMS and MATLAB, the suspension setting for overcoming gravity is realized. The following conclusion is obtained by analyzing the suspension condition at the equilibrium position:  

  1. When the magnetic levitation ball is too violent at the equilibrium position, because the overshoot is too large, it is needed to reduce the amplitude of the suspended ball by adjusting the differential coefficient or decreasing the ratio coefficient.
  2. If the ratio coefficient is too large, it will cause the system to appear divergent, and the magnetic levitation ball can not hover at the equilibrium position.
  3. When it is found that there is a clear steady state error between the center of gravity and the equilibrium position, the integral coefficient is adjusted to eliminate the steady state error, but the response speed becomes slow.
  4. By using ADAMS to simulate, the motion of the magnetic levitation ball can be observed in real time, and the simulation results are analyzed and compared. In the analysis of more complex objects, it is significantly better than the MATLAB independent simulation.
  References

[1] Guo D. L., Li S. Z. and Ma L., ADAMS 2013 Advanced Application Tutorial with Examples, pp. 253-264, 2013.

[2] Liu J. K. and Bei Jing, “Advanced-MATLAB control PID simulation,” Publishing House Electronics Industry, pp. 307-329, 2004. 

[3] Lv H. B., Liu X. J. and Lu C. M., “Real-time controller’s design and experimental analysis for magnetic levitation ball system based on MATLAB,” Instrument Technique and Sensor, pp. 50-52, 2009.

[4] Xiao P. Y., Xie Z. Y., “Co-simulation of Rotor System supported by magnetic bearings based on ADAMS and MATLAB,” System Simulation Technology, pp. 48-53, 2011.

[5] Wang G. H., “Controller design and experimental study of magnetic levitation system,” Control Theory and Application, vol. 17, no. 6, pp. 45-51, 2000.

[6] Li S. H, Yang S. P. and Li H. Y., “Investigation on semi-active controlled vehicle suspension based on ADAMS-MATLAB co-simulation,” Journal of System Simulation, vol. 19, no. 10, pp. 2304-2307, 2007.

[7] Xie Y. D. and Chang W. S., “Electromagnetic (EMS) modeling and simulation of maglev system plumb direction,” Jounrnal of the China Railway Society, no. 4, pp. 38-47, 1996.

[8] X.F. Hao, “Research on the H controller synthesis for maglev suspension system,” Journal of Southwest Jiaotong University, vol. 7, no. 1, pp. 1-8, 1999.

[9] K. Popp, “Mathematical modeling and control system design of maglev vehicle,” vol. 78, pp. 333-364.

[10]  Sun Y. G., Qiang H. Y., Lin G. B., Ren J. D. and Li W. L., “Dynamic modeling and control of nonlinear electromagnetic suspension systems,” Chemical Engineering Transactions, vol. 46, pp. 1039-1044, 2015. DOI: 10.3303/CET1546174.

[11] Sun Yougang, Li Wanli, Dong Dashan, Mei Xiao and Qiang Haiyan, “Dynamics analysis and active control of a floating crane,” Tehnicki Vjesnik-Technical Gazette, vol.  22, no. 6, pp. 1383-1391, 2015.

[12] Sun Yougang, Li Wanli and Qiang Haiyan, “An experimental study on the vibration of the low-speed maglev train moving on the guideway with sag vertical Curves,” International Journal of Control and Automation, vol. 9, no. 4, pp. 279-288, 2016.