Exhalation carbon dioxide waveform phase iii selective recovery closed loop compensation device and system

By tracking expiratory flow rate and gas path volume in real time to identify the Phase III boundary of the expiratory carbon dioxide waveform, the problem of inaccurate gas recovery under hyperventilation is solved, resource optimization and limited use of exogenous carbon dioxide are achieved, and the accuracy and efficiency of respiratory reinfusion are improved.

CN123167359APending Publication Date: 2026-11-27THE FIRST AFFILIATED HOSPITAL OF GUANGZHOU MEDICAL UNIV (GUANGZHOU RESPIRATORY CENT) +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611404595.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-10
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Under conditions of high ventilation or increased minute ventilation, existing technologies struggle to accurately identify the start and end boundaries of phase III of the expiratory carbon dioxide waveform, leading to inaccurate gas recovery. Furthermore, during the initiation phase, the recovered gas cannot be used to establish an inhaled carbon dioxide level, resulting in resource waste and excessive reliance on exogenous carbon dioxide.

Method used

By tracking expiratory flow rate and gas path volume in real time, the boundary of phase III of the expiratory carbon dioxide waveform is identified, and gas mass propagation is mapped in the volume domain. Combined with delay compensation, the accuracy of the gas collection window is ensured. During the startup phase, recovered resources are used preferentially, and exogenous carbon dioxide is only supplemented when insufficient, thus achieving closed-loop control.

Benefits of technology

It reduces the risk of gas concentration mismatch, optimizes resource utilization, avoids the mixing of non-target gases and ventilation obstruction in fault conditions, and improves the accuracy and efficiency of respiratory reinfusion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123167359A_ABST
    Figure CN123167359A_ABST
Patent Text Reader

Abstract

The present application relates to the field of respiratory gas regulation, and discloses a device and system for selective recovery of phase III of exhaled carbon dioxide waveform. A controller identifies the start and end boundaries of phase III, and according to the real-time exhalation flow integral, the effective gas path volume between the effective measurement position and the effective shunt position, and the link delay, performs volume domain tracking on the boundary gas mass and forms an effective collection window. According to the exhalation flow and the carbon dioxide volume fraction corresponding to the actual collected gas mass, the actual collected carbon dioxide equivalent is calculated, and the available recovery resources are updated. The controller determines the non-negative back-dosing requirement according to the deviation between the target and the measured end-tidal carbon dioxide value, and performs breath-by-breath back-dosing under the safety constraints of available resources and inhaled carbon dioxide, oxygen concentration, and pressure. When an external carbon dioxide compensation interface is set, the external carbon dioxide is supplemented in a limited manner if the recovery resources are insufficient. The present application is used for closed-loop regulation of the carbon dioxide level of respiratory gas.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of respiratory gas regulation, end-expiratory carbon dioxide monitoring, respiratory circuit control, and medical gas mixing technology. Specifically, it relates to a closed-loop compensation device and system that selectively intercepts expiratory air masses based on the phase III alveolar platform of the exhaled carbon dioxide waveform, tracks the start and end boundaries of the phase III to the expiratory shunting position in the volume domain using real-time expiratory flow rate, uses the carbon dioxide equivalent of the actual intercepted gas as the resource constraint for subsequent per-breath reinfusion, and performs limited start-up compensation or differential supplementation of exogenous carbon dioxide when the recovered resources are insufficient. Background Technology

[0002] With increased ventilation or minute ventilation, alveolar ventilation may exceed the amount of carbon dioxide the body needs to expel, leading to a decrease in end-expiratory carbon dioxide levels. In existing breathing circuits, effective alveolar ventilation or the composition of inhaled gases can be altered by increasing mechanical dead space, rebreathing, sequential gas delivery, and mixing with exogenous carbon dioxide.

[0003] Exhaled air does not have the same composition throughout the entire exhalation process. The early exhalation phase mainly consists of anatomical dead space gas with a low carbon dioxide content; this is followed by a transitional phase where dead space gas mixes with alveolar gas; the later exhalation phase forms a relatively stable alveolar plateau, i.e., phase III of the carbon dioxide waveform. If the entire exhalation is indiscriminately stored and then reinfused, the non-target exhalation phase will dilute the carbon dioxide in the stored gas and reduce the predictability of the stored gas concentration, oxygen concentration, and reinfused dose.

[0004] Existing end-expiratory sample collection technologies can selectively collect end-expiratory gases based on gas concentration or respiratory phase, and can account for the time difference in gas propagation from the detection location to the collection location; existing expiratory gas re-inhalation technologies can preferentially re-inhale alveolar gases over dead space gases; and closed-loop gas delivery technologies can adjust the gas supply for the next respiratory cycle based on the deviation between the target end-expiratory gas value and the measured value. These technologies respectively solve the problems of sample collection, gas organization, or target gas control.

[0005] When the Phase III gas mass actively captured during each exhalation is used as the gas resource for subsequent closed-loop reinfusion, the following gas path control issues still need to be addressed: First, after the Phase III boundary is identified at the detection section, the target gas mass continues to move before reaching the effective shunting section of the shunting valve, and this movement varies with the real-time expiratory flow rate. A fixed time delay is difficult to stably correspond to the same gas mass boundary when the expiratory flow rate changes. Second, sensor measurement delay, bypass sampling transmission delay, algorithm processing delay, drive communication delay, and valve mechanical response can cause the valve command time to be inconsistent with the effective shunting time. Third, the actual amount of carbon dioxide available for reinfusion cannot be accurately represented by the valve opening time or the geometric volume of the gas storage bag alone. Fourth, after the gas storage bag is reinfused, emptied, leaked, or fails due to quality defects, the closed-loop controller needs to synchronously update the actual available carbon dioxide resources. Fifth, any sensor, valve, or controller failure should not result in the user's inhalation pathway being blocked. Unlike collection systems that only use end-expiratory gas as an analytical sample, this invention uses the captured gas as a consumable gas resource in subsequent inspiratory cycles. Therefore, collection boundary errors, changes in gas storage quality, and actual reinjection volume will directly affect subsequent closed-loop control and need to be calculated and constrained within the same control chain.

[0006] Furthermore, during system startup, the gas storage unit has not yet generated effective recovered gas, making it impossible to immediately rely on recovered gas to establish the required inhaled carbon dioxide level. During stable operation, the carbon dioxide concentration and usable volume of the recovered Phase III gas also vary depending on breathing status, collection window, leakage, and gas quality. Determining whether to use recovered gas solely based on whether the stored gas concentration reaches a target concentration would waste available carbon dioxide resources; conversely, continuous reliance on exogenous carbon dioxide would diminish the significance of exhalation recovery. Therefore, a gas source scheduling method is needed that allows the required inhaled carbon dioxide level to be established initially with limited exogenous carbon dioxide, prioritizes the use of recovered gas after effective recovered resources are generated during subsequent exhalation, and only supplements the difference when the carbon dioxide equivalent provided by the recovered gas is insufficient. Summary of the Invention

[0007] This invention aims to provide a carbon dioxide closed-loop compensation device and control system, enabling the start and end boundaries of the exhaled carbon dioxide waveform phase III to be tracked to the exhaled shunting position in the volume domain based on the actual gas path volume and real-time exhaled flow rate. This establishes a correspondence between the carbon dioxide detection signal and the target gas mass actually reaching the shunting position, allowing the phase III gas actually entering the gas storage unit to be calculated according to carbon dioxide equivalents, and establishing or updating the current available carbon dioxide resource status to constrain subsequent per-breath reinfusion. In the implementation of setting external carbon dioxide, the continuous dependence on external carbon dioxide is reduced through mixed gas source scheduling of "initiating external compensation—forming recovered resources—recovery priority—supplementing the shortfall," while simultaneously reducing the risks of non-target gas mixing, resource estimation distortion, reinfusion commands exceeding the actual gas storage capacity, and ventilation obstruction under fault conditions.

