A method for controlling oxygen supply speed of emergency breathing system
By monitoring the patient's breathing status in real time and building an oxygen supply demand prediction model, combining PID controller and improved flood algorithm, dynamically adjusting the oxygen supply speed, the problem of insufficient or excessive oxygen supply in the traditional oxygen supply mode is solved, and the precise control of the oxygen supply speed and the stability of the system are achieved.
Patent Information
- Application Number
- CN202510156905.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-02-13
AI Technical Summary
The traditional fixed oxygen supply speed model is difficult to meet the different needs of patients, which can easily lead to insufficient or excessive oxygen supply, affecting the effectiveness of emergency treatment.
By monitoring the patient's respiratory status in real time, combining the respiratory rate, inspiration time, inspiration flow rate, blood oxygen concentration and key parameters of the external environment, an oxygen supply demand prediction model is built, the oxygen supply speed is dynamically adjusted, and the respiratory system oxygen supply speed PID controller is designed, and the controller parameters are optimized in combination with the improved flood algorithm.
It realizes accurate control and stable adjustment of oxygen supply speed, improves the system's dynamic response ability and steady-state accuracy, and ensures the safety, reliability and stability of the oxygen supply system.
Smart Images

Figure CN119620794B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of PID control optimization, and in particular relates to an emergency breathing system oxygen supply speed control method. Background Art
[0002] With the continuous development of medical technology, respiratory oxygen supply equipment is increasingly used in the rescue and treatment of patients with respiratory insufficiency. However, in emergency situations, the oxygen supply demand of patients is often a highly dynamic and complex problem. The traditional fixed oxygen supply speed mode is difficult to meet the differentiated needs of patients, which easily leads to insufficient or excessive oxygen supply, further aggravating the patient's condition or increasing medical risks. The working characteristics of the respiratory system, such as respiratory rate, inhalation time, blood oxygen concentration, and external environmental factors, have a great influence on the demand for oxygen supply speed. These characteristics are nonlinear and change in real time, which increases the difficulty of controlling the oxygen supply speed. At the same time, the response time and flow inertia of the oxygen supply equipment are also important challenges to achieve precise oxygen supply control. If the control system cannot respond quickly to changes in patient demand, it may cause the oxygen supply speed to lag or become unstable, affecting the effect of emergency treatment. Therefore, it is particularly important to design a control method that can monitor the patient's respiratory status in real time and dynamically adjust the oxygen supply speed. By combining the oxygen supply demand prediction model, the dynamic characteristics of the oxygen supply equipment and the optimization algorithm, the oxygen supply speed can be precisely controlled, the stability and response speed of the system can be improved, and safe and reliable respiratory support can be provided to patients.
[0003] PID control algorithm is a classic algorithm widely used in the field of industrial control. It consists of three parts: proportional (P), integral (I) and differential (D). Proportional control directly adjusts the control amount according to the size of the current error. It has the characteristics of rapid response, but cannot completely eliminate steady-state error. Integral control eliminates steady-state deviation by accumulating historical errors and improves the long-term accuracy of the system, but may introduce overshoot and system instability. Differential control suppresses oscillation and overshoot in dynamic response by predicting the changing trend of the error and improves the dynamic performance of the system. The combination of the three makes the PID control algorithm have both speed, accuracy and stability, and is suitable for most linear and partially nonlinear systems. In practical applications, the PID controller optimizes system performance by adjusting control parameters in real time to achieve rapid tracking and stable control of the system output to the target value. Although the PID control algorithm is simple and easy to use, the quality of parameter setting directly affects its control effect, and it is usually combined with an optimization algorithm to further improve performance.
[0004] The Flood algorithm (FLA) is inspired by the complex movement and flow patterns of water masses in river basin flood events. The Flood algorithm mathematically models some key phenomena: the movement of water up slopes, flow velocity over time, soil permeability effects, and the periodic rise and fall of water levels caused by precipitation and losses; using these models, the algorithm guides the movement and evolution of a population of potential solutions to enhance optimality; the algorithm has a unique algorithmic structure and a novel iterative method, and has strong adaptive optimization capabilities; however, the Flood algorithm is prone to falling into local optimal solutions and has poor stability when faced with complex optimization scenarios. Summary of the invention
[0005] The purpose of the present invention is to provide an emergency breathing system oxygen supply speed control method, by real-time monitoring of the user's breathing state, combining the key parameters of breathing frequency, inhalation time, inhalation flow rate, blood oxygen concentration and external environment, to construct an oxygen supply demand prediction model and dynamically adjust the oxygen supply speed; at the same time, in combination with the dynamic response characteristics of the oxygen supply equipment, design an efficient respiratory system oxygen supply speed PID controller, and iteratively optimize the controller parameters through an improved flood algorithm to improve the dynamic response capability and steady-state accuracy of the system; the present invention aims to solve the problems of response lag, insufficient or oversupply of oxygen in the traditional fixed oxygen supply mode, realize precise control and stable regulation of the oxygen supply speed, effectively improve the user's respiratory support effect in emergency situations, and ensure the safety, reliability and stability of the oxygen supply system.
[0006] In order to achieve the above object, the present invention adopts an emergency breathing system oxygen supply speed control method, and the specific steps are as follows.
[0007] Step 1: Based on the real-time monitored data of respiratory rate, inhalation time, inhalation flow rate, blood oxygen concentration and external air pressure, oxygen demand prediction modeling is performed to estimate the user's target oxygen supply rate in a short period of time.
[0008] Step 2: Based on the output of the oxygen demand prediction model, combined with the working characteristics of the respiratory system and the response characteristics of the oxygen supply equipment, design the respiratory system oxygen supply speed PID controller and associate the actual oxygen supply speed with the control signal output by the controller.
[0009] Step three: embed an improved flood algorithm in the respiratory system oxygen supply speed PID controller to optimize the output control signal of the controller; the improved flood algorithm includes: 1. In the algorithm exploration stage, introduce the distance and normalized scale between the optimal solution and the current solution, construct a dynamic step factor, and combine the gradient information of the objective function to the current solution to improve the mathematical model of the position update of the population individuals; 2. In the algorithm development stage, cancel the fixed maximum and minimum value ranges and replace them with dynamic diffusion terms of the global optimal solution and the local optimal solution, and replace the fixed minimum value with the individual historical optimal guidance term to improve the mathematical model of the position update of the population individuals.
[0010] Step 4: Use the optimized control signal to adjust the oxygen supply rate of the oxygen supply equipment in real time, so as to achieve rapid matching and stable maintenance of the oxygen supply rate of the respiratory system within the target range in emergency situations.
[0011] Preferably, in step 1, based on the real-time monitored data of respiratory rate, inspiratory time, inspiratory flow rate, blood oxygen concentration and external air pressure, oxygen demand prediction modeling is performed, and the established oxygen demand prediction model is:
[0012] (1);
[0013] (2);
[0014] (3);
[0015] In the formula, is the target oxygen supply speed, a is the smoothing coefficient, which is used to adjust the weight of the current oxygen supply speed demand and the historical oxygen supply speed demand. is the oxygen supply rate after oxygen concentration correction, is the pressure correction factor, is standard atmospheric pressure, is the current outside air pressure, is the oxygen supply rate at the previous moment, is the basic oxygen supply rate, is the oxygen concentration correction coefficient, which indicates the influence of changes in blood oxygen concentration on the oxygen supply rate. is the blood oxygen concentration, is the inspiratory time, is the inspiratory flow rate, is the breathing frequency, and t represents the current time.
[0016] Preferably, the oxygen supply demand prediction model can dynamically adjust the oxygen supply speed according to the user's real-time physiological state and take into account the influence of the external environment to ensure that the oxygen supply demand is met and avoid insufficient or oversupply of oxygen; the target oxygen supply speed output by the model serves as the input basis of the subsequent respiratory system oxygen supply speed PID controller, so that the oxygen supply equipment can quickly respond to dynamically changing oxygen supply demands.
[0017] Preferably, the mathematical model after associating the actual oxygen supply speed with the control signal output by the controller in step 2 is:
[0018] (4);
[0019] In the formula, T is the time constant of the oxygen supply equipment, which reflects the dynamic response speed of the oxygen supply equipment. is the actual oxygen supply rate, where , defined as the error between the target oxygen supply rate and the actual oxygen supply rate, Kp, Ki, Kd are the proportional parameter, integral parameter and differential parameter of the respiratory system oxygen supply rate PID controller, respectively, and t represents the current moment.
[0020] Preferably, the output of the oxygen demand prediction model in step 2 is the target oxygen supply speed, which reflects the real-time oxygen supply demand of the user; the respiratory system has periodic and nonlinear characteristics, wherein the periodicity is manifested as the alternating change of oxygen supply demand in the inhalation and exhalation stages, which is affected by the respiratory frequency and inhalation time; the nonlinear characteristics are mainly caused by changes in airway resistance and lung compliance, and play a key role in the dynamic change of oxygen supply demand; the response of the oxygen supply equipment has inertia and delay characteristics, wherein the inertia is manifested in that the oxygen flow adjustment takes time to gradually reach the target value, and the delay characteristic is manifested in that there is a time lag in the response of the oxygen supply equipment to the control signal; by designing a respiratory system oxygen supply speed PID controller, a dynamic association is established between the actual oxygen supply speed and the control signal, and the controller combines proportional, integral and differential regulation to form a closed-loop control system with the oxygen supply equipment to ensure that the actual oxygen supply speed can quickly, accurately and stably follow the target oxygen supply speed.
[0021] Preferably, the improved flood algorithm described in step 3 introduces the distance and normalized scale between the optimal solution and the current solution in the algorithm exploration stage, constructs a dynamic step factor, and combines the gradient information of the objective function to the current solution. The specific mathematical model is:
[0022] (5);
[0023] (6);
[0024] In the formula, r is the dynamic step size factor, represents the optimal solution of the current iterative population, represents the location of the i-th water body, Indicates a small value, used to avoid the denominator being zero, Represents the gradient information of the current solution on the objective function, Represents the partial derivative of the fitness value of the i-th water body position with respect to the i-th water body position;
[0025] The improved mathematical model for updating the position of individuals in the population is:
[0026] (7);
[0027] In the formula, represents the new position of the i-th water body, is the disturbance intensity factor, is a random value between 0 and 1, and are two random individuals in the population, is the gradient weight factor, and the other parameters have the same meaning as above.
[0028] Preferably, in the algorithm exploration phase, by introducing the distance between the optimal solution and the current solution and the normalized scale, a dynamic step factor is constructed, and the algorithm can adaptively adjust the individual position update amplitude during the search process, thereby achieving a balance between global search and local development; in the mathematical model, the numerator of the dynamic step factor r is Indicates the distance between the current solution and the optimal solution. When the individual is far from the optimal solution, the dynamic step factor is large, driving the individual to quickly approach the optimal solution and enhance the global search capability. When the individual is close to the optimal solution, the dynamic step factor naturally decreases, thereby refining the search accuracy and improving the local development capability. It plays a normalization role to avoid the influence of too large or too small solution range on the dynamic step factor. At the same time, by introducing Prevent the denominator from being zero and ensure the stability of the dynamic step size factor; the dynamic step size factor makes the adjustment of the step size dynamically related to the spatial distribution of the solution, without the need to manually set a fixed step size, reducing the complexity of parameter adjustment; in the actual optimization process, the dynamic step size factor can significantly improve the convergence efficiency of the algorithm, quickly explore high-potential areas through large step sizes in the early stage, and achieve refined optimization through small step sizes in the later stage, thereby more effectively approaching the global optimal solution.
[0029] Preferably, the method combines the gradient information of the objective function to the current solution, and combines the gradient information of the objective function to the current solution. , the algorithm can introduce the local change trend of the solution space, thereby providing a more accurate search direction for the update of individual positions; when the dynamic step factor r and the gradient information When combined, the update of the individual is not only affected by the distance between the current solution and the optimal solution, but also takes into account the local rate of change of the objective function. The combination of these two parts of information can greatly improve the optimization performance of the algorithm. In the formula, the dynamic step size factor determines the movement amplitude of the individual. When the individual is far away from the optimal solution, r is large, which will amplify the guiding effect of the gradient information on the search direction, so that the individual quickly moves towards the optimal solution, significantly enhancing the global search ability. When the individual is close to the optimal solution, r automatically decreases. Combined with the slight adjustment of the gradient information, the algorithm can be refined in the solution space, further approaching the optimal solution, and improving the accuracy and stability of local development. Gradient information It provides an understanding of the trend and magnitude of the objective function changes in each dimension of the space. Therefore, compared with the traditional method that relies solely on random search, combining gradients can reduce unnecessary search directions and improve search efficiency. Especially in high-dimensional solution spaces or complex nonlinear problems, the introduction of gradient information can accelerate the convergence of the algorithm, allowing individuals to find the global optimal solution more quickly in limited iterations.
[0030] Preferably, in the improved flood algorithm described in step 3, during the algorithm development stage, the fixed maximum and minimum ranges are cancelled and replaced with dynamic diffusion terms of the global optimal solution and the local optimal solution, and the fixed minimum value is replaced with the individual historical optimal guidance term. The improved mathematical model for the position update of the population individuals is:
[0031] (8);
[0032] In the formula, represents the position of the newly generated water body individual, represents the optimal solution of the current iterative population, is the dynamic diffusion factor, is a random value between 0 and 1, represents the global optimal solution of the entire optimization process, represents the local optimal solution, is the historical weight factor, represents the individual's historical optimal position, represents the location of the i-th water body.
[0033] Preferably, the position update mathematical model of the population individuals in the original algorithm development stage has the disadvantage of being too dependent on a fixed range. , ignoring the dynamic information of population individuals and the guidance of local solutions, which may lead to insufficient global search capabilities and lack of targeted updates. The mathematical model of the position update of population individuals in the original algorithm development stage is:
[0034] ;
[0035] In the formula, represents the position of the newly generated water body individual, represents the optimal solution of the current iterative population, is a random value between 0 and 1, and are the upper and lower bounds of the search space respectively.
[0036] Preferably, in the algorithm development stage, the fixed maximum and minimum ranges are cancelled and replaced with dynamic diffusion terms of the global optimal solution and the local optimal solution. At the same time, the fixed minimum value is replaced by the individual historical optimal guidance term, and the mathematical model of the position update of the population individual is improved. This improvement improves the performance of the algorithm in many aspects. First, the global optimal solution With local optimal solution The dynamic diffusion term between is introduced to understand the spatial distribution information, and the dynamic diffusion factor Dynamically adjust the individuals in the population so that the update direction of the individuals can be adaptively diffused globally; this mechanism effectively reduces the possibility of the algorithm falling into the local optimum, while improving the population's ability to explore the solution space globally; secondly, the individual's historical optimal position The introduction of provides long-term optimized memory information for population update. The difference guides the individual to move closer to the historical optimal direction, enhancing the individual's ability to develop locally in the solution space; this dual mechanism combining global diffusion and historical guidance enables the algorithm to ensure the depth of exploration in the development stage and dynamically adapt to the complex changes in different problem scenarios; in addition, the cancellation of the fixed maximum and minimum value ranges avoids the search blind spot problem caused by boundary restrictions in traditional methods; the dynamic diffusion term in the improved model does not rely on the fixed solution space range, but directly based on The diffusion amplitude of individuals is calculated dynamically to achieve adaptive updates in the solution space. This dynamic adjustment avoids the limited applicability of fixed boundaries in different problems and prevents premature convergence. Overall, the improved position update mathematical model achieves a balance between global and local searches during the development phase, which can significantly improve the algorithm's convergence speed, optimization accuracy, and adaptability to complex nonlinear problems.
[0037] Preferably, in step 3, an improved flood algorithm is embedded in the respiratory system oxygen supply speed PID controller, and the specific steps are:
[0038] S1. Initialize the parameters of the improved flood algorithm, including the population size of the algorithm , problem dimension , maximum number of iterations , the upper limit of the search space , the lower limit of the search space ;
[0039] S2, encoding the parameters Kp, Ki, and Kd of the respiratory system oxygen supply speed PID controller as the solution of the improved flood algorithm search space, and as the algorithm is iterated, the updated population individual positions reflect the corresponding parameters of the respiratory system oxygen supply speed PID controller;
[0040] S3, establish an improved flood algorithm position update mathematical model to update the position of the individual population;
[0041] S4, using the objective function to calculate the fitness value of each water body position, recording the minimum fitness value, and comparing it with the optimal fitness value of the population in the previous iteration, retaining the optimal fitness value;
[0042] S5. Determine whether the current number of iterations is equal to the maximum number of iterations. If so, output the water body position corresponding to the minimum fitness value and parse it into the optimal Kp, Ki, and Kd parameters of the respiratory system oxygen supply speed PID controller; otherwise, return to execute S1.
[0043] Preferably, in S2, the parameters Kp, Ki, and Kd of the respiratory system oxygen supply speed PID controller are encoded as a solution to the improved flood algorithm search space. As the algorithm is iterated, the updated population individual positions are the solution to the updated algorithm search space, that is, the parameters of the respiratory system oxygen supply speed PID controller are updated, and are encoded as:
[0044] ;
[0045] Where x is the encoding vector, i.e., the solution of the search space of the improved flood algorithm, and Kp, Ki, and Kd are the proportional parameter, integral parameter, and differential parameter of the PID controller of the oxygen supply speed of the respiratory system, respectively.
[0046] Preferably, the step S3 of establishing an improved flood algorithm position update mathematical model comprises the following specific steps:
[0047] Step 1: In the algorithm exploration phase, by introducing the distance and normalized scale between the optimal solution and the current solution, a dynamic step size factor is constructed, and the position update mathematical model of the population individuals is improved by combining the gradient information of the objective function to the current solution, and executing equations (5)-(7);
[0048] Step 2: During the algorithm development phase, the fixed maximum and minimum ranges are cancelled and replaced with dynamic diffusion terms of the global optimal solution and the local optimal solution. Meanwhile, the fixed minimum value is replaced with the individual historical optimal guidance term, the mathematical model for position update of the population individuals is improved, and equation (8) is executed.
[0049] Preferably, the fitness value of each water body position is calculated using an objective function in S4, and the objective function is:
[0050] ;
[0051] In the formula, F represents the fitness value, represents the target output value at time t, represents the actual output value at time t, and T represents the total running time of the algorithm.
[0052] By adopting the above technical scheme, the beneficial effects of the present invention are as follows: by constructing an oxygen supply demand prediction model, combined with real-time monitored respiratory rate, inhalation time, inhalation flow rate, blood oxygen concentration and ambient air pressure data, the target oxygen supply speed is dynamically estimated to achieve accurate matching of personalized oxygen supply demand; the improved flood algorithm improves the global search capability of the algorithm through a dynamic step size factor, and introduces gradient enhancement terms and dynamic diffusion terms to optimize the local development effect of the algorithm; by designing a respiratory system oxygen supply speed PID controller, and embedding the improved flood algorithm to dynamically optimize the controller parameters, and combining the response characteristics of the oxygen supply equipment, the oxygen supply speed can be quickly adjusted and stably controlled, the system's adaptability and robustness are enhanced, and the system's dynamic response efficiency and control accuracy in complex scenarios are significantly improved, providing users with a safe and efficient respiratory oxygen supply solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 The present invention is a flow chart of the steps of a method for controlling the oxygen supply rate of an emergency breathing system.
[0054] Figure 2 Flowchart of steps to optimize the respiratory system oxygen supply rate PID controller parameters for improved flooding algorithm.
[0055] Figure 3 Comparison curve of fitness values between basic flood algorithm and improved flood algorithm.
[0056] Figure 4 This is the process diagram of optimizing the parameter value Kp for the basic flood algorithm and the improved flood algorithm.
[0057] Figure 5 This is the process diagram of searching for optimal parameter value Ki for basic flood algorithm and improved flood algorithm.
[0058] Figure 6 Process diagram of optimizing parameter value Kd for basic flood algorithm and improved flood algorithm.
[0059] Figure 7 Comparison chart of PID control optimization effects between basic flood algorithm and improved flood 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 embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention.
[0061] The present invention provides a technical solution: a method for controlling the oxygen supply speed of an emergency breathing system, which specifically comprises the following steps: Figure 1 shown.
[0062] Step 1: Based on the real-time monitored data of respiratory rate, inhalation time, inhalation flow rate, blood oxygen concentration and external air pressure, oxygen demand prediction modeling is performed to estimate the user's target oxygen supply rate in a short period of time.
[0063] Furthermore, in step 1, based on the real-time monitored data of respiratory rate, inspiratory time, inspiratory flow rate, blood oxygen concentration and external air pressure, oxygen demand prediction modeling is performed, and the established oxygen demand prediction model is:
[0064] (1);
[0065] (2);
[0066] (3);
[0067] In the formula, is the target oxygen supply speed, a is the smoothing coefficient, which is used to adjust the weight of the current oxygen supply speed demand and the historical oxygen supply speed demand, and its value is 0.4. is the oxygen supply rate after oxygen concentration correction, is the pressure correction coefficient, which takes a value of 1.0. is standard atmospheric pressure, is the current outside air pressure, is the oxygen supply rate at the previous moment, is the basic oxygen supply rate, is the oxygen concentration correction coefficient, which indicates the influence of changes in blood oxygen concentration on the oxygen supply rate. Its value is 0.6. is the blood oxygen concentration, is the inhalation time, is the inspiratory flow rate, is the breathing frequency, and t represents the current time.
[0068] Step 2: Based on the output of the oxygen demand prediction model, combined with the working characteristics of the respiratory system and the response characteristics of the oxygen supply equipment, design the respiratory system oxygen supply speed PID controller and associate the actual oxygen supply speed with the control signal output by the controller.
[0069] Furthermore, in step 2, the mathematical model after associating the actual oxygen supply speed with the control signal output by the controller is:
[0070] (4);
[0071] In the formula, T is the time constant of the oxygen supply equipment, which reflects the dynamic response speed of the oxygen supply equipment. is the actual oxygen supply rate, where , defined as the error between the target oxygen supply rate and the actual oxygen supply rate, Kp, Ki, Kd are the proportional parameter, integral parameter and differential parameter of the respiratory system oxygen supply rate PID controller, respectively, and t represents the current moment.
[0072] Step three: embed an improved flood algorithm in the respiratory system oxygen supply speed PID controller to optimize the output control signal of the controller; the improved flood algorithm includes: 1. In the algorithm exploration stage, introduce the distance and normalized scale between the optimal solution and the current solution, construct a dynamic step factor, and combine the gradient information of the objective function to the current solution to improve the mathematical model of the position update of the population individuals; 2. In the algorithm development stage, cancel the fixed maximum and minimum value ranges and replace them with dynamic diffusion terms of the global optimal solution and the local optimal solution, and replace the fixed minimum value with the individual historical optimal guidance term to improve the mathematical model of the position update of the population individuals.
[0073] Furthermore, in the improved flood algorithm described in step 3, in the algorithm exploration phase, the distance and normalized scale between the optimal solution and the current solution are introduced to construct a dynamic step size factor, and the gradient information of the objective function to the current solution is combined. The specific mathematical model is:
[0074] (5);
[0075] (6);
[0076] In the formula, r is the dynamic step size factor, represents the optimal solution of the current iterative population, represents the location of the i-th water body, Indicates a small value, used to avoid the denominator being zero, and its value is , Represents the gradient information of the current solution on the objective function, Represents the partial derivative of the fitness value of the i-th water body position with respect to the i-th water body position;
[0077] The improved mathematical model for updating the position of individuals in the population is:
[0078] (7);
[0079] In the formula, represents the new position of the i-th water body, is the disturbance intensity factor, with a value of 0.3. is a random value between 0 and 1, and are two random individuals in the population, is the gradient weight factor, the value is 1.4, and the other parameters have the same meaning as above.
[0080] Furthermore, in the improved flood algorithm described in step 3, during the algorithm development phase, the fixed maximum and minimum ranges are cancelled and replaced with dynamic diffusion terms of the global optimal solution and the local optimal solution. At the same time, the fixed minimum value is replaced by the individual historical optimal guidance term. The improved mathematical model for the position update of the population individuals is:
[0081] (8);
[0082] In the formula, represents the position of the newly generated water body individual, represents the optimal solution of the current iterative population, is the dynamic diffusion factor, with a value of 0.8. is a random value between 0 and 1, represents the global optimal solution of the entire optimization process, represents the local optimal solution, is the historical weight factor, with a value of 0.4. represents the individual's historical optimal position, represents the location of the i-th water body.
[0083] Furthermore, in step 3, an improved flooding algorithm is embedded in the respiratory system oxygen supply speed PID controller, such as Figure 2 As shown, the specific steps are:
[0084] S1. Initialize the parameters of the improved flood algorithm, including the population size of the algorithm , problem dimension , maximum number of iterations , the upper limit of the search space , the lower limit of the search space ;
[0085] S2, encoding the parameters Kp, Ki, and Kd of the respiratory system oxygen supply speed PID controller as the solution of the improved flood algorithm search space, and as the algorithm is iterated, the updated population individual positions reflect the corresponding parameters of the respiratory system oxygen supply speed PID controller;
[0086] S3, establish an improved flood algorithm position update mathematical model to update the position of the individual population;
[0087] S4, using the objective function to calculate the fitness value of each water body position, recording the minimum fitness value, and comparing it with the optimal fitness value of the population in the previous iteration, retaining the optimal fitness value;
[0088] S5. Determine whether the current number of iterations is equal to the maximum number of iterations. If so, output the water body position corresponding to the minimum fitness value and parse it into the optimal Kp, Ki, and Kd parameters of the respiratory system oxygen supply speed PID controller; otherwise, return to execute S1.
[0089] Furthermore, S2 encodes the parameters Kp, Ki, and Kd of the respiratory system oxygen supply speed PID controller as a solution to the improved flood algorithm search space. As the algorithm is iterated, the updated population individual positions are the solution to the updated algorithm search space, that is, the parameters of the respiratory system oxygen supply speed PID controller are updated, and are encoded as:
[0090] ;
[0091] Where x is the encoding vector, i.e., the solution of the search space of the improved flood algorithm, and Kp, Ki, and Kd are the proportional parameter, integral parameter, and differential parameter of the PID controller of the oxygen supply speed of the respiratory system, respectively.
[0092] Furthermore, the improved flood algorithm position update mathematical model is established in S3, and the specific steps are as follows:
[0093] Step 1: In the algorithm exploration phase, by introducing the distance and normalized scale between the optimal solution and the current solution, a dynamic step size factor is constructed, and the position update mathematical model of the population individuals is improved by combining the gradient information of the objective function to the current solution, and executing equations (5)-(7);
[0094] Step 2: During the algorithm development phase, the fixed maximum and minimum ranges are cancelled and replaced with dynamic diffusion terms of the global optimal solution and the local optimal solution. Meanwhile, the fixed minimum value is replaced with the individual historical optimal guidance term, the mathematical model for position update of the population individuals is improved, and equation (8) is executed.
[0095] Furthermore, the objective function described in S4 is used to calculate the fitness value of each water body position, and the objective function is:
[0096] ;
[0097] In the formula, F represents the fitness value, represents the target output value at time t, represents the actual output value at time t, and T represents the total running time of the algorithm.
[0098] Step 4: Use the optimized control signal to adjust the oxygen supply rate of the oxygen supply equipment in real time, so as to achieve rapid matching and stable maintenance of the oxygen supply rate of the respiratory system within the target range in emergency situations.
[0099] Furthermore, simulation experiments were conducted using Matlab and Simulink to compare the improved flood algorithm and the basic flood algorithm to optimize PID control. First, the mathematical model of the flood algorithm was improved using Matlab, and then the respiratory system oxygen supply speed PID control system model was established using Simulink. The parameters of the improved flood algorithm were initialized, including the population size of the algorithm. =60, Problem Dimension =3, maximum number of iterations =30, the upper limit of the search space =1, the lower limit of the search space =0, run the Matlab program, and get the fitness value comparison curve of the basic flood algorithm and the improved flood algorithm, as shown in Figure 3 As shown in the figure, the improved flood algorithm has significant advantages over the basic flood algorithm in terms of convergence speed and optimization effect; first, in the initial stage of the algorithm (within the first 5 iterations), the fitness value of the improved flood algorithm drops rapidly to below 200, while the fitness value of the basic flood algorithm is still above 900 in the same stage, which shows that the improved algorithm is more efficient in global search ability and can quickly find high potential areas for solutions, significantly accelerating the convergence process; secondly, in the middle and late optimization stages (between 5 and 30 iterations), the fitness value of the improved flood algorithm remains stable and close to the optimal solution, while the fitness value of the basic flood algorithm gradually decreases, but the convergence speed slows down significantly, and the final fitness value is still slightly higher than that of the improved algorithm; this shows that the improved flood algorithm is more outstanding in local development ability, and can achieve refined search by introducing dynamic step size factors and gradient enhancement terms, thereby further approaching the global optimal solution; in addition, compared with the basic flood algorithm, the improved flood algorithm exhibits a smaller amplitude oscillation phenomenon in all optimization iterations, showing better stability and robustness.
[0100] Furthermore, if Figure 4-6 As shown in the figure, the improved flood algorithm is used to adjust the parameters of the respiratory system oxygen supply speed PID controller. The optimal PID control parameters obtained by the improved algorithm are Kp=0.167, Ki=0.167, Kd=0.202, and the optimal PID control parameters obtained by the basic algorithm are Kp=0.176, Ki=0.153, Kd=0.172; the optimal control parameters are input into the respiratory system oxygen supply speed PID controller, and the target setting value is set to 4 units, and the result is Figure 7 Comparison of the effects of optimizing PID control by the basic flood algorithm and the improved flood algorithm; Figure 7It can be analyzed that, firstly, in terms of response speed, the PID control system optimized by the improved flood algorithm shows faster dynamic response capability, quickly approaching the target value of 4 in about 70 milliseconds, while the basic flood algorithm needs nearly 100 milliseconds to reach the target value; this fast response feature is particularly important in emergency breathing scenarios, which can ensure that users get the required oxygen support in a short time and effectively reduce the medical risks caused by delayed oxygen supply; secondly, in terms of overshoot control, the optimization effect of the improved flood algorithm is significantly better than that of the basic flood algorithm; the overshoot of the basic flood algorithm is large, and the peak value of the target value in the initial response is close to 4.5, while the overshoot of the improved flood algorithm is small, and the curve is smoother and closer The close target value of 4 significantly reduces the impact of oxygen supply fluctuations on the user's respiratory stability. This precise oxygen supply control can reduce the energy consumption of the oxygen supply system while improving the user's comfort and safety. In terms of system stability, the improved flood algorithm further highlights its advantages. The PID control system optimized by the improved algorithm can achieve stability within 200 milliseconds, maintaining the oxygen supply speed near the target value of 4, and the oscillation amplitude is small. The system oscillation of the basic flood algorithm is large, and it has not yet completely stabilized at 400 milliseconds, and there is a certain degree of uncertainty. This shows that the improved algorithm can more efficiently achieve stable matching of oxygen supply speed, ensuring that users receive continuous and accurate oxygen supply support in emergency situations.
Claims
1. A method for controlling the oxygen supply rate of an emergency breathing system, characterized in that: The following steps are involved: Step 1: Based on the real-time monitored data of respiratory rate, inspiratory time, inspiratory flow rate, blood oxygen concentration and external air pressure, oxygen demand prediction modeling is performed to estimate the user's target oxygen supply rate in a short period of time; Step 2: Based on the output of the oxygen demand prediction model, combined with the working characteristics of the respiratory system and the response characteristics of the oxygen supply equipment, design the respiratory system oxygen supply speed PID controller, and associate the actual oxygen supply speed with the control signal output by the controller; Step 3: embed the improved flood algorithm into the respiratory system oxygen supply speed PID controller to optimize the output control signal of the controller; The improved flood algorithm includes:
1. In the algorithm exploration stage, the distance and normalized scale between the optimal solution and the current solution are introduced, a dynamic step factor is constructed, and the gradient information of the objective function to the current solution is combined. The specific mathematical model is: In the formula, r is the dynamic step size factor, S best represents the optimal solution of the current iterative population, S i represents the location of the i-th water body, ∈ represents a small value to avoid the denominator being zero, Represents the gradient information of the current solution on the objective function, Represents the partial derivative of the fitness value of the i-th water body position with respect to the i-th water body position; The improved mathematical model for updating the position of individuals in the population is: In the formula, represents the new position of the i-th water body, α is the disturbance intensity factor, rand is a random value between 0 and 1, S j and S k are two random individuals in the population, β is the gradient weight factor, and the other parameters have the same meanings as above; 2. In the algorithm development stage, the fixed maximum and minimum ranges are cancelled and replaced with dynamic diffusion terms of global optimal solutions and local optimal solutions. At the same time, the fixed minimum value is replaced by the individual historical optimal guidance term. The improved mathematical model for the position update of the population individuals is: In the formula, represents the position of the newly generated water body, S best represents the optimal solution of the current iterative population, γ is the dynamic diffusion factor, rand is a random value between 0 and 1, S global represents the global optimal solution of the entire optimization process, S local represents the local optimal solution, δ is the historical weight factor, S history represents the historical optimal position of the individual, S i represents the location of the i-th water body; Step 4: Use the optimized control signal to adjust the oxygen supply rate of the oxygen supply equipment in real time, so as to achieve rapid matching and stable maintenance of the oxygen supply rate of the respiratory system within the target range in emergency situations.
2. The method for controlling the oxygen supply rate of an emergency breathing system according to claim 1, characterized in that: In step 1, based on the real-time monitored data of respiratory rate, inspiratory time, inspiratory flow rate, blood oxygen concentration and external air pressure, oxygen demand prediction modeling is performed, and the established oxygen demand prediction model is: Q target (t)=a·(Q adjust (t)·(1+k pa ·(P standard -P(t))))+(1-a)·Q historr y(t-1) (5); Q base (t)=IT(t)·Flow(t)·RF(t) (7); In the formula, Q target (t) is the target oxygen supply rate, a is the smoothing coefficient, which is used to adjust the weight of the current oxygen supply rate demand and the historical oxygen supply rate demand, Q adjust (t) is the oxygen supply rate after oxygen concentration correction, k pa is the pressure correction factor, P standard is the standard atmospheric pressure, P(t) is the current external air pressure, Q history (t-1) is the oxygen supply rate at the previous moment, Q base (t) is the basic oxygen supply rate, is the oxygen concentration correction coefficient, which indicates the influence of changes in blood oxygen concentration on the oxygen supply rate. O2(t) is the blood oxygen concentration, IT(t) is the inspiratory time, FlOw(t) is the inspiratory flow rate, RF(t) is the respiratory frequency, and t represents the current time.
3. The method for controlling the oxygen supply rate of an emergency breathing system according to claim 2, characterized in that: The mathematical model after associating the actual oxygen supply speed with the control signal output by the controller in step 2 is: In the formula, T is the time constant of the oxygen supply equipment, which reflects the dynamic response speed of the oxygen supply equipment, and Q actual (t) is the actual oxygen supply rate, where e(t) = Q target (t)-Q actual (t), defined as the error between the target oxygen supply rate and the actual oxygen supply rate, Kp, Ki, Kd are the proportional parameter, integral parameter and differential parameter of the respiratory system oxygen supply rate PID controller respectively, and t represents the current moment.
4. The method for controlling the oxygen supply rate of an emergency breathing system according to claim 3, characterized in that: Step 3 describes embedding the improved flood algorithm in the respiratory system oxygen supply speed PID controller, and the specific steps are as follows: S1. Initialize the parameters of the improved flood algorithm, including the algorithm's population size SearchAgents, problem dimension dim, and maximum number of iterations Iter max , the upper limit S of the search space max , the lower limit S of the search space min ; S2, encoding the parameters Kp, Ki, and Kd of the respiratory system oxygen supply speed PID controller as the solution of the improved flood algorithm search space, and as the algorithm is iterated, the updated population individual positions reflect the corresponding parameters of the respiratory system oxygen supply speed PID controller; S3, establish an improved flood algorithm position update mathematical model to update the position of the individual population; S4, using the objective function to calculate the fitness value of each water body position, record the minimum fitness value, and compare it with the optimal fitness value of the population in the previous iteration, and retain the optimal fitness value; S5. Determine whether the current number of iterations is equal to the maximum number of iterations. If so, output the water body position corresponding to the minimum fitness value and parse it into the optimal Kp, Ki, and Kd parameters of the respiratory system oxygen supply speed PID controller; otherwise, return to execute S1.
Citation Information
Patent Citations
Method for realizing engineering optimization based on multi-strategy improved arithmetic optimization algorithm
CN115935797A
Diffusion oxygen supply PID control method and system based on cuckoo search-BP neural network
CN116861804A