All research

Wearable biomechanics · 2019–2021

Wearable gait and EMG analysis for diabetic polyneuropathy

A low-cost wireless smart insole and machine-learning models that study altered vertical ground reaction forces in diabetic sensorimotor polyneuropathy.

Qatar University BSc senior design project · Qatar National Research Fund UREP23-031-2-014 and NPRP12S-0227-190164

System diagram. A shoe holds a pressure and temperature sensor array and a control circuit. The footwear subsystem passes sensor signals through a filter, switching matrix, multiplexer, analogue-to-digital converter and data buffer to a microcontroller with a power management unit, and sends data over Bluetooth Low Energy to a computer with a classification interface showing foot maps and a severity scale. On the right, two insoles each carry 16 pressure and eight temperature sensors read through multiplexers by battery-powered microcontrollers.
Figure 1 of the UREP poster (Mahmud et al., 2021). The footwear subsystem and the classification subsystem with its smart display, with a detailed view of the insole sensor layout and readout.View full-size figureUREP poster (2021)

Approach

Can a low-cost wireless insole record the changes in foot loading that diabetic sensorimotor polyneuropathy causes, and can machine learning use them to separate healthy, diabetic and ulcer gait?

Diabetic sensorimotor polyneuropathy damages the nerves of the feet, so people lose sensation, load their feet abnormally and may not notice wounds that can become ulcers. These changes show up in the vertical ground reaction force, the force the foot presses into the ground during each step. The project built a low-cost wireless insole to record that force and plantar temperature at home, a real-time logger and display, and machine-learning models that separate healthy, diabetic and ulcer groups from their gait.

  1. Record plantar force and temperature
  2. Log and display in real time
  3. Classify gait with machine learning

Designing a low-cost wireless insole

BSc senior design project · Qatar University · 2019–2020

The system was my BSc senior design project in Electrical Engineering, with teammates Abdulrahman Al-Ansari and Ghazi Abusamaha, supervised by Dr Muhammad E. H. Chowdhury and Prof. Farid Touati. Its goal was a portable insole for continuous home monitoring of people with diabetes, recording plantar loading and temperature so that changes linked to neuropathy and ulceration could be caught early.

After comparing force-sensitive resistors, piezoelectric discs and a Velostat sheet, each insole used 16 force-sensitive resistors to record vertical ground reaction force and eight flexible thermistors, both calibrated before assembly. Bluetooth Low Energy was chosen over Wi-Fi and ZigBee for its low power use. An ESP32-based TinyPICO microcontroller reads the sensors through multiplexers and buffers on a compact two-sided PCB that went through four design revisions. A lithium-polymer battery powers the board, and a 3D-printed enclosure straps it to the leg.

The design targets included a wireless range of at least 15 m, about 2.5 ms latency, at least 20 Hz sampling per sensor, under 1 Wh power use, and a board no larger than 5 × 5 cm weighing under 200 g with its case. The components cost about QAR 1,600, around 65% of it for the force sensors, against more than US$20,000 for commercial systems.

Force and temperature sensors per insole
16 + 8
Estimated component cost
≈ QAR 1,600
Sampling rate per sensor (design target)
≥ 20 Hz
Three panels: a green PCB layout labelled with the TinyPICO microcontroller, a multiplexer and a buffer; the assembled black PCB with the microcontroller and a red motion-sensor board; and a rendered black 3D-printed enclosure.
From the senior design project report (Mahmud, Al-Ansari and Abusamaha, 2020): the PCB layout, the assembled PCB and the rendered enclosure that straps the electronics to the leg.View full-size figureSenior design project report (2020)

Real-time data logging and display

Senior design project · 2020

A Python data logger receives the Bluetooth stream from the central device, saves it to Excel or CSV files in a local database, and handles missing or null values with basic preprocessing. The display draws 2D and 3D pressure heat maps of both feet and shows how loading moves through the stance and swing phases of the gait cycle. The same pipeline can pass logged or external data to a trained model to classify a new subject in near real time.

Left: 2D and 3D foot pressure maps of both feet, and a row of pressure maps from heel strike through foot flat, midstance, heel-off and toe-off to swing. Right: a flowchart from the Bluetooth central device through a serial port and Python to an Excel spreadsheet and local database, and a machine-learning workflow from the data logger through preprocessing, training and testing to classified data.
From the UREP poster (Mahmud et al., 2021): foot pressure maps across the gait cycle, the data-logger flowchart and the machine-learning workflow.View full-size figureUREP poster (2021)

Classifying control, diabetic and ulcer gait

Qatar National Research Fund UREP23-031-2-014 · 2020–2021

The COVID-19 lockdown in 2020 stopped data collection in hospitals and clinics, so the classifiers were developed on published force-plate recordings from Akashi et al. (2008, Clinical Biomechanics). Those recordings cover vertical ground reaction force and EMG from 76 people: 21 controls, 21 with diabetes but no ulcer, and 34 with current or previous foot ulcers. The force signals were segmented into steps and normalised, and 33 statistical, spectral and wavelet features were extracted for each subject.

MATLAB’s Classification Learner was trained with five-fold cross-validation, holding out 20% of subjects in each fold. Fine k-nearest neighbours and quadratic, medium Gaussian and cubic support vector machines performed best. Controls were recognised most reliably and diabetic subjects without ulcers least reliably, with a recall of 70%.

The project was supported by the QNRF Undergraduate Research Experience Program (UREP23-031-2-014). It was nominated at the 13th Annual QNRF–UREP Competition in 2021, where the team presented this poster.

Subjects: 21 control, 21 diabetic, 34 ulcer
76
Average accuracy for the control class
94.8%
Features extracted from each force signal
33
Per-class performance averaged across the four classifiers and five test folds, with the best single classifier for each measure, as reported on the UREP poster.
ControlDiabeticUlcer
Accuracy94.8%89.6%87.0%
Precision92.0%94.2%81.2%
Recall91.6%70.0%94.4%
F1 score91.6%76.8%86.0%
Best classifierFine kNN for every measureFine kNN; medium Gaussian SVM for precisionFine kNN for accuracy; quadratic SVM for the rest
Grid of normalised vertical ground reaction force curves over a step. Left column: individual curves for control subjects in green, diabetic subjects in blue and ulcer subjects in red. Right column: the mean curve and standard deviation band for each group.
From the senior design project report (2020): segmented, normalised vertical ground reaction force curves per class (left) and their mean and standard deviation (right). Green shows controls, blue diabetic subjects and red ulcer subjects.View full-size figureSenior design project report (2020)

Gait-cycle and EMG analysis

Qatar National Research Fund NPRP12S-0227-190164 · April–June 2021

In 2021 the work continued within a Qatar National Research Fund project on wearable monitoring of diabetic sensorimotor polyneuropathy. I used machine learning to analyse gait-cycle measurements together with electromyography, the electrical activity of the leg muscles during walking, to study wearable markers of distal symmetric polyneuropathy.

My contribution

I was first author of the UREP poster. In the senior design project I calibrated the temperature sensors, designed the third and fourth PCB revisions, redesigned the insole with a teammate, and built the machine-learning pipeline: signal segmentation and normalisation, feature extraction, classifier training and evaluation. Under the NPRP project I analysed gait-cycle and EMG data with machine learning.

Study scope

The pandemic prevented the team from recording its own participants, so the classifiers were trained and tested on 76 subjects from a published force-plate dataset rather than on insole recordings. With so few subjects per class, the results show feasibility rather than clinical performance. The report’s next steps were to finish the hardware, record at least 500 participants with clinical approval, and move to deep learning.