Skip to content

Gait Analysis Algorithm

lucaros95 edited this page Apr 15, 2019 · 5 revisions

A four-layer Convolutional Neural Network (CNN) was used to classify walking by the gait nature, shown in the figure below. This was done using 20 data series: 6 for each of the IMUs, and 1 for each foot from the combination of the FSRs embedded in the toe and heel regions.

Signal Processing for CNN training

Filtering, Chunking, Resampling

An FFT is calculated using the data from the FSR mounted at the heel of one foot stored in a circular buffer to calculate the dominant frequency of the gait. This is done periodically on a separate thread. A 5th-order butterworth bandpass filter is then applied to the data every second around the obtained frequency.

Each signal is then chunked into gait cycles using peak analysis, and the last cycle is obtained. This is finally resampled to 20 data points. In short, this algorithm aims to replicate in real-time the offline processing employed to train the CNN.

Communication architecture

A streamer executable gathers data from all sensors and acts as a websockets server, sending the data over a specific port (9004). Other executables act as clients that connect to the server. This allows communication both through the internet on different machines and both locally on the Raspberry Pi. These executables include StreamReader, QtSensorsDisplay, and GaitAnalysis.

Click here to go back to the Software section of the Wiki.