Gait periodic pattern recognition model optimization method, medium and exoskeleton assistance system
Through the improved Nelder-Mead algorithm optimizes the gait cycle pattern recognition model under constraints, the problem of low efficiency of hyperparameter optimization in traditional methods is solved, and the efficient use and comfort of the exoskeleton assist device is achieved.
Patent Information
- Application Number
- CN202510759489.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-06-09
AI Technical Summary
The existing gait cycle pattern recognition model relies on experimental experience during debugging, resulting in poor adaptability and low debugging efficiency. The traditional unconstrained Nelder-Mead algorithm cannot effectively optimize multiple hyperparameters, resulting in a decrease in model promotion capabilities and inference efficiency.
Using the improved Nelder-Mead algorithm, the gait periodic pattern recognition model is optimized under constraints, and the simplex vertex traversal and reflective points, expansion points, and shrinking points are used to find the boundary and internal optimal solutions, and optimize hyperparameters.
It improves the efficiency of model optimization, improves the comfort of the exoskeleton assist device, and ensures that the model has the best promotion ability under constraints.
Smart Images

Figure CN120277374A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of optimization methods for machine learning models of exoskeleton assistance systems, and particularly relates to an optimization method, a medium, and an exoskeleton assistance system for a gait cycle pattern recognition model. Background Art
[0002] In an exoskeleton assistance device, a gait cycle pattern recognition model is used to recognize the gait cycle of a user, such as the support state and swing state of the legs and the corresponding switching cycle. The debugging method of the traditional gait cycle pattern recognition model relies on experimental experience for debugging, which will lead to poor adaptability, low debugging efficiency, and poor comfort when the model is applied to the exoskeleton assistance device after debugging. However, when using machine learning for debugging, the problem is that the existing model optimization methods often simply and roughly use ten-fold or N-fold cross-validation in combination with grid point search to obtain an approximate optimal value of the key hyperparameters for the selection of model hyperparameters. This existing technical method is slow and inaccurate, and simply cannot cope with the optimization of multiple or even dozens or hundreds of hyperparameters. This directly results in the fact that the complex neural networks related to deep learning that have emerged recently often do not optimize the hyperparameters preset as default values in specific application scenarios, such as the number of neural network layers and the number of neurons in each layer of the network. These hyperparameters are easily overlooked by developers and even professional scholars. Since obtaining the network weight coefficients by training complex neural networks has consumed a large amount of computing power space and computing time, they may no longer care about the problems of the model generalization ability and inference efficiency decline caused by changes in hyperparameters. The hyperparameters themselves are non-convex and non-differentiable with respect to the objective function of model verification. Therefore, the most direct method is to use the unconstrained Nelder--Mead algorithm to solve the problem of optimal hyperparameters.
[0003] However, the hyperparameters are within a bounded range, or rather, the entire hyperparameter space is constrained within a hypercube. The optimal hyperparameters can be a point inside this hypercube, that is, an internal optimal solution, or a point on the boundary of the hypercube, that is, a boundary optimal solution. Traditional unconstrained methods, such as the Nelder--Mead algorithm, even if the external solutions of the hypercube that do not meet the constraint conditions are excluded, cannot obtain the boundary optimal solution that falls on a certain face of the hypercube. Therefore, under constraint conditions, especially the constraint conditions of the gait cycle pattern recognition model including the signal sparsity degree and the 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] To overcome the deficiencies of the above-mentioned prior art, the present invention provides an optimization method, medium and exoskeleton assistance system for a gait cycle pattern recognition model, which can optimize and solve the gait cycle pattern recognition model under the condition that the variables to be optimized are constrained, improve the model optimization efficiency, and enhance the comfort of using the exoskeleton assistance device.
[0005] To achieve the above object, the present invention is implemented through the following technical solutions: An optimization method for a gait cycle pattern recognition model applied to an exoskeleton assistance system, comprising the following steps: S01: According to the gait cycle pattern recognition model, preset the convergence accuracy and the constraint conditions of the variables to be optimized; S02: Initialize a simplex that conforms to the constraint conditions of the variables to be optimized; S03: Traverse the vertices of the simplex, and according to the values of the gait cycle pattern recognition model corresponding to all vertices, confirm the vertex A with the largest value and the vertex B with the smallest value. If the difference between the values of the gait cycle pattern recognition model corresponding to vertex A and vertex B is less than the preset convergence accuracy, it is determined that the optimization goal is achieved, and the minimum value of the gait cycle pattern recognition model corresponds to the value of vertex B; otherwise, execute step S04; S04: Determine a reflection point at a preset position on the side of the centroid C far from vertex A. The coordinates of the centroid C are the arithmetic mean of the coordinates of the other vertices of the simplex except vertex A; S05: When the reflection point is on or within the boundary of the hypercube φ corresponding to the constraint conditions, and the value of the reflection point with respect to the gait cycle pattern recognition model is less than the value of vertex B, find an expansion point on the boundary of the hypercube φ. The direction from the expansion point to the reflection point points to vertex A; S06: If the value of the gait cycle pattern recognition model at the expansion point is less than the value of the reflection point, replace vertex A of the simplex with the expansion point to form a new simplex, and then return to step S03 to start a new round of optimization loop until the optimization goal is achieved; S07: If the value of the gait cycle pattern recognition model at the expansion point is greater than or equal to the value of the reflection point, replace vertex A of the simplex with the reflection point to form a new simplex, and then return to step S03 to start a new round of optimization loop until the optimization goal is achieved.
[0006] Further, in the optimization method for the gait cycle pattern recognition model of the present application, the variables to be optimized with preset constraint conditions include the sliding window size and the signal sparsity.
[0007] Further, in the optimization method for the gait cycle pattern recognition model of the present application, if the number of optimization loops reaches the preset upper limit, it is determined that the optimization goal is achieved.
[0008] Further, 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 contracted towards the centroid C according to a preset rule until the reflection point is on or within the boundary of the hypercube φ.
[0009] Further, in the gait cycle pattern recognition model optimization method of the present application, if the reflection point in step S04 is on 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, perform step S08: determine the number of vertices whose values in the gait cycle pattern recognition model are greater than that of the reflection point. If the number is greater than 1, perform step S09; otherwise, perform step S10. Step S09: Replace vertex A with the reflection point, and then return to step S03 to start a new round of optimization loop until the optimization goal is achieved. 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 it is less than the value of vertex A, perform step S11; otherwise, perform step S12. Step S11: Contract the reflection point towards the centroid C to form a low contraction point, replace vertex A with the low contraction point to form a new simplex, and then return to step S03 to start a new round of optimization loop until the optimization goal is achieved. Step S12: Confirm a point between vertex A and the centroid C as a high contraction point, and determine whether the value of the high contraction point in the gait cycle pattern recognition model is less than the value of vertex A. If it is, perform step S13; otherwise, perform 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 loop until the optimization goal is achieved. Step S14: Contract all vertices towards vertex B to form a new simplex, and then return to step S03 to start a new round of optimization loop until the optimization goal is achieved. Further, in the gait cycle pattern recognition model optimization method of the present application, the preset rule is to contract the reflection point towards the centroid C, and the contraction distance is half of the distance between the reflection point and the centroid C.
[0010] Further, in the gait cycle pattern recognition model optimization method of the present application, the low contraction point is the midpoint of the line connecting the centroid C and the reflection point.
[0011] Further, in the gait cycle pattern recognition model optimization method of the present application, the high contraction point is the midpoint of the line connecting vertex A and the centroid C.
[0012] Further, 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.
[0013] Further, the present application provides a computer-readable medium, on which a computer program is stored. When the computer program is executed by a processor, the above gait cycle pattern recognition model optimization method is implemented.
[0014] Further, the present application provides an exoskeleton assistance system, including: a gait cycle pattern recognition model, which is optimized by the above gait cycle pattern recognition model optimization method.
[0015] As can be seen from the above technical solutions, the present invention has the following beneficial effects: In the gait cycle pattern recognition model optimization method, computer-readable medium and exoskeleton assistance system of the present application, when solving and optimizing the gait cycle pattern recognition model, by improving the Nelder-Mead algorithm, 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. Based on the gait cycle pattern recognition model optimization method of the present application to solve the hyperparameter optimization problem of the machine learning model, the model after hyperparameter optimization can have the optimal 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 using the exoskeleton assistance device. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a flowchart of the gait cycle pattern recognition model optimization method in an embodiment of the present application; Figure 2 is a schematic diagram of the principle of the gait cycle pattern recognition model optimization method in an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0017] Combined with Figure 1 The gait cycle pattern recognition model optimization method applied to the exoskeleton assistance system shown, includes the following steps: S01: According to the gait cycle pattern recognition model, preset the convergence accuracy and the constraint conditions of the variables of the gait cycle pattern recognition model; S02: Initialize a simplex that meets the constraint conditions of the variables of the gait cycle pattern recognition model; S03: Traverse the vertices of the simplex. According to the values of the gait cycle pattern recognition model corresponding to all vertices, confirm the vertex A with the largest value and the vertex B with the smallest value. If the difference between the values of the gait cycle pattern recognition model corresponding to vertex A and vertex B is less than the preset convergence accuracy, it is determined that the optimization goal is achieved, and the minimum value of the gait cycle pattern recognition model corresponds to the value of vertex B. Otherwise, execute step S04; S04: Determine the reflection point. Determine the reflection point at a preset position on the side of the centroid C away from the vertex A. Specifically, the reflection point is the central symmetry point of the vertex A with respect to the centroid C, and the coordinates of the centroid C are the arithmetic mean of the coordinates of the other vertices of the simplex except the vertex A; that is, the centroid C is the centroid of the hyperpolyhedron formed by the other vertices of the simplex except the vertex A.
[0018] S05: When the reflection point is on or inside 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 the vertex B, find the expansion point on the boundary of the hypercube φ. The direction from the expansion point to the reflection point points to the vertex A, that is, the expansion point is the intersection point of the ray passing through the reflection point and extending in the direction away from the vertex A and the boundary of the hypercube φ. S06: If the value of the gait cycle pattern recognition model at the expansion point is less than the value of the reflection point, replace the vertex A of the simplex with the expansion point to form a new simplex, and then go back to step S03 to start a new round of optimization loop until the optimization goal is achieved. S07: If the value of the gait cycle pattern recognition model at the expansion point is greater than or equal to the value of the reflection point, replace the vertex A of the simplex with the reflection point to form a new simplex, and then go back to step S03 to start a new round of optimization loop until the optimization goal is achieved.
[0019] As Figure 2 shown in an embodiment, the simplex has four vertices A, B, D, and E. Among the four vertices, the vertex A has the largest value and the vertex B has the smallest value. C is the centroid of the hyperpolyhedron (i.e., the triangle BDE) formed by BDE. The reflection point is marked as P*. The constraint hypercube φ is a regular cube whose boundary corresponds to the grid area.
[0020] The gait cycle pattern recognition model optimization method in this application improves the Nelder--Mead algorithm, enabling 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, it improves the accuracy of solving the minimum value of the gait cycle pattern recognition model, realizes constrained non-convex non-gradient optimization. Solving the hyperparameter optimization problem of the machine learning model based on the gait cycle pattern recognition model optimization method in this application can make the model after hyperparameter optimization have the optimal generalization ability.
[0021] Further, in the gait cycle pattern recognition model optimization method in this embodiment, if the number of optimization loops reaches the preset upper limit, it is determined that the optimization goal is achieved.
[0022] Further, in the gait cycle pattern recognition model optimization method in this embodiment, if the reflection point in step S04 is outside the boundary of the hypercube φ, the reflection point is contracted towards the centroid C according to a preset rule until the reflection point is on or inside the boundary of the hypercube φ.
[0023] Further, in the gait cycle pattern recognition model optimization method of this embodiment, if the reflection point in step S04 is on the boundary of the hypercube φ or within the boundary and the value of the reflection point with respect to the gait cycle pattern recognition model is not less than the value of vertex B, perform step S08: determine the number of vertices whose values are greater than the value of the reflection point in the gait cycle pattern recognition model. If the number is greater than 1, perform step S09; otherwise, perform step S10. Step S09: Replace vertex A with the reflection point, and then return to step S03 to start a new round of optimization loop until the optimization goal is achieved. Because, if the number is greater than 1, it means that although the reflection point is not the new minimum value point, after replacing the maximum value point with the reflection point, the previous reflection point will not become a maximum value point in the newly formed simplex. In other words, the reflection point will not be changed in the next round of optimization loop.
[0024] 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 it is less than the value of vertex A, perform step S11; otherwise, perform step S12. If the number is not greater than one, it means that the reflection point is neither the new vertex with the smallest value nor a bad point whose value is greater than the values of all other vertices except the vertex with the largest value. Then, a contraction strategy needs to be adopted to improve the original simplex.
[0025] Step S11: Contract the reflection point towards the centroid C to form a low contraction point, replace vertex A with the low contraction point, form a new simplex, and then return to step S03 to start a new round of optimization loop until the optimization goal is achieved. Step S12: Confirm a point between vertex A and the centroid C as a high contraction point, and determine whether the value of the high contraction point in the gait cycle pattern recognition model is less than the value of vertex A. If it is, perform step S13; otherwise, perform step S14. Step S13: Replace vertex A with the high contraction point, form a new simplex, and then return to step S03 to start a new round of optimization loop until the optimization goal is achieved. Step S14: Contract all vertices towards vertex B to form a new simplex, and then return to step S03 to start a new round of optimization loop until the optimization goal is achieved. Further, in the gait cycle pattern recognition model optimization method of this embodiment, the preset rule is to contract the reflection point towards the centroid C, and the contraction distance is half of the distance between the reflection point and the centroid C.
[0026] Further, in the gait cycle pattern recognition model optimization method of this embodiment, the low contraction point is the midpoint of the line connecting the centroid C and the reflection point.
[0027] Further, in the gait cycle pattern recognition model optimization method of this embodiment, the high contraction point is the midpoint of the line connecting vertex A and the center of gravity C.
[0028] Further, in the gait cycle pattern recognition model optimization method of this embodiment, the distance by which each vertex contracts in step S14 is half of the distance between the vertex and vertex B.
[0029] Further, the present application provides a computer-readable medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned gait cycle pattern recognition model optimization method is implemented.
[0030] Further, in one embodiment, when applied to a knee exoskeleton assist system, the gait cycle pattern recognition model optimization method is used to solve the optimal variables of the machine learning model for recognizing the gait cycle pattern, and solve the optimization problem of variables under constraint conditions such as the sliding window size being between 100 and 200 and the signal sparsity being between 10% and 20%. The function corresponding to the machine learning model for recognizing the gait cycle pattern is specifically as follows: Among them, the four variables in the gait cycle pattern recognition model H(β, w, q, λ) are, in sequence: the vector β representing the signal weight magnitude; the scalar w representing the sliding window size, and in one embodiment, the specific constraint range of w is between 100 and 200, and the unit of w is 5 ms; the scalar q, and the signal sparsity is q divided by p, and in one embodiment, the specific constraint range of the signal sparsity is between 10% and 20%; the scalar λ, and in one embodiment, the constraint range of λ is between 0 and 1.
[0031] 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 moment of the sliding window, and the starting position of the window while is a positive integer not exceeding T / w; r and s are a pair of integer pairs taken from [t, t + w], and Y r and Y s are respectively the values of the human gait label Y t at the specific moments t = r and t = s, where: if the observed leg state at the current moment t is in the stance phase, then Y t = 1, and if the observed leg state at the current moment t is in the swing phase, then Y t = 0.
[0032] And, the function XOR is the logical exclusive OR function, and the value being 1 indicates that the logical discrimination results before and after the XOR function are opposite, and the value being 0 indicates that the logical discrimination results before and after the XOR function are the same; X r and X sare 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 represents p candidate signals. 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.
[0033] Specifically, β is represented by a p-dimensional column vector, expressed as: β=[b1,b2,…,b p ] T , if the component b j If the optimal 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 are used to classify gait. j The number of signals ≠0 is q and the constraint is 0.1≤q / p≤0.2.
[0034] Furthermore, an embodiment provides a computer-readable medium having a computer program stored thereon, and the computer program, when executed by a processor, implements the above-mentioned gait cycle pattern recognition model optimization method.
[0035] Furthermore, an embodiment 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.
[0036] The technical principles of the present invention are described above in conjunction with specific embodiments. These descriptions are only for explaining the principles of the present invention and cannot be interpreted as limiting the scope of protection of the present invention in any way. Based on the explanations herein, those skilled in the art can associate other specific implementations of the present invention without creative work, and these methods will fall within the scope of protection of the present invention.
Claims
1. Optimization method for gait cycle pattern recognition model, characterized by: Applied to the exoskeleton assistive system, it includes the following steps: S01: Preset the convergence accuracy and the constraint conditions of the variables to be optimized according to the gait cycle pattern recognition model; S02: Initialize a simplex that meets the constraint conditions of the variables to be optimized; S03: Traverse the vertices of the simplex, and according to the values corresponding to all vertices of the gait cycle pattern recognition model, confirm the vertex A with the largest value and the vertex B with the smallest value. If the difference between the values corresponding to vertex A and vertex B is less than the preset convergence accuracy, it is determined that the optimization goal is achieved, and the minimum value of the gait cycle pattern recognition model corresponds to the value of vertex B. Otherwise, execute step S04; S04: Determine the reflection point at a preset position on the side of the center of gravity C away from vertex A. The coordinates of the center of gravity C are the arithmetic mean of the coordinates of the other vertices of the simplex except vertex A; S05: When the reflection point is on or inside the boundary of the hypercube φ corresponding to the constraint conditions, and the value of the reflection point with respect to the gait cycle pattern recognition model is less than the value of vertex B, find the expansion point on the boundary of the hypercube φ. The direction from the expansion point to the reflection point points to vertex A; S06: If the value of the gait cycle pattern recognition model at the expansion point is less than the value of the reflection point, replace vertex A of the simplex with the expansion 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 expansion point is greater than or equal to the value of the reflection point, replace vertex A of the simplex 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; If the reflection point in step S04 is outside the boundary of the hypercube φ, contract the reflection point in the direction of the center of gravity C according to the preset rule until the reflection point is on or inside the boundary of the hypercube φ; If the reflection point in step S04 is on or inside 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, execute step S08: Determine the number of vertices whose values in the gait cycle pattern recognition model are larger than that of the reflection point. 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: Judge whether the value of the reflection point in the gait cycle pattern recognition model is less than the value of vertex A. If it is less than the value of vertex A, execute step S11, otherwise execute step S12; Step S11: Contract the reflection point in the direction of the center of gravity C to form a low contraction point, replace vertex A with the low 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 S13: Confirm a point between vertex A and the center of gravity C as the high contraction point, and judge whether the value of the high contraction point in the gait cycle pattern recognition model is less than the value of vertex A. If it is, execute step S13, otherwise execute step S14; Step S13: Replace vertex A with a high contraction point to form a new simplex, and then return to step S03 to start a new round of optimization loop until the optimization goal is achieved; Step S14: Contract all vertices in the direction of vertex B to form a new simplex, and then return to step S03 to start a new round of optimization loop 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 under the preset constraint conditions include the sliding window size and the 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 the central symmetry point of vertex A with respect to the centroid C.
4. The gait cycle pattern recognition model optimization method according to claim 1, characterized in that: If the number of optimization loops reaches the preset upper limit, it is determined that the optimization goal is achieved.
5. The gait cycle pattern recognition model optimization method according to claim 1, characterized in that: The preset rule is to contract the reflection point in the direction of the centroid C, and the contraction distance is half of the distance between the reflection point and the centroid 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 connecting the centroid 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 connecting vertex A and the centroid C.
8. The gait cycle pattern recognition model optimization method according to claim 1, characterized in that: In step S14, the contraction distance of each vertex is half of 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, it implements the method described in any one of claims 1 to 8.
10. Exoskeleton assistive system, characterized in that, Including: A gait cycle pattern recognition model, which is optimized by the method described in 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
Four-axis unmanned aerial vehicle fractional order PID controller parameter design method
CN118192656A
A device for controlling the motion of a simplex in parameter space
RU207204U1