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.
Active STM Tip Stabilization with Reaction-Wheels + Residual RL
The Challenge
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.

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

PyTorch

MuJoCo
Gymnasium

Stable‑Baselines3
