A current PID controller optimization method for walking rehabilitation device

By improving the evolutionary mating algorithm and improving the optimization capability of PID controller parameters, the problem of existing PID controller poor performance in complex systems is solved, and more efficient and stable current control effect is achieved.

CN119045318BActive Publication Date: 2025-02-25BEIHUA UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411528296.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-25
Estimated Expiration
2044-10-30

AI Technical Summary

Technical Problem

Existing PID controllers perform poorly in complex or strong nonlinear systems, making it difficult to find suitable combinations of Kp, Ki, and Kd parameters, resulting in unstable control effects.

Method used

Improve the evolutionary mating algorithm, improve allelic parameters by introducing the target fitness value, current fitness value and maximum fitness value of the current iterative offspring individuals, and introduce a weighted random search strategy in the algorithm development stage to improve the algorithm's Global search capabilities and local search capabilities.

Benefits of technology

The optimization accuracy and response speed of the algorithm are improved, the possibility of falling into local optimality is reduced, the parameters of the current PID controller of the walking rehabilitator are optimized, and the accuracy and stability of current control are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119045318B_ABST
    Figure CN119045318B_ABST
Patent Text Reader

Abstract

The present invention proposes an optimization method for a current PID controller for a walking rehabilitation apparatus, which belongs to the field of PID control optimization, and has the following specific steps: S1, converting the current control of the walking rehabilitation apparatus into a mathematical model to be optimized; S2, constructing a PID control system of the walking rehabilitation apparatus; S3, improving an evolutionary mating algorithm, including: S31, improving an allele parameter p by introducing a fitness value to obtain a new parameter a; S32, improving a progeny update mathematical model in an algorithm development phase by introducing random individuals and weights w; S4, performing parameter tuning on a current PID controller in a PID control system of a walking rehabilitation apparatus by using an improved evolutionary mating algorithm; S5, setting three optimal control parameters obtained by optimizing by using the improved evolutionary mating algorithm as parameters of a current PID controller in a PID control system of a walking rehabilitation apparatus, and optimizing the current control effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of PID control optimization, and in particular relates to a current PID controller optimization method for a walking rehabilitation device. Background Art

[0002] Walking rehabilitation equipment mainly promotes the recovery of patients' motor functions through electrical stimulation technology. The principle is to use electrodes to stick to the patient's muscles or nerves, and simulate nerve signals by sending out electric pulses of specific frequency and intensity, thereby inducing muscle contraction; this electrical stimulation can effectively activate muscles, improve muscle strength and endurance, promote blood circulation, and reduce muscle atrophy; in walking rehabilitation, the instrument is usually equipped with sensors to monitor the patient's movement status in real time and adjust the parameters of electrical stimulation based on feedback; in this way, patients can obtain moderate electrical stimulation during walking training, thereby improving the exercise effect; electrical stimulation can also reduce pain, increase the enthusiasm for exercise, and make patients more proactive in the rehabilitation process; the control of current is the most important part of the walking rehabilitation equipment. Controlling the current through a current PID controller can ensure the stability and accuracy of the current.

[0003] PID controller is one of the most widely used controllers in feedback control systems. It adjusts the system output through three core parameters: proportional, integral and differential to ensure that the predetermined target value is reached. With its simple structure and stable performance, PID controller is widely used in industrial automation and control systems. However, accurately finding a suitable combination of Kp, Ki, and Kd parameters often requires rich practical experience and multiple debugging, especially when facing complex or strongly nonlinear systems, the performance of PID controller may be limited. In order to solve this problem, the intelligent optimization algorithm is used to automatically adjust the PID parameters, which can not only effectively find the optimal parameter value, but also significantly improve the performance and applicability of the controller.

[0004] Evolutionary mating algorithm (EMA) is an evolutionary algorithm for solving constrained optimization problems. It generates new offspring through random mating concepts and crossover indexes, and also considers the influence of environmental factors as an exploration mechanism. Applying the evolutionary mating algorithm to the optimization of PID controller can effectively improve the performance of PID controller, but the evolutionary mating algorithm is prone to fall into the local optimal solution and has poor stability in the face of complex optimization scenarios. Summary of the invention

