Gait cycle pattern recognition model optimization method, medium and exoskeleton assistance system
By improving the Nelder-Mead algorithm to optimize the gait periodic pattern recognition model under constraints, the problem of low efficiency of hyperparameter optimization in traditional methods is solved, and the model promotion ability and the comfort of the exoskeleton assist device are improved.
Patent Information
- Application Number
- CN202510759489.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-06-09
AI Technical Summary
The debugging method of traditional gait periodic pattern recognition model relies on experimental experience, resulting in poor adaptability and low efficiency. The existing model optimization methods cannot effectively optimize multiple hyperparameters, resulting in a decrease in the promotion ability and inference efficiency of deep learning models in applications.
Under the constraints, the Nelder-Mead algorithm is improved, and the gait period pattern recognition model is optimized by initializing simple shapes, traversing vertices, determining reflection points and extension points, and improving the optimization efficiency and accuracy of the model.
It realizes the search for boundary and internal optimal solutions under constraints, improving the model's promotion ability and the comfort of the exoskeleton assist device.
Smart Images

Figure CN120277374B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machine learning model optimization methods for exoskeleton power-assistance systems, and in particular to a gait cycle pattern recognition model optimization method, a medium, and an exoskeleton power-assistance system. Background Art
[0002] The gait cycle pattern recognition model in an exoskeleton assistive device is used to identify the user's gait cycle, such as the stance and swing states of the legs, as well as the corresponding switching cycles. Traditional gait cycle pattern recognition model debugging methods rely on empirical testing, resulting in poor adaptability, low debugging efficiency, and poor comfort when used in an exoskeleton assistive device. However, a problem with using machine learning for debugging is that existing model optimization methods often use a simplistic and crude approach to selecting model hyperparameters, using 10-fold or N-fold cross-validation combined with a grid point search to obtain approximately optimal values for key hyperparameters. This existing approach is slow and inaccurate, and is simply unable to handle the optimization of multiple, or even dozens or hundreds, of hyperparameters. Consequently, the recently emerging complex neural networks associated with deep learning often fail to optimize default hyperparameters for specific application scenarios, such as the number of neural network layers and the number of neurons in each layer. These hyperparameters are often overlooked by developers and even academics. Because training complex neural networks to obtain network weight coefficients consumes significant computing power and time, they may no longer consider the reduced model generalization and inference efficiency caused by changes in hyperparameters. Hyperparameters themselves are non-convex and non-differentiable for the objective function of model validation. Therefore, the most direct approach is to use the unconstrained Nelder-Mead algorithm to solve the optimal hyperparameter problem.
[0003] However, hyperparameters are within a bounded range, or in other words, the entire hyperparameter space is constrained within a hypercube. The optimal hyperparameter can be a point inside the hypercube, i.e., the internal optimal solution, or a point on the boundary of the hypercube, i.e., the boundary optimal solution. Traditional unconstrained methods, such as the Nelder-Mead algorithm, cannot obtain the boundary optimal solution that falls on a face of the hypercube, even if the external solutions of the hypercube that do not meet the constraints are eliminated. Therefore, under constraints, especially those of the gait cycle pattern recognition model, including signal sparsity and sliding window size, the traditional unconstrained Nelder-Mead method fails to solve the hyperparameters of machine learning and deep learning models. Summary of the Invention
[0004] In order to overcome the shortcomings of the above-mentioned existing technologies, the present invention provides a gait cycle pattern recognition model optimization method, medium and exoskeleton assistance system. Under the condition that there are constraints on the variables to be optimized, the gait cycle pattern recognition model can be optimized and solved, the model optimization efficiency can be improved, and the comfort of using the exoskeleton assistance device can be enhanced.
[0005] In order to achieve the above object, the present invention is implemented through the following technical solutions:
[0006] A gait cycle pattern recognition model optimization method applied to an exoskeleton power-assisting system comprises the following steps:
[0007] S01: Based on the gait cycle pattern recognition model, preset the convergence accuracy and constraints of the variables to be optimized;
[0008] S02: Initialize a simplex that meets the constraints of the variables to be optimized;
[0009] S03: Traverse the vertices of the simplex and, based on the values of all vertices corresponding to the gait cycle pattern recognition model, identify the vertex A with the largest value and the vertex B with the smallest value. If the difference between the values of vertex A and vertex B corresponding to the gait cycle pattern recognition model is less than a preset convergence accuracy, it is determined that the optimization goal has been achieved and the minimum value of the gait cycle pattern recognition model corresponds to the value of vertex B. Otherwise, proceed to step S04.
[0010] S04: determining a reflection point at a preset position on the side of the center of gravity C away from the vertex A, where the coordinates of the center of gravity C are the arithmetic mean of the coordinates of the other vertices of the simplex except the vertex A;
[0011] S05: When the reflection point is on or within the boundary of the hypercube φ corresponding to the constraint condition, and the value of the reflection point with respect to the gait cycle pattern recognition model is less than the value of vertex B, an extension point is found on the boundary of the hypercube φ, and the direction from the extension point to the reflection point points to vertex A;
[0012] S06: If the value of the gait cycle pattern recognition model at the extension point is less than the value of the reflection point, the vertex A of the simplex is replaced with the extension point to form a new simplex, and then return to step S03 to start a new round of optimization cycle until the optimization goal is achieved;
[0013] S07: If the value of the gait cycle pattern recognition model at the extension point is greater than or equal to the value of the reflection point, the vertex A of the simplex is replaced with the reflection point to form a new simplex, and then return to step S03 to start a new round of optimization cycle until the optimization goal is achieved.
[0014] Furthermore, in the gait cycle pattern recognition model optimization method in the present application, the variables to be optimized with preset constraints include the sliding window size and the signal sparsity.
[0015] Furthermore, in the gait cycle pattern recognition model optimization method of the present application, if the number of optimization cycles reaches a preset upper limit, it is determined that the optimization goal is achieved.
[0016] Furthermore, in the gait cycle pattern recognition model optimization method of the present application, if the reflection point in step S04 is outside the boundary of the hypercube φ, the reflection point is shrunk toward the center of gravity C according to a preset rule until the reflection point is within or at the boundary of the hypercube φ.
[0017] Furthermore, in the gait cycle pattern recognition model optimization method of the present application, if the reflection point in step S04 is at or within the boundary of the hypercube φ but the value of the reflection point with respect to the gait cycle pattern recognition model is not less than the value of vertex B, step S08 is executed: determining the number of vertices with a value greater than the value of the reflection point in the gait cycle pattern recognition model, and if the number is greater than 1, step S09 is executed; otherwise, step S10 is executed;
[0018] Step S09: Replace vertex A with the reflection point, and return to step S03 to start a new round of optimization cycle until the optimization goal is achieved;
[0019] Step S10: determining whether the value of the reflection point in the gait cycle pattern recognition model is less than the value of vertex A; if so, executing step S11; otherwise, executing step S12;
[0020] Step S11: shrink the reflection point toward the center of gravity C to form a low shrinkage point, replace vertex A with the low shrinkage point to form a new simplex, and then return to step S03 to start a new round of optimization cycle until the optimization goal is achieved;
[0021] Step S12: confirm that a point between vertex A and center of gravity C is a high contraction point, and determine whether the gait cycle pattern recognition model value of the high contraction point is less than the value of vertex A. If so, proceed to step S13; otherwise, proceed to step S14;
[0022] Step S13: Replace vertex A with the high contraction point to form a new simplex, and then return to step S03 to start a new round of optimization cycle until the optimization goal is achieved;
[0023] Step S14: shrink all vertices toward vertex B to form a new simplex, and then return to step S03 to start a new round of optimization cycle until the optimization goal is achieved;
[0024] Furthermore, the gait cycle pattern recognition model optimization method in the present application has a preset rule of shrinking the reflection point toward the center of gravity C, and the shrinkage distance is half of the distance between the reflection point and the center of gravity C.
[0025] Furthermore, in the gait cycle pattern recognition model optimization method in the present application, the low contraction point is the midpoint of the line between the center of gravity C and the reflection point.
[0026] Furthermore, in the gait cycle pattern recognition model optimization method in the present application, the high contraction point is the midpoint of the line between the vertex A and the center of gravity C.
[0027] Furthermore, in the gait cycle pattern recognition model optimization method of the present application, the contraction distance of each vertex in step S14 is half of the distance between the vertex and vertex B.
[0028] Furthermore, the present application provides a computer-readable medium having a computer program stored thereon, which implements the above-mentioned gait cycle pattern recognition model optimization method when executed by a processor.
[0029] Furthermore, the present application provides an exoskeleton power assistance system, including: a gait cycle pattern recognition model, wherein the gait cycle pattern recognition model is optimized by the above-mentioned gait cycle pattern recognition model optimization method.
[0030] It can be seen from the above technical solution that the present invention has the following beneficial effects:
[0031] The gait cycle pattern recognition model optimization method, computer-readable medium, and exoskeleton power-assistance system in this application, when solving and optimizing the gait cycle pattern recognition model, improve the Nelder-Mead algorithm so that both the boundary optimal solution and the internal optimal solution can be searched. Under the condition that the variables to be optimized are constrained, the minimum value of the gait cycle pattern recognition model can be optimized and solved, realizing constrained non-convex non-gradient optimization. The gait cycle pattern recognition model optimization method based on this application is used to solve the hyperparameter optimization problem of the machine learning model, which can make the model after hyperparameter optimization have the best generalization ability. Under the condition that the variables to be optimized are constrained, the gait cycle pattern recognition model can be optimized and solved, improving the model optimization efficiency and enhancing the comfort of the exoskeleton power-assistance device. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 This is a flowchart of a gait cycle pattern recognition model optimization method in one embodiment of the present application;
[0033] Figure 2 Schematic diagram of the principle of the gait cycle pattern recognition model optimization method in one embodiment of the present application. DETAILED DESCRIPTION
[0034] Combine Figure 1 The gait cycle pattern recognition model optimization method applied to the exoskeleton power-assisting system shown includes the following steps:
[0035] S01: According to the gait cycle pattern recognition model, the convergence accuracy and the constraint conditions of the gait cycle pattern recognition model variables are preset;
[0036] S02: Initialize the simplex that meets the variable constraints of the gait cycle pattern recognition model;
[0037] S03: Traverse the vertices of the simplex and, based on the values of all vertices corresponding to the gait cycle pattern recognition model, identify the vertex A with the largest value and the vertex B with the smallest value. If the difference between the values of vertex A and vertex B corresponding to the gait cycle pattern recognition model is less than a preset convergence accuracy, it is determined that the optimization goal has been achieved and the minimum value of the gait cycle pattern recognition model corresponds to the value of vertex B. Otherwise, proceed to step S04.
[0038] S04: Determine the reflection point. The reflection point is determined at a preset position on the side of the center of gravity C away from the vertex A. Specifically, the reflection point is the central symmetric point of the vertex A relative to the center of gravity C. The coordinates of the center of gravity C are the arithmetic mean of the coordinates of the other vertices of the simplex except the vertex A; that is, the center of gravity C is the center of gravity of the hyperpolyhedron formed by the other vertices of the simplex except the vertex A.
[0039] S05: When the reflection point is on or within the boundary of the hypercube φ corresponding to the constraint condition, and the value of the reflection point with respect to the gait cycle pattern recognition model is less than the value of vertex B, an extension point is found on the boundary of the hypercube φ, where the direction from the extension point to the reflection point points to vertex A, that is, the extension point is the intersection point where rays passing through the reflection point and extending away from vertex A intersect on the boundary of the hypercube φ;
[0040] S06: If the value of the gait cycle pattern recognition model at the extension point is less than the value of the reflection point, the vertex A of the simplex is replaced with the extension point to form a new simplex, and then return to step S03 to start a new round of optimization cycle until the optimization goal is achieved;
[0041] S07: If the value of the gait cycle pattern recognition model at the extension point is greater than or equal to the value of the reflection point, the vertex A of the simplex is replaced with the reflection point to form a new simplex, and then return to step S03 to start a new round of optimization cycle until the optimization goal is achieved.
[0042] like Figure 2 In the illustrated embodiment, the simplex has four vertices, A, B, D, and E. Vertex A has the maximum value, and vertex B has the minimum value. C is the centroid of the hyperpolyhedron formed by BDE (i.e., triangle BDE), and the reflection point is labeled P*. The constrained hypercube φ is a regular cube with boundaries corresponding to the grid area.
[0043] The gait cycle pattern recognition model optimization method in this application improves the Nelder-Mead algorithm, allowing both boundary optimal solutions and internal optimal solutions to be searched. Under the condition that the variables of the gait cycle pattern recognition model are constrained, the accuracy of the gait cycle pattern recognition model in finding the minimum value is improved, and constrained non-convex non-gradient optimization is achieved. The gait cycle pattern recognition model optimization method based on this application is used to solve the hyperparameter optimization problem of machine learning models, enabling the model after hyperparameter optimization to have optimal generalization capabilities.
[0044] Furthermore, in the gait cycle pattern recognition model optimization method of this embodiment, if the number of optimization cycles reaches a preset upper limit, it is determined that the optimization goal is achieved.
[0045] Furthermore, in the gait cycle pattern recognition model optimization method of this embodiment, if the reflection point in step S04 is outside the boundary of the hypercube φ, the reflection point is shrunk toward the center of gravity C according to a preset rule until the reflection point is within or at the boundary of the hypercube φ.
[0046] Furthermore, in the gait cycle pattern recognition model optimization method of this embodiment, if the reflection point in step S04 is at or within the boundary of the hypercube φ but the value of the reflection point with respect to the gait cycle pattern recognition model is not less than the value of vertex B, step S08 is executed: the number of vertices having a value greater than the value of the reflection point in the gait cycle pattern recognition model is determined, and if the number is greater than 1, step S09 is executed; otherwise, step S10 is executed;
[0047] Step S09: Replace vertex A with the reflection point, and then return to step S03 to start a new round of optimization cycle until the optimization goal is achieved; because, if the number is greater than 1, it means that although the reflection point is not a new minimum point, after replacing the maximum point with the reflection point, the previous reflection point in the newly constructed simplex will not become a maximum point of the new simplex. In other words, the reflection point will not be changed in the next round of optimization cycle.
[0048] Step S10: Determine whether the value of the reflection point in the gait cycle pattern recognition model is less than the value of vertex A. If so, proceed to step S11; otherwise, proceed to step S12. If there is no more than one reflection point, it indicates that the reflection point is neither the new vertex with the minimum value nor a point with a value greater than all other vertices except the vertex with the maximum value. Therefore, a contraction strategy is needed to improve the original simplex.
[0049] Step S11: shrink the reflection point toward the center of gravity C to form a low shrinkage point, replace vertex A with the low shrinkage point to form a new simplex, and then return to step S03 to start a new round of optimization cycle until the optimization goal is achieved;
[0050] Step S12: confirm that a point between vertex A and center of gravity C is a high contraction point, and determine whether the gait cycle pattern recognition model value of the high contraction point is less than the value of vertex A. If so, proceed to step S13; otherwise, proceed to step S14;
[0051] Step S13: Replace vertex A with the high contraction point to form a new simplex, and then return to step S03 to start a new round of optimization cycle until the optimization goal is achieved;
[0052] Step S14: shrink all vertices toward vertex B to form a new simplex, and then return to step S03 to start a new round of optimization cycle until the optimization goal is achieved;
[0053] Furthermore, in the gait cycle pattern recognition model optimization method in this embodiment, a preset rule is to shrink the reflection point toward the center of gravity C, and the shrinkage distance is half of the distance between the reflection point and the center of gravity C.
[0054] Furthermore, in the gait cycle pattern recognition model optimization method in this embodiment, the low contraction point is the midpoint of the line between the center of gravity C and the reflection point.
[0055] Furthermore, in the gait cycle pattern recognition model optimization method in this embodiment, the high contraction point is the midpoint of the line between the vertex A and the center of gravity C.
[0056] Furthermore, in the gait cycle pattern recognition model optimization method of this embodiment, the contraction distance of each vertex in step S14 is half of the distance between the vertex and vertex B.
[0057] Furthermore, the present application provides a computer-readable medium having a computer program stored thereon, which implements the above-mentioned gait cycle pattern recognition model optimization method when executed by a processor.
[0058] Furthermore, in one embodiment, when applied to a knee exoskeleton assistance system, the gait cycle pattern recognition model optimization method is used to solve the optimal variables of a machine learning model for recognizing gait cycle patterns, solving the optimization problem of variables under constraints such as a sliding window size between 100 and 200 and a signal sparsity between 10% and 20%. The function corresponding to the machine learning model for recognizing gait cycle patterns is as follows:
[0059]
[0060] Among them, the four variables in the gait cycle pattern recognition model H(β, w, q, λ) are: a vector β representing the signal weight; a scalar w representing the sliding window size. In one embodiment, the specific constraint range of w is between 100 and 200, and the unit of w is 5 ms; a scalar q, q divided by p is the sparsity of the signal. In one embodiment, the specific constraint range of the sparsity of the signal is between 10% and 20%; a scalar λ. In one embodiment, the constraint range of λ is between 0 and 1.
[0061] On the right side of the equation, p is the dimension of β; T is the total number of samples; [t, t+w] is the sliding window, t is the starting time of the sliding window, and the window starting position is and is a positive integer not exceeding T / w; r and s are a pair of integers taken from [t, t+w], Y r and Y s They are the human gait labels Y t Specifically, the values at time t=r and time t=s are: at the moment t, the observed leg state is support, then Y t =1, the leg state observed at the current moment t is swinging, then Y t =0.
[0062] Moreover, the function XOR is a logical exclusive OR function. A value of 1 indicates that the logical judgment results before and after the XOR function are opposite, and a value of 0 indicates that the logical judgment results before and after the XOR function are the same. r and X s are p-dimensional vectors X consisting of p state signals related to the knee joint motion state. t Specifically, the values at time t=r and time t=s, specifically, the knee joint motion state signal observed at time t is expressed as: X t =[X 1t ,X 2t ,…,X pt ], component X 1t ... X pt In one embodiment, the signal corresponding to the component specifically includes the magnitude of the linear acceleration of the knee joint along the direction of the gravity line and the magnitude of the angular acceleration of the knee joint along the direction of the gravity line.
[0063] Specifically, β is represented by a p-dimensional column vector, which is expressed as: β=[b1,b2,…,b p ] T , if the component b j If the optimized value of is equal to zero, it means that the jth signal is irrelevant to gait classification; otherwise, it means that it is relevant, and the jth signal and other b j ≠0 signals together to classify gait. jThe total number of signals ≠0 is q and the constraint condition is 0.1≤q / p≤0.2.
[0064] Furthermore, an embodiment provides a computer-readable medium having a computer program stored thereon, which implements the above-mentioned gait cycle pattern recognition model optimization method when executed by a processor.
[0065] Furthermore, an embodiment provides an exoskeleton power assistance system, comprising: a gait cycle pattern recognition model, wherein the gait cycle pattern recognition model is optimized by the above-mentioned gait cycle pattern recognition model optimization method.
[0066] The technical principles of the present invention have been described above in conjunction with specific embodiments. These descriptions are intended solely to illustrate the principles of the present invention and are not to be construed in any way as limiting the scope of protection of the present invention. Based on the explanations herein, those skilled in the art will be able to conceive of other specific embodiments of the present invention without inventive effort, and such embodiments will fall within the scope of protection of the present invention.
Claims
1. A gait cycle pattern recognition model optimization method, characterized by: Applied to the exoskeleton power assist system, including the following steps: S01: Preset the convergence accuracy and constraints of the variables to be optimized according to the gait cycle pattern recognition model; S02: Initialize a simplex that meets the constraints of the variables to be optimized; S03: Traverse the vertices of the simplex and, based on the values of all vertices corresponding to the gait cycle pattern recognition model, identify the vertex A with the largest value and the vertex B with the smallest value. If the difference between the values of vertex A and vertex B is less than a preset convergence accuracy, it is determined that the optimization goal has been achieved and the minimum value of the gait cycle pattern recognition model corresponds to the value of vertex B. Otherwise, proceed to step S04. S04: determining a reflection point at a preset position on the side of the center of gravity C away from the vertex A, where the coordinates of the center of gravity C are the arithmetic mean of the coordinates of the other vertices of the simplex except the vertex A; S05: When the reflection point is on or within the boundary of the hypercube φ corresponding to the constraint condition, and the value of the reflection point with respect to the gait cycle pattern recognition model is less than the value of vertex B, an extension point is found on the boundary of the hypercube φ, and the direction from the extension point to the reflection point points to vertex A; S06: If the value of the gait cycle pattern recognition model at the extension point is less than the value of the reflection point, the vertex A of the simplex is replaced with the extension point to form a new simplex, and then return to step S03 to start a new round of optimization cycle until the optimization goal is achieved; S07: If the value of the gait cycle pattern recognition model at the extension point is greater than or equal to the value of the reflection point, the vertex A of the simplex is replaced with the reflection point to form a new simplex, and then the process returns to step S03 to start a new round of optimization until the optimization goal is achieved; If the reflection point in step S04 is outside the boundary of the hypercube φ, the reflection point is shrunk toward the center of gravity C according to a preset rule until the reflection point is within or at the boundary of the hypercube φ; If the reflection point in step S04 is at or within the boundary of the hypercube φ but the value of the reflection point in the gait cycle pattern recognition model is not less than the value of vertex B, execute step S08: determine the number of vertices that are greater than the value of the reflection point in the gait cycle pattern recognition model, and if the number is greater than 1, execute step S09; otherwise, execute step S10; Step S09: Replace vertex A with the reflection point to form a new simplex, and then return to step S03 to start a new round of optimization cycle until the optimization goal is achieved; Step S10: determining whether the value of the reflection point in the gait cycle pattern recognition model is less than the value of vertex A; if so, executing step S11; otherwise, executing step S12; Step S11: shrink the reflection point toward the center of gravity C to form a low shrinkage point, replace vertex A with the low shrinkage point to form a new simplex, and then return to step S03 to start a new round of optimization cycle until the optimization goal is achieved; Step S12: confirm that a point between vertex A and center of gravity C is a high contraction point, and determine whether the gait cycle pattern recognition model value of the high contraction point is less than the value of vertex A. If so, proceed to step S13; otherwise, proceed to step S14; Step S13: Replace vertex A with the high contraction point to form a new simplex, and then return to step S03 to start a new round of optimization cycle until the optimization goal is achieved; Step S14: Contract all vertices toward vertex B to form a new simplex, and then return to step S03 to start a new round of optimization cycle until the optimization goal is achieved.
2. The gait cycle pattern recognition model optimization method according to claim 1, characterized in that: The variables to be optimized with preset constraints include the sliding window size and signal sparsity.
3. The gait cycle pattern recognition model optimization method according to claim 1, characterized in that: In step S04 , the reflection point is a central symmetric point of the vertex A relative to the center of gravity C.
4. The gait cycle pattern recognition model optimization method according to claim 1, characterized in that: If the number of optimization cycles reaches the preset upper limit, it is determined that the optimization goal has been achieved.
5. The gait cycle pattern recognition model optimization method according to claim 1, characterized in that: The preset rule is to shrink the reflection point toward the center of gravity C, and the shrinkage distance is half the distance between the reflection point and the center of gravity C.
6. The gait cycle pattern recognition model optimization method according to claim 1, characterized in that: The low contraction point is the midpoint of the line between the center of gravity C and the reflection point.
7. The gait cycle pattern recognition model optimization method according to claim 1, characterized in that: The high contraction point is the midpoint of the line between the vertex A and the center of gravity C.
8. The gait cycle pattern recognition model optimization method according to claim 1, characterized in that: In step S14 , the distance that each vertex is shrunk is half the distance between the vertex and vertex B.
9. A computer-readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
10. Exoskeleton power assist system, characterized in that: include: A gait cycle pattern recognition model, wherein the gait cycle pattern recognition model is optimized by the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Aero-engine acceleration process optimal control method based on improved simplex method
CN112943479A
Multi-junction compound battery model parameter optimization method based on simplex-simulated annealing method
CN115600503A