Source-linked AI summary
MagNav: A Dual-Core Magnetic Track Guidance Framework for Lighting-Invariant Navigation in Two-Wheeled Robots
Arpita Kumari, Anupam Chatterjee, Richa Srivastava
TL;DR
TWIP line following is difficult because steering is coupled to balancing, while infrared sensing is sensitive to ambient light. The paper uses magnetic track guidance with a Hall-effect array and cascaded control; in tests, it completed a 2742 mm track under intense lighting while the IR system stopped after tracking failure.
Problem
TWIP line following is challenging because steering and balancing are coupled, and infrared line sensing is vulnerable to changing ambient illumination.
Source: §I · p. 1Method
The paper integrates a five-channel analog Hall-effect array’s continuous lateral-error estimate into cascaded PID control, using filtered IMU data for pitch estimation.
Source: §I · p. 1, 1) Perception Layer · p. 3Results
The magnetic system completed the 2742 mm track with 2.14 mm RMSE and 30.9 mm·s IAE, while the IR system stopped at 789 mm after catastrophic tracking failure.
Source: §IV · p. 5Takeaways & Limitations
Magnetic guidance maintained reliable, continuous tracking under severe optical interference, with pitch-angle standard deviation below 1.1° over the track.
Source: §V · p. 5, §IV · p. 5The system requires a continuous physical magnetic strip, making its infrastructure less flexible and more labour-intensive to alter than virtual routing techniques.
Source: §V · p. 6
Abstract
from arXiv · showhide
Two-Wheeled Inverted Pendulum (TWIP) robots are useful for studying how to control systems that are naturally unstable and have fewer actuators than degrees of freedom. Adding autonomous line-following to these robots is challenging because steering and balancing are closely linked. Most existing systems use infrared sensors, which can be affected by changes in lighting, such as sunlight or shadows, making them reliable only indoors. This paper presents a self-balancing robot that can follow a line using a magnetic track guidance system. By using a five-channel analog Hall-effect sensor array, the robot is not affected by optical interference. The control system uses a cascaded PID structure: the inner loop keeps the robot balanced using data from an inertial measurement unit with a complementary filter, while the outer loop adjusts steering based on the magnetic sensor readings. Stepper motors provide precise torque control without needing extra rotary encoders. For comparison, an optical sensor module was also included. Tests show that the magnetic guidance system keeps accurate tracking even in very bright lighting, over 10,000 Lux, while the optical system loses accuracy and sometimes fails. This design provides a reliable, lighting-independent solution for autonomous navigation in places like factories, warehouses, and outdoor paths.
I. INTRODUCTION
TWIP robots combine inherent instability and underactuation with steering dynamics coupled to balancing, complicating autonomous line following. The paper proposes magnetic guidance with a five-channel Hall-effect array and cascaded PID control, then compares it with infrared guidance under severe lighting.
I. INTRODUCTION
- TWIP line following is complex because steering dynamics are directly coupled to longitudinal balancing in inherently unstable, underactuated robots.The passage describes TWIP robots as having a small footprint and zero-turning radius.Source: §I · p. 1
- Infrared line sensing is vulnerable to sunlight, shadows, and varying artificial light, limiting reliability in changing environments.The passage also notes that visual-steering methods require substantial computational power.Source: §I · p. 1
- Magnetic guidance integrates a five-channel analog Hall-effect array’s continuous weighted-average error into cascaded PID control to steer without destabilising the inner pitch loop.The paper applies Hall-effect guidance to TWIP robots, an area it describes as studied only to a limited extent.Source: §I · p. 1
- The study compares magnetic and IR tracking under lighting exceeding 10,000 Lux, measuring trajectory error with RMSE and IAE while monitoring pitch variation.The stated objective is to test tracking accuracy without jeopardising dynamic stability.Source: §I · p. 2
II. METHODS & MATERIALS
The system development is organised into three phases: physical hardware, kinematic modelling, and hierarchical control design for balancing and trajectory tracking.
II. METHODS & MATERIALS
- The development process begins by defining the physical hardware.This is one of three stated phases of system development.Source: §II · p. 2
- A second phase models the system kinematics.This follows hardware definition in the stated development sequence.Source: §II · p. 2
- The final phase designs a hierarchical control loop for stable balancing and robust trajectory tracking.The passage identifies this as the control-design phase.Source: §II · p. 2
A. Physical System Parameters
The TWIP platform combines a low-centre-of-mass chassis, dual stepper-motor actuation, an IMU, and both magnetic and infrared sensing. Its dual-core controller and open-loop stepper positioning support separated balancing and sensor-polling tasks without external rotary encoders.
A. Physical System Parameters
- The low centre of mass is intended to support passive inverted-pendulum stability, and stepper motors provide open-loop angular positioning without external rotary encoders.The ESP32’s dual-core design separates high-frequency balancing from lower-priority sensor polling.Source: A. Physical System Parameters · p. 2
- The platform uses two NEMA 17 stepper motors, an MPU6050 IMU, and opposing Hall-effect and digital IR sensor arrays on a symmetrical chassis.Testing proceeds in the direction of the sensor being tested, allowing the same platform to serve as both control and experimental setup without hardware reconfiguration.Source: A. Physical System Parameters · p. 2, Figure 2 · p. 2
- A 12 V, 5000 mAh battery sits on the upper deck, while the lower deck houses a PCB with the ESP32, buck converter, and stepper drivers.The figure caption identifies the converter as an LM2596 and the drivers as A4988 units.Source: Figure 2 · p. 2, A. Physical System Parameters · p. 2
B. Kinematic and Dynamic Modelling
The robot is modelled as a classical two-wheeled inverted pendulum with horizontal motion and pitch states. Near upright equilibrium, small-angle dynamics describe the system, whose controller must counter gravitational torque through corrective wheel acceleration.
B. Kinematic and Dynamic Modelling
- The model treats the robot as a two-wheeled inverted pendulum that must maintain longitudinal pitch stability while manoeuvring horizontally.The free-body diagram relates the model to platform geometry, including wheel radius and centre-of-mass distance.Source: B. Kinematic and Dynamic Modelling · p. 2, Figure 3 · p. 2
- The system state includes cart position and translational velocity, together with pendulum pitch angle and angular velocity.The passage names horizontal position as x and pitch angle as θ.Source: B. Kinematic and Dynamic Modelling · pp. 2–3
- Assuming small angles near upright equilibrium (θ ≈ 0), the model uses continuous-time state-space dynamics, and the controller outputs corrective wheel accelerations against gravitational torque.The gravitational torque acts on the centre of mass located distance l from the wheel axle.Source: B. Kinematic and Dynamic Modelling · p. 3
C. Hierarchical Control and Sensor Fusion
The cascaded control framework organizes perception, control logic, and actuation to manage balancing and trajectory tracking. Sensor data informs steering and balance corrections, which are combined to drive the robot.
C. Hierarchical Control and Sensor Fusion
- The cascaded control architecture manages both unstable balancing dynamics and trajectory tracking.Source: C. Hierarchical Control and Sensor… · p. 3
- Perception fuses IMU and Hall-effect data before the control logic computes steering and balance corrections.Source: Figure 4 · p. 3
- The actuation layer combines the steering and balance corrections to drive the physical system.Source: Figure 4 · p. 3
1) Perception Layer:
The perception layer estimates pitch from IMU signals and converts five-channel Hall-effect sensor readings into a continuous lateral track-position error. A weighted average provides resolution finer than the physical sensor spacing.
1) Perception Layer:
- A complementary filter combines accelerometer and gyroscope signals to estimate pitch, while a five-channel Hall-effect array measures magnetic flux from the floor strip.The weighted-average interpolation provides inter-sensor resolution finer than the array’s physical spacing.Source: 1) Perception Layer · p. 3
- Raw analog voltages from the five magnetic sensors are mathematically converted into a high-resolution lateral distance error.Source: Figure 5 · p. 3, 1) Perception Layer · p. 3
- The weighted average computes continuous lateral error position Epos in millimetres from each sensor’s voltage Vi and fixed lateral position xi.Source: 1) Perception Layer · p. 3
2) Control Logic Layer:
The control logic uses cascaded PID loops: an inner loop maintains upright balance, while an outer loop steers according to lateral line-position error.
2) Control Logic Layer:
- The inner PID loop maintains upright balance by comparing filtered pitch with a zero-degree setpoint and calculating balancing torque.Source: 2) Control Logic Layer · p. 3
- The outer PID loop uses lateral line-position error to produce a differential steering command.Source: 2) Control Logic Layer · p. 3
- The cascaded structure assigns balancing and steering to separate inner and outer PID loops, respectively.Source: 2) Control Logic Layer · p. 3
3) Actuation Layer:
The actuation layer mixes balance and steering outputs into step-frequency pulse trains for the left and right stepper motors.
3) Actuation Layer:
- A PID Signal Mixer combines inner- and outer-loop signals to determine the final step-frequency pulse trains for both wheels.Source: 3) Actuation Layer · p. 3
- Balancing output is applied equally to both motors for forward and backward movement.Source: 3) Actuation Layer · p. 3
- Steering output is added to one wheel and subtracted from the other to produce yaw.Source: 3) Actuation Layer · p. 3
III. EXPERIMENTAL SETUP
The comparison used identical 15 mm track geometry for optical and magnetic guidance, with intense lighting placed at a 90-degree corner. Sensor mounting and dual-core task allocation were configured to support fair testing while preserving balancing control.
III. EXPERIMENTAL SETUP
- Both guidance methods used the same 15 mm track geometry, with an artificial >10,000 Lux interference zone at the 90-degree vertex.The intense lighting was placed where steering effort is greatest to test sensor robustness and control stability under optical interference.Source: §III · pp. 3–4, Figure 6 · p. 4
- Both sensor arrays sat 7.0 mm above the floor, while the 2.0 mm magnetic strip reduced the Hall-array sensing gap to 5.0 mm.This configuration was intended to optimize magnetic flux reception while retaining clearance during pitch maneuvers.Source: §III · p. 4, Figure 7 · p. 4
- FreeRTOS assigned the 200 Hz balancing loop to Core 0 and the 50 Hz navigation loop to Core 1, communicating through a thread-safe queue.The navigation loop polled the analog sensors and computed steering, while the balancing loop handled the IMU filter and motor timing.Source: §III · p. 4, Figure 8 · p. 4
IV. RESULTS
On the shared test track, magnetic guidance completed the 2742 mm route with low tracking error, while optical guidance lost the line at the high-light corner. Pitch remained stable during magnetic navigation.
IV. RESULTS
- In the conventional IR baseline, the robot navigated the straight and first curve, then left the tape upon entering the 10,000 Lux spotlight at the 90-degree vertex; telemetry showed uncontrolled tracking-error rise at 789 mm.Earlier, normal PID oscillations preceded a controlled overshoot at 382 mm; discrete sensing showed aggressive limit-cycle oscillations.Source: §IV · pp. 4–5, Figure 9 · p. 5
- The magnetic system tracked through the >10,000 Lux zone and continuous curve, with small, damped overshoots and a slight steady curve offset.Telemetry covered the full 0–2742 mm track; the overshoots occurred at the 90-degree turns.Source: §IV · p. 5, Figure 10 · p. 5
- 2.14 mm RMSE and 30.9 mm·s IAE accompanied magnetic completion of 2742 mm, while the IR system lost track at 789 mm.The optical system's maximum physical deviation was independently checked using physical measurements.Source: §IV · p. 5, Figure 10 · p. 5, Figure 9 · p. 5
- Pitch-angle standard deviation remained below 1.1° over the 2742 mm magnetic track, despite rapid steering corrections at the corners.The authors interpret this as evidence that the cascaded PID separated balancing from steering disturbances.Source: §IV · p. 5
V. DISCUSSION & CONCLUSIONS
The experiments support magnetic guidance as a lighting-invariant approach for unstable, underactuated robots. The design depends on a continuous physical magnetic strip, limiting routing flexibility compared with virtual mapping.
V. DISCUSSION & CONCLUSIONS
- A five-channel Hall-effect array in a cascaded PID architecture maintained continuous tracking under >10,000 Lux interference, where the conventional optical system lost the path.The authors attribute control of the platform's dynamics to combining high-frequency pitch stabilization with lateral steering corrections.Source: §V · p. 5
- The authors identify factories with variable lighting, outdoor routes, and shadowed warehouses as potential settings for lighting-independent navigation.These examples are presented as practical consequences of separating navigation reliability from environmental illumination.Source: §V · pp. 5–6
- The system requires a continuous magnetic strip, making infrastructure less flexible and more labor-intensive to alter than visual SLAM or LiDAR-based mapping.Future work proposed RFID for absolute localization and intersection routing, and adaptive PID for reducing curve-tracking steady-state error.Source: §V · p. 6