arXiv:2610.08653cs.ROOct 2026

Manuscript Offprint

arXiv:2610.08653

Magnet-Aware Control of Legged Robots

J. Playan Garai, S. B. Djuve, C. McGreavy, M. Khadiv

Jorge Playán Garai 1,2^{1,2} ID^{ID}, Sverre Bekkelund Djuve 2^{2} ID^{ID}, Christopher McGreavy 2^{2} ID^{ID}, Majid Khadiv 1^{1} ID^{ID}

Abstract—Autonomous robots can increase uptime and reduce human exposure in Big Science facilities, but strong magnetic fields needed for their operation corrupt sensors and induce pose-dependent mechanical wrenches that destabilize robots and challenge conventional reactive controllers. This paper presents a control framework for modeling, estimating, and dynamically compensating for spatially varying magnetic wrenches acting on legged robots to improve robustness in these fields. We introduce a custom physics plugin for the MuJoCo simulator to model magnetic forces on rigid-body elements, alongside an inverse field-estimation framework to infer the latent magnetic field directly from quadruped dynamic responses and any number of sensor readings. Furthermore, we develop a Magnet-Aware Model Predictive Control (MPC) and Whole-Body Control (WBC) architecture that predicts and counteracts magnetic perturbations during locomotion to increase the range of magnetic fields in which the robot can operate. The effectiveness of the framework is validated through both simulation and physical hardware experiments. We show our method increases the maximum rejectable disturbances from magnetic field in the force space by a factor of 2.5 and between 1.6-2 times in torque space compared to a non-compensated system. Within the proposed magnetic field, this constitutes an increase in the area in which the robot can operate by 29, 34% of which 10, 84% would have previously caused an immediate collapse to non-compensated controllers.

I. INTRODUCTION

Deploying autonomous robotic systems into Big Science facilities (such as high-energy physics and fusion energy experiments at CERN and ITER) is vital for automated inspection and maintenance. Operating within these sensitive environments requires high state estimation accuracy and robust disturbance rejection [1]. However, these facilities generate continuous, high-strength static magnetic fields reaching several Tesla (T) as a requirement for their operation, which jeopardises robotic operations. Robots unequipped to work in high magnetic fields are unable to withstand the magnetic fields in these facilities and can be pulled towards the magnetic field origin (Fig. 1, red trace) causing the robot to fail and possibly damage the surrounding sensitive infrastructure. An adaptive, well-formulated compensation controller, however, could move through greater magnetic fields and reject higher induced disturbances using knowledge of the environment (Fig. 1, blue trace), increasing the useful workspace of the robot.

All topologies are affected by these issues, from standard manipulators to more complex systems. However, Big Science facilities tend to be unstructured and multi-leveled, reducing the viability of wheeled mobile robots. Despite the added complexities of legged systems, these can overcome the presented

Figure

Fig. 1. Robot moving through magnetic fields (dashed contour lines) experience induced disturbance wrenches due to their ferromagnetic components. Our method compensates for these disturbances (blue trace), allowing undisturbed movement and greater accessibility in magnetic field environments, where standard controllers would fail, leading to collapse (red trace)

challenges thanks to their enhanced mobility and adapting ground reaction forces to compensate existing perturbations.

Ferromagnetic components moving through a magnetic field experience significant forces and torques due to their interaction with the field. These induced perturbations impose continuous perturbations on the system that can threaten task completion. Additionally, electric brushless DC (BLDC) motors are most commonly equipped with Hall-effect encoders, which suffer from corrupted feedback and disrupted magnetic commutation [2] [3], and will typically be the first point of failure in an electrically actuated system, forcing the motors to enter fault states and causing the collapse of the system. High-field environments also completely mask the Earth's magnetic field, rendering IMU magnetometers ineffective for yaw drift correction in state estimation [4] [5]. Moving through steep magnetic flux gradients also induces parasitic currents in unshielded wiring (Faraday's law [6]), threatening logic circuits and sensor signals.

Hardware modifications, such as magnetic-immune capacitive encoders [7], and software adaptations such as magnetic-field SLAM [8] [9] mitigate some sensing issues, a holistic, environment-aware approach is needed for the control problem. In some approaches, robots are constructed without magnetic components to remove the control complexity completely [10], but non-magnetically susceptible components drastically degrade the capabilities of a system and are limited in their applications. Momentum observers [11] [12] [13] use the dynamic model of the robot and the momentum derivative to remove the need of noisy joint accelerations. A low pass filter is then added to create reactive strategies to compensate for, or measure, perturbations. However, this ap-

1^{1}Technical University of Munich (TUM), Munich, Germany

2^{2}Conseil Européen pour la Recherche Nucléaire (CERN), BE/CEM/MRO, Geneva, Switzerland proach requires measurement or estimation of ground reaction forces (GRFs), and magnetic field induced disturbances are included in these GRF measurements and cannot be separated, leading to the disturbance force being masked within the GRF measurements. Projection approaches [14] [15] project rigid-body dynamics of the system into the null space of the contact Jacobian to remove contact forces and isolate unmodeled forces. In magnetic environments, however, the non-linear relationship between magnetic fields and induced wrenches amplifies minor modeling inaccuracies into large disturbance readings. Furthermore, physical realities such as foot slip or contact compliance violate null-space assumptions and cause large residual spikes [16]. Reactive or model-free disturbance rejection strategies with low-pass filtering aim for a high level of flexibility and adaptability, but, model-free approaches make decisions reactively based on sensor data within a moving window, leading to delays in compensating to magnetic field gradients, especially since such disturbances can not be detectable by these methods. Push recovery approaches to disturbance rejection [17] [18] assume external forces are transient, impulsive, or static, which is effective for short disturbances, but magnetic wrenches form continuous vector fields that vary dynamically with spatial gradients and the robot's pose and joint configuration [19].

Existing disturbance estimation and control frameworks are therefore not suitable for these environments since they fail to guarantee the robust dynamic balance needed for autonomous operations. An effective control framework for legged robotic operation in a magnetic field needs to account for the complex dynamics of induced magnetic wrenches and should incorporate models of magnetic fields and their effects on susceptible ferromagnetic components of robot structures.

To address these challenges, this paper focuses on modeling, estimating, and dynamically compensating for spatially varying magnetic wrenches on quadruped actuators. Critically, we will be assuming that the commutation in the motors is not done through Hall sensors but instead uses capacitive encoders as mentioned before. This will ensure our motors are reliable and robust even under magnetic fields. Our main contributions can be summarised as follows:

  1. A custom MuJoCo [20] physics plugin that simulates induced magnetic forces and wrenches on rigid body elements based on the ferromagnetic components in the system.

  2. An inverse magnetic field estimation framework that infers local field distributions from legged system dynamics and sensor readings.

  3. A Magnet-Aware framework (Fig. 2) that actively predicts and compensates for magnetic perturbations during dynamic locomotion.

The remainder of this paper is organized as follows: Sec. II details the background concepts and mathematical derivation of the magnetic wrench model. Sec. III describes the custom MuJoCo simulator implementation. Sec. IV outlines the Magnet-Aware MPC+WBC dynamic compensation framework. Sec. V presents the magnetic field estimation algorithm. Finally, Sec. VI details simulation and physical hardware

Figure

Fig. 2. Block diagram of the proposed pipeline outlining the contributions. We present the pre-existing elements of the pipeline (grey), the components where we have applied modifications (blue, yellow, brown, purple), and the modifications themselves (green).

experiments evaluating controller performance.

References (29)