Oxygen concentration control method, system, storage medium and ventilator for ventilator

By dynamically adjusting PID control parameters using the BP neural network model in the ventilator, the problems of slow response speed, insufficient stability and difficult parameter adjustment caused by fixed PID parameters are solved, and more efficient and more accurate oxygen concentration control is achieved.

CN119733146BActive Publication Date: 2025-06-06SHENZHEN WISONIC MEDICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510239726.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-03
Publication Date
2025-06-06
Estimated Expiration
2045-03-03

AI Technical Summary

Technical Problem

The oxygen concentration control system of existing ventilators uses fixed PID parameters, resulting in slow response speed, insufficient stability and difficult parameter adjustment.

Method used

The BP neural network model is used to dynamically adjust the PID control parameters, calculate the target oxygen flow and target air flow in real time based on the target oxygen concentration and target total flow, and adjust the oxygen and air flow through proportional, integral and differential control output.

Benefits of technology

It improves the control accuracy of oxygen and air flow, ensures that the oxygen concentration of the mixed gas is closer to the target value, reduces adjustment delay, enhances the stability and adaptability of the system, and reduces oxygen waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119733146B_ABST
    Figure CN119733146B_ABST
Patent Text Reader

Abstract

The present invention is applicable to the technical field of medical equipment, and provides a method, system, storage medium and ventilator for controlling oxygen concentration of a ventilator. The method comprises calculating target oxygen flow and target air flow according to target oxygen concentration and target total flow; inputting target oxygen flow, actual oxygen flow, oxygen flow error and constant value into a first BP neural network model to obtain a first set of PID control parameters; inputting target air flow, actual air flow, air flow error and constant value into a second BP neural network model to obtain a second set of PID control parameters; generating a first control signal according to the oxygen flow error and the first set of PID control parameters, and generating a second control signal according to the air flow error and the second set of PID control parameters; and adjusting the opening of the oxygen end proportional valve and the air end proportional valve according to the first control signal and the second control signal. The present invention solves the problems of slow response speed, insufficient stability and difficult parameter adjustment caused by existing fixed PID parameter control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical equipment, and in particular to an oxygen concentration control method, system, storage medium and ventilator of a ventilator. Background Art

[0002] As a key tool in modern clinical medical equipment, ventilators are widely used in intensive care, anesthesia, and emergency treatment, and are responsible for providing respiratory support and gas management for patients. One of the core functions of a ventilator is the control of oxygen concentration, and its accuracy and response speed directly affect the effectiveness and safety of respiratory support for patients. Especially in the rescue of critically ill patients and respiratory failure, precise control of oxygen concentration is of great significance to prevent hypoxia or oxygen poisoning.

[0003] The oxygen concentration control systems of most ventilators currently on the market usually use a proportional-integral-differential (PID) control algorithm. The PID control algorithm controls the oxygen concentration by feedback regulation, and has the characteristics of simple structure and easy implementation. Most of the existing ventilator oxygen concentration control methods use a fixed PID parameter control method. However, the fixed PID parameter control method faces the following deficiencies in complex clinical applications:

[0004] Slow response: When the patient's respiratory state changes rapidly, the ventilator needs to adjust the oxygen concentration in time to meet clinical needs. However, the traditional fixed PID parameter control cannot respond quickly to changes in the patient's respiratory rate, tidal volume, etc. due to the slow adjustment process. This delayed response may cause the patient to be unable to obtain the required oxygen concentration in a short period of time, thus affecting the treatment effect.

[0005] Poor control stability: In complex clinical environments, external interference such as airflow fluctuations and changes in airway resistance can affect the accuracy of oxygen concentration regulation. Fixed-parameter PID control is difficult to maintain good control accuracy and stability in the face of these dynamic changes, and oxygen concentration deviations are prone to occur, affecting the patient's respiratory support.

[0006] Difficulty in parameter adjustment: The adjustment effect of the PID control system depends on appropriate parameter settings. However, due to individual differences and the diversity of clinical environments, fixed PID parameters are difficult to adapt to the needs of different patients. Traditional oxygen concentration control methods require developers to manually adjust PID parameters based on experience, which not only increases the workload of developers, but may also lead to unsatisfactory control effects due to improper manual settings, further increasing medical risks. Summary of the invention

[0007] Based on this, the purpose of the present invention is to provide an oxygen concentration control method, system, storage medium and ventilator for a ventilator, so as to fundamentally solve the problems of slow response speed, insufficient stability and difficult parameter adjustment caused by the existing fixed PID parameter control.

[0008] A method for controlling oxygen concentration in a ventilator according to an embodiment of the present invention is applied to a ventilator including an oxygen gas circuit, an air gas circuit and a mixed gas circuit, wherein the oxygen gas circuit at least includes an oxygen end proportional valve and an oxygen flow sensor, the air gas circuit at least includes an air end proportional valve and an air flow sensor, and the mixed gas circuit includes a mixing chamber for mixing the outputs of the oxygen gas circuit and the air gas circuit and an oxygen concentration sensor, and the method includes:

[0009] The target oxygen flow rate and the target air flow rate are calculated respectively according to the set target oxygen concentration and target total flow rate;

[0010] The calculated target oxygen flow rate, the actual oxygen flow rate collected by the current oxygen flow rate sensor, the oxygen flow rate error and the preset constant value are input into the first BP neural network model, and the first group of PID control parameters for oxygen flow rate control is output through the first BP neural network model;

[0011] The calculated target air flow, the actual air flow collected by the current air flow sensor, the air flow error and the preset constant value are input into the second BP neural network model, and the second set of PID control parameters for air flow control is output through the second BP neural network model;

[0012] A first control signal is generated by calculating based on the oxygen flow error and the first set of PID control parameters, and a second control signal is generated by calculating based on the air flow error and the second set of PID control parameters;

[0013] The openings of the oxygen-end proportional valve and the air-end proportional valve are adjusted respectively according to the first control signal and the second control signal generated by calculation, and the oxygen flow rate and the air flow rate are controlled to reach the target oxygen flow rate and the target air flow rate respectively, so that the oxygen concentration of the mixed gas in the mixed gas path reaches the set target oxygen concentration.

[0014] In addition, the oxygen concentration control method of a ventilator according to the above embodiment of the present invention may also have the following additional technical features:

[0015] Furthermore, before the step of respectively calculating the target oxygen flow rate and the target air flow rate according to the set target oxygen concentration and the target total flow rate, the step includes:

[0016] Acquire various first respiratory state parameters of the current user, where the first respiratory state parameters include blood oxygen saturation, carbon dioxide partial pressure, inhalation time, and breathing depth;

[0017] Determine the required target total flow based on inspiratory time and breathing depth;

[0018] The required target oxygen concentration is determined based on blood oxygen saturation and carbon dioxide partial pressure.

[0019] Furthermore, after the step of outputting a first set of PID control parameters for oxygen flow control through the first BP neural network model, the step further includes:

[0020] Acquire various second respiratory state parameters of the current user, where the second respiratory state parameters include blood oxygen saturation, carbon dioxide partial pressure, respiratory rate and respiratory depth;

[0021] Dynamically calculate the adjustment factor corresponding to each PID control parameter in the first group of PID control parameters according to the change rate of the second respiratory state parameter;

[0022] Each PID control parameter in the first group of PID control parameters is adjusted according to the adjustment factor corresponding to each PID control parameter.

[0023] Further, the first set of PID control parameters includes a first proportional parameter, a first integral parameter and a first differential parameter;

[0024] The step of dynamically calculating the adjustment factor corresponding to each PID control parameter in the first group of PID control parameters according to the change rate of the second respiratory state parameter comprises:

[0025] dynamically calculating a proportional adjustment factor of a first proportional parameter according to a rate of change of the respiratory frequency;

[0026] Dynamically calculate an integral adjustment factor of the first integral parameter according to the rate of change of the breathing depth;

[0027] The differential adjustment factor of the first differential parameter is dynamically calculated according to the change rate of blood oxygen saturation and carbon dioxide partial pressure.

[0028] Furthermore, after the step of outputting a first set of PID control parameters for oxygen flow control through the first BP neural network model, the step further includes:

[0029] Calculate the rate of change of each PID control parameter in the first group of PID control parameters in each control cycle;

[0030] Determine whether the change rate of each PID control parameter is less than the corresponding maximum allowable parameter change rate;

[0031] If not, the latest target PID control parameter value is obtained by weighted averaging the target PID control parameter value of the previous control cycle and the target PID control parameter value of the current control cycle, where the target PID control parameter is a PID control parameter whose change rate is greater than the corresponding maximum allowable parameter change rate.

