<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.1 20151215//EN" "http://jats.nlm.nih.gov/publishing/1.1/JATS-journalpublishing1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xml:lang="en" article-type="research-article" dtd-version="1.1">
<front>
<journal-meta>
<journal-id journal-id-type="pmc">CMC</journal-id>
<journal-id journal-id-type="nlm-ta">CMC</journal-id>
<journal-id journal-id-type="publisher-id">CMC</journal-id>
<journal-title-group>
<journal-title>Computers, Materials &#x0026; Continua</journal-title>
</journal-title-group>
<issn pub-type="epub">1546-2226</issn>
<issn pub-type="ppub">1546-2218</issn>
<publisher>
<publisher-name>Tech Science Press</publisher-name>
<publisher-loc>USA</publisher-loc>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">77791</article-id>
<article-id pub-id-type="doi">10.32604/cmc.2026.077791</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Article</subject>
</subj-group>
</article-categories>
<title-group>
<article-title>Efficient Gait Phase Estimation and Trajectory Prediction in Wearable Devices Using a Dual-Stage Approach</article-title>
<alt-title alt-title-type="left-running-head">Efficient Gait Phase Estimation and Trajectory Prediction in Wearable Devices Using a Dual-Stage Approach</alt-title>
<alt-title alt-title-type="right-running-head">Efficient Gait Phase Estimation and Trajectory Prediction in Wearable Devices Using a Dual-Stage Approach</alt-title>
</title-group>
<contrib-group>
<contrib id="author-1" contrib-type="author">
<name name-style="western"><surname>Wang</surname><given-names>Sihan</given-names></name><xref ref-type="aff" rid="aff-1">1</xref></contrib>
<contrib id="author-2" contrib-type="author">
<name name-style="western"><surname>Liu</surname><given-names>Luyao</given-names></name><xref ref-type="aff" rid="aff-2">2</xref></contrib>
<contrib id="author-3" contrib-type="author" corresp="yes">
<name name-style="western"><surname>Wang</surname><given-names>Xingjun</given-names></name><xref ref-type="aff" rid="aff-3">3</xref><xref rid="cor1" ref-type="corresp">&#x002A;</xref><email>wangxingjun@tsinghua.edu.cn</email></contrib>
<contrib id="author-4" contrib-type="author" corresp="yes">
<name name-style="western"><surname>Liu</surname><given-names>Yifan</given-names></name><xref ref-type="aff" rid="aff-3">3</xref><xref rid="cor1" ref-type="corresp">&#x002A;</xref><email>lyf.2022@tsinghua.org.cn</email></contrib>
<aff id="aff-1"><label>1</label><institution>School of Information Science and Engineering, Lanzhou University</institution>, <addr-line>Lanzhou</addr-line>, <country>China</country></aff>
<aff id="aff-2"><label>2</label><institution>School of Computer Science and Technology, University of Science and Technology of China</institution>, <addr-line>Hefei</addr-line>, <country>China</country></aff>
<aff id="aff-3"><label>3</label><institution>SIGS, Tsinghua University</institution>, <addr-line>Beijing</addr-line>, <country>China</country></aff>
</contrib-group>
<author-notes>
<corresp id="cor1"><label>&#x002A;</label>Corresponding Authors: Xingjun Wang. Email: <email>wangxingjun@tsinghua.edu.cn</email>; Yifan Liu. Email: <email>lyf.2022@tsinghua.org.cn</email></corresp>
</author-notes>
<pub-date date-type="collection" publication-format="electronic">
<year>2026</year>
</pub-date>
<pub-date date-type="pub" publication-format="electronic">
<day>9</day><month>4</month><year>2026</year>
</pub-date>
<volume>87</volume>
<issue>3</issue>
<elocation-id>85</elocation-id>
<history>
<date date-type="received">
<day>17</day>
<month>12</month>
<year>2025</year>
</date>
<date date-type="accepted">
<day>26</day>
<month>02</month>
<year>2026</year>
</date>
</history>
<permissions>
<copyright-statement>&#x00A9; 2026 The Authors. Published by Tech Science Press.</copyright-statement>
<copyright-year>2026</copyright-year>
<copyright-holder>The Authors</copyright-holder>
<license xlink:href="https://creativecommons.org/licenses/by/4.0/">
<license-p>This work is licensed under a <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</ext-link>, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.</license-p>
</license>
</permissions>
<self-uri content-type="pdf" xlink:href="TSP_CMC_77791.pdf"></self-uri>
<abstract>
<p>This paper presents a novel dual-stage approach for efficient gait phase recognition and trajectory prediction, tailored for the operation of wearable devices such as exoskeletons. By leveraging dynamic template matching techniques and addressing their computational challenges, we propose an innovative algorithm that significantly enhances both prediction accuracy and computational efficiency. The approach integrates Dynamic Time Warping-KMeans (DTW-KM) template selection in the offline phase and a Soft Constraint Weighted (SCW) template matching technique in the online phase. In the offline stage, the DTW-KM method extracts diverse and generalizable gait patterns from a database, establishing a robust set of templates for future gait recognition. The online stage then adapts to real-time gait dynamics using the SCW method, which incorporates soft constraints and quadratic weighting to improve prediction stability and adaptability to individual gait variations. Preliminary results demonstrate that the algorithm achieves stable gait phase predictions within 0.5&#x2013;1 s intervals with high efficiency on embedded systems. The dual-stage framework not only ensures scalable and real-time gait prediction performance across varying speeds and conditions but also provides a solid foundation for the deployment of wearable technology in dynamic environments.</p>
</abstract>
<kwd-group kwd-group-type="author">
<kwd>Wearable devices</kwd>
<kwd>movement analysis</kwd>
<kwd>human activity recognition</kwd>
<kwd>gait trajectory prediction</kwd>
<kwd>gait phase recognition</kwd>
</kwd-group>
<funding-group>
<award-group id="awg1">
<funding-source>Shenzhen Municipal Natural Science Foundation and Shenzhen Science and Technology Innovation Committee</funding-source>
<award-id>KCXFZ202002011010487</award-id>
</award-group>
<award-group id="awg2">
<funding-source>Shenzhen Municipal Natural Science Foundation</funding-source>
<award-id>WDZC20200818121348001</award-id>
</award-group>
</funding-group>
</article-meta>
</front>
<body>
<sec id="s1">
<label>1</label>
<title>Introduction</title>
<p>Wearable devices, particularly exoskeletons, are increasingly recognized for their potential to assist individuals with mobility impairments or those facing physically demanding tasks [<xref ref-type="bibr" rid="ref-1">1</xref>]. These devices offer critical support in enhancing motor functions by amplifying or assisting user movements. However, their efficacy heavily depends on the ability to synchronize seamlessly with the user&#x2019;s natural gait [<xref ref-type="bibr" rid="ref-2">2</xref>], a challenge that requires precise estimation of gait phases [<xref ref-type="bibr" rid="ref-3">3</xref>] and accurate prediction of movement [<xref ref-type="bibr" rid="ref-4">4</xref>]. The accurate and timely delivery of assistance is crucial not only for ensuring the device&#x2019;s effectiveness but also for optimizing user comfort, minimizing energy consumption, and safeguarding user well-being.</p>
<p>A fundamental challenge in the development of wearable exoskeletons lies in the gap between the real-time dynamics of human gait and the assistive actions of the device. Gait phase estimation and trajectory prediction need to occur with minimal delay to ensure that the exoskeleton&#x2019;s movements align with the user&#x2019;s natural rhythm [<xref ref-type="bibr" rid="ref-5">5</xref>]. Any delay in signal processing can lead to a mismatch, increasing physical strain on the user and compromising both the functionality and safety of the device [<xref ref-type="bibr" rid="ref-6">6</xref>]. Existing solutions in this domain often struggle with latency, impacting the precision and responsiveness of the system. Furthermore, gait analysis algorithms can impose substantial computational burdens when advanced techniques such as deep learning are employed, which may limit their practical deployment for real-time operation on resource-constrained embedded hardware [<xref ref-type="bibr" rid="ref-7">7</xref>] commonly used in wearable devices.</p>
<p>To address these concerns, a robust gait trajectory prediction system for wearable technologies must fulfill three primary requirements: low latency [<xref ref-type="bibr" rid="ref-8">8</xref>], high accuracy [<xref ref-type="bibr" rid="ref-9">9</xref>], and computational efficiency [<xref ref-type="bibr" rid="ref-10">10</xref>]. Low-latency systems are essential for real-time assistance delivery, while high prediction precision ensures that the device&#x2019;s movements are in sync with the user&#x2019;s gait, reducing both fatigue and the risk of injury [<xref ref-type="bibr" rid="ref-11">11</xref>]. Computational efficiency is critical, as wearable devices often operate with limited memory and processing power, necessitating lightweight algorithms that can still deliver reliable performance.</p>
<p>Despite advancements in sensor technology and algorithmic design [<xref ref-type="bibr" rid="ref-12">12</xref>], several challenges persist in current systems for gait phase estimation [<xref ref-type="bibr" rid="ref-13">13</xref>] and trajectory prediction [<xref ref-type="bibr" rid="ref-14">14</xref>]. First, most existing methods struggle with dynamic scenario adaptability [<xref ref-type="bibr" rid="ref-15">15</xref>]. These approaches often rely on fixed gait templates, which fail to capture the variability in human gait across different walking conditions, such as changes in walking speed or variations in terrain. Second, individual gait variations introduce another layer of complexity [<xref ref-type="bibr" rid="ref-16">16</xref>]. Traditional template matching techniques are not sufficiently flexible to accommodate the unique gait patterns of different users, leading to inconsistencies and reduced prediction accuracy. Finally, the embedded resource constraints of wearable devices impose additional limitations on the use of complex [<xref ref-type="bibr" rid="ref-17">17</xref>], high-precision models, necessitating innovative solutions that balance algorithmic complexity with real-time operational demands.</p>
<p>This paper proposes a novel dual-stage framework for gait phase estimation and trajectory prediction, aimed at overcoming these challenges while maintaining the practical viability of wearable exoskeletons. The proposed framework divides the gait prediction process into two distinct phases: offline learning and online prediction. The offline learning phase focuses on extracting generalized gait templates from a large-scale gait dataset, while the online prediction phase ensures real-time adaptation to individual gait patterns and dynamic walking conditions. By combining offline template extraction with real-time prediction adjustments, this framework enhances both the accuracy and efficiency of gait prediction, making it suitable for resource-limited wearable systems.</p>
<p>Through this dual-stage approach, the system is able to deliver high-precision gait predictions that are responsive to real-time changes in gait, even under varying walking conditions. Furthermore, the method&#x2019;s lightweight design ensures that it can be deployed on embedded devices without compromising performance. The schematic diagram of this dual-branch framework is shown in <xref ref-type="fig" rid="fig-1">Fig. 1</xref>, which outlines the offline learning and online prediction components. In the offline phase, generalized gait templates are extracted using DTW and K-means clustering, while the online phase focuses on real-time matching and adaptation through SCW. This combination allows the system to bridge the gap between offline generalization and real-time precision, ensuring both scalability and practicality for wearable devices.</p>
<fig id="fig-1">
<label>Figure 1</label>
<caption>
<title>Schematic diagram of the dual-branch framework for offline learning and online prediction in embedded software.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_77791-fig-1.tif"/>
</fig>
<p>Unlike studies that focus on the mechanical design of ankle exoskeletons, this work targets the control-layer problem of gait phase estimation and trajectory prediction. In particular, the proposed framework is designed to cope with gait irregularities commonly observed in hemiparetic patients, such as phase asymmetry, variable stride duration, and local gait abnormalities. By combining DTW-based offline template learning with soft-constrained online adaptation, the proposed method relaxes the common assumptions of gait periodicity and symmetry, making it more suitable for ankle exoskeleton control in impaired gait scenarios.</p>
<p>This work offers a scalable and effective solution to the challenges of gait prediction in wearable technologies, laying the groundwork for the next generation of intelligent exoskeletons that can seamlessly integrate with their users&#x2019; natural movement dynamics.</p>
<p>Key Contributions:
<list list-type="simple">
<list-item><label>1.</label><p>A dual-stage gait prediction framework that separates the complex tasks of offline learning and online prediction, optimizing for both precision and efficiency.</p></list-item>
<list-item><label>2.</label><p>Real-time adaptation mechanism that addresses latency and individual variability by employing soft constraint weights and quadratic loss functions, ensuring stable and accurate predictions.</p></list-item>
<list-item><label>3.</label><p>Lightweight design suitable for embedded hardware that maintains high prediction accuracy while being computationally efficient for wearable devices.</p></list-item>
</list></p>
</sec>
<sec id="s2">
<label>2</label>
<title>Related Work</title>
<p>Human-exoskeleton interaction has become a major research focus in wearable robotics, particularly for lower-limb exoskeletons designed to assist or rehabilitate gait. Accurate gait phase recognition and motion prediction are essential for achieving effective, safe, and comfortable assistance. Existing studies related to this work can be broadly categorized into event-based gait phase detection, learning-based gait prediction methods, bio-inspired gait generation approaches, and multimodal human-exoskeleton cooperative control strategies.</p>
<sec id="s2_1">
<label>2.1</label>
<title>Event-Based Gait Phase Detection Methods</title>
<p>Early gait phase recognition methods for wearable exoskeletons mainly relied on event detection, such as heel-strike and toe-off, using foot switches, pressure insoles, or kinematic thresholds. These approaches are computationally efficient and easy to implement, making them suitable for real-time control.</p>
<p>However, event-based methods inherently provide discrete gait state transitions, which may lead to abrupt changes in control commands. This limitation can reduce control smoothness and negatively affect human-exoskeleton interaction, especially during speed transitions or irregular gait patterns. Moreover, these methods are sensitive to sensor noise and may suffer from reduced robustness in pathological gait conditions.</p>
</sec>
<sec id="s2_2">
<label>2.2</label>
<title>Learning-Based Gait Phase and Trajectory Prediction</title>
<p>With advances in machine learning, various data-driven approaches have been proposed for gait phase estimation and trajectory prediction. Neural networks such as artificial neural networks (ANNs), support vector machines (SVMs), and especially long short-term memory (LSTM) networks [<xref ref-type="bibr" rid="ref-18">18</xref>] have been widely adopted due to their ability to model temporal dependencies in gait signals.</p>
<p>Learning-based methods have demonstrated high prediction accuracy and adaptability across different walking speeds and subjects. Some studies have extended these approaches to continuous gait phase estimation and short-term trajectory forecasting for exoskeleton control. Nevertheless, these methods typically require large training datasets and involve considerable computational complexity. Their real-time performance on embedded systems commonly used in wearable exoskeletons remains a challenge, and model generalization to unseen gait patterns or impaired users is still an open issue.</p>
</sec>
<sec id="s2_3">
<label>2.3</label>
<title>Bio-Inspired Gait Generation Based on Central Pattern Generators</title>
<p>Bio-inspired control strategies based on central pattern generators (CPGs) [<xref ref-type="bibr" rid="ref-19">19</xref>] have also been extensively studied for gait planning [<xref ref-type="bibr" rid="ref-20">20</xref>] and lower-limb exoskeleton control. CPG-based approaches generate rhythmic joint trajectories using coupled nonlinear oscillators [<xref ref-type="bibr" rid="ref-21">21</xref>], enabling smooth and continuous motion patterns.</p>
<p>These methods offer advantages in terms of biological plausibility and motion continuity. However, CPG-based gait generation often relies on predefined oscillatory structures and parameter tuning. Adapting such models to irregular, asymmetric, or pathological gait&#x2014;common in rehabilitation scenarios&#x2014;can be challenging and may require additional adaptive or supervisory mechanisms.</p>
</sec>
<sec id="s2_4">
<label>2.4</label>
<title>Multimodal Human&#x2013;Exoskeleton Cooperative Control</title>
<p>More recently, research has shifted toward multimodal human-exoskeleton cooperative control frameworks [<xref ref-type="bibr" rid="ref-22">22</xref>], which integrate multiple wearable sensors such as inertial measurement units (IMUs) [<xref ref-type="bibr" rid="ref-23">23</xref>], force sensors [<xref ref-type="bibr" rid="ref-24">24</xref>], plantar pressure sensors, and electromyography (EMG). These systems typically adopt a hierarchical or multi-level control architecture, where high-level intent or gait state estimation informs low-level joint control.</p>
<p>While multimodal approaches enhance robustness and adaptability, they also increase system complexity, sensor requirements, and computational burden. In practical wearable exoskeleton applications, especially ankle exoskeletons, minimizing sensor dependency and computational cost remains an important consideration.</p>
</sec>
<sec id="s2_5">
<label>2.5</label>
<title>Positioning of the Present Work</title>
<p>Different from system-level cooperative control strategies or learning-intensive prediction models, this paper focuses on a lightweight and real-time gait phase recognition and trajectory prediction framework for ankle exoskeletons. By employing a dual-stage approach based on DTW and short-term trajectory prediction, the proposed method achieves continuous gait phase estimation without requiring extensive training or multimodal sensing.</p>
<p>The proposed approach is complementary to existing multimodal or hierarchical control frameworks and can serve as a reliable perception and prediction module for practical ankle exoskeleton systems, particularly under real-time and embedded hardware constraints.</p>
</sec>
</sec>
<sec id="s3">
<label>3</label>
<title>DTW-KM Template Selection Method</title>
<sec id="s3_1">
<label>3.1</label>
<title>Model Architecture</title>
<p>The DTW and KM template selection method, as depicted in <xref ref-type="fig" rid="fig-2">Fig. 2</xref>, combines the temporal alignment capability of DTW with the clustering strength of K-Means to extract representative gait cycle templates from gait data. This method is sensitive to disparities in walking conditions, such as changes in walking speed and terrain, and is able to accommodate the variability of individual gait patterns. By merging these two techniques, DTW-KM effectively captures the dynamic nature of human gait while providing a robust mechanism to identify key gait patterns in diverse walking scenarios.</p>
<fig id="fig-2">
<label>Figure 2</label>
<caption>
<title>Overview of the DTW-KM template selection method.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_77791-fig-2.tif"/>
</fig>
<p>The process begins by segmenting the raw gait data into discrete gait cycles, resulting in a gait database denoted <inline-formula id="ieqn-1"><mml:math id="mml-ieqn-1"><mml:mrow><mml:mi>&#x1D4AF;</mml:mi></mml:mrow><mml:mo>=</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msub><mml:mi>T</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>T</mml:mi><mml:mn>2</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>T</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula>, where each <inline-formula id="ieqn-2"><mml:math id="mml-ieqn-2"><mml:msub><mml:mi>T</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> represents an individual gait cycle sample. These gait cycles are the fundamental units for further analysis, as they form the raw input for the DTW distance computation.</p>
<p>Next, DTW is employed to compute the distance <inline-formula id="ieqn-3"><mml:math id="mml-ieqn-3"><mml:mi>d</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>T</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>T</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> between each pair of gait cycles. The DTW distance measures the similarity between two gait cycles while accounting for temporal misalignments, such as variations in duration or speed. This step produces a DTW distance matrix <inline-formula id="ieqn-4"><mml:math id="mml-ieqn-4"><mml:mi>W</mml:mi><mml:mo>=</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:msub><mml:mi>w</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mo stretchy="false">]</mml:mo><mml:mrow><mml:mi>n</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, where each element <inline-formula id="ieqn-5"><mml:math id="mml-ieqn-5"><mml:msub><mml:mi>w</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> represents the DTW distance between gait cycles <inline-formula id="ieqn-6"><mml:math id="mml-ieqn-6"><mml:msub><mml:mi>T</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> and <inline-formula id="ieqn-7"><mml:math id="mml-ieqn-7"><mml:msub><mml:mi>T</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:math></inline-formula>:
<disp-formula id="eqn-1"><label>(1)</label><mml:math id="mml-eqn-1" display="block"><mml:msub><mml:mi>w</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mtext>DTW</mml:mtext></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>T</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>T</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></disp-formula></p>
<p>Importantly, this distance is normalized to ensure that differences in duration and speed across gait cycles do not distort the measurement.</p>
<p>Each row of this distance matrix, <inline-formula id="ieqn-8"><mml:math id="mml-ieqn-8"><mml:msub><mml:mi>w</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>&#x2217;</mml:mo></mml:mrow></mml:msub></mml:math></inline-formula>, can be viewed as a vector <inline-formula id="ieqn-9"><mml:math id="mml-ieqn-9"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">V</mml:mtext></mml:mrow><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula>, representing the gait cycle <inline-formula id="ieqn-10"><mml:math id="mml-ieqn-10"><mml:msub><mml:mi>T</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> in a high-dimensional feature space. Specifically, the vector <inline-formula id="ieqn-11"><mml:math id="mml-ieqn-11"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">V</mml:mtext></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:msub><mml:mi>w</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>w</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>w</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula> encapsulates the similarity profile of gait cycle <inline-formula id="ieqn-12"><mml:math id="mml-ieqn-12"><mml:msub><mml:mi>T</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> in relation to all other gait cycles in the dataset. This vector effectively serves as a fingerprint of the gait cycle in the context of the entire gait database.</p>
<p>To identify key gait patterns within this high-dimensional space, K-means clustering is applied to the set of vectors <inline-formula id="ieqn-13"><mml:math id="mml-ieqn-13"><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msub><mml:mrow><mml:mtext mathvariant="bold">V</mml:mtext></mml:mrow><mml:mn>1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext mathvariant="bold">V</mml:mtext></mml:mrow><mml:mi>n</mml:mi></mml:msub><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula>. The K-Means algorithm partitions the data into <inline-formula id="ieqn-14"><mml:math id="mml-ieqn-14"><mml:mi>k</mml:mi></mml:math></inline-formula> clusters <inline-formula id="ieqn-15"><mml:math id="mml-ieqn-15"><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mn>2</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula>, with the objective of minimizing the sum of squared distances from each vector <inline-formula id="ieqn-16"><mml:math id="mml-ieqn-16"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">V</mml:mtext></mml:mrow><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> to the centroid of its assigned cluster. This clustering process groups gait cycles with similar temporal profiles together, allowing for the identification of central gait patterns that represent typical walking behaviors.</p>
<p>The K-Means clustering objective is mathematically expressed as
<disp-formula id="eqn-2"><label>(2)</label><mml:math id="mml-eqn-2" display="block"><mml:munder><mml:mrow><mml:mtext>minimize</mml:mtext></mml:mrow><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mn>2</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:munder><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:munderover><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:munderover><mml:mrow><mml:mi mathvariant="double-struck">I</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mtext mathvariant="bold">V</mml:mtext></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mo>&#x2208;</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:msub><mml:mrow><mml:mtext mathvariant="bold">V</mml:mtext></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mo>&#x2212;</mml:mo><mml:msub><mml:mrow><mml:mtext mathvariant="bold">c</mml:mtext></mml:mrow><mml:mi>j</mml:mi></mml:msub><mml:msup><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mn>2</mml:mn></mml:msup></mml:math></disp-formula>where <inline-formula id="ieqn-17"><mml:math id="mml-ieqn-17"><mml:mrow><mml:mi mathvariant="double-struck">I</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mtext mathvariant="bold">V</mml:mtext></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mo>&#x2208;</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> is an indicator function that assigns each gait cycle vector <inline-formula id="ieqn-18"><mml:math id="mml-ieqn-18"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">V</mml:mtext></mml:mrow><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> to its nearest centroid <inline-formula id="ieqn-19"><mml:math id="mml-ieqn-19"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">c</mml:mtext></mml:mrow><mml:mi>j</mml:mi></mml:msub></mml:math></inline-formula>.</p>
<p>For each cluster <inline-formula id="ieqn-20"><mml:math id="mml-ieqn-20"><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula>, a representative gait template <inline-formula id="ieqn-21"><mml:math id="mml-ieqn-21"><mml:msub><mml:mi>M</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> is selected as the medoid time series, defined as
<disp-formula id="eqn-3"><label>(3)</label><mml:math id="mml-eqn-3" display="block"><mml:msub><mml:mi>M</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi>arg</mml:mi><mml:mo>&#x2061;</mml:mo><mml:munder><mml:mo movablelimits="true" form="prefix">min</mml:mo><mml:mrow><mml:mi>v</mml:mi><mml:mo>&#x2208;</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:munder><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>u</mml:mi><mml:mo>&#x2208;</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:munder><mml:mrow><mml:mtext>DTW</mml:mtext></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>v</mml:mi><mml:mo>,</mml:mo><mml:mi>u</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo></mml:math></disp-formula>where <inline-formula id="ieqn-22"><mml:math id="mml-ieqn-22"><mml:mrow><mml:mi mathvariant="normal">D</mml:mi><mml:mi mathvariant="normal">T</mml:mi><mml:mi mathvariant="normal">W</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mo>&#x22C5;</mml:mo><mml:mo>,</mml:mo><mml:mo>&#x22C5;</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> denotes the DTW distance between two time series.</p>
<p>Although cluster centroids are used internally during the DTW-KMeans clustering process, DTW distances are computed only between time series. Therefore, the final gait template for each cluster is selected as a medoid rather than the centroid, ensuring that all DTW distance computations are mathematically well-defined.</p>
<p>In this equation, <inline-formula id="ieqn-23"><mml:math id="mml-ieqn-23"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">v</mml:mtext></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> refers to the <inline-formula id="ieqn-24"><mml:math id="mml-ieqn-24"><mml:mi>j</mml:mi></mml:math></inline-formula>-th gait cycle vector within cluster <inline-formula id="ieqn-25"><mml:math id="mml-ieqn-25"><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula>, and <inline-formula id="ieqn-26"><mml:math id="mml-ieqn-26"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">c</mml:mtext></mml:mrow><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> is the centroid of cluster <inline-formula id="ieqn-27"><mml:math id="mml-ieqn-27"><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula>. The function <inline-formula id="ieqn-28"><mml:math id="mml-ieqn-28"><mml:mrow><mml:mi mathvariant="normal">a</mml:mi><mml:mi mathvariant="normal">r</mml:mi><mml:mi mathvariant="normal">g</mml:mi><mml:mi mathvariant="normal">m</mml:mi><mml:mi mathvariant="normal">i</mml:mi><mml:mi mathvariant="normal">n</mml:mi></mml:mrow></mml:math></inline-formula> identifies the gait cycle <inline-formula id="ieqn-29"><mml:math id="mml-ieqn-29"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">v</mml:mtext></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> that minimizes the DTW distance to the centroid, thus ensuring that <inline-formula id="ieqn-30"><mml:math id="mml-ieqn-30"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">M</mml:mtext></mml:mrow><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> is the most representative gait cycle for cluster <inline-formula id="ieqn-31"><mml:math id="mml-ieqn-31"><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula>. This template <inline-formula id="ieqn-32"><mml:math id="mml-ieqn-32"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">M</mml:mtext></mml:mrow><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> effectively captures the central gait pattern of its cluster, providing a generalized representation of the gait behavior for that group.</p>
<p>The final set of representative templates is denoted as <inline-formula id="ieqn-33"><mml:math id="mml-ieqn-33"><mml:mrow><mml:mi>&#x02133;</mml:mi></mml:mrow><mml:mo>=</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msub><mml:mrow><mml:mtext mathvariant="bold">M</mml:mtext></mml:mrow><mml:mn>1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext mathvariant="bold">M</mml:mtext></mml:mrow><mml:mn>2</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mtext mathvariant="bold">M</mml:mtext></mml:mrow><mml:mi>k</mml:mi></mml:msub><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula>, which serves as a benchmark for several tasks, including gait phase recognition, anomaly detection, and gait trajectory prediction. These templates reflect the core gait patterns of the user population, and they are flexible enough to accommodate variability in walking conditions.</p>
<p>The pseudocode for the DTW-KM template selection method is outlined in Algorithm 1. The algorithm describes the step-by-step procedure for segmenting the gait data, computing the DTW distances, performing the K-Means clustering, and selecting the representative gait templates. This method effectively handles the temporal dynamics of gait data, providing a set of templates that are not only temporally aligned but also clustered in a meaningful way.</p>
<p>In summary, the DTW-KM method offers an effective solution for extracting representative gait templates from diverse gait data. By combining the temporal alignment of DTW with the data clustering of K-Means, the method addresses the complexities of gait variability across different walking conditions and individual users. The resulting templates provide a valuable foundation for real-time gait analysis and prediction, supporting the development of more adaptive and accurate wearable exoskeletons and other assistive technologies.</p>
<fig id="fig-7">
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_77791-fig-7.tif"/>
</fig>
</sec>
<sec id="s3_2">
<label>3.2</label>
<title>Computational Complexity Analysis</title>
<p>Let <inline-formula id="ieqn-39"><mml:math id="mml-ieqn-39"><mml:mi>n</mml:mi></mml:math></inline-formula> denote the number of gait sequences and <italic>L</italic> the average length of each sequence. The dominant computational cost of the proposed template selection method arises from the construction of the DTW-based similarity matrix. Computing the DTW distance between two sequences requires <inline-formula id="ieqn-40"><mml:math id="mml-ieqn-40"><mml:mrow><mml:mi>&#x1D4AA;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>L</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> time, resulting in an overall complexity of <inline-formula id="ieqn-41"><mml:math id="mml-ieqn-41"><mml:mrow><mml:mi>&#x1D4AA;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>n</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:msup><mml:mi>L</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> for all pairwise comparisons.</p>
<p>The subsequent clustering step operates on the <inline-formula id="ieqn-42"><mml:math id="mml-ieqn-42"><mml:mi>n</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mi>n</mml:mi></mml:math></inline-formula> similarity matrix. Assuming <inline-formula id="ieqn-43"><mml:math id="mml-ieqn-43"><mml:mi>k</mml:mi></mml:math></inline-formula> clusters and <italic>I</italic> iterations, the clustering complexity is <inline-formula id="ieqn-44"><mml:math id="mml-ieqn-44"><mml:mrow><mml:mi>&#x1D4AA;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>I</mml:mi><mml:mi>k</mml:mi><mml:msup><mml:mi>n</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>, which is negligible compared to the DTW computation since <inline-formula id="ieqn-45"><mml:math id="mml-ieqn-45"><mml:mi>k</mml:mi><mml:mo>&#x226A;</mml:mo><mml:mi>n</mml:mi></mml:math></inline-formula> and <italic>I</italic> is typically small.</p>
<p>Template selection within each cluster is performed using a medoid-based strategy, requiring pairwise DTW computations within each cluster. The total complexity of this step is approximately <inline-formula id="ieqn-46"><mml:math id="mml-ieqn-46"><mml:mrow><mml:mi>&#x1D4AA;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mfrac><mml:msup><mml:mi>n</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:mi>k</mml:mi></mml:mfrac><mml:msup><mml:mi>L</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>.</p>
<p>Overall, the proposed offline template construction method has a time complexity of <inline-formula id="ieqn-47"><mml:math id="mml-ieqn-47"><mml:mrow><mml:mi>&#x1D4AA;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>n</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:msup><mml:mi>L</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> and a space complexity of <inline-formula id="ieqn-48"><mml:math id="mml-ieqn-48"><mml:mrow><mml:mi>&#x1D4AA;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>n</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>. Since this process is performed offline, it does not affect the real-time performance of the online gait phase estimation and trajectory prediction.</p>
</sec>
</sec>
<sec id="s4">
<label>4</label>
<title>SCW Template Matching Method</title>
<p>The DTW-KM method extracts representative gait templates offline, ensuring their diversity to accommodate variations in walking conditions and individual gait patterns. However, for real-time gait trajectory prediction, these pre-extracted templates must be effectively matched and adjusted based on real-time sensor data. To address this need, we propose the Soft Constraint Weight (SCW) template matching method, which optimizes the selection and adjustment of gait templates in an online setting, enabling real-time gait phase identification and trajectory prediction.</p>
<sec id="s4_1">
<label>4.1</label>
<title>Local-Global Template Matching for Real-Time Gait Phase Estimation</title>
<p>Human walking patterns exhibit a high degree of regularity and repetitiveness, which allows for relatively straightforward estimation with minimal complexity. Using the DTW-KM method to capture motion patterns and match them with real-time sensor data, we can identify local gait changes and predict gait phases with high precision. To further enhance the accuracy of these predictions, we have developed an integrated local-global template matching algorithm. This approach is designed to combine both local adjustments, reflecting immediate changes in the user&#x2019;s gait, and global template matching, which maintains consistency with the overall walking pattern. The flow of this method is illustrated in <xref ref-type="fig" rid="fig-3">Fig. 3</xref>.</p>
<fig id="fig-3">
<label>Figure 3</label>
<caption>
<title>Integrated local-global template matching algorithm for comprehensive gait phase identification and prediction.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_77791-fig-3.tif"/>
</fig>
<sec id="s4_1_1">
<label>4.1.1</label>
<title>Universal Gait Template Acquisition</title>
<p>The first step in the SCW template matching process involves collecting gait data, segmenting it into individual gait cycles, and compiling a gait database denoted as <italic>W</italic>. Using the DTW-KM method, we extract a normalized mean gait sequence, represented as <inline-formula id="ieqn-49"><mml:math id="mml-ieqn-49"><mml:mi>w</mml:mi></mml:math></inline-formula>, which serves as a general template for gait analysis. This sequence is further refined using interpolation via a 10th-degree polynomial, producing parameters <inline-formula id="ieqn-50"><mml:math id="mml-ieqn-50"><mml:msub><mml:mi>a</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> for the gait curve:
<disp-formula id="eqn-4"><label>(4)</label><mml:math id="mml-eqn-4" display="block"><mml:msub><mml:mi>G</mml:mi><mml:mi>a</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mn>10</mml:mn></mml:mrow></mml:munderover><mml:msub><mml:mi>a</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msup><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msup></mml:math></disp-formula></p>
<p>This refined gait template represents a smooth approximation of the average gait cycle, capturing essential gait characteristics while minimizing noise and irregularities in the data.</p>
</sec>
<sec id="s4_1_2">
<label>4.1.2</label>
<title>Local Adjustments for Dynamic Gait Changes</title>
<p>To account for local variations in gait, such as changes in walking speed, stride length, or terrain, we introduce additional parameters to adjust the gait template. These include parameters for periodicity (<inline-formula id="ieqn-51"><mml:math id="mml-ieqn-51"><mml:mi>&#x03C9;</mml:mi></mml:math></inline-formula>), phase (<italic>V</italic>), central tendency (<italic>M</italic>), and amplitude (<italic>A</italic>). The equation governing these adjustments is as follows:
<disp-formula id="eqn-5"><label>(5)</label><mml:math id="mml-eqn-5" display="block"><mml:msub><mml:mi>G</mml:mi><mml:mi>a</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo>;</mml:mo><mml:mi>A</mml:mi><mml:mo>,</mml:mo><mml:mi>&#x03C9;</mml:mi><mml:mo>,</mml:mo><mml:mi>V</mml:mi><mml:mo>,</mml:mo><mml:mi>M</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mi>A</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:munderover><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mn>10</mml:mn></mml:mrow></mml:munderover><mml:msub><mml:mi>a</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>&#x03C9;</mml:mi><mml:mi>t</mml:mi><mml:mo>+</mml:mo><mml:mi>V</mml:mi><mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mi>i</mml:mi></mml:msup><mml:mo>)</mml:mo></mml:mrow><mml:mo>+</mml:mo><mml:mi>M</mml:mi></mml:math></disp-formula></p>
<p>In this equation, <inline-formula id="ieqn-52"><mml:math id="mml-ieqn-52"><mml:mi>&#x03C9;</mml:mi></mml:math></inline-formula> controls the frequency of the gait cycle, <italic>V</italic> adjusts the phase, <italic>A</italic> modulates the amplitude, and <italic>M</italic> represents a constant shift that accounts for any global offsets in gait. These parameters allow the model to dynamically adapt to real-time variations in the user&#x2019;s gait, ensuring that the template accurately reflects ongoing changes.</p>
</sec>
<sec id="s4_1_3">
<label>4.1.3</label>
<title>Local Gait Fitting via Least Squares Optimization</title>
<p>Once the gait template has been adjusted for local changes, we apply the adjusted template <inline-formula id="ieqn-53"><mml:math id="mml-ieqn-53"><mml:msub><mml:mi>G</mml:mi><mml:mi>a</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> to fit the real-time gait data <inline-formula id="ieqn-54"><mml:math id="mml-ieqn-54"><mml:mi>L</mml:mi><mml:mo>=</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mn>0</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula>, where <inline-formula id="ieqn-55"><mml:math id="mml-ieqn-55"><mml:msub><mml:mi>x</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:math></inline-formula> represents a real-time gait sample. This fitting process is accomplished using least squares optimization, which minimizes the error between the adjusted gait template and the real-time data. The objective is to optimize the parameters <inline-formula id="ieqn-56"><mml:math id="mml-ieqn-56"><mml:mi>&#x03C9;</mml:mi></mml:math></inline-formula>, <italic>V</italic>, <italic>M</italic>, and <italic>A</italic> to achieve the best fit. The optimization problem can be expressed as follows:
<disp-formula id="eqn-6"><label>(6)</label><mml:math id="mml-eqn-6" display="block"><mml:mrow><mml:mtext>Loss</mml:mtext></mml:mrow><mml:mo>=</mml:mo><mml:mo movablelimits="true" form="prefix">min</mml:mo><mml:mrow><mml:mo symmetric="true">&#x2016;</mml:mo><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mi>r</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2212;</mml:mo><mml:mi>A</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:munderover><mml:msub><mml:mi>a</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>&#x03C9;</mml:mi><mml:mi>t</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mi>V</mml:mi><mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mi>i</mml:mi></mml:msup><mml:mo>)</mml:mo></mml:mrow><mml:mo>+</mml:mo><mml:mi>M</mml:mi><mml:mo symmetric="true">&#x2016;</mml:mo></mml:mrow></mml:math></disp-formula></p>
<p>Here, <inline-formula id="ieqn-57"><mml:math id="mml-ieqn-57"><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mi>r</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> represents the real-time gait data, and the optimization seeks to minimize the difference between this data and the adjusted gait template. The outcome of this process is a set of refined parameters that accurately describe the current state of the user&#x2019;s gait.</p>
</sec>
<sec id="s4_1_4">
<label>4.1.4</label>
<title>Gait Phase Identification and Prediction</title>
<p>Using the model parameters obtained from the most recent fit, the current gait phase <italic>V</italic> can be estimated, and the future gait phases can be predicted over the next <inline-formula id="ieqn-58"><mml:math id="mml-ieqn-58"><mml:mi>k</mml:mi></mml:math></inline-formula> frames. This predictive capability allows for real-time forecasting of the user&#x2019;s gait trajectory, providing essential information for wearable devices, such as exoskeletons, to synchronize their movements with the user&#x2019;s natural gait. The prediction process uses the updated parameters to extrapolate future gait states, ensuring that the device remains responsive to the user&#x2019;s movements.</p>
</sec>
<sec id="s4_1_5">
<label>4.1.5</label>
<title>Evaluation and Template Adjustment for Continuous Accuracy</title>
<p>After each gait prediction, the accuracy of the fit is assessed against a predefined anomaly threshold <inline-formula id="ieqn-59"><mml:math id="mml-ieqn-59"><mml:msub><mml:mi>E</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mi>h</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>s</mml:mi><mml:mi>h</mml:mi><mml:mi>o</mml:mi><mml:mi>l</mml:mi><mml:mi>d</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>. If the error between the predicted and actual gait phases exceeds this threshold, the system switches to an alternative template that better reflects the current gait state. If the error is deemed acceptable, the system updates the parameters <inline-formula id="ieqn-60"><mml:math id="mml-ieqn-60"><mml:mi>&#x03C9;</mml:mi></mml:math></inline-formula>, <italic>V</italic>, <italic>M</italic>, and <italic>A</italic> to reflect the most recent gait changes. This iterative process ensures that the system continuously adapts to the user&#x2019;s movements, maintaining a high level of accuracy over time.</p>
</sec>
</sec>
<sec id="s4_2">
<label>4.2</label>
<title>Iterative Refinement of the Template Matching Process</title>
<p>The final step involves updating the time window with the latest sensor data and repeating the template matching and fitting process. This iterative refinement allows the system to continuously adjust to dynamic changes in the user&#x2019;s gait, ensuring that predictions remain accurate and responsive to real-time walking conditions.</p>
<p>In summary, the SCW template matching method provides an effective approach to real-time gait phase identification and prediction. By combining local adjustments with global template matching, it offers a flexible and adaptive solution for wearable devices to synchronize with the user&#x2019;s natural gait. Iterative refinement of the model ensures that the system remains accurate over time, making it a valuable tool to improve the functionality and responsiveness of wearable exoskeletons and other assistive devices.</p>
</sec>
<sec id="s4_3">
<label>4.3</label>
<title>The SCW Template Matching Approach</title>
<p>Real-time gait prediction presents significant challenges, particularly in terms of noise resilience and parameter stability. These factors are crucial for ensuring the smooth operation of assistive devices such as exoskeletons, which rely on accurate, real-time synchronization with the user&#x2019;s natural movements. To address these challenges, we propose the Soft Constraint Weight (SCW) template matching algorithm. This method is specifically designed to enhance both the precision and stability of the prediction of the gait phase while optimizing computational resources. By incorporating soft constraints and a weighted loss function, the SCW algorithm can better adapt to dynamic walking conditions, ensuring that predictions remain accurate even as walking speed, terrain, or user fatigue fluctuate.</p>
<sec id="s4_3_1">
<label>4.3.1</label>
<title>Integration of Soft Constraints and Weighted Loss Function</title>
<p>The SCW algorithm strategically combines two key components: soft constraints and a quadratic weighted loss function. Soft constraints are employed to regulate parameter updates during the fitting process, mitigating the effects of abrupt changes or noisy sensor data, and thus enhancing model stability. Meanwhile, the quadratic weighted loss function emphasizes recent data points, allowing the model to align more closely with the most current gait characteristics. This prioritization of recent data is particularly important in real-time gait prediction, where the model must continuously adjust to the ongoing changes in the user&#x2019;s walking pattern.</p>
<p>Formally, the SCW algorithm can be defined as follows:</p>
<p>Given an observed time window value <inline-formula id="ieqn-61"><mml:math id="mml-ieqn-61"><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mi>r</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> at time <inline-formula id="ieqn-62"><mml:math id="mml-ieqn-62"><mml:mi>t</mml:mi></mml:math></inline-formula>, and its corresponding gait template <inline-formula id="ieqn-63"><mml:math id="mml-ieqn-63"><mml:msub><mml:mi>G</mml:mi><mml:mi>a</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>, the weighted loss function for the SCW is expressed as:
<disp-formula id="eqn-7"><label>(7)</label><mml:math id="mml-eqn-7" display="block"><mml:mo movablelimits="true" form="prefix">min</mml:mo><mml:mrow><mml:mtext>Loss</mml:mtext></mml:mrow><mml:mo>=</mml:mo><mml:msub><mml:mi>w</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>&#x00D7;</mml:mo><mml:msup><mml:mrow><mml:mo symmetric="true">&#x2016;</mml:mo><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mi>r</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2212;</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mi>a</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo symmetric="true">&#x2016;</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:msup><mml:mo>+</mml:mo><mml:mi>&#x03BB;</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:msup><mml:mrow><mml:mo symmetric="true">&#x2016;</mml:mo><mml:msub><mml:mi>&#x03B8;</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>&#x2212;</mml:mo><mml:mrow><mml:mover><mml:mi>&#x03B8;</mml:mi><mml:mo stretchy="false">&#x00AF;</mml:mo></mml:mover></mml:mrow><mml:mo symmetric="true">&#x2016;</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:msup></mml:math></disp-formula></p>
<p>In this equation:
<list list-type="simple">
<list-item><label>-</label><p><inline-formula id="ieqn-64"><mml:math id="mml-ieqn-64"><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mi>r</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> represents the real-time sensor data at time <inline-formula id="ieqn-65"><mml:math id="mml-ieqn-65"><mml:mi>t</mml:mi></mml:math></inline-formula>.</p></list-item>
<list-item><label>-</label><p><inline-formula id="ieqn-66"><mml:math id="mml-ieqn-66"><mml:msub><mml:mi>G</mml:mi><mml:mi>a</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> is the gait template predicted at time <inline-formula id="ieqn-67"><mml:math id="mml-ieqn-67"><mml:mi>t</mml:mi></mml:math></inline-formula>.</p></list-item>
<list-item><label>-</label><p><inline-formula id="ieqn-68"><mml:math id="mml-ieqn-68"><mml:msub><mml:mi>&#x03B8;</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:math></inline-formula> denotes the model parameters at time <inline-formula id="ieqn-69"><mml:math id="mml-ieqn-69"><mml:mi>t</mml:mi></mml:math></inline-formula>, while <inline-formula id="ieqn-70"><mml:math id="mml-ieqn-70"><mml:mrow><mml:mover><mml:mi>&#x03B8;</mml:mi><mml:mo stretchy="false">&#x00AF;</mml:mo></mml:mover></mml:mrow></mml:math></inline-formula> represents the historical average of these parameters.</p></list-item>
<list-item><label>-</label><p><inline-formula id="ieqn-71"><mml:math id="mml-ieqn-71"><mml:msub><mml:mi>w</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:math></inline-formula> is the weighting factor applied to the loss term, and <inline-formula id="ieqn-72"><mml:math id="mml-ieqn-72"><mml:mi>&#x03BB;</mml:mi></mml:math></inline-formula> is the regularization parameter that controls the influence of soft constraints.</p></list-item>
</list></p>
<p>The objective of this optimization is to minimize the loss function, which consists of two terms: the first term reflects the error between the predicted gait template and the observed real-time data, while the second term serves as an L2 regularization to maintain stability in parameter updates.</p>
</sec>
<sec id="s4_3_2">
<label>4.3.2</label>
<title>Soft Constraints for Enhanced Stability</title>
<p>Soft constraints are integral to the SCW method, as they utilize historical parameter averages to moderate the rate at which parameters are updated. This approach is particularly effective in reducing oscillations in parameter adjustments, which can arise due to noisy sensor data or sudden changes in walking conditions. The soft constraint is implemented via an <inline-formula id="ieqn-73"><mml:math id="mml-ieqn-73"><mml:msub><mml:mi>L</mml:mi><mml:mn>2</mml:mn></mml:msub></mml:math></inline-formula> regularization term, which ensures that the model parameters at time <inline-formula id="ieqn-74"><mml:math id="mml-ieqn-74"><mml:mi>t</mml:mi></mml:math></inline-formula> remain close to their historical averages, preventing large, erratic updates that could destabilize the gait prediction process.</p>
<p>The L2 regularization term is defined as:
<disp-formula id="eqn-8"><label>(8)</label><mml:math id="mml-eqn-8" display="block"><mml:msub><mml:mi>L</mml:mi><mml:mn>2</mml:mn></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>&#x03B8;</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mi>&#x03BB;</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:msup><mml:mrow><mml:mo symmetric="true">&#x2016;</mml:mo><mml:msub><mml:mi>&#x03B8;</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>&#x2212;</mml:mo><mml:mrow><mml:mover><mml:mi>&#x03B8;</mml:mi><mml:mo stretchy="false">&#x00AF;</mml:mo></mml:mover></mml:mrow><mml:mo symmetric="true">&#x2016;</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:msup></mml:math></disp-formula></p>
<p>In this equation, <inline-formula id="ieqn-75"><mml:math id="mml-ieqn-75"><mml:msub><mml:mi>&#x03B8;</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:math></inline-formula> are the model parameters at time <inline-formula id="ieqn-76"><mml:math id="mml-ieqn-76"><mml:mi>t</mml:mi></mml:math></inline-formula>, and <inline-formula id="ieqn-77"><mml:math id="mml-ieqn-77"><mml:mrow><mml:mover><mml:mi>&#x03B8;</mml:mi><mml:mo stretchy="false">&#x00AF;</mml:mo></mml:mover></mml:mrow></mml:math></inline-formula> is the average of these parameters over previous iterations. The parameter <inline-formula id="ieqn-78"><mml:math id="mml-ieqn-78"><mml:mi>&#x03BB;</mml:mi></mml:math></inline-formula> controls the strength of the regularization, allowing for flexibility in balancing stability and adaptation to new data. By minimizing this term, the SCW algorithm ensures that parameter updates are smooth and gradual, reducing the likelihood of overfitting to noisy or transient gait data.</p>
</sec>
<sec id="s4_3_3">
<label>4.3.3</label>
<title>Weighted Loss Function for Prioritizing Recent Data</title>
<p>To ensure that the model remains responsive to changes in the user&#x2019;s gait, the SCW algorithm incorporates a time-decaying weighting factor into the loss function. This weighting factor <inline-formula id="ieqn-79"><mml:math id="mml-ieqn-79"><mml:msub><mml:mi>w</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:math></inline-formula> gives higher importance to more recent data, which reflects the most current gait trends and allows the model to better adapt to dynamic walking conditions.</p>
<p>The weights are calculated as:<disp-formula id="eqn-9"><label>(9)</label><mml:math id="mml-eqn-9" display="block"><mml:msub><mml:mi>w</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mo>[</mml:mo><mml:mfrac><mml:mrow><mml:mn>6</mml:mn><mml:mo>&#x00D7;</mml:mo><mml:msup><mml:mn>1</mml:mn><mml:mn>2</mml:mn></mml:msup></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mn>2</mml:mn><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mfrac><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:mfrac><mml:mrow><mml:mn>6</mml:mn><mml:mo>&#x00D7;</mml:mo><mml:msup><mml:mi>n</mml:mi><mml:mn>2</mml:mn></mml:msup></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mn>2</mml:mn><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mfrac><mml:mo>]</mml:mo></mml:mrow></mml:math></disp-formula>where <inline-formula id="ieqn-80"><mml:math id="mml-ieqn-80"><mml:mi>n</mml:mi></mml:math></inline-formula> is the number of data points in the time window. The weighting function ensures that the most recent observations carry the greatest influence in adjusting the model parameters, effectively enabling the model to adapt quickly to any shifts in gait due to changes in speed, stride length, or walking conditions.</p>
</sec>
<sec id="s4_3_4">
<label>4.3.4</label>
<title>Real-Time Parameter Adjustment and Adaptation</title>
<p>During real-time inference, the SCW algorithm continuously processes the latest sensor data within a moving time window, updating the model parameters <inline-formula id="ieqn-81"><mml:math id="mml-ieqn-81"><mml:msub><mml:mi>&#x03B8;</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:math></inline-formula> accordingly. These updates ensure that the model remains responsive to the user&#x2019;s gait, accurately capturing any changes in walking pattern and predicting future gait phases. The ability to update the model parameters in real time, while maintaining stability through soft constraints and prioritization of recent data, enables the SCW algorithm to provide accurate gait phase predictions and trajectory forecasts.</p>
<p>Continuous updates of the model parameters ensure that the predictions remain accurate over time, accounting for both user variability and environmental factors. As the model adapts to the latest gait data, it not only predicts the current gait phase but also anticipates future phases, enabling exoskeletons and other assistive devices to synchronize more effectively with the user&#x2019;s movements.</p>
</sec>
</sec>
</sec>
<sec id="s5">
<label>5</label>
<title>Experiment and Results Analysis</title>
<sec id="s5_1">
<label>5.1</label>
<title>Dataset and Data Acquisition</title>
<p>The experimental dataset was collected in-house to evaluate gait phase estimation and short-term trajectory prediction under diverse walking conditions. Fourteen healthy male adults (mean age: 24.3 years; mean body mass: 72.9 kg; mean height: 177.8 cm), with no reported musculoskeletal or neurological impairments, participated in the study.</p>
<p>During data acquisition, each participant wore a single IMU (Xsens DOT, Enschede, The Netherlands) mounted on the anterior tibial surface. The sensor was secured using an adjustable strap to minimize relative motion. The IMU coordinate frame was aligned with the tibial longitudinal axis and calibrated prior to collection. Kinematic data were streamed wirelessly at 60 Hz, including tri-axial angular velocity and acceleration. In this study, sagittal-plane tibial angular velocity was used as the primary input for gait phase estimation.</p>
<p>To ensure coverage of diverse gait dynamics, multiple walking conditions were recorded, including continuous level-ground walking, intermittent walking with frequent start&#x2013;stop transitions, turning maneuvers, and static standing. Participants additionally performed simulated irregular gait patterns with increased variability in cadence and amplitude to approximate pathological features such as tremor-dominated motion.</p>
<p>The dataset comprises approximately 1500 segmented gait instances, including normal walking, rapid transitions, turning, standing, shuffling, and simulated pathological patterns. Transitions between locomotion and rest were explicitly included to evaluate robustness under non-steady-state conditions. For model development and evaluation, the dataset was partitioned into training (70%) and testing (30%) sets. All offline templates used in the proposed method were constructed exclusively from the training data, while the testing set was reserved strictly for performance evaluation.</p>
<p>Gait events, including heel strike, toe-off, and intermediate weight-transfer phases, were annotated offline using synchronized video recordings and non-real-time signal inspection. All experiments were conducted in a controlled indoor environment. For online evaluation, sequences with different motion modes were concatenated to emulate realistic daily walking scenarios involving alternating movement and rest.</p>
</sec>
<sec id="s5_2">
<label>5.2</label>
<title>Computational Efficiency and Real-Time Performance</title>
<p>To evaluate the real-time feasibility of the proposed framework, we measured its computational performance on a desktop platform equipped with an Intel Core i5-10400 CPU (2.90 GHz, up to 3.97 GHz) and 16 GB RAM. All algorithms were implemented in MATLAB/Python and executed in a single-threaded configuration.</p>
<p>The average execution time per prediction cycle, including gait phase estimation and trajectory prediction, was 4.2 ms, which is significantly lower than the sensor sampling interval (16.7 ms at 60 Hz). This confirms that the proposed method can operate in real time without introducing perceptible latency. For context, this is 3<inline-formula id="ieqn-82"><mml:math id="mml-ieqn-82"><mml:mo>&#x00D7;</mml:mo></mml:math></inline-formula> faster than the typical single-threaded execution time of lightweight deep learning baselines (e.g., 12&#x2013;15 ms for a TCN-based trajectory predictor) [<xref ref-type="bibr" rid="ref-25">25</xref>] and 2<inline-formula id="ieqn-83"><mml:math id="mml-ieqn-83"><mml:mo>&#x00D7;</mml:mo></mml:math></inline-formula> faster than traditional model-based approaches (e.g., 8&#x2013;10 ms for an extended Kalman filter with gait phase coupling) [<xref ref-type="bibr" rid="ref-26">26</xref>].</p>
<p>Unlike deep learning-based methods, the proposed framework does not require offline training, parameter tuning, or model updates during deployment. Memory consumption is limited to storing a small number of representative gait templates, making the method particularly suitable for embedded wearable systems with constrained computational resources.</p>
<p>To clearly distinguish the computational burden of different stages, the proposed framework separates processing into an offline template construction phase and an online gait estimation and prediction phase, as summarized in <xref ref-type="table" rid="table-1">Table 1</xref>.</p>
<table-wrap id="table-1">
<label>Table 1</label>
<caption>
<title>Computational complexity comparison between offline and online stages.</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th>Stage</th>
<th>Operation</th>
<th>Time Complexity</th>
<th>Space Complexity</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="3">Offline</td>
<td>DTW similarity matrix construction</td>
<td><inline-formula id="ieqn-84"><mml:math id="mml-ieqn-84"><mml:mrow><mml:mi>&#x1D4AA;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>n</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:msup><mml:mi>L</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula></td>
<td><inline-formula id="ieqn-85"><mml:math id="mml-ieqn-85"><mml:mrow><mml:mi>&#x1D4AA;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>n</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula></td>
</tr>
<tr>
<td>Clustering on similarity matrix</td>
<td><inline-formula id="ieqn-86"><mml:math id="mml-ieqn-86"><mml:mrow><mml:mi>&#x1D4AA;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>I</mml:mi><mml:mi>k</mml:mi><mml:msup><mml:mi>n</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula></td>
<td><inline-formula id="ieqn-87"><mml:math id="mml-ieqn-87"><mml:mrow><mml:mi>&#x1D4AA;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>n</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula></td>
</tr>
<tr>
<td>Template (medoid) selection</td>
<td><inline-formula id="ieqn-88"><mml:math id="mml-ieqn-88"><mml:mrow><mml:mi>&#x1D4AA;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mfrac><mml:msup><mml:mi>n</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:mi>k</mml:mi></mml:mfrac><mml:msup><mml:mi>L</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula></td>
<td><inline-formula id="ieqn-89"><mml:math id="mml-ieqn-89"><mml:mrow><mml:mi>&#x1D4AA;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>L</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula></td>
</tr>
<tr>
<td rowspan="2">Online</td>
<td>Gait phase estimation (SCW)</td>
<td><inline-formula id="ieqn-90"><mml:math id="mml-ieqn-90"><mml:mrow><mml:mi>&#x1D4AA;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>k</mml:mi><mml:mi>L</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula></td>
<td><inline-formula id="ieqn-91"><mml:math id="mml-ieqn-91"><mml:mrow><mml:mi>&#x1D4AA;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>k</mml:mi><mml:mi>L</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula></td>
</tr>
<tr>
<td>Trajectory prediction</td>
<td><inline-formula id="ieqn-92"><mml:math id="mml-ieqn-92"><mml:mrow><mml:mi>&#x1D4AA;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>L</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula></td>
<td><inline-formula id="ieqn-93"><mml:math id="mml-ieqn-93"><mml:mrow><mml:mi>&#x1D4AA;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>L</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula></td>
</tr>
</tbody>
</table>
</table-wrap>
<p>The offline stage involves DTW-based similarity computation and clustering, resulting in a higher computational cost. However, this stage is executed only once and does not affect real-time system performance.</p>
<p>In contrast, the online stage operates with linear complexity with respect to the window length and the number of gait templates. No iterative optimization or global DTW computation is performed online, ensuring low latency and stable real-time execution suitable for wearable exoskeleton systems.</p>
</sec>
<sec id="s5_3">
<label>5.3</label>
<title>Offline Template Preparation Phase</title>
<p>In this phase, which involves the offline clustering and template generation process using the DTW-KM algorithm, and compare it to a traditional Euclidean distance-based clustering method. The primary objective of this phase is to evaluate the performance of the DTW-KM algorithm for gait cycle clustering and template generation, and to compare it against a traditional Euclidean distance-based clustering algorithm. To do this, we performed clustering on a specific gait dataset and computed the Within-Cluster Sum of Squares (WCSS) for varying numbers of clusters. The WCSS is a measure of the compactness of the clusters, and it is calculated as follows:<disp-formula id="eqn-10"><label>(10)</label><mml:math id="mml-eqn-10" display="block"><mml:mi>J</mml:mi><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:munderover><mml:munder><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>x</mml:mi><mml:mo>&#x2208;</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:munder><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mi>x</mml:mi><mml:mo>&#x2212;</mml:mo><mml:msub><mml:mi>&#x03BC;</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msup><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mn>2</mml:mn></mml:msup></mml:math></disp-formula>where <inline-formula id="ieqn-94"><mml:math id="mml-ieqn-94"><mml:mi>k</mml:mi></mml:math></inline-formula> is the number of clusters, <inline-formula id="ieqn-95"><mml:math id="mml-ieqn-95"><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> denotes the <inline-formula id="ieqn-96"><mml:math id="mml-ieqn-96"><mml:mi>i</mml:mi></mml:math></inline-formula>-th cluster, <inline-formula id="ieqn-97"><mml:math id="mml-ieqn-97"><mml:mi>x</mml:mi></mml:math></inline-formula> represents a data point in the cluster, and <inline-formula id="ieqn-98"><mml:math id="mml-ieqn-98"><mml:msub><mml:mi>&#x03BC;</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> is the centroid of the <inline-formula id="ieqn-99"><mml:math id="mml-ieqn-99"><mml:mi>i</mml:mi></mml:math></inline-formula>-th cluster.</p>
<p>The experiments were conducted by clustering the gait data into a range of cluster numbers, from <inline-formula id="ieqn-100"><mml:math id="mml-ieqn-100"><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn>2</mml:mn></mml:math></inline-formula> to <inline-formula id="ieqn-101"><mml:math id="mml-ieqn-101"><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn>15</mml:mn></mml:math></inline-formula>. This range of clusters was chosen to observe how both clustering algorithms perform at different levels of granularity. The WCSS values were calculated for each clustering configuration, and the results are presented in the subsequent figures.</p>
<sec id="s5_3_1">
<label>5.3.1</label>
<title>Clustering Results: DTW-KM vs. Euclidean Algorithm</title>
<p>For the Euclidean algorithm, the optimal number of clusters was determined to be <inline-formula id="ieqn-102"><mml:math id="mml-ieqn-102"><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn>5</mml:mn></mml:math></inline-formula>, as it yielded the most compact and well-separated clusters based on the WCSS criterion. The clustering results for both the DTW-KM method and the Euclidean algorithm are visualized in <xref ref-type="fig" rid="fig-4">Figs. 4</xref> and <xref ref-type="fig" rid="fig-5">5</xref>, respectively.</p>
<fig id="fig-4">
<label>Figure 4</label>
<caption>
<title>Time series clustering results using the DTW-KM algorithm.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_77791-fig-4.tif"/>
</fig><fig id="fig-5">
<label>Figure 5</label>
<caption>
<title>Time series clustering results using the Euclidean distance-based algorithm.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_77791-fig-5.tif"/>
</fig>
<p>The clustering results are depicted in <xref ref-type="fig" rid="fig-4">Fig. 4</xref> for the DTW-KM method and <xref ref-type="fig" rid="fig-5">Fig. 5</xref> for the Euclidean distance-based method. In both figures, the red lines represent the central trajectories of each cluster, while the gray lines indicate the individual time series within each cluster.</p>

</sec>
<sec id="s5_3_2">
<label>5.3.2</label>
<title>Analysis of Clustering Performance</title>
<p>In the DTW-KM clustering results shown in <xref ref-type="fig" rid="fig-4">Fig. 4</xref>, the algorithm successfully identifies consistent clusters with clear separation, effectively capturing the complex temporal dynamics of gait cycles. The DTW distance metric used in the DTW-KM method accounts for the temporal misalignments between gait cycles, which is critical for handling the inherent variability in human gait. This results in well-formed clusters with distinct boundaries, reflecting the natural diversity in walking patterns.</p>
<p>In contrast, the Euclidean algorithm, as shown in <xref ref-type="fig" rid="fig-5">Fig. 5</xref>, exhibits less clear separation between clusters, particularly for gait cycles with different walking speeds and irregularities. The Euclidean distance metric struggles to account for temporal variations, leading to less accurate clustering results. Despite this, the Euclidean method still produces reasonable clusters for simpler gait patterns, such as normal walking.</p>
<p>Cluster analysis revealed that the DTW-KM algorithm identified five distinct clusters, each corresponding to a different walking speed or gait condition. Specifically, Cluster 3 was found to represent slower walking speeds, Clusters 4, 1, and 2 captured normal walking speeds, and Cluster 5 was associated with irregular gaits, such as those resulting from fatigue or environmental factors like uneven terrain.</p>
<p>These identified gait clusters were then used as the representative templates for the SCW template matching algorithm in the subsequent real-time prediction phase. By selecting the most relevant templates from these clusters, the SCW algorithm was able to more accurately match the current gait phase and predict future phases.</p>
<p>The offline clustering results demonstrate that the DTW-KM algorithm significantly outperforms the Euclidean distance-based method in terms of clustering quality and the ability to capture complex gait dynamics. The DTW-KM method&#x2019;s ability to account for temporal misalignments allows it to form well-separated clusters, making it a more effective choice for gait phase prediction and template matching in wearable assistive devices. The next phase of our experiments involves real-time gait phase identification and prediction using these templates, which will be discussed in the following section.</p>
</sec>
</sec>
<sec id="s5_4">
<label>5.4</label>
<title>Online Trajectory Prediction and Phase Estimation</title>
<p>In this section, we present the evaluation of the SCW algorithm for real-time trajectory prediction and gait phase estimation. The evaluation focuses on assessing the algorithm&#x2019;s prediction accuracy for up to 10 frames ahead, using metrics such as Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and the coefficient of determination (<inline-formula id="ieqn-103"><mml:math id="mml-ieqn-103"><mml:msup><mml:mi>R</mml:mi><mml:mn>2</mml:mn></mml:msup></mml:math></inline-formula>). Additionally, we compare the SCW performance with two ablation studies: one without the quadratic weighting (QW) and one without the soft constraint (SC), as summarized in <xref ref-type="table" rid="table-2">Table 2</xref>.</p>
<table-wrap id="table-2">
<label>Table 2</label>
<caption>
<title>Ablation experiments and evaluation of trajectory prediction effectiveness (QW&#x2013;Quadratic Weight, SC&#x2013;Soft Constraint).</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th rowspan="2">Predicted Frame</th>
<th colspan="3">RMSE</th>
<th colspan="3">MAE</th>
<th colspan="3"><inline-formula id="ieqn-104"><mml:math id="mml-ieqn-104"><mml:msup><mml:mi>R</mml:mi><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula></th>
</tr>
<tr>
<th>SCW Method</th>
<th>Ablation QW</th>
<th>Ablation SC</th>
<th>SCW Method</th>
<th>Ablation QW</th>
<th>Ablation SC</th>
<th>SCW Method</th>
<th>Ablation QW</th>
<th>Ablation SC</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>5.81</td>
<td>6.19</td>
<td>5.52</td>
<td>4.57</td>
<td>4.98</td>
<td>4.06</td>
<td>0.93</td>
<td>0.92</td>
<td>0.94</td>
</tr>
<tr>
<td>2</td>
<td>5.97</td>
<td>6.37</td>
<td>5.70</td>
<td>4.61</td>
<td>5.04</td>
<td>4.12</td>
<td>0.93</td>
<td>0.92</td>
<td>0.94</td>
</tr>
<tr>
<td>3</td>
<td>6.09</td>
<td>6.53</td>
<td>5.91</td>
<td>4.63</td>
<td>5.08</td>
<td>4.19</td>
<td>0.93</td>
<td>0.92</td>
<td>0.93</td>
</tr>
<tr>
<td>4</td>
<td>6.15</td>
<td>6.64</td>
<td>6.12</td>
<td>4.61</td>
<td>5.08</td>
<td>4.26</td>
<td>0.93</td>
<td>0.91</td>
<td>0.93</td>
</tr>
<tr>
<td>5</td>
<td>6.13</td>
<td>6.69</td>
<td>6.31</td>
<td>4.55</td>
<td>5.06</td>
<td>4.32</td>
<td>0.93</td>
<td>0.91</td>
<td>0.92</td>
</tr>
<tr>
<td>6</td>
<td>6.04</td>
<td>6.69</td>
<td>6.50</td>
<td>4.47</td>
<td>5.03</td>
<td>4.38</td>
<td>0.93</td>
<td>0.91</td>
<td>0.92</td>
</tr>
<tr>
<td>7</td>
<td>5.92</td>
<td>6.66</td>
<td>6.66</td>
<td>4.41</td>
<td>5.02</td>
<td>4.43</td>
<td>0.93</td>
<td>0.91</td>
<td>0.91</td>
</tr>
<tr>
<td>8</td>
<td>5.83</td>
<td>6.67</td>
<td>6.82</td>
<td>4.38</td>
<td>5.05</td>
<td>4.47</td>
<td>0.93</td>
<td>0.91</td>
<td>0.91</td>
</tr>
<tr>
<td>9</td>
<td>5.82</td>
<td>6.77</td>
<td>6.97</td>
<td>4.42</td>
<td>5.14</td>
<td>4.53</td>
<td>0.93</td>
<td>0.91</td>
<td>0.90</td>
</tr>
<tr>
<td>10</td>
<td>5.97</td>
<td>7.01</td>
<td>7.13</td>
<td>4.55</td>
<td>5.33</td>
<td>4.60</td>
<td>0.93</td>
<td>0.90</td>
<td>0.90</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>The results in <xref ref-type="table" rid="table-2">Table 2</xref> show that the SCW method demonstrated strong performance across all prediction frames, consistently achieving low RMSE, MAE, and high <inline-formula id="ieqn-105"><mml:math id="mml-ieqn-105"><mml:msup><mml:mi>R</mml:mi><mml:mn>2</mml:mn></mml:msup></mml:math></inline-formula> values. Notably, even for predictions as far ahead as 10 frames, the SCW algorithm maintained high accuracy. For example, when predicting a single frame, the SCW method achieved an RMSE of 5.81, an MAE of 4.57, and an <inline-formula id="ieqn-106"><mml:math id="mml-ieqn-106"><mml:msup><mml:mi>R</mml:mi><mml:mn>2</mml:mn></mml:msup></mml:math></inline-formula> value of 0.93. As the prediction horizon increased to 10 frames, the performance remained stable, with the RMSE reaching 5.97, the MAE increasing slightly to 4.55, and the <inline-formula id="ieqn-107"><mml:math id="mml-ieqn-107"><mml:msup><mml:mi>R</mml:mi><mml:mn>2</mml:mn></mml:msup></mml:math></inline-formula> value dropping marginally to 0.93. This demonstrates the SCW method&#x2019;s capability for long-term prediction without significant loss in accuracy.</p>

<p>In contrast, the removal of soft constraints (Ablation SC) and quadratic weighting (Ablation QW) resulted in noticeable declines in performance, especially for longer-term predictions. For example, without the soft constraints, the RMSE increased by 0.26 for 1-frame predictions and continued to rise for longer prediction horizons, while the <inline-formula id="ieqn-108"><mml:math id="mml-ieqn-108"><mml:msup><mml:mi>R</mml:mi><mml:mn>2</mml:mn></mml:msup></mml:math></inline-formula> value dropped significantly by the 10-frame prediction (from 0.93 with SCW to 0.90 without SC). This highlights the importance of incorporating soft constraints in maintaining prediction stability and reducing overfitting.</p>
<p>The inclusion of quadratic weighting also showed an improvement in prediction accuracy, especially for the first few frames, as seen in the improvement of the RMSE values in the first few predictions with quadratic weighting. These findings confirm the effectiveness of both soft constraints and quadratic weighting in improving the SCW algorithm&#x2019;s prediction precision.</p>
<sec id="s5_4_1">
<label>5.4.1</label>
<title>Gait Phase Estimation and Real-Time Prediction</title>
<p>A key advantage of the SCW method is its ability to continuously predict and estimate gait phases throughout the gait cycle. Unlike event-based methods that operate at discrete time points, SCW provides smooth and real-time phase transitions, allowing for more accurate tracking of gait states. <xref ref-type="fig" rid="fig-6">Fig. 6</xref> illustrates SCW&#x2019;s real-time prediction performance across the gait cycle. The figure showcases the accuracy with which the SCW method identifies various gait phases, with the algorithm able to maintain high fidelity even during rapid gait changes.</p>
<fig id="fig-6">
<label>Figure 6</label>
<caption>
<title>SCW algorithm&#x2019;s prediction and phase estimation performance for different frame numbers.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_77791-fig-6.tif"/>
</fig>
</sec>
<sec id="s5_4_2">
<label>5.4.2</label>
<title>Comparison with Literature: Gait Phase Estimation Accuracy</title>
<p>In addition to trajectory prediction, we evaluated SCW&#x2019;s ability to estimate key gait phases, such as Heel Strike (HS), Foot Flat (FF), Heel Off (HO), and Toe Off (TO). <xref ref-type="table" rid="table-3">Table 3</xref> compares SCW&#x2019;s phase estimates with those reported in existing literature. The table shows that SCW&#x2019;s phase estimates are in close agreement with state-of-the-art methods, demonstrating its effectiveness in real-time gait phase detection.</p>
<table-wrap id="table-3">
<label>Table 3</label>
<caption>
<title>Accuracy comparison of gait phase estimation (ms) with state-of-the-art methods.</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th>Method</th>
<th>HS (ms)</th>
<th>FF (ms)</th>
<th>HO (ms)</th>
<th>TO (ms)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Lee et al. [<xref ref-type="bibr" rid="ref-27">27</xref>]</td>
<td>19</td>
<td>&#x2013;</td>
<td>&#x2013;</td>
<td>&#x2212;8</td>
</tr>
<tr>
<td>Maqbool et al. [<xref ref-type="bibr" rid="ref-28">28</xref>]</td>
<td>21.8 <inline-formula id="ieqn-109"><mml:math id="mml-ieqn-109"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 20</td>
<td>&#x2013;</td>
<td>&#x2212;1.7 <inline-formula id="ieqn-110"><mml:math id="mml-ieqn-110"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 53</td>
<td>&#x2212;7.5 <inline-formula id="ieqn-111"><mml:math id="mml-ieqn-111"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 15.5</td>
</tr>
<tr>
<td>S&#x00E1;nchez Manchola et al. [<xref ref-type="bibr" rid="ref-29">29</xref>]</td>
<td>&#x2212;17 <inline-formula id="ieqn-112"><mml:math id="mml-ieqn-112"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 20</td>
<td>&#x2212;28 <inline-formula id="ieqn-113"><mml:math id="mml-ieqn-113"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 12</td>
<td>9 <inline-formula id="ieqn-114"><mml:math id="mml-ieqn-114"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 29</td>
<td>&#x2212;24 <inline-formula id="ieqn-115"><mml:math id="mml-ieqn-115"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 15</td>
</tr>
<tr>
<td>Choi et al. [<xref ref-type="bibr" rid="ref-30">30</xref>]</td>
<td>32 <inline-formula id="ieqn-116"><mml:math id="mml-ieqn-116"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 17</td>
<td>28 <inline-formula id="ieqn-117"><mml:math id="mml-ieqn-117"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 12</td>
<td>17 <inline-formula id="ieqn-118"><mml:math id="mml-ieqn-118"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 25</td>
<td>26 <inline-formula id="ieqn-119"><mml:math id="mml-ieqn-119"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 11</td>
</tr>
<tr>
<td>Ours (SCW)</td>
<td>12.8 <inline-formula id="ieqn-120"><mml:math id="mml-ieqn-120"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 2.0</td>
<td>11.1 <inline-formula id="ieqn-121"><mml:math id="mml-ieqn-121"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 33.1</td>
<td>&#x2212;17.3 <inline-formula id="ieqn-122"><mml:math id="mml-ieqn-122"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 35.2</td>
<td>&#x2212;4.8 <inline-formula id="ieqn-123"><mml:math id="mml-ieqn-123"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 30.4</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>For HS, SCW estimated 12.8 <inline-formula id="ieqn-124"><mml:math id="mml-ieqn-124"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 2.0 ms, which is consistent with the reported value of 19 ms by Lee et al. (2019) and 14.0 <inline-formula id="ieqn-125"><mml:math id="mml-ieqn-125"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 0.3 ms by Bernard et al. (2020), highlighting SCW&#x2019;s ability to accurately capture this key event. Similarly, for FF, SCW&#x2019;s estimate of 11.1 <inline-formula id="ieqn-126"><mml:math id="mml-ieqn-126"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 33.1 ms is slightly more variable than Shaikh et al.&#x2019;s estimate of 28 <inline-formula id="ieqn-127"><mml:math id="mml-ieqn-127"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 12 ms but remains within an acceptable range. HO was estimated at &#x2212;17.3 <inline-formula id="ieqn-128"><mml:math id="mml-ieqn-128"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 35.2 ms, showing high accuracy when compared with other studies such as Maqbool et al. (&#x2212;1.7 <inline-formula id="ieqn-129"><mml:math id="mml-ieqn-129"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 53 ms) and Sanchez et al. (9 <inline-formula id="ieqn-130"><mml:math id="mml-ieqn-130"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 29 ms). Lastly, for TO, SCW estimated &#x2212;4.8 <inline-formula id="ieqn-131"><mml:math id="mml-ieqn-131"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 30.4 ms, which is comparable to the results of Maqbool et al. (&#x2212;7.5 <inline-formula id="ieqn-132"><mml:math id="mml-ieqn-132"><mml:mo>&#x00B1;</mml:mo></mml:math></inline-formula> 15.5 ms).</p>
<p>These results highlight SCW&#x2019;s strong performance across all gait phases, particularly in its ability to estimate the timing of these transitions with high precision, even in real-time conditions.</p>
</sec>
</sec>
</sec>
<sec id="s6">
<label>6</label>
<title>Discussion</title>
<p>In this study, we proposed a dual-stage framework for gait phase estimation and trajectory prediction in wearable devices, with a particular focus on exoskeletons. This framework combines offline template extraction via the DTW-KM algorithm and real-time gait matching using the SCW (Soft Constraint Weighting) algorithm, addressing the critical challenges of dynamic gait adaptation, computational efficiency, and accuracy. Our experimental results demonstrate the effectiveness of both the DTW-KM algorithm for template generation and the SCW method for real-time phase estimation and trajectory prediction.</p>
<sec id="s6_1">
<label>6.1</label>
<title>Effectiveness of DTW-KM for Template Extraction</title>
<p>The DTW-KM algorithm effectively addresses the challenge of generating diverse, representative gait templates for various walking scenarios. By incorporating DTW and K-Means clustering, the method captures complex, time-varying gait dynamics and groups them into meaningful clusters that reflect different walking speeds and patterns. The clustering results show clear distinctions between gait cycles of different speeds, with consistent cluster separation observed in the DTW distance matrix. For instance, slower gaits were distinctly categorized into one cluster, while normal and irregular gait patterns were represented in separate clusters. These templates, once extracted, provide a solid foundation for real-time matching and prediction tasks.</p>
<p>The versatility of the DTW-KM algorithm is particularly important in addressing the inherent variability in human gait, both across different users and in varying environmental conditions. By adapting to the specific characteristics of each gait cycle, the DTW-KM method offers a more accurate and personalized approach to gait phase recognition.</p>
</sec>
<sec id="s6_2">
<label>6.2</label>
<title>The Role of SCW in Real-Time Prediction and Phase Estimation</title>
<p>The SCW algorithm is a key component in this study, enabling real-time trajectory prediction and continuous phase estimation. By integrating soft constraints and a quadratic weighted loss function, SCW stabilizes the prediction model and reduces oscillations, ensuring smooth and accurate adjustments to the gait trajectory over time. The results of the ablation study reveal the significant impact of soft constraints and quadratic weighting in improving prediction accuracy. Without these features, the model showed notable performance degradation, especially for longer prediction horizons. This emphasizes the importance of incorporating stability mechanisms such as soft constraints to maintain accuracy over time.</p>
<p>The SCW method&#x2019;s ability to predict up to 10 frames ahead, with minimal loss in accuracy, is particularly promising for practical applications in exoskeletons. Even as the prediction horizon extends, SCW maintains high prediction performance, as evidenced by its consistently low RMSE and MAE values. These results suggest that SCW can effectively assist in real-time control of wearable devices, where continuous prediction of gait phases is required for smooth and responsive operation.</p>
</sec>
<sec id="s6_3">
<label>6.3</label>
<title>Comparison with Existing Methods</title>
<p>Our evaluation of SCW&#x2019;s phase estimation performance against established methods demonstrated its strong alignment with existing literature. SCW&#x2019;s accuracy in identifying key gait phases such as HS, FF, HO, and TO is comparable to or even better than other methods, particularly in real-time scenarios. The timing discrepancies for these phases were within an acceptable range when compared with previous studies, indicating that SCW can reliably estimate phase transitions with high precision. To further clarify the advantages of the proposed approach, a qualitative comparison with representative gait prediction and phase estimation methods is summarized in <xref ref-type="table" rid="table-4">Table 4</xref>.</p>
<table-wrap id="table-4">
<label>Table 4</label>
<caption>
<title>Qualitative comparison between the proposed method and representative gait prediction approaches.</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th>Method Category</th>
<th>Cont. Phase Est.</th>
<th>Real-Time</th>
<th>Comp. Complexity</th>
<th>Comfort Pot.</th>
</tr>
</thead>
<tbody>
<tr>
<td>Deep learning&#x2013;based</td>
<td><inline-formula id="ieqn-133"><mml:math id="mml-ieqn-133"><mml:mi>&#x2713;</mml:mi></mml:math></inline-formula></td>
<td><inline-formula id="ieqn-134"><mml:math id="mml-ieqn-134"><mml:mi mathvariant="normal">&#x25B3;</mml:mi></mml:math></inline-formula></td>
<td>High</td>
<td><inline-formula id="ieqn-135"><mml:math id="mml-ieqn-135"><mml:mi mathvariant="normal">&#x25B3;</mml:mi></mml:math></inline-formula></td>
</tr>
<tr>
<td>CPG-based methods [<xref ref-type="bibr" rid="ref-22">22</xref>]</td>
<td><inline-formula id="ieqn-136"><mml:math id="mml-ieqn-136"><mml:mi>&#x2713;</mml:mi></mml:math></inline-formula></td>
<td><inline-formula id="ieqn-137"><mml:math id="mml-ieqn-137"><mml:mi>&#x2713;</mml:mi></mml:math></inline-formula></td>
<td>Medium</td>
<td><inline-formula id="ieqn-138"><mml:math id="mml-ieqn-138"><mml:mi mathvariant="normal">&#x25B3;</mml:mi></mml:math></inline-formula></td>
</tr>
<tr>
<td>Event-driven methods [<xref ref-type="bibr" rid="ref-31">31</xref>]</td>
<td><inline-formula id="ieqn-139"><mml:math id="mml-ieqn-139"><mml:mo>&#x00D7;</mml:mo></mml:math></inline-formula></td>
<td><inline-formula id="ieqn-140"><mml:math id="mml-ieqn-140"><mml:mi>&#x2713;</mml:mi></mml:math></inline-formula></td>
<td>Low</td>
<td><inline-formula id="ieqn-141"><mml:math id="mml-ieqn-141"><mml:mo>&#x00D7;</mml:mo></mml:math></inline-formula></td>
</tr>
<tr>
<td><bold>Proposed method</bold></td>
<td><inline-formula id="ieqn-142"><mml:math id="mml-ieqn-142"><mml:mi>&#x2713;</mml:mi></mml:math></inline-formula></td>
<td><inline-formula id="ieqn-143"><mml:math id="mml-ieqn-143"><mml:mi>&#x2713;</mml:mi></mml:math></inline-formula></td>
<td>Low</td>
<td><inline-formula id="ieqn-144"><mml:math id="mml-ieqn-144"><mml:mi>&#x2713;</mml:mi></mml:math></inline-formula></td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<fn id="table-4fn1" fn-type="other">
<p>Note: Here, <inline-formula id="ieqn-145"><mml:math id="mml-ieqn-145"><mml:mi>&#x2713;</mml:mi></mml:math></inline-formula> indicates good performance, <inline-formula id="ieqn-146"><mml:math id="mml-ieqn-146"><mml:mi mathvariant="normal">&#x25B3;</mml:mi></mml:math></inline-formula> indicates moderate or condition-dependent performance, and <inline-formula id="ieqn-147"><mml:math id="mml-ieqn-147"><mml:mo>&#x00D7;</mml:mo></mml:math></inline-formula> indicates insufficient performance.</p>
</fn>
</table-wrap-foot>
</table-wrap>
<p>Continuous phase estimation refers to the ability to provide smooth and continuous gait phase information rather than discrete event detection. Real-time performance indicates whether the method can be executed with low latency on embedded or wearable systems. Computational complexity reflects the relative computational burden of the method. Comfort potential refers to the capability of the control-related gait prediction method to reduce abrupt assistance changes and improve human&#x2013;exoskeleton interaction smoothness.</p>
<p>While SCW performs well in detecting gait phases, there are some areas for improvement. For instance, the variability observed in the estimation of the FF and HO phases indicates that more fine-tuning may be needed for these specific transitions, especially when dealing with highly variable or irregular gaits. Future work could focus on refining the SCW method to improve phase detection in these instances, possibly through more advanced feature extraction techniques or multi-modal sensor fusion.</p>
</sec>
<sec id="s6_4">
<label>6.4</label>
<title>Real-Time Performance Analysis</title>
<p>Real-time performance is a critical requirement for ankle exoskeleton control systems. Unlike learning-based gait prediction methods that require computationally intensive model inference, the proposed method is based on online DTW and template-based trajectory prediction, which involve only distance calculation and simple mapping operations.</p>
<p>The computational complexity of the DTW-based phase recognition is bounded due to the use of short sliding windows, and the trajectory prediction stage introduces negligible computational overhead. As a result, the proposed method is suitable for real-time implementation on embedded systems commonly used in wearable exoskeletons.</p>
<p>Compared with deep learning and optimization-based methods, the proposed approach provides a favorable trade-off between prediction accuracy and real-time feasibility.</p>
</sec>
<sec id="s6_5">
<label>6.5</label>
<title>Differences between Healthy Users and Hemiparetic Users in Exoskeleton Wearing Response</title>
<p>Compared with healthy users, individuals with partial hemiparesis typically exhibit asymmetric gait patterns, increased stride-to-stride variability, and reduced voluntary control of the ankle joint. These characteristics make hemiparetic users more sensitive to control latency, phase misalignment, and abrupt assistance changes when wearing ankle exoskeletons.</p>
<p>In such cases, inappropriate timing or unstable control outputs may trigger strong resistance responses, including discomfort, altered muscle activation, or gait instability. Therefore, control strategies validated on healthy subjects may not directly translate to impaired populations without additional robustness mechanisms.</p>
<p>The proposed method incorporates DTW-based temporal alignment and soft-constrained online parameter adaptation to mitigate these issues. By suppressing abrupt parameter changes and enabling continuous gait phase estimation with short-term prediction, the framework aims to reduce the likelihood of strong adverse responses when applied to hemiparetic gait assistance.</p>
<p>Although the experimental evaluation in this study is conducted on healthy subjects, the algorithmic design explicitly accounts for gait irregularities and temporal distortions commonly observed in hemiparetic gait. Future work will include clinical experiments with hemiparetic users to quantitatively evaluate user comfort, resistance response, and human&#x2013;exoskeleton interaction safety.</p>
</sec>
</sec>
<sec id="s7">
<label>7</label>
<title>Conclusion</title>
<p>This study presents a dual-branch framework for gait trajectory prediction in exoskeletons and embedded systems, combining offline learning and online prediction. The offline phase uses DTW and K-Means clustering to extract adaptable gait templates. The online phase introduces SCW method, enhancing real-time prediction adaptability and timelines.</p>
<p>The framework achieves low-latency, high-precision predictions while maintaining computational efficiency on resource-constrained devices. It ensures prediction accuracy and efficient operation under limited resources, advancing the practical application of intelligent devices like exoskeletons.</p>
</sec>
</body>
<back>
<ack>
<p>Not applicable.</p>
</ack>
<sec>
<title>Funding Statement</title>
<p>This research was supported by Shenzhen Municipal Natural Science Foundation and Shenzhen Science and Technology Innovation Committee (KCXFZ202002011010487), Shenzhen Municipal Natural Science Foundation (WDZC20200818121348001).</p>
</sec>
<sec>
<title>Author Contributions</title>
<p>The authors confirm contribution to the paper as follows: Sihan Wang and Xingjun Wang conceptualized the study. Sihan Wang was responsible for the methodology, software development, formal analysis, investigation, resources, data curation, and original draft preparation. Luyao Liu and Yifan Liu contributed to the validation of the study and participated in writing&#x2014;review and editing. Sihan Wang was also responsible for visualization, while Xingjun Wang provided supervision and project administration. Xingjun Wang was the corresponding author and acquired funding for the project. All authors reviewed and approved the final version of the manuscript.</p>
</sec>
<sec sec-type="data-availability">
<title>Availability of Data and Materials</title>
<p>The data that support the findings of this study are available from the Corresponding author Yifan Liu upon reasonable request.</p>
</sec>
<sec>
<title>Ethics Approval</title>
<p>Not applicable. This study did not involve any new experiments with human or animal subjects. All data used in this work were obtained from previously collected or anonymized datasets and were analyzed solely for methodological evaluation.</p>
</sec>
<sec sec-type="COI-statement">
<title>Conflicts of Interest</title>
<p>The authors declare no conflicts of interest.</p>
</sec>
<ref-list content-type="authoryear">
<title>References</title>
<ref id="ref-1"><label>[1]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Siviy</surname> <given-names>C</given-names></string-name>, <string-name><surname>Baker</surname> <given-names>LM</given-names></string-name>, <string-name><surname>Quinlivan</surname> <given-names>BT</given-names></string-name>, <string-name><surname>Porciuncula</surname> <given-names>F</given-names></string-name>, <string-name><surname>Swaminathan</surname> <given-names>K</given-names></string-name>, <string-name><surname>Awad</surname> <given-names>LN</given-names></string-name>, <etal>et al</etal></person-group>. <article-title>Opportunities and challenges in the development of exoskeletons for locomotor assistance</article-title>. <source>Nat Biomed Eng</source>. <year>2023</year>;<volume>7</volume>(<issue>4</issue>):<fpage>456</fpage>&#x2013;<lpage>72</lpage>. doi:<pub-id pub-id-type="doi">10.1038/s41551-022-00984-1</pub-id>; <pub-id pub-id-type="pmid">36550303</pub-id></mixed-citation></ref>
<ref id="ref-2"><label>[2]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Tan</surname> <given-names>G</given-names></string-name>, <string-name><surname>Uchitomi</surname> <given-names>H</given-names></string-name>, <string-name><surname>Isobe</surname> <given-names>R</given-names></string-name>, <string-name><surname>Miyake</surname> <given-names>Y</given-names></string-name></person-group>. <article-title>Sense of embodiment with synchronized avatar during walking in mixed reality</article-title>. <source>Sci Rep</source>. <year>2024</year>;<volume>14</volume>(<issue>1</issue>):<fpage>21198</fpage>. doi:<pub-id pub-id-type="doi">10.1038/s41598-024-72095-7</pub-id>; <pub-id pub-id-type="pmid">39261561</pub-id></mixed-citation></ref>
<ref id="ref-3"><label>[3]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Hanif</surname> <given-names>CA</given-names></string-name>, <string-name><surname>Mughal</surname> <given-names>MA</given-names></string-name>, <string-name><surname>Khan</surname> <given-names>MA</given-names></string-name>, <string-name><surname>Almujally</surname> <given-names>NA</given-names></string-name>, <string-name><surname>Kim</surname> <given-names>T</given-names></string-name>, <string-name><surname>Cha</surname> <given-names>J-H</given-names></string-name></person-group>. <article-title>Human gait recognition for biometrics application based on deep learning fusion assisted framework</article-title>. <source>Comput Mater Contin</source>. <year>2024</year>;<volume>78</volume>(<issue>1</issue>):<fpage>357</fpage>&#x2013;<lpage>74</lpage>. doi:<pub-id pub-id-type="doi">10.32604/cmc.2023.043061</pub-id>.</mixed-citation></ref>
<ref id="ref-4"><label>[4]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Liu</surname> <given-names>X</given-names></string-name>, <string-name><surname>Liu</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>X</given-names></string-name></person-group>. <article-title>Efficient gait trajectory prediction method based on soft constraint weighted template matching: work-in-progress</article-title>. In: <conf-name>Proceedings of the 2023 International Conference on Hardware/Software Codesign and System Synthesis; 2023 Sep 17&#x2013;22; Hamburg, Germany</conf-name>. p. <fpage>46</fpage>&#x2013;<lpage>7</lpage>.</mixed-citation></ref>
<ref id="ref-5"><label>[5]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Liu</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Liu</surname> <given-names>X</given-names></string-name>, <string-name><surname>Zhu</surname> <given-names>Q</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Yang</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Xie</surname> <given-names>H</given-names></string-name>, <etal>et al</etal></person-group>. <article-title>Adaptive detection in real-time gait analysis through the dynamic gait event identifier</article-title>. <source>Bioengineering</source>. <year>2024</year>;<volume>11</volume>(<issue>8</issue>):<fpage>806</fpage>. doi:<pub-id pub-id-type="doi">10.3390/bioengineering11080806</pub-id>; <pub-id pub-id-type="pmid">39199764</pub-id></mixed-citation></ref>
<ref id="ref-6"><label>[6]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Guo</surname> <given-names>C</given-names></string-name>, <string-name><surname>Li</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Liu</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Liu</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Yi</surname> <given-names>J</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>Q</given-names></string-name>, <etal>et al</etal></person-group>. <article-title>Continuous gait phase estimation by muscle deformations with speed and ramp adaptability</article-title>. <source>IEEE Sens J</source>. <year>2024</year>;<volume>24</volume>(<issue>14</issue>):<fpage>23173</fpage>&#x2013;<lpage>82</lpage>. doi:<pub-id pub-id-type="doi">10.1109/jsen.2024.3404633</pub-id>.</mixed-citation></ref>
<ref id="ref-7"><label>[7]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Heo</surname> <given-names>DH</given-names></string-name>, <string-name><surname>Park</surname> <given-names>SH</given-names></string-name>, <string-name><surname>Kang</surname> <given-names>SJ</given-names></string-name></person-group>. <article-title>Resource-constrained edge-based deep learning for real-time person-identification using foot-pad</article-title>. <source>Eng Appl Artif Intell</source>. <year>2024</year>;<volume>138</volume>(<issue>19</issue>):<fpage>109290</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.engappai.2024.109290</pub-id>.</mixed-citation></ref>
<ref id="ref-8"><label>[8]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Martinez-Hernandez</surname> <given-names>U</given-names></string-name>, <string-name><surname>Awad</surname> <given-names>MI</given-names></string-name>, <string-name><surname>Dehghani-Sanij</surname> <given-names>AA</given-names></string-name></person-group>. <article-title>Learning architecture for the recognition of walking and prediction of gait period using wearable sensors</article-title>. <source>Neurocomputing</source>. <year>2022</year>;<volume>470</volume>(<issue>22</issue>):<fpage>1</fpage>&#x2013;<lpage>10</lpage>. doi:<pub-id pub-id-type="doi">10.1016/j.neucom.2021.10.044</pub-id>.</mixed-citation></ref>
<ref id="ref-9"><label>[9]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Lobo</surname> <given-names>P</given-names></string-name>, <string-name><surname>Morais</surname> <given-names>P</given-names></string-name>, <string-name><surname>Murray</surname> <given-names>P</given-names></string-name>, <string-name><surname>Vila&#x00E7;a</surname> <given-names>JL</given-names></string-name></person-group>. <article-title>Trends and innovations in wearable technology for motor rehabilitation, prediction, and monitoring: a comprehensive review</article-title>. <source>Sensors</source>. <year>2024</year>;<volume>24</volume>(<issue>24</issue>):<fpage>7973</fpage>. doi:<pub-id pub-id-type="doi">10.3390/s24247973</pub-id>; <pub-id pub-id-type="pmid">39771710</pub-id></mixed-citation></ref>
<ref id="ref-10"><label>[10]</label><mixed-citation publication-type="book"><person-group person-group-type="author"><string-name><surname>Mukund</surname> <given-names>A</given-names></string-name></person-group>. <chapter-title>Wearable technology and sensor data in assistive systems: enhancing rehabilitation through predictive analytics</chapter-title>. In: <source>Predictive algorithms for rehabilitation and assistive systems</source>. <publisher-loc>Hershey, PA, USA</publisher-loc>: <publisher-name>IGI Global Scientific Publishing</publisher-name>; <year>2025</year>. p. <fpage>253</fpage>&#x2013;<lpage>90</lpage>.</mixed-citation></ref>
<ref id="ref-11"><label>[11]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Salaorni</surname> <given-names>F</given-names></string-name>, <string-name><surname>Bonardi</surname> <given-names>G</given-names></string-name>, <string-name><surname>Schena</surname> <given-names>F</given-names></string-name>, <string-name><surname>Tinazzi</surname> <given-names>M</given-names></string-name>, <string-name><surname>Gandolfi</surname> <given-names>M</given-names></string-name></person-group>. <article-title>Wearable devices for gait and posture monitoring via telemedicine in people with movement disorders and multiple sclerosis: a systematic review</article-title>. <source>Expert Rev Med Devices</source>. <year>2024</year>;<volume>21</volume>(<issue>1&#x2013;2</issue>):<fpage>121</fpage>&#x2013;<lpage>40</lpage>. doi:<pub-id pub-id-type="doi">10.1080/17434440.2023.2298342</pub-id>; <pub-id pub-id-type="pmid">38124300</pub-id></mixed-citation></ref>
<ref id="ref-12"><label>[12]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Luo</surname> <given-names>J</given-names></string-name>, <string-name><surname>Xu</surname> <given-names>B</given-names></string-name>, <string-name><surname>Tjahjadi</surname> <given-names>T</given-names></string-name>, <string-name><surname>Yi</surname> <given-names>J</given-names></string-name></person-group>. <article-title>A novel 3D gait model for subject identification robust against carrying and dressing variations</article-title>. <source>Comput Mater Contin</source>. <year>2024</year>;<volume>80</volume>(<issue>1</issue>):<fpage>235</fpage>&#x2013;<lpage>61</lpage>. doi:<pub-id pub-id-type="doi">10.32604/cmc.2024.050018</pub-id>.</mixed-citation></ref>
<ref id="ref-13"><label>[13]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Romero-Soroz&#x00E1;bal</surname> <given-names>P</given-names></string-name>, <string-name><surname>Delgado-Oleas</surname> <given-names>G</given-names></string-name>, <string-name><surname>Laudanski</surname> <given-names>AF</given-names></string-name>, <string-name><surname>Guti&#x00E9;rrez</surname> <given-names>&#x00C1;</given-names></string-name>, <string-name><surname>Rocon</surname> <given-names>E</given-names></string-name></person-group>. <article-title>Novel methods for personalized gait assistance: three-dimensional trajectory prediction based on regression and LSTM models</article-title>. <source>Biomimetics</source>. <year>2024</year>;<volume>9</volume>(<issue>6</issue>):<fpage>352</fpage>. doi:<pub-id pub-id-type="doi">10.3390/biomimetics9060352</pub-id>; <pub-id pub-id-type="pmid">38921232</pub-id></mixed-citation></ref>
<ref id="ref-14"><label>[14]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Saoud</surname> <given-names>LS</given-names></string-name>, <string-name><surname>Hussain</surname> <given-names>I</given-names></string-name></person-group>. <article-title>Kinematic integration network with enhanced temporal intelligence and quality-driven attention for precise joint angle prediction in exoskeleton-based gait analysis</article-title>. <source>IEEE Access</source>. <year>2025</year>;<volume>13</volume>:<fpage>112508</fpage>&#x2013;<lpage>27</lpage>. doi:<pub-id pub-id-type="doi">10.36227/techrxiv.170555233.35134556/v1</pub-id>.</mixed-citation></ref>
<ref id="ref-15"><label>[15]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Lee</surname> <given-names>J</given-names></string-name>, <string-name><surname>Bjelonic</surname> <given-names>M</given-names></string-name>, <string-name><surname>Reske</surname> <given-names>A</given-names></string-name>, <string-name><surname>Wellhausen</surname> <given-names>L</given-names></string-name>, <string-name><surname>Miki</surname> <given-names>T</given-names></string-name>, <string-name><surname>Hutter</surname> <given-names>M</given-names></string-name></person-group>. <article-title>Learning robust autonomous navigation and locomotion for wheeled-legged robots</article-title>. <source>Sci Robot</source>. <year>2024</year>;<volume>9</volume>(<issue>89</issue>):<fpage>eadi9641</fpage>. doi:<pub-id pub-id-type="doi">10.1126/scirobotics.adi9641</pub-id>; <pub-id pub-id-type="pmid">38657088</pub-id></mixed-citation></ref>
<ref id="ref-16"><label>[16]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Arshad</surname> <given-names>H</given-names></string-name>, <string-name><surname>Khan</surname> <given-names>MA</given-names></string-name>, <string-name><surname>Sharif</surname> <given-names>MI</given-names></string-name>, <string-name><surname>Yasmin</surname> <given-names>M</given-names></string-name>, <string-name><surname>Tavares</surname> <given-names>JMR</given-names></string-name>, <string-name><surname>Zhang</surname> <given-names>YD</given-names></string-name>, <etal>et al</etal></person-group>. <article-title>A multilevel paradigm for deep convolutional neural network features selection with an application to human gait recognition</article-title>. <source>Expert Syst</source>. <year>2022</year>;<volume>39</volume>(<issue>7</issue>):<fpage>e12541</fpage>.</mixed-citation></ref>
<ref id="ref-17"><label>[17]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Diraco</surname> <given-names>G</given-names></string-name>, <string-name><surname>Rescio</surname> <given-names>G</given-names></string-name>, <string-name><surname>Siciliano</surname> <given-names>P</given-names></string-name>, <string-name><surname>Leone</surname> <given-names>A</given-names></string-name></person-group>. <article-title>Review on human action recognition in smart living: sensing technology, multimodality, real-time processing, interoperability, and resource-constrained processing</article-title>. <source>Sensors</source>. <year>2023</year>;<volume>23</volume>(<issue>11</issue>):<fpage>5281</fpage>; <pub-id pub-id-type="pmid">37300008</pub-id></mixed-citation></ref>
<ref id="ref-18"><label>[18]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Lv</surname> <given-names>H</given-names></string-name>, <string-name><surname>Hao</surname> <given-names>B</given-names></string-name></person-group>. <article-title>Convolutional neural network and long short-term memory hybrid model-based gait prediction for spacesuit intelligent assistive device in low gravity environment</article-title>. <source>Acta Astronaut</source>. <year>2025</year>;<volume>236</volume>(<issue>3</issue>):<fpage>199</fpage>&#x2013;<lpage>212</lpage>. doi:<pub-id pub-id-type="doi">10.1016/j.actaastro.2025.06.049</pub-id>.</mixed-citation></ref>
<ref id="ref-19"><label>[19]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Yang</surname> <given-names>C</given-names></string-name>, <string-name><surname>Pu</surname> <given-names>C</given-names></string-name>, <string-name><surname>Zou</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Wei</surname> <given-names>T</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>C</given-names></string-name>, <string-name><surname>Li</surname> <given-names>Z</given-names></string-name></person-group>. <article-title>Bio-inspired neural networks with central pattern generators for learning multi-skill locomotion</article-title>. <source>Sci Rep</source>. <year>2025</year>;<volume>15</volume>(<issue>1</issue>):<fpage>10165</fpage>. doi:<pub-id pub-id-type="doi">10.1038/s41598-025-94408-0</pub-id>; <pub-id pub-id-type="pmid">40128221</pub-id></mixed-citation></ref>
<ref id="ref-20"><label>[20]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Zhou</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Cheng</surname> <given-names>J</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>B</given-names></string-name>, <string-name><surname>Zhou</surname> <given-names>J</given-names></string-name>, <string-name><surname>Yue</surname> <given-names>K</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>Z</given-names></string-name></person-group>. <article-title>CBF-based constrained optimization for safe and adaptive CPG gait planning in rehabilitation robots</article-title>. In: <conf-name>2025 44th Chinese Control Conference (CCC)</conf-name>. <publisher-loc>Piscataway, NJ, USA</publisher-loc>: <publisher-name>IEEE</publisher-name>; <year>2025</year>. p. <fpage>5095</fpage>&#x2013;<lpage>100</lpage>.</mixed-citation></ref>
<ref id="ref-21"><label>[21]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Hu</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Liang</surname> <given-names>J</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>T</given-names></string-name></person-group>. <article-title>Parameter synthesis of coupled nonlinear oscillators for CPG-based robotic locomotion</article-title>. <source>IEEE Trans Ind Electron</source>. <year>2014</year>;<volume>61</volume>(<issue>11</issue>):<fpage>6183</fpage>&#x2013;<lpage>91</lpage>. doi:<pub-id pub-id-type="doi">10.1109/tie.2014.2308150</pub-id>.</mixed-citation></ref>
<ref id="ref-22"><label>[22]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Kou</surname> <given-names>J</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Shi</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Guo</surname> <given-names>Q</given-names></string-name></person-group>. <article-title>Gait planning and multimodal human-exoskeleton cooperative control based on central pattern generator</article-title>. <source>IEEE/ASME Trans Mechatron</source>. <year>2025</year>;<volume>30</volume>(<issue>4</issue>):<fpage>2598</fpage>&#x2013;<lpage>608</lpage>. doi:<pub-id pub-id-type="doi">10.1109/tmech.2024.3453037</pub-id>.</mixed-citation></ref>
<ref id="ref-23"><label>[23]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Liu</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Liu</surname> <given-names>X</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Yang</surname> <given-names>X</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>X</given-names></string-name></person-group>. <article-title>Improving performance of human action intent recognition: analysis of gait recognition machine learning algorithms and optimal combination with inertial measurement units</article-title>. <source>Comput Biol Med</source>. <year>2023</year>;<volume>163</volume>:<fpage>107192</fpage>; <pub-id pub-id-type="pmid">37429126</pub-id></mixed-citation></ref>
<ref id="ref-24"><label>[24]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Zhan</surname> <given-names>H</given-names></string-name>, <string-name><surname>Kou</surname> <given-names>J</given-names></string-name>, <string-name><surname>Cao</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>W</given-names></string-name>, <string-name><surname>Zhang</surname> <given-names>J</given-names></string-name>, <string-name><surname>Shi</surname> <given-names>Y</given-names></string-name>, <etal>et al</etal></person-group>. <article-title>Model identification and admittance control with neighborhood field optimization in human-exoskeleton cooperative motion</article-title>. <source>Robotica</source>. <year>2025</year>;<volume>43</volume>(<issue>12</issue>):<fpage>4560</fpage>&#x2013;<lpage>75</lpage>. doi:<pub-id pub-id-type="doi">10.1017/s0263574725103032</pub-id>.</mixed-citation></ref>
<ref id="ref-25"><label>[25]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Lee</surname> <given-names>J</given-names></string-name>, <string-name><surname>Hong</surname> <given-names>W</given-names></string-name>, <string-name><surname>Hur</surname> <given-names>P</given-names></string-name></person-group>. <article-title>Continuous gait phase estimation using LSTM for robotic transfemoral prosthesis across walking speeds</article-title>. <source>IEEE Trans Neural Syst Rehabil Eng</source>. <year>2021</year>;<volume>29</volume>:<fpage>1470</fpage>&#x2013;<lpage>7</lpage>. doi:<pub-id pub-id-type="doi">10.1109/tnsre.2021.3098689</pub-id>; <pub-id pub-id-type="pmid">34283718</pub-id></mixed-citation></ref>
<ref id="ref-26"><label>[26]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Zhang</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Lei</surname> <given-names>H</given-names></string-name>, <string-name><surname>Gu</surname> <given-names>W</given-names></string-name></person-group>. <article-title>Gait phase recognition of lower limb exoskeleton system based on the integrated network model</article-title>. <source>Biomed Signal Process Control</source>. <year>2022</year>;<volume>76</volume>(<issue>6</issue>):<fpage>103693</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.bspc.2022.103693</pub-id>.</mixed-citation></ref>
<ref id="ref-27"><label>[27]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Lee</surname> <given-names>SS</given-names></string-name>, <string-name><surname>Choi</surname> <given-names>ST</given-names></string-name>, <string-name><surname>Choi</surname> <given-names>SI</given-names></string-name></person-group>. <article-title>Classification of gait type based on deep learning using various sensors with smart insole</article-title>. <source>Sensors</source>. <year>2019</year>;<volume>19</volume>(<issue>8</issue>):<fpage>1757</fpage>. doi:<pub-id pub-id-type="doi">10.3390/s19081757</pub-id>; <pub-id pub-id-type="pmid">31013773</pub-id></mixed-citation></ref>
<ref id="ref-28"><label>[28]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Maqbool</surname> <given-names>HF</given-names></string-name>, <string-name><surname>Husman</surname> <given-names>MAB</given-names></string-name>, <string-name><surname>Awad</surname> <given-names>MI</given-names></string-name>, <string-name><surname>Abouhossein</surname> <given-names>A</given-names></string-name>, <string-name><surname>Mehryar</surname> <given-names>P</given-names></string-name>, <string-name><surname>Iqbal</surname> <given-names>N</given-names></string-name>, <etal>et al</etal></person-group>. <article-title>Real-time gait event detection for lower limb amputees using a single wearable sensor</article-title>. In: <conf-name>2016 38th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC)</conf-name>. <publisher-loc>Piscataway, NJ, USA</publisher-loc>: <publisher-name>IEEE</publisher-name>; <year>2016</year>. p. <fpage>5067</fpage>&#x2013;<lpage>70</lpage>.</mixed-citation></ref>
<ref id="ref-29"><label>[29]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>S&#x00E1;nchez Manchola</surname> <given-names>MD</given-names></string-name>, <string-name><surname>Bernal</surname> <given-names>MJP</given-names></string-name>, <string-name><surname>Munera</surname> <given-names>M</given-names></string-name>, <string-name><surname>Cifuentes</surname> <given-names>CA</given-names></string-name></person-group>. <article-title>Gait phase detection for lower-limb exoskeletons using foot motion data from a single inertial measurement unit in hemiparetic individuals</article-title>. <source>Sensors</source>. <year>2019</year>;<volume>19</volume>(<issue>13</issue>):<fpage>2988</fpage>. doi:<pub-id pub-id-type="doi">10.3390/s19132988</pub-id>; <pub-id pub-id-type="pmid">31284619</pub-id></mixed-citation></ref>
<ref id="ref-30"><label>[30]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Choi</surname> <given-names>W</given-names></string-name>, <string-name><surname>Yang</surname> <given-names>W</given-names></string-name>, <string-name><surname>Na</surname> <given-names>J</given-names></string-name>, <string-name><surname>Lee</surname> <given-names>G</given-names></string-name>, <string-name><surname>Nam</surname> <given-names>W</given-names></string-name></person-group>. <article-title>Feature optimization for gait phase estimation with a genetic algorithm and Bayesian optimization</article-title>. <source>Appl Sci</source>. <year>2021</year>;<volume>11</volume>(<issue>19</issue>):<fpage>8940</fpage>. doi:<pub-id pub-id-type="doi">10.3390/app11198940</pub-id>.</mixed-citation></ref>
<ref id="ref-31"><label>[31]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Tanghe</surname> <given-names>K</given-names></string-name>, <string-name><surname>De Groote</surname> <given-names>F</given-names></string-name>, <string-name><surname>Lefeber</surname> <given-names>D</given-names></string-name>, <string-name><surname>De Schutter</surname> <given-names>J</given-names></string-name>, <string-name><surname>Aertbeli&#x00EB;n</surname> <given-names>E</given-names></string-name></person-group>. <article-title>Gait trajectory and event prediction from state estimation for exoskeletons during gait</article-title>. <source>IEEE Trans Neural Syst Rehabil Eng</source>. <year>2019</year>;<volume>28</volume>(<issue>1</issue>):<fpage>211</fpage>&#x2013;<lpage>20</lpage>. doi:<pub-id pub-id-type="doi">10.1109/tnsre.2019.2950309</pub-id>; <pub-id pub-id-type="pmid">31675336</pub-id></mixed-citation></ref>
</ref-list>
</back></article>