[0008] One aspect of the present invention provides a carbon dioxide closed-loop compensation device. The basic implementation of this device includes a patient interface, a bidirectional flow detection unit, a carbon dioxide detection unit, an expiratory shunt unit, a gas storage unit, a reinfusion metering unit, and a controller. Depending on the specific implementation, it may further include an emission path, a selective collection path, a fresh gas path, an inhalation control unit, a gas storage quality parameter acquisition unit, a safety bypass, an oxygen concentration detection unit, a pressure detection unit, a condensation and filtration module, an alarm and human-machine interface, an external carbon dioxide compensation interface, a wearable housing, and a battery unit. The gas storage quality parameter acquisition unit can be implemented by a gas sensor located in the gas storage unit or the reinfusion path, or it may include a functional module that calculates or estimates the carbon dioxide equivalent of the collected gas, the effective gas storage volume, and the calibrated loss amount by the controller.

[0009] After detecting exhalation, the controller identifies phase III of the carbon dioxide waveform based on the carbon dioxide concentration, combined with at least one of the carbon dioxide concentration change rate and platform stability, and determines the start and end boundaries of phase III respectively; the cumulative exhaled volume and exhaled flow rate can be further used as the basis for candidate region constraints, waveform quality judgment or valve executability judgment.

[0010] For each Phase III boundary, the controller integrates the absolute value of the real-time expiratory flow rate to obtain the cumulative throughput volume, starting from the reference time corresponding to the identification of that boundary at the effective measurement position of the carbon dioxide detection unit. This cumulative throughput volume is then combined with the effective gas path volume between the effective measurement position and the effective diversion position of the expiratory diversion unit, as well as the volume correction amount corresponding to the actual delays in the calibrated measurement, processing, and execution links, to determine the initial boundary trigger volume and the final boundary trigger volume, respectively. When the cumulative throughput volume reaches the corresponding boundary trigger volume, the controller issues a corresponding open or close command to the expiratory diversion unit, ensuring that the effective switching time of the expiratory diversion unit corresponds to the time when the corresponding target boundary gas mass reaches the effective diversion position. The actual delays may include carbon dioxide detection delay, bypass sampling transmission delay, algorithm processing delay, drive communication delay, and valve mechanical response delay, and can be measured separately and then synthesized or calibrated as a whole through a gas step test. The effective collection window is defined by the compensated initial and final boundaries, and the controller allows expiratory gas to enter the gas storage unit only within this effective collection window.

[0011] Within the effective collection window, the controller calculates the actual collected gas volume and the actual collected carbon dioxide equivalent based on the real-time expiratory flow rate and the carbon dioxide volume fraction corresponding to the actual collected gas mass. This correspondence is established based on the effective gas path volume between the effective measurement location and the effective diversion location, the real-time expiratory flow rate integral, and the actual measurement link delay. The actual collected carbon dioxide equivalent serves as a quantitative basis for characterizing the recovered resources during subsequent reinjection. In a further embodiment, the controller maintains a status quantity representing the available carbon dioxide equivalent for reinjection from the gas storage unit, and updates it breath-by-breath based on the newly collected carbon dioxide equivalent, the actually reinjected carbon dioxide equivalent, the emptied or deemed ineffective carbon dioxide equivalent, and the calibrated gas loss equivalent that needs to be included.

[0012] The controller determines the required carbon dioxide equivalent to be reinfused based on the deviation between the target end-tidal carbon dioxide value and the measured end-tidal carbon dioxide value, and applies a non-negative constraint to the required reinfusion carbon dioxide equivalent. This constraint uses the available recovery resources established or updated by the actual collected carbon dioxide equivalent to constrain the reinfusion in subsequent inspiratory cycles, thus forming a breath-by-breath closed loop. When the measured end-tidal carbon dioxide value reaches or exceeds a preset target condition, the controller reduces the required reinfusion carbon dioxide equivalent or stops increasing carbon dioxide reinfusion. In a further embodiment, the recovery resource constraint uses the available carbon dioxide equivalent state quantity. In embodiments where the carbon dioxide concentration of the storage gas is obtained, the controller can also combine the allowable reinfusion volume, allowable reinfusion time window, and constraints such as inhaled carbon dioxide, oxygen concentration, tubing pressure, storage gas mass, and the rate of change of adjacent respiratory cycles to determine the actual carbon dioxide equivalent that the recovered gas can provide and the reinfusion parameters for subsequent inspiratory cycles. After reinfusion, the controller updates the next reinfusion command using the measured end-tidal carbon dioxide value of the subsequent respiratory cycle.

[0013] In the implementation of the external carbon dioxide compensation interface, the controller has a compensation activation state, a recovery priority state, and a difference replenishment state. When the system is started and there is no recovered gas that meets the quality conditions or the current available carbon dioxide equivalent is lower than the activation conditions, the controller, under safety constraints, allows external carbon dioxide to provide part or all of the required carbon dioxide equivalent within at least one inhalation cycle to first establish the required inhaled carbon dioxide level; simultaneously, in the subsequent exhalation phase, phase III gas is selectively collected and the available carbon dioxide equivalent is updated according to phase III identification and volume domain propagation mapping rules. After an effective recovery resource is formed, the controller switches to the recovery priority state; the external carbon dioxide compensation interface provides carbon dioxide not exceeding the difference only when the actual carbon dioxide equivalent that the recovered gas can provide in the current inhalation cycle is lower than the required carbon dioxide equivalent; when the recovered gas is sufficient to meet the demand, the external carbon dioxide compensation is turned off.

[0014] The safety bypass is preferably a normally open structure when power is lost. In the event of power failure, controller reset, critical sensor failure, valve malfunction, inhaled carbon dioxide exceeding the safety upper limit, oxygen concentration below the safety lower limit, abnormal pipeline pressure, gas storage timeout, or abnormal condensation, the controller stops the gas storage return and external carbon dioxide compensation, isolates the gas storage unit and the external carbon dioxide path, and keeps the patient interface connected to the fresh gas path or ambient air.

[0015] Another aspect of the present invention provides a respiratory gas circulation system, the system comprising the above-described carbon dioxide closed-loop compensation device and at least one of a ventilator, an oxygen source, an air source, a face mask, a nasal mask, a mouthpiece, or an artificial airway connected thereto.

[0016] Another aspect of the present invention provides a controller for a respiratory gas circulation device, the controller comprising a processor, a memory, a signal interface for receiving flow and carbon dioxide signals, and a control interface for outputting expiratory shunting commands and reinfusion metering commands; when the processor executes the program in the memory, it at least performs the following: phase III boundary determination, volumetric gas mass propagation tracking based on real-time flow integral and effective gas path volume, association with carbon dioxide concentration information corresponding to the actual collected gas mass, effective collection window formation, calculation of the actual collected carbon dioxide equivalent, updating of available recovery resource status, and breath-by-breath reinfusion control based on the resource status. Gas storage quality constraints, external carbon dioxide scheduling, and safety interlocks can be provided as further control functions.

[0017] The present invention also provides a non-transient computer-readable storage medium and a computer program product, wherein a program or instructions stored thereon or therein, when executed by a processor, causes the processor to perform the above-described pneumatic control operation of the controller. Beneficial effects