[0032] Further, the first set of PID control parameters includes a first proportional parameter, a first integral parameter and a first differential parameter;

[0033] The step of calculating and generating the first control signal according to the oxygen flow error and the first set of PID control parameters comprises:

[0034] Generate a proportional control output according to the oxygen flow error multiplied by the first proportional parameter;

[0035] Generate an integral control output according to the accumulated value of the oxygen flow error multiplied by the first integral parameter;

[0036] Generate a differential control output according to the rate of change of the oxygen flow error multiplied by the first differential parameter;

[0037] The generated proportional control output, integral control output, and differential control output are added together to generate a final first control signal.

[0038] Furthermore, the calculation formulas for respectively calculating the required target oxygen flow rate and target air flow rate according to the set target oxygen concentration and target total flow rate are:

[0039] ,

[0040] ,

[0041] in is the target oxygen flow rate, is the target air flow rate, is the target oxygen concentration, is the target total flow.

[0042] Another embodiment of the present invention aims to provide an oxygen concentration control system for a ventilator, which is applied to a ventilator including an oxygen gas circuit, an air gas circuit and a mixed gas circuit, wherein the oxygen gas circuit at least includes an oxygen end proportional valve and an oxygen flow sensor, the air gas circuit at least includes an air end proportional valve and an air flow sensor, and the mixed gas circuit includes a mixing chamber for mixing the outputs of the oxygen gas circuit and the air gas circuit and an oxygen concentration sensor, and the system includes:

[0043] A flow calculation module, used to calculate the target oxygen flow and the target air flow according to the set target oxygen concentration and the target total flow;

[0044] A first data output module is used to input the calculated target oxygen flow rate, the actual oxygen flow rate collected by the current oxygen flow rate sensor, the oxygen flow rate error and the preset constant value into the first BP neural network model, and output a first group of PID control parameters for oxygen flow rate control through the first BP neural network model;

[0045] A second data output module is used to input the calculated target air flow, the actual air flow collected by the current air flow sensor, the air flow error and the preset constant value into the second BP neural network model, and output a second set of PID control parameters for air flow control through the second BP neural network model;

[0046] A control signal generating module, used for calculating and generating a first control signal according to an oxygen flow error and a first set of PID control parameters, and calculating and generating a second control signal according to an air flow error and a second set of PID control parameters;

[0047] The regulating module is used to respectively adjust the opening of the oxygen-end proportional valve and the air-end proportional valve according to the first control signal and the second control signal generated by calculation, and control the oxygen flow rate and the air flow rate to reach the target oxygen flow rate and the target air flow rate respectively, so that the oxygen concentration of the mixed gas in the mixed gas path reaches the set target oxygen concentration.

[0048] Another embodiment of the present invention aims to provide a storage medium storing a program, which, when executed by a processor, implements the oxygen concentration control method of a ventilator as described above.

[0049] Another embodiment of the present invention aims to provide a ventilator, comprising a memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the oxygen concentration control method of the ventilator as described above is implemented.

[0050] The oxygen concentration control method of the ventilator provided by the embodiment of the present invention improves the control accuracy of oxygen and air flow by accurately controlling according to the target oxygen flow and the actual oxygen flow, and adaptively adjusting the PID control parameters, thereby ensuring that the oxygen concentration of the mixed gas is closer to the target value; by adopting the BP neural network model to adjust the PID parameters in real time, compared with the traditional fixed PID parameter control, it can respond to airflow changes more quickly, and can also quickly adjust the ratio of oxygen and air in complex breathing modes, reducing the adjustment delay; by adopting the BP neural network model, the PID control parameters can be adaptively adjusted, and the control parameters can be dynamically adjusted according to the target oxygen concentration and the target total flow during the working process of the ventilator to ensure that the system is stable and efficient and adapts to different respiratory loads and environmental changes; by adaptively adjusting the PID control parameters through the BP neural network model, the risk of system overshoot or oscillation is reduced, making the entire oxygen concentration control process more stable and improving the overall stability of the ventilator; at the same time, by controlling and accurately adjusting the mixing ratio of oxygen and air, oxygen waste is reduced, resource utilization efficiency is improved, and energy saving is also achieved while achieving efficient and accurate control. The problem of slow response speed, insufficient stability and difficult parameter adjustment caused by the existing fixed PID parameter control is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 is a flow chart of the oxygen concentration control method of the ventilator in the first embodiment of the present invention;

[0052] Figure 2 The figure is a gas circuit diagram of a ventilator in the oxygen concentration control method of a ventilator in the first embodiment of the present invention;

[0053] Figure 3 It is a structural diagram of the BP neural network model in the oxygen concentration control method of the ventilator in the first embodiment of the present invention;

[0054] Figure 4 is a structural diagram of an oxygen concentration control system of a ventilator in a second embodiment of the present invention;

[0055] Figure 5 is a structural diagram of a ventilator in a third embodiment of the present invention;

[0056] The following specific implementations will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION

[0057] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.

[0058] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.

[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0060] At present, in medical equipment such as ventilators, a set of pre-set, fixed PID controller parameters are usually used to adjust the oxygen concentration. These parameters do not change with changes in the system's operating state or external conditions. The PID controller is a feedback control system that adjusts the system's output to the target value through the adjustment of three parts: proportional, integral, and derivative. In the existing oxygen concentration control, the PID controller adjusts the oxygen flow rate by controlling the opening of the proportional valve, so that the oxygen concentration reaches the target set by the doctor. The three main parameters of the PID controller are Kp (proportional gain), Ki (integral parameter), and Kd (derivative parameter), where Kp (proportional gain) is the instantaneous response speed of the PID controller to the error. The larger the Kp, the faster the PID controller responds to the error, but it may introduce greater oscillations. Ki (integral parameter) is the response of the PID controller to the accumulated error. The larger the Ki, the stronger the integral effect, which can eliminate the steady-state error in the system. Kd (derivative parameter) is the response of the PID controller to the rate of change of the error. The larger the Kd, the faster the PID controller can predict changes in system status and respond, reducing overshoot. The existing use of fixed PID parameters means that the three parameters Kp, Ki and Kd remain unchanged during the control process. At this time, these parameters are usually determined through experiments during equipment design or debugging, and remain fixed during system operation, that is, they are not adjusted according to actual working conditions or changes in the external environment. At this time, the control method with fixed PID parameters may lead to problems such as slow response speed and reduced control accuracy when facing different interferences or system nonlinearity.

[0061] Specifically, the control method with fixed PID parameters will have a slow response speed mainly because the three parameters of the PID controller are set for specific working conditions during system debugging. However, the oxygen concentration control system will encounter many different situations in actual operation, such as changes in the patient's respiratory state, changes in gas flow, temperature fluctuations, etc. These changes will make the fixed PID parameters unable to maintain the best control performance in some cases. In PID control, the response speed depends on the system's ability to respond to errors (i.e., the difference between the target oxygen concentration and the actual oxygen concentration). If the three parameters Kp, Ki and Kd are not set appropriately, the PID controller may respond too slowly. For example, if the proportional gain Kp is set too small, the system will react slowly and cannot quickly correct the deviation of oxygen concentration; if the integral action is too weak, the system may show hysteresis when facing slow changes, resulting in slow adjustment of oxygen concentration. When facing these complex and dynamic changes, the fixed PID parameters cannot adaptively adjust the parameters to speed up the response speed. Therefore, when the system is disturbed or the load changes, the PID controller with fixed PID parameters cannot respond quickly, which is manifested as a slow response speed of the system.

[0062] At the same time, the control method with fixed PID parameters has poor robustness to external interference (such as airflow fluctuations, changes in airway resistance, sensor noise, etc.) This is because the PID parameters are usually set based on an ideal or stable system state during design. However, in actual systems, interference from the external environment can change the dynamic characteristics of the system. For example, airflow fluctuations may cause changes in oxygen or air flow. These external interferences can change the working state of the system and cause the oxygen concentration to deviate from the target value. In the control of fixed PID parameters, since the PID parameters are fixed, the PID controller cannot dynamically adjust the parameters according to the changes in the real-time system and cannot effectively compensate for the impact of interference. For example, when the pressure drops suddenly, the fixed PID controller may not be able to respond quickly to increase the oxygen supply, causing the system to deviate from the set oxygen concentration target, resulting in unstable control.

