A gait timing memory fusion training method and system for a hip exoskeleton
Patent Information
- Application Number
- CN202611092058.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-22
- Publication Date
- 2026-10-09
AI Technical Summary
[0010]针对现有技术的不足,本发明提供一种用于髋关节外骨骼的步态时序记忆融合训练方法及系统,旨在将 CNN 输出的视觉空间特征与 IMU、关节角度、关节速度、电机电流等本体感觉数据进行时间对齐后输入 LSTM,并进一步提出适用于离策略 SAC 训练的序列采样、补零掩码和 Burn-in 预热机制,避免经验回放中的隐藏状态陈旧问题;以及如何在髋关节外骨骼的实时控制周期内建立对步态周期、地形过渡和传感器短时缺失的时序记忆,并在与SAC 结合训练时保证 LSTM 隐藏状态与当前网络参数一致,避免随机经验回放导致的状态失真和实机助力抖动;使系统能够在视觉短时缺失、传感器噪声、步态相位边界和地形过渡时保持稳定状态估计,并为 SAC提供包含历史信息且带有置信度和有效掩码的综合时空特征
1. 因为本发明中增强对部分可观察场景的适应能力;LSTM 隐藏状态保存步态历史和环境变化趋势,使系统不再完全依赖当前帧视觉或单时刻传感器数据。
Smart Images