[0005] The purpose of the present invention is to improve the global search capability of the algorithm in the early stage and the local search capability in the later stage during the optimization process by improving the evolutionary mating algorithm, increase the coverage of the search space, reduce the possibility of falling into the local optimum, thereby improving the optimization accuracy and response speed of the algorithm, and optimize the control parameters of the current PID controller of the walking rehabilitation device by improving the evolutionary mating algorithm, improve the accuracy and stability of the current control, and reduce the adverse effects of dynamic errors on the control effect during the parameter setting process.

[0006] To achieve the above object, the present invention adopts a current PID controller optimization method for a walking rehabilitation device, and the specific steps are as follows.

[0007] S1. Determine the optimization target of the current control of the walking rehabilitation device, and convert the current control of the walking rehabilitation device into a mathematical model to be optimized.

[0008] S2. Construct a PID control system for a walking rehabilitation device. The PID control system includes a target current input module, an error calculation module, a current PID controller module, an improved evolutionary mating algorithm module, a current signal control module, a current generator module, and a current sensor module.

[0009] S3. Improve the evolutionary mating algorithm. The specific improvement strategy is:

[0010] S31, by introducing the target fitness value, current fitness value and maximum fitness value of the offspring individual of the current iteration, the allele parameter p is improved to obtain a new parameter a, and the offspring update mathematical model of the exploration phase of the evolutionary mating algorithm is improved;

[0011] S32. By introducing random individuals and weights w, a weighted random search strategy is used to improve the offspring update mathematical model in the development stage of the evolutionary mating algorithm.

[0012] S4. The improved evolutionary mating algorithm is used to adjust the parameters of the current PID controller in the PID control system of the walking rehabilitation device, and the optimal control parameters Kp, Ki, and Kd are obtained through algorithm optimization.

[0013] S5. The three best control parameters obtained by optimizing the improved evolutionary mating algorithm are set as the parameters of the current PID controller in the PID control system of the walking rehabilitation device to optimize the current control effect.

[0014] Preferably, S1 determines the optimization target of the current control of the walking rehabilitation apparatus, including: first, the current of the walking rehabilitation apparatus should minimize the total energy consumption in the entire rehabilitation process to improve the energy efficiency of the system; second, the operation of the walking rehabilitation apparatus requires that the current can remain stable to provide continuous and smooth power support, thereby ensuring the stability of the equipment operation and improving the user's rehabilitation effect.

[0015] Preferably, the mathematical model to be optimized includes an objective function model and a control model. The objective function model is used to describe the performance indicators that are desired to be achieved, including: minimization of energy consumption, current accuracy, comfort and response time. The objective function model is:

[0016] ;

[0017] In the formula, min represents the minimum function, is the optimization objective function, where u is the control input, is the energy consumption function, usually expressed as the integral of the input power or the average power, is the expected current at the i-th moment, is the actual current, which depends on the control signal u, is the response time of the system, which is usually related to the smoothness of the current control, w1, w2, w3 are weighting coefficients used to balance the relative importance of various objectives, and N is the total system time.

[0018] Preferably, the control model describes the dynamic behavior of the system, and uses a current PID controller to achieve current control of the walking rehabilitation device. The control model is:

[0019] ;

[0020] In the formula, is the control input at the kth second, that is, the input current value, is the current error at the kth second, is the current error at the k-1th second, that is, the current error at the previous moment, Kp, Ki, Kd are the proportional, integral, and differential control parameters respectively, and i is the integral coefficient.

[0021] Preferably, the PID control system of the walking rehabilitation device described in S2 first inputs the target current value into the PID control system, then inputs the actual current value detected by the current sensor module and the target current value into the error calculation module, inputs the calculated error into the current PID controller module and optimizes it through the improved evolutionary mating algorithm module to obtain a reference current value, the current signal control module receives the reference current value to generate a control signal, and then controls the current generator module to output current, thereby realizing the control of the current of the walking rehabilitation device.