[0063] In addition, fixed PID parameters are often determined experimentally based on the initial state of the equipment operation or the design environment. These initial parameters may be optimal under specific conditions, but during actual operation, the characteristics of the system (such as patient status, ambient temperature, airflow changes, etc.) may change, causing the fixed PID parameters to no longer be applicable to the new working conditions. When the system characteristics change, the fixed PID parameters may no longer provide the best control effect. For example, as the patient's breathing state changes, the dynamic response of the system may change. At this time, the fixed PID parameters may cause the system to respond too slowly, oscillate, or reduce control accuracy. In this case, the operator usually needs to manually adjust the PID parameters by observing the actual operation of the system to adapt to the new working state. This manual adjustment is not only time-consuming and labor-intensive, but also easy to introduce human errors, further affecting the control performance of the system. Therefore, although the fixed PID parameters do not need to be adjusted frequently during the initial setting, in actual operation, due to changes in the system environment and working conditions, manual intervention is still required to adjust these parameters to ensure that the system continues to maintain good control effects.

[0064] To this end, an embodiment of the present invention provides an oxygen concentration control method for a ventilator applied to a ventilator including an oxygen gas circuit, an air gas circuit and a mixed gas circuit, wherein the oxygen gas circuit at least includes an oxygen end proportional valve and an oxygen flow sensor, the air gas circuit at least includes an air end proportional valve and an air flow sensor, and the mixed gas circuit includes a mixing chamber for mixing the outputs of the oxygen gas circuit and the air gas circuit and an oxygen concentration sensor, and the method includes: calculating a target oxygen flow rate and a target air flow rate according to a set target oxygen concentration and a target total flow rate, respectively; inputting the calculated target oxygen flow rate, the actual oxygen flow rate collected by the current oxygen flow rate sensor, the oxygen flow rate error and a preset constant value into a first BP neural network model, and outputting a first group of PIs for oxygen flow control through the first BP neural network model. D control parameters; the calculated target air flow, the actual air flow collected by the current air flow sensor, the air flow error and the preset constant value are input into the second BP neural network model, and the second BP neural network model outputs the second group of PID control parameters for air flow control; the first control signal is calculated and generated according to the oxygen flow error and the first group of PID control parameters, and the second control signal is calculated and generated according to the air flow error and the second group of PID control parameters; the opening of the oxygen end proportional valve and the air end proportional valve are respectively adjusted according to the calculated first control signal and the second control signal, and the oxygen flow and the air flow are controlled to reach the target oxygen flow and the target air flow respectively, so that the oxygen concentration of the mixed gas in the mixed gas path reaches the set target oxygen concentration.

[0065] In the embodiment of the present invention, by combining the BP neural network model with the PID controller, the PID parameters can be adaptively adjusted, thereby improving the accuracy and response speed of the oxygen and air flow control in the ventilator. Compared with the traditional fixed PID control method, the embodiment of the present invention has the following advantages: the response speed of the oxygen concentration control is improved, and the patient's breathing state changes can be quickly responded to; the control stability is improved, and the influence of external interference on the oxygen concentration adjustment is reduced; the automatic adjustment of the PID parameters is realized, the error caused by manual adjustment is avoided, and the control accuracy is improved.

[0066] The embodiments of the present invention are described below through specific examples.

[0067] Embodiment 1

[0068] See also Figure 1 , which shows the oxygen concentration control method of the ventilator in the first embodiment of the present invention. For the convenience of explanation, only the part related to the embodiment of the present invention is shown. The oxygen concentration control method of the ventilator provided by the embodiment of the present invention includes:

[0069] Step S10, calculating a target oxygen flow rate and a target air flow rate according to the set target oxygen concentration and target total flow rate;

[0070] In one embodiment of the present invention, the oxygen concentration control method is applied to a ventilator including an oxygen gas circuit, an air gas circuit and a mixed gas circuit, wherein the oxygen gas circuit includes at least an oxygen end proportional valve and an oxygen flow sensor, the air gas circuit includes at least an air end proportional valve and an air flow sensor, and the mixed gas circuit includes a mixing chamber for mixing the outputs of the oxygen gas circuit and the air gas circuit and an oxygen concentration sensor. Specifically, refer to Figure 2As shown, the oxygen gas circuit specifically includes a high-pressure oxygen source 1, an oxygen end filter 2, an oxygen gas source pressure sensor 3, an oxygen end pressure regulating valve 4, an oxygen end proportional valve 5 and an oxygen flow sensor 6, which are arranged in sequence. The high-pressure oxygen source is used to provide high-pressure oxygen and is the source of the entire oxygen gas circuit. The high-pressure oxygen source is usually connected to an oxygen cylinder or a centralized oxygen supply system. The oxygen end filter is used to filter particulate matter and impurities in the oxygen to ensure that the oxygen is pure and to prevent impurities from entering the oxygen gas circuit and affecting subsequent control components or patients. The oxygen end filter usually uses an air filter, which is suitable for gas medium filtering. The oxygen gas source pressure sensor is used to monitor the pressure in the oxygen gas circuit to ensure that the oxygen pressure is stable and to facilitate the control of the oxygen flow. The oxygen gas source pressure sensor usually uses a piezoresistive pressure sensor or a capacitive pressure sensor. The oxygen end pressure regulating valve is used to adjust the pressure in the oxygen gas circuit and reduce the high-pressure oxygen to the required working pressure to meet the normal operation of subsequent equipment. The oxygen end pressure regulating valve usually uses a gas pressure regulating valve. The oxygen end proportional valve is used to accurately control the flow rate of oxygen so that the oxygen flow rate is adjusted to match the set target value. The specific oxygen end proportional valve can adjust the valve opening according to the input control signal to change the oxygen flow rate through the valve, thereby realizing continuous control of the oxygen gas flow rate. The oxygen end proportional valve usually adopts an electrically controlled proportional valve. When used specifically, it can also be integrated with the control system to provide linear or digital signal control. The oxygen flow sensor is used to measure the oxygen flow rate flowing through the oxygen gas circuit in real time and provide feedback to the control system to ensure that the oxygen flow rate meets the set target flow rate. The oxygen flow sensor usually adopts a mass flow meter or a thermal flow sensor. Further, the air circuit specifically includes a high-pressure air source 7, an air end filter 8, an air pressure sensor 9, an air end pressure regulating valve 10, an air end proportional valve 11 and an air flow sensor 12, which are arranged in sequence. The high-pressure air source is used to provide high-pressure air and is the source of the entire air circuit. The high-pressure air source is usually connected to a dedicated air compressor or a centralized air supply system. The air end filter, air pressure sensor, air end pressure regulating valve, air end proportional valve and air flow sensor are similar to the corresponding devices in the above-mentioned oxygen gas circuit, and will not be described in detail here. Furthermore, the mixed gas circuit includes a mixing chamber 13 connected to the output ends of the oxygen gas circuit and the air gas circuit, and an oxygen concentration sensor 14. The output gases of the oxygen gas circuit and the air gas circuit are mixed in the mixed gas circuit to form a mixed gas with a predetermined oxygen concentration, and are used to deliver to the patient's breathing circuit, wherein the mixing chamber is generally a pipe or a volume chamber, which has mixing characteristics to ensure that the air and oxygen are evenly mixed. The oxygen concentration sensor is used to measure the oxygen concentration of the mixed gas, wherein the oxygen concentration sensor can generally be an electrochemical sensor or an optical sensor.At this time, the oxygen gas flow path is from the high-pressure oxygen source through the oxygen end filter, the oxygen source pressure sensor, the oxygen end pressure regulating valve, the oxygen end proportional valve, the oxygen flow sensor to the mixing chamber; and the air gas flow path is from the high-pressure air source through the air end filter, the air pressure sensor, the air end pressure regulating valve, the air end proportional valve, the air flow sensor to the mixing chamber; oxygen and air are mixed in the mixing chamber to form a mixed gas. At this time, by adjusting the oxygen end proportional valve and the air end proportional valve, the oxygen concentration of the mixed gas and the total flow of the mixed gas can be adjusted.

[0071] Specifically, the target oxygen flow rate and the target air flow rate are calculated according to the set target oxygen concentration and the target total flow rate respectively as follows:

[0072] ,

[0073] ,

[0074] in is the target oxygen flow rate, is the target air flow rate, is the target oxygen concentration, is the target total flow.

[0075] Specifically, the oxygen content of air is about 21%, that is, the oxygen concentration in air is 0.21 (21%). If pure oxygen is mixed with air, the final oxygen concentration provided by the ventilator is It's the oxygen in the air and externally supplied pure oxygen The weighted average between them. At this time, the oxygen concentration relationship can be expressed by the following formula:

[0076] ,

