## 6 Sensor Data Acquisition and Collection
### Sensor Data Collection by HMM
The anomaly detection is based on an estimation of execution progress (according to Equation (9)) and the dynamic threshold (according to Equation (10)), shown with the log-likelihood data in the same figure. For an optimized detection threshold (Equation (9)), we set \(\alpha\) = 2.6, which gives a confidence interval of around 95% in each Gaussian distribution. Such a dynamic threshold allows us to effectively treat reasonable dynamic pressure fluctuations, such as due to the inherent bio-mechanical effects of socket operation at a specific phase of a gait (e.g., relating to the interplay with soft tissue of amputee stamp). For the overall evaluation, we also compare the performances of our dynamic threshold criteria and some other fixed static thresholds. As shown by Table 1, the dynamic approach could in general outperform those static approaches regarding the rates of FP (False Positive) and FN (False Negative). The main reason is that the combination of HMM and a temporal clustering with logic time for the phase alignment in our design together constitutes an effective means for fine-grained detrending of operation data with strong stochasticity. Figure 9: Characterizing execution progress based on temporal clustering. (**a**) Temporal clustering for execution progress data of multiple gait cycles. (**b**) Gaussian characteristics of execution progress data in multiple temporal clusters. ## 9 Conclusions

This paper presents a novel mechatronics framework that integrates advanced modeling, simulation, testing, and data analysis for an effective exploration of complex operational behaviors of prosthetic sockets. It serves as the analytical replica of the prosthetic operations with both virtual and physical behaviors for effective data-driven analysis and the avoidance of unnecessary trauma to the amputees. As one fundamental strategy for effective characterization of stochastic dynamic processes, we incorporate trained probabilistic models in terms of neural network and HMM. Such a data-driven approach allows us to effectively cope with the operational complexities of prosthetic sockets and embedded sensors. This also facilitates anomaly detection by probabilistic classification and dynamic threshold. One key research objective of our work is to promote an integration of technologies and scientific methods, as called for by several research communities and engineering domains (e.g., computer science, bioengineering, etc. ), as well as application and industrial areas (e.g., prosthetics, printed wearable electronics, etc.). The overall contribution is characterized by a novel combination of emulation, perception solutions, and data analysis methods. The results by case study show that the proposed solutions can fulfill the expected goals. Meanwhile, the current design of this framework would open up many perspectives for future research. To further address the fundamental challenges in analyzing the dy \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Threshold** & **False Positive Rate** & **False Negative Rate** & **Precision** \\ \hline Fixed log-likelihood (\(-3\)) & 14.75\% & 3.14\% & 85.25\% \\ Fixed log-likelihood (\(-7\)) & 2.83\% & 54.30\% & 97.07\% \\ Dynamic log-likelihood & 6.34\% & 8.71\% & 93.66\% \\ \hline \hline \end{tabular}
\end{table} 
Table 1: False Positive, False Negative, and precision with a different threshold. Figure 10: The execution progress trajectories and the detection of anomalies by dynamic threshold. The _analytical data_ is the round truth data generated by a simulation-based FEA (Finite Element Analysis) of a quadrilateral transfemoral socket with well-defined amputee gait cycles. The _reference data_ represent the load conditions with comfortable socket operation. For the evaluation of algorithmic design, each data set contains around 600 data. The _Test data_ represent the measurement from specific operational scenarios containing anomalies. namic conditions of prosthetic sockets, two venues are of particular interest for future work.