[0022] Preferably, in S31, the target fitness value, current fitness value and maximum fitness value of the offspring individual of the current iteration are introduced to improve the allele parameter p to obtain a new allele parameter a. The improved mathematical model of offspring update in the exploration phase of the evolutionary mating algorithm is:

[0023] (1);

[0024] (2);

[0025] (3);

[0026] (4);

[0027] in, is the new offspring generated in the Tth iteration, a and q are the alleles inherited from the father and mother respectively, q=1-a, For the selected male individuals, For the selected female individuals, is the mating success rate, r is a random value between 1 and 3, is a parameter to control the adjustment range, and its value is 2. Generates the current fitness value of the new offspring for the current iteration, Generate the target fitness value of the new offspring for the current iteration, Generate the maximum fitness value of the new offspring for the current iteration, is the new offspring generated at the T+1th iteration, is the new offspring generated by the j-th dimension in the T-th iteration, is the optimal solution of the current iteration, K is the crossover probability, is the preset value of the crossover probability, and d is the dimension of the algorithm problem, which is 3.

[0028] Preferably, the original allele parameter p determines the inheritance of the offspring to the parents. The original value is a random number between 1 and 3, which will lead to insufficient local search ability of the basic evolutionary mating algorithm and easy to fall into the local optimum. By introducing the target fitness value, current fitness value and maximum fitness value of the current iterative offspring individual, the allele parameter p is improved to obtain a new allele parameter a, and the new allele parameter a is used in the offspring update mathematical model in the algorithm exploration phase, as shown in formulas (1)-(3). The algorithm can make timely adjustments when it deviates from the target by comparing the current fitness with the target fitness, thereby promoting convergence to the ideal solution. Secondly, the search step size is flexibly adjusted according to the fitness of the individual, so that individuals with lower fitness perform fine search with small steps, while individuals with higher fitness perform global exploration with large steps, increasing the possibility of jumping out of the local optimal solution, thereby balancing global search and local development.

[0029] Preferably, in S32, random individuals and weights w are introduced to improve the offspring update mathematical model in the development phase of the evolutionary mating algorithm using a weighted random search strategy, and the improved offspring update mathematical model is:

[0030] (5);

[0031] in, is the new offspring generated at the T+1th iteration, w is the weight coefficient, and its value is 0.6. is the optimal solution of the current iteration, d is the dimension of the algorithm problem, are randomly selected individuals.

[0032] Preferably, the original mathematical model for offspring update in the development phase of the basic evolutionary mating algorithm is: The disadvantage is that the algorithm is prone to over-reliance on the optimal solution and lacks diversity. By introducing random individuals and weights w, a weighted random search strategy is used to improve the mathematical model of offspring update in the development stage of the evolutionary mating algorithm. As shown in formula (5), the algorithm can effectively improve the convergence speed while maintaining the quality of the solution by combining the optimal solution and the random solution. For complex or high-dimensional problems, the random component can help better search for potential excellent solutions and has stronger adaptability.

[0033] Preferably, the specific steps of using the improved evolutionary mating algorithm to perform parameter tuning on the current PID controller in the walking rehabilitation device PID control system in S4, and obtaining the optimal control parameters Kp, Ki, and Kd by optimizing the algorithm are:

[0034] S41. Simulate the working condition of the PID control system of the walking rehabilitation device and design the transfer function to describe the dynamic characteristics of the system;

[0035] S42, giving an input of the PID control system of the walking rehabilitation apparatus, the input being a target current value;

[0036] S43, encoding the parameters Kp, Ki, and Kd of the walking rehabilitation apparatus current PID controller as a solution of the improved evolutionary mating algorithm search space, and as the algorithm is iterated, the updated population individual positions reflect the corresponding parameters of the walking rehabilitation apparatus current PID controller;

[0037] S44, initializing the parameters of the improved evolutionary mating algorithm, including the population size N of the algorithm, the problem dimension d, the maximum number of iterations Max_iteration, the upper limit ub and the lower limit lb of the search space;

