Intelligent fitness equipment control method based on electronic load
By improving the coronavirus herd immunity algorithm and optimizing the current PID controller, combined with electronic loads, chaotic mapping, and spiral search strategies, the problem of low flexibility and safety of iron weights in traditional fitness equipment is solved, and the control stability of fitness equipment is improved. and robustness, achieving more precise and safe fitness training effects.
Patent Information
- Application Number
- CN202410796280.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-09-10
AI Technical Summary
Traditional fitness equipment uses iron weights, resulting in low flexibility and safety, and PID control is unstable in complex nonlinear environments.
Electronic load is used as the source of resistance, the current PID controller is optimized by improving the coronavirus herd immunity algorithm, Kp, Ki, Kd parameters are adjusted, and an intelligent fitness equipment PID control system based on electronic load is built. ICMIC chaos mapping and spiral search strategy are combined to optimize Motor control.
It improves the control stability and robustness of fitness equipment, avoids local optimal solution traps, and achieves more accurate and safe fitness training guidance.
Smart Images

Figure CN118625671A
Abstract
Description
[0001] The invention relates to the technical field of PID control, and in particular to an intelligent fitness equipment control method based on electronic load. Background Art
[0002] In the composition of fitness equipment, the key component is the resistance providing system. Traditional fitness equipment usually uses iron weights to provide resistance, but iron weights may produce loud noises when used, and lack emergency stop and safety protection functions, which can easily lead to training injuries. Electronic loads can simulate real load conditions and ensure that the equipment works with stable and efficient performance under different conditions with set current or voltage. With motors as the main body, electronic loads are used as resistance sources in fitness training equipment. By controlling the change of current values and then controlling the torque output of the motor, intelligent control of parameters such as strength can be achieved, providing more precise guidance and safer protection for training.
[0003] PID control is a classic control strategy widely used in industrial control systems. PID stands for proportional, integral, and derivative control. Proportional control quickly responds to system deviations by adjusting the proportional coefficient of the current error; integral control eliminates steady-state errors by accumulating historical errors; and derivative control improves the stability and anti-interference ability of system response by predicting the trend of error changes. The PID controller combines these three links to accurately and quickly adjust the system to achieve the ideal control effect. By adjusting the PID parameters, the controller can adapt to the dynamic characteristics of different systems and achieve the best control performance. However, in the face of complex nonlinear sudden environments, PID control may not provide sufficient performance.
[0004] The Coronavirus Herd Immunity Optimizer (CHIO) is a new intelligent optimization algorithm inspired by the concept of herd immunity in response to the coronavirus. Herd immunity is a state achieved by a group when most of the group is immune, which can prevent the spread of the disease. The Coronavirus Herd Immunity Optimizer has good performance, but it is prone to falling into a local optimal solution in the later stage. Summary of the invention
[0005] The purpose of the present invention is to solve the problem of low flexibility and safety caused by the use of iron weights in traditional fitness equipment. The present invention proposes an intelligent fitness equipment control method based on electronic load, which takes the motor as the main body and uses the electronic load as the resistance source for application in fitness training equipment. By controlling and changing the current value, the actual torque output of the motor is changed, so that the motor can simulate loads of different weights during operation to achieve the effect of fitness training. And by improving the coronavirus group immunity algorithm to optimize the control parameters of the current PID controller in the motor control system, the problems of instability and low responsiveness of the traditional PID control method are solved, and the control stability and robustness of the fitness equipment are improved.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] A method for controlling an intelligent fitness equipment based on an electronic load specifically comprises the following steps:
[0008] Step 1: Build a PID control system model based on electronic load intelligent fitness equipment.
[0009] Step 2: Use Matlab software to build a model for improving the coronavirus herd immunity algorithm, which includes two parts: D1, ICMIC chaotic mapping is used to initialize the population position in the initialization stage of the algorithm; D2. Introduce a spiral search strategy in the herd immunity evolution stage of the algorithm; the details are as follows.
[0010] Step 1: In the initialization stage of the algorithm, ICMIC chaotic mapping is used to initialize the population position. The improved formula for initializing the population position is: (1); (2); in, is the initial population individual, is the lower bound that the algorithm searches for, is a random number between 0 and 1. is the upper bound of the algorithm search, is the i-th variable value of the generated chaotic sequence, d is the problem dimension, n is the population size, is the i+1th variable value of the generated chaotic sequence, It is the chaos factor; Step 2: Introduce the spiral search strategy in the group immunity evolution stage of the algorithm. The improved position update formula is: (3); in, is the new gene of the jth case in the i-th dimension, is the gene of the jth case in the i-th dimension, r is a random number between 0 and 1, is the basic reproduction rate, is a randomly selected individual among the infected cases, are randomly selected individuals among susceptible cases, is the best individual in the immune case, c is a random number between -1 and 1, q is the spiral search factor, t is the current iteration number, and T is the maximum iteration number.
[0011] Step 3: Use the improved coronavirus herd immunity algorithm to optimize the current PID controller and obtain the optimal Kp, Ki, and Kd control parameters.
[0012] Step 4: Input the obtained optimal control parameters Kp, Ki, and Kd into the PID control system model based on the electronic load intelligent fitness equipment to achieve the optimal control effect based on the electronic load intelligent fitness equipment.
[0013] Furthermore, in the step one, a PID control system model based on electronic load intelligent fitness equipment is built, and the model includes an input module, an error calculation module, an improved coronavirus herd immunity algorithm module, a current PID controller module, a current detection module, and a motor module; the expected current value is input from the input module, and is input into the error calculation module together with the actual current value detected by the current detection module to obtain a current error value by difference, the current PID controller module accepts the current error value, and uses the PID parameters optimized by the improved coronavirus herd immunity algorithm module to calculate and obtain a reference current value, thereby controlling the operation of the motor.
[0014] Furthermore, the input module can input different expected current values, thereby changing the actual torque output of the motor, so that the motor can simulate loads of different weights during operation to achieve the effect of fitness training.
[0015] Furthermore, in the step 2, ICMIC chaotic mapping is used to initialize the population position in the initialization phase of the algorithm, which improves the exploration capability of the algorithm in the initial phase, helps to more comprehensively understand the problem space and find a better solution.
[0016] Furthermore, in step 2, a spiral search strategy is introduced in the group immunity evolution stage of the algorithm. The spiral path is used to explore the neighborhood space, which helps to carefully search for the optimal solution in the local area, thereby improving the precision of the local search. This can better explore potential high-quality solutions near the local optimal solution for the optimization algorithm.
[0017] Furthermore, in step three, the improved coronavirus herd immunity algorithm is used to optimize the current PID controller to obtain the optimal Kp, Ki, and Kd control parameters. The specific steps are: S1. Parameter initialization: set population size n, problem dimension d, maximum number of iterations T, search upper bound , search for the lower bound ; S2, by encoding the parameters Kp, Ki, Kd of the current PID controller into the solution of the search space of the improved coronavirus herd immunity algorithm, as the algorithm iterates, the position of the population individuals reflects the corresponding current PID controller parameter solution; S3, calculate the current fitness value of each individual in the algorithm, and record the optimal fitness value of the individual in the current iteration; S4. Establish a mathematical model of the population individual position update strategy of the improved coronavirus herd immunity algorithm, and use the mathematical model to update the genes of each case in the population, that is, update the Kp, Ki, and Kd parameters of the current PID controller; S5. If the fitness value of the updated individual is better than that of the last iteration, the current optimal solution is retained; S6. Whether the current number of iterations reaches the maximum number of iterations. If so, exit the loop, output the global optimal solution, and assign it to the three parameters Kp, Ki, and Kd of the current PID controller. Otherwise, return to execute S1.
[0018] Furthermore, in S2, the parameters Kp, Ki, and Kd of the current PID controller are encoded as a solution of the search space of the improved coronavirus herd immunity algorithm, and the encoding vector is: ; Where x is the encoding vector, Kp, Ki, and Kd are the proportional parameter, integral parameter, and differential parameter of the current PID controller in the PID control system model based on the electronic load intelligent fitness equipment.
[0019] Furthermore, in S3, the fitness function formula is: ; In the formula, f is the fitness value, n is the number of samples, is the actual current value in the PID control system model of the electronic load intelligent fitness equipment, is the expected current value in the PID control system model of the electronic load intelligent fitness equipment.
[0020] Furthermore, in S4, a mathematical model of the population individual position update strategy of the improved coronavirus herd immunity algorithm is established, and the specific steps are: S41, in the initialization phase of the algorithm, ICMIC chaotic mapping is used to initialize the population position, and a mathematical model of the initial population position is established according to formulas (1)-(2); S42: In the herd immunity evolution stage of the algorithm, a spiral search strategy is introduced to improve the population position update formula, and a mathematical model of the position update strategy is established according to formula (3).
[0021] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0022] By improving the coronavirus group immunity algorithm, the problem of weak local search ability and easy to fall into the local optimal solution of the basic coronavirus group immunity algorithm is solved, and the performance of the algorithm is improved. The improved coronavirus group immunity algorithm is used to optimize the current PID controller to obtain the optimal Kp, Ki, and Kd control parameters. The optimal control parameters Kp, Ki, and Kd are input into the PID control system model based on electronic load intelligent fitness equipment to improve the stability and robustness of the electronic load intelligent fitness equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 The figure is a flow chart of the steps of the control method of the intelligent fitness equipment based on the electronic load.
[0024] Figure 2 This is the PID control system model diagram of the electronic load intelligent fitness equipment.
[0025] Figure 3 Flowchart of steps to optimize the current PID controller for improving the coronavirus herd immunity algorithm.
[0026] Figure 4 This is a comparison chart of the best fitness function values between the basic coronavirus herd immunity algorithm and the improved coronavirus herd immunity algorithm.
[0027] Figure 5 A comparison chart of the effects of optimizing PID control parameters by using the basic coronavirus herd immunity algorithm and the improved coronavirus herd immunity algorithm. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] See also Figure 1-Figure 5 , the present invention provides a technical solution:
[0030] A control method for intelligent fitness equipment based on electronic load, such as Figure 1 As shown, the specific steps include:
[0031] Step 1: Build a PID control system model based on electronic load intelligent fitness equipment, such as Figure 2 As shown, the model includes an input module, an error calculation module, an improved coronavirus herd immunity algorithm module, a current PID controller module, a current detection module, and a motor module; the expected current value is input from the input module, and is input into the error calculation module together with the actual current value detected by the current detection module to obtain a current error value by difference; the current PID controller module accepts the current error value, and uses the PID parameters optimized by the improved coronavirus herd immunity algorithm module to calculate the reference current value, thereby controlling the operation of the motor.
[0032] Furthermore, the input module can input different expected current values, thereby changing the actual torque output of the motor, so that the motor can simulate loads of different weights during operation to achieve the effect of fitness training.
[0033] Step 2: Use Matlab software to build a model for improving the coronavirus herd immunity algorithm, which includes two parts: D1, ICMIC chaotic mapping is used to initialize the population position in the initialization stage of the algorithm; D2. Introduce a spiral search strategy in the herd immunity evolution stage of the algorithm; the details are as follows.
[0034] Step 1: In the initialization stage of the algorithm, ICMIC chaotic mapping is used to initialize the population position. The improved formula for initializing the population position is: (1); (2); in, is the initial population individual, is the lower bound that the algorithm searches for, is a random number between 0 and 1. is the upper bound of the algorithm search, is the i-th variable value of the generated chaotic sequence, d is the problem dimension, n is the population size, is the i+1th variable value of the generated chaotic sequence, It is the chaos factor; Step 2: Introduce the spiral search strategy in the group immunity evolution stage of the algorithm. The improved position update formula is: (3); in, is the new gene of the jth case in the i-th dimension, is the gene of the jth case in the i-th dimension, r is a random number between 0 and 1, is the basic reproduction rate, is a randomly selected individual among the infected cases, are randomly selected individuals among susceptible cases, is the best individual in the immune case, c is a random number between -1 and 1, q is the spiral search factor, t is the current iteration number, and T is the maximum iteration number.
[0035] Step 3: Use the improved coronavirus herd immunity algorithm to optimize the current PID controller and obtain the optimal Kp, Ki, and Kd control parameters, such as Figure 3 As shown, the specific steps are: S1. Parameter initialization: set population size n, problem dimension d, maximum number of iterations T, search upper bound , search for the lower bound ; S2, by encoding the parameters Kp, Ki, Kd of the current PID controller into the solution of the search space of the improved coronavirus herd immunity algorithm, as the algorithm iterates, the position of the population individuals reflects the corresponding current PID controller parameter solution; S3, calculate the current fitness value of each individual in the algorithm, and record the optimal fitness value of the individual in the current iteration; S4. Establish a mathematical model of the population individual position update strategy of the improved coronavirus herd immunity algorithm, and use the mathematical model to update the genes of each case in the population, that is, update the Kp, Ki, and Kd parameters of the current PID controller; S5. If the fitness value of the updated individual is better than that of the last iteration, the current optimal solution is retained; S6. Whether the current number of iterations reaches the maximum number of iterations. If so, exit the loop, output the global optimal solution, and assign it to the three parameters Kp, Ki, and Kd of the current PID controller. Otherwise, return to execute S1.
[0036] Furthermore, in S2, the parameters Kp, Ki, and Kd of the current PID controller are encoded as a solution of the search space of the improved coronavirus herd immunity algorithm, and the encoding vector is: ; Where x is the encoding vector, Kp, Ki, and Kd are the proportional parameter, integral parameter, and differential parameter of the current PID controller in the PID control system model based on the electronic load intelligent fitness equipment.
[0037] Furthermore, in S3, the fitness function formula is: ; In the formula, f is the fitness value, n is the number of samples, is the actual current value in the PID control system model of the electronic load intelligent fitness equipment, is the expected current value in the PID control system model of the electronic load intelligent fitness equipment.
[0038] Furthermore, in said S4, a mathematical model of the population individual position update strategy of the improved coronavirus herd immunity algorithm is established, and the specific steps are as follows: S41, in the initialization phase of the algorithm, ICMIC chaotic mapping is used to initialize the population position, and a mathematical model of the initial population position is established according to formulas (1)-(2); S42: In the herd immunity evolution stage of the algorithm, a spiral search strategy is introduced to improve the population position update formula, and a mathematical model of the position update strategy is established according to formula (3).
[0039] Step 4: Input the obtained optimal control parameters Kp, Ki, and Kd into the PID control system model based on the electronic load intelligent fitness equipment to achieve the optimal control effect based on the electronic load intelligent fitness equipment.
[0040] The present invention specifically implements the comparison of the improved coronavirus herd immunity algorithm optimization PID control and the basic coronavirus herd immunity algorithm optimization PID control through simulation modeling. In the test code, the population size n=50, the problem dimension d=3, and the search upper bound are set. =100, search for lower bound =0, maximum number of iterations T=50, system input target value=1.
[0041] Figure 4 The best fitness function value comparison chart of the basic coronavirus herd immunity algorithm and the improved coronavirus herd immunity algorithm. According to the principle that the smaller the fitness value, the better the algorithm performance, the smaller the fitness value, the better the performance of the individual population. It can be found from the figure that the fitness value of the improved coronavirus herd immunity algorithm is generally smaller than that of the basic coronavirus herd immunity algorithm. The improved coronavirus herd immunity algorithm can obtain a better fitness value within the same number of iterations; and the improved coronavirus herd immunity algorithm solves the problem that the basic coronavirus herd immunity algorithm is prone to fall into the local optimal solution.
[0042] analyze Figure 5 It can be seen that the overshoot of the PID control system based on the improved coronavirus population immunity algorithm is significantly smaller than the overshoot of the PID control system based on the basic coronavirus population immunity algorithm, and the equilibrium state can be reached in a shorter time, indicating that the PID control system based on the improved coronavirus population immunity algorithm has better control performance than the PID control system based on the basic coronavirus population immunity algorithm.
Claims
1. A control method for intelligent fitness equipment based on electronic load, characterized in that: The specific steps include: Step 1: Build a PID control system model based on electronic load intelligent fitness equipment; Step 2: Use Matlab software to build a model for improving the coronavirus herd immunity algorithm, which includes two parts: D1, ICMIC chaotic mapping is used to initialize the population position in the initialization stage of the algorithm; D2. Introducing the spiral search strategy in the herd immunity evolution stage of the algorithm; Step 3: Use the improved coronavirus herd immunity algorithm to optimize the current PID controller and obtain the optimal Kp, Ki, and Kd control parameters; Step 4: Input the obtained optimal control parameters Kp, Ki, and Kd into the PID control system model based on the electronic load intelligent fitness equipment to achieve the optimal control effect of the electronic load intelligent fitness equipment.
2. The method for controlling an intelligent fitness equipment based on an electronic load according to claim 1, characterized in that: In the step one, a PID control system model based on electronic load intelligent fitness equipment is built, and the model includes an input module, an error calculation module, an improved coronavirus herd immunity algorithm module, a current PID controller module, a current detection module, and a motor module; the expected current value is input from the input module, and is input into the error calculation module together with the actual current value detected by the current detection module to obtain a current error value by difference, the current PID controller module accepts the current error value, and uses the PID parameters optimized by the improved coronavirus herd immunity algorithm module to calculate and obtain a reference current value, thereby controlling the operation of the motor.
3. The method for controlling an intelligent fitness equipment based on an electronic load according to claim 1, characterized in that: In step 2, the specific steps of improving the coronavirus population immunity algorithm are: Step 1: In the initialization stage of the algorithm, ICMIC chaotic mapping is used to initialize the population position. The improved formula for initializing the population position is: (1); (2); in, is the initial population individual, is the lower bound that the algorithm searches for, is a random number between 0 and 1. is the upper bound of the algorithm search, is the i-th variable value of the generated chaotic sequence, d is the problem dimension, n is the population size, is the i+1th variable value of the generated chaotic sequence, It is the chaos factor; Step 2: Introduce the spiral search strategy in the group immunity evolution stage of the algorithm. The improved position update formula is: (3); in, is the new gene of the jth case in the i-th dimension, is the gene of the jth case in the i-th dimension, r is a random number between 0 and 1, is the basic reproduction rate, is a randomly selected individual among the infected cases, are randomly selected individuals among susceptible cases, is the best individual in the immune case, c is a random number between -1 and 1, q is the spiral search factor, t is the current iteration number, and T is the maximum iteration number.
4. The method for controlling an intelligent fitness equipment based on an electronic load according to claim 1, characterized in that: In step 3, the improved coronavirus herd immunity algorithm is used to optimize the current PID controller to obtain the optimal Kp, Ki, and Kd control parameters. The specific steps are: S1. Parameter initialization: set population size n, problem dimension d, maximum number of iterations T, search upper bound , search for the lower bound ; S2, by encoding the parameters Kp, Ki, Kd of the current PID controller into the solution of the search space of the improved coronavirus herd immunity algorithm, as the algorithm iterates, the position of the population individuals reflects the corresponding current PID controller parameter solution; S3, calculate the current fitness value of each individual in the algorithm, and record the optimal fitness value of the individual in the current iteration; S4. Establish a mathematical model of the population individual position update strategy of the improved coronavirus herd immunity algorithm, and use the mathematical model to update the genes of each case in the population, that is, update the Kp, Ki, and Kd parameters of the current PID controller; S5. If the fitness value of the updated individual is better than that of the last iteration, the current optimal solution is retained; S6. Whether the current number of iterations reaches the maximum number of iterations. If so, exit the loop, output the global optimal solution, and assign it to the three parameters Kp, Ki, and Kd of the current PID controller. Otherwise, return to execute S1.
5. The method for controlling intelligent fitness equipment based on electronic load according to claim 2, characterized in that: The input module can input different expected current values, thereby changing the actual torque output of the motor, so that the motor can simulate loads of different weights during operation to achieve the effect of fitness training.
6. The method for controlling an intelligent fitness equipment based on an electronic load according to claim 4, characterized in that: Establish a mathematical model of the population individual position update strategy of the improved coronavirus herd immunity algorithm. The specific steps are: S41, in the initialization phase of the algorithm, ICMIC chaotic mapping is used to initialize the population position, and a mathematical model of the initial population position is established according to formulas (1)-(2); S42: In the herd immunity evolution stage of the algorithm, a spiral search strategy is introduced to improve the population position update formula, and a mathematical model of the position update strategy is established according to formula (3).
Citation Information
Cited By
Method and system for predicting most dangerous sliding surface of geogrid slope
CN120105859A