[0077] at the same time , then replace Replace with , and after sorting out the oxygen concentration calculation formula, the target oxygen flow calculation formula can be obtained. The target oxygen flow rate calculation formula can be further sorted out to obtain the target air flow rate calculation formula. Thus, the target oxygen flow rate and the target air flow rate can be calculated according to the target oxygen concentration and the target total flow rate.

[0078] In one embodiment of the present invention, before the above step S10, the following steps may also be included:

[0079] Acquire various first respiratory state parameters of the current user, where the first respiratory state parameters include blood oxygen saturation, carbon dioxide partial pressure, inhalation time, and breathing depth;

[0080] Determine the required target total flow based on inspiratory time and breathing depth;

[0081] The required target oxygen concentration is determined based on blood oxygen saturation and carbon dioxide partial pressure.

[0082] Specifically, the sensor group is used to obtain various first respiratory state parameters of the user in real time, including but not limited to obtaining the blood oxygen saturation ( ), obtain carbon dioxide partial pressure ( ), the inhalation time (Ti) is detected in real time through the airflow sensor or chest movement sensor, and the breathing depth (VT, also known as tidal volume) of each breath is measured in real time through the volume sensor or spirometer. The target total flow mainly depends on the user's breathing needs, and the inhalation time (Ti) and breathing depth (VT) reflect the user's ventilation needs. The calculation formula for the target total flow is: ,in, is the inhalation time, is the breathing depth (tidal volume), is the target total flow rate. The determination of the target oxygen concentration mainly depends on the user's blood oxygen saturation ( ) and partial pressure of carbon dioxide ( ). When the user When it is lower, it indicates that more oxygen is needed. If it is high, it may indicate that the user is not breathing enough. When the oxygen concentration decreases, the target oxygen concentration is increased accordingly to provide more oxygen. When the oxygen concentration increases, it indicates that there is insufficient ventilation, and the target oxygen concentration is increased accordingly. At this time, the target oxygen concentration and the target total flow rate are dynamically calculated by combining the first respiratory state parameters such as the inhalation time, the breathing depth, the blood oxygen saturation and the carbon dioxide partial pressure, so as to perform the subsequent step S10 process. Of course, it can be understood that in other embodiments of the present invention, the target oxygen concentration and the target total flow rate can also be set by the user.

[0083] Step S20, inputting the calculated target oxygen flow rate, the actual oxygen flow rate collected by the current oxygen flow rate sensor, the oxygen flow rate error and the preset constant value into the first BP neural network model, and outputting a first set of PID control parameters for oxygen flow rate control through the first BP neural network model;

[0084] In one embodiment of the present invention, a BP neural network model is first constructed and trained, wherein the BP neural network model (Backpropagation Neural Network) is a feedforward neural network model, and the network weights are adjusted by the backpropagation algorithm to minimize the error between the predicted value and the actual value. Figure 3 As shown, the BP neural network model consists of an input layer, a hidden layer (also called a hidden layer) and an output layer. In the embodiment of the present invention, the input layer includes four neurons, namely the target oxygen flow rate, the actual oxygen flow rate, the oxygen flow rate error, and a preset constant value (unit bias 1, used to increase the expression ability of the model). The output layer includes three neurons, namely Kp (proportional parameter), Ki (integral parameter), and Kd (differential parameter). The hidden layer includes five neurons, each neuron in the input layer is connected to each neuron in the hidden layer, and the neurons in the hidden layer process the information of the input layer by weighted summation and pass it to the next layer. At the same time, each neuron in the hidden layer is also connected to each neuron in the output layer. The neurons in the output layer calculate the final output value (that is, PID control parameters Kp, Ki and Kd) based on the information transmitted from the hidden layer.

[0085] Specifically, the setting of selecting 4 neurons as the input layer is to ensure that the BP neural network model can fully capture all necessary information related to oxygen flow control and improve the expression ability of the BP neural network model. The target oxygen flow is the expected output of the system, which is the target flow set by the ventilator according to the patient's needs. It provides the reference information required by the BP neural network model, that is, the oxygen flow target that should be maintained. The BP neural network model must adjust the proportional parameter Kp, the integral parameter Ki and the differential parameter Kd according to the target oxygen flow so as to control the actual oxygen flow to the target value as accurately as possible. The current actual oxygen flow measured by the oxygen flow sensor is used to enable the BP neural network model to determine the current oxygen flow condition for comparison with the target oxygen flow. The error value (i.e., the difference between the target oxygen flow and the actual oxygen flow) obtained at this time is the key to determine the adjustment of the PID control parameters. The BP neural network model needs to use this information to output the adaptively adjusted PID control parameters. The oxygen flow error is the difference between the target oxygen flow and the actual oxygen flow, and the oxygen flow error is one of the most important inputs in PID control. The core of PID control is to adjust the PID parameters according to the size of the error (including the current error, the accumulation of the error and the change of the error), and then calculate the control signal to adjust the opening of the proportional valve. Among them, the oxygen flow error enables the PID controller to adjust the system output in time to reduce the error and achieve higher accuracy and rapid response. At this time, the BP neural network model learns the influence of the oxygen flow error on the output PID control parameters to achieve adaptive adjustment. The preset constant value can be set to a constant value of 1. The role of this constant neuron is to act as a bias term, which can enable the BP neural network model to adjust the bias weight of the neuron during the training process, so that the BP neural network model can adapt to different input conditions, so that the model has stronger expression ability. It is equivalent to adding a bias neuron to the BP neural network model. The BP neural network model optimizes the output of the model by adjusting the weight and bias during the training process to ensure the flexibility and stability of the model. If there is no preset constant value, the BP neural network model may be limited and cannot fit the complex input-output relationship well. Therefore, the bias term enables the BP neural network model to fit the actual data without input, avoiding the underfitting problem that may occur in simple models.

[0086] Among them, the hidden layer realizes the nonlinear mapping between input and output through the weighted connection between the input layer and the output layer, so as to learn and extract the complex patterns and features in the input data. Specifically, the neurons in the hidden layer usually use nonlinear activation functions, such as ReLU (Rectified Linear Unit) or Sigmoid function, and perform nonlinear transformation on the input data through nonlinear activation functions, so that the BP neural network model can learn complex nonlinear relationships. Through the set hidden layer, the BP neural network model can extract patterns from linear and nonlinear features to achieve more accurate control and prediction. At the same time, the hidden layer extracts high-level features of the input data through its neurons, so that the BP neural network model can capture the deep relationship in the input data. The number of hidden neurons does not need to correspond to the number of input or output neurons one by one. The number of neurons in the hidden layer determines the capacity and nonlinear expression ability of the neural network. If there are too many hidden neurons, it may lead to overfitting, while too few may lead to underfitting. In the embodiment of the present invention, five neurons are specifically used to help enhance the ability of the BP neural network model to perform complex nonlinear mapping of input features. It can provide sufficient expression ability to a certain extent, effectively learn the relationship between complex inputs and outputs, so that it can provide sufficient learning ability in more complex tasks, while not being too complex to cause model training difficulties or overfitting, avoiding the problems of underfitting (the model is too simple) or overfitting (the model is too complex).

[0087] Among them, the neurons in the output layer correspond to the three PID control parameters of the PID controller, namely Kp (proportional parameter), Ki (integral parameter), and Kd (differential parameter). The neurons in the output layer generally use a linear activation function, mainly because the output of the PID control parameter needs to be a continuous value. Therefore, the PID control parameter output by the output layer in the BP neural network model is used to adjust the oxygen end proportional valve. Among them, Kp is used to control the proportional relationship between the error and the current output. The larger the Kp, the faster the output changes and the stronger the ability to adapt to the current error. Ki is used to process long-term errors in the system and eliminate steady-state errors. When Ki increases, the PID controller can be adjusted faster to eliminate historical errors. Kd is used to predict the trend of error changes and respond quickly. The larger the Kd, the more sensitive the system is to error changes. Therefore, each PID control parameter controls different control behaviors, affecting the response speed, stability and accuracy of the system. Therefore, the output layer needs to set 3 neurons to output these 3 PID control parameters respectively, so that the BP neural network model can adjust the behavior of the PID controller. At this time, each output neuron directly corresponds to a control parameter in the PID controller. At this time, the three PID control parameters are adaptively calculated by the BP neural network model, and the dynamic optimization of PID control can be achieved. Although the BP neural network model has four neurons in the input layer and only three neurons in the output layer, through the processing of the hidden layer, the BP neural network model can extract three effective PID control parameter outputs from the four input features.