Figure CN122889422A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of hip joint exoskeleton control, human movement intention recognition, recurrent neural networks and reinforcement learning training, and specifically relates to a gait temporal memory fusion training method and system for hip joint exoskeleton. Background Technology
[0002] Human gait exhibits significant periodicity and continuity. The timing of hip exoskeleton assistance depends not only on the current joint angle or the current image, but also on gait phase, velocity changes, stance transitions, and environmental trends over several past frames. When the visual sensor is briefly occluded or holes appear in the depth map, the system needs to utilize historical information to maintain an estimate of the current state. Therefore, the hip exoskeleton control problem inherently possesses characteristics of a partially observable Markov decision process.
[0003] Existing hip exoskeletons commonly employ finite state machines, threshold discrimination, hidden Markov models, traditional filters, or single-frame neural networks to estimate gait phase. Some schemes use recurrent networks for human motion recognition, but these are mostly used for offline classification and do not adequately consider training state consistency when combined with off-policy reinforcement learning controllers.
[0004] In the field of robot reinforcement learning, ordinary SACs typically assume that the observations approximately satisfy the Markov property, meaning that the current observations are sufficient to describe the system state. However, in hip exoskeletons, camera blind spots, sensor noise, human motion lag, and terrain prediction can all make the current observations incomplete. If single-frame observations are directly input into the SAC, the controller is prone to outputting unstable actions in gait phase boundaries, terrain transitions, and occlusion scenarios.
[0005] Currently, IMU, joint angles, and plantar pressure are typically input into a finite state machine or classifier to obtain gait states such as standing, swinging, supporting, starting, and stopping; or several consecutive frames of sensor data are stitched together and input into a regular neural network for terrain or intent classification. For schemes that introduce LSTM, the hidden states are usually updated sequentially during online inference, but during offline training or experience playback training, the hidden states stored in historical experience are used directly, or random single-frame samples are treated as independent samples.
[0006] In reinforcement learning training, the experience replay pool stores data collected from past policies. As network parameters are updated, the LSTM hidden states from historical sampling no longer match the current network parameters. Directly reusing historical hidden states introduces staleness bias; setting them to zero completely destroys sequence memory, leading to training instability. These issues include the following: 1. The current frame state is incomplete; a single frame image or a single moment of proprioception cannot reliably describe the gait cycle, terrain trend, and human movement intention, which can easily lead to phase misjudgment.
[0007] 2. Simple sliding window splicing is difficult to form long-term memory; fixed window method is sensitive to window length. If the window is too short, it cannot cover the complete gait cycle, and if the window is too long, it will significantly increase the input dimension and computation.
[0008] 3. There is a problem of outdated hidden states in policy training; the historical hidden states in the experience replay pool are generated by old network parameters, and direct use will cause training target deviation and value estimation bias.
[0009] 4. Lack of variable-length sequence and abnormal frame handling mechanisms; different test segments have inconsistent lengths, and visual frames may be missing or invalid. If zero-padding and masking are not performed, invalid gradients will be introduced in batch training. Summary of the Invention
[0010] To address the shortcomings of existing technologies, this invention provides a gait temporal memory fusion training method and system for hip exoskeletons. The aim is to input the visual spatial features output by a CNN into an LSTM after temporal alignment with proprioceptive data such as IMU, joint angles, joint velocities, and motor currents. Furthermore, it proposes a sequence sampling, zero-padding mask, and burn-in mechanism suitable for off-policy SAC training to avoid the problem of stale hidden states during experience replay. It also outlines how to establish temporal memories of gait cycles, terrain transitions, and short-term sensor gaps within the real-time control cycle of the hip exoskeleton, ensuring that the LSTM hidden states are consistent with the current network parameters during training combined with SAC, avoiding state distortion and machine-assisted jitter caused by random experience replay. This enables the system to maintain stable state estimation during short-term visual gaps, sensor noise, gait phase boundaries, and terrain transitions, and provides the SAC with comprehensive spatiotemporal features containing historical information, confidence levels, and effective masks.
[0011] To achieve the above objectives, the present invention provides the following technical solution: A gait temporal memory fusion training method for hip exoskeletons includes the following steps: S101. Collect CNN visual feature packages of the user's hip exoskeleton during one motion cycle using a smart wearable device, and simultaneously read proprioceptive data; S102. The CNN visual feature package and proprioceptive data are resampled using timestamps and unified to a fixed control frequency to form a fused observation vector; S103. Input the fused observation vector into the LSTM memory coding model, obtain the hidden state and cellular memory at the corresponding time through network update, and extract and output the comprehensive spatiotemporal features that fuse spatial information and temporal change patterns; S104. Estimate gait phase, terrain transition trend and state uncertainty based on comprehensive spatiotemporal features; and input them into the experience replay pool in SAC to build sequences and cache them for experience replay training. S105. Determine whether the continuous gait sequence triggers a state reset. If so, execute a hidden state reset; then return to step S104. S106. If not, input the integrated spatiotemporal features into the SAC, at which point the gait temporal memory fusion ends.
[0012] Preferably, in step S101, the proprioceptive data includes IMU acceleration, IMU angular velocity, hip joint angle and velocity, motor current data, and plantar contact estimation data.
[0013] Preferably, in step S102, the fused observation vector is formed in the following manner: (1) In the formula, To fuse observation vectors; The visual feature package output by the CNN; Visual confidence level; and These are the hip joint angle and velocity, respectively. , and These are IMU data, motor current, and plantar contact estimation data, respectively.
[0014] Preferably, in step S102, after forming the fused observation vector, interpolation or preservation processing is performed on the delay, missing frames, and duplicate frames.
[0015] Preferably, in step S103, the hidden state and cell state within time step t are obtained by network update in the following manner; (2) For current fusion observations; and This refers to the state at the previous moment; For LSTM network parameters; Generate integrated spatiotemporal features in the following manner: (3) In the formula, To integrate spatiotemporal characteristics; and These are the output mapping matrix and the bias, respectively; This represents the current hidden state of the LSTM. As the state input of the SAC continuous controller.
[0016] Preferably, in step S103, a hidden state reset is performed when a risk of starting, stopping, sitting down, falling, or sensor restart is detected.
[0017] Preferably, in step S104, the sequence is trained in the following manner; S1041. Collect continuous gait sequence fragments from the experience replay pool; S1042. Pad the variable-length sequence in a continuous gait sequence segment with zeros and generate an effective mask; S1043. Divide the zero-padding variable-length sequence into a Burn-in segment and a parameter update segment; the Burn-in segment has a Burn-in segment length; the parameter update segment has the magnitude of each parameter update, i.e., the learning rate; S1044. Adaptively adjust the length of the Burn-in segment and restore the current hidden state using the adjusted Burn-in segment length; Calculate the SAC training loss during the parameter update phase; perform backpropagation during the phase based on the effective mask. S1045. Has the training error converged? If not, adjust the sequence length or learning rate and return to step S1044. S1046. If yes, save to the LSTM memory encoding model and interface parameters, and sequence training ends.
[0018] Preferably, in step S1041, the length of the continuous gait sequence segment is marked in the following manner; (4) In the formula, The length of the burn-in preheating section. Update the segment length for the parameters; This represents the total length of the training sequence. As a valid mask, it is used to mark the first... Whether each time step is included in the loss calculation; Preferably, in step S1042, the variable-length sequence in the continuous gait sequence segment is padded with zeros in the following manner: Zero-padding is performed on continuous gait sequence segments that are too short to generate masks indicating valid time steps. During backpropagation, gradients are calculated only for parameter update segments marked as valid by the mask, and truncation backpropagation is performed on the hidden states at segment boundaries to avoid cross-segment error propagation. For visually anomalous frames, anomalous flags and confidence scores are preserved, allowing the network to learn based on proprioception at low confidence levels.
[0019] Preferably, in step S1043, the Burn-in segment is only used to recursively recover the hidden state with the current LSTM parameters and does not participate in the loss calculation; the parameter update segment is used to calculate the SAC actor and commentator network loss, and its length is... Keep it as the default value or the same as Adjustments were made in a coordinated manner.
[0020] Preferably, in step S1044, the length of the adaptively adjusted Burn-in segment sequence is marked in the following manner; (5) In the formula, For adaptive burn-in sequence preheating segment length; This is the preset minimum number of complete gait cycle coverages; For real-time estimation of gait cycle; For LSTM control frequency.
[0021] Preferably, in step S1044, the SAC training loss is calculated in the following manner: First, initialize the hidden state for each sequence with a zero vector. In formula (3), first input the previous sequence. Recovery at each time step and Then with and The SAC training loss is calculated using the initial state of the parameter update segment.
[0022] Preferably, in step S1045, the average single-step reward ≥ 0.75 is used as the convergence criterion; wherein, for each gait trajectory segment collected, the average single-step reward is calculated.
[0023] Preferably, in step S105, the hidden state reset includes two redundant and complementary paths: software judgment reset and hardware trigger reset. The software judgment reset detects gait abnormal events based on comprehensive spatiotemporal characteristics and triggers a soft reset or a hard reset. The hardware trigger reset works independently through a contact switch and acceleration change detection circuit set in the insole or sole. When it is detected that both feet leave the ground simultaneously for more than a preset time threshold or the foot acceleration change exceeds a preset threshold, the hidden state hard reset is directly triggered by a hardware interrupt signal. It does not depend on the software processing cycle and completes the reset operation in milliseconds.
[0024] A gait temporal memory fusion training system for a hip exoskeleton, performed according to the fusion training method described above, includes, The feature access module is used to read CNN visual feature packages and proprioceptive data, including IMU acceleration, IMU angular velocity, hip joint angle, hip joint velocity, motor current, plantar pressure or contact estimation data; The time synchronization and resampling module is used to unify the CNN visual feature packets and proprioceptive data to a fixed control frequency based on the timestamp, and to perform interpolation or preservation processing on delays, missing frames and duplicate frames. The sequence caching module is used to save observations, actions, rewards, next observations, termination flags, valid masks, and visual confidence scores according to gait segments or fixed-length sequences. The LSTM memory encoding module is used to receive the fused observation vector, recursively update the hidden state and cell state, and output the comprehensive spatiotemporal features, gait phase estimation and uncertainty index. The hidden state warm-up module is used to sample continuous sequences in the experience replay pool, recover the hidden state of the current network using the first-stage burn-in data, and then calculate the training loss using the second-stage data. The state output interface is used to pass the integrated spatiotemporal features, phase estimation, confidence level, and effective mask to the SAC actor critic network; The abnormal state management module manages hidden state soft reset, hard reset, and wearer quick initialization based on visual confidence, sensor communication status, foot hardware interruption, waist circumference change, and gait uncertainty.
[0025] Preferably, when the abnormal state management module detects a jump in the waist circumference parameter, it triggers a rapid initialization process for wearer identity perception; it retrieves the wearer whose waist circumference value is closest to the current measurement value from the historical records of the experience replay pool, extracts the statistical mean of the LSTM hidden state in the steady state phase, and uses it as the initial value of the hidden state of the new wearer to replace the zero vector initialization; in order to shorten the convergence time of the hidden state of the LSTM on the new wearer.
[0026] A computing device includes a processor and a memory for storing a processor-executable program, wherein when the processor executes the program stored in the memory, it implements the steps of the method described above.
[0027] A storage medium storing a program / instruction that, when executed by a processor, implements the steps of the method described above.
[0028] A computer program product includes a computer program / instructions that, when executed by a processor, implement the steps of the method described above.
[0029] Compared with the prior art, the beneficial effects of the present invention are: 1. Because the present invention enhances the adaptability to some observable scenes; the LSTM hidden state saves gait history and environmental change trends, so that the system no longer completely depends on the current frame vision or single-moment sensor data.
[0030] 2. Because this invention reduces gait phase jitter; through continuous timing modeling, it can smoothly transition between the support phase and the oscillation phase, reducing abrupt changes in the controller output.
[0031] 3. Because this invention solves the problem of outdated hidden states in offline strategy experience replay; the Burn-in mechanism reconstructs the hidden states using the current network parameters, improving the consistency of SAC training objectives.
[0032] 4. Because the present invention adapts to variable-length sequences and sensor anomalies; the zero-padding and masking mechanisms enable batch training of continuous gait sequence segments of different lengths and can eliminate invalid time step gradients.
[0033] 5. Because the deployment burden is small in this invention; compared with long sequence models such as Transformer or Mamba, LSTM has more controllable inference latency on embedded platforms such as Jetson Nano.
[0034] 6. Because the present invention improves the timeliness and reliability of hidden state reset; the hardware and software combined dual-path redundant reset mechanism enables the system to quickly and reliably complete the hidden state reset in extreme dynamic scenarios such as take-off, emergency stop impact, and sensor anomaly, avoiding the risk of misjudgment by a single software path.
[0035] 7. Because the reset latency is reduced in this invention, the hardware interrupt triggering path is not constrained by the main control software processing cycle, and the reset response time is shortened from tens of milliseconds in the software path to milliseconds.
[0036] 8. Because the present invention improves the adaptability of the Burn-in segment to different paces; the adaptive Burn-in length based on online estimation of gait cycles ensures that the warm-up segment always covers the complete number of gait cycles, avoiding the problems of insufficient warm-up when walking slowly and excessive redundancy when walking fast in the fixed step count scheme, so that the LSTM hidden state recovery quality remains consistent under different wearers and walking speeds.
[0037] 9. Because this invention shortens the warm-up time of the hidden state when multiple wearers take turns using it; and uses waist circumference features to match the hidden state statistics of historical wearers for initialization, the system can quickly enter a stable assist state after detecting a change of wearer, thus improving the practicality and user experience of the exoskeleton in multi-person shared scenarios. Attached Figure Description
[0038] Figure 1 This is a flowchart of the LSTM timing fusion process in this invention; Figure 2 This is a flowchart of the LSTM hidden state burn-in experience replay training process in this invention. Detailed Implementation
[0039] To make the technical means, creative features, objectives and effects of this invention easier to understand, the following embodiments are described in detail with reference to the accompanying drawings. It should be noted that the description of these embodiments is for the purpose of helping to understand this invention, but does not constitute a limitation of this invention.
[0040] Example 1 A gait temporal memory fusion training system for a hip exoskeleton, performed according to the fusion training method described above, includes, The feature access module is used to read CNN visual feature packages and proprioceptive data, including IMU acceleration, IMU angular velocity, hip joint angle, hip joint velocity, motor current, plantar pressure or contact estimation data. The time synchronization and resampling module is used to unify the CNN visual feature packets and proprioceptive data to a fixed control frequency based on the timestamp, and to perform interpolation or preservation processing on delays, missing frames and duplicate frames. The sequence caching module is used to save observations, actions, rewards, next observations, termination flags, valid masks, and visual confidence scores according to gait segments or fixed-length sequences. The LSTM memory encoding module is used to receive the fused observation vector, recursively update the hidden state and cell state, and output the comprehensive spatiotemporal features, gait phase estimation and uncertainty index. The hidden state warm-up module is used to sample continuous sequences in the experience replay pool, recover the hidden state of the current network using the first-stage burn-in data, and then calculate the training loss using the second-stage data. The state output interface is used to pass the integrated spatiotemporal features, phase estimation, confidence level, and effective mask to the SAC actor critic network; The abnormal state management module manages hidden state soft reset, hard reset, and wearer quick initialization based on visual confidence, sensor communication status, foot hardware interruption, waist circumference change, and gait uncertainty.
[0041] A gait temporal memory fusion training method for hip exoskeletons includes the following steps: S101. Collect CNN visual feature packages of the user's hip exoskeleton during one motion cycle through a smart wearable device (mainly a feature access module) and simultaneously read proprioceptive data; wherein, the proprioceptive data includes IMU acceleration, IMU angular velocity, hip joint angle, hip joint velocity, motor current, plantar pressure or contact estimation data; S102. Using a time synchronization and resampling module, the CNN visual feature packets and proprioceptive data are resampled using timestamps and unified to a fixed control frequency to form a fused observation vector; wherein, the fused observation vector is formed in the following manner: (1) In the formula, To fuse observation vectors; The visual feature package output by the CNN; Visual confidence level; and These are the hip joint angle and velocity, respectively. , and The data consists of IMU data, motor current, and plantar contact estimation data. After forming the fused observation vector, interpolation or preservation processing is performed on the delay, missing frames, and duplicate frames. Specifically, the fused observation vector includes a 128-dimensional CNN visual feature package, 5-dimensional terrain probability, 2-dimensional geometric estimation, left and right hip joint angles and velocities, IMU three-axis acceleration and angular velocity, motor current, and plantar contact estimation. S103. The fused observation vector is input into the LSTM, and the LSTM memory encoding module receives the fused observation vector; the hidden state and cell memory at the corresponding time step are obtained through network update, and the comprehensive spatiotemporal features of fused spatial information and temporal change patterns are extracted and output; wherein: the LSTM adopts a single-layer or two-layer structure with a hidden dimension of 128; during online inference, the fused observation is input into the LSTM in each control cycle, and 128-dimensional comprehensive spatiotemporal features are output; the SAC controller outputs the expected torque or impedance adjustment gain of the left and right hip joints according to the comprehensive spatiotemporal features; in addition, the hidden state and cell state at time step t are obtained by network update in the following manner; (2) For current fusion observations; and This refers to the state at the previous moment; For LSTM network parameters; Generate integrated spatiotemporal features in the following manner: (3) In the formula, To integrate spatiotemporal characteristics; and These are the output mapping matrix and the bias, respectively; This represents the current hidden state of the LSTM. As a status input to the SAC continuous controller; when a risk of starting, stopping, sitting down, falling, or sensor restart is detected, a hidden state reset is performed; S104. Estimate gait phase, terrain transition trend, and state uncertainty based on comprehensive spatiotemporal features; and input them into the experience replay pool in SAC to build a sequence and cache it using the sequence caching module for experience replay training; specifically, train the sequence in the following manner; S1041. Collect continuous gait sequence segments from the experience replay pool using the hidden state warm-up module; specifically: mark the length of the continuous gait sequence segments in the following manner; (4) In the formula, The length of the burn-in preheating section. Update the segment length for the parameters; This represents the total length of the training sequence. As a valid mask, it is used to mark the first... Whether each time step is included in the loss calculation; S1042. Pad the variable-length sequences in continuous gait sequence segments with zeros and generate valid masks; specifically, pad the variable-length sequences in continuous gait sequence segments with zeros in the following manner: pad the continuous gait sequence segments with insufficient length with zeros to generate masks indicating valid time steps; during backpropagation, only calculate the gradient for the parameter update time steps marked as valid by the mask, and perform truncated backpropagation on the hidden state at the segment boundaries to avoid cross-segment error propagation; for visually abnormal frames, retain the abnormality flag and confidence level, so that the network learns by relying on proprioception at low confidence levels; S1043. Divide the zero-padding variable-length sequence into a Burn-in segment and a parameter update segment; the Burn-in segment has a Burn-in segment length; the parameter update segment has the magnitude of each parameter update, i.e., the learning rate; the Burn-in segment is only used to recursively recover the hidden state with the current LSTM parameters and does not participate in the loss calculation; the parameter update segment is used to calculate the SAC actor and commentator network loss, and its length is... Keep it as the default value or the same as Coordinated adjustments; S1044. Adaptively adjust the length of the Burn-in segment and restore the current hidden state using the adjusted Burn-in segment length; Calculate the SAC training loss in the parameter update segment; perform backpropagation in the phase according to the effective mask; wherein: the length of the adaptively adjusted Burn-in segment sequence is marked in the following manner; (5) In the formula, For adaptive burn-in sequence preheating segment length; This is the preset minimum number of complete gait cycle coverages; For real-time estimation of gait cycle; Control frequency for LSTM; Calculate the SAC training loss as follows: First, initialize the hidden state for each sequence with a zero vector. In formula (3), first input the previous sequence. Recovery at each time step and Then with and The SAC training loss is calculated using the initial state of the parameter update segment. S1045. Has the training error converged? If not, adjust the sequence length or learning rate and return to step S1044. Wherein: the average single-step reward ≥ 0.75 is used as the convergence criterion. Wherein, the average single-step reward is calculated for each gait trajectory segment collected. S1046. If yes, save the data to the LSTM memory encoding model and interface parameters, and the sequence training ends; S105. Determine whether the continuous gait sequence triggers a state reset. If so, perform a hidden state reset; then return to step S104. The hidden state reset includes two redundant and complementary paths: software-based reset and hardware-based reset. The software-based reset detects gait abnormalities based on comprehensive spatiotemporal characteristics and triggers a soft or hard reset. The hardware-based reset works independently through a contact switch and acceleration change detection circuit installed on the insole or sole. When both feet leave the ground simultaneously for more than a preset time threshold or the foot acceleration change exceeds a preset threshold, a hardware interrupt signal directly triggers a hidden state hard reset, which does not depend on the software processing cycle and completes the reset operation within milliseconds. S106. If not, use the state output interface to input the integrated spatiotemporal features into the SAC. At this point, the gait temporal memory fusion ends.
[0042] In addition, an abnormal state management module is used to manage the soft reset, hard reset, and rapid initialization of the hidden state based on visual confidence, sensor communication status, foot hardware interruption, waist circumference jump, and gait uncertainty. Specifically, when the abnormal state management module detects a jump in waist circumference parameters, it triggers a rapid initialization process for wearer identity perception. The system retrieves the wearer whose waist circumference value is closest to the current measurement from the historical records in the experience replay pool, extracts the statistical mean of their LSTM hidden state in the steady-state phase, and uses it as the initial value of the new wearer's hidden state instead of the zero vector initialization. This shortens the convergence time of the LSTM hidden state on new wearers. For example, if the system detects that the wearer has stopped for more than 2 seconds, it decays the hidden state by a coefficient of 0.2. If it detects a sensor restart or a risk of falling, it sets the hidden state to zero. Furthermore, the system integrates a contact switch and an acceleration change detection circuit in the insole. The contact switch generates a hardware interrupt signal when both feet are simultaneously off the ground for more than 0.20 seconds, and the acceleration change detection is triggered when the synthetic acceleration change rate exceeds 60. A hardware interrupt signal is generated when m / s². Both signals can directly trigger a hard reset of the hidden state, and the interrupt response delay does not exceed 2 ms.
[0043] The hardware reset path and the software gait judgment path work in parallel and are redundant with each other, effectively avoiding misjudgment or omission by a single software judgment under boundary conditions; the system also monitors waist circumference parameters in real time through an infrared ranging sensor.
[0044] When the waist circumference measurement changes by more than 3 cm within three consecutive control cycles, a wearer replacement event is determined. The system automatically retrieves the average waist circumference value of all previously recorded wearers from the historical records of the experience playback pool, and selects the hidden state steady-state statistical mean corresponding to the wearer with the closest Euclidean distance (the length of the Burn-in segment sequence with adaptive adjustment length marked by the gait stability segment in the wearer's historical data). and The time average (the average value of the vector) is used as the initial value for the new wearer's LSTM. Compared with zero vector initialization, this scheme can significantly shorten the convergence time of the new wearer's LSTM; Furthermore, 15 healthy adult subjects (age 22-35 years, Mean±SD: 26.4±3.8 years; height 160-185cm, Mean±SD: 173.2±7.1cm; weight 50-85kg, Mean±SD: 68.5±9.8kg; waist circumference 720-980mm) were selected, all with no history of lower limb musculoskeletal diseases, and all signed informed consent forms. Each subject wore a hip exoskeleton and completed 5 minutes of walking data collection under the following 6 terrain conditions: (1) Indoor flat floor: tile floor, illuminance 300-500 lux (fluorescent lamp lighting), walking path is a 20m straight road round trip; (2) Outdoor flat ground: asphalt road surface, illuminance 5000-80000 lux (natural light + sunshine), walking path is a 50m straight road round trip; (3) Going up the stairs: concrete steps, single step height 170mm, tread depth 280mm, a total of 20 steps, total height 3.4m, the walking path is up and down; (4) Going down the stairs: Same step parameters as going up the stairs, but in the opposite direction of walking; (5) Going up the ramp: Concrete ramp, slope 8° (approximately 14% slope ratio), length 30m, height difference approximately 4.2m; Hardware platform independence and portability: The LSTM model only relies on standard matrix multiplication and addition and sigmoid / tanh activation functions (no custom operators), and can be ported from Jetson Nano to: Jetson Xavier NX (P50 inference latency approximately 0.3ms), STM32H743 (requires CMSIS-NN library INT8 quantization + hidden dimension compression to 64, latency approximately 2.2ms), and Raspberry Pi 4B (with Intel Neural Compute Stick 2 accelerator, latency approximately 1.5ms). The model has only 140K parameters and requires less than 2MB of RAM at runtime, making it suitable for long-term stable operation in various battery-powered wearable embedded platforms.
[0045] The burn-in mechanism and adaptive matching of different gait speeds: The fixed B=16 frame scheme has covered most walking speeds (0.6-1.6 m / s). For extremely slow speeds (<0.4 m / s, such as patients in the early stages of rehabilitation), B can be adaptively extended to cover at least 0.5 gait cycles using formula (5). Experimental data show that under extremely slow conditions of 0.3 m / s, the adaptive B=28 frame scheme has an average reward improvement of about 8% after convergence compared to the fixed B=16 frame scheme.
[0046] (6) Downhill: Same parameters as uphill, but in the opposite direction.
[0047] Three walking speeds were covered for each terrain condition: slow (0.6-0.8 m / s), medium (1.0-1.2 m / s), and fast (1.4-1.6 m / s). A metronome audio track guided the walking frequency via a mobile app (running on an Android tablet). Simultaneously, during the walking process, a 2-5 second time interval was randomly selected every 30 seconds, and the experimenter wirelessly triggered a black shield (433MHz RF) to block the IMX219 camera (simulating arm occlusion) to generate visual failure data. All sensor data was aligned to the same microsecond-level timestamp via an NTP-like clock synchronization protocol (accuracy ±50μs, based on Jetson Nano's PTP hardware clock), recorded in real-time in ROS bag format (.bag), and stored on the exoskeleton's onboard 128GB SATA SSD (Samsung 860 EVO). After the experiment, the data was transferred offline to the training server via Gigabit Ethernet.
[0048] Total data collected: 15 subjects × 6 terrain types × 5 minutes × 60 seconds / minute × 50Hz (IMU / prototype sensor frequency) = approximately 13.5 million frames of prototype sensor data + 15 × 6 × 5 × 60 × 30 FPS ≈ 810,000 frames of visual data. The data was randomly split into training / validation / test sets in an 8:1:1 ratio (stratified sampling based on subjects to ensure that data from the same subject does not appear in different sets).
[0049] The quantitative experimental results are as follows: (a) Gait phase 5-class classification accuracy (test set, average of 15 subjects): Full configuration (visual + prophetic fusion) 92.3 ± 2.1%, Pure prophetic configuration (σ vis (≡0 Simulated visual failure) 88.1±3.4%, compared to 78.5±5.2% for the baseline scheme based on threshold FSM. The LSTM scheme improves upon the FSM baseline by 13.8 percentage points under full configuration and still outperforms the FSM baseline by 9.6 percentage points under pure ontology, verifying the effectiveness of LSTM temporal memory; (b) Visual occlusion robustness (occlusion duration 200ms): The LSTM solution's assisted torque RMSE = 1.3 ± 0.2 Nm (normal unoccluded condition RMSE = 1.1 ± 0.15 Nm, a degradation of about 18%); the MLP policy network solution without LSTM under the same occlusion conditions had a torque RMSE of 4.5 ± 1.1 Nm (a degradation of 309%), and 3 safety constraint trigger events occurred due to torque estimation errors (torque was truncated to the ± 30 Nm safety limit). (c) Burn-in vs. Zero-initialization training comparison: Under the same reward threshold (average single-step reward ≥ 0.75), the Burn-in scheme requires approximately 35000±3200 training steps to converge, while the zero-initialization scheme requires approximately 54000±4800 steps, reducing the number of convergence steps by approximately 35%. The average single-step reward of the final convergence strategy on the test set: Burn-in scheme 0.82±0.04 vs. zero-initialization scheme 0.69±0.06 (p<0.01, paired t-test), representing a reward improvement of approximately 18.8%. (d) Variable-length sequence batch training throughput: Compared with the fixed-length 48-frame truncation scheme (long episodes are truncated and discarded, and short episodes are padded), the padding + mask scheme (allowing 20-200 frames of episodes to coexist in the same batch) increases the training throughput from approximately 120 samples / s to approximately 168 samples / s (batch_size=64, RTX 3060), an improvement of approximately 40%; (e) LSTM inference latency margin analysis: The typical latency of INT8 inference on Jetson Nano is 0.6ms (3% of the 20ms control cycle). Adding the CNN latency of approximately 10ms and the SAC latency of approximately 5ms, the total control loop latency is approximately 15.6ms, which is less than the 20ms upper limit. Even in the extreme case of P99 long-tail latency (approximately 15ms) in CNN inference, the total latency is approximately 20.6ms, which only exceeds the upper limit by 0.6ms (3%), and the system can still compensate for it in the next cycle.
[0050] The above embodiments are preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Various modifications or variations that can be made by those skilled in the art without creative effort within the scope of the appended claims are still within the scope of protection of this patent.
Claims
1. A gait temporal memory fusion training method for hip exoskeletons, characterized in that: Includes the following steps: S101. Collect CNN visual feature packages of the user's hip exoskeleton during one motion cycle using a smart wearable device, and simultaneously read proprioceptive data; S102. The CNN visual feature package and proprioceptive data are resampled using timestamps and unified to a fixed control frequency to form a fused observation vector; S103. Input the fused observation vector into the LSTM, obtain the hidden state and cellular memory at the corresponding time through network update, and extract and output the comprehensive spatiotemporal features of fused spatial information and temporal change patterns; S104. Estimate gait phase, terrain transition trend and state uncertainty based on comprehensive spatiotemporal features; and input them into the experience replay pool in SAC to build sequences and cache them for experience replay training. S105. Determine whether the continuous gait sequence triggers a state reset. If so, execute a hidden state reset; then return to step S104. S106. If not, input the integrated spatiotemporal features into the SAC, at which point the gait temporal memory fusion ends.
2. The gait temporal memory fusion training method for a hip exoskeleton according to claim 1, characterized in that: In step S101, the proprioceptive data includes IMU acceleration, IMU angular velocity, hip joint angle and velocity, motor current data, and plantar contact estimation data.
3. The gait temporal memory fusion training method for a hip exoskeleton according to claim 2, characterized in that: In step S102, the fused observation vector is formed in the following manner: (1) In the formula, To fuse observation vectors; The visual feature package output by the CNN; Visual confidence level; and These are the hip joint angle and velocity, respectively. , and These are IMU data, motor current, and plantar contact estimation data, respectively.
4. The gait temporal memory fusion training method for a hip exoskeleton according to claim 1, characterized in that: In step S103, the hidden state and cell state within time step t are obtained by network update in the following manner; (2) In the formula, The hidden state within time step t. The cell state within time step t; For current fusion observations; and This refers to the state at the previous moment; For LSTM network parameters; Generate integrated spatiotemporal features in the following manner: (3) In the formula, To integrate spatiotemporal characteristics; and These are the output mapping matrix and the bias, respectively; This represents the current hidden state of the LSTM. As the state input of the SAC continuous controller.
5. The gait temporal memory fusion training method for a hip exoskeleton according to claim 1, characterized in that: In step S104, the sequence is trained in the following manner; S1041. Collect continuous gait sequence fragments from the experience replay pool; S1042. Pad the variable-length sequence in a continuous gait sequence segment with zeros and generate an effective mask; S1043. Divide the zero-padding variable-length sequence into a Burn-in segment and a parameter update segment; the Burn-in segment has a Burn-in segment length; the parameter update segment has the magnitude of each parameter update, i.e., the learning rate; S1044. Adaptively adjust the Burn-in segment length and restore the current hidden state using the adjusted Burn-in segment length; calculate the SAC training loss in the parameter update segment; perform backpropagation in the phase according to the effective mask; S1045. Has the training error converged? If not, adjust the sequence length or learning rate and return to step S1044. S1046. If yes, save to the LSTM memory encoding model and interface parameters, and sequence training ends.
6. The gait temporal memory fusion training method for a hip exoskeleton according to claim 1, characterized in that: In step S105, the hidden state reset includes two redundant and complementary paths: software judgment reset and hardware trigger reset. The software judgment reset detects gait abnormal events based on comprehensive spatiotemporal characteristics and triggers a soft reset or a hard reset. The hardware trigger reset works independently through a contact switch and acceleration change detection circuit set in the insole or sole. When it is detected that both feet leave the ground simultaneously for more than a preset time threshold or the foot acceleration change exceeds a preset threshold, the hidden state hard reset is directly triggered by a hardware interrupt signal, without relying on the software processing cycle, and the reset operation is completed in milliseconds.
7. A gait temporal memory fusion training system for a hip exoskeleton, performed according to the fusion training method described in any one of claims 1-6, characterized in that: include, The feature access module is used to read CNN visual feature packages and proprioceptive data, including IMU acceleration, IMU angular velocity, hip joint angle, hip joint velocity, motor current, plantar pressure or contact estimation data. The time synchronization and resampling module is used to unify the CNN visual feature packets and proprioceptive data to a fixed control frequency based on the timestamp, and to perform interpolation or preservation processing on delays, missing frames and duplicate frames. The sequence caching module is used to save observations, actions, rewards, next observations, termination flags, valid masks, and visual confidence scores according to gait segments or fixed-length sequences. The LSTM memory encoding module is used to receive the fused observation vector, recursively update the hidden state and cell state, and output the comprehensive spatiotemporal features, gait phase estimation and uncertainty index. The hidden state warm-up module is used to sample continuous sequences in the experience replay pool, recover the hidden state of the current network using the first-stage burn-in data, and then calculate the training loss using the second-stage data. The state output interface is used to pass the integrated spatiotemporal features, phase estimation, confidence level, and effective mask to the SAC actor critic network; The abnormal state management module manages hidden state soft reset, hard reset, and wearer quick initialization based on visual confidence, sensor communication status, foot hardware interruption, waist circumference change, and gait uncertainty.
8. A gait temporal memory fusion training system for a hip exoskeleton according to claim 7, characterized in that: When an abnormal state management module detects a jump in waist circumference parameters, it triggers a rapid initialization process for wearer identity perception. The wearer whose waist circumference value is closest to the current measurement value is retrieved from the historical records of the experience replay pool, and the statistical mean of the LSTM hidden state in the steady state phase is extracted and used as the initial value of the hidden state of the new wearer to replace the zero vector initialization. This shortens the convergence time of the hidden state of the LSTM on the new wearer.
9. A computing device comprising a processor and a memory for storing a processor-executable program, wherein when the processor executes the program stored in the memory, it implements the steps of the method as claimed in any one of claims 1-6.
10. A storage medium storing a program / instructions that, when executed by a processor, implement the steps of the method as claimed in any one of claims 1-6.