Active STM Tip Stabilization with Reaction-Wheels + Residual RL

The Challenge

Scanning Tunnelling Microscopes rely on a ~10 nm tip hovering ~2 nm above a conductive surface. The smallest bump or drift degrades the tip, forcing frequent, costly replacements and downtime. In some labs, tips last only hours and can cost up to €500 each, making high-end STM work fragile and expensive. Today’s setups lean heavily on passive isolation; they struggle with low-frequency room/building vibrations and operator-induced disturbances. We set out to actively counter those disturbances to extend tip life, improve stability, and keep microscopes working rather than being re-tipped.

The Solution

Space Needle adapts proven spacecraft attitude-control concepts to STM: a compact, multi-axis reaction-wheel head that generates precise counter-torques at the tip assembly, paired with a modern control stack that blends classical control with reinforcement learning.

On the software side, we built a physics-faithful simulator and training environment:

  • Plant and actuation. Two-axis gimbal with four miniature reaction wheels; actuator bandwidth and slew-rate limits are modeled to reflect real hardware behavior. Disturbances include randomized low-frequency sinusoidal torques to mimic lab vibrations.
  • Controller architecture. A PD-like stabilizer provides a safe baseline; a PPO policy learns a small corrective “residual” on top for robustness to actuator lags and unmodeled effects. Either residual-RL or end-to-end learning can be selected.
  • Engineering ergonomics. 1 kHz physics with 100–200 Hz control; deterministic seeding; termination on excessive tilt or wheel speed; a live MuJoCo viewer for interactive “poke” tests.

On the hardware strategy, Space Needle targets a down-scaled, gas-bearing reaction-wheel assembly. Gas bearings avoid magnetic interference near the STM junction while enabling ultra-low-friction, high-precision torqueing at the tip. The concept draws on ESA gas-bearing reaction-wheel know-how and is designed for transfer into STM head-stacks.

Space Needle simulation: reaction-wheel STM tip stabilization demo

The Result

In software, Space Needle delivers an end-to-end workflow a lab can pick up quickly:

  • Train a robust residual policy on a safe classical baseline.
  • Visualize recovery after deliberate “torque pokes” and compare baseline vs. controlled RMS/peak tip motion.
  • Enforce wheel-speed limits and anti-windup so the design stays physically realizable in a prototype.

In business terms, even a modest reduction in tip-to-sample contacts compounds quickly: extending tip life cuts direct consumables and operator interruptions. For high-end instruments, doubling tip lifespan can translate to material annual savings per device and more stable, predictable experimental time.

Project tech stack

Python programming language

Python

PyTorch deep learning framework

PyTorch

MuJoCo physics simulation engine

MuJoCo

Gymnasium reinforcement learning environment

Gymnasium

Stable-Baselines3 by DLR-RM

Stable‑Baselines3

Long-term wins

Fewer tip failures, more science time. Active stabilization reduces damaging contacts and retips, freeing hours for data collection.
Higher data quality under real lab conditions. Better low-frequency rejection improves imaging consistency without exotic isolation facilities.
A clean path from sim to bench. Physics-aware training, actuator limits, and interactive tests de-risk the jump to a gas-bearing reaction-wheel prototype.
Transferable core. The same control stack generalizes to other vibration-sensitive instruments where magnetic bearings are unsuitable.