Blood pump optimization control method for blood filter
By improving the squid game algorithm and introducing adaptive search factors and random walk strategies, the PID control parameters of the blood pump of the hemofiltration machine are optimized, which solves the problem of weak adaptability of the traditional PID control method and improves the efficiency of the blood pump control system of the hemofiltration machine. Adaptability and robustness enable precise control of blood flow rate.
Patent Information
- Application Number
- CN202410782078.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-09-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The traditional PID control method has weak adaptability when the environment changes or system characteristics change, making it difficult to achieve precise control of the blood pump of the hemofiltration machine. The squid game algorithm has poor global search capabilities in the later stage and is prone to falling into local optimal solutions.
By improving the squid game algorithm, introducing adaptive search factors and random walk strategies, optimizing the PID control parameters Kp, Ki, and Kd of the blood pump control system of the hemofiltration machine, improving the adaptability and global search capabilities of the algorithm, and using the improved Algorithm optimizes blood flow rate PID controller.
It improves the adaptability and robustness of the blood pump control system of the hemofiltration machine, ensures precise control of blood flow rate, avoids local optimal solutions, and improves the stability and performance of the system.
Smart Images

Figure CN118576887A
Abstract
Description
Technical Field
[0001] The invention belongs to the field of PID control optimization, and in particular relates to a blood pump optimization control method for a blood filter. Background Art
[0002] A hemofilter is a medical device used to purify and treat a patient's blood through hemofiltration technology. The device is usually used for conditions such as acute renal failure, chronic kidney disease, and heart failure that require the removal of toxins and excess fluid from the body. The hemofilter mainly includes: a blood pump, a filter, and a replacement fluid. During the working process of the hemofilter, the blood is first pumped into the filter, and the water and small molecule waste in the blood are filtered out by the filter. At the same time, the replacement fluid is added to the blood to replenish the removed fluid and important components, and the purified blood is returned to the patient's body. Hemofilters are widely used in intensive care units and dialysis centers to provide key support for patients with renal insufficiency or other patients who require blood purification treatment. Its advantage is that it can continuously and gently remove toxins and excess fluid from the body, which helps the patient's stability and recovery. As one of the key components of the hemofilter, the blood pump is responsible for extracting blood from the patient's body and pumping it into the filter for processing. It ensures that the blood maintains a continuous and stable flow throughout the blood filtration process. Maintaining the blood flow rate can provide a stable blood flow and thus improve the filtration efficiency, which is essential for effectively filtering and removing toxins and excess fluids in the body, and also makes the treatment more effective. Therefore, the precise control of the blood pump is of vital importance.
[0003] PID control (proportional-integral-differential control) is a classic feedback control strategy used for precise control of regulating variables in automatic control systems. The PID controller calculates the error between the actual value and the target value, and uses the three parts of proportional, integral and differential to correct the error to minimize the error. Proportional control (P) processes the current error, integral control (I) processes the cumulative error, and differential control (D) processes the rate of change of the error. PID control can accurately adjust the system, reduce steady-state errors, improve control accuracy, and dynamically adjust the control output according to real-time feedback data to ensure that the system is always close to the target state. Therefore, it is a good choice to apply the PID control method to the control of the blood pump of the blood filter. Although PID control has many advantages, it also has obvious disadvantages, such as difficulty in parameter debugging. The traditional PID controller may need to readjust the parameters when the environment changes or the system characteristics change, and lacks adaptive capabilities.
[0004] The Squid Game Optimizer is a novel meta-heuristic algorithm inspired by the rules of a traditional multiplayer game. The Squid Game Optimizer mainly consists of three stages: the first stage is that the offensive player moves to the defensive player group, the second stage is that if the winning state of the defender is lower than the winning state of the attacker, the offensive player moves to the best offensive player group, if the winning state of the defender is higher than the winning state of the attacker, the defensive player moves to the offensive player group, and the third stage is that the successful offensive player moves to the successful defensive player group. The advantages of this algorithm are fast convergence speed and high solution accuracy, but the global search ability is poor in the later stage, and it is easy to fall into the local optimal solution, resulting in the inability to achieve optimal performance in practical applications. Summary of the invention
[0005] The purpose of the present invention is to improve the precise control of the blood pump of the blood filter machine, and propose a blood pump optimization control method for the blood filter machine, which adopts the PID control method to control the motor, drive the blood pump to make the blood flow at the target flow rate. And by improving the squid game algorithm to optimize the control parameters Kp, Ki, Kd of the blood flow rate PID controller of the blood pump control system of the blood filter machine, the problem of weak adaptability of the traditional PID control method when the environment changes or the system characteristics change is solved, and the adaptability and robustness of the blood pump control system of the blood filter machine are improved.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] A blood pump optimization control method for a blood filter, the specific steps are as follows:
[0008] Step 1: Convert the blood pump optimization control problem of the blood filter into a mathematical model to be optimized.
[0009] Step 2: Establish the blood flow rate PID control model of the blood pump control system of the blood filter.
[0010] Step 3: Use Matlab software to establish an improved squid game algorithm mathematical model to verify the accuracy and performance of the improved algorithm to optimize the PID controller; the improved squid game algorithm includes: D1. In the first stage of the algorithm, the offensive player moves towards the defensive player group, and an adaptive search factor is introduced to improve the offensive player's position update expression; D2. In the third stage of the algorithm, the successful offensive player moves towards the group of successful defensive players. The random walk strategy is introduced to improve the position update expression of the successful offensive player, as follows.
[0011] Step 1: In the first stage of the algorithm, the offensive player moves towards the defensive player group. The adaptive search factor w is introduced to improve the offensive player's position update expression. The improved position update expression is: (1); (2); (3); In the formula, is the new position of the ith offensive player in the first phase, is the i-th offensive player, w is the adaptive search factor, r1 and r2 are random numbers between 0 and 1, DG is the defensive player population, is a randomly selected defensive player, m is the total number of players in each group in the game, r3 is a random number between 1 and m, is the i-th defensive player, t is the current iteration number, and T is the maximum iteration number; Step 2: In the third stage of the algorithm, the successful offensive player moves to the group of successful defensive players. The random walk strategy is introduced to improve the position update expression of the successful offensive player. The improved position update expression is: (4); In the formula, is the new position of the i-th successful attacking player in the third phase, is the i-th successful attacking player, BS is the best individual among the successful attacking players, r is a random number between 0 and 1, is the kth successful defensive player, o is the total number of successful offensive players, p is the total number of successful defensive players, and the other parameters have the same meanings as in Step 1.
[0012] Step 4: Use the improved squid game algorithm to optimize the blood flow rate PID controller of the blood pump of the blood filter machine to obtain the optimal control parameters Kp, Ki, and Kd of the blood flow rate PID controller of the blood pump of the blood filter machine.
[0013] Step 5: Input the optimal control parameters Kp, Ki, and Kd into the blood flow rate PID control model of the blood pump control system of the blood filter machine to obtain the optimal effect of the blood flow rate PID control of the blood pump control system of the blood filter machine.
[0014] Furthermore, in step 1, the mathematical model expression to be optimized is: ; In the formula, f is the fitness value, n is the number of samples, is the actual blood flow rate value of the blood pump control system of the blood filter, It is the target blood flow rate value of the blood pump control system of the hemofiltration machine.
[0015] Furthermore, the mathematical model expression to be optimized uses the cumulative error square function. By calculating the sum of the squares of the errors between the target value and the actual value, it can accurately reflect the error size and evenly handle positive and negative errors, which helps to improve the performance and prediction accuracy of the model.
[0016] Furthermore, in the step 2, a blood flow rate PID control model of the blood pump control system of the blood filter machine is established, and the model includes an input unit, an error calculation unit, a blood flow rate PID controller unit, an improved squid game algorithm unit, a blood flow rate detection unit, a motor unit, and a blood pump unit; the input unit inputs a blood target flow rate value, and inputs the blood target flow rate value and the actual blood flow rate value detected by the blood flow rate detection unit into the error calculation unit to obtain a blood flow rate error value; the blood flow rate PID controller unit receives the blood flow rate error value, and applies the PID control parameters optimized by the improved squid game algorithm unit to calculate and obtain a blood reference flow rate value, and then controls the motor to drive the blood pump to work so that the blood flows at the reference flow rate, thereby realizing the control of the blood flow rate of the blood pump of the blood filter machine.
[0017] Furthermore, in step 3, in the first stage of the algorithm, the adaptive search factor is introduced to improve the position update expression of the offensive player when the offensive player moves toward the defensive player group, which can improve the adaptability of the algorithm. The adaptive search factor can dynamically adjust the algorithm according to the feedback during the search process, and improve the adaptability of the algorithm to different problems and different stages.
[0018] Furthermore, in step 3, in the third stage of the algorithm, the successful offensive player moves to the group of successful defensive players, and the random walk strategy is introduced to improve the position update expression of the successful offensive player, which can improve the global search ability of the algorithm. The random walk strategy increases the diversity of the search path, allowing the algorithm to explore a wider solution space, avoiding the search process from being too concentrated in certain areas, thereby improving the search effect.
[0019] Furthermore, in the step 4, the blood flow rate PID controller of the blood pump of the blood filter is optimized by using the improved squid game algorithm to obtain the optimal control parameters Kp, Ki, and Kd of the blood flow rate PID controller of the blood pump of the blood filter, and the specific steps are: S1. The mathematical model to be optimized is used as the objective function of the improved squid game algorithm, wherein the objective function is used as the fitness function; S2. Simulate the working condition of the blood pump control system of the blood filter and design the transfer function to describe the dynamic characteristics of the system; S3, giving an input of a blood pump control system of a blood filter, the input being a target flow rate value of the blood; S4. Initialize the population size n, problem dimension d, and algorithm search upper bound of the improved squid game algorithm , algorithm searches for lower bounds , maximum number of iterations T; S5, encoding the blood flow rate PID controller parameters Kp, Ki, and Kd of the blood pump control system of the blood filter as a solution of the search space of the improved squid game algorithm. With the iteration of the algorithm, the position of the individual in the algorithm population is the solution of the blood flow rate PID controller parameters of the blood pump control system of the blood filter; S6. Evaluate the fitness values of individuals in the current iteration population according to the fitness function, record the minimum fitness value, and compare it with the optimal fitness value of the previous iteration, so as to retain the global optimal fitness value; S7, simulating the activities of the players, establishing a mathematical model of the position update strategy of the improved squid game algorithm, and using the mathematical model to update the player positions, that is, to update the blood flow rate PID controller Kp, Ki, Kd parameters of the blood pump control system of the blood filter; S8. If the updated individual position of the player is better than the position updated in the previous iteration, the current optimal solution is retained; S9. Determine whether the current number of iterations has reached the maximum number of iterations. If so, exit the loop and output the global optimal solution, and assign it to the Kp, Ki, and Kd parameters of the blood flow rate PID controller of the blood pump control system of the blood filter. Otherwise, return to execute step S3.
[0020] Furthermore, in S2, the working condition of the blood pump control system of the blood filter is simulated, and a transfer function is designed to describe the dynamic characteristics of the system; the designed transfer function expression is: ; Where s is a complex frequency variable.
[0021] Furthermore, in S5, the blood flow rate PID controller parameters Kp, Ki, and Kd of the blood pump control system of the blood filter are encoded as a solution of the search space of the improved squid game algorithm, and the encoding vector is: ; In the formula, is the parameter Kp of the blood flow rate PID controller, is the parameter Ki of the blood flow rate PID controller, is the parameter Kd of the blood flow rate PID controller.
[0022] Furthermore, in S6, the fitness function is used to evaluate the quality of each candidate solution. According to the principle that the smaller the fitness value, the better the quality of the solution, by calculating the fitness value, the quality of different solutions can be compared to help the algorithm identify which solutions are closer to the optimal solution.
[0023] Furthermore, in said S7, the specific steps of simulating the activities of the players and establishing the mathematical model of the position update strategy of the improved squid game algorithm are: S71, simulate the activity of the offensive player moving towards the defensive player group in the first stage, introduce the adaptive search factor w to improve the offensive player's position update expression, and establish a mathematical model of the position update strategy according to formulas (1)-(3); S72, in the second stage, the individual fitness value of each player is evaluated and used as the winning state of the player. If the winning state of the defender is lower than the winning state of the attacker, the activity of the attacker moving towards the best attacker group is simulated, and a mathematical model of the position update strategy is established according to formulas (5)-(6); (5); (6); In the formula, is the new position of the ith attacking player in the second phase, SOG is the group of successful attacking players, is the i-th player who successfully attacks, is the new position of the ith attacking player in the first phase, BS is the best individual in the population of successful attacking players, r1 and r2 are random numbers between 0 and 1, m is the total number of players in each group in the game, and o is the total number of successful attacking players; S73. If the winning state of the defense side is higher than the winning state of the offense side, simulate the movement of the defense player toward the offense player group and establish a mathematical model of the position update strategy according to formulas (7)-(8); (7); (8); In the formula, OG is the offensive player group, is the i-th offensive player, is the new position of the i-th defender in the first phase, is the i-th defensive player, is a randomly selected offensive player, r3 is a random number between 1 and m, and the other parameters have the same meanings as step S72; S74. In the third phase of the simulation algorithm, the successful offensive player moves towards the group of successful defensive players. The random walk strategy is introduced to improve the position update expression of the successful offensive player. The mathematical model of the position update strategy is established according to formula (4).
[0024] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0025] The present invention proposes a blood pump optimization control method for a blood filter machine, which uses a PID control method to control a motor and drive the blood pump to make the blood flow at a target flow rate. The squid game algorithm is improved by introducing an adaptive search factor in the first stage of the algorithm and a random walk strategy in the third stage of the algorithm, thereby improving the convergence speed and global search capability of the algorithm. The blood flow rate PID controller of the blood pump of the blood filter machine is optimized by using the improved squid game algorithm, and the optimal control parameters Kp, Ki, and Kd of the blood flow rate PID controller of the blood pump of the blood filter machine are obtained. The optimal control parameters Kp, Ki, and Kd are input into the blood pump control system of the blood filter machine, thereby improving the adaptability and robustness of the blood pump control system of the blood filter machine. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 The present invention is a flow chart of the steps of the blood pump optimization control method of the blood filter machine.
[0027] Figure 2 This is the blood flow rate PID control model diagram of the blood pump control system of the blood filter.
[0028] Figure 3 Flow chart of the steps for optimizing the blood flow rate PID controller of the blood pump of the blood filter using the improved squid game algorithm.
[0029] Figure 4 Comparison chart of the best fitness function values of the basic squid game algorithm and the improved squid game algorithm.
[0030] Figure 5 A comparison chart of the effects of optimizing PID control parameters using the basic squid game algorithm and the improved squid game algorithm. DETAILED DESCRIPTION
[0031] 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.
[0032] See also Figure 1-Figure 5 , the present invention provides a technical solution:
[0033] A blood pump optimization control method for a blood filter, such as Figure 1 As shown, the specific steps are as follows:
[0034] Step 1: Convert the blood pump optimization control problem of the blood filter into a mathematical model to be optimized. The mathematical model to be optimized is expressed as: ; In the formula, f is the fitness value, n is the number of samples, is the actual blood flow rate value of the blood pump control system of the blood filter, It is the target blood flow rate value of the blood pump control system of the hemofiltration machine.
[0035] Step 2: Establish the blood flow rate PID control model of the blood pump control system of the blood filter, such as Figure 2 As shown, the model includes an input unit, an error calculation unit, a blood flow rate PID controller unit, an improved squid game algorithm unit, a blood flow rate detection unit, a motor unit, and a blood pump unit; the input unit inputs a blood target flow rate value, and inputs the blood target flow rate value and the actual blood flow rate value detected by the blood flow rate detection unit into the error calculation unit to obtain a blood flow rate error value; the blood flow rate PID controller unit receives the blood flow rate error value, and uses the PID control parameters optimized by the improved squid game algorithm unit to calculate and obtain a blood reference flow rate value, and then controls the motor to drive the blood pump to work so that the blood flows at the reference flow rate, thereby realizing the control of the blood flow rate of the blood pump of the blood filter.
[0036] Step 3: Use Matlab software to establish an improved squid game algorithm mathematical model to verify the accuracy and performance of the improved algorithm to optimize the PID controller; the improved squid game algorithm includes: D1. In the first stage of the algorithm, the offensive player moves towards the defensive player group, and an adaptive search factor is introduced to improve the offensive player's position update expression; D2. In the third stage of the algorithm, the successful offensive player moves towards the group of successful defensive players. The random walk strategy is introduced to improve the position update expression of the successful offensive player, as follows.
[0037] Step 1: In the first stage of the algorithm, the offensive player moves towards the defensive player group. The adaptive search factor w is introduced to improve the offensive player's position update expression. The improved position update expression is: (1); (2); (3); In the formula, is the new position of the ith offensive player in the first phase, is the i-th offensive player, w is the adaptive search factor, r1 and r2 are random numbers between 0 and 1, DG is the defensive player population, is a randomly selected defensive player, m is the total number of players in each group in the game, r3 is a random number between 1 and m, is the i-th defensive player, t is the current iteration number, and T is the maximum iteration number; Step 2: In the third stage of the algorithm, the successful offensive player moves to the group of successful defensive players. The random walk strategy is introduced to improve the position update expression of the successful offensive player. The improved position update expression is: (4); In the formula, is the new position of the i-th successful attacking player in the third phase, is the i-th successful attacking player, BS is the best individual among the successful attacking players, r is a random number between 0 and 1, is the kth successful defensive player, o is the total number of successful offensive players, p is the total number of successful defensive players, and the other parameters have the same meanings as in Step 1.
[0038] Step 4: Use the improved squid game algorithm to optimize the blood flow rate PID controller of the blood pump of the blood filter to obtain the optimal control parameters Kp, Ki, and Kd of the blood flow rate PID controller of the blood pump of the blood filter, such as Figure 3 As shown, the specific steps are: S1. The mathematical model to be optimized is used as the objective function of the improved squid game algorithm, wherein the objective function is used as the fitness function; S2. Simulate the working condition of the blood pump control system of the blood filter and design the transfer function to describe the dynamic characteristics of the system; S3, giving an input of a blood pump control system of a blood filter, the input being a target flow rate value of the blood; S4. Initialize the population size n, problem dimension d, and algorithm search upper bound of the improved squid game algorithm , algorithm searches for lower bounds , maximum number of iterations T; S5, encoding the blood flow rate PID controller parameters Kp, Ki, and Kd of the blood pump control system of the blood filter as a solution of the search space of the improved squid game algorithm. With the iteration of the algorithm, the position of the individual in the algorithm population is the solution of the blood flow rate PID controller parameters of the blood pump control system of the blood filter; S6. Evaluate the fitness values of individuals in the current iteration population according to the fitness function, record the minimum fitness value, and compare it with the optimal fitness value of the previous iteration, so as to retain the global optimal fitness value; S7, simulating the activities of the players, establishing a mathematical model of the position update strategy of the improved squid game algorithm, and using the mathematical model to update the player positions, that is, to update the blood flow rate PID controller Kp, Ki, Kd parameters of the blood pump control system of the blood filter; S8. If the updated individual position of the player is better than the position updated in the previous iteration, the current optimal solution is retained; S9. Determine whether the current number of iterations has reached the maximum number of iterations. If so, exit the loop and output the global optimal solution, and assign it to the Kp, Ki, and Kd parameters of the blood flow rate PID controller of the blood pump control system of the blood filter. Otherwise, return to execute step S3.
[0039] Furthermore, in S2, the working condition of the blood pump control system of the blood filter is simulated, and a transfer function is designed to describe the dynamic characteristics of the system; the designed transfer function expression is: ; Where s is a complex frequency variable.
[0040] Furthermore, in S5, the blood flow rate PID controller parameters Kp, Ki, and Kd of the blood pump control system of the blood filter are encoded as a solution of the search space of the improved squid game algorithm, and the encoding vector is: ; In the formula, is the parameter Kp of the blood flow rate PID controller, is the parameter Ki of the blood flow rate PID controller, is the parameter Kd of the blood flow rate PID controller.
[0041] Furthermore, in said S7, the specific steps of simulating the activities of the players and establishing the mathematical model of the position update strategy of the improved squid game algorithm are: S71, simulate the activity of the offensive player moving towards the defensive player group in the first stage, introduce the adaptive search factor w to improve the offensive player's position update expression, and establish a mathematical model of the position update strategy according to formulas (1)-(3); S72, in the second stage, the individual fitness value of each player is evaluated and used as the winning state of the player. If the winning state of the defender is lower than the winning state of the attacker, the activity of the attacker moving towards the best attacker group is simulated, and a mathematical model of the position update strategy is established according to formulas (5)-(6); (5); (6); In the formula, is the new position of the ith attacking player in the second phase, SOG is the group of successful attacking players, is the i-th player who successfully attacks, is the new position of the ith attacking player in the first phase, BS is the best individual in the population of successful attacking players, r1 and r2 are random numbers between 0 and 1, m is the total number of players in each group in the game, and o is the total number of successful attacking players; S73. If the winning state of the defense side is higher than the winning state of the offense side, simulate the movement of the defense player toward the offense player group and establish a mathematical model of the position update strategy according to formulas (7)-(8); (7); (8); In the formula, OG is the offensive player group, is the i-th offensive player, is the new position of the i-th defender in the first phase, is the i-th defensive player, is a randomly selected offensive player, r3 is a random number between 1 and m, and the other parameters have the same meanings as step S72; S74. In the third phase of the simulation algorithm, the successful offensive player moves towards the group of successful defensive players. The random walk strategy is introduced to improve the position update expression of the successful offensive player. The mathematical model of the position update strategy is established according to formula (4).
[0042] Step 5: Input the optimal control parameters Kp, Ki, and Kd into the blood flow rate PID control model of the blood pump control system of the blood filter machine to obtain the optimal effect of the blood flow rate PID control of the blood pump control system of the blood filter machine.
[0043] In order to verify the innovativeness of the blood pump optimization control method for a blood filter machine proposed in the present invention, the specific implementation method of the present invention compares the improved squid game algorithm optimization PID control and the basic squid game algorithm optimization PID control through simulation modeling. In the blood pump control system of the blood filter machine, the performance of the algorithm determines the accuracy and performance of the blood flow rate PID controller, and further determines the performance and robustness of the blood pump control system of the blood filter machine.
[0044] In the simulation code, set the population size n=100, the problem dimension d=3, and the algorithm search upper bound =100, the algorithm searches for the lower bound =0, the maximum number of iterations T=50, and the system input target value is 2. Figure 4 As shown in the comparison chart of the best fitness function values of the basic squid game algorithm and the improved squid game algorithm, the fitness value of the improved squid game algorithm is generally smaller than that of the basic squid game algorithm. According to the principle that the smaller the fitness value, the better the quality of the solution, the improved squid game algorithm has better performance in finding solutions and better optimized control parameters. In addition, the improved squid game algorithm converges faster in the later stage while ensuring the global search capability, which means that the improved algorithm can effectively avoid falling into the local optimum and find the optimal solution faster.
[0045] according to Figure 5From the comparison chart of the effects of optimizing PID control parameters with the basic squid game algorithm and the improved squid game algorithm, it can be seen that when the blood pump control system of the blood filter machine is optimized with the improved squid game algorithm, the system reaches steady state faster, has smaller overshoot, and has better adaptability and stability.
Claims
1. A blood pump optimization control method for a blood filter, characterized in that: The specific steps are: Step 1: converting the blood pump optimization control problem of the blood filter into a mathematical model to be optimized; Step 2: Establish a blood flow rate PID control model of the blood pump control system of the blood filter; Step 3: Use Matlab software to establish an improved squid game algorithm mathematical model to verify the accuracy and performance of the improved algorithm to optimize the PID controller; the improved squid game algorithm includes: D1. In the first stage of the algorithm, the offensive player moves towards the defensive player group, and an adaptive search factor is introduced to improve the offensive player's position update expression; D2. In the third stage of the algorithm, the successful offensive player moves towards the group of successful defensive players, and a random walk strategy is introduced to improve the position update expression of the successful offensive player; Step 4: Optimize the blood flow rate PID controller of the blood pump of the blood filter machine by using the improved squid game algorithm to obtain the optimal control parameters Kp, Ki, and Kd of the blood flow rate PID controller of the blood pump of the blood filter machine; Step 5: Input the optimal control parameters Kp, Ki, and Kd into the blood flow rate PID control model of the blood pump control system of the blood filter machine to obtain the optimal effect of the blood flow rate PID control of the blood pump control system of the blood filter machine.
2. A blood pump optimization control method for a blood filter according to claim 1, characterized in that: In the step 1, the mathematical model expression to be optimized is: ; In the formula, f is the fitness value, n is the number of samples, is the actual blood flow rate value of the blood pump control system of the blood filter, It is the target blood flow rate value of the blood pump control system of the hemofiltration machine.
3. The blood pump optimization control method for a blood filter according to claim 1, characterized in that: In the step 2, a blood flow rate PID control model of the blood pump control system of the blood filter is established, and the model includes an input unit, an error calculation unit, a blood flow rate PID controller unit, an improved squid game algorithm unit, a blood flow rate detection unit, a motor unit, and a blood pump unit; the input unit inputs a blood target flow rate value, and inputs it together with the actual blood flow rate value detected by the blood flow rate detection unit into the error calculation unit to obtain a blood flow rate error value, the blood flow rate PID controller unit receives the blood flow rate error value, and uses the PID control parameters optimized by the improved squid game algorithm unit to calculate to obtain a blood reference flow rate value, and then controls the motor to drive the blood pump to work so that the blood flows at the reference flow rate, thereby realizing the control of the blood flow rate of the blood pump of the blood filter.
4. The blood pump optimization control method for a blood filter according to claim 1, characterized in that: In step 3, the specific steps of improving the squid game algorithm are: Step 1: In the first stage of the algorithm, the offensive player moves towards the defensive player group. The adaptive search factor w is introduced to improve the offensive player's position update expression. The improved position update expression is: (1); (2); (3); In the formula, is the new position of the ith offensive player in the first phase, is the i-th offensive player, w is the adaptive search factor, r1 and r2 are random numbers between 0 and 1, DG is the defensive player population, is a randomly selected defensive player, m is the total number of players in each group in the game, r3 is a random number between 1 and m, is the i-th defensive player, t is the current iteration number, and T is the maximum iteration number; Step 2: In the third stage of the algorithm, the successful offensive player moves to the group of successful defensive players. The random walk strategy is introduced to improve the position update expression of the successful offensive player. The improved position update expression is: (4); In the formula, is the new position of the i-th successful attacking player in the third phase, is the i-th successful attacking player, BS is the best individual among the successful attacking players, r is a random number between 0 and 1, is the kth successful defensive player, o is the total number of successful offensive players, p is the total number of successful defensive players, and the other parameters have the same meanings as in Step 1.
5. The blood pump optimization control method for a blood filter according to claim 1, characterized in that: In the step 4, the improved squid game algorithm is used to optimize the blood flow rate PID controller of the blood pump of the blood filter to obtain the optimal control parameters Kp, Ki, and Kd of the blood flow rate PID controller of the blood pump of the blood filter. The specific steps are: S1. The mathematical model to be optimized is used as the objective function of the improved squid game algorithm, wherein the objective function is used as the fitness function; S2. Simulate the working condition of the blood pump control system of the blood filter and design the transfer function to describe the dynamic characteristics of the system; S3, giving an input of a blood pump control system of a blood filter, the input being a target flow rate value of the blood; S4. Initialize the population size n, problem dimension d, and algorithm search upper bound of the improved squid game algorithm , algorithm searches for lower bounds , maximum number of iterations T; S5, encoding the blood flow rate PID controller parameters Kp, Ki, and Kd of the blood pump control system of the blood filter as a solution of the search space of the improved squid game algorithm. With the iteration of the algorithm, the position of the individual in the algorithm population is the solution of the blood flow rate PID controller parameters of the blood pump control system of the blood filter; S6. Evaluate the fitness values of individuals in the current iteration population according to the fitness function, record the minimum fitness value, and compare it with the optimal fitness value of the previous iteration, so as to retain the global optimal fitness value; S7, simulating the activities of the players, establishing a mathematical model of the position update strategy of the improved squid game algorithm, and using the mathematical model to update the player positions, that is, to update the blood flow rate PID controller Kp, Ki, Kd parameters of the blood pump control system of the blood filter; S8. If the updated individual position of the player is better than the position updated in the previous iteration, the current optimal solution is retained; S9. Determine whether the current number of iterations has reached the maximum number of iterations. If so, exit the loop and output the global optimal solution, and assign it to the Kp, Ki, and Kd parameters of the blood flow rate PID controller of the blood pump control system of the blood filter. Otherwise, return to execute step S3.
6. The blood pump optimization control method for a blood filter according to claim 5, characterized in that: The specific steps to simulate the activities of players and establish the mathematical model of the position update strategy of the improved squid game algorithm are: S71, simulate the activity of the offensive player moving towards the defensive player group in the first stage, introduce the adaptive search factor w to improve the offensive player's position update expression, and establish a mathematical model of the position update strategy according to formulas (1)-(3); S72, in the second stage, the individual fitness value of each player is evaluated and used as the winning state of the player. If the winning state of the defender is lower than the winning state of the attacker, the activity of the attacker moving towards the best attacker group is simulated, and a mathematical model of the position update strategy is established according to formulas (5)-(6); (5); (6); In the formula, is the new position of the ith attacking player in the second phase, SOG is the group of successful attacking players, is the i-th player who successfully attacks, is the new position of the ith attacking player in the first phase, BS is the best individual in the population of successful attacking players, r1 and r2 are random numbers between 0 and 1, m is the total number of players in each group in the game, and o is the total number of successful attacking players; S73. If the winning state of the defense side is higher than the winning state of the offense side, simulate the movement of the defense player toward the offense player group and establish a mathematical model of the position update strategy according to formulas (7)-(8); (7); (8); In the formula, OG is the offensive player group, is the i-th offensive player, is the new position of the i-th defender in the first phase, is the i-th defensive player, is a randomly selected offensive player, r3 is a random number between 1 and m, and the other parameters have the same meanings as step S72; S74. In the third phase of the simulation algorithm, the successful offensive player moves towards the group of successful defensive players. The random walk strategy is introduced to improve the position update expression of the successful offensive player. The mathematical model of the position update strategy is established according to formula (4).
Citation Information
Cited By
Transfusion flow rate control optimization method based on improved PID (Proportion Integration Differentiation)
CN119673416A
An optimized method for infusion flow rate control based on improved PID
CN119673416B
Blood flow control optimization method for extracorporeal circulation detection system
CN121522995A