[0038] S45, calculating the individual fitness values ​​of the current iteration population according to the fitness function, recording the minimum fitness value, and comparing it with the optimal fitness value of the population in the previous iteration, and retaining the optimal fitness value;

[0039] S46, simulating the optimization process of each stage of the improved evolutionary mating algorithm, that is, updating the Kp, Ki, and Kd parameters of the PID controller of the walking rehabilitation device;

[0040] S47. If the updated population individual is better than the last iteration, keep the current optimal solution. ;

[0041] S48. Determine whether the current number of iterations has reached the maximum number of iterations. If so, exit the loop, output the global optimal solution of the algorithm search space, and assign it to the walking rehabilitation device current PID controller as the three parameters Kp, Ki, and Kd. Otherwise, return to execute S42.

[0042] Preferably, in S41, the working condition of the PID control system of the walking rehabilitation device is simulated, and a transfer function is designed to describe the dynamic characteristics of the system; the transfer function formula is:

[0043] ;

[0044] Where s represents the complex frequency domain variable in Laplace transform.

[0045] Preferably, in S43, the parameters Kp, Ki, and Kd of the walking rehabilitation apparatus current PID controller are encoded as a solution of the improved evolutionary mating algorithm search space. As the algorithm is iterated, the positions of the individuals in the population are updated, that is, the solution of the algorithm search space is updated, that is, the parameters of the walking rehabilitation apparatus current PID controller are updated. The encoding vector is:

[0046] ;

[0047] Where x is the encoding vector, i.e., the solution of the search space of the improved evolutionary mating algorithm, and Kp, Ki, and Kd are the proportional parameter, integral parameter, and differential parameter of the current PID controller of the walking rehabilitation device, respectively.

[0048] Preferably, in S45, the individual fitness value of the current iteration population is calculated according to the fitness function, and the fitness function formula is:

[0049] ;

[0050] In the formula, J represents the fitness value, represents the target output value at time t, represents the actual output value at time t, and T represents the total running time of the system.

[0051] Preferably, the optimization process of each stage of the improved evolutionary mating algorithm is simulated in S46, and the specific steps are:

[0052] Step 1, simulation algorithm exploration phase, by introducing the target fitness value, current fitness value and maximum fitness value of the current iteration offspring individual, the allele parameter p is improved to obtain the new allele parameter a, the offspring update mathematical model of the evolutionary mating algorithm exploration phase is improved, and formulas (1)-(4) are executed;

[0053] Step 2: Simulate the algorithm development phase. By introducing random individuals and weights w, a weighted random search strategy is used to improve the offspring update mathematical model in the evolutionary mating algorithm development phase and execute formula (5).

[0054] By adopting the above technical scheme, the beneficial effects of the present invention are as follows: by introducing the fitness value, improving the allele parameter p and introducing a weighted random search strategy to improve the evolutionary mating algorithm in the algorithm development stage, the accuracy and performance of the algorithm are improved; the improved evolutionary mating algorithm is used to perform parameter tuning on the current PID controller in the walking rehabilitation device PID control system, and the optimal control parameters Kp, Ki, and Kd are obtained through algorithm optimization. The three optimal control parameters are set as the parameters of the current PID controller in the walking rehabilitation device PID control system to optimize the current control effect, thereby better exerting the effect of the walking rehabilitation device. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 It is a flow chart of a current PID controller optimization method for a walking rehabilitation device;

[0056] Figure 2 This is the PID control system model diagram of the walking rehabilitation device;

[0057] Figure 3 A fitness value comparison curve chart of the basic evolutionary mating algorithm and the improved evolutionary mating algorithm;

[0058] Figure 4 The process diagram of optimizing the parameter value Kp for the basic evolutionary mating algorithm and the improved evolutionary mating algorithm;

[0059] Figure 5 The process diagram of optimizing the parameter value Ki for the basic evolutionary mating algorithm and the improved evolutionary mating algorithm;

[0060] Figure 6 The process diagram of optimizing the parameter value Kd for the basic evolutionary mating algorithm and the improved evolutionary mating algorithm;

