Modern upper-limb prostheses are controlled by surface electromyography (sEMG): electrodes on the residual
forearm pick up the electrical activity of muscles the user can still contract. MyoHand reproduces the complete
pattern-recognition pipeline used in research and clinical systems.
1 · Signal model
Eight electrodes sit around the forearm like a Myo armband. Each gesture recruits a characteristic muscle synergy
(flexors, extensors, thumb muscles…). Each channel is band-limited Gaussian noise (≈ 30–150 Hz) amplitude-modulated by a
smooth activation, with repetition-to-repetition variability, electrode noise, 50 Hz interference and motion artefacts.
Fatigue lowers the spectral content (median-frequency shift) and raises amplitude.
2 · Conditioning & features
A 20 Hz high-pass removes drift and motion, an optional notch removes mains hum. Every 50 ms a 200 ms window is summarised
with the classic Hudgins time-domain features per channel:
MAV = (1/N) Σ|xᵢ| WL = (1/N) Σ|xᵢ − xᵢ₋₁|
ZC = zero crossings / N SSC = slope-sign changes / N
→ a 32-dimensional feature vector, z-scored with calibration statistics.
3 · Classifiers
- LDA — Gaussian classes with a shared (shrinkage-regularised) covariance; the clinical workhorse: tiny, fast, robust.
- k-NN — majority vote of the 5 closest calibration windows.
- MLP — 32→24 tanh→7 softmax network trained in the browser with Adam.
Accuracy is measured on the last repetition of every gesture (never seen in training). Overlapping windows
from one contraction are highly correlated, so a random split would overestimate performance.
4 · Control
Decisions are smoothed with a majority vote; low-confidence windows are rejected to Rest. The hand moves towards the
decoded posture at a speed proportional to contraction intensity (proportional control).
Things to try
- Rotate the armband by half an electrode — accuracy collapses. Recalibrate to recover.
- Add fatigue and watch the live feature point drift away from its cluster.
- Turn the notch off with strong 50 Hz interference.
- Compare LDA and MLP after an electrode shift.