## 4 Force Imbalance Stable Levitation Test
In the actual levitation control, the test is carried out in a static and undisturbed air environment, and the ambient temperature is 20 \({}^{\circ}\)C. According to the parameters of electromagnetic actuators in Table 1, the maximum heating temperature of the coil is within the working temperature range of the sensor. The skeleton of electromagnetic actuators is made of high-performance nylon with excellent thermal insulation performance. The position control process is shown in Figure 7. The AH49H type hall sensor is used to collect the position of the permanent magnet ball, and the collection range is \(\pm\)3000 Gauss. Compared with the laser position sensor and the eddy current sensor, the hall sensor is not affected by the material and light refraction of the detected object and can accurately collect the magnetic field around the permanent magnet ball, making the application scope of active magnetic levitation actuation more extensive. In the process of collecting the magnetic field signal of the permanent magnet ball, the dual-hall sensors are arranged symmetrically in the vertical direction to actively eliminate the influence of the magnetic field of the electromagnetic actuators on the sensors. It is necessary to collect the magnetic field signal of the ball at high frequency to meet the stable levitation of the ball. Too low acquisition frequency will delay the collected magnetic field signal of the ball, resulting in that the control frequency not keeping up with the frequency of the magnetic field change, causing the ball to vibrate violently or even fall. Figure 6: Step response simulation of different controllers with the same electromagnetic actuation structure. (**a**) Step response simulation of neural network PID controller; (**b**) Step response simulation of model-based controller. Figure 7: Position control process of the permanent magnet ball. The software differential has a slow aging time, which affects the control time. Therefore, the OP07 operational amplifiers are used to perform hardware differentials on the voltage signal collected by the dual-hall sensors. The differential result is collected by the 16-bit AD7606, and the data are processed and controlled by the STM32F407 microcontroller. After obtaining the accurate magnetic field signal of the ball, the voltage signal collected by the dual-hall sensors and the actual position of the permanent magnet ball are calibrated. Finally, the corresponding relationship between the position of the permanent magnet ball and the voltage value of the sensors within the levitation range is fitted. The acquisition accuracy of the AH49H hall sensor is 0.33 mV/Gauss, the calibration accuracy of the test position is 0.002 mm, and the acquisition accuracy of the 16-bit AD7606 is 0.153 mV. The integrated position accuracy of the permanent magnet ball for the test results is 0.002 mm. The actual levitating control of the magnetic levitation actuation and motion control system is carried out using the designed neural network PID controller, on the premise of the simulation results of the neural network PID control of permanent magnet ball. The control effect of the neural network PID controller on the actual levitating system is studied through experiments. The initial position of the permanent magnet ball is set to \(-24.50\) mm, and the target balance position is set to \(-20.40\) mm. The test results are shown in Figure 8.  
It can be seen from Figure 8 that the permanent magnet ball can achieve stable levitation. The overshoot of the magnetic levitation actuation and motion control system using the neural network PID controller is 5.8%, and the step length is 4.1 mm. The position fluctuation ranges of the permanent magnet ball controlled by the neural network PID controller is 0.31 mm after stable levitation, and the position fluctuation range controlled by the digital PID controller is 0.64 mm after stable levitation. The overshoot using the model-based controller is 7.7%.