[0061] Figure 7 This is a comparison chart of the PID control effects optimized by the basic evolutionary mating algorithm and the improved evolutionary mating algorithm. DETAILED DESCRIPTION

[0062] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention.

[0063] The present invention provides a technical solution: a current PID controller optimization method for a walking rehabilitation device, specifically comprising the following steps: Figure 1 shown.

[0064] S1. Determine the optimization target of the current control of the walking rehabilitation device, and convert the current control of the walking rehabilitation device into a mathematical model to be optimized.

[0065] Furthermore, the mathematical model to be optimized includes an objective function model and a control model. The objective function model is used to describe the performance indicators that are expected to be achieved, including: minimization of energy consumption, current accuracy, comfort and response time. The objective function model is:

[0066] ;

[0067] In the formula, min represents the minimum function, is the optimization objective function, where u is the control input, is the energy consumption function, usually expressed as the integral of the input power or the average power, is the expected current at the i-th moment, is the actual current, which depends on the control signal u, is the response time of the system, which is usually related to the smoothness of the current control, w1, w2, w3 are weighting coefficients used to balance the relative importance of various objectives, and N is the total system time.

[0068] Furthermore, the control model describes the dynamic behavior of the system, and uses the current PID controller to realize the current control of the walking rehabilitation device. The control model is:

[0069] ;

[0070] In the formula, is the control input at the kth second, that is, the input current value, is the current error at the kth second, is the current error at the k-1th second, that is, the current error at the previous moment, Kp, Ki, Kd are the proportional, integral, and differential control parameters respectively, and i is the integral coefficient.

[0071] S2. Construct a PID control system for a walking rehabilitation device. The PID control system includes a target current input module, an error calculation module, a current PID controller module, an improved evolutionary mating algorithm module, a current signal control module, a current generator module, and a current sensor module. The model diagram is shown in FIG. Figure 2 shown.

[0072] Furthermore, the PID control system of the walking rehabilitation device described in S2 first inputs the target current value into the PID control system, then inputs the actual current value detected by the current sensor module and the target current value into the error calculation module, inputs the calculated error into the current PID controller module and optimizes it through the improved evolutionary mating algorithm module to obtain a reference current value, and the current signal control module receives the reference current value to generate a control signal, thereby controlling the current generator module to output current, thereby realizing the control of the current of the walking rehabilitation device.

[0073] S3. Improve the evolutionary mating algorithm. The specific improvement strategy is:

[0074] S31, by introducing the target fitness value, current fitness value and maximum fitness value of the offspring individual of the current iteration, the allele parameter p is improved to obtain a new parameter a, and the offspring update mathematical model of the exploration phase of the evolutionary mating algorithm is improved;

[0075] S32. By introducing random individuals and weights w, a weighted random search strategy is used to improve the offspring update mathematical model in the development stage of the evolutionary mating algorithm.

[0076] Furthermore, S31 improves the allele parameter p by introducing the target fitness value, current fitness value and maximum fitness value of the offspring individual of the current iteration to obtain a new allele parameter a. The improved mathematical model of offspring update in the exploration phase of the evolutionary mating algorithm is:

[0077] (1);

[0078] (2);

[0079] (3);

[0080] (4);

[0081] in, is the new offspring generated in the Tth iteration, a and q are the alleles inherited from the father and mother respectively, q=1-a, For the selected male individuals, For the selected female individuals, is the mating success rate, r is a random value between 1 and 3, is a parameter to control the adjustment range, and its value is 2. Generates the current fitness value of the new offspring for the current iteration, Generate the target fitness value of the new offspring for the current iteration, Generate the maximum fitness value of the new offspring for the current iteration, is the new offspring generated at the T+1th iteration, is the new offspring generated by the j-th dimension in the T-th iteration, is the optimal solution of the current iteration, K is the crossover probability, is the preset value of the crossover probability, and d is the dimension of the algorithm problem, which is 3.

[0082] Furthermore, in S32, by introducing random individuals and weights w, a weighted random search strategy is used to improve the offspring update mathematical model in the development phase of the evolutionary mating algorithm. The improved offspring update mathematical model is:

