Foot drop assisting method based on flexible ankle joint exoskeleton
Through the combination of adaptive oscillator and CNP model, a personalized expected angle of the affected ankle joint is generated, which solves the problem of the inability to effectively inhibit abnormal movement patterns in patients with foot sagging in the prior art, and achieves high-precision gait assistance.
Patent Information
- Application Number
- CN202411664448.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-11-20
AI Technical Summary
The existing flexible ankle exoskeleton assisting methods cannot effectively inhibit the abnormal movement mode of patients with foot sagging, and cannot provide personalized assistance to different patients, resulting in poor assisting effects.
By inputting the ankle angle of the healthy calf into the adaptive oscillator, learning relevant parameters and predicting the affected ankle angle, combining with the CNP model for weighted fusion, generating the expected angle of the affected ankle joint, dynamically adjusting to adapt to the patient's personalized steps state.
Real-time dynamic personalized assistance is realized, abnormal motor mode is suppressed, and patients are guided to restore normal gait, improving the accuracy and reliability of assistance.
Smart Images

Figure CN119424158A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of rehabilitation medical assistance, and more specifically, relates to a foot drop assistance method based on a flexible ankle joint exoskeleton. Background Art
[0002] The manifestation of foot drop is the inability to dorsiflex the foot. When walking or lifting the leg, the toes always touch the ground first when landing. Therefore, in the swing phase of the walking cycle, the patient cannot complete the dorsiflexion of the foot, and a foot drop gait is formed. Currently, the use of flexible ankle exoskeletons to assist patients with foot drop is mainly achieved by generating a reference trajectory and pulling the instep of the foot with a wire rope to guide the patient's ankle joint to track the reference trajectory. There are two main methods for generating such trajectories. The first is to use a trapezoidal trajectory with adjustable amplitude and rising and falling moments. In a gait cycle, a fixed gait cycle percentage moment is set as the moment of the trapezoidal trajectory rising and falling. The trapezoidal amplitude is the rope position that makes the patient's foot reach the ankle angle when standing. Although this method can increase the patient's maximum dorsiflexion angle and lift the patient's instep, it does not take into account the patient's dynamic and subtle angle changes at every moment. It can only keep the patient relaxed when the patient does not need to lift his foot, and directly pull the patient's foot to the highest when the patient needs to lift his foot, and cannot guide the patient to reach a normal gait. The second method is to use the average ankle angle of healthy people walking as the reference trajectory during dorsiflexion. However, there are differences in ankle angles when different people walk. This method does not take into account the differences between different people, cannot achieve personalized assistance, and cannot achieve the best assistance effect for different patients. Summary of the invention
[0003] In response to the above defects or improvement needs of the prior art, the present invention provides a foot drop assistance method based on a flexible ankle exoskeleton, which can suppress the patient's abnormal movement pattern and guide the patient to achieve a normal gait during rehabilitation training.
[0004] To achieve the above object, according to a first aspect of the present invention, a foot drop assisting method based on a flexible ankle joint exoskeleton is provided, comprising:
[0005] S1, the ankle joint angle θ of the healthy leg at time t ankle (t) is input to the adaptive oscillator to obtain the estimated values of the gait phase at time t φ1(t) and α i (t); wherein, when the heel of the healthy calf is detected to touch the ground, ω(t) and φ1(t) in the adaptive oscillator are reset to ω measured and
[0006] The adaptive oscillator is The update law is i∈[0,N],N>1,φ i (t) is the phase of the i-th oscillator at time t, α i (t) is the amplitude of the i-th sinusoidal component of the adaptive oscillator, ν and η are both learning parameters, ω(t) is the fundamental frequency of the gait trajectory; ω measured is the actual walking frequency, δ is the Dirichlet function, t heelstrike For the moment when the heel touches the ground, is the gait phase corresponding to the heel landing;
[0007] S2, input the gait phase φ1(t)+π after half a gait cycle into the adaptive oscillator and the ankle joint angle prediction model respectively, and obtain the first estimated value of the ankle joint angle after half a gait cycle and the second estimate
[0008] S3, yes and Weighted calculation And smooth it to get the expected angle of the ankle joint on the affected side at time t
[0009] According to a second aspect of the present invention, there is provided an electronic device, comprising: a computer-readable storage medium and a processor;
[0010] The computer-readable storage medium is used to store executable instructions;
[0011] The processor is used to read the executable instructions stored in the computer-readable storage medium and execute the method as described in the first aspect.
[0012] According to a third aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to cause a processor to execute the method as described in the first aspect.
[0013] According to a fourth aspect of the present invention, there is provided a computer program product, comprising a computer program or instructions, wherein when the computer program or instructions are executed by a processor, the method according to the first aspect is implemented.
[0014] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:
[0015] 1. The method provided by the present invention, the healthy side ankle angle is input to the adaptive oscillator to learn the relevant parameters in the adaptive oscillator and predict the affected side ankle angle, and the CNP model is used to predict the ankle angle of the affected side calf according to the gait phase estimated by the adaptive oscillator, and the two prediction results of the ankle angle of the affected side calf are weighted fused to finally obtain the affected side ankle angle, and in order to reduce the random fluctuations and noise in the prediction, the ankle angle prediction output after fusion is made more stable and continuous, so as to be more in line with the actual gait motion pattern, and to avoid discomfort during rehabilitation, the result of weighted fusion is smoothed. The method can learn the normal walking mode based on the healthy side ankle angle of the patient in real time and dynamically online, and generate the personalized affected side ankle angle reference trajectory at each moment for different patients, which is the trajectory that the patient should reach when walking normally, so the abnormal motion pattern of the patient can be suppressed, and the patient is guided to reach a normal gait during rehabilitation training.
[0016] 2. Furthermore, the method provided by the present invention takes into account that when the gait changes or there is external interference, the original oscillator model may lose synchronization, resulting in estimation errors, and adopts a phase reset mechanism based on gait time correction to correct and adjust the phase of the oscillator, thereby improving the calculation accuracy of the adaptive oscillator.
[0017] 3. Furthermore, the method provided by the present invention, when performing weighted fusion calculation on the ankle joint angle prediction results of the affected calf predicted by the adaptive oscillator and the CNP model, calculates respective weighting coefficients according to the prediction uncertainty of the CNP and the stability of the adaptive oscillator, and can dynamically balance the influence of the adaptive oscillator and the CNP model, and rely more on the other model when one method is inaccurate or even fails, thereby improving the system's fault tolerance, reliability and prediction accuracy in complex walking states. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic flow chart of a foot drop assisting method based on a flexible ankle exoskeleton provided in an embodiment of the present invention;
[0019] Figure 2 A schematic diagram of the IMU placement position and coordinate system position when measuring joint angles provided in an embodiment of the present invention;
[0020] Figure 3 A schematic diagram of gait phase and joint angle estimation based on an adaptive oscillator provided in an embodiment of the present invention;
[0021] Figure 4 A schematic diagram of gait event detection based on a state machine provided in an embodiment of the present invention;
[0022] Figure 5A schematic diagram of the conditional neural process online learning of joint angles and uncertainty estimation provided by an embodiment of the present invention;
[0023] Figure 6 A schematic diagram of the gait detection effect provided by an embodiment of the present invention;
[0024] Figure 7 A schematic diagram of the effect of generating the affected-side trajectory provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0026] In the existing flexible ankle exoskeleton assistive trajectory generation method for foot drop patients, the use of a fixed reference trajectory does not take into account the differences between different people and cannot achieve the best assistive effect for different patients. The use of an adjustable reference trajectory only adjusts a few parameters. For example, if a trapezoidal trajectory is used, only the trapezoidal amplitude, rising time and falling time are adjusted, which is far from the actual normal ankle trajectory. The current foot drop exoskeleton assistive method has no way to provide patients with accurate and personalized assistance.
[0027] The ultimate goal of assisting patients with foot drop should be to enable them to walk like healthy people. Normal movement patterns cannot be established on the basis of abnormal movement patterns. Only by suppressing abnormal movement patterns can normal movement patterns be induced. Therefore, the focus of treatment is to change the abnormal posture and abnormal movement patterns of patients. Based on this, an embodiment of the present invention provides a foot drop assistance method based on a flexible ankle joint exoskeleton, such as Figure 1 As shown, including:
[0028] S1, the ankle joint angle θ of the healthy leg at time t ankle (t) is input to the adaptive oscillator to obtain the estimated values of the gait phase at time t φ1(t) and α i (t); wherein, when the heel of the healthy calf is detected to touch the ground, ω(t) and φ1(t) in the adaptive oscillator are reset to ω measured and
[0029] The adaptive oscillator is The update law is i∈[0,N],N>1,φ i (t) is the phase of the i-th oscillator at time t, αi (t) is φ i The amplitude of (t), ν and η are both learning parameters, ω(t) is the fundamental frequency of the gait trajectory; ω measured is the actual walking frequency, δ is the Dirichlet function, t heelstrike For the moment when the heel touches the ground, It is the gait phase corresponding to the heel strike.
[0030] It can be understood that the ankle joint angle θ of the healthy leg ankle It is the angle between the instep and calf of the healthy calf, θ ankle It can be obtained by using any existing calculation method, and the embodiment of the present invention does not impose any unique limitation on this.
[0031] For example, considering that although the flexible exoskeleton does not constrain the human joint freedom like the rigid exoskeleton, it cannot use the rotary encoder to accurately and conveniently measure the joint angle like the rigid exoskeleton, it can be combined with the IMU (Inertial Measurement Unit) for measurement and calculation, and two IMUs are used to achieve ankle joint angle measurement. The IMU is fixed to the healthy calf and instep respectively through elastic straps, and wirelessly communicates with the computer through Bluetooth at a frequency of 50Hz. The local coordinate system of the calf and instep IMU is obtained by fusing the acceleration and gyroscope data in the IMU through the extended Kalman filter algorithm. s} and {S a}The rotation matrix of the global coordinate system {G} and
[0032] Considering that it is impossible to accurately ensure that the IMU is fixed in the same position each time it is worn, and it is also impossible to accurately ensure that the IMU coordinate axis is aligned with the joint axis, if no calibration is performed, the measured joint angle will be inaccurate due to the above problems. Preferably, in order to ensure that the global coordinate systems of the two IMUs are consistent so as to facilitate the calculation of joint angles, the coordinate systems are reset after the two IMUs are placed in the same position before use. Since it is impossible to ensure that the IMU is fixed in the same position on the human body each time, in order to obtain the accurate ankle joint angle θ ankle Before using IMU to measure joint angles, calibration is required to convert {S s} and {S a} to {B s} and {B a The specific calibration method adopts the existing technology and will not be described in detail in the embodiment of the present invention.
[0033] For the convenience of expression, when there is no need to clearly distinguish the two IMU local coordinate systems in the future, the coordinate system is written as {S}. The direction of the IMU local coordinate system is as follows Figure 2 shown.
[0034] First, construct a local coordinate system {B s} and {B a}, these two coordinate systems move with the movement of the calf and the instep. Define when a person is standing {B s} and {B a} coordinate systems coincide, and the z-axis of these two coordinate systems always coincides with the ankle joint axis (e.g. Figure 2 The y-axis of the two coordinate systems is parallel to the direction of gravity when standing. Therefore, when the ankle joint moves in the sagittal plane, the ankle joint angle is the angle of rotation of the two coordinate systems around the z-axis. When standing, the ankle joint angle is 0° because the two local coordinate systems coincide. The rotation matrix of {S} relative to {B} can be expressed as:
[0035]
[0036] in, and They respectively represent the unit x-axis, y-axis, and z-axis vectors of the ankle joint coordinate system in the IMU coordinate system.
[0037] These coordinate axes are determined by the following steps. First, the wearer is required to stand upright, and the direction opposite to the gravity measured by the IMU is - G g stand The y-axis direction is consistent with the ankle joint coordinate system. Therefore, the y-axis vector of the ankle joint coordinate system measured by the IMU is It can be calculated by the following formula
[0038]
[0039] In the formula, - S g stand is the direction vector of the opposite direction of gravity in the IMU local coordinate system, is the rotation matrix from G to S
[0040] Afterwards, the wearer's foot is required to perform plantar flexion and dorsiflexion reciprocating motion in the sagittal plane. The z-axis of the ankle joint coordinate system is the ankle joint rotation axis measured by the IMU. s}、{S a The joint axes (i.e. the ankle joint rotation axes) in} are j s 、j a The data collected by the gyroscope are g s (t), g a (t). At any time, the following relationship is satisfied:
[0041] ||g a (t)×j a ||=||g s (t)×j s ||
[0042] Using this property, the Gauss-Newton method is used to solve the joint axis vector. The following optimization objective function is used
[0043]
[0044] The residual r t (x)=||g a (t)×j a ||-||g s (t)×j s ||, let j s =[cos(φ s )cos(θ s ),cos(φ s )sin(θ s ),sin(φ s )] T , j a =[cos(φ a )cos(θ a ),cos(φ a )sin(θ a ),sin(φ a )] T , x=[φ s ,θ s ,φ a ,θ a ] T is the four-dimensional variable to be optimized, where φ s ,θ s ,φ a ,θ a j s The polar angle and azimuth angle in the spherical coordinate system are also a Polar angle and azimuth in spherical coordinate system. Since the x-axis of the {S} coordinate system is nearly parallel to the ankle joint rotation axis when the IMU is fixed, the initial parameter x0 = [0,0,0,0] is selected. T To speed up the convergence. The update formula is as follows:
[0045] x k+1 =x k -(J T J) -1 J T r(x k )
[0046] Where J is the Jacobian matrix of the residual r(x) to the parameter x. The rotation axis j (here j s 、j a After being uniformly expressed as j),
[0047] Finally, the direction of the x-axis of the ankle joint coordinate system in the sensor coordinate system can be expressed as follows:
[0048]
[0049] Finding the rotation matrix and After that, we can calculate Convert the rotation matrix to XYZ Euler angle to obtain the ankle joint angle where r i`j` is the rotation matrix The element in the i'th row and j'th column. It can be understood that and Acquired in real time by IMU, changing over time, and is a constant obtained for the calibration step and does not change with time, so, r ij (t) is {B a}Relative to {B s The rotation matrix of The element in row i and column j in
[0050] The continuous gait phase information is estimated based on N+1 oscillators in parallel, such as Figure 3 As shown in Figure 2. The ankle joint angle is periodic during stable walking. This periodic signal can be decomposed into the superposition of the fundamental frequency (corresponding to the gait period) and its multiples using Fourier analysis. Therefore, only the fundamental frequency ω(t) of the gait trajectory needs to be learned, and the other frequencies are multiples of the fundamental frequency. Specifically,
[0051]
[0052] in is the actual ankle joint trajectory θ ankle (t) and the trajectory estimated by the oscillator The deviation Taking N = 5 as an example, i∈[0,5] is 6 parallel oscillators. The 0th oscillator is a simple integrator used to learn the input offset, where φ0(t) = φ0(0) = π / 2. ν and η are learning parameters that determine the synchronization speed of phase and amplitude. The minimum non-zero frequency learned by the adaptive oscillator is the frequency corresponding to the gait period.
[0053] Since the initial conditions of the adaptive oscillator are different each time it learns, the phase estimated by the adaptive oscillator has no actual physical meaning. When the gait changes or there is external interference, the original oscillator model may lose synchronization, resulting in estimation errors. The phase reset mechanism can quickly adjust the phase of the adaptive oscillator in these cases to resynchronize with the actual gait. Therefore, the phase reset mechanism is used to avoid estimation errors.
[0054]
[0055] Where δ is the Dirichlet function, is the actual gait phase of the person’s heel landing, t heelstrike is the moment when the heel touches the ground. For the convenience of calculation, in the embodiment of the present invention, That is, the gait phase starts from the heel strike, and can also be defined as other moments; ω measured =2π / T measured is the walking frequency actually measured when a person is exercising, T measured is the time interval between two heel strikes. is the gait phase corresponding to the heel landing (0 to 100%), which can actually be any percentage between 0 and 100%. For the convenience of calculation, it is defined as 0 in the embodiment of the present invention. is an additional phase reset reference phase. When the heel touches the ground, the fundamental frequency ω(t) and the phase φ1(t) corresponding to the fundamental frequency in the adaptive oscillator are reset to ω measured and In order to obtain a continuous gait phase that conforms to the actual physical meaning. After the phase is reset, the minimum non-zero frequency learned by the adaptive oscillator is the frequency corresponding to the gait cycle, and the corresponding phase is the gait phase. That is, the continuous gait phase output by the adaptive oscillator is φ1(t).
[0056] In order to confirm the moment when the heel touches the ground during the phase reset, that is, to determine the moment when the heel touches the ground, while not introducing additional sensors to increase the complexity of the system, as a further preferred embodiment of the present invention, an IMU at the instep is used to detect the heel-touching gait event (HS) while measuring the ankle joint angle. The detection of the gait event is achieved through a finite state machine, that is, by defining a finite number of states of the foot and the switching conditions of each state, the state of the foot is determined according to the measurement information of the IMU at the instep, thereby realizing the detection of the heel-touching event, such as Figure 4 That is, preferably, a finite state machine is used to detect the heel-touching event of the healthy calf, and the states in the finite state machine include heel-touching, stance phase, toe-touching and swing phase;
[0057] First, obtain the local coordinate system {S a}The original acceleration data under With from {S a} to the global coordinate system {G} Acceleration at {G} Net acceleration a = a g -g, where g is the gravitational acceleration vector in the global coordinate system.
[0058] Define a factor D that represents the foot state at time t t :
[0059]
[0060] where a k It represents the net acceleration of the instep at time k in the time window from time tn to time t-1. The length of the time window in the algorithm is n=5. is the diagonal standard deviation matrix of acceleration, where σ x , σ y and σ z They are the standard deviations of the net acceleration of the instep in the x, y, and z axis directions from time t-n+1 to time t.
[0061] In the support phase before the toes leave the ground, the sole of the foot is completely in contact with the ground and there is no movement. t Approaches 0, and when the toes leave the ground, the sole of the foot changes from static to dynamic, D t According to this characteristic, when D t >D h When the heel strike event (TO) occurs, D h The threshold constant for TO event detection.
[0062] After the TO event is detected, the foot enters the swing phase. During this phase, the foot swings in the air, and the swing pattern can vary significantly depending on individual walking habits. This variability may affect the detection of the heel strike (HS) event. Therefore, a fixed delay time T is introduced. swing , in order to account for these differences before detecting the HS event. This delay time is determined experimentally and is shorter than the duration of the swing phase. After the delay, the finite state machine will transition from the TO state to the S2 state.
[0063] Since the foot gait pattern during the swing phase varies, D t It is challenging to perform feature extraction to accurately detect HS events. When a heel contact (HS) event occurs, the foot velocity suddenly increases and reaches a negative peak. In this paper, HS events are determined by detecting the negative peak of the foot velocity within each gait cycle.
[0064] In the S2 state, when the algorithm detects the angular velocity v of the foot in the sagittal plane foot Cross the HS detection threshold thres twice, first from top to bottom, then from bottom to top heelstrike When , it is considered that the HS negative peak is detected. foot It is expressed by the x-axis angular velocity of the foot IMU. heelstrike It is adaptive and the calculation formula is as follows:
[0065]
[0066] Among them, v heelstrike (i) represents the magnitude of the negative peak velocity when the HS event occurs, so that the corresponding time t can be determined heelstrike (i). Since the detection threshold is adaptive, it can be adjusted according to the HS negative peak of different individuals without manually changing the parameters. After detecting the HS event, the system needs to prepare for detecting the next TO event. At this time, the state machine enters the S1 state, and the foot remains stationary on the ground for a period of time. In order to determine whether the foot has entered the S1 state, a 100ms v foot The mean μ v and variance σ v , and adopt the following rules:
[0067] |μ v |<20
[0068] |σ v |<120
[0069] Once these rules are met, the system begins preparing to detect the next TO event. Since the foot remains stationary in the S1 state, which is a stable phase in the gait cycle, the above rules are used to determine the starting point of the gait detection algorithm. The algorithm can be started at any moment in the gait cycle, ensuring a high degree of stability. To ensure safety, the algorithm also contains an additional rule: if the system is in the TO detection preparation state for more than 1.5 gait cycles without detecting the next TO state, indicating that a HS or TO event may have been missed, the current cycle will be forced to terminate and the algorithm will be reset.
[0070] S2, inputting the gait phase φ1(t)+π after half a gait cycle into the adaptive oscillator to obtain a first estimated value of the ankle joint angle after half a gait cycle Input φ1(t)+π into the ankle joint angle prediction model to obtain the second estimated value of the ankle joint angle after half a gait cycle
[0071] Specifically, after the adaptive oscillator corrected by the gait event obtains the continuous gait phase φ1(t), the second estimated value of the ankle angle after half a gait cycle is generated based on the ankle angle prediction model.
[0072] The ankle joint angle prediction model may adopt any neural network model, and the embodiment of the present invention does not impose any unique limitation on this.
[0073] Considering the prediction accuracy, the embodiment of the present invention preferably adopts the CNP model, which can not only accurately predict the value of the ankle joint angle, but also predict its uncertainty, providing key support for subsequent information fusion. That is, the ankle joint angle prediction model is a pre-trained CNP model.
[0074] The pre-training process of the CNP model is as follows:
[0075] Assume that there are N sampling points in a gait cycle, each sampling point includes the gait phase φ1(t) and joint angle θ obtained above ankle (t). Dataset collected during one gait cycle During the training process, M points are randomly selected as context points, and the remaining N-M+1 points are used as test points. That is, the gait phases in the dataset are used as samples, and the corresponding ankle joint angles are used as labels to supervise the CNP model training.
[0076] The CNP model includes an encoder and a decoder, and each of the encoder and the decoder includes an input layer, a hidden layer and an output layer connected in sequence.
[0077] In the embodiment of the present invention, in order to improve the computational efficiency, the hidden layers of the encoder and the decoder both include a fully connected layer and an activation function layer connected in sequence.
[0078] The number of hidden layers in the encoder and decoder can be set based on the ability to process complex data and computational efficiency. The more layers, the stronger the ability to process complex data, but the lower the computational efficiency. The choice mainly considers the balance between model expression ability and computational efficiency.
[0079] In an embodiment of the present invention, the number of hidden layers in the encoder is preferably set to 3, and the number of hidden layers in the decoder is preferably set to 2. An encoder with 3 hidden layers can better process features in layers, enabling it to cope with more complex input data and more effectively extract relevant information in the latent space. A decoder with 2 hidden layers can reduce the computational overhead of the model while ensuring that the decoder has sufficient capacity to generate high-quality output results. A smaller number of hidden layers can also reduce the risk of overfitting, making the decoder more robust.
[0080] First, use the encoder to convert the context points Mapped to a global representation vector r with a fixed dimension through neural networks and aggregation operations:
[0081]
[0082] The encoder will process the input data as follows: the input layer receives the gait phase φ1(t) and ankle angle θ at time t after splicing ankle (t); Each of the three hidden layers has 128 hidden units, and the fully connected layer is activated by ReLU. The last linear layer outputs a vector of fixed dimension. Each context point will be mapped to a high-dimensional space and finally mapped to the representation r of the context point. t The specific formula is as follows:
[0083]
[0084] The final aggregation operation is performed by averaging the representations of the context points:
[0085]
[0086] The decoder is represented as follows:
[0087]
[0088] The structure of the decoder is similar to that of the encoder. Its input is the global representation vector r and the gait phase φ of the test point. * The decoder has two hidden layers, each of which is composed of a fully connected layer using the ReLU activation function. The specific formula is as follows:
[0089] h o (1) =ReLU(W5·concat(r,φ * (t))+b5)
[0090] h o (2) =ReLU(W6h o (1) +b6)
[0091] O=W7h o (2) +b7
[0092] The original output of the decoder is a vector O containing the predicted mean and variance information. μ ,o σ ] T Directly use the first half of O as the output joint angle, that is The second half of O is passed through the softplus activation function to ensure that the variance is non-negative. In order to ensure the uncertainty range of the output, the CNP model uses the following formula to calculate the uncertainty:
[0093] σ CNP =0.1+0.9·softplus(o σ )
[0094] The final output is a conditional normal distribution in is the predicted ankle angle value, σ CNP (t) is the uncertainty of the prediction. There is a fully connected layer between the hidden layer and the output layer.
[0095] Preferably, during training the model is trained by maximizing the log-likelihood estimate, using the Adam optimizer, using the negative of the log-likelihood as the loss function:
[0096]
[0097] Variance σ CNP There is no true label, so the variance is not directly optimized during training. The training process mainly relies on maximizing the likelihood function, which indirectly learns the variance by optimizing the log-likelihood of the target value. In the loss function, if the prediction error is large (i.e. Larger), the model tends to increase the variance σ CNP (t), thereby reducing the result of the loss function. If the prediction error is small, the model tends to reduce the variance and increase the confidence of the prediction.
[0098] In the prediction stage of the model, the decoder receives the global representation generated from the historical context points and the new gait phase as input to predict the new ankle joint angle.
[0099] After completing this pre-training process, the CNP model is already able to predict the ankle joint angle based on the gait phase. Further, considering that there are certain differences between the gait cycle collection object used in training the CNP model and the gait cycle of the actual use object (i.e., the rehabilitation object), the gait trajectories of the same collection object in different gait cycles are not exactly the same. Based on this, preferably, the pre-trained training CNP model is further adjusted to adapt to the new gait cycle (i.e., the new gait cycle of the actual use object). That is, preferably, in step S2, before the gait phase φ1(t)+π after half a gait cycle is respectively input into the ankle joint angle prediction model, it also includes:
[0100] The ankle joint angle prediction model is fine-tuned using the gait phases and ankle joint angles of multiple sampling points in the previous gait cycle of the healthy calf.
[0101] Specifically, assuming that the dataset The trained initial model is Upon receiving the next gait cycle (i.e., the time between two heel strike events) data set Afterwards, from Randomly select a subset of and Train together, and then use a smaller learning rate to continue fine-tuning the model. The adjustment process is as follows Figure 5 shown.
[0102] S3, yes and Weighted calculation And smooth it to get the expected angle of the ankle joint on the affected side at time t
[0103] Specifically, the gait phase describes the current state in a periodic process, and the most commonly used mathematical description of periodic things is to use periodic functions such as sine and cosine, whose period is 2π. Therefore, it can be understood that the range of the entire gait cycle is 0 to 2π. When the human body walks normally, the ankle angles on the left and right sides should be symmetrical, but the phase difference π of half a gait cycle is maintained. Therefore, knowing the mapping relationship between the gait phase of the healthy ankle joint and the ankle angle and the gait phase of the current healthy ankle joint, the ankle angle that the affected side should have reached can be obtained by adding or subtracting the phase difference. That is, in steps S1 and S2, the adaptive oscillator and the CNP model have respectively learned the mapping relationship between the gait phase and the ankle angle, so the ankle angle predicted by the adaptive oscillator and the CNP model after half a gait cycle is and Will and Weighted calculation And smooth it to get That is to say, the desired angle of the affected ankle joint is finally obtained.
[0104] and The weighting coefficients can be set according to the accuracy of the adaptive oscillator and the CNP model.
[0105] As a further preferred embodiment of the present invention, the weighting coefficient w is defined as CNP (φ1(t)+π) and w AO (φ1(t)+π), their prediction uncertainty σ obtained by CNP CNP (φ1(t)+π) and a custom adaptive oscillator stability constant σ AO (φ1(t)+π) is calculated to obtain:
[0106]
[0107] In order to facilitate comparison with the uncertainty of CNP, the adaptive oscillator stability constant is expressed as follows:
[0108]
[0109] α is a scaling factor used to adjust the degree of influence of error on uncertainty. The default value is α = 1.
[0110] Finally, the predicted ankle angle of the fusion It can be expressed as follows:
[0111]
[0112] In order to reduce the random fluctuations and noise in the prediction and make the fused ankle angle prediction output more stable and continuous, so as to be more in line with the actual gait movement pattern and avoid discomfort during rehabilitation, the existing smoothing method is used to For example, a sliding average filter with a window size of k is used to smooth the output. It can be expressed as:
[0113]
[0114] By pulling the ankle joint of the foot drop patient to the desired angle at all times, the foot drop patient can be guided to restore a normal gait when walking.
[0115] The above algorithm was experimented on a healthy subject.
[0116] Plantar pressure sensors were installed at the heels and toes of the subjects, and threshold detection was used to identify actual heel strike (HS) and toe-off (TO) events. Figure 6 As shown in the figure. The values of these plantar pressure signals do not represent the actual physical pressure, but are used to qualitatively judge gait events. The heel strike (HS) and toe-off (TO) events calculated by the threshold method are represented by black circles, while the gait events detected by the algorithm proposed in the present invention are marked with red triangles. It can be seen from the figure that the algorithm can accurately detect HS and TO events and distinguish between the stance phase and the swing phase.
[0117] Figure 7 shows the contralateral ankle trajectory θ measured during walking ankle and the smoothed desired ankle trajectory on the affected side The overall root mean square error (RMSE) is 2.59°. Although there are some differences between the trajectory fitted by the oscillator and the actual trajectory during plantar flexion (when the ankle angle is negative), these differences do not affect the assistance effect because the assistance is only provided during dorsiflexion. The figure shows that the foot drop assistance method proposed in the present invention can effectively capture the characteristics of the healthy side trajectory and generate a reasonable auxiliary reference trajectory for the affected side.
[0118] An embodiment of the present invention provides an electronic device, including: a computer-readable storage medium and a processor;
[0119] The computer-readable storage medium is used to store executable instructions;
[0120] The processor is used to read the executable instructions stored in the computer-readable storage medium and execute the method described in any of the above embodiments.
[0121] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to execute the method described in any of the above embodiments.
[0122] An embodiment of the present invention provides a computer program product, including a computer program or instructions, and when the computer program or instructions are executed by a processor, the method described in any of the above embodiments is implemented.
[0123] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A foot drop assisting method based on a flexible ankle exoskeleton, characterized in that: include: S1, the ankle joint angle θ of the healthy leg at time t ankle (t) is input to the adaptive oscillator to obtain the estimated values of the gait phase at time t φ1(t) and α i (t); wherein, when the heel of the healthy calf is detected to touch the ground, ω(t) and φ1(t) in the adaptive oscillator are reset to ω measured and The adaptive oscillator is The update law is φ i (t) is the phase of the i-th oscillator at time t, α i (t) is the amplitude of the i-th sinusoidal component of the adaptive oscillator, ν and η are both learning parameters, ω(t) is the fundamental frequency of the gait trajectory; ω measured is the actual walking frequency, δ is the Dirichlet function, t heelstrike For the moment when the heel touches the ground, is the gait phase corresponding to the heel landing; S2, input the gait phase φ1(t)+π after half a gait cycle into the adaptive oscillator and the ankle joint angle prediction model respectively, and obtain the first estimated value of the ankle joint angle after half a gait cycle and the second estimate S3, yes and Weighted calculation And smooth it to get the expected angle of the ankle joint on the affected side at time t 2. The method according to claim 1, characterized in that A finite state machine is used to detect the heel-touching event of the healthy calf, wherein the states in the finite state machine include heel-touching, stance phase, toe-touching and swing phase; Among them, in the support phase state, if D t >D h , then the toe touchdown event occurs, after a fixed delay time T swing The hind foot enters the swing phase, when the angular velocity v of the foot in the sagittal plane foot First from top to bottom, then from bottom to top, cross the heel touch detection threshold thres twice heelstrike When the heel touches the ground, if the preset time v foot The mean and variance σ v satisfy The foot enters the stance phase; a k represents the net acceleration of the instep at time k in the time window from time tn to time t-1, σ x , σ y and σ z are the standard deviations of the net acceleration of the instep in the x, y, and z axes from time t-n+1 to time t, respectively. h Threshold for toe strike event detection.
3. The method according to claim 1, characterized in that The ankle joint angle prediction model is a CNP model, including an encoder and a decoder, wherein the encoder and the decoder both include an input layer, a hidden layer and an output layer connected in sequence, and the hidden layer both include a fully connected layer and an activation function layer connected in sequence.
4. The method according to claim 3, characterized in that In step S2, before the gait phase φ1(t)+π after half a gait cycle is input into the ankle joint angle prediction model, the following steps are also included: The ankle joint angle prediction model is fine-tuned using the gait phases and ankle joint angles of multiple sampling points in the previous gait cycle of the healthy calf.
5. The method according to claim 3, characterized in that When training the CNP model, the negative value of the log-likelihood is used as the loss function.
6. The method according to claim 3, characterized in that and The weight coefficients are w CNP (φ1(t)+π) and w AO (φ1(t)+π); in, σ CNP is the prediction uncertainty of the CNP model, σ CNP =0.1+0.9·softplus(o σ ), o σ is the prediction variance of the decoder output in the CNP model, σ AO (φ1(t)+π) is the stability constant of the adaptive oscillator, a is the scaling factor.
7. The method according to claim 1, characterized in that θ ankle The calculation formula of (t) is: Among them, r ij (t) is {B a }Relative to {B s The rotation matrix of The element in the i-th row and j-th column, i=1,j=1,2; {B s } and {B a } are local coordinate systems fixed on the healthy side calf and instep, respectively, {B s } and {B a }The z-axis is always parallel to the ankle joint axis, and the y-axis is parallel to the direction of gravity when the healthy calf is standing; and The local coordinate systems of the calf and instep IMUs are {S s } and {S a } is the rotation matrix of the global coordinate system {G}, For {B s }Relative {S s }, For {B a }Relative {S a } is the rotation matrix of .
8. An electronic device, characterized in that: include: A computer readable storage medium and a processor; The computer-readable storage medium is used to store executable instructions; The processor is used to read the executable instructions stored in the computer-readable storage medium and execute the method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to execute the method according to any one of claims 1 to 7.
10. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Exoskeleton coordinated gait control method based on human gait movement coordination characteristics
CN110215648A
Online gait generation control system for exoskeleton robot opposite side training
CN112220650A
Foot drop rehabilitation exoskeleton robot and self-adaptive gait auxiliary control method
CN112494272A
Lower limb gait prediction method based on attitude sensor and motion capture template data
CN112704491A
Hip joint trajectory generation method based on human limb coordination law and related equipment
CN114757339A
Cited By
Orthopedic stent mechanical state abnormity early warning method and system
CN120694796A
An orthopedic support mechanical state anomaly early warning method and system
CN120694796B
Flexible ankle joint exoskeleton for foot drop patient and control method of flexible ankle joint exoskeleton
CN120884460A
User gait self-adaptive lower limb rehabilitation exoskeleton continuous phase control method
CN121041120A
A User Gait Adaptive Lower Limb Rehabilitation Exoskeleton Continuous Phase Control Method
CN121041120B