基於微控制器的邊緣運算應用於整合式垂直地面反作用力與步態參數分析
MCU-Based Edge Computing for Integrated VGRF and Gait Parameter Analysis
摘要
本研究針對臨床復健與人體運動科學中的步態分析提出一套低成本、可穿戴、且能即時運作的整合系統。步態分析需同時量化動力學(如垂直地面反作用力,VGRF)與運動學參數(例如步距/步長、行走速度與步頻);然而,現行的黃金標準多受限於實驗室環境,而既有的穿戴式方案往往需要多顆感測器、仰賴離線運算,或無法同時整合 VGRF 與步態幾何資訊,因而難以滿足日常情境的即時監測需求。為解決上述缺口,我們開發並驗證一套僅以單一足部慣性測量單位 (IMU) 與微控制器 (MCU) 為基礎、可在裝置端即時估測 VGRF 之雙峰—著地衝擊力(Impact Force, IF)與主動推進力(Active Force, AF)以及六項時空步態參數的系統。方法上,系統以 ESP32-Pico-D4 MCU 處理來自 MPU-9250 IMU 的訊號;步態參數透過二維座標轉換與漂移校正的雙重積分取得位移後計算;VGRF 之雙峰則以適合邊緣端資源受限部署的輕量前饋式神經網路(FNN)進行估測。我們提出加權均方對數誤差(Weighted Mean Squared Logarithmic Error, WMSLE)損失函數,將學習重點聚焦於具生物力學意義的 VGRF 峰值區域,顯著提升估測準確度。實驗以 Zebris 足底壓力板與 Vicon 光學動作捕捉系統為基準,並在未參與訓練之受試者上驗證系統穩健性。所提出之機器學習方法在 IF 與 AF 的平均絕對誤差(MAE)分別達到 0.05 BW 與 0.04 BW,表現可與更複雜的先進方法相當。時空步態參數的誤差維持在 7-10% 範圍,與商用系統水準一致。整體流程於 MCU 上之推論延遲約 80ms,且記憶體占用低(SRAM 74 KB、Flash 850 KB),證實其即時可行性。本研究最終實現一個精簡、經驗證且完整整合的原型系統,提供低門檻且即時的步態分析能力,顯示其於臨床與居家監測應用的高度潛力。
Gait analysis, which quantifies both kinetic forces like the vertical ground reaction force (VGRF) and kinematic parameters (e.g., stride/step length, walking speed, and cadence), is crucial for clinical rehabilitation and human movement science. However, current gold-standard systems are confined to laboratories, while existing wearable solutions often require multiple sensors, rely on offline processing, or fail to provide an integrated analysis of both VGRF and gait geometry, limiting their utility for real-time, daily-life monitoring. This study addresses this gap by developing and validating a low-cost, wearable system that performs on-device, real-time estimation of both VGRF dual peaks—impact force (IF) and active force (AF)—and six key spatiotemporal gait parameters using only a single foot-mounted inertial measurement unit (IMU) and a microcontroller (MCU). The methodology leverages an ESP32-Pico-D4 MCU to process signals from an MPU-9250 IMU. Gait parameters are computed through a 2D coordinate transformation and drift-corrected double integration, while VGRF peaks are estimated using a lightweight feedforward neural network (FNN) specifically designed for resource-constrained edge deployment. A novel weighted mean Squared logarithmic error (WMSLE) loss function is proposed, which focuses learning on the biomechanically critical VGRF peak regions to significantly improve estimation accuracy. Experimental validation against a Zebris pressure plate and a Vicon optical motion capture system on unseen subjects demonstrated the system's robustness. The proposed ML method achieved a mean absolute error (MAE) of 0.05 BW (Body Weight) for IF and 0.04 BW for AF, demonstrating performance comparable to more complex, state-of-the-art approaches. Spatiotemporal gait parameter errors were maintained within a 7-10% range, aligning with commercial system performance. Critically, the entire pipeline runs efficiently on the MCU with an inference latency of approximately 80ms and minimal memory usage (74 KB SRAM, 850 KB Flash), confirming its real-time feasibility. This work successfully delivers a compact, validated, and fully integrated prototype that enables accessible and real-time gait analysis, showing strong potential for applications in clinical and home-based monitoring.