[0083] (5);

[0084] in, is the new offspring generated at the T+1th iteration, w is the weight coefficient, and its value is 0.6. is the optimal solution of the current iteration, d is the dimension of the algorithm problem, are randomly selected individuals.

[0085] S4. Parameter tuning of the current PID controller in the PID control system of the walking rehabilitation device is performed using the improved evolutionary mating algorithm. The optimal control parameters Kp, Ki, and Kd are obtained through algorithm optimization. The specific steps are as follows:

[0086] S41. Simulate the working condition of the PID control system of the walking rehabilitation device and design the transfer function to describe the dynamic characteristics of the system;

[0087] S42, giving an input of the PID control system of the walking rehabilitation apparatus, the input being a target current value;

[0088] S43, encoding the parameters Kp, Ki, and Kd of the walking rehabilitation apparatus current PID controller as a solution of the improved evolutionary mating algorithm search space, and as the algorithm is iterated, the updated population individual positions reflect the corresponding parameters of the walking rehabilitation apparatus current PID controller;

[0089] S44, initializing the parameters of the improved evolutionary mating algorithm, including the population size N of the algorithm, the problem dimension d, the maximum number of iterations Max_iteration, the upper limit ub and the lower limit lb of the search space;

[0090] S45, calculating the individual fitness values ​​of the current iteration population according to the fitness function, recording the minimum fitness value, and comparing it with the optimal fitness value of the population in the previous iteration, and retaining the optimal fitness value;

[0091] S46, simulating the optimization process of each stage of the improved evolutionary mating algorithm, that is, updating the Kp, Ki, and Kd parameters of the PID controller of the walking rehabilitation device;

[0092] S47. If the updated population individual is better than the last iteration, keep the current optimal solution. ;

[0093] S48. Determine whether the current number of iterations has reached the maximum number of iterations. If so, exit the loop, output the global optimal solution of the algorithm search space, and assign it to the walking rehabilitation device current PID controller as the three parameters Kp, Ki, and Kd. Otherwise, return to execute S42.

[0094] Furthermore, in S41, the working condition of the walking rehabilitation device PID control system is simulated, and a transfer function is designed to describe the dynamic characteristics of the system; the transfer function formula is:

[0095] ;

[0096] Where s represents the complex frequency domain variable in Laplace transform.

[0097] Furthermore, in S43, the parameters Kp, Ki, and Kd of the walking rehabilitation device current PID controller are encoded as the solution of the improved evolutionary mating algorithm search space. As the algorithm is iterated, the positions of the individuals in the population are updated, that is, the solution of the algorithm search space is updated, that is, the parameters of the walking rehabilitation device current PID controller are updated. The encoding vector is:

[0098] ;

[0099] Where x is the encoding vector, i.e., the solution of the search space of the improved evolutionary mating algorithm, and Kp, Ki, and Kd are the proportional parameter, integral parameter, and differential parameter of the current PID controller of the walking rehabilitation device, respectively.

[0100] Furthermore, in S45, the individual fitness value of the current iteration population is calculated according to the fitness function, and the fitness function formula is:

[0101] ;

[0102] In the formula, J represents the fitness value, represents the target output value at time t, represents the actual output value at time t, and T represents the total running time of the system.

[0103] Furthermore, in S46, the optimization process of each stage of the improved evolutionary mating algorithm is simulated, and the specific steps are as follows:

[0104] Step 1, simulation algorithm exploration phase, by introducing the target fitness value, current fitness value and maximum fitness value of the current iteration offspring individual, the allele parameter p is improved to obtain the new allele parameter a, the offspring update mathematical model of the evolutionary mating algorithm exploration phase is improved, and formulas (1)-(4) are executed;

[0105] Step 2: Simulate the algorithm development phase. By introducing random individuals and weights w, a weighted random search strategy is used to improve the offspring update mathematical model in the evolutionary mating algorithm development phase and execute formula (5).

