Magnetic levitation with six-degrees-of-freedom enables frictionless transport and micrometer-scale positioning in principle, but low-level control is inherently challenging due to its complex and unstable dynamics. Industrial systems typically rely on deep hardware-software co-design, where mover and stator geometries are jointly designed to enable a compact, hand-crafted approximation of the electromagnetic force computation, thereby keeping control computationally tractable at kilohertz rates. However, this approach imposes overly conservative constraints on the operating workspace and the range of supported mover topologies. Instead of reducing the underlying physics to a hand-crafted approximation, we compute the physics directly. We introduce Magflow, a fully differentiable, GPU-parallel simulator for 6D magnetic levitation. It is used to train the first neural controller for an industrial-grade 6D magnetic levitation system that is learned purely from simulated physics. We show that the learned neural controller transfers zero-shot from simulation to real hardware while satisfying hard real-time constraints at 4 kHz. The learned controller achieves qualitatively new behaviors and even levitates a mover topology for which no hand-crafted solution exists. These results demonstrate that co-design is not a physical necessity for 6D magnetic levitation control. More broadly, control learning from simulated physics can find solutions beyond the reach of control engineering in demanding industrial domains. Source code and demonstration videos are publicly available at https://sites.google.com/view/magflow.
Figures & tables
Fig. 1: Magflow is the first differentiable simulator for 6D magnetic levitation, fusing the electromagnetic physics and the neural controller into a single GPU computational graph. Backpropagation through time trains the controller end-to-end, purely from physics. The trained controller then transfers zero-shot to the real hardware running at 4kHz .
Fig. 2: Overview of the MagLev system [ 25 , 26 ] used in this work. (left) APS4322 stator tile with 24 stator units arranged in horizontal and vertical layers and the 50 embedded triaxial HES. (middle) Bottom view of the APM4330 mover with four five-magnet Halbach arrays, where red and blue indicate north and south pole. (right) Cross-section of a vertical stator unit beneath an aligned vertical Halbach array, showing the three-phase conductors, the HES plane, and the resulting magnetic flux. Fz and Fx indicate lift and lateral thrust.
Fig. 3: Magnetic field components of the mover along a cut at mover-local y=40\text{,}\mathrm{mm} , $z=$-1\text{\,}\mathrm{mm} , comparing measurements (black), the Magflow simulation (blue), and the harmonic commutation model (red). The first-harmonic model deviates systematically from the measurements, while Magflow matches them.
Fig. 4: Neural controllers trained end-to-end in Magflow ( πMF , blue) and deployed zero-shot achieve novel capabilities. Closed-loop rollouts of the deployed controllers in Magflow on the same references are shown in green ( πMF ) and brown ( πBC ). (left) Full 360 ° yaw rotation of the APM4330 mover away from the tile center. The behavior-cloned baseline πBC (orange) directly loses control. (middle) A neural controller retrained in Magflow for a plain bar magnet, a topology with no harmonic commutation model, levitates it stably and tracks a full 360 ° yaw rotation away from the tile center. (right) Continuous 360 ° rotation of the bar magnet about a horizontal axis, to our knowledge not shown before for a single magnet on a planar MagLev system.
Position [mm]
Orientation [ ∘ ]
Controller
x
y
z
roll
pitch
yaw
πPC
0.09
0.07
0.06
0.10
0.07
0.05
πBC
0.15
0.14
0.09
0.12
0.11
0.10
πMF
0.34
0.30
0.14
0.24
0.25
0.26
πBC (sim)
0.16
0.18
0.08
0.10
0.10
0.24
πMF (sim)
0.31
0.24
0.15
0.19
0.21
0.22
TABLE I: RMS tracking error on a random trajectory measured by motion capture. Sim rows are closed-loop Magflow rollouts.
Fig. 5: The neural controller πMF hovers the APM4330 mover stably under a tested payload of 1.3kg .
Magnetic levitation (MagLev) systems have great potential for application in high-mix, low-volume manufacturing due to their scalability and flexibility, enabling highly reconfigurable in-machine material flow. However, their manipulation capabilities remain largely unexploited, as current applications almost exclusively focus on transportation. To enable grasping and manipulation directly on MagLev systems without requiring additional costly handling equipment, such as industrial robot arms, we present the Gripper MagBot, a low-cost parallel 6-DoF manipulator with an integrated 1-DoF gripper that mechanically couples three MagLev movers. The Gripper MagBot supports two operating configurations: a default mode and a single-track mode, selectable depending on the required stability and workspace footprint. To reconfigure a machine, the MagBot can be autonomously dropped off and picked up using a docking station. We showcase pick-and-place examples in simulation, as well as with the real Gripper MagBot using our inverse kinematics controller. CAD files, assembly instructions, a component list, and videos are available at https://sites.google.com/view/gripper-magbot.
Magnetic Levitation (MagLev) systems fundamentally increase the flexibility of in-machine material flow in industrial automation. Therefore, these systems enable dynamic throughput optimization, which is especially beneficial for high-mix low-volume manufacturing. Until now, MagLev installations have been used primarily for in-machine transport, while their potential for manipulation is largely unexplored. This paper introduces the 6D-Platform MagBot, a low-cost six degrees of freedom parallel kinematic that couples two movers into a composite robotic platform. Experiments show that the 6D-Platform MagBot achieves sub-millimeter positioning accuracy and supports fully autonomous pick up and drop off via a docking station, allowing rapid and repeatable reconfiguration of the machine. Relative to a single mover, the proposed platform substantially expands the reachable workspace, payload, and functional dexterity. By unifying transportation and manipulation, this work advances Magnetic Levitation towards Magnetic Robotics, enabling manufacturing solutions that are more agile, efficient, and adaptable.
Magnetic navigation provides contact-free and line-of-sight-independent feedback for robotic systems, yet existing approaches typically rely on explicit pose estimation or direct use of raw magnetic measurements, making accurate control susceptible to modeling errors, measurement noise, and disturbances. This work presents MagServo, a hierarchical learning-based framework for robust 6-DoF magnetic servoing directly using the learned latent magnetic feature. MagServo learns uncertainty-resilient magnetic representations through masked reconstruction and captures state-dependent interaction dynamics between robot motion and latent magnetic transitions without analytical magnetic models or explicit Jacobian supervision. Based on the learned dynamics, a hierarchical controller combines nonlinear model predictive control for coarse approach with local Jacobian inversion for precise fine regulation. Extensive physical experiments demonstrate submillimeter and subdegree accuracy, achieving mean terminal errors of 0.386 mm and 0.479 degree for 6-DoF pose reaching. MagServo further outperforms a localization-based control baseline in complex trajectory tracking and maintains robust performance under unseen magnetic-source configurations without retraining. A supplementary video of the real-robot experiments is available at https://youtu.be/rZt1NUP1Mr0.
Yuhan Tan, Yameng Zhang, Pei Liu +2
Department of Bioengineering, Imperial College London, UK. · Department of Mechanical Engineering, The University of Hong Kong, Hong Kong SAR. · School of Computation, Information and Technology, Technical University of Munich, Germany.