Each of the six grasp intents drives a fixed, distinct per-channel activation pattern. A synthetic motor-unit firing model turns that pattern plus your contraction level into biphasic action-potential bursts on every electrode channel, with independent noise added per sample:
amp_c = pattern_c * contraction
nMU_c = round(amp_c * 15 + 1)
x_c(t) = sum of nMU_c biphasic MUAPs + noise*(rand-0.5)*0.8
RMS_c = sqrt(1/N * sum(x_c^2)) [power → contraction]
MAV_c = 1/N * sum(|x_c|) [amplitude]
ZC_c = zero-crossing rate [frequency content]
s_c = RMS_c / sum(RMS) [contraction-invariant channel share]
x = (s_1 ... s_n, mean RMS) [feature vector, LDA input]
y = argmax_g wg . z + bg, wg = S^-1 mu_g [pooled-covariance LDA]
The classifier is a genuine Linear Discriminant Analysis fit each time the electrode count or noise level changes: 30 synthetic calibration windows per grasp are generated across the usable contraction range, standardised, and used to compute class means and a pooled within-class covariance matrix inverted with Gauss-Jordan elimination. The discriminant score is turned into a softmax confidence, and a held-out test set (not used for fitting) reports the classifier's real accuracy.
- EMG traces — scrolling rectified envelope per electrode channel.
- Feature space — channel-1 vs channel-2 RMS share, live point over the fitted class clusters.
- Hand pose — finger curl driven directly by the classifier's predicted grasp.