[0106] S5. The three best control parameters obtained by optimizing the improved evolutionary mating algorithm are set as the parameters of the current PID controller in the PID control system of the walking rehabilitation device to optimize the current control effect.

[0107] In order to verify the current PID controller optimization method for walking rehabilitation device proposed in the present invention, the present invention conducts simulation experiments through Matlab and Simulink to compare the PID control optimization of the improved evolutionary mating algorithm and the basic evolutionary mating algorithm. First, the mathematical model of the evolutionary mating algorithm is improved through Matlab, and the PID control system model of the walking rehabilitation device is established through Simulink; the parameters of the improved evolutionary mating algorithm are initialized, including the population size N=50 of the algorithm, the problem dimension d=3, the maximum number of iterations Max_iteration=30, the upper limit ub=1 of the search space, and the lower limit lb=0; the Matlab program is run to obtain the fitness value comparison curve of the basic evolutionary mating algorithm and the improved evolutionary mating algorithm, as shown in FIG. Figure 3 As shown in the figure, the improved evolutionary mating algorithm reaches the optimal fitness value of 15.76 at about the 23rd iteration. Compared with the basic evolutionary mating algorithm, it has better optimization accuracy and faster convergence speed, which can better improve the control performance of the PID control system of the walking rehabilitation device, thereby achieving better rehabilitation effect.

[0108] Furthermore, if Figure 4-6 As shown in the figure, the improved evolutionary mating algorithm and the basic evolutionary mating algorithm are used to adjust the parameters of the current PID controller in the walking rehabilitation device PID control system. The optimal PID control parameters obtained by the improved algorithm are Kp=0.174, Ki=0.157, Kd=0.172, and the optimal PID control parameters obtained by the basic algorithm are Kp=0.188, Ki=0.175, Kd=0.303; the optimal control parameters are input into the current PID controller of the walking rehabilitation device, and the optimal control effect of the walking rehabilitation device PID control system is obtained; Figure 7 The comparison chart of the optimization effect of PID control by basic evolutionary mating algorithm and improved evolutionary mating algorithm is shown in Figure 2. The target input value is set to 1 unit. Figure 7 It can be seen that the overshoot of the PID control response curve optimized by the improved evolutionary mating algorithm is lower and the response speed is faster. Compared with the parameters of the PID control optimized by the basic evolutionary mating algorithm, it is better and has a better effect on the PID control of the walking rehabilitation device. It can make the current of the walking rehabilitation device quickly reach a stable state, and can quickly respond to the state changes of the patient when walking and adjust the output in time, thereby improving the safety and efficiency of the rehabilitation process and improving the rehabilitation effect.

Claims

1. A current PID controller optimization method for a walking rehabilitation device, characterized in that: The specific steps are: S1, determining the optimization target of the current control of the walking rehabilitation apparatus, and converting the current control of the walking rehabilitation apparatus into a mathematical model to be optimized; S2, constructing a PID control system of a walking rehabilitation apparatus, wherein the PID control system includes a target current input module, an error calculation module, a current PID controller module, an improved evolutionary mating algorithm module, a current signal control module, a current generator module, and a current sensor module; S3. Improve the evolutionary mating algorithm. The specific improvement strategy is: S31, by introducing the target fitness value, current fitness value and maximum fitness value of the offspring individual of the current iteration, the allele parameter p is improved to obtain a new parameter a, and the offspring update mathematical model of the exploration phase of the evolutionary mating algorithm is improved. The improved mathematical model is: (1); (2); (3); (4); in, is the new offspring generated in the Tth iteration, a and q are the alleles inherited from the father and mother respectively, q=1-a, For the selected male individuals, For the selected female individuals, is the mating success rate, r is a random value between 1 and 3, is a parameter to control the adjustment range, and its value is 2. Generates the current fitness value of the new offspring for the current iteration, Generate the target fitness value of the new offspring for the current iteration, Generate the maximum fitness value of the new offspring for the current iteration, is the new offspring generated at the T+1th iteration, is the new offspring generated by the j-th dimension in the T-th iteration, is the optimal solution of the current iteration, K is the crossover probability, is the preset value of the crossover probability, d is the algorithm problem dimension, and its value is 3; S32. By introducing random individuals and weights w, a weighted random search strategy is used to improve the offspring update mathematical model in the development phase of the evolutionary mating algorithm. The improved mathematical model is: (5); in, is the new offspring generated at the T+1th iteration, w is the weight coefficient, and its value is 0.