[0088] Therefore, in an embodiment of the present invention, by limiting the input to the target oxygen flow rate, the actual oxygen flow rate, the flow rate error and the preset constant value, the computational complexity of the BP neural network model is simplified, and the computational efficiency and interpretability of the BP neural network model are improved. At the same time, it is ensured that the model can effectively reflect the core requirements of ventilator control, avoiding the complexity, overfitting risk and data sparsity problems caused by too much input. The BP neural network model can directly calculate and output PID control parameters (Kp, Ki, Kd), and the PID controller can directly adaptively adjust the oxygen end proportional valve of the ventilator according to the PID control parameters under different environments, thereby realizing direct dynamic adjustment of the PID parameters and maintaining the stability and accuracy of oxygen concentration control. At the same time, the PID control parameters are adjusted in real time through the BP neural network, which improves the robustness of the system to external interference and reduces the control performance degradation caused by changes in system characteristics. At the same time, the dynamic adjustment of the PID control parameters also enables the system to respond quickly to changes and realize efficient oxygen concentration control.

[0089] Furthermore, the BP neural network model learns the mapping relationship between input and output through training, where the training process includes forward propagation and backpropagation, and the network weights are adjusted by minimizing the loss function. The specific steps include:

[0090] Data preparation, where the training data consists of the actual working data and target output (PID parameters) of the ventilator. The training data can be obtained in the following ways: 1. Use the simulation model to generate oxygen flow data and corresponding PID parameters under different conditions to simulate different control scenarios. 2. Collect the relationship data of oxygen flow, error and PID parameters through the real system operation. Each data sample includes input features (target oxygen flow, actual oxygen flow, oxygen error, preset constant value) and output target value (Kp, Ki, Kd).

[0091] In forward propagation, the input data is passed through the BP neural network model layer by layer to finally generate the output result. In this process, the input data is multiplied by the weights of each layer of neurons, and the bias term is added, and finally the output is obtained through the activation function. From the input layer to the hidden layer, the input data is multiplied by the weight matrix and passed through the activation function. From the hidden layer to the output layer, the output of the hidden layer is passed through the weight matrix and activation function again, and finally the predicted values ​​of the PID control parameters (i.e. Kp, Ki, Kd) are generated.

[0092] Calculate the loss function. After forward propagation, the error between the predicted output and the actual target is calculated through the loss function. Commonly used loss functions include mean squared error (MSE).

[0093] Back propagation, using the chain rule to calculate the gradient of the loss function relative to the network weights, thereby updating the weights and minimizing the error. The specific steps include calculating the partial derivative of the loss function with respect to the weights of the output layer and updating the weights of the output layer. Backward propagation layer by layer, calculating the partial derivative of the loss function with respect to the weights of the hidden layer, and updating the weights of the hidden layer. The gradient descent algorithm is usually used to update the weights. The specific gradient descent method is to calculate the gradient of the loss function (that is, the derivative of the error), and then adjust the weights and biases of the neural network in the opposite direction of the gradient to minimize the error. In order to speed up the training process, optimization algorithms (such as Adam and RMSprop) are usually used to enable adaptive adjustment of the learning rate, so as to find the optimal solution more efficiently. The back propagation and weight update will iterate multiple times on the entire data set, which is called a training cycle (Epoch). In each cycle, the BP neural network model gradually reduces the prediction error by updating the weights until it converges to an optimal state.

[0094] Model evaluation and tuning: During the training process, a validation set is usually used to evaluate the generalization ability of the model to ensure that the model does not overfit. If the model performs poorly, the model performance can be improved by adjusting the hyperparameters (such as learning rate and activation function).

[0095] Furthermore, after the BP neural network model is constructed and trained, the BP neural network model is used as the first BP neural network model. At this time, the calculated target oxygen flow rate, the actual oxygen flow rate collected by the current oxygen flow rate sensor, the oxygen flow rate error and the preset constant value are input into the trained first BP neural network model, and the first BP neural network model outputs a first set of PID control parameters for oxygen flow rate control, wherein the first set of PID control parameters includes a first proportional parameter Kp1, a first integral parameter Ki1 and a first differential parameter Kd1.

[0096] Therefore, in an embodiment of the present invention, the BP neural network model can capture and represent the complex nonlinear relationship between input and output, so that the PID control parameters can be automatically adjusted to adapt to different system states, so as to maintain a good control effect in the face of various external interferences and reduce the need for manual adjustment. At the same time, for the oxygen flow control problem, the relationship between the target oxygen flow and the actual oxygen flow is often nonlinear and may be affected by various factors, such as environmental changes such as pressure and temperature. The BP neural network model can fit this nonlinear relationship well through the combination of multiple hidden layers and activation functions, and make adaptive adjustments to the changes in the system. At the same time, the BP neural network has strong adaptability, can dynamically adjust the output according to different input conditions, and generate adaptive PID control parameters, thereby improving the control accuracy and response speed of the system.

[0097] Furthermore, in one embodiment of the present invention, although the BP neural network model can dynamically output the Kp, Ki, and Kd parameters of the PID controller, the adjustment strategy of the PID controller and the system dynamic characteristics still need to be determined through experiments. If the parameters output by the BP neural network model change too quickly or are unstable, it may cause overshoot or oscillation in the adjustment of the PID controller, affecting the control accuracy and stability of the system. To this end, the embodiments of the present invention propose the following two solutions.

[0098] Specifically, in the first solution of the present invention, after step S20, the following steps are further included:

[0099] Acquire various second respiratory state parameters of the current user, where the second respiratory state parameters include blood oxygen saturation, carbon dioxide partial pressure, respiratory rate and respiratory depth;

[0100] Dynamically calculate the adjustment factor corresponding to each PID control parameter in the first group of PID control parameters according to the change rate of the second respiratory state parameter;

[0101] Each PID control parameter in the first group of PID control parameters is adjusted according to the adjustment factor corresponding to each PID control parameter.

[0102] Wherein, refer to the above-mentioned method to obtain the various second respiratory state parameters of the current user, wherein the second respiratory state parameters include but are not limited to blood oxygen saturation, carbon dioxide partial pressure, respiratory rate and respiratory depth; after obtaining the various second respiratory state parameters, calculate the change rate of each second respiratory state parameter, that is, the change amplitude of each second respiratory state parameter in each period of time. The change rate reflects the dynamic change trend of the patient's respiratory state. According to the change rate of the second respiratory state parameter, the adjustment factor of the PID control parameter is dynamically calculated to make the response of the PID controller more in line with the patient's current respiratory needs. Specifically, the step of dynamically calculating the adjustment factor corresponding to each PID control parameter in the first group of PID control parameters according to the change rate of the second respiratory state parameter includes:

[0103] dynamically calculating a proportional adjustment factor of a first proportional parameter according to a rate of change of the respiratory frequency;

[0104] Dynamically calculate an integral adjustment factor of the first integral parameter according to the rate of change of the breathing depth;

[0105] The differential adjustment factor of the first differential parameter is dynamically calculated according to the change rate of blood oxygen saturation and carbon dioxide partial pressure.

[0106] Specifically, when the respiratory rate increases (rapid breathing), the patient may urgently need to increase the oxygen supply. At this time, the response speed of the PID controller needs to be improved. Therefore, by increasing the proportional adjustment factor, the system can be more sensitive to respiratory changes and the oxygen flow rate can be increased quickly. When the breathing depth decreases (shallow breathing), it means that the patient's ventilation is insufficient. The patient may need to control the oxygen supply more accurately to avoid unnecessary waste caused by excessive oxygen supply. Therefore, by appropriately increasing the integral adjustment factor, the system can continuously adjust small errors, reduce accumulated errors, and make oxygen concentration adjustment more precise. When blood oxygen saturation decreases and carbon dioxide partial pressure increases, it means that the patient is in a state of hypoxia. At this time, the oxygen supply should be increased rapidly. Therefore, by increasing the differential adjustment factor, the ability to predict rapid changes in oxygen demand can be improved to avoid lagging changes in oxygen concentration.

[0107] Further, each PID control parameter in the first group of PID control parameters is adjusted according to each calculated adjustment factor, wherein the formula is as follows:

[0108] ,

[0109] ,

[0110] ,

