Project · wearable sensing → assistive robotics · 2026

Does knowing a person's next step make a knee exoskeleton better?

I trained classifiers that predict, from body-worn sensors, whether a person is about to walk, take a ramp, climb or descend stairs, or stop. I then used their predictions to switch the controller of a simulated knee exoskeleton in MuJoCo and measured how much better it follows the knee.

Independent projectPython · scikit-learn · PyTorch · MuJoCoPublic data: ENABL3S

90-second walkthrough: problem, method, results and the closed-loop simulation. Silent, with captions.

8.5%mode-prediction error on people the model never saw (leave-one-subject-out)
8.2%with IMU + goniometer only, so EMG was not needed
3.3×lower knee-tracking error than a fixed exoskeleton controller
22,411gait events from 10 people, 7 locomotion modes
The question

An exoskeleton has to know what you are about to do

A powered knee exoskeleton should help differently on level ground, on ramps and on stairs. Climbing stairs needs a strongly bent knee and a lot of support, and walking on the flat needs much less. The device cannot ask the user. It has to infer the next activity from body-worn sensors, one step ahead, and if it is wrong or late it pushes the knee the wrong way.

I asked three questions: (1) How well can wearable sensors predict the next locomotion mode for a person the system has never seen? (2) Which sensors are actually needed? (3) Does better intent recognition translate into better exoskeleton behaviour?

Approach

From raw signals to a closed loop

Data: ENABL3S (Hu, Rouse & Hargrove, Front. Robot. AI 2018). 10 able-bodied people walked a circuit of level ground, ramps and stairs wearing IMUs, surface EMG and goniometers on both legs, recorded at 1 kHz.

Gait-event windows

300 ms of all 52 channels, ending at each heel contact and toe-off; channels ordered by the leg that triggered the event

Features

284 per window: mean, SD, min, max, first and last for the mechanical channels; MAV, WL, ZC and SSC for EMG

Classifiers

LDA, SVM, random forest, and a 1D-CNN (~50k parameters) on the downsampled raw window

Honest evaluation

Leave-one-subject-out; error reported separately for steady walking and for transitions

Knee exo in MuJoCo

The predicted mode switches the reference and gains of an impedance controller with inverse-dynamics feedforward

Result 1

8.5% error on unseen people, but transitions are the hard part

My features with a random forest reached 8.5% overall error, slightly better than the features supplied with the dataset (9.0%). In steady walking the error is only 3.8%, but at transitions, the moments that matter most for an exoskeleton, it rises to 24.7%.

The SVM (18.6%) and the 1D-CNN (21.4%) are better at transitions. The most common mistake is switching one step late: walking → ramp descent (65% error) and walking → standing (60%) are usually still predicted as walking.

ModelOverallSteadyTransition
LDA, own features14.88.137.5
SVM, own features11.79.618.6
RF, own features8.53.824.7
RF, provided features9.04.225.1
1D-CNN, raw windows12.29.621.4

Error in %, leave-one-subject-out over 10 subjects.

Bar chart of steady and transition error for each classifier
Result 2

EMG was not needed

I retrained the random forest on each sensor group. IMU + goniometer alone gave 8.2%, as good as all sensors together (8.5%). EMG alone gave 23.0%, and EMG features made up only 18% of the forest's feature importance.

For a wearable device this is good news: EMG electrodes are the hardest sensors to put on, keep in place and calibrate.

Waiting longer helps only a little: ending the window 120 ms after the gait event lowers transition error from 24.7% to 22.3%. Deciding at the gait event itself costs little.

Error by sensor set for LDA and random forest
Error by sensor set (left: LDA, right: random forest).
Result 3

Closing the loop: 3.3× lower knee error

A MuJoCo model of a leg on a test bench: the thigh is fixed and the shank and foot are moved only by the exoskeleton motor (limited to 60 Nm), as if the user's own muscles were weak. Each mode has a reference knee trajectory taken from the dataset, and the controller combines inverse-dynamics feedforward with per-mode impedance gains. At every heel contact the mode is chosen by one of three sources, and I ran every circuit of all 10 test subjects:

Mode chosen byKnee RMSE [°]Max error [°]Mean torque [Nm]
Oracle (true mode)0.544.18.2
My classifier (RF, leave-one-subject-out)4.1324.38.2
Fixed level-walking controller13.4955.47.7

A real recorded walk of test subject AB156, never used in training. Brown leg = the simulated leg moved by the exo; transparent green = the knee angle the person needed. Grey bands in the bottom plot mark strides where the classifier chose the wrong mode.

Knee tracking RMSE per test subject for the three controllers
Knee-tracking error for each test subject.

Most of the remaining error comes from a few strides. The most harmful mistake is a wrong "standing" guess during walking: the controller then holds the knee almost straight while the person needs it to bend. In a real device that is a safety issue, and it suggests a rule such as "never switch to standing in the middle of a stride".

Limits

What this does not show

  • The exoskeleton is simulated: a leg on a bench with a passive user, not a person walking with a real device.
  • All 10 subjects are able-bodied. People who need an exoskeleton move differently, so the error would likely be higher.
  • The classifier decides once per stride, at heel contact. A real controller would also need confidence thresholds and safe fallback modes.
Built with
PythonNumPy · pandasscikit-learnPyTorchMuJoCo 3JupyterMatplotlib

All code (data parsing, features, models, controller, simulation and videos) was written for this project. It is available on request: tasfiaa.chowdhury@gmail.com.

Data: B. Hu, E. Rouse and L. Hargrove, "Benchmark datasets for bilateral lower-limb neuromechanical signals from wearable sensors during unassisted locomotion in able-bodied individuals," Frontiers in Robotics and AI 5:14, 2018. doi:10.3389/frobt.2018.00014