An adaptive airway pressure control method for a ventilator
By improving the snake vulture optimization algorithm and optimizing the PID control parameters of the ventilator airway pressure control system, the problems of insufficient response speed of traditional PID control and high sensitivity of algorithm parameters are solved, the control accuracy and robustness are improved, and the ventilator is ensured. Performance and stability of airway pressure control system.
Patent Information
- Application Number
- CN202411354064.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-09-27
AI Technical Summary
Traditional PID control has insufficient response speed in ventilator airway pressure regulation, and the snake vulture optimization algorithm is prone to fall into local optimal solutions, with high parameter sensitivity, affecting control accuracy and robustness.
Improve the snake vulture optimization algorithm, and improve the local search capability and parameter robustness of the algorithm by introducing chaotic mapping, particle swarm and cosine strategies, optimize PID control parameters, and improve the performance and response speed of the ventilator airway pressure control system.
It improves the control accuracy and response speed of the PID controller, enhances the performance and robustness of the ventilator airway pressure control system, and ensures that the patient obtains stable and appropriate airway pressure.
Smart Images

Figure CN118884813B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of PID technology optimization, and in particular relates to an adaptive airway pressure control method for a ventilator. Background Art
[0002] A ventilator is a medical device that helps patients breathe by providing mechanical ventilation. It is particularly suitable for patients with respiratory insufficiency or respiratory failure. It can accurately adjust and monitor airflow, pressure and oxygen concentration to ensure that patients get enough oxygen and appropriate ventilation to maintain normal blood oxygen levels and carbon dioxide emissions. In a ventilator, the regulation of airway pressure is particularly important for the treatment of patients. Airway pressure refers to the pressure applied by the ventilator to the patient's airway during the inhalation process. It directly affects the ventilation effect and the patient's comfort. The correct airway pressure can ensure that the patient gets enough ventilation while avoiding discomfort or injury to the patient caused by excessive or low airway pressure.
[0003] PID control responds to current errors through proportional operation (P), accumulates past errors through integral operation (I), and predicts the changing trend of future errors through differential operation (D), thereby achieving precise control of the controlled object. However, the performance of PID control is highly dependent on the selection of control parameters (Kp, Ki, Kd). Traditional PID control relies on staff to conduct repeated experiments and adjust control parameters according to system characteristics, which is a complex and time-consuming process. In actual applications, PID control calculates the pressure value that needs to be adjusted based on real-time airway pressure sensor feedback, and achieves it by adjusting the air source or valve of the ventilator. Although PID controllers can provide good control effects in most cases, traditional PID control may not be fast enough in situations where high system response speed is required (such as when the ventilator needs to respond quickly to changes in airway pressure).
[0004] Optimizing PID control parameters through intelligent optimization algorithms is of great significance and role, especially in complex and high-demand ventilator airway pressure control systems. Intelligent optimization algorithms can automatically adjust the parameters of PID controllers to improve the control performance and adaptability of the system; Secretary Vulture Optimization Algorithm (SBOA) is a new type of swarm intelligence optimization algorithm, inspired by the behavior of secretary vultures preying on snakes; the algorithm simulates the search and attack behavior exhibited by secretary vultures during hunting, and has the characteristics of strong global search capabilities and fast convergence speed. However, due to the strong global search capability, when optimizing PID control parameters, it may fall into the local optimal solution too early in the parameter search process, resulting in the inability to find the global optimal solution, and the performance of SBOA is sensitive to the algorithm parameters, and the parameters need to be properly adjusted to obtain the best effect. Summary of the invention
[0005] The purpose of the present invention is to propose an adaptive airway pressure control method for a ventilator, which improves the secretary vulture optimization algorithm to prevent the algorithm from falling into a local optimal solution too early, reduces the parameter sensitivity of the algorithm, improves the local search ability of the algorithm, and further optimizes the three PID control parameters in the ventilator airway pressure control system, improves the control accuracy and response speed of the PID controller, and thus enhances the performance and robustness of the ventilator airway pressure control system.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] An adaptive airway pressure control method for a ventilator, the specific steps are as follows:
[0008] Step 1: Design the ventilator airway pressure control system and use Simulink software to build a ventilator airway pressure control system simulation model.
[0009] Step 2: Improve the secretary vulture optimization algorithm and use Matlab software to establish the improved secretary vulture optimization algorithm mathematical model.
[0010] Step 3: Select a suitable objective function and iteratively optimize the PID control parameters by improving the secretary vulture optimization algorithm.
[0011] Step 4: After the algorithm iteration is completed, the three PID control optimal parameters are output to the ventilator airway pressure control system, and the ventilator airway pressure control system simulation model is run to verify the superiority of the improved secretary vulture optimization algorithm.
[0012] Furthermore, in step 1, a simulation model of the ventilator airway pressure control system is constructed, and the specific steps are as follows:
[0013] S11. Establish a simulation model for the ventilator airway pressure control system, convert the airway pressure control problem into a mathematical model to be optimized, and design a transfer function to simulate the actual situation of the airway pressure control system when the ventilator is working. The transfer function is:
[0014]
[0015] Where G is the transfer function value, and s is the complex frequency domain variable after Laplace transformation;
[0016] S12. Design a ventilator airway pressure control system model, including: a subtractor module, an improved secretary vulture optimization algorithm module, a PID controller module, a controlled object module, and an airway pressure sensor;
[0017] S13. Set the target airway pressure Pref, and use a subtractor to subtract Pref from the actual airway pressure P(λ) collected in real time to obtain the error value e(λ); pass e(λ) into the PID controller, improve the griffon optimization algorithm module to optimize the three parameters of the PID controller, and output the control quantity after PID adjustment to the controlled object module; the controlled object module simulates the actual working situation of the airway pressure control system to calculate the control quantity, and outputs the actual airway pressure y(λ); the airway pressure sensor collects the signal, calculates the signal, and outputs the actual airway pressure P(λ) to the subtractor to complete the closed-loop control of the ventilator airway pressure control system.
[0018] Furthermore, in step 2, the secretary vulture optimization algorithm is improved, and the specific steps are as follows:
[0019] S21, introduce chaos mapping to improve the algorithm initialization position formula. By combining sine function, Tent function and cosine function, the chaotic characteristics of the system are improved and the parameter sensitivity of the algorithm is reduced. The improved formula is:
[0020] X1=LB+r1×(Ub-Lb); (1)
[0021]
[0022] In formula (1), X1 is the randomly generated individual position, Ub and Lb are the upper and lower bounds of the algorithm search space, and r1 is a random number between (0,1];
[0023] In formula (2), X i is the position of individual i in the population, i = 1,…, N, X i+1 is the position of the i+1 individual generated by the chaotic mapping, r2 is a random number between (0,1], and Ub and Lb have the same meaning as above;
[0024] S22. The particle swarm algorithm is integrated to improve the position update formula of the secretary vulture's search for prey. The update strategy of the secretary vulture algorithm is more diversified, and the local search ability of the algorithm is improved. The improved formula is:
[0025] X i (t+1)=X i (t)+V i (t+1); (3)
[0026] In formula (3), X i (t+1) is the updated position of individual i, X i (t) is the position of individual i in the current iteration, V i (t+1) is the speed at which the secretary bird searches for prey, V i The calculation formula for (t+1) is:
[0027] V i (t+1)=ωV i (t)+c1×(PX-X i (t))×r3+c2×(GX-X i (t))×r3; (4)
[0028] In formula (4), V i (t+1) is the updated secretary bird speed, V i (t) is the speed of individual i in the current iteration, PX is the best individual position in the current iteration, GX is the global best individual position, c1 and c2 are learning factors, r3 is a random number between (0,1], and w is the inertia weight. When the algorithm iterates to the middle and late stages, the value of w gradually decreases, so that X i (t) The updated position of the individual is closer to GX, which improves the local search ability of the algorithm and introduces fitness into the calculation formula of w. i (t) is very close to the position of GX, the value of w is large, maintaining the independence of the individual secretary vultures and avoiding the algorithm from falling into the local optimal solution. The calculation formula of w is:
[0029]
[0030] In formula (5), w is the inertia weight, t is the current iteration number, T is the total iteration number, and F i is the fitness of individual i, F GX is the fitness of GX, i.e. the optimal fitness;
[0031] S23, introduce the sine and cosine strategy to improve the position update formula in the algorithm development stage. The periodic characteristics of the sine and cosine functions can be used to make the position update process more diverse and flexible, helping the algorithm to jump out of the local optimal solution. The improved formula is:
[0032] Where, X i (t+1) is the updated position of individual i, X i (t) is the position of individual i in the current iteration, PX is the best individual position in the current iteration, RB is a random number between (0, Dim], Dim is the dimension of the individual search space, RD is a random integer between (0, N], K is a random integer between 1 or 2, r, r4, r5 are random numbers between (0, 1], and the other parameters have the same meanings as above.
[0033] Further, in the third step, ITSE is selected as the performance evaluation index function of the PID controller and also the objective function of the improved secretary bird optimization algorithm. Compared with other performance indicators, ITSE is more sensitive to the overshoot and oscillation of the control system, which helps to avoid over-control, thereby enhancing the stability of the ventilator airway pressure control system and preventing the airway pressure from being adjusted too quickly, thus threatening the patient's life and health. The formula of ITSE is:
[0034]
[0035] In the formula, J is the fitness value calculated by ITSE, λ is the operation time of the control system, and e 2 (λ) is the squared error value.
[0036] Further, in the third step, the PID control parameters are iteratively optimized by the improved secretary bird optimization algorithm. The specific steps are as follows:
[0037] S31. Select a suitable objective function, and initialize the total number of iterations T, population size N, upper and lower bounds of the search space [Ub Lb], and search space dimension Dim of the algorithm;
[0038] S32. Encode the Kp, Ki, and Kd parameters of the PID controller as the latitude values of the search space of the secretary bird optimization algorithm;
[0039] S32. Introduce chaotic mapping and improve the formula for initializing the position of the algorithm. The improved formula is the same as above;
[0040] S33. Calculate the fitness of each individual position, record the position of the individual with the minimum fitness as the current iteration's best individual position, and determine the global best individual position by means of greedy selection. The formula of greedy selection is:
[0041]
[0042] In the formula, F PX is the fitness of the PX individual position, F GX is the fitness of the GX individual position, and the meanings of other parameters are the same as above; S34. When the algorithm is in the exploration stage and t < T / 3, the algorithm simulates the behavior of the secretary bird individual searching for prey to update the position, and fuses the particle swarm algorithm to improve the formula for updating the position of the secretary bird searching for prey, which is the same as above;
[0043] S35. When T / 3 < t < 2T / 3, the algorithm simulates the behavior of the secretary bird individual consuming the energy of the prey to update the position. The formula is:
[0044] In the formula, X i (t + 1) is the updated position of the i-th individual, X i(t) is the position of the i-th individual in the current iteration, and the meanings of other parameters are the same as above;
[0045] S36. When 2T / 3 < t < T, the algorithm simulates the behavior of the secretary bird attacking prey to update the position, and the formula is:
[0046]
[0047] In the formula, X i (t + 1) is the updated position of the i-th individual, X i (t) is the position of the i-th individual in the current iteration, RL is the column vector generated by the Rhine flight, and the meanings of other parameters are the same as above;
[0048] S37. When the algorithm is in the exploration stage, the sine-cosine strategy is introduced to improve the position update formula in the exploration stage, which is the same as above;
[0049] S38. Check whether t is greater than the total number of iterations T. If so, the algorithm outputs the optimal solution, decodes the optimal solution, outputs the optimal parameters to the PID controller of the simulation model, and runs the simulation model. If not, return to S33 to continue the iteration. The meanings of t and T are the same as above.
[0050] Furthermore, in the fourth step, three optimal PID control parameters are output to the ventilator airway pressure control system, and the simulation model of the ventilator airway pressure control system is run to verify the superiority of the improved secretary bird optimization algorithm. The specific steps are as follows: S41. Decode the three-dimensional values of the optimal solution and transfer them to the three parameters Kp, Ki, and Kd of the airway pressure PID controller; S42. Run the simulation model of the ventilator airway pressure control system to verify the superiority of the improved secretary bird optimization algorithm;
[0051] S43. Transfer the fitness value calculated by the objective function to the improved secretary bird optimization algorithm to realize the complete operation of the improved secretary bird optimization algorithm for optimizing the PID controller of the ventilator airway pressure control system.
[0052] By adopting the above technical solutions, the present invention achieves the following beneficial effects:
[0053] The present invention proposes an adaptive airway pressure control method for a ventilator. The present invention applies an improved secretary vulture optimization algorithm to optimize the PID controller parameters of the ventilator airway pressure control system for the first time. The chaotic characteristics of the system are improved by introducing a chaotic mapping to improve the algorithm initialization position formula. The particle swarm algorithm is integrated to improve the secretary vulture's prey search behavior position update formula, improve the algorithm's local search ability, reduce the algorithm's parameter sensitivity, introduce a sine-cosine strategy to improve the algorithm development stage position update formula, help the algorithm jump out of the local optimal solution, and then optimize the Kp, Ki, Kd control parameters in the ventilator airway pressure control system, improve the control accuracy and response speed of the PID controller, and thus enhance the performance and robustness of the ventilator airway pressure control system. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 Flowchart for optimizing the ventilator airway pressure control system to improve the secretary vulture optimization algorithm.
[0055] Figure 2 This is a model diagram of the ventilator airway pressure control system.
[0056] Figure 3 This is a simulation diagram of the ventilator airway pressure control system.
[0057] Figure 4 Parameter curve diagram for optimizing the airway pressure control system of the ventilator to improve the secretary vulture optimization algorithm.
[0058] Figure 5 This is a fitness curve comparison chart of the common secretary vulture optimization algorithm and the improved secretary vulture optimization algorithm.
[0059] Figure 6 This is a comparison chart of the PID curves of the ventilator airway pressure control system optimized by the ordinary secretary vulture optimization algorithm and the improved secretary vulture optimization algorithm. DETAILED DESCRIPTION
[0060] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. The following embodiments are only a part of the embodiments of the present invention and are used to more clearly illustrate the technical solutions of the present invention. It can be understood that the specific embodiments are only used to explain the present invention, but the implementation methods of the present invention are not limited thereto.
[0061] The present invention provides an adaptive airway pressure control method for a ventilator, such as Figure 1 As shown in the figure, the specific steps of optimizing the ventilator airway pressure control system by improving the secretary vulture optimization algorithm are as follows:
[0062] Step 1: Design a ventilator airway pressure control system model and use Simulink software to build a simulation model of the ventilator airway pressure control system. The specific steps are as follows:
[0063] S11. Establish a simulation model for the ventilator airway pressure control system, convert the airway pressure control problem into a mathematical model to be optimized, and design a transfer function to simulate the actual situation of the airway pressure control system when the ventilator is working. The transfer function is:
[0064]
[0065] Where G is the transfer function value, and s is the complex frequency domain variable after Laplace transformation;
[0066] S12. Design a ventilator airway pressure control system model, such as Figure 2 As shown, it includes: a subtractor module, an improved secretary vulture optimization algorithm module, a PID controller module, a controlled object module, and an airway pressure sensor;
[0067] S13. Establish a simulation model of the ventilator airway pressure control system, such as Figure 3 As shown, it includes two parts: the ventilator airway pressure control system part is composed of an output signal module, a subtractor module, an improved eagle optimization algorithm module, a PID controller module, a transfer function module, and an oscilloscope module; the objective function part is composed of an absolute value module, a timer module, a multiplier module, an integrator module, and an output fitness module;
[0068] S14. In the ventilator, the airway pressure has peak pressure, platform pressure and exhalation pressure. To simulate the actual operating conditions of the ventilator airway pressure control system, the initial target airway pressure Pref is set to 25cmH2O, the peak pressure does not exceed 30cmH2O, the exhalation pressure is 15cmH2O, and the target airway pressure Pref is 15cmH2O after the control system runs for 20s;
[0069] S15. The operation process of the simulation model of the ventilator airway pressure control system is as follows: set the target airway pressure Pref, and use a subtractor to subtract Pref from the actual airway pressure P(λ) collected in real time to obtain the error value e(λ); pass e(λ) to the PID controller module, and use the improved snake vulture optimization algorithm module to optimize the three parameters of the PID controller, and output the control quantity after PID adjustment to the transfer function module; the transfer function module simulates the actual working situation of the airway pressure control system to calculate the control quantity, and outputs the actual airway pressure P(λ) to the oscilloscope and subtractor module; the objective function part calculates e(λ) according to the ITSE formula to obtain the comprehensive performance index of the ventilator airway pressure control system, that is, the fitness of the improved snake vulture optimization algorithm; and completes the closed-loop control of the ventilator airway pressure control system.
[0070] Step 2: Improve the secretary vulture optimization algorithm and use Matlab software to establish the improved secretary vulture optimization algorithm mathematical model. The specific steps are as follows:
[0071] S21, introduce the chaos mapping improved algorithm to initialize the position formula, the improved formula is
[0072] X1=Lb+r1×(Ub-Lb); (1)
[0073]
[0074] In formula (1), X1 is a randomly generated individual, Ub and Lb are the upper and lower bounds of the algorithm search space, and r1 is a random number between (0,1];
[0075] In formula (2), X i is the i-th individual in the population, i=1,…,N,X i+1 is the i+1th individual generated by chaotic mapping, r2 is a random number between (0,1], and Ub and Lb have the same meanings as above;
[0076] S22, fusion particle swarm algorithm improves the position update formula of secretary bird searching for prey behavior, the improved formula is:
[0077] X i (t+1)=X i (t)+V i (t+1); (3)
[0078] In formula (3), X i (t+1) is the updated position of individual i, X i (t) is the position of individual i in the current iteration, V i (t+1) is the speed at which the secretary bird searches for prey, V i The calculation formula for (t+1) is:
[0079] V i (t+1)=ωV i (t)+c1×(PX-X i (t))×r3+c2×(GX-X i (t))×r3; (4)
[0080] In formula (4), V i (t+1) is the updated secretary bird speed, V i (t) is the speed of individual i in the current iteration, PX is the best individual position in the current iteration, GX is the global best individual position, c1 and c2 are learning factors, with a value of 2, r3 is a random number between (0,1], and w is the inertia weight. When the algorithm iterates to the middle and late stages, the value of w gradually decreases, so that X i (t) The updated position of the individual is closer to GX, which improves the local search ability of the algorithm and introduces fitness into the calculation formula of w. i(t) is very close to the position of GX, the value of w is large, maintaining the independence of the individual secretary vultures and avoiding the algorithm from falling into the local optimal solution. The calculation formula of w is:
[0081]
[0082] In formula (5), w is the inertia weight, t is the current iteration number, T is the total iteration number, and F i is the fitness of individual i, F GX is the fitness of GX, i.e. the global optimal fitness;
[0083] S23, introduce the sine and cosine strategy to improve the position update formula in the algorithm development phase. The improved formula is:
[0084]
[0085] Where, X i (t+1) is the updated position of individual i, X i (t) is the position of individual i in the current iteration, PX is the best individual position in the current iteration, RB is a random number between (0, Dim], Dim is the individual position dimension, RD is a random integer between (0, N], K is a random integer between 1 or 2, r, r4, r5 are random numbers between (0, 1], and the other parameters have the same meanings as above.
[0086] Step 3: Select a suitable objective function and iteratively optimize the PID control parameters by improving the secretary vulture optimization algorithm. The specific steps are as follows:
[0087] S31. Select ITSE as the objective function of the algorithm, initialize the total number of iterations T of the algorithm to 20, the population size N to 30, the upper and lower bounds of the search space [Ub Lb] to [5 0], and the search space dimension Dim to 3. The formula of ITSE is:
[0088]
[0089] In the formula, J is the fitness value calculated by ITSE, λ is the running time of the control system, and e 2 (λ) is the square error value;
[0090] S32, encoding the Kp, Ki, and Kd parameters of the PID controller into latitude values of the search space of the secretary vulture optimization algorithm;
[0091] S32, introduce chaotic mapping, improve the algorithm initialization position formula, the improved formula is the same as above;
[0092] S33. Calculate the fitness of each individual's position, record the position of the individual with the minimum fitness as the current iteration's best individual position, and determine the global best individual position through greedy selection. The formula for greedy selection is:
[0093]
[0094] In the formula, F PX is the fitness of the position of the PX individual, F GX is the fitness of the position of the GX individual, and the meanings of other parameters are the same as above; S34. When the algorithm is in the exploration stage and t < T / 3, the algorithm simulates the behavior of the secretary bird individual searching for prey to update the position. The formula for updating the position by integrating the particle swarm algorithm to improve the secretary bird's prey-searching behavior is the same as above;
[0095] S35. When T / 3 < t < 2T / 3, the algorithm simulates the behavior of the secretary bird individual consuming the energy of the prey to update the position. The formula is:
[0096] In the formula, X i (t + 1) is the updated position of the i-th individual, X i (t) is the position of the i-th individual in the current iteration, and the meanings of other parameters are the same as above;
[0097] S36. When 2T / 3 < t < T, the algorithm simulates the behavior of the secretary bird individual attacking the prey to update the position. The formula is:
[0098]
[0099] In the formula, X i (t + 1) is the updated position of the i-th individual, X i (t) is the position of the i-th individual in the current iteration, RL is the column vector generated by the Rhine flight, and the meanings of other parameters are the same as above;
[0100] S37. When the algorithm is in the exploitation stage, introduce the sine-cosine strategy to improve the position update formula in the exploitation stage of the algorithm. The formula is the same as above;
[0101] S38. Check whether t is greater than the total number of iterations T. If so, the algorithm outputs the optimal solution, decodes the optimal solution, outputs the optimal parameters to the PID controller of the simulation model, and runs the simulation model. If not, the algorithm returns to S33 to continue iterative optimization. The meanings of t and T are the same as above.
[0102] Step 4. After the algorithm iteration ends, output three optimal PID control parameters to the ventilator airway pressure control system, run the simulation model of the ventilator airway pressure control system, and verify the superiority of the performance of the improved secretary bird optimization algorithm. The specific steps are: S41. Set the running time of the simulation model to 50 s and the sampling time to 0.5 s;
[0103] S42, decode the three dimensional values of the optimal solution and pass them to the three parameters Kp, Ki, and Kd of the airway pressure PID controller, such as Figure 4 As shown, the optimal Kp, Ki, and Kd parameters are: 1.6070, 0.4082, and 0.4078;
[0104] S43, running the simulation model of the ventilator airway pressure control system to verify the superiority of the improved secretary vulture optimization algorithm;
[0105] S44, passing the fitness value calculated by the objective function to the improved secretary vulture optimization algorithm, so as to realize the complete operation of the improved secretary vulture optimization algorithm in optimizing the PID controller of the ventilator airway pressure control system.
[0106] like Figure 5 As shown in the figure, the fitness curves of the ordinary secretary vulture optimization algorithm and the improved secretary vulture optimization algorithm when optimizing the PID controller parameters of the ventilator airway pressure control system are compared and analyzed. It can be seen that in the initial stage of the algorithm, the fitness of the improved algorithm is greater than that of the ordinary algorithm, which shows that the chaotic characteristics of the initial solution of the improved algorithm are greater than those of the ordinary algorithm, which improves the search range of the algorithm. In the early stage of algorithm iteration, the improved secretary vulture optimization algorithm converges very quickly. Although it falls into the local optimal solution, it can jump out quickly. The convergence speed of the ordinary algorithm is also very objective, but after the 15th iteration, the algorithm falls into the local optimal solution and cannot jump out. In the later stage of algorithm iteration, the improved algorithm continues to maintain efficient global search and local accuracy capabilities, and finally reaches the best fitness of 298.172, which is better than the 337.3693 of the ordinary algorithm. This shows that the improved secretary vulture optimization algorithm has obvious performance advantages when applied to optimize the PID controller parameters of the ventilator airway pressure control system, and significantly improves the performance and robustness of the control system.
[0107] like Figure 6 As shown in the figure, the fitness curves, response speed, overshoot and stabilization time of the ordinary secretary vulture optimization algorithm and the improved secretary vulture optimization algorithm when optimizing the PID controller parameters of the ventilator airway pressure control system are compared and analyzed. It can be seen that the response speed of the improved algorithm and the ordinary algorithm are comparable. Both reach the target value of 20cmH2O in 3s, and the peak airway pressure of neither exceeds 30cmH2O. However, the overshoot of the improved algorithm is smaller than that of the ordinary algorithm, and the stabilization time is much faster than that of the ordinary algorithm. It reaches stability in 8s, while the ordinary algorithm reaches a stable state in 12s. When the running time reaches 20s, the target airway pressure changes from 25cmH2O to 15cmH2O. The performance of the improved algorithm is also better than that of the ordinary algorithm. This shows that the improved secretary vulture optimization algorithm is effective in optimizing the PID controller parameters of the ventilator airway pressure control system.
[0108] In summary, the present invention provides an adaptive airway pressure control method for a ventilator. The method optimizes the PID controller parameters of the ventilator airway pressure control system by improving the secretary vulture optimization algorithm, thereby improving the dynamic response performance and stability of the PID controller, enabling the controller to quickly respond to changes in airway pressure and reduce the overshoot and stabilization time of the controller, thereby ensuring the performance and robustness of the ventilator airway pressure control system and ensuring that the patient receives a stable and appropriate airway pressure. Through this optimization method, the overall performance of the ventilator airway pressure control system is significantly improved.
Claims
1. An adaptive airway pressure control method for a ventilator, characterized in that: The specific steps are as follows: Step 1: Design a ventilator airway pressure control system, and use Simulink software to build a simulation model of the ventilator airway pressure control system; Step 2: Improve the snake vulture optimization algorithm by introducing a chaotic map, a sine-cosine strategy, and a fusion particle swarm algorithm. Use Matlab software to establish a mathematical model of the improved snake vulture optimization algorithm. Specifically: S21. Introduce a chaotic map to improve the formula for initializing the position of the algorithm. The improved formula is X1 = Lb + r1 × (Ub - Lb); (1) In formula (1), X1 is the randomly generated individual position, Ub and Lb are the upper and lower bounds of the algorithm search space, and r1 is a random number with a value between (0, 1]; In formula (2), X i is the position of individual i in the population, i = 1, ..., N, N is the population size, X i+1 is the position of the i+1 individual generated by the chaotic mapping, r2 is a random number between (0,1], and Ub and Lb have the same meaning as above; S22. Integrate the particle swarm algorithm to improve the formula for updating the position of the snake vulture's prey search behavior. The improved formula is: X i (t+1)=X i (t)+V i (t+1); (3) In formula (3), X i (t+1) is the updated position of individual i, X i (t) is the position of individual i in the current iteration, V i (t+1) is the speed at which the secretary bird searches for prey, V i The calculation formula for (t+1) is: V i (t+1)=ωV i (t)+c1×(PX-X i (t))×r3+c2×(GX-X i (t))×r3; (4) In formula (4), V i (t+1) is the updated secretary bird speed, V i (t) is the speed of individual i in the current iteration, PX is the best individual position in the current iteration, GX is the global best individual position, c1 and c2 are learning factors, r3 is a random number between (0,1], and w is the inertia weight. The calculation formula of w is: In formula (5), w is the inertia weight, t is the current iteration number, T is the total iteration number, and F i is the fitness of individual i, F GX is the fitness of GX, i.e. the optimal fitness; S23. Introduce a sine-cosine strategy to improve the formula for updating the position in the algorithm development stage. The improved formula is: Where, X i (t+1) is the updated position of individual i, X i (t) is the position of individual i in the current iteration, PX is the best individual position in the current iteration, RB is a random number between (0, Dim], Dim is the dimension of the algorithm search space, RD is a random integer between (0, N], K is a random integer between 1 or 2, r, r4, r5 are random numbers between (0, 1], and the other parameters have the same meanings as above; Step 3: Select a suitable objective function, and use the improved snake vulture optimization algorithm to iteratively optimize the PID control parameters; Step 4: After the algorithm iteration ends, output three optimal PID control parameters to the ventilator airway pressure control system, and run the simulation model of the ventilator airway pressure control system.
2. The adaptive airway pressure control method for a ventilator according to claim 1, characterized in that: In step 1, when building the simulation model of the ventilator airway pressure control system, it includes two parts: The ventilator airway pressure control system part consists of an output signal module, a subtractor module, an improved snake vulture optimization algorithm module, a PID controller module, a transfer function module, and an oscilloscope module. The objective function part consists of an absolute value module, a timer module, a multiplier module, an integrator module, and an output fitness module.
3. The adaptive airway pressure control method for a ventilator according to claim 2, characterized in that: In step 3, when selecting a suitable objective function and using the improved snake vulture optimization algorithm to iteratively optimize the PID control parameters, the specific steps are as follows: S31. Select a suitable objective function, and initialize the total number of algorithm iterations T, the population size N, the upper and lower bounds of the search space [Ub Lb], and the search space dimension Dim; S32. Encode the Kp, Ki, and Kd parameters of the PID controller as the latitude values of the search space of the snake vulture optimization algorithm; S32. Introduce a chaotic map to improve the formula for initializing the position of the algorithm. The improved formula is the same as above; S33. Calculate the fitness of each individual position, record the individual position with the minimum fitness as the current iteration's best individual position, and determine the global best individual position through a greedy selection method. The formula for greedy selection is: In the formula, F PX is the fitness of the individual position of PX, F GX is the fitness of the individual position of GX, and the other parameters have the same meanings as above; S34. When the algorithm is in the exploration stage and t < T / 3, the algorithm simulates the snake vulture's prey search behavior to update the position. The formula for integrating the particle swarm algorithm to improve the snake vulture's prey search behavior position update formula is the same as above. The meanings of t and T are the same as above; S35. When T / 3 < t < 2T / 3, the algorithm simulates the snake vulture's behavior of consuming prey energy to update the position. The formula is: Where, X i (t+1) is the updated position of the i-th individual, X i (t) is the position of the i-th individual in the current iteration, and the other parameters have the same meanings as above; S36. When 2T / 3 < t < T, the algorithm simulates the snake vulture's behavior of attacking prey to update the position. The formula is: Where, X i (t+1) is the updated position of individual i, X i (t) is the individual position of the current iteration i, RL is the column vector generated by Rhine flight, and the other parameters have the same meanings as above; S37. When the algorithm is in the development stage, introduce a sine-cosine strategy to improve the formula for updating the position in the algorithm development stage. The formula is the same as above; S38, check whether t is greater than the total number of iterations T. If so, the algorithm outputs the optimal solution, decodes the optimal solution, outputs the optimal parameters to the PID controller of the simulation model, and runs the simulation model. If not, return to S33 to continue iterating. The meanings of t and T are the same as above.
