Lukáš Hrdý

All projects

Interactive STM & FM-AFM simulation

A teaching simulation of the feedback loop of a scanning tunnelling microscope and an atomic force microscope, controlled with sliders directly in the browser.

Where
KFPP Summer Student Project 2026, Charles University
Supervisor
doc. RNDr. Pavel Kocán, Ph.D.
When
09/2026

A simulation of the feedback loop of an STM (constant-current mode) and a frequency-modulation AFM (qPlus sensor). It is controlled with sliders instead of code edits: P / I / PI controller, different surfaces, noise scaled from measured values, constant-current vs. constant-height mode.

The AFM part computes the force F(d) and the frequency shift Δf(d) with the stable branch, resonance and phase, including the loss of stability beyond the Δf minimum. A combined STM + AFM mode uses one oscillating conducting tip.

Python runs directly in the browser (JupyterLite / Pyodide); the interface is in Czech and English and every parameter states where its value comes from.

Simplified illustration. The full simulation is in the demo.

  • recorded tip height
  • ideal constant-current contour
  • I / Iset =
The tip scans over an atomic surface with a one-atom-high island. A PI controller moves the tip so that the tunnelling current I ∝ exp(−2κ·gap) stays constant. With a low I gain the tip tracks sluggishly; a high I gain with little P overshoots and rings.

Key results

  • Public interactive demo running in the browser
  • Tests checking the physics and that the panels match the batch scripts