[0018] By mapping the volumetric gas mass propagation related to real-time expiratory flow rate at the start and end boundaries of Phase III, and incorporating the delays of the measurement, processing, and execution links into the triggering conditions, the collection window moves with the actual expiratory flow rate, reducing the false collection of Phase II or non-target gases caused by a fixed time delay at different flow rates.

[0019] By integrating only the flow rate within the effective collection window and the carbon dioxide volume fraction corresponding to the actual collected gas mass, the actual intercepted Phase III gas mass is converted into a calculable carbon dioxide resource, rather than being estimated solely based on the geometric volume of the gas storage container or the valve opening time. This reduces the risk of gas mass concentration mismatch caused by differences between the detection location and the diversion location.

[0020] By maintaining the available carbon dioxide equivalent state quantity for each breath, the return control is simultaneously constrained by the target deviation and actual resources, thus preventing the controller from requesting a return quantity that exceeds the actual available quantity of the gas storage unit.

[0021] The actual amount of carbon dioxide equivalent that the recovered gas can provide is determined by combining the carbon dioxide concentration of the stored gas, the available equivalent, the allowable return volume, and the allowable return time window. Even if the concentration of the recovered gas is lower than the target inhalation mixture concentration, the portion that it can provide can still be used first, and only the insufficient portion can be supplemented.

[0022] By establishing the required intake carbon dioxide level through limited external carbon dioxide during the startup phase, and then switching to recovery priority after the recovery resources are formed, and supplementing the difference with external carbon dioxide when the recovery is insufficient, the external carbon dioxide is transformed from a continuous main gas source to a supplementary gas source during startup and when resources are insufficient.

[0023] By simultaneously deducting the available equivalent from unqualified, overdue, leaked, or emptied gas storage, the risk of inconsistency between the physical gas storage state and the internal resource state of the controller is reduced.

[0024] By employing multiple constraints such as intake carbon dioxide, oxygen concentration, pressure, and return rate of change, as well as a power failure normally open safety bypass, critical faults are prioritized to enter a safe state of stopping return flow, external compensation, and restoring fresh gas supply.

[0025] With optional flexible gas storage and wearable housing implementations, the near-patient detection and shunting components can be distributed with the gas storage, control, and power supply components, providing a structural basis for portable or wearable implementations. Attached Figure Description

[0026] Figure 1 This is a schematic diagram of the overall structure of the carbon dioxide closed-loop compensation device of the present invention.

[0027] Figure 2 This diagram illustrates the phase separation of carbon dioxide waveforms, Phase III identification, and compensation for gas mass volume domain propagation delay.

[0028] Figure 3 This diagram illustrates three main gas pathway states: exhalation phase I / II emission, selective collection during exhalation phase III, and resource-constrained quantitative reinjection during inhalation.

[0029] Figure 4 This is a schematic diagram of the closed-loop control process for each breath.

[0030] Figure 5 This is a schematic diagram of an optional segmented gas storage module.

[0031] Figure 6 A schematic diagram of the mixed gas source scheduling for initiating compensation, priority recovery, and differential replenishment.

[0032] Figure 7 This is a schematic diagram of a wearable embodiment of the present invention.

[0033] Figure reference numerals: 1—Patient interface; 2—Bidirectional flow detection unit; 3—Carbon dioxide detection unit; 4—Expiratory shunt unit; 5—Emission pathway; 6—Selective collection pathway; 7—Gas storage unit; 8—Gas storage quality parameter acquisition unit (can be implemented by the gas storage quality detection unit); 9—Reinfusion metering unit; 10—Fresh gas pathway; 11—Inspiratory control unit; 12—Controller; 13—Safety bypass; 14—Condensation and filtration module; 15—Pressure detection unit; 16—Oxygen concentration detection unit; 17—External carbon dioxide compensation interface; 18—Alarm and human-machine interface; 19—Segmented gas storage chamber; 20—Escape valve; 21—One-way valve; 22—Wearable shell; 23—Battery unit. Detailed Implementation

[0034] The present invention will be further described below with reference to the accompanying drawings and embodiments. These embodiments are used to illustrate the technical concept of the invention and are not intended to limit the scope of protection. Unless otherwise stated, all gas volumes and carbon dioxide equivalents are converted under the same pressure and temperature reference, or under the same gas path measurement conditions, using a consistent volume reference.

[0035] In this manual, "effective measurement location" refers to the spatial reference cross-section of the main gas path corresponding to the carbon dioxide signal; for mainstream detectors, it can be its effective optical measurement cross-section, and for bypass detectors, it can be the main gas path cross-section where the sampling port is located. "Effective shunting location" refers to the spatial location where changes in the flow path state of the expiratory shunting unit substantially determine whether the gas path enters the emission path or the selective collection path. "Effective switching" refers to the actual state where the valve has reached a point sufficient to change the flow direction of the target gas path, not just the moment the controller sends an electrical signal. "Effective collection window" refers to the window through which the target phase III gas path is actually guided to the gas storage unit after boundary propagation and response compensation. "Volume domain propagation mapping" refers to the cumulative through volume obtained by integrating the real-time expiratory flow rate from the boundary reference time, characterizing the propagation of the target gas path between the detection location and the shunting location; this mapping does not assume a constant expiratory flow rate, nor is it a simple conversion of a certain instantaneous flow rate into a fixed propagation time. "Air mass correspondence" refers to establishing a correlation between the carbon dioxide concentration information obtained by the carbon dioxide detection unit and the corresponding main air mass that subsequently arrives at the effective shunting position, based on the effective airway volume between the effective measurement position and the effective shunting position, the real-time expiratory flow integral, and the calibrated measurement link delay; the air mass correspondence can be established using the same volume domain mapping principle as phase III boundary propagation tracing. Example 1: Overall Device Structure and Patient Interface

[0036] like Figure 1 As shown, patient interface 1 is connected to bidirectional flow detection unit 2, carbon dioxide detection unit 3, and expiratory shunt unit 4 via a low dead space connector. Patient interface 1 is used to establish bidirectional gas communication with the user's natural or artificial airway and can be a face mask, nasal mask, nasal pillow interface, mouthpiece, endotracheal tube connector, tracheostomy connector, ventilator patient end connector, or a combination thereof. Patient interface 1 preferably adopts a low dead space structure and can be equipped with a standard breathing circuit connection terminal, a seal, and an anti-dislodgement connection structure.

[0037] The expiratory shunt unit 4 has at least a patient port, an exhaust port, and a collection port. The exhaust port is connected to the exhaust passage 5, and the collection port is connected to the gas storage unit 7 via the selective collection passage 6 and the condensation and filtration module 14. The gas storage unit 7 is connected to the patient interface 1 via the reinfusion metering unit 9 and the inspiratory control unit 11; the inspiratory control unit 11 is also connected to the fresh gas passage 10. The gas storage quality parameter acquisition unit 8 can use a gas sensor installed on the gas storage unit 7 or the reinfusion passage, or the controller 12 can calculate or estimate the gas storage volume, carbon dioxide equivalent, and loss based on the calculable gas storage volume, oxygen concentration, pressure, temperature, humidity, or a combination thereof.