[0111] in is the first proportional parameter adjusted according to the proportional adjustment factor, 1 is the initial first proportional parameter output by the BP neural network model, is the proportional adjustment factor, which indicates the sensitivity of the proportional adjustment factor to changes in respiratory rate. is the rate of change of respiratory frequency, is the first integral parameter adjusted according to the integral adjustment factor, 1 is the initial first integral parameter output by the BP neural network model, is the integral adjustment factor, which indicates the sensitivity of the integral adjustment factor to changes in breathing depth. is the rate of change of breathing depth, is the first differential parameter adjusted according to the differential adjustment factor, is the initial first differential parameter output by the BP neural network model, is the differential regulation factor, which indicates the sensitivity of the differential regulation factor to changes in blood oxygen saturation and carbon dioxide partial pressure. is the rate of change of blood oxygen saturation, is the rate of change of the partial pressure of carbon dioxide. At this time, the adjustment factor is introduced into the PID control, and the PID control parameters are adaptively adjusted in combination with the change trend of the patient's second respiratory state parameters to enhance the system's responsiveness, so that the system can automatically adjust the control strategy according to the patient's respiratory changes, avoiding adjustment lag or over-adjustment due to rapid changes in respiratory state.

[0112] Among them, in the second solution of the present invention, after step S20, it also includes:

[0113] Calculate the rate of change of each PID control parameter in the first group of PID control parameters in each control cycle;

[0114] Determine whether the change rate of each PID control parameter is less than the corresponding maximum allowable parameter change rate;

[0115] If not, the latest target PID control parameter value is obtained by weighted averaging the target PID control parameter value of the previous control cycle and the target PID control parameter value of the current control cycle, where the target PID control parameter is a PID control parameter whose change rate is greater than the corresponding maximum allowable parameter change rate.

[0116] Specifically, in each control cycle, each PID control parameter in the current control cycle is compared with each PID control parameter in the previous control cycle, and the change rate of each PID parameter is calculated. For each PID control parameter, the corresponding maximum allowable change rate is set to prevent the PID control parameter from changing too much in a short period of time. At this time, it is determined whether the change rate of each PID control parameter is less than the corresponding maximum allowable parameter change rate. If so, each PID control parameter in the current control cycle is directly output. If not, the target PID control parameter whose change rate exceeds the maximum allowable rate is weighted average smoothing to make its change more gentle and avoid violent fluctuations. The specific calculation formula is:

[0117] ,

[0118] ,

[0119] ,

[0120] in, is the first scale parameter after smoothing, 1 is the first proportional parameter of the previous cycle, is the initial first scale parameter output by the BP neural network model, is the first integral parameter after smoothing, is the first integral parameter of the previous cycle, is the initial first integral parameter output by the BP neural network model, is the first differential parameter after smoothing, is the first differential parameter of the previous cycle, is the initial first differential parameter output by the BP neural network model, is the smoothing coefficient of the previous control cycle, is the smoothing coefficient of the current control cycle and satisfies , used to control the smoothness of PID control parameter changes. Usually, Set to a larger value (such as 0.7) to ensure stability of the smoothing process. Set to a smaller value (such as 0.3) to reduce rapid changes in the current PID control parameters.

[0121] The latest PID control parameters after smoothing will be used as the PID control parameters in the current control cycle, which can ensure the stability of oxygen flow regulation and avoid regulation instability caused by excessive parameter fluctuations. At this time, the PID control parameters output by the BP neural network will be monitored in real time and the change rate will be judged in each control cycle to ensure that the parameter change rate is within a reasonable range. When the control process is stable, the adjustment rate of the PID control parameters will gradually decrease, and the system will maintain stable operation, which can effectively prevent sudden changes in the PID control parameters and ensure the stability and response speed of the system regulation, thereby achieving precise control of the ventilator oxygen flow and meeting the patient's breathing needs.

[0122] Step S30, inputting the calculated target air flow, the actual air flow collected by the current air flow sensor, the air flow error and the preset constant value into the second BP neural network model, and outputting a second set of PID control parameters for air flow control through the second BP neural network model;

[0123] Among them, in the embodiment of the present invention, referring to the above step S20, the calculated target air flow, the actual air flow collected by the current air flow sensor, the air flow error and the preset constant value are input into the second BP neural network model, and the second BP neural network model outputs the second group of PID control parameters for air flow control, wherein the second group of PID control parameters includes the second proportional parameter Kp2, the second integral parameter Ki2 and the second differential parameter Kd2, wherein the second BP neural network model can be obtained with reference to the construction and training method of the BP neural network model described above. At the same time, referring to the above step S20, it is also possible to avoid the parameter output of the second BP neural network model from changing too fast or being unstable, which may cause overshoot or oscillation in the adjustment of the PID controller, affecting the control accuracy and stability of the system.

[0124] Step S40, calculating and generating a first control signal according to the oxygen flow error and the first set of PID control parameters, and calculating and generating a second control signal according to the air flow error and the second set of PID control parameters;

[0125] In one embodiment of the present invention, the step of calculating and generating the first control signal according to the oxygen flow error and the first set of PID control parameters includes:

[0126] Generate a proportional control output according to the oxygen flow error multiplied by the first proportional parameter;

[0127] Generate an integral control output according to the accumulated value of the oxygen flow error multiplied by the first integral parameter;

[0128] Generate a differential control output according to the rate of change of the oxygen flow error multiplied by the first differential parameter;

[0129] The generated proportional control output, integral control output, and differential control output are added together to generate a final first control signal.

[0130] Specifically, the PID controller is used to adjust the control signal according to the oxygen flow error (the difference between the target oxygen flow and the actual oxygen flow) so that the system reaches the set target. The PID controller consists of three parts: proportional (P), integral (I), and differential (D). They respectively handle the current error, the accumulation of past errors, and the prediction of future errors.

[0131] In proportional control (P), the control signal is proportional to the current error. The specific formula is:

[0132] in For proportional control output, is the first scale parameter, is the oxygen flow error, where increasing the first proportional parameter will speed up the response but may cause overshoot.

[0133] In integral control (I), the control signal is proportional to the accumulation of error. The specific formula is:

[0134] Where I is the integral control output, It is the first integral parameter. The integral part eliminates the steady-state error by accumulating the error. Increasing the first integral parameter will speed up the elimination of the deviation, but too large a value may cause oscillation.

[0135] In differential control (D), the control signal is proportional to the rate of change of the error. The specific formula is:

[0136] ,

[0137] in is the differential control output, It is the first differential parameter. The differential part can predict the changing trend of the error. Increasing the first differential parameter will suppress the overshoot of the system, but too large a value may cause noise amplification.

[0138] Furthermore, the generated proportional control output, integral control output, and differential control output are added to generate a final first control signal. At this time, the calculation formula of the first control signal is:

[0139] ,

[0140] in It is the first control signal, which enables the system to achieve the set target quickly and stably by comprehensively considering the current error, past errors and the changing trend of the error.

[0141] Correspondingly, the calculation and generation of the second control signal based on the air flow error and the second set of PID control parameters can be specifically referred to the above description and will not be elaborated here. At this time, the PID control parameters are adaptively adjusted through the BP neural network model, so that the PID controller can maintain efficient and precise adjustment capabilities in the face of dynamically changing environments, avoiding the problem of manual adjustment of PID control parameters in traditional PID control, and being able to dynamically adjust the control strategy based on real-time feedback.

[0142] Step S50, adjusting the openings of the oxygen-end proportional valve and the air-end proportional valve respectively according to the first control signal and the second control signal generated by the calculation, controlling the oxygen flow rate and the air flow rate to reach the target oxygen flow rate and the target air flow rate respectively, so that the oxygen concentration of the mixed gas in the mixed gas path reaches the set target oxygen concentration;

[0143] Among them, in one embodiment of the present invention, after the first control signal and the second control signal are calculated, the first control signal is sent to the oxygen end proportional valve and the second control signal is sent to the air end proportional valve respectively. At this time, the oxygen end proportional valve receives the first control signal, and adjusts its opening according to the size of the first control signal to change the oxygen flow rate so that it gradually approaches the target oxygen flow rate. The air end proportional valve receives the second control signal, and adjusts its opening according to the size of the second control signal to change the air flow rate so that it gradually approaches the target air flow rate. At this time, by adjusting the oxygen end proportional valve and the air end proportional valve at the same time, the oxygen flow rate and the air flow rate reach the calculated target oxygen flow rate and target air flow rate respectively. Then, in the mixing chamber, oxygen and air are mixed according to the calculated ratio, and the oxygen concentration of the final generated mixed gas will be consistent with the set target oxygen concentration.

[0144] In summary, the oxygen concentration control method of the ventilator in the above embodiment of the present invention improves the control accuracy of oxygen and air flow by accurately controlling the target oxygen flow and the actual oxygen flow, and adaptively adjusting the PID control parameters, thereby ensuring that the oxygen concentration of the mixed gas is closer to the target value; by using the BP neural network model to adjust the PID parameters in real time, compared with the traditional fixed PID parameter control, it can respond to airflow changes more quickly, and can also quickly adjust the ratio of oxygen and air in complex breathing modes, reducing the adjustment delay; by using the BP neural network model to adaptively adjust the PID control parameters, during the working process of the ventilator, the control parameters are dynamically adjusted according to the target oxygen concentration and the target total flow, ensuring that the system is stable and efficient, and adapting to different respiratory loads and environmental changes; by adaptively adjusting the PID control parameters through the BP neural network model, the risk of system overshoot or oscillation is reduced, making the entire oxygen concentration control process more stable, and improving the overall stability of the ventilator; at the same time, by controlling and accurately adjusting the mixing ratio of oxygen and air, oxygen waste is reduced, resource utilization efficiency is improved, and energy saving is also achieved while achieving efficient and accurate control. The problems of slow response speed, insufficient stability, and difficult parameter adjustment generated by the existing fixed PID parameter control are solved.

[0145] Embodiment 2

[0146] See also Figure 4 , is a schematic diagram of the structure of an oxygen concentration control system of a ventilator provided by the second embodiment of the present invention. For the convenience of explanation, only the part related to the embodiment of the present invention is shown. The oxygen concentration control system of the ventilator is applied to a ventilator including an oxygen gas circuit, an air gas circuit and a mixed gas circuit. The oxygen gas circuit at least includes an oxygen end proportional valve and an oxygen flow sensor. The air gas circuit at least includes an air end proportional valve and an air flow sensor. The mixed gas circuit includes a mixing chamber for mixing the outputs of the oxygen gas circuit and the air gas circuit and an oxygen concentration sensor. The system includes:

[0147] A flow calculation module 110 is used to calculate a target oxygen flow rate and a target air flow rate according to a set target oxygen concentration and a target total flow rate;

[0148] A first data output module 120 is used to input the calculated target oxygen flow rate, the actual oxygen flow rate collected by the current oxygen flow rate sensor, the oxygen flow rate error and the preset constant value into the first BP neural network model, and output a first set of PID control parameters for oxygen flow rate control through the first BP neural network model;

[0149] The second data output module 130 is used to input the calculated target air flow, the actual air flow collected by the current air flow sensor, the air flow error and the preset constant value into the second BP neural network model, and output a second set of PID control parameters for air flow control through the second BP neural network model;

[0150] A control signal generating module 140, configured to generate a first control signal based on an oxygen flow error and a first set of PID control parameters, and to generate a second control signal based on an air flow error and a second set of PID control parameters;

[0151] The regulating module 150 is used to respectively adjust the opening of the oxygen-end proportional valve and the air-end proportional valve according to the first control signal and the second control signal generated by calculation, and control the oxygen flow rate and the air flow rate to reach the target oxygen flow rate and the target air flow rate respectively, so that the oxygen concentration of the mixed gas in the mixed gas path reaches the set target oxygen concentration.

[0152] Furthermore, in one embodiment of the present invention, the system further comprises:

[0153] A first parameter acquisition module, used to acquire various first respiratory state parameters of the current user, wherein the first respiratory state parameters include blood oxygen saturation, carbon dioxide partial pressure, inhalation time and breathing depth;

[0154] A target total flow determination module, used to determine the required target total flow according to the inhalation time and the breathing depth;

[0155] The target oxygen concentration determination module is used to determine the required target oxygen concentration based on blood oxygen saturation and carbon dioxide partial pressure.

[0156] Furthermore, in one embodiment of the present invention, the system further comprises:

[0157] A second parameter acquisition module, used to acquire various second respiratory state parameters of the current user, wherein the second respiratory state parameters include blood oxygen saturation, carbon dioxide partial pressure, respiratory frequency and respiratory depth;

[0158] an adjustment factor calculation module, used for dynamically calculating the adjustment factor corresponding to each PID control parameter in the first group of PID control parameters according to the change rate of the second respiratory state parameter;

[0159] The first control parameter adjustment module is used to adjust each PID control parameter in the first group of PID control parameters according to the adjustment factor corresponding to each PID control parameter.

[0160] Further, in one embodiment of the present invention, the first group of PID control parameters includes a first proportional parameter, a first integral parameter and a first differential parameter; the adjustment factor calculation module includes:

[0161] a proportional adjustment factor calculation unit, used for dynamically calculating a proportional adjustment factor of a first proportional parameter according to a rate of change of a respiratory frequency;

[0162] An integral adjustment factor calculation unit, used for dynamically calculating an integral adjustment factor of the first integral parameter according to a rate of change of the breathing depth;

[0163] The differential adjustment factor calculation unit is used to dynamically calculate the differential adjustment factor of the first differential parameter according to the change rate of blood oxygen saturation and carbon dioxide partial pressure.

[0164] Furthermore, in one embodiment of the present invention, the system further comprises:

[0165] A change rate calculation module, used for calculating the change rate of each PID control parameter in the first group of PID control parameters in each control cycle;

[0166] A change rate judgment module is used to judge whether the change rate of each PID control parameter is less than the corresponding maximum allowable parameter change rate;

[0167] The second control parameter adjustment module is used to obtain the latest target PID control parameter value by weighted averaging the target PID control parameter value of the previous control cycle and the target PID control parameter value of the current control cycle when the change rate determines that the change rate of each PID control parameter is not less than the corresponding maximum allowable parameter change rate. The target PID control parameter is a PID control parameter whose change rate is greater than the corresponding maximum allowable parameter change rate.

[0168] Further, in one embodiment of the present invention, the first set of PID control parameters includes a first proportional parameter, a first integral parameter and a first differential parameter;

[0169] The control signal generating module comprises:

[0170] A proportional control output unit, used to generate a proportional control output according to the oxygen flow error multiplied by a first proportional parameter;

[0171] An integral control output unit, used to generate an integral control output according to the accumulated value of the oxygen flow error multiplied by a first integral parameter;

[0172] A differential control output unit, used for generating a differential control output according to a rate of change of the oxygen flow error multiplied by a first differential parameter;

[0173] The first control signal generating unit is used to add the generated proportional control output, integral control output, and differential control output to generate a final first control signal.

[0174] Furthermore, in one embodiment of the present invention, the calculation formula of the flow calculation module is:

[0175] ,

[0176] ,

[0177] in is the target oxygen flow rate, is the target air flow rate, is the target oxygen concentration, is the target total flow.

[0178] The oxygen concentration control system of the ventilator provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0179] Embodiment 3

[0180] Another aspect of the present invention also provides a ventilator, see Figure 5 , shown is a ventilator in the third embodiment of the present invention, including a memory 200, a processor 100, and a program 300 stored in the memory 200 and executable on the processor. When the processor 100 executes the program 300, the oxygen concentration control method of the ventilator in the above embodiment is implemented.

[0181] In some embodiments, the processor 100 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor or other data processing chip, used to run program codes or process data stored in the memory 200, such as executing access restriction programs.

[0182] Among them, the memory 200 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 200 can be an internal storage unit of the ventilator, such as the hard disk of the ventilator. In other embodiments, the memory 200 can also be an external storage device of the ventilator, such as a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the ventilator. Further, the memory 200 can also include both an internal storage unit and an external storage device of the ventilator. The memory 200 can not only be used to store application software and various types of data installed in the ventilator, but also can be used to temporarily store data that has been output or is to be output.

[0183] It should be pointed out that Figure 5 The structure shown does not constitute a limitation of the ventilator. In other embodiments, the ventilator may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0184] In summary, the ventilator in the above embodiment of the present invention improves the control accuracy of oxygen and air flow by accurately controlling the target oxygen flow and the actual oxygen flow, and adaptively adjusting the PID control parameters, thereby ensuring that the oxygen concentration of the mixed gas is closer to the target value; by using the BP neural network model to adjust the PID parameters in real time, compared with the traditional fixed PID parameter control, it can respond to airflow changes more quickly, and can also quickly adjust the ratio of oxygen and air in complex breathing modes, reducing the adjustment delay; by using the BP neural network model to adaptively adjust the PID control parameters, during the working process of the ventilator, the control parameters are dynamically adjusted according to the target oxygen concentration and the target total flow, ensuring that the system is stable and efficient, and adapting to different respiratory loads and environmental changes; by adaptively adjusting the PID control parameters through the BP neural network model, the risk of system overshoot or oscillation is reduced, making the entire oxygen concentration control process more stable, and improving the overall stability of the ventilator; at the same time, by controlling and accurately adjusting the mixing ratio of oxygen and air, oxygen waste is reduced, resource utilization efficiency is improved, and energy saving is also achieved while achieving efficient and accurate control. The problems of slow response speed, insufficient stability, and difficult parameter adjustment generated by the existing fixed PID parameter control are solved.

[0185] An embodiment of the present invention further provides a storage medium on which a program is stored. When the program is executed by a processor, the oxygen concentration control method of the ventilator as described in the above embodiment is implemented.

[0186] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional units or modules as needed, that is, the internal structure of the storage device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the implementation method can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application.

[0187] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be specifically implemented in any storage medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For purposes of this specification, a "storage medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0188] More specific examples (non-exhaustive list) of readable storage media include the following: an electrical connection with one or more wirings (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the storage medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a memory.

[0189] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0190] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0191] The above-described embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the attached claims.

Claims

1. A method for controlling oxygen concentration of a ventilator, characterized in that: Applicable to a ventilator including an oxygen gas circuit, an air gas circuit and a mixed gas circuit, the oxygen gas circuit at least includes an oxygen end proportional valve and an oxygen flow sensor, the air gas circuit at least includes an air end proportional valve and an air flow sensor, the mixed gas circuit includes a mixing chamber for mixing the outputs of the oxygen gas circuit and the air gas circuit and an oxygen concentration sensor, the method includes: The target oxygen flow rate and the target air flow rate are calculated respectively according to the set target oxygen concentration and target total flow rate; The calculated target oxygen flow rate, the actual oxygen flow rate collected by the current oxygen flow rate sensor, the oxygen flow rate error and the preset constant value are input into the first BP neural network model, and the first group of PID control parameters for oxygen flow rate control is output through the first BP neural network model; The calculated target air flow, the actual air flow collected by the current air flow sensor, the air flow error and the preset constant value are input into the second BP neural network model, and the second set of PID control parameters for air flow control is output through the second BP neural network model; A first control signal is generated by calculating based on the oxygen flow error and the first set of PID control parameters, and a second control signal is generated by calculating based on the air flow error and the second set of PID control parameters; According to the first control signal and the second control signal generated by the calculation, the openings of the oxygen end proportional valve and the air end proportional valve are respectively adjusted to control the oxygen flow rate and the air flow rate to reach the target oxygen flow rate and the target air flow rate respectively, so that the oxygen concentration of the mixed gas in the mixed gas path reaches the set target oxygen concentration; After the step of outputting a first set of PID control parameters for oxygen flow control through the first BP neural network model, the following steps are further included: Acquire various second respiratory state parameters of the current user, where the second respiratory state parameters include blood oxygen saturation, carbon dioxide partial pressure, respiratory rate and respiratory depth; Dynamically calculate the adjustment factor corresponding to each PID control parameter in the first group of PID control parameters according to the change rate of the second respiratory state parameter; Adjust each PID control parameter in the first group of PID control parameters according to the adjustment factor corresponding to each PID control parameter; After the step of outputting a first set of PID control parameters for oxygen flow control through the first BP neural network model, the following steps are further included: Calculate the rate of change of each PID control parameter in the first group of PID control parameters in each control cycle; Determine whether the change rate of each PID control parameter is less than the corresponding maximum allowable parameter change rate; If not, the latest target PID control parameter value is obtained by weighted averaging the target PID control parameter value of the previous control cycle and the target PID control parameter value of the current control cycle, where the target PID control parameter is a PID control parameter whose change rate is greater than the corresponding maximum allowable parameter change rate.

2. The oxygen concentration control method of a ventilator according to claim 1, characterized in that: The step of respectively calculating the target oxygen flow rate and the target air flow rate according to the set target oxygen concentration and the target total flow rate comprises: Acquire various first respiratory state parameters of the current user, where the first respiratory state parameters include blood oxygen saturation, carbon dioxide partial pressure, inhalation time, and breathing depth; Determine the required target total flow based on inspiratory time and breathing depth; The required target oxygen concentration is determined based on blood oxygen saturation and carbon dioxide partial pressure.

3. The oxygen concentration control method of a ventilator according to claim 1, characterized in that: The first set of PID control parameters includes a first proportional parameter, a first integral parameter and a first differential parameter; The step of dynamically calculating the adjustment factor corresponding to each PID control parameter in the first group of PID control parameters according to the change rate of the second respiratory state parameter comprises: dynamically calculating a proportional adjustment factor of the first proportional parameter according to the rate of change of the respiratory frequency; Dynamically calculate an integral adjustment factor of the first integral parameter according to the rate of change of the breathing depth; The differential adjustment factor of the first differential parameter is dynamically calculated according to the change rate of blood oxygen saturation and carbon dioxide partial pressure.

4. The oxygen concentration control method of a ventilator according to claim 1, characterized in that: The first set of PID control parameters includes a first proportional parameter, a first integral parameter and a first differential parameter; The step of calculating and generating the first control signal according to the oxygen flow error and the first set of PID control parameters comprises: Generate a proportional control output according to the oxygen flow error multiplied by the first proportional parameter; Generate an integral control output according to the accumulated value of the oxygen flow error multiplied by the first integral parameter; Generate a differential control output according to the rate of change of the oxygen flow error multiplied by the first differential parameter; The generated proportional control output, integral control output, and differential control output are added together to generate a final first control signal.

5. The oxygen concentration control method of a ventilator according to claim 1, characterized in that: The calculation formulas for respectively calculating the required target oxygen flow rate and target air flow rate according to the set target oxygen concentration and target total flow rate are as follows: in is the target oxygen flow rate, is the target air flow rate, is the target oxygen concentration, is the target total flow.

6. An oxygen concentration control system for a ventilator, characterized in that: Applicable to a ventilator including an oxygen gas circuit, an air gas circuit and a mixed gas circuit, the oxygen gas circuit at least includes an oxygen end proportional valve and an oxygen flow sensor, the air gas circuit at least includes an air end proportional valve and an air flow sensor, the mixed gas circuit includes a mixing chamber for mixing the outputs of the oxygen gas circuit and the air gas circuit and an oxygen concentration sensor, the system includes: A flow calculation module, used to calculate the target oxygen flow and the target air flow according to the set target oxygen concentration and the target total flow; A first data output module is used to input the calculated target oxygen flow rate, the actual oxygen flow rate collected by the current oxygen flow rate sensor, the oxygen flow rate error and the preset constant value into the first BP neural network model, and output a first group of PID control parameters for oxygen flow rate control through the first BP neural network model; A second data output module is used to input the calculated target air flow, the actual air flow collected by the current air flow sensor, the air flow error and the preset constant value into the second BP neural network model, and output a second set of PID control parameters for air flow control through the second BP neural network model; A control signal generating module, used for calculating and generating a first control signal according to an oxygen flow error and a first set of PID control parameters, and calculating and generating a second control signal according to an air flow error and a second set of PID control parameters; a regulating module, for regulating the openings of the oxygen-end proportional valve and the air-end proportional valve respectively according to the first control signal and the second control signal generated by calculation, and controlling the oxygen flow rate and the air flow rate to reach the target oxygen flow rate and the target air flow rate respectively, so that the oxygen concentration of the mixed gas in the mixed gas path reaches the set target oxygen concentration; The system further comprises: A second parameter acquisition module, used to acquire various second respiratory state parameters of the current user, wherein the second respiratory state parameters include blood oxygen saturation, carbon dioxide partial pressure, respiratory frequency and respiratory depth; an adjustment factor calculation module, used for dynamically calculating the adjustment factor corresponding to each PID control parameter in the first group of PID control parameters according to the change rate of the second respiratory state parameter; A first control parameter adjustment module, used for adjusting each PID control parameter in the first group of PID control parameters according to the adjustment factor corresponding to each PID control parameter; The system further comprises: A change rate calculation module, used for calculating the change rate of each PID control parameter in the first group of PID control parameters in each control cycle; A change rate judgment module is used to judge whether the change rate of each PID control parameter is less than the corresponding maximum allowable parameter change rate; The second control parameter adjustment module is used to obtain the latest target PID control parameter value by weighted averaging the target PID control parameter value of the previous control cycle and the target PID control parameter value of the current control cycle when the change rate determines that the change rate of each PID control parameter is not less than the corresponding maximum allowable parameter change rate. The target PID control parameter is a PID control parameter whose change rate is greater than the corresponding maximum allowable parameter change rate.

7. A storage medium storing a program, characterized in that: When the program is executed by a processor, the oxygen concentration control method of the ventilator according to any one of claims 1 to 5 is implemented.

8. A ventilator, characterized in that: The invention comprises a memory, a processor and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the oxygen concentration control method of the ventilator as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Pneumatic proportional valve control system and control method based on noninvasive ventilator

    CN116850414A

  • Diffusion oxygen supply PID control method and system based on cuckoo search-BP neural network

    CN116861804A