6. is the optimal solution of the current iteration, d is the dimension of the algorithm problem, are randomly selected individuals; S4, using the improved evolutionary mating algorithm to perform parameter tuning on the current PID controller in the walking rehabilitation device PID control system, and obtaining the best control parameters Kp, Ki, and Kd through algorithm optimization; S5. The three best control parameters obtained by optimizing the improved evolutionary mating algorithm are set as the parameters of the current PID controller in the PID control system of the walking rehabilitation device to optimize the current control effect.

2. The current PID controller optimization method for a walking rehabilitation device according to claim 1, characterized in that: The PID control system of the walking rehabilitation device described in S2 first inputs the target current value into the PID control system, then inputs the actual current value detected by the current sensor module and the target current value into the error calculation module, inputs the calculated error into the current PID controller module and optimizes it through the improved evolutionary mating algorithm module to obtain a reference current value, and the current signal control module receives the reference current value to generate a control signal, thereby controlling the current generator module to output current, thereby realizing the control of the current of the walking rehabilitation device.

3. The current PID controller optimization method for a walking rehabilitation device according to claim 2, characterized in that: The specific steps of using the improved evolutionary mating algorithm to adjust the parameters of the current PID controller in the walking rehabilitation device PID control system and obtaining the best control parameters Kp, Ki, and Kd through algorithm optimization are as follows: S41. Simulate the working condition of the PID control system of the walking rehabilitation device and design the transfer function to describe the dynamic characteristics of the system; S42, giving an input of the PID control system of the walking rehabilitation apparatus, the input being a target current value; S43, encoding the parameters Kp, Ki, and Kd of the walking rehabilitation apparatus current PID controller as a solution of the improved evolutionary mating algorithm search space, and as the algorithm is iterated, the updated population individual positions reflect the corresponding parameters of the walking rehabilitation apparatus current PID controller; S44, initializing the parameters of the improved evolutionary mating algorithm, including the population size N of the algorithm, the problem dimension d, the maximum number of iterations Max_iteration, the upper limit ub and the lower limit lb of the search space; S45, calculating the individual fitness values ​​of the current iteration population according to the fitness function, recording the minimum fitness value, and comparing it with the optimal fitness value of the population in the previous iteration, and retaining the optimal fitness value; S46, simulating the optimization process of each stage of the improved evolutionary mating algorithm, that is, updating the Kp, Ki, and Kd parameters of the PID controller of the walking rehabilitation device; S47. If the updated population individual is better than the last iteration, keep the current optimal solution. ; S48. Determine whether the current number of iterations has reached the maximum number of iterations. If so, exit the loop, output the global optimal solution of the algorithm search space, and assign it to the walking rehabilitation device current PID controller as the three parameters Kp, Ki, and Kd. Otherwise, return to execute S42.

4. The current PID controller optimization method for a walking rehabilitation device according to claim 3, characterized in that: The optimization process of each stage of the simulated improved evolutionary mating algorithm described in S46 is specifically performed as follows: Step 1, simulation algorithm exploration phase, by introducing the target fitness value, current fitness value and maximum fitness value of the current iteration offspring individual, the allele parameter p is improved to obtain the new allele parameter a, the offspring update mathematical model of the evolutionary mating algorithm exploration phase is improved, and formulas (1)-(4) are executed; Step 2: Simulate the algorithm development phase. By introducing random individuals and weights w, a weighted random search strategy is used to improve the offspring update mathematical model in the evolutionary mating algorithm development phase and execute formula (5).

Citation Information

Patent Citations

  • Controller optimization method based on improved seagull algorithm

    CN115469532A

  • A new fuzzy tuned mayfly method for complex constrained multi-objective optimization problems

    IN202411058908A