Method for generating hip joint trajectory based on human limb coordination law and related device
By predicting and correcting hip joint trajectories using shoulder joint data and an LSTM model, the method addresses the issue of synchronization errors in lower limb exoskeletons, enhancing user comfort and reducing metabolic effort.
Patent Information
- Application Number
- CN202210403855.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-18
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-04-18
AI Technical Summary
The existing lower limb exoskeleton robots fail to effectively consider the human body's collaborative rules when generating the motion trajectory, resulting in large errors in the motion trajectory, which is expensive and fatigued by the user, and is unable to effectively assist rehabilitation training and enhance physical functions.
By obtaining the shoulder angle and angular velocity of the target user, the LS lower limb hip trajectory generation model and the LSTM hip trajectory correction model are used to combine human limb coordination laws to predict and correct the hip joint angle to generate a more accurate movement trajectory.
It reduces the error of the movement trajectory of the lower limb exoskeleton robot, improves the user's movement efficiency and comfort, and enhances the effect of assisted rehabilitation training.
Smart Images

Figure CN114757339B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and particularly relates to a hip joint trajectory generation method based on human limb coordination law and related devices. Background Art
[0002] Lower limb exoskeleton robots have broad application prospects. For example, in the medical field, they can help hemiplegic patients with rehabilitation training; in the military field, they can enhance the combat ability of individual soldiers. Nowadays, their use is also rapidly developing towards auxiliary purposes and can be used to promote functional activities in families, communities, and society. However, current lower limb exoskeleton robots still cannot coordinate movements well according to human rhythms, resulting in a relatively large consumption of metabolic energy by users and a great deal of fatigue, which is far from the goal of enhancing the physical functions of users, providing assistance, and helping with rehabilitation training. In the human-machine control of lower limb exoskeleton robots, generating the reference trajectory of the robot is crucial.
[0003] In existing lower limb trajectory generation methods, generally, a mathematical model is used to generate a reference trajectory, and then continuous adjustments and adaptations are made on the lower limb exoskeleton robot. However, such methods do not consider the human body coordination law, and the motion trajectory error of the lower limb exoskeleton machine is relatively large. Summary of the Invention
[0004] An embodiment of this application provides a hip joint trajectory generation method based on human limb coordination law and related devices, which can reduce the motion trajectory error of the lower limb exoskeleton machine.
[0005] In a first aspect, an embodiment of this application provides a hip joint trajectory generation method based on human limb coordination law, which includes:
[0006] Obtain the shoulder angle and shoulder angular velocity of the target user before the advance duration at the prediction moment, where the advance duration is the preset time when the shoulder leads the hip joint angle change during human walking;
[0007] Input the shoulder angle and shoulder angular velocity into a preset trained LS lower limb hip joint trajectory generation model for hip joint angle calculation to obtain the predicted hip joint angle at the prediction moment;
[0008] Input the predicted hip joint angle, the shoulder angle, and the shoulder angular velocity before the advance duration into a trained LSTM hip joint trajectory correction model to obtain an error estimate value between the actual hip joint angle and the predicted hip joint angle at the prediction moment;
[0009] Correct the predicted hip joint angle according to the error estimate value to obtain the corrected hip joint angle at the prediction moment;
[0010] Determine the corrected hip joint trajectory based on the corrected hip joint angles at multiple different prediction times.
[0011] In some embodiments, the step of inputting the shoulder angle and shoulder angular velocity into a preset trained LS lower limb hip joint trajectory generation model for hip joint angle calculation to obtain the predicted hip joint angle at the prediction time includes:
[0012] Determine the predicted hip joint angle according to the hip joint angle calculation formula in the trained LS lower limb hip joint trajectory generation model, wherein the input signals of the hip joint angle calculation formula are:
[0013]
[0014] The is the shoulder angle at time t - τ0, the is the shoulder angular velocity at time t - τ0, t is the prediction time, and τ0 is the advance duration;
[0015] The joint angle calculation formula is:
[0016]
[0017] The is the predicted hip joint angle, the The The The α0 ∈ R 1×j+1 and the α1 ∈ R 1×j and the α j ∈ R 1×1 and the The β * is the coefficient matrix after training the LS lower limb hip joint trajectory generation model, and j is the order.
[0018] In some embodiments, before the step of inputting the shoulder angle and shoulder angular velocity into a preset trained LS lower limb hip joint trajectory generation model for hip joint angle calculation, the method further includes:
[0019] Establish an LS lower limb hip joint trajectory generation model, and the LS lower limb hip joint trajectory generation model is:
[0020]
[0021] wherein the y t is the hip joint angle and β is the coefficient matrix;
[0022] Determine the value of the coefficient matrix β by minimizing the loss function, and define the finally obtained coefficient matrix as β* , the loss function is:
[0023]
[0024] where: where: y = [y0, y1, …, y t , which is the original measured angle of the hip joint, is the predicted angle of the hip joint, and n is the length of the training data;
[0025] Determine the hip joint angle calculation formula according to the value of the coefficient matrix.
[0026] In some embodiments, j is 3.
[0027] In some embodiments, before inputting the predicted angle of the hip joint and the shoulder angle and shoulder angular velocity before the advance duration into the trained LSTM hip joint trajectory correction model, the method further includes:
[0028] Obtain the historical predicted angle of the hip joint;
[0029] Train a preset LSTM hip joint trajectory correction model according to the historical predicted angle of the hip joint and the shoulder angle and shoulder angular velocity before the advance duration of the historical predicted angle of the hip joint to obtain the trained LSTM hip joint trajectory correction model.
[0030] In some embodiments, the preset LSTM hip joint trajectory correction model is a network structure of a three-input single-output LSTM including two hidden layers, and each hidden layer has 64 memory modules.
[0031] In some embodiments, before obtaining the shoulder angle and shoulder angular velocity before the advance duration of the prediction moment of the target user, the method further includes:
[0032] Calculate the correlation between the shoulder angle and the lower limb hip joint angle trajectory using the Pearson correlation coefficient;
[0033] Use the delay analysis algorithm to determine the lead-lag relationship between the shoulder and the hip joint to determine the value of the advance duration.
[0034] In a second aspect, an embodiment of the present application further provides a hip joint trajectory generation device based on the collaborative law of human limbs, which includes an acquisition unit and a processing unit, where:
[0035] The acquisition unit is used to acquire the shoulder angle and shoulder angular velocity before the advance duration of the prediction moment of the target user, and the advance duration is the preset time when the shoulder leads the hip joint angle change during walking;
[0036] The processing unit is configured to input the shoulder angle and the shoulder angular velocity into a pre-trained LS lower limb hip joint trajectory generation model for hip joint angle calculation to obtain the predicted hip joint angle at the prediction moment; input the predicted hip joint angle, the shoulder angle and the shoulder angular velocity before the advance duration into the trained LSTM hip joint trajectory correction model to obtain an error estimation value of the actual hip joint angle and the predicted hip joint angle at the prediction moment; perform a correction process on the predicted hip joint angle according to the error estimation value to obtain the corrected hip joint angle at the prediction moment; and determine the corrected hip joint trajectory according to the corrected hip joint angles at multiple different prediction moments.
[0037] In a third aspect, an embodiment of the present application further provides a computer device, which includes a memory and a processor. A computer program is stored on the memory, and when the processor executes the computer program, the above method is implemented.
[0038] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium. The storage medium stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, the above method can be implemented.
[0039] An embodiment of the present application provides a method for generating a hip joint trajectory based on the collaborative law of human limbs and related devices. The method includes: obtaining the shoulder angle and the shoulder angular velocity of a target user before an advance duration at the prediction moment, where the advance duration is a preset time for the shoulder to lead the hip joint angle change during human walking; inputting the shoulder angle and the shoulder angular velocity into a pre-trained LS lower limb hip joint trajectory generation model for hip joint angle calculation to obtain the predicted hip joint angle at the prediction moment; inputting the predicted hip joint angle, the shoulder angle and the shoulder angular velocity before the advance duration into the trained LSTM hip joint trajectory correction model to obtain an error estimation value of the actual hip joint angle and the predicted hip joint angle at the prediction moment; performing a correction process on the predicted hip joint angle according to the error estimation value to obtain the corrected hip joint angle at the prediction moment; and determining the corrected hip joint trajectory according to the corrected hip joint angles at multiple different prediction moments. When generating the hip joint trajectory in the embodiment of the present application, the shoulder angle and the shoulder angular velocity of the target user are combined, the collaborative law between limbs during human walking is considered, the angle trajectory of the lower limb hip joint is predicted in advance by using the motion information of the shoulder, and the LSTM hip joint trajectory correction model is also used to correct the predicted hip joint angle. This solution not only predicts the motion trajectory of the lower limb hip joint in advance, but also reduces the error of the motion trajectory of the lower limb exoskeleton machine. Description of the Drawings
[0040] To more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.
[0041] Figure 1 FIG. 4 is a schematic flowchart of a hip joint trajectory generation method based on the collaborative law of human limbs provided by an embodiment of the present application;
[0042] Figure 2 FIG. 8 is a schematic diagram of the calculated shoulder and hip joint angles provided by an embodiment of the present application;
[0043] Figure 3 FIG. 12 is a schematic diagram of the hip joint trajectory prediction result of the LS lower limb hip joint trajectory generation model provided by an embodiment of the present application;
[0044] Figure 4 FIG. 16 is a schematic structural diagram of a memory module in an LSTM hip joint trajectory correction model provided by an embodiment of the present application;
[0045] Figure 5 FIG. 20 is a schematic structural diagram of an LSTM hip joint trajectory correction model provided by an embodiment of the present application;
[0046] Figure 6 FIG. 24 is a schematic diagram of the trajectory correction result of an LSTM hip joint trajectory correction model provided by an embodiment of the present application;
[0047] Figure 7 FIG. 28 is a schematic block diagram of a hip joint trajectory generation device based on the collaborative law of human limbs provided by an embodiment of the present application;
[0048] Figure 8 FIG. 32 is a schematic block diagram of a computer device provided by an embodiment of the present application. Detailed implementation manners
[0049] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts belong to the scope of protection of the present application.
[0050] It should be understood that when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0051] It should also be understood that the terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. As used in the specification of this application and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include the plural forms.
[0052] It should be further understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0053] In the field of lower limb exoskeleton robot research, generating a reference trajectory of the robot is an important part of realizing human-robot collaborative control. However, in the existing research on lower limb trajectory generation, most use mathematical models to generate lower limb trajectories. This method does not consider the collaborative law between limbs during human walking, which may lead to a large error between the generated reference trajectory and the actual trajectory, and the applicable population range of the robot is small. This application provides a hip joint trajectory generation method based on the collaborative law of human limbs to solve the above problems.
[0054] The embodiments of this application provide a hip joint trajectory generation method based on the collaborative law of human limbs and related devices.
[0055] The execution subject of the hip joint trajectory generation method based on the collaborative law of human limbs can be the hip joint trajectory generation device provided by the embodiments of this application, or a computer device integrated with the hip joint trajectory generation device based on the collaborative law of human limbs. Among them, the hip joint trajectory generation device based on the collaborative law of human limbs can be implemented in a hardware or software manner. The computer device can be a terminal or a server, and the terminal can be a lower limb exoskeleton robot or other control terminals for controlling the lower limb exoskeleton robot.
[0056] Figure 1 is a schematic flowchart of the hip joint trajectory generation method based on the collaborative law of human limbs provided by the embodiments of this application. As Figure 1 shown, the method includes the following steps S110-180.
[0057] S110. Analyze the collaborative law between the shoulders and the hip joints of the human body to obtain the lead-lag relationship between the shoulders and the hip joints, so as to determine the lead time of the shoulder ahead of the hip joint angle change during human walking.
[0058] Specifically, the analysis of the coordination law between limbs: First, the Pearson correlation coefficient is used to calculate the correlation between the shoulder and the hip joint angle trajectories of the lower limbs. Secondly, we use the delay analysis algorithm to study the lead-lag relationship between the shoulder and the hip joint. The formula is as follows:
[0059]
[0060] where τ is the time displacement between the time series signals x(t) and y(t). The lead-lag relationship between the two signals is obtained by calculating the value of τ. When R xy(t) is the largest, τ is the delay time. When τ is positive, it means that the signal x(t) leads the signal y(t); when τ is negative, it means that the signal x(t) lags behind the signal y(t). Define the calculated advance duration as τ0. The experimental results of the correlation and advance duration between the shoulder and hip joint trajectories of the subjects are shown in Table 1:
[0061] Table 1
[0062] Mean of correlation coefficient Standard deviation of correlation coefficient Mean of lead time Standard deviation of lead time Experimenter 1 0.693 0.095 38.77 ms 22.55 ms Experimenter 2 0.761 0.079 27.85 ms 17.02 ms Experimenter 3 0.912 0.026 18.77 ms 11.08 ms Experimenter 4 0.628 0.092 54 ms 25.64 ms Mean 0.749 0.073 34.85 ms 19.07 ms
[0063] For easy understanding, please refer to Figure 2 , Figure 2 which is a schematic diagram of the calculated shoulder and hip joint angles.
[0064] S120. Train the preset LS lower limb hip joint trajectory generation model to obtain the trained LS lower limb hip joint trajectory generation model.
[0065] In this embodiment, the input signal of the LS lower limb hip joint trajectory generation model is
[0066] the shoulder angle at time t - τ0, the shoulder angular velocity at time t - τ0, t is the prediction time, and τ0 is the advance duration;
[0067] Specifically, first establish a least square (LS) lower limb hip joint trajectory generation model. The LS lower limb hip joint trajectory generation model is:
[0068]
[0069] where y t is the hip joint angle, β is the coefficient matrix,
[0070] α0 ∈ R 1×j+1 , α1 ∈ R 1×j , … α j ∈ R1×1 , where j is the order, and j is preferably 3.
[0071] In this application, the value of the coefficient matrix β is determined by minimizing the loss function, and the finally obtained coefficient matrix is defined as β * , and the loss function is:
[0072]
[0073] where: y = [y0, y1, …, y t , which is the original measured angle of the hip joint, is the predicted angle of the hip joint, and n is the length of the training data;
[0074] Determine the hip joint angle calculation formula according to the value of the coefficient matrix:
[0075]
[0076] where, is the predicted angle of the hip joint, β * is the coefficient matrix after training the LS lower limb hip joint trajectory generation model;
[0077] When it is necessary to predict the hip joint angle at the prediction time in the future, the shoulder angle and shoulder angular velocity before the advance duration of the prediction time can be obtained, and then the predicted hip joint angle at the prediction time can be calculated according to formula (4).
[0078] where, the hip joint trajectory prediction result of the LS lower limb hip joint trajectory generation model is as Figure 3 shown.
[0079] S130. Train the preset LSTM hip joint trajectory correction model to obtain the trained LSTM hip joint trajectory correction model.
[0080] The long short-term memory network (LSTM) hip joint trajectory correction model in this application consists of multiple memory modules. Each memory module includes an input, an output, and a forget gate unit. These three gates can provide write, read, and reset operations. The block diagram of each module is as Figure 4 shown.
[0081] In Figure 4 , the input of the memory module is x t , the output is h t , and the calculation formulas of the three gate units (f t , i t , o t ) are as follows:
[0082] ft = σ(W f · [h t-1 , x t + b f ); (5)
[0083] i t = σ(W i · [h t-1 , x t + b i ); (6)
[0084] o t = σ(W o · [h t-1 , x t + b0); (7)
[0085] σ is the activation function, W f , W i , W o are weight matrices, b f , b i , b o are bias vectors. h t-1 is the output of the memory module at time t-1. The state value of the memory cell is:
[0086]
[0087] Through the f t , i t , obtained by the above calculation, the new state value c t of the memory module can be obtained:
[0088]
[0089] The output h t of the LSTM memory module at time t is:
[0090] h t = o t × tanh(c t ); (10)
[0091] In some embodiments, please refer to Figure 5, in this embodiment, the preset LSTM hip joint trajectory correction model is a three-input single-output LSTM network structure with two hidden layers, and each hidden layer has 64 memory modules. Then, the preset LSTM hip joint trajectory correction model is trained to obtain the historical hip joint prediction angles. Then, based on the historical hip joint prediction angles, the shoulder angles and shoulder angular velocities before the advance duration of the historical hip joint prediction angles, the preset LSTM hip joint trajectory correction model is trained to obtain the trained LSTM hip joint trajectory correction model, where the advance duration of the historical hip joint prediction angles is the advance duration corresponding to the moment when the historical hip joint prediction angles are obtained.
[0092] Specifically, the predicted hip joint trajectory θ h,pre (i.e., the output in the LS lower limb hip joint trajectory generation model ), the shoulder angle θ s and angular velocity at time t - τ0 are used as the inputs of the preset LSTM hip joint trajectory correction model, and the error between the actual hip joint trajectory θ h,r and the predicted trajectory is used as the output.
[0093] ε = θ h,r - θ h,pre ; (11)
[0094] Among them, steps S110 to S130 are the preparation steps of the hip joint trajectory generation method based on the human limb coordination law in the embodiments of the present application. After the preparation is completed, when directly predicting the hip joint trajectory, steps S140 to S180 are directly executed.
[0095] S140. Obtain the shoulder angle and shoulder angular velocity before the advance duration of the prediction moment of the target user. The advance duration is the preset time when the shoulder angle changes ahead of the hip joint angle during human walking.
[0096] Among them, the target user in this embodiment is a user equipped with a lower limb exoskeleton robot or a lower limb exoskeleton robot with upper limb functions.
[0097] In this embodiment, when predicting the hip joint angle at the prediction moment, first obtain the shoulder angle and shoulder angular velocity before the advance duration of the prediction moment.
[0098] S150. Input the shoulder angle and shoulder angular velocity into the preset trained LS lower limb hip joint trajectory generation model for hip joint angle calculation to obtain the predicted hip joint angle at the prediction moment.
[0099] After obtaining the shoulder angle and shoulder angular velocity before the prediction time advance duration, substitute the shoulder angle and shoulder angular velocity into formula (4) to calculate the predicted hip joint angle at the prediction time.
[0100] S160: Input the predicted hip joint angle, the shoulder angle and shoulder angular velocity before the advance duration into the trained LSTM hip joint trajectory correction model to obtain an error estimate value of the actual hip joint angle and the predicted hip joint angle at the prediction time.
[0101] In this embodiment, after obtaining the predicted hip joint angle through the LS lower limb hip joint trajectory generation model, in order to further reduce the error between the actual hip joint angle and the predicted hip joint angle, it is also necessary to input the obtained predicted hip joint angle, the shoulder angle and shoulder angular velocity before the advance duration into the trained LSTM hip joint trajectory correction model to obtain an error estimate value of the actual hip joint angle and the predicted hip joint angle at the prediction time.
[0102] S170: Correct the predicted hip joint angle according to the error estimate value to obtain the corrected hip joint angle at the prediction time.
[0103] Specifically, obtain the error estimate value through the trained LSTM hip joint trajectory correction model After that, correct the predicted hip joint angle through formula (12), and the corrected hip joint trajectory is
[0104]
[0105] S180: Determine the corrected hip joint trajectory according to the corrected hip joint angles at multiple different prediction times.
[0106] In this embodiment, the corrected hip joint angles corresponding to multiple consecutive times are connected in series in sequence, that is, the corrected hip joint trajectory is obtained, and the robot moves according to the predicted corrected hip joint trajectory.
[0107] Among them, the trajectory correction result based on the LSTM hip joint trajectory correction model is as Figure 6 shown.
[0108] In summary, the present application obtains the shoulder angle and shoulder angular velocity before the advance duration of the target user's prediction moment, where the advance duration is the preset time when the shoulder advances the hip joint angle change during human walking; inputs the shoulder angle and shoulder angular velocity into a preset trained LS lower limb hip joint trajectory generation model to calculate the hip joint angle, and obtains the predicted hip joint angle at the prediction moment; inputs the predicted hip joint angle, the shoulder angle and shoulder angular velocity before the advance duration into a trained LSTM hip joint trajectory correction model to obtain an error estimate value between the actual hip joint angle and the predicted hip joint angle at the prediction moment; corrects the predicted hip joint angle according to the error estimate value to obtain the corrected hip joint angle at the prediction moment; determines the corrected hip joint trajectory according to the corrected hip joint angles at multiple different prediction moments. When generating the hip joint trajectory in the embodiment of the present application, the shoulder angle and shoulder angular velocity of the target user are combined, the collaborative law between limbs during human walking is considered, the angle trajectory of the lower limb hip joint is predicted in advance using the motion information of the shoulder, and an LSTM hip joint trajectory correction model is also used to correct the predicted hip joint angle. This solution not only predicts the motion trajectory of the lower limb hip joint in advance, but also reduces the error of the motion trajectory of the lower limb exoskeleton robot.
[0109] Figure 7 FIG. is a schematic block diagram of a hip joint trajectory generation device based on the collaborative law of human limbs provided by an embodiment of the present application. As Figure 7 shown, corresponding to the above hip joint trajectory generation method based on the collaborative law of human limbs, the present application also provides a hip joint trajectory generation device based on the collaborative law of human limbs. The hip joint trajectory generation device based on the collaborative law of human limbs includes units for executing the above hip joint trajectory generation method based on the collaborative law of human limbs, and this device can be configured in a lower limb exoskeleton robot or other control terminals for controlling the lower limb exoskeleton robot. Specifically, please refer to Figure 7 FIG., the hip joint trajectory generation device based on the collaborative law of human limbs includes an acquisition unit 701 and a processing unit 702, where:
[0110] The acquisition unit 701 is configured to acquire the shoulder angle and shoulder angular velocity before the advance duration of the target user's prediction moment, where the advance duration is the preset time when the shoulder advances the hip joint angle change during human walking;
[0111] The processing unit 702 is configured to input the shoulder angle and the shoulder angular velocity into a pre-trained LS lower limb hip joint trajectory generation model to calculate the hip joint angle, and obtain the predicted hip joint angle at the prediction moment; input the predicted hip joint angle, the shoulder angle and the shoulder angular velocity before the advance duration into a trained LSTM hip joint trajectory correction model, and obtain an error estimation value between the actual hip joint angle and the predicted hip joint angle at the prediction moment; correct the predicted hip joint angle according to the error estimation value to obtain the corrected hip joint angle at the prediction moment; and determine the corrected hip joint trajectory according to the corrected hip joint angles at multiple different prediction moments.
[0112] In some embodiments, when the processing unit 702 executes the step of inputting the shoulder angle and the shoulder angular velocity into a pre-trained LS lower limb hip joint trajectory generation model to calculate the hip joint angle, and obtaining the predicted hip joint angle at the prediction moment, it is specifically configured to:
[0113] Determine the predicted hip joint angle according to the hip joint angle calculation formula in the trained LS lower limb hip joint trajectory generation model, where the input signals of the hip joint angle calculation formula are:
[0114]
[0115] The is the shoulder angle at time t - τ0, and the is the shoulder angular velocity at time t - τ0, where t is the prediction moment and τ0 is the advance duration;
[0116] The hip joint angle calculation formula is:
[0117]
[0118] The is the predicted hip joint angle, and the The The The α0 ∈ R 1×j+1 and the α1 ∈ R 1×j and the α j ∈ R 1×1 and the The β * is the coefficient matrix after training the LS lower limb hip joint trajectory generation model, and j is the order.
[0119] In some embodiments, before the processing unit 702 executes the step of inputting the shoulder angle and shoulder angular velocity into a pre-trained LS lower limb hip joint trajectory generation model for hip joint angle calculation, it is specifically further configured to:
[0120] Establish an LS lower limb hip joint trajectory generation model, where the LS lower limb hip joint trajectory generation model is:
[0121]
[0122] where, the y t is the hip joint angle, and the β is a coefficient matrix;
[0123] Determine the value of the coefficient matrix β by minimizing the loss function, and define the finally obtained coefficient matrix as β * , and the loss function is:
[0124]
[0125] where: y = [y0, y1, …, y t , is the original measured angle of the hip joint, is the predicted angle of the hip joint, and n is the length of the training data;
[0126] Determine the hip joint angle calculation formula according to the value of the coefficient matrix.
[0127] In some embodiments, the j is 3.
[0128] In some embodiments, before the processing unit 702 executes the step of inputting the predicted hip joint angle and the shoulder angle and shoulder angular velocity before the advance duration into the trained LSTM hip joint trajectory correction model, it is specifically further configured to:
[0129] Obtain historical predicted hip joint angles;
[0130] Train a preset LSTM hip joint trajectory correction model according to the historical predicted hip joint angles and the shoulder angles and shoulder angular velocities before the advance duration of the historical predicted hip joint angles to obtain the trained LSTM hip joint trajectory correction model.
[0131] In some embodiments, the preset LSTM hip joint trajectory correction model is a network structure of a three-input single-output LSTM including two hidden layers, and each hidden layer has 64 memory modules.
[0132] In some embodiments, before the processing unit 702 executes the step of obtaining the shoulder angle and shoulder angular velocity before the advance duration of the prediction moment of the target user and fails, it is specifically further configured to:
[0133] The Pearson correlation coefficient is used to calculate the correlation between the shoulder angle and the lower limb hip joint angle trajectory;
[0134] The delay analysis algorithm is used to determine the lead-lag relationship between the shoulder and the hip joint to determine the value of the lead duration.
[0135] It should be noted that those skilled in the art can clearly understand that the specific implementation processes of the above hip joint trajectory generation device and each unit based on the human limb coordination law can refer to the corresponding descriptions in the foregoing method embodiments. For the convenience and conciseness of description, they will not be elaborated here.
[0136] The above hip joint trajectory generation device based on the human limb coordination law can be implemented in the form of a computer program, and this computer program can run on a computer device as Figure 8 shown.
[0137] Please refer to Figure 8 , Figure 8 , which is a schematic block diagram of a computer device provided by an embodiment of the present application. The computer device 800 can be a terminal or a server. Among them, the terminal can be a lower limb exoskeleton robot or other control terminals for controlling the lower limb exoskeleton robot. The server can be an independent server or a server cluster composed of multiple servers.
[0138] Refer to Figure 8 , the computer device 800 includes a processor 802, a memory, and a network interface 805 connected through a system bus 801. Among them, the memory can include a non-volatile storage medium 803 and an internal memory 804.
[0139] The non-volatile storage medium 803 can store an operating system 8031 and a computer program 8032. The computer program 8032 includes program instructions, and when the program instructions are executed, the processor 802 can be made to execute a hip joint trajectory generation method based on the human limb coordination law.
[0140] The processor 802 is used to provide computing and control capabilities to support the operation of the entire computer device 800.
[0141] The internal memory 804 provides an environment for the operation of the computer program 8032 in the non-volatile storage medium 803. When the computer program 8032 is executed by the processor 802, the processor 802 can be made to execute a hip joint trajectory generation method based on the human limb coordination law.
[0142] The network interface 805 is used for network communication with other devices. Those skilled in the art can understand that Figure 8The structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device 800 to which the solution of this application is applied. Specifically, the computer device 800 may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.
[0143] Among them, the processor 802 is used to run the computer program 8032 stored in the memory to implement the following steps:
[0144] Obtain the shoulder angle and shoulder angular velocity before the advance duration of the target user's prediction moment, where the advance duration is the preset time for the shoulder to advance the hip joint angle change during a person's walking;
[0145] Input the shoulder angle and shoulder angular velocity into a preset trained LS lower limb hip joint trajectory generation model for hip joint angle calculation to obtain the predicted hip joint angle at the prediction moment;
[0146] Input the predicted hip joint angle, the shoulder angle and shoulder angular velocity before the advance duration into the trained LSTM hip joint trajectory correction model to obtain an error estimate value between the actual hip joint angle and the predicted hip joint angle at the prediction moment;
[0147] Perform a correction process on the predicted hip joint angle according to the error estimate value to obtain the corrected hip joint angle at the prediction moment;
[0148] Determine the corrected hip joint trajectory according to the corrected hip joint angles at multiple different prediction moments.
[0149] In some embodiments, when the processor 802 implements the step of inputting the shoulder angle and shoulder angular velocity into a preset trained LS lower limb hip joint trajectory generation model for hip joint angle calculation to obtain the predicted hip joint angle at the prediction moment, the following steps are specifically implemented:
[0150] Determine the predicted hip joint angle according to the hip joint angle calculation formula in the trained LS lower limb hip joint trajectory generation model, where the input signals of the hip joint angle calculation formula are:
[0151]
[0152] The is the shoulder angle at the moment of t - τ0, the is the shoulder angular velocity at the moment of t - τ0, the t is the prediction moment, and the τ0 is the advance duration;
[0153] The hip joint angle calculation formula is:
[0154]
[0155] The said is the predicted hip joint angle, and the said The said The said The said α0 ∈ R 1×j+1 , the said α1 ∈ R 1×j , the said α j ∈ R 1×1 , the said The said β * is the coefficient matrix after training the LS lower limb hip joint trajectory generation model, and the j is the order.
[0156] In some embodiments, before the processor 802 implements the step of inputting the shoulder angle and shoulder angular velocity into the preset trained LS lower limb hip joint trajectory generation model for hip joint angle calculation, the following steps are also implemented:
[0157] Establish an LS lower limb hip joint trajectory generation model, and the LS lower limb hip joint trajectory generation model is:
[0158]
[0159] wherein, the said y t is the hip joint angle, and the β is the coefficient matrix;
[0160] Determine the value of the coefficient matrix β by minimizing the loss function, and define the finally obtained coefficient matrix as β * , and the loss function is:
[0161]
[0162] where: y = [y0, y1, …, y t , which is the original measured angle of the hip joint, is the predicted hip joint angle, and n is the length of the training data;
[0163] Determine the hip joint angle calculation formula according to the value of the coefficient matrix.
[0164] In some embodiments, the j is 3.
[0165] In some embodiments, before the processor 802 implements the step of inputting the predicted hip joint angle into the trained LSTM hip joint trajectory correction model, the following steps are also implemented:
[0166] Obtain the historical predicted hip joint angle;
[0167] Training a preset LSTM hip joint trajectory correction model according to the historical hip joint prediction angle, the shoulder angle and shoulder angular velocity before the advance duration of the historical hip joint prediction angle, to obtain the trained LSTM hip joint trajectory correction model.
[0168] In some embodiments, the preset LSTM hip joint trajectory correction model is a three-input single-output LSTM network structure with two hidden layers, and each hidden layer has 64 memory modules.
[0169] In some embodiments, before the processor 802 implements the step of obtaining the shoulder angle and shoulder angular velocity before the advance duration of the prediction moment of the target user, the following steps are further implemented:
[0170] Calculating the correlation between the shoulder angle and the lower limb hip joint angle trajectory using the Pearson correlation coefficient;
[0171] Using a delay analysis algorithm to determine the lead-lag relationship between the shoulder and the hip joint to determine the value of the advance duration.
[0172] It should be understood that in the embodiments of the present application, the processor 802 may be a central processing unit (CPU), and the processor 802 may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0173] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, and the storage medium is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0174] Therefore, the present application also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, where the computer program includes program instructions. When the program instructions are executed by a processor, the processor is caused to execute the following steps:
[0175] Obtain the shoulder angle and shoulder angular velocity before the advance duration at the predicted moment of the target user, where the advance duration is the preset time for the shoulder to lead the hip joint angle change during walking;
[0176] Input the shoulder angle and shoulder angular velocity into a preset trained LS lower limb hip joint trajectory generation model for hip joint angle calculation to obtain the predicted hip joint angle at the predicted moment;
[0177] Input the predicted hip joint angle, the shoulder angle, and the shoulder angular velocity before the advance duration into a trained LSTM hip joint trajectory correction model to obtain an error estimate value between the actual hip joint angle and the predicted hip joint angle at the predicted moment;
[0178] Perform a correction process on the predicted hip joint angle according to the error estimate value to obtain the corrected hip joint angle at the predicted moment;
[0179] Determine the corrected hip joint trajectory according to the corrected hip joint angles at multiple different predicted moments.
[0180] In some embodiments, when the processor executes the program instructions to implement the step of inputting the shoulder angle and shoulder angular velocity into a preset trained LS lower limb hip joint trajectory generation model for hip joint angle calculation to obtain the predicted hip joint angle at the predicted moment, the specific implementation is as follows:
[0181] Determine the predicted hip joint angle according to the hip joint angle calculation formula in the trained LS lower limb hip joint trajectory generation model, where the input signals of the hip joint angle calculation formula are:
[0182]
[0183] The is the shoulder angle at time t - τ0, and the is the shoulder angular velocity at time t - τ0, where t is the predicted moment and τ0 is the advance duration;
[0184] The hip joint angle calculation formula is:
[0185]
[0186] The is the predicted hip joint angle, and the The The The α0 ∈ R 1×j+1 and the α1 ∈ R 1×j The α j ∈ R 1×1 The The β * is the coefficient matrix after training the LS lower limb hip joint trajectory generation model, and the j is the order.
[0187] In some embodiments, before the processor executes the program instructions to implement the step of inputting the shoulder angle and shoulder angular velocity into a preset trained LS lower limb hip joint trajectory generation model for hip joint angle calculation, the following steps are further implemented:
[0188] Establish an LS lower limb hip joint trajectory generation model, and the LS lower limb hip joint trajectory generation model is:
[0189]
[0190] where the y t is the hip joint angle, and the β is the coefficient matrix;
[0191] Determine the value of the coefficient matrix β by minimizing the loss function, and define the finally obtained coefficient matrix as β * , and the loss function is:
[0192]
[0193] where: y = [y0, y1, …, y t , which is the original measured angle of the hip joint, is the predicted angle of the hip joint, and n is the length of the training data;
[0194] Determine the hip joint angle calculation formula according to the value of the coefficient matrix.
[0195] In some embodiments, the j is 3.
[0196] In some embodiments, before the processor executes the program instructions to implement the step of inputting the predicted hip joint angle and the shoulder angle and shoulder angular velocity before the advance duration into the trained LSTM hip joint trajectory correction model, the following steps are further implemented:
[0197] Obtain the historical predicted hip joint angle;
[0198] Train a preset LSTM hip joint trajectory correction model according to the historical predicted hip joint angle and the shoulder angle and shoulder angular velocity before the advance duration of the historical predicted hip joint angle to obtain the trained LSTM hip joint trajectory correction model.
[0199] In some embodiments, the preset LSTM hip joint trajectory correction model is a network structure of a three-input single-output LSTM with two hidden layers, and each hidden layer has 64 memory modules.
[0200] In some embodiments, before the processor executes the program instructions to implement the steps of obtaining the shoulder angle and shoulder angular velocity at the prediction moment of the target user in advance, the following steps are also implemented:
[0201] Calculate the correlation between the shoulder angle and the lower limb hip joint angle trajectory using the Pearson correlation coefficient;
[0202] Use the delay analysis algorithm to determine the lead-lag relationship between the shoulder and the hip joint to determine the value of the advance duration.
[0203] The storage medium may be various computer-readable storage media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disc that can store program codes.
[0204] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0205] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0206] The steps in the method embodiments of the present application can be adjusted, combined, and deleted according to actual needs. The units in the device embodiments of the present application can be combined, divided, and deleted according to actual needs. In addition, the functional units in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
[0207] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0208] As described above, the foregoing are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present application can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A hip joint trajectory generation method based on the collaborative law of human limbs, characterized in that, Including: Obtain the shoulder angle and shoulder angular velocity of the target user before the advance duration at the prediction moment, where the advance duration is the preset time for the shoulder to lead the hip joint angle change during walking; Input the shoulder angle and shoulder angular velocity into a preset trained LS lower limb hip joint trajectory generation model for hip joint angle calculation to obtain the predicted hip joint angle at the prediction moment; Input the predicted hip joint angle, the shoulder angle and shoulder angular velocity before the advance duration into the trained LSTM hip joint trajectory correction model to obtain an error estimate value between the actual hip joint angle and the predicted hip joint angle at the prediction moment; Perform a correction process on the predicted hip joint angle according to the error estimate value to obtain the corrected hip joint angle at the prediction moment; Determine the corrected hip joint trajectory according to the corrected hip joint angles at multiple different prediction moments; The step of inputting the shoulder angle and shoulder angular velocity into a preset trained LS lower limb hip joint trajectory generation model for hip joint angle calculation to obtain the predicted hip joint angle at the prediction moment includes: Determine the predicted hip joint angle according to the hip joint angle calculation formula in the trained LS lower limb hip joint trajectory generation model, where the input signal of the hip joint angle calculation formula is: The is the shoulder angle at time t - T0, and the is the shoulder angular velocity at time t - T0, where t is the predicted time and T0 is the lead time; The hip joint angle calculation formula is: The is the predicted hip joint angle, the The The The a0 ∈ R 1×j+1 , the α1 ∈ R 1 ×j , the α j ∈ R 1×1 , the The β * is the coefficient matrix after training of the LS lower limb hip joint trajectory generation model, and the j is the order.
2. The method according to claim 1, characterized in that, Before inputting the shoulder angle and shoulder angular velocity into a preset trained LS lower limb hip joint trajectory generation model for hip joint angle calculation, the method further includes: Establish an LS lower limb hip joint trajectory generation model, and the LS lower limb hip joint trajectory generation model is: y t = [α0, α1, …, a j ·β; Among them, the y t is the hip joint angle, and the β is the coefficient matrix; The value of the coefficient matrix β is determined by minimizing the loss function, and the finally obtained coefficient matrix is defined as β * , and the loss function is as follows: Where: y = [y0, y1, …, y t , which is the original measurement angle of the hip joint, is the predicted angle of the hip joint, and n is the length of the training data; Determine the hip joint angle calculation formula according to the value of the coefficient matrix.
3. The method according to claim 2, wherein The j is 3.
4. The method according to claim 1, wherein Before inputting the predicted hip joint angle, the shoulder angle and shoulder angular velocity before the advance duration into the trained LSTM hip joint trajectory correction model, the method further includes: Obtain the historical predicted hip joint angle; Train a preset LSTM hip joint trajectory correction model according to the historical predicted hip joint angle, the shoulder angle and shoulder angular velocity before the advance duration of the historical predicted hip joint angle to obtain the trained LSTM hip joint trajectory correction model.
5. The method according to claim 4, wherein The preset LSTM hip joint trajectory correction model is a three-input single-output LSTM network structure with two hidden layers, and each hidden layer has 64 memory modules.
6. The method according to any one of claims 1 to 5, characterized in that Before obtaining the shoulder angle and shoulder angular velocity of the target user before the advance duration at the prediction moment, the method further includes: Calculate the correlation between the shoulder angle and the lower limb hip joint angle trajectory using the Pearson correlation coefficient; Use the delay analysis algorithm to determine the lead-lag relationship between the shoulder and the hip joint to determine the value of the advance duration.
7. A computer device, characterized in that, The computer device includes a memory and a processor, and a computer program is stored on the memory. When the processor executes the computer program, the method described in any one of claims 1-6 is implemented.
8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and the computer program includes program instructions which, when executed by a processor, can implement the method according to any one of claims 1-6.
Citation Information
Patent Citations
Depth image human body joint positioning method based on convolution nerve network
CN105787439A
Method and device for predicting angle of ankle joint of artificial limb
CN111476204A