An optimized method for infusion flow rate control based on improved PID
By introducing dynamic inertial weights and global information transmission mechanisms into the simulated cooking training algorithm, combined with the infusion flow rate PID controller to optimize parameters, the problems of complex parameter setting and poor stability of the PID control algorithm in nonlinear complex systems in the prior art are solved, and high-precision and stable control of infusion flow rate are achieved.
Patent Information
- Application Number
- CN202510179617.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-02-19
AI Technical Summary
When facing nonlinear complex systems, the existing PID control algorithms have complex parameter setting and poor stability, making it difficult to achieve high-precision and stable control of infusion flow rate.
By introducing dynamic inertial weights and global information transmission mechanisms, the simulated cooking training algorithm is improved, combined with the infusion flow rate PID controller, the parameters Kp, Ki, Kd are optimized, and the accurate infusion pump control signal is output.
It significantly improves the algorithm's global search ability and local development ability, avoids falling into local optimization, realizes high-precision and stable control of infusion flow rate, and improves the system's anti-interference ability and dynamic response speed.
Smart Images

Figure CN119673416B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of PID control optimization, and particularly relates to an optimized method for controlling the infusion flow rate based on an improved PID. Background Art
[0002] The problem of controlling the infusion flow rate is an important topic in the medical field. Especially during the drug infusion treatment process, accurately controlling the infusion rate is crucial for ensuring patient safety. The infusion flow rate control system adjusts the flow rate of the liquid in the infusion tube to ensure that the patient receives an appropriate amount of liquid, drugs, and nutrients, thereby avoiding poor treatment effects or potential medical accidents caused by inaccurate flow rates. With the development of technology, especially the application of automation and intelligent control technologies, precise control of the infusion flow rate has become a standard requirement for modern hospital equipment. In addition, traditional manual control or simple mechanical control methods can no longer meet the high-precision requirements of modern medicine. With the development of microprocessors and sensing technologies, intelligent and automated infusion flow rate control systems have gradually become the mainstream. These systems can integrate sensors, control units, and feedback mechanisms to monitor the liquid flow rate and infusion volume in real time and automatically adjust the flow rate according to the set value, greatly improving the safety and accuracy of the treatment process.
[0003] The control of the infusion flow rate is often achieved by using the PID control algorithm. By detecting the flow rate of the liquid medicine output by the infusion pump in real time and adjusting the input of the control signal of the infusion pump, it is ensured that the infusion pump outputs the liquid medicine with the desired flow rate. As a control algorithm widely used in control systems, the PID control can cope with working conditions with rapid response changes by adjusting the proportional, integral, and differential parameters to achieve real-time control of the system. However, it has the disadvantages of complex parameter tuning and poor stability when facing non-linear complex systems.
[0004] The Simulated Cooking Training Algorithm (A New Human-Based Metahurestic Optimization Method Based on Mimicking Cooking Training, CBOA) is a novel heuristic optimization method inspired by the experience accumulation, skill application, and creative adjustment in the cooking process. This algorithm takes the learning process of cooking training as the basis of the optimization search strategy, simulating how a chef gradually masters skills, adjusts the ingredient ratio, controls the cooking time and temperature during actual training to achieve the optimal cooking result. Although the algorithm has good optimization performance, it is prone to falling into local optimal solutions and reaching convergence prematurely to a certain extent. Summary of the Invention
[0005] The object of the present invention is to achieve high-precision and stable control of the infusion flow rate through an optimized method for controlling the infusion flow rate based on an improved PID; to improve the global search ability and local development ability of the algorithm and enhance the optimization performance of the algorithm by introducing a dynamic inertia weight and using a global information transfer mechanism to improve the simulated cooking training algorithm, and to avoid falling into local optima; to establish a dynamic characteristic model of the infusion system, adjust the speed of the infusion pump in real time in combination with the flow rate error to ensure that the flow rate accurately tracks the set value, and to optimize the parameters Kp, Ki, and Kd of the infusion flow rate PID controller by using the improved simulated cooking training algorithm, output an accurate control signal for the infusion pump, improve the anti-interference ability and dynamic response speed of the system, and achieve the reliability and efficiency of the infusion flow rate control.
[0006] To achieve the above object, the present invention adopts an optimized method for controlling the infusion flow rate based on an improved PID, and the specific steps are as follows.
[0007] S1. Use a real-time monitoring device to obtain key operation data during the infusion process for analyzing the change in the infusion flow rate and the operation state of the system.
[0008] S2. Dynamically match the change trend of the monitored infusion flow rate during the infusion process with the response of the control system to generate an infusion flow rate error .
[0009] S3. Input the infusion flow rate error into the improved infusion flow rate PID controller to output a control signal for the infusion pump.
[0010] S4. The improved infusion flow rate PID controller is specifically implemented as follows: establish an infusion flow rate model by simulating the flow rate dynamic characteristics of the infusion system, fuse the improved simulated cooking training algorithm with the infusion flow rate PID controller, and obtain the optimal control parameters Kp, Ki, and Kd of the infusion flow rate PID controller through iterative optimization of the improved simulated cooking training algorithm; the improved simulated cooking training algorithm includes: S41. In the algorithm exploration stage, introduce a dynamic inertia weight by adding the maximum and minimum values of periodic changes and inertia weights , and improve the mathematical model for updating the position of the population individuals; S42. In the algorithm development stage, improve the mathematical model for updating the position of the population individuals by introducing the influence of the global optimal solution and using a global information transfer mechanism.
[0011] S5. The control signal for the infusion pump is used to control the speed of the infusion pump to achieve precise and stable control of the infusion flow rate.
[0012] Preferably, the expression of the infusion flow rate error in S2 is:
[0013] ;
[0014] In the formula, is the desired infusion flow rate, is the actual infusion flow rate.
[0015] Preferably, in step S4, an infusion flow rate model is established by simulating the flow rate dynamic characteristics of the infusion system. The infusion flow rate model is:
[0016] (1);
[0017] In the formula, is the infusion flow rate, r is the inner diameter radius of the infusion tube, is the viscosity of the liquid medicine, L is the length of the infusion tube, is the pipeline length of the infusion regulating device, is the liquid medicine density, is the acceleration of gravity, is the current liquid level height, is the liquid level height of the infusion terminal, is the cross-sectional area of the liquid medicine carrier, is the volume flow rate per unit time, and t is the time.
[0018] Preferably, the optimization objectives of the infusion flow rate control mainly include ensuring the accuracy, safety, and stability of the infusion process; first of all, the system needs to accurately control the flow rate to ensure that the infusion volume is consistent with the set value to prevent overdosage or underdosage of drugs. This goal is the core requirement of the system; in addition, the optimization objectives also include minimizing the control error, reducing the errors caused by factors such as pipeline resistance changes and liquid viscosity fluctuations, and maintaining the stability of the flow rate; the system should have fast response and adjustment capabilities to timely adjust the flow rate to meet the changing needs of patients in a dynamic environment and ensure a continuous and stable infusion process; in terms of system stability, the optimization objective is to improve the system's resistance to external disturbances, prevent unstable factors from affecting the infusion accuracy, and ensure that the flow rate remains stable even in the case of environmental changes or equipment damage.
[0019] Preferably, in step S4, the simulated cooking training algorithm is improved. In the exploration stage of the S41 algorithm, by adding the maximum and minimum values of periodic changes and inertia weights, a dynamic inertia weight is introduced. The expression of the dynamic inertia weight is:
[0020] (2);
[0021] In the formula, is the dynamic inertia weight, is the maximum value of the dynamic inertia weight, is the minimum value of the dynamic inertia weight, and is the period adjustment factor. is the current iteration number, and T is the maximum iteration number;
[0022] The mathematical model for updating the position of individuals in the population during the exploration stage of the improved simulated cooking training algorithm is:
[0023] (3);
[0024] In the formula, is the new position of the i-th chef tutor in the j-th dimension, is the current position of the i-th chef tutor in the j-th dimension, r is a random number between 0 and 1, is the position of the current best chef tutor, and I is a random number in the set {1, 2}.
[0025] Preferably, a dynamic inertia weight is introduced in the exploration stage of the basic simulated cooking training algorithm. The advantage is that it can enhance the global search ability of the algorithm and accelerate the convergence process; specifically, the dynamic inertia weight provides a larger search step size in the initial stage of optimization, which helps the algorithm to conduct extensive exploration in the solution space, thus avoiding premature convergence to local optimal solutions; when the algorithm is in the exploration stage, a larger inertia weight prompts the search process to have stronger randomness, which can quickly jump to potential excellent solution regions and increase the possibility of finding the global optimal solution; as the number of iterations increases, the inertia weight gradually decreases, and the search step size of the algorithm also decreases accordingly, which helps the algorithm to reduce the randomness of the search when approaching the optimal solution and ensure that it can conduct more precise local search and finally approach the global optimal solution; this strategy effectively balances the relationship between global search and local search by adjusting the "roughness" and "fineness" of the search, avoiding overly concentrated local exploration in the early stage, and at the same time being able to accelerate convergence by reducing the inertia weight in the later stage to prevent the search process from being too random, thereby improving the convergence speed and accuracy of the algorithm.
[0026] Preferably, in S4, the simulated cooking training algorithm is improved. In S42, during the algorithm development stage, by introducing the influence of the global optimal solution and using a global information transfer mechanism, the mathematical model for updating the position of individuals in the population is improved as:
[0027] (4);
[0028] In the formula, is the new position of the i-th chef student in the j-th dimension, is the current position of the i-th chef tutor in the j-th dimension, r is a random number between 0 and 1, is the chef tutor randomly selected by the student, I is a random number in the set {1, 2}, is the period adjustment factor, Position of the current best chef student.
[0029] Preferably, the influence of the global optimal solution is introduced during the development stage of the basic simulated cooking training algorithm. By using a global information transmission mechanism, the performance and optimization effect of the algorithm can be significantly improved; the introduction of the global optimal solution and the use of the global information transmission mechanism can effectively improve the exploration ability and convergence speed of the algorithm; first, by introducing the global optimal solution , the algorithm can refer to the position and status of the global best solution in real time, which is very important for avoiding being trapped in local optimal solutions; in the early stage of the algorithm, the breadth of the exploration space is usually large. By transmitting relevant information of the global optimal solution, the algorithm can be accelerated to find potential excellent solution regions, thereby improving the global search ability of the algorithm; the transmission of the global optimal solution enables individuals to more clearly understand the optimal region of the entire search space during the search process, which helps to guide them to quickly advance in the direction of the optimal solution; second, the global information transmission mechanism is reflected in , the use of this mechanism can promote information sharing among individuals and avoid the limitation of a single individual being trapped in local search; each individual not only depends on its own local information during the search process, but can also utilize the global optimal solution and the information of other individuals, thereby improving the search efficiency; this information sharing mechanism enables the entire algorithm to search more efficiently, thereby improving the convergence speed and accuracy.
[0030] Preferably, in S4, the optimal control parameters Kp, Ki, and Kd of the infusion flow rate PID controller are obtained through iterative optimization of the improved simulated cooking training algorithm. The specific steps are as follows:
[0031] Step1. Simulate the working conditions of the infusion flow rate control system and design a transfer function to describe the dynamic characteristics of the system.
[0032] Step2. Encode the parameters Kp, Ki, and Kd of the infusion flow rate PID controller as solutions in the search space of the improved simulated cooking training algorithm. As the algorithm iterates, the updated positions of the population individuals reflect the corresponding parameters of the infusion flow rate PID controller.
[0033] Step3. Initialize the parameters of the improved simulated cooking training algorithm, including the population size SearchAgents of the algorithm, the problem dimension dimension, the maximum number of iterations T, the upper limit ub of the search space, and the lower limit lb of the search space.
[0034] Step4. Calculate the fitness value of each individual in the current population according to the fitness function, compare the optimal fitness value of this iteration with the historical optimal value, and retain the optimal solution for subsequent iterations.
[0035] Step 5. Simulate the optimization process of each stage of the improved simulated cooking training algorithm, that is, update the Kp, Ki, and Kd parameters of the infusion flow rate PID controller;
[0036] Step 6. Determine whether the current iteration number reaches the maximum iteration number. If it reaches, exit the loop, output the global optimal solution of the algorithm search space, and assign it to the infusion flow rate PID controller as the three parameters of Kp, Ki, and Kd. Otherwise, return to execute Step 1.
[0037] Preferably, in Step 1, simulate the working conditions of the infusion flow rate control system, and design a transfer function to describe the dynamic characteristics of the system. The transfer function formula is:
[0038] ;
[0039] ;
[0040] ;
[0041] ;
[0042] In the formula, s represents the complex frequency domain variable in the Laplace transform, K is the system gain, reflecting the influence degree of the control signal on the system output, C represents the liquid discharge capacity of the infusion pump, is the total resistance of the system, including the pipeline resistance and the internal resistance of the infusion pump, and respectively reflect the dynamic response characteristics of the infusion pump and the dynamic response characteristics of the infusion pipeline and the fluid, represents the inertia of the infusion pump, is the viscous damping coefficient of the infusion pump, indicating the influence of the internal friction of the pump and the liquid resistance on the dynamic response. r is the inner diameter radius of the infusion tube, L is the length of the infusion tube, is the liquid medicine density.
[0043] Preferably, in Step 2, encode the parameters Kp, Ki, and Kd of the infusion flow rate PID controller as the solutions in the search space of the improved simulated cooking training algorithm. As the algorithm iterates, update the positions of the population individuals, that is, update the solutions in the algorithm search space, which is also to update the parameters of the infusion flow rate PID controller. The encoding vector is:
[0044] ;
[0045] In the formula, x is the encoding vector, that is, the solution in the search space of the improved simulated cooking training algorithm. Kp, Ki, and Kd are the proportional parameter, integral parameter, and differential parameter of the infusion flow rate PID controller respectively.
[0046] Preferably, in Step 4, the fitness value of each individual in the current population is calculated according to the fitness function, and the formula of the fitness function is:
[0047] ;
[0048] In the formula, is the fitness function, is the objective function value, λ is the regularization coefficient, is the regularization term.
[0049] Preferably, in Step 5, the optimization process of each stage of the improved simulated cooking training algorithm is simulated, and the specific steps are as follows:
[0050] Step 1: In the exploration stage of the simulation algorithm, by adding the maximum and minimum values of periodic changes and inertia weights, a dynamic inertia weight is introduced , and the mathematical model for updating the positions of the population individuals is improved, and formulas (2)-(3) are executed;
[0051] Step 2: In the development stage of the simulation algorithm, by introducing the influence of the global optimal solution and using a global information transfer mechanism, the mathematical model for updating the positions of the population individuals is improved, and formula (4) is executed.
[0052] Preferably, the mathematical model of the S5 infusion pump control signal is:
[0053] (5);
[0054] In the formula, is the infusion pump control signal, is the weight factor, Kp, Ki, and Kd are the three parameters of the infusion flow rate PID controller, is the infusion flow rate error, is the integral term of the infusion flow rate error, is the differential term of the infusion flow rate error, is the global optimization control signal, which is used as a reference for correcting the control signal, is the initial control signal, is the disturbance compensation signal, which is used to correct the influence of external disturbances on the control signal, is the global information fusion coefficient, which weighs the influence degrees of the initial control signal and the global optimization signal, and t is the time.
[0055] By adopting the above technical solutions, the beneficial effects of the present invention are as follows: By introducing a dynamic inertia weight and using a global information transmission mechanism, the simulated cooking training algorithm is improved, significantly enhancing the global search ability and local development ability of the algorithm, and avoiding the algorithm from falling into local optimality; The improved simulated cooking training algorithm is combined with an infusion flow rate PID controller to form an improved infusion flow rate PID controller, which accurately outputs the control signal of the infusion pump, improving the control ability of the infusion pump speed. At the same time, by comprehensively considering the flow rate error, adjustment time, and smoothness of the control signal, stable control of the infusion flow rate is achieved, ensuring the fast response and dynamic performance optimization of the system, and providing a safe, reliable, and effective solution for high-precision infusion flow rate control in medical scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 FIG. is a flowchart of an optimized method for infusion flow rate control based on an improved PID.
[0057] Figure 2 FIG. is a flowchart of the steps for iteratively optimizing the best control parameters of the infusion flow rate PID controller by the improved simulated cooking training algorithm.
[0058] Figure 3 FIG. is a comparison curve graph of the fitness values of the basic simulated cooking training algorithm and the improved simulated cooking training algorithm.
[0059] Figure 4 FIG. is a process graph of optimizing the parameter value Kp by the basic simulated cooking training algorithm and the improved simulated cooking training algorithm.
[0060] Figure 5 FIG. is a process graph of optimizing the parameter value Ki by the basic simulated cooking training algorithm and the improved simulated cooking training algorithm.
[0061] Figure 6 FIG. is a process graph of optimizing the parameter value Kd by the basic simulated cooking training algorithm and the improved simulated cooking training algorithm.
[0062] Figure 7 FIG. is a comparison graph of the optimized PID control effects of the basic simulated cooking training algorithm and the improved simulated cooking training algorithm. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0063] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a 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 those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0064] The present invention provides a technical solution: an optimization method for infusion flow rate control based on an improved PID, which specifically includes the following steps, as Figure 1 shown.
[0065] S1. Use a real-time monitoring device to obtain key operation data during the infusion process for analyzing the change in infusion flow rate and the operation state of the system.
[0066] S2. Dynamically match the change trend of the infusion flow rate monitored during the infusion process with the response of the control system to generate an infusion flow rate error .
[0067] Further, the expression of the infusion flow rate error in S2 is:
[0068] ;
[0069] In the formula, is the desired infusion flow rate, is the actual infusion flow rate.
[0070] S3. Input the infusion flow rate error into the improved infusion flow rate PID controller to output an infusion pump control signal.
[0071] S4. The improved infusion flow rate PID controller is specifically implemented as follows: establish an infusion flow rate model by simulating the flow rate dynamic characteristics of the infusion system, fuse the improved simulated cooking training algorithm with the infusion flow rate PID controller, and obtain the optimal control parameters Kp, Ki, and Kd of the infusion flow rate PID controller through iterative optimization of the improved simulated cooking training algorithm; the improved simulated cooking training algorithm includes: S41. In the algorithm exploration stage, introduce a dynamic inertia weight by adding the maximum and minimum values of periodic changes and inertia weights to improve the mathematical model of the position update of the population individuals; S42. In the algorithm development stage, improve the mathematical model of the position update of the population individuals by introducing the influence of the global optimal solution and using a global information transmission mechanism.
[0072] Further, in S4, establish an infusion flow rate model by simulating the flow rate dynamic characteristics of the infusion system, and the infusion flow rate model is:
[0073] (1);
[0074] In the formula, is the infusion flow rate, r is the inner diameter radius of the infusion tube, is the viscosity of the liquid medicine, L is the length of the infusion tube, is the pipeline length of the infusion regulating device, is the liquid medicine density, is the acceleration due to gravity, is the current liquid level height, is the liquid level height of the infusion terminal, is the cross-sectional area of the liquid medicine carrier, is the volume flow rate per unit time, and t is the time.
[0075] Furthermore, in S4, the simulated cooking training algorithm is improved. In the exploration stage of the S41 algorithm, by adding the maximum and minimum values of the periodic change and the inertia weight, a dynamic inertia weight is introduced , the dynamic inertia weight The expression of is:
[0076] (2);
[0077] In the formula, is the dynamic inertia weight, is the maximum value of the dynamic inertia weight, is the minimum value of the dynamic inertia weight, and is the period adjustment factor, is the current iteration number, and T is the maximum iteration number;
[0078] The mathematical model for updating the position of the population individuals in the exploration stage of the improved simulated cooking training algorithm is:
[0079] (3);
[0080] In the formula, is the new position of the i-th chef tutor in the j-th dimension, is the current position of the i-th chef tutor in the j-th dimension, r is a random number between 0 and 1, is the position of the current best chef tutor, and I is a random number in the set {1, 2}.
[0081] Furthermore, in S4, the simulated cooking training algorithm is improved. In the exploitation stage of the S42 algorithm, by introducing the influence of the global optimal solution and using a global information transfer mechanism, the mathematical model for updating the position of the population individuals is improved as:
[0082] (4);
[0083] In the formula, is the new position of the i-th chef student in the j-th dimension, is the current position of the i-th chef tutor in the j-th dimension, r is a random number between 0 and 1, is the chef tutor randomly selected by the student, I is a random number in the set {1, 2}, is the period adjustment factor, The position of the current best chef student.
[0084] Furthermore, in the S4, the optimal control parameters Kp, Ki, and Kd of the infusion flow rate PID controller are obtained through iterative optimization of the improved simulated cooking training algorithm, as Figure 2 shown. The specific steps are as follows:
[0085] Step1. Simulate the working conditions of the infusion flow rate control system and design a transfer function to describe the dynamic characteristics of the system;
[0086] Step2. Encode the parameters Kp, Ki, and Kd of the infusion flow rate PID controller as the solutions in the search space of the improved simulated cooking training algorithm. As the algorithm iterates, the updated positions of the population individuals reflect the corresponding parameters of the infusion flow rate PID controller;
[0087] Step3. Initialize the parameters of the improved simulated cooking training algorithm, including the population size SearchAgents of the algorithm, the problem dimension dimension, the maximum number of iterations T, the upper limit ub of the search space, and the lower limit lb of the search space;
[0088] Step4. Calculate the fitness value of each individual in the current population according to the fitness function, compare the optimal fitness value of this iteration with the historical optimal value, and retain the optimal solution for subsequent iterations;
[0089] Step5. Simulate the optimization process of each stage of the improved simulated cooking training algorithm, that is, update the Kp, Ki, and Kd parameters of the infusion flow rate PID controller;
[0090] Step6. Determine whether the current number of iterations has reached the maximum number of iterations. If so, exit the loop, output the global optimal solution in the search space of the algorithm, and assign it to the infusion flow rate PID controller as the three parameters Kp, Ki, and Kd. Otherwise, return to execute Step1.
[0091] Furthermore, in Step1, the working conditions of the infusion flow rate control system are simulated, and a transfer function is designed to describe the dynamic characteristics of the system. The transfer function formula is:
[0092] ;
[0093] ;
[0094] ;
[0095] ;
[0096] Where s represents the complex frequency domain variable in the Laplace transform, K is the system gain, reflecting the influence degree of the control signal on the system output, C represents the liquid discharging capacity of the infusion pump, is the total resistance of the system, including the pipeline resistance and the internal resistance of the infusion pump, and respectively reflect the dynamic response characteristics of the infusion pump and the dynamic response characteristics of the infusion pipeline and the fluid, represents the inertia of the infusion pump, is the viscous damping coefficient of the infusion pump, indicating the influence of the internal friction of the pump and the liquid resistance on the dynamic response, r is the inner diameter radius of the infusion tube, L is the length of the infusion tube, is the liquid density.
[0097] Further, in Step 2, the parameters Kp, Ki, and Kd of the infusion flow rate PID controller are encoded as the solutions in the search space of the improved simulated cooking training algorithm. As the algorithm iterates, the positions of the population individuals are updated, that is, the solutions in the search space of the algorithm are updated, which also means the parameters of the infusion flow rate PID controller are updated. The encoding vector is:
[0098] ;
[0099] Where x is the encoding vector, that is, the solution in the search space of the improved simulated cooking training algorithm, and Kp, Ki, and Kd are the proportional parameter, integral parameter, and differential parameter of the infusion flow rate PID controller respectively.
[0100] Further, in Step 4, the fitness value of each individual in the current population is calculated according to the fitness function. The formula of the fitness function is:
[0101] ;
[0102] Where is the fitness function, is the objective function value, λ is the regularization coefficient, is the regularization term.
[0103] Further, in Step 5, the optimization process of each stage of the improved simulated cooking training algorithm is simulated. The specific steps are as follows:
[0104] Step 1: Simulate the exploration stage of the algorithm. By adding the maximum and minimum values of periodic changes and inertia weights, the dynamic inertia weight is introduced to improve the mathematical model of the position update of the population individuals, and formulas (2)-(3) are executed;
[0105] Step 2: Simulate the development stage of the algorithm. By introducing the influence of the global optimal solution and using a global information transmission mechanism, the mathematical model of the position update of the population individuals is improved, and formula (4) is executed.
[0106] S5. The infusion pump control signal is used to control the speed of the infusion pump to achieve precise and stable control of the infusion flow rate.
[0107] Furthermore, the mathematical model of the S5 infusion pump control signal is:
[0108] (5);
[0109] In the formula, is the infusion pump control signal, is the weight factor, and Kp, Ki, and Kd are the three parameters of the PID controller for the infusion flow rate, is the infusion flow rate error, is the integral term of the infusion flow rate error, is the differential term of the infusion flow rate error, is the global optimization control signal, which serves as a reference for control signal correction, is the initial control signal, is the disturbance compensation signal, which is used to correct the influence of external disturbances on the control signal, is the global information fusion coefficient, which weighs the influence degrees of the initial control signal and the global optimization signal, and t is time.
[0110] To verify an optimized method for controlling the infusion flow rate based on the improved PID proposed in the present invention, simulation experiments are carried out through Matlab and Simulink. The optimized PID control of the improved simulated cooking training algorithm and the basic simulated cooking training algorithm is compared. First, the mathematical model of the basic simulated cooking training algorithm is improved through Matlab, and a PID control model of the infusion flow rate control system is established through Simulink; the parameters of the improved simulated cooking training algorithm are initialized, including the population size of the algorithm SearchAgents = 30, the problem dimension dimension = 3, the maximum number of iterations T = 30, the upper limit of the search space ub = 1, and the lower limit of the search space lb = 0. Run the Matlab program to obtain the comparison curve graph of the fitness values of the basic simulated cooking training algorithm and the improved simulated cooking training algorithm, as Figure 3As shown, the improved simulated cooking training algorithm reaches the optimal fitness value of 27.92 at the 19th iteration. From the fitness curve, it can be seen that the improved algorithm has significant advantages compared to the basic algorithm. Firstly, the improved algorithm shows a faster convergence speed during the optimization process. The fitness value drops rapidly in the first few generations, indicating that its global search ability has been enhanced. It can more efficiently explore the solution space and find potential excellent solution regions at an early stage. While the fitness value of the basic algorithm drops relatively slowly, indicating lower search efficiency in the initial stage. Secondly, the final fitness value of the improved algorithm is significantly lower than that of the basic algorithm, reflecting higher optimization accuracy. This shows that the improved algorithm has stronger local development ability in the later stage of optimization, can further refine the search and find better solutions. Generally speaking, the improved algorithm not only speeds up the convergence speed of the optimization process, but also significantly improves the final solution quality and search efficiency, reflecting the balanced optimization of global search and local search. It shows that the improved algorithm can more effectively optimize the performance of the infusion flow rate control system, thus achieving a more accurate and stable infusion flow rate control effect.
[0111] Furthermore, as Figures 4 - 6 shown, the improved simulated cooking training algorithm is used to tune the parameters of the flow rate PID controller of the infusion flow rate control system. The best PID control parameters obtained by the improved algorithm are Kp = 0.15, Ki = 0.13, Kd = 0.01, and the best PID control parameters obtained by the basic algorithm are Kp = 0.16, Ki = 0.15, Kd = 0.13. Inputting the best control parameters into the infusion flow rate PID controller, the best control effect of the infusion flow rate control system is obtained. Figure 7 Figure for comparing the optimization PID control effects of the basic simulated cooking training algorithm and the improved simulated cooking training algorithm. The set value is set to 3 units. From the figure, it can be seen that the improved simulated cooking training algorithm shows better performance than the basic algorithm in optimizing the PID controller. Firstly, in terms of the response speed of the system, the PID controller optimized by the improved algorithm can approach the set value faster, indicating that its dynamic response is more rapid and the adjustment ability in the initial stage is stronger. The infusion flow rate can quickly approach the set value. Secondly, the overshoot amount during the adjustment process is significantly reduced, and the infusion process is more stable, avoiding drug overdose or flow rate fluctuations caused by overshoot and ensuring the safety of infusion. In addition, the improved controller can enter the steady state faster, reflecting high-precision flow rate control ability and ensuring the accuracy and stability of the infusion dose. This optimization not only improves the accuracy and safety of the infusion control system, but also reduces the influence of dynamic errors on the control effect, ensuring a more efficient and reliable flow rate control effect for the infusion scenario.
Claims
1. An infusion flow rate control optimization method based on improved PID, characterized in that: The specific steps are: S1. Use the real-time monitoring device to obtain key operating data during the infusion process, which is used to analyze the changes in infusion flow rate and system operating status; S2. Dynamically match the infusion flow rate change trend monitored during the infusion process with the response of the infusion flow rate control system to generate an infusion flow rate error , the expression is: ; In the formula, is the expected infusion flow rate, is the actual infusion flow rate; S3, the infusion flow rate error Input to the improved infusion flow rate PID controller, and output the infusion pump control signal; wherein, the improved infusion flow rate PID controller is specifically implemented as follows: an infusion flow rate model is established by simulating the flow rate dynamic characteristics of the infusion system, and the improved simulated cooking training algorithm is integrated with the infusion flow rate PID controller, and the optimal control parameters Kp, Ki, and Kd of the infusion flow rate PID controller are obtained through iterative optimization of the improved simulated cooking training algorithm; wherein, the expression of the infusion flow rate model is: ; In the formula, is the infusion flow rate, r is the inner radius of the infusion tube, is the viscosity of the liquid medicine, L is the length of the infusion tube, is the length of the pipeline of the infusion regulating device, is the density of the liquid, is the acceleration due to gravity, is the current liquid level height, is the liquid level height at the infusion terminal, is the cross-sectional area of the drug liquid carrier, is the volume flow rate per unit time, t is the time; The improved cooking simulation training algorithm includes: (1) in the algorithm exploration phase, a dynamic inertia weight is introduced by adding periodic changes and the maximum value of the inertia weight. , the expression is: ; In the formula, is the dynamic inertia weight, is the maximum value of the dynamic inertia weight, is the minimum value of the dynamic inertia weight, and is the period adjustment factor, is the current number of iterations, T is the maximum number of iterations; The mathematical model for updating the position of individuals in the improved population in the algorithm exploration phase is expressed as: ; In the formula, is the new position of the i-th chef mentor in the j-th dimension, is the current position of the i-th chef mentor in the j-th dimension, r is a random number between 0 and 1, is the position of the current best chef mentor, and I is a random number in the set {1,2}; (2) In the algorithm development phase, the influence of the global optimal solution is introduced and a global information transmission mechanism is used to improve the mathematical model of the position update of individuals in the population. Specifically: ; In the formula, is the new position of the i-th chef student in the j-th dimension, The chef instructors are randomly selected for the students. Positions for the best current chef students; S4. The infusion pump control signal is used to control the infusion pump speed to achieve accurate and stable control of the infusion flow rate.
2. The infusion flow rate control optimization method based on improved PID according to claim 1, characterized in that: In S3, the optimal control parameters Kp, Ki, and Kd of the infusion flow rate PID controller are obtained by iterative optimization through the improved simulated cooking training algorithm. The specific steps are as follows: Step 1, simulate the working condition of the infusion flow rate control system and design the transfer function to describe the dynamic characteristics of the system; Step 2, encode the parameters Kp, Ki, and Kd of the infusion flow rate PID controller as the solution of the search space of the improved simulated cooking training algorithm. As the algorithm iterates, the updated individual positions of the population reflect the parameters of the corresponding infusion flow rate PID controller; Step 3, initialize the parameters of the improved simulated cooking training algorithm, including the algorithm's population size SearchAgents, problem dimension dimension, maximum number of iterations T, upper limit ub of the search space, and lower limit lb of the search space; Step 4: Calculate the fitness value of each individual in the current population according to the fitness function, compare the optimal fitness value of this iteration with the historical optimal fitness value, and retain the optimal solution for subsequent iterations; Step 5, simulate and improve the optimization process of each stage of the simulated cooking training algorithm, that is, update the Kp, Ki, and Kd parameters of the infusion flow rate PID controller; Step 6. 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 infusion flow rate PID controller as the three parameters Kp, Ki, and Kd. Otherwise, return to execute Step 1.
3. The infusion flow rate control optimization method based on improved PID according to claim 2, characterized in that: The mathematical model of the infusion pump control signal in S4 is: ; In the formula, is the infusion pump control signal, is the weight factor, Kp, Ki, Kd are the three parameters of the infusion flow rate PID controller, is the infusion flow rate error, is the integral term of the infusion flow rate error, is the differential term of the infusion flow rate error, To globally optimize the control signal, as a reference for control signal correction, is the initial control signal, It is a disturbance compensation signal, which is used to correct the influence of external disturbance on the control signal. is the global information fusion coefficient, which weighs the influence of the initial control signal and the global optimization signal, and t is the time.
Citation Information
Patent Citations
Numerical control high-speed drilling and milling machine control method based on improved Hemis algorithm
CN117970783A
Blood pump optimization control method for blood filter
CN118576887A