[0038] The carbon dioxide detection unit 3 can employ a mainstream infrared detector or a bypass detector, and can obtain carbon dioxide signals during the expiratory and inspiratory phases in a bidirectional airway. In embodiments requiring independent monitoring of inhaled carbon dioxide, an independent inhaled carbon dioxide detection sensor can also be installed. The bidirectional flow detection unit 2 is used to identify the direction of inhalation and exhalation and measure real-time flow. It can be implemented using a differential pressure, hot-film, hot-wire, or ultrasonic flow sensor, or equivalent, capable of outputting directional flow signals. The pressure detection unit 15 can be used to identify inhalation, exhalation, blockage, and leakage. The oxygen concentration detection unit 16 can be located near the patient's airway, gas storage unit, or inhalation pathway. The reinfusion metering unit 9 can employ a proportional valve, pulse valve, constant volume chamber, diaphragm pump, piston pump, or a combination thereof.

[0039] During exhalation phases I and II, the emission port remains open or in an emission-priority state, while the collection port is closed. When the compensated phase III initiation boundary reaches the effective diversion position of the exhalation diversion unit 4, the collection port enters an effective open state; when the compensated phase III end boundary reaches the effective diversion position, the collection port enters an effective closed state. Therefore, the gas actually entering the gas storage unit 7 mainly corresponds to the identified phase III gas mass. Example 2: Identification of Phase III Start and End Boundaries

[0040] The controller 12 establishes a state machine for each respiratory cycle. It enters the expiratory state after detecting a change in flow from inspiratory to expiratory direction. The controller records the early expiratory carbon dioxide baseline C0 and preferentially obtains a reference plateau value Cp for real-time judgment of the current cycle based on plateau values ​​from one or more previous high-quality respiratory cycles. After the peak or stable plateau value for the current cycle has been obtained, it can be used to update Cp, and the updated Cp is used for subsequent judgments, quality assessments, or as a reference for the next respiratory cycle.

[0041] The controller determines the Phase III candidate region based at least on carbon dioxide concentration and in conjunction with at least one of the following conditions: the absolute value of the first-order rate of change of carbon dioxide concentration is lower than a preset slope condition; the concentration dispersion within a continuous window is lower than a stability condition. The controller can further constrain the candidate region using conditions such as the cumulative exhaled volume exceeding a preset or individualized dead space volume condition, and the expiratory flow rate being within the allowable valve actuation range. The Phase III initial boundary is determined when the candidate region is entered and the stability condition is continuously met; the Phase III ending boundary is determined when the platform stability condition fails, an inspiratory transition is detected, the flow rate falls below the actuable range, or the carbon dioxide concentration enters a decreasing phase.

[0042] To reduce false collections caused by coughing, sighing, air leakage, airway obstruction, waveform truncation, or sensor artifacts, the controller can calculate a waveform quality score. The quality score can be based on at least two of the following: plateau duration, plateau slope, concentration dispersion within the window, flow integral closure error, respiratory cycle consistency, and sensor integrity. When the waveform quality score is below a preset quality condition, the controller either does not establish a valid collection window or marks the collected gas for that respiratory cycle as unavailable and controls purging. Example 3: Volume Domain Propagation Mapping and Execution Delay Compensation at Air Puff Boundaries

[0043] Let Vd be the effective volume of the main airway between the effective measurement position of carbon dioxide detection unit 3 and the effective shunting position of expiratory shunting unit 4. For the phase III start or end boundary identified at reference time tb, the controller integrates the absolute value of the expiratory flow rate after the boundary to obtain the cumulative flow volume from the boundary reference time: Considering the carbon dioxide detection delay, the bypass sampling transmission delay (when bypass sampling is present), the algorithm processing time, the drive communication time, and the mechanical response time required for the valve to transition from the command state to the effective diversion state, the controller determines calibrated trigger volumes Vtrig,start and Vtrig,end for the start and end boundaries, respectively. The controller issues an open or close valve command when Vmove(t) reaches the corresponding trigger volume, ensuring that the moment the valve completes the effective switching is as close as possible to the moment the target boundary air mass reaches the effective diversion position. Since Vmove(t) is obtained by hourly integration of the actual expiratory flow rate after the boundary, when the expiratory flow rate changes during propagation, the mapping is still updated based on the actual through volume, rather than assuming a fixed flow rate or fixed propagation time.

[0044] In typical cases, if the actuator exhibits positive hysteresis, the valve command must be issued before the target boundary reaches the diversion position; therefore, the trigger volume can be less than Vd. If the effective reference position of the detection link, the bypass sampling delay, or the drive structure causes the compensation direction to differ, a signed correction amount can be obtained through calibration. The valve opening dynamics corresponding to the starting boundary and the valve closing dynamics corresponding to the ending boundary may be asymmetrical; therefore, Vtrig,start and Vtrig,end are preferably calibrated separately, and differences between them are permissible. The actual delays of the measurement link, processing link, and execution link can be measured separately and then synthesized, or the overall effective correction amount can be directly obtained through a gas step test.

[0045] Vd can be determined through gas path geometric volume measurement, known volume replacement, or tracer gas step test. Vtrig,start and Vtrig,end can be calibrated under multiple representative flow conditions using a reference carbon dioxide step signal and a high-speed gas analyzer. When the volume correction corresponding to the trigger volume or delay varies with the flow range, calibration tables, segmented parameters, or interpolation relationships can be established for the controller to use. If the real-time flow signal fails briefly, the system can use the most recent effective flow for conservative estimation; when the estimation error exceeds the preset tolerance, the controller abandons the collection and maintains the emission path. Example 4: Effective collection window, carbon dioxide equivalent, and resource status.

[0046] After propagation mapping of the starting and ending boundaries and execution of response compensation, the controller obtains the time interval [t1, t2] during which the exhalation shunting unit 4 is actually in an effective collection state. Based on the gas mass correspondence, the controller correlates the carbon dioxide detection signal with the gas mass that actually passes through the effective shunting location and enters the gas storage unit 7, and calculates the actual amount of gas entering the gas storage unit 7 using only the data of the corresponding gas mass within the effective collection window. V c a p , n = ∫ t 1 t 2 Q e x p t d t Where Qexp(t) is the expiratory flow rate, FCO2,cap(t) is the carbon dioxide volume fraction corresponding to the air mass that actually passes through the effective shunting position at time t, obtained according to the air mass correspondence; Vcap,n is the actual gas volume collected in the nth respiratory cycle, and Mcap,n is the actual collected carbon dioxide equivalent expressed on a consistent volume basis. If the system uses a mass basis, the equivalent can be converted into carbon dioxide mass through gas state parameters.

[0047] The controller maintains the available carbon dioxide equivalent state quantity, Mavail. For the nth respiratory cycle, it can be updated using the following formula: Where Mreturn,n represents the carbon dioxide equivalent that has actually been returned by the gas storage unit, Mdiscard,n represents the carbon dioxide equivalent that has lost its usability due to gas storage timeout, oxygen concentration not meeting the conditions, mixing with non-phase III gas, abnormal pressure, abnormal condensation, or active venting, and Mloss,n represents the leakage, sampling, or other measurable losses that need to be considered after calibration; in structures where losses are negligible, Mloss,n can be set to zero.

[0048] The carbon dioxide concentration Cstore of the stored gas can be directly detected by a gas sensor installed in the storage unit 7 or the return path. In embodiments where the gas is sufficiently mixed within the storage unit, the effective storage volume is available, and each inflow, outflow, and loss is calculable, the controller can also calculate or estimate Cstore based on each Mcap, corresponding Vcap, effective storage volume, and the amount returned and emptied, and can correct the estimated result using sensor detection values. This calculation or estimation method serves as an alternative implementation for obtaining gas storage quality parameters, and its specific parameters are determined by the adopted gas storage structure, sensors, and gas path calibration results.

[0049] When the gas storage unit 7 uses segmented gas storage chambers 19, the controller can maintain the formation time, volume, carbon dioxide equivalent, carbon dioxide concentration, oxygen concentration, pressure, and validity status of each effective gas segment separately, and use the sum of the carbon dioxide equivalent of all effective gas segments as Mavail. When a gas segment is returned or emptied, the corresponding amount is deducted from Mavail. Example 5: Closed-loop reinfusion with confined respiratory resources

[0050] The controller receives the target end-tidal carbon dioxide value Ptarget and the measured end-tidal carbon dioxide value Pet,n ​​from the previous effective respiratory cycle, and forms the control bias: The controller may employ proportional control, proportional-integral control, model predictive control, lookup table control, or a combination thereof, based on... The controller calculates the initial carbon dioxide compensation requirement for the next inspiratory cycle based on the previous control state, applies non-negative constraints and current safety constraints to the obtained compensation requirement, and obtains the required reinjected carbon dioxide equivalent Mreq,n+1, such that Mreq,n+1≥0. When the measured end-expiratory carbon dioxide value is lower than the target value, the controller can increase carbon dioxide compensation according to the deviation; when the measured end-expiratory carbon dioxide value is close to the target value, the controller reduces compensation; when the measured end-expiratory carbon dioxide value reaches or exceeds the preset target condition, the controller reduces the required reinjected carbon dioxide equivalent to zero or stops increasing carbon dioxide reinjection. The controller can also set the maximum allowable change in Mreq or the corresponding reinjection parameter between adjacent respiratory cycles to reduce breath-by-breath control oscillations.

[0051] The gas storage quality parameter acquisition unit provides or estimates the carbon dioxide volume fraction Cstore of the gas to be reintroduced. The controller determines the actual carbon dioxide equivalent Mrec,max that the reintroduced gas can provide during the intake cycle based on Cstore, Mavail, the maximum volume of recovered gas allowed to be introduced during the intake cycle (Vrec,max), the allowed reintroduction window, and current safety constraints. For example, ignoring other limitations, Mrec,max may not exceed the smaller of Mavail and Cstore·Vrec,max. Therefore, even if Cstore is lower than the expected mixed gas concentration, the portion that the recovered gas can provide can still be utilized without discarding it entirely.

[0052] The actual commanded carbon dioxide equivalent, Mrec,cmd, provided by the recovered gas can be expressed as: Where Msafe,rec represents the upper limit of carbon dioxide equivalent allowed to be provided by the recovered gas under safety constraints such as inhaled carbon dioxide, oxygen concentration, pipeline pressure, single reinfusion limit, and rate of change between adjacent respiratory cycles. This expression is used to illustrate the relationship between resource and delivery capacity constraints and does not limit the specific control algorithm.

[0053] The actual amount of carbon dioxide equivalent returned can be determined by integrating the actual return flow rate of the return metering unit with the volume fraction of carbon dioxide in the gas to be returned, or by combining the calibrated constant volume chamber, piston displacement, or valve flow model with the concentration of the stored gas. The controller preferably updates Mreturn with the actual amount returned rather than solely with the commanded amount.

[0054] After inhalation begins, the inhalation control unit 11 preferentially connects to the fresh gas passage 10. Once the preset fresh gas volume, preset inhalation time ratio, or preset oxygen supply conditions are reached, the controller determines the flow rate, valve opening, pulse width, number of constant volume chamber cycles, or other corresponding return parameters of the return metering unit 9 according to Mrec,cmd, and sends a corresponding amount of recovered phase III gas (equivalent to carbon dioxide) into the inhalation passage. Return can be located in the middle or later stages of inhalation; in another embodiment, a portion of the recovered gas can be mixed with the fresh gas while meeting the constraints on inhaled carbon dioxide and oxygen concentrations. Example 6: Dispatching of a mixed gas source with initiation compensation, priority recovery, and differential supplementation

[0055] like Figure 6 As shown, in the embodiment where the external carbon dioxide compensation interface 17 is provided, the controller can switch between a compensation activation state, a recovery priority state, and a differential replenishment state according to the recovery resource status. The external carbon dioxide compensation interface 17 can cooperate with at least one of controlled pressure reduction, pressure stabilization, metering, check valve, and shut-off components to allow external carbon dioxide to enter the intake control unit 11 or its upstream mixing position at a limited flow rate or limited equivalent.

[0056] In the initial compensation state, if the system has not yet formed a gas reservoir meeting the quality requirements, or if Mavail is below the preset initial resource conditions, the controller, while meeting the safety constraints of inhaled carbon dioxide, oxygen concentration, and pressure, provides some or all of the required carbon dioxide equivalent from the external source during one or more initial inhalation cycles, based on the target inhaled carbon dioxide parameter, the target end-expiratory carbon dioxide parameter, or Mreq obtained by the closed-loop algorithm. For implementations based on the target inhaled carbon dioxide parameter, the controller can adjust the external carbon dioxide metering using near-patient inhaled gas detection results to bring the inhaled mixed gas carbon dioxide to the preset target range. Simultaneously, on the expiratory side, phase III gas generated during subsequent exhalations continues to be selectively collected according to the phase III identification and effective collection window formation rules, and Mavail is updated.

[0057] Once Mavail reaches the preset availability condition, the controller enters the recovery priority state. The controller first calculates the actual carbon dioxide equivalent Mrec,cmd that can be provided by the recovered gas in this cycle; only when Mrec,cmd is less than Mrec does a shortfall difference Mdef occur. The instruction equivalent of exogenous carbon dioxide, Mext,cmd, can be expressed as: Where Msafe,ext represents the upper limit of external carbon dioxide equivalent allowed by current inhaled carbon dioxide, oxygen concentration, pressure, external gas supply capacity, single change rate, and other safety constraints. When Mdef is zero or the recovered gas is sufficient to meet Mreq, the controller shuts off external carbon dioxide compensation. If external carbon dioxide is unavailable or the safety limit is reached while the recovered resources are still insufficient, the controller does not forcibly track the target by exceeding resource or safety limits, but instead reduces or stops carbon dioxide compensation and enters a preset safety state.

[0058] Exogenous carbon dioxide can be mixed with recovered phase III gas within the inhalation control unit 11, or it can be added at a controlled mixing location after the reinfusion metering unit 9 and before the patient interface 1. The controller can monitor the inhaled gas near the patient using signals obtained from the carbon dioxide detection unit 3 during the inhalation phase or from a separately configured inhaled carbon dioxide detection sensor, and use the measured inhaled carbon dioxide concentration, oxygen concentration, and pressure as safety feedback for both exogenous compensation and recovered reinfusion. Example 7: Segmented Gas Storage and Gas Quality Management

[0059] like Figure 5 As shown, the gas storage unit 7 may include multiple independently isolated segmented gas storage chambers 19. Each gas storage chamber can be separated from adjacent gas chambers by a one-way valve 21 or a controllable isolation valve. The controller records the formation time, Vcap, Mcap, and at least one gas mass parameter for each gas segment.

[0060] When a gas segment exceeds its maximum allowable storage time, its oxygen concentration falls below the required level, its pressure is abnormal, its waveform quality score fails, its condensation state is abnormal, or it is determined to be mixed with non-target gases, that gas segment is marked as unusable and discharged through vent valve 20; the corresponding Mdiscard is simultaneously used to update Mavail. This mechanism keeps the physical gas storage state consistent with the internal resource state of the controller. Example 8: Measurement Delay Compensation for Bypass Carbon Dioxide Detection

[0061] When the carbon dioxide detection unit 3 is a bypass detector, the main gas path cross-section where its sampling port is located serves as the measurement reference position for gas mass propagation mapping. The controller calibrates the time offset of the carbon dioxide waveform relative to the main gas path gas mass based on the sampling tube volume, sampling flow rate, detector response time, and algorithm filtering delay, and incorporates this offset into the determination of Vtrig,start and Vtrig,end. This avoids redundant calculations of the propagation delay in the bypass sampling tube and the propagation delay of the main gas path gas mass from the sampling port to the diversion valve. For the carbon dioxide concentration data used in Mcap calculation, the controller also establishes a gas mass correspondence between the concentration data and the corresponding gas mass at the effective diversion position based on the calibrated time offset and the cumulative through volume of the main gas path. Example 9: Safety Interlocks and Fault Status

[0062] Safety bypass 13 preferably employs a spring-return normally open valve, a mechanical check valve, or an equivalent structure that automatically connects to fresh gas in the event of power failure. The controller monitors at least one or more of the following: carbon dioxide sensor disconnection or drift, flow sensor malfunction, continuous increase in inhaled carbon dioxide, decrease in oxygen concentration, abnormal gas storage pressure, valve action timeout, breathing circuit blockage, severe gas leakage, gas storage timeout, and condensation abnormalities.

[0063] In the event of a critical failure, the controller executes a fail-safe sequence: stops new Phase III collection; stops gas return from the storage tank; shuts off external carbon dioxide compensation; isolates the storage tank unit and the external carbon dioxide pathway; opens or maintains the safety bypass; connects the patient interface to fresh gas or ambient air; and issues an audible, visual, or interface alarm. The basic connectivity function of the safety bypass is preferably designed to operate continuously without relying on external networks or software. Example 10: Wearable Implementation

[0064] like Figure 7 As shown, in the wearable implementation, at least a portion of the patient interface 1, the bidirectional flow detection unit 2, the carbon dioxide detection unit 3, and the expiratory shunt unit 4 can constitute a patient-proximity module to reduce additional dead space and unnecessary tubing volume between the patient interface and the detection and shunt locations. At least a portion of the gas storage unit 7, the reinfusion metering unit 9, the controller 12, the condensation and filtration module 14, and the battery unit 23 can be housed within the wearable housing 22.

[0065] The wearable housing 22 can be a waist pack, backpack, vest, shoulder strap, chest strap, or distributed fixation structure. The gas storage unit 7 preferably adopts a flexible gas storage bag or a variable volume gas storage chamber; the patient proximity module and the wearable housing 22 can be connected via flexible air passages and electrical connections. The battery unit 23 powers the controller, sensors, and actuators, and can adopt a replaceable or rechargeable structure.

[0066] In the wearable implementation, the safety bypass 13 is preferably configured to establish a low-resistance fresh gas or ambient air passage near the patient or without relying on continuous operation of the remote pump valve; the condensation and filtration module 14 may be equipped with anti-backflow, hydrophobic isolation, liquid trapping, or posture-insensitive drainage structures. The external carbon dioxide compensation interface 17 can be connected to a replaceable gas source or an external gas source, but its activation still follows the control relationship of start-up compensation, recovery priority, and differential replenishment. Example 11: Calibration and Bench Verification

[0067] Before the device is put into actual use, gas path calibration and bench verification can be performed using a programmable artificial lung, a standard carbon dioxide gas source, a reference gas analyzer, and a flow, pressure, or valve position detection device capable of recording the actual switching state of the valve. First, the effective gas path volume Vd between the effective measurement position of the carbon dioxide detector and the effective shunting position of the expiratory shunting unit 4 is measured, and Vtrig,start and Vtrig,end are determined under multiple representative expiratory flow conditions. For the bypass carbon dioxide detector, the main gas path cross-section where the sampling port is located is taken as the effective measurement position, and the sampling transmission and detection link delay are independently calibrated according to Example 8. Subsequently, using a carbon dioxide step or simulated phase III waveform with known start and end boundaries, the deviation between the target boundary reaching the effective shunting position and the valve completing the effective switching is compared to verify the effectiveness of the volume domain propagation mapping and the compensation of the start and end boundaries.

[0068] To evaluate the technical effectiveness of this invention compared to control methods such as fixed time delay, fixed valve opening window, or full-segment expiratory recovery, comparative tests can be conducted under the same artificial lung waveform, tubing, sensors, and valve conditions. Test conditions can cover different tidal volumes, respiratory rates, peak expiratory flow rates, phase III plateau slopes, and leakage levels. Recordable and comparable indicators include phase III start boundary error, end boundary error, proportion of non-target expiratory gas mixed in, effective phase III gas recovery proportion, deviation between Mcap and reference gas analysis results, target end-expiratory carbon dioxide tracking error, number of respiratory cycles required to reach a stable target range, fluctuation in reinjection volume or end-expiratory carbon dioxide between adjacent cycles, and exogenous carbon dioxide consumption per unit time or per respiratory cycle. These indicators are used to evaluate control accuracy, resource utilization, and closed-loop stability, and to determine applicable calibration parameters and safety boundaries.

[0069] The consistency between Vcap, Cstore, and Mcap can be verified using a standard gas analyzer. The status update of Mavail can be verified by using preset collection, reinjection, and venting sequences. Different combinations of Cstore and Vrec,max can be set to verify the consistency between the recovery available amount and the difference supplement calculation. For prototypes with external carbon dioxide compensation interface 17, it can be further verified that during the startup phase, external compensation establishes the required inhaled carbon dioxide level within safety constraints; after effective recovery resources are formed, external compensation is reduced or shut off; when recovery resources are insufficient, only the difference is supplemented in a limited manner; and the system enters a preset safety state when the external gas source is disconnected, the valve is stuck, the sensor is disconnected, or the inhaled gas exceeds the limit. Example 12: Detection, Calculation, and Fusion Acquisition of Gas Storage Quality Parameters

[0070] In one embodiment, the gas storage quality parameter acquisition unit uses a carbon dioxide sensor installed in the gas storage unit 7 or the return path as the main data source to directly obtain Cstore.

[0071] In another embodiment, when the effective gas volume of the gas storage unit can be determined by the pressure-volume relationship, the calibration curve of the flexible gas storage bladder, the state of the segmented gas storage chambers, or other known methods, the controller can calculate or estimate the average carbon dioxide volume fraction of the currently effective stored gas based on the actual collected Mcap and Vcap, the actual returned volume, the venting volume, and the calibrated loss. For segmented gas storage structures, the mass parameters of each gas segment can be calculated separately.

[0072] In another embodiment, the controller fuses the calculated or estimated results with the sensor detection values, and marks the corresponding gas storage section as pending verification or unavailable when the deviation between the two exceeds a preset tolerance. Thus, the acquisition of gas storage quality parameters is not limited to a single sensor hardware implementation, while maintaining consistency between resource state quantities and physical gas storage states.

[0073] The sensor types, valve structures, gas storage methods, control algorithms, patient interface methods, external carbon dioxide gas source methods, wearable structures, and threshold determination methods in the above embodiments can be equivalently replaced without departing from the core technical concept of this invention. The core technical relationship of this invention lies in: determining the start and end boundaries of Phase III based on the exhaled carbon dioxide waveform; using the actual gas path volume and real-time expiratory flow integral to perform volume domain propagation tracking of the corresponding boundary gas mass, so that the target Phase III gas mass is selectively intercepted at the diversion position; calculating the carbon dioxide equivalent of the actually intercepted gas mass and establishing or updating the available resource status; and then using this resource status to constrain subsequent breath-by-breath closed-loop reinfusion. In embodiments where external carbon dioxide is provided, mixed gas source scheduling is further performed through limited compensation during the start-up phase, priority recovery after the formation of recovered resources, and differential supplementation when recovery is insufficient.

Claims

1. A closed-loop carbon dioxide compensation device based on the selective recovery of phase III of the exhaled carbon dioxide waveform, characterized in that, The system includes a patient interface, a bidirectional flow detection unit, a carbon dioxide detection unit, an expiratory shunt unit, a gas storage unit, a reinfusion metering unit, and a controller. The gas storage unit is connected to the reinfusion metering unit. The reinfusion metering unit is used to quantitatively reinfuse gas from the gas storage unit to the patient interface during subsequent inspiratory cycles. The expiratory shunt unit is used to selectively allow expiratory gas to enter the exhaust pathway or the gas storage unit. The controller is configured to: determine the start and end boundaries of phase III based on the expiratory carbon dioxide waveform; after the corresponding boundary is identified at the effective measurement position of the carbon dioxide detection unit, integrate the real-time expiratory flow rate, and perform volume domain propagation tracking of the corresponding boundary gas mass based on the obtained cumulative through volume and the effective gas path volume between the effective measurement position and the effective shunt position of the expiratory shunt unit, so as to control the expiratory shunt unit to form an effective collection window corresponding to the phase III gas mass; and determine the actual collected carbon dioxide equivalent based on the expiratory flow rate and carbon dioxide volume fraction corresponding to the gas mass that actually enters the gas storage unit within the effective collection window. Based on the actual collected carbon dioxide equivalent, and in conjunction with actual reinfusion, evacuation, or failure, as well as gas losses that need to be calibrated and included, establish or update available recovery resources representing the current amount of carbon dioxide that can be reinfused; and determine the required reinfused carbon dioxide equivalent based on the deviation between the target end-tidal carbon dioxide value and the measured end-tidal carbon dioxide value, and control the carbon dioxide reinfusion of subsequent inspiratory cycles with the available recovery resources as constraints.

2. The apparatus according to claim 1, characterized in that, The controller determines the starting boundary trigger volume Vtrig,start and the ending boundary trigger volume Vtrig,end based on the effective gas path volume and the volume correction amount corresponding to the actual delays in the calibrated measurement link, processing link, and execution link. Vtrig,start and Vtrig,end are calibrated and allowed to take different values. The volume correction amount is synthesized after measuring the actual items in the carbon dioxide detection delay, bypass sampling transmission delay, algorithm processing delay, drive and communication delay, and valve mechanical response delay, or is calibrated as a whole through a gas step test. For different expiratory flow ranges, the controller determines Vtrig,start and Vtrig,end based on the corresponding calibration parameters, calibration table, or interpolation results, and issues a corresponding switching command when the cumulative through volume reaches the corresponding boundary trigger volume, so that the time when the expiratory diversion unit completes the effective switching corresponds to the time when the corresponding target boundary air mass reaches the effective diversion position.

3. The apparatus according to claim 1, characterized in that, The controller also constrains the candidate region of Phase III by combining at least one of the cumulative exhaled volume and expiratory flow rate; when the carbon dioxide concentration reaches a preset condition relative to the early expiratory baseline and the reference plateau value, and the rate of change of carbon dioxide concentration or the plateau stability within a continuous window meets a preset condition, the Phase III start boundary is determined, and when the plateau stability fails, an inspiratory transition is detected, the expiratory flow rate is lower than the executable range, or the carbon dioxide concentration enters the declining phase, the Phase III end boundary is determined.

4. The apparatus according to claim 1, characterized in that, The controller generates a waveform quality score based on at least two of the following: platform duration, platform slope, carbon dioxide concentration dispersion within a continuous window, flow integral closure error, respiratory cycle consistency, and sensor signal integrity. When the waveform quality score is lower than a preset quality condition, the effective collection window is not established, or the collected gas corresponding to that respiratory cycle is marked as unavailable and purged.

5. The apparatus according to claim 1, characterized in that, The controller calculates the actual collected gas volume and the actual collected carbon dioxide equivalent within the effective collection window after the valve's effective action correction. The controller establishes a gas mass correspondence between the carbon dioxide detection signal and the corresponding gas mass actually passing through the effective shunting position, based on the effective gas path volume between the effective measurement position and the effective shunting position, the real-time expiratory flow integral, and the calibrated measurement link delay; wherein, the actual collected gas volume is denoted as Vcap, the actual collected carbon dioxide equivalent is denoted as Mcap, and satisfies: M c a p = ∫ t 1 t 2 F C O 2 , c a p t ⋅ Q e x p t d t Where t1 and t2t_2 are the start and end times of the effective collection window, respectively. Expiratory flow rate, The volume fraction of carbon dioxide obtained according to the gas mass correspondence is the gas mass that actually passes through the effective diversion position at time t.

6. The apparatus according to claim 5, characterized in that, The available recyclable resources are represented by the available carbon dioxide equivalent state quantity Mavail. The controller updates the available carbon dioxide equivalent state quantity after the nth breathing cycle based on the actual collection, actual reinjection, venting or failure, and gas loss, and satisfies the following conditions: Among them, M avail,n M represents the available carbon dioxide equivalent state quantity after the nth respiratory cycle. cap,n M is the actual amount of carbon dioxide collected in the nth respiratory cycle. return,n M represents the actual amount of carbon dioxide that has been returned. discard,n M represents the carbon dioxide equivalent that has been vented or deemed ineffective. loss,n This is the equivalent of leakage, sampling, or other measurable gas loss that needs to be included after calibration.

7. The apparatus according to claim 6, characterized in that, The gas storage unit includes multiple independently isolated segmented gas storage chambers; the controller records at least the carbon dioxide equivalent and effective flag of the gas segment corresponding to each segmented gas storage chamber, and further records at least one of the formation time, volume, carbon dioxide concentration, oxygen concentration and pressure of the gas segment; the controller determines the sum of the carbon dioxide equivalent of each gas segment in an effective state as the available carbon dioxide equivalent state quantity.

8. The apparatus according to claim 7, characterized in that, The controller also generates a waveform quality score for the respiratory cycle forming the corresponding gas segment based on at least two of the following: platform duration, platform slope, carbon dioxide concentration dispersion within the continuous window, flow integral closure error, respiratory cycle consistency, and sensor signal integrity. When the gas segment exceeds the maximum allowable storage time, the oxygen concentration does not meet the preset conditions, the pressure is abnormal, the waveform quality score does not meet the preset conditions, the condensation state is abnormal, or it is determined to be mixed with non-target exhaled gas, the controller disables the gas segment and controls its evacuation, while simultaneously adding the carbon dioxide equivalent of the gas segment to M. discard .

9. The apparatus according to claim 1, characterized in that, The controller employs proportional control, proportional-integral control, model predictive control, lookup table control, or a combination thereof. It determines the required carbon dioxide equivalent to be reinfused based on the deviation between the target end-tidal carbon dioxide value and the measured end-tidal carbon dioxide value. The required reinfused carbon dioxide equivalent is subject to non-negative constraints, and a maximum allowable variation is set for the required reinfused carbon dioxide equivalent or corresponding reinfused parameters between adjacent respiratory cycles. When the measured end-tidal carbon dioxide value reaches or exceeds the preset target condition, the controller reduces the required reinfused carbon dioxide equivalent or stops increasing carbon dioxide reinfusion.

10. The apparatus according to claim 6, characterized in that, The device further includes a gas storage quality parameter acquisition unit, which obtains the carbon dioxide concentration of the gas to be returned by detecting the gas storage gas sensor, calculating based on the actual collected carbon dioxide equivalent and the effective gas volume in the gas storage unit, or a combination of both. The controller determines the actual carbon dioxide equivalent that the recovered gas can provide based on the carbon dioxide concentration, the available carbon dioxide equivalent status, the maximum volume of recovered gas allowed to be introduced during the intake cycle, and the allowed return time window, and limits the commanded carbon dioxide equivalent of the recovered gas to no more than the minimum value among the required returned carbon dioxide equivalent, the available carbon dioxide equivalent status, the actual carbon dioxide equivalent that the recovered gas can provide, and the upper limit of the carbon dioxide equivalent allowed by the current safety constraints.

11. The apparatus according to claim 10, characterized in that, The device also includes a fresh gas passage and an inhalation control unit. The inhalation control unit is used to switch or mix the delivery of fresh gas and recycled gas. After the inhalation begins, the fresh gas passage is first connected. After the preset fresh gas volume, preset inhalation time ratio, or preset oxygen supply conditions are reached, the corresponding return parameters of the return metering unit are determined according to the carbon dioxide equivalent of the recycled gas, and the recycled Phase III gas is introduced into the inhalation passage. The recycled Phase III gas is delivered in the middle section of the inhalation, the later section of the inhalation, or after being mixed with fresh gas.

12. The apparatus according to claim 1, characterized in that, The carbon dioxide detection unit is also configured to detect the concentration of inhaled carbon dioxide during the inhalation phase, or the device may further include a separate inhaled carbon dioxide detection unit; the device may further include at least one of an oxygen concentration detection unit and a pressure detection unit; when the controller determines or executes carbon dioxide reinjection, it applies corresponding safety constraints among the upper limit of inhaled carbon dioxide, the lower limit of oxygen concentration, and the pipeline pressure limit based on the detection results obtained by the corresponding detection units among the configured carbon dioxide detection unit, the inhaled carbon dioxide detection unit, the oxygen concentration detection unit, and the pressure detection unit; the device may further include a normally open safety bypass in the event of power failure, the safety bypass being configured to connect the patient interface to a fresh gas source, other safe gas sources, or ambient air and isolate the gas storage unit when there is a power outage, controller reset, critical sensor failure, valve malfunction, or when the configured corresponding detection unit detects that the inhaled carbon dioxide exceeds the safety upper limit, the oxygen concentration is below the safety lower limit, or the pipeline pressure is abnormal.

13. The apparatus according to claim 12, characterized in that, A selective collection path is provided between the exhalation diversion unit and the gas storage unit. The selective collection path is equipped with a condensation and filtration module. When the gas storage time expires, the condensation is abnormal, or the collected gas does not meet the preset quality conditions, the controller stops the collection of new gas and stops the return of the corresponding collected gas, thus rendering it ineffective. When the gas storage unit adopts a segmented gas storage structure, the controller disables the corresponding gas segment and controls the venting.

14. The apparatus according to claim 10, characterized in that, It also includes an external carbon dioxide compensation interface; after a usable recovery resource is formed, the controller prioritizes the gas storage unit to provide the recovered carbon dioxide equivalent, and only when the actual carbon dioxide equivalent that the recovered gas can provide in the current gas intake cycle is lower than the required return carbon dioxide equivalent, is the external carbon dioxide compensation interface allowed to provide external carbon dioxide not exceeding the difference between the two; when the recovered gas is sufficient to meet the required return carbon dioxide equivalent, the external carbon dioxide compensation interface is shut down.

15. The apparatus according to claim 14, characterized in that, When the device is activated but no recovered gas meeting the preset quality conditions has been formed, or when the available carbon dioxide equivalent state quantity is lower than the preset activation conditions, the controller, under the premise that the current safety constraints allow for external carbon dioxide compensation, provides part or all of the required carbon dioxide equivalent from external sources within at least one activation inhalation cycle, based on the target inhaled carbon dioxide parameters, the target end-expiratory carbon dioxide parameters, or the required reinjected carbon dioxide equivalent, to establish the required inhaled carbon dioxide level; simultaneously, the controller selectively collects and updates the available carbon dioxide equivalent state quantity from the subsequent exhalation phase III gas; once recovered resources meeting the preset availability conditions are formed, the controller switches to a supply state that prioritizes recovered gas and only supplements the external carbon dioxide in a differential manner.

16. The apparatus according to any one of claims 1 to 15, characterized in that, It also includes a wearable housing and a battery unit; at least a portion of the patient interface, bidirectional flow detection unit, carbon dioxide detection unit, and expiratory shunt unit constitutes a patient proximity module; at least a portion of the gas storage unit, reinfusion metering unit, controller, and battery unit are disposed within the wearable housing; the gas storage unit includes a flexible gas storage bladder or a variable volume gas storage chamber, and the patient proximity module is connected to the wearable housing via a flexible air passage.

17. A respiratory gas circulation system, characterized in that, It includes the carbon dioxide closed-loop compensation device as described in claim 1, and at least one of a ventilator, oxygen source, or air source connected to the carbon dioxide closed-loop compensation device; the patient interface is at least one of a face mask, nasal mask, mouthpiece, or interface for connecting to an artificial airway.

18. A controller for a respiratory gas circulation device, characterized in that, The system includes a processor, a memory, a signal interface for receiving expiratory flow rate signals and carbon dioxide waveform signals, and a control interface for outputting expiratory shunting commands and reinjection metering commands. The memory stores a computer program, and the processor, when executing the computer program, is configured to: determine the start and end boundaries of phase III based on the expiratory carbon dioxide waveform; after the corresponding boundaries are identified at the effective measurement location, integrate the real-time expiratory flow rate, and based on the obtained cumulative through volume and the effective airway volume between the effective measurement location and the effective shunting location, perform volume domain propagation tracking of the corresponding boundary air mass to generate an expiratory shunting command for forming the effective collection window of phase III; establish a correspondence between carbon dioxide concentration information and the actual collected air mass based on the effective airway volume, the real-time expiratory flow rate integral, and the calibrated measurement link delay; and determine the actual collected carbon dioxide equivalent based on the expiratory flow rate and carbon dioxide volume fraction of the corresponding air mass. Establish or update available recovery resources based on the actual collected carbon dioxide equivalent and actual reinjection, venting or failure and gas loss; The required amount of reinfused carbon dioxide equivalent is determined based on the deviation between the target end-tidal carbon dioxide value and the measured end-tidal carbon dioxide value, and reinfusion metering instructions for subsequent inspiratory cycles are generated with the available recovery resources as constraints.

19. A non-transient computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by the processor, the processor performs the following operations as described in claim 18: determining the III-phase boundary, tracking the propagation of the volumetric gas mass, matching carbon dioxide concentration information with the actual collected gas mass, forming an effective collection window, calculating the actual collected carbon dioxide equivalent, establishing or updating available recovery resources, and controlling the per-breath reinfusion based on the constraints of the available recovery resources.

20. A computer program product comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by the processor, the processor performs the following operations as described in claim 18: determining the III-phase boundary, tracking the propagation of the volumetric gas mass, matching carbon dioxide concentration information with the actual collected gas mass, forming an effective collection window, calculating the actual collected carbon dioxide equivalent, establishing or updating available recovery resources, and controlling the per-breath reinfusion based on the constraints of the available recovery resources.