Automatic Regulator for Supplemental Oxygen Therapy

Living tissues require a sufficient supply of oxygen for survival. An insufficient supply of oxygen may result from impairments of the respiration or oxygen transport systems, such as lung disease, heart disease, and anemia. Supplemental oxygen therapy increases the oxygen content in the lungs and blood oxygen saturation. The control of the oxygen flow is typically adjusted manually. This manual adjustment increases the risk for a mismatch between the oxygen flow rate and oxygen consumption that may change with physiological activity. An insufficient supply of oxygen increases the risk for cell damage and hypoxia. An excessive supply of oxygen risks oxygen toxicity and rapid depletion of the oxygen supply. This paper develops and tests the regulation of gas flow intake based on input of patient oxygen blood saturation. During testing of the prototype, gas pressure was regulated based on input oxygen blood saturation values, indicating control of gas flow. Further development and testing would be required for closed loop control of the system. Such a system would contribute toward improving the match of oxygen flow to physiological demands, and contribute to improving the health of many patients.


INTRODUCTION
Cells and tissues require a sufficient supply of oxygen for survival.During periods of energy consuming activities, more oxygen is needed to balance consumption.An insufficient supply of oxygen to the cells and tissues may result from impairments of the respiration or oxygen transport systems, such as lung disease, heart disease, anemia, asthma, pneumonia, cystic fibrosis or chronic obstructive pulmonary disease (COPD) [1].Supplemental oxygen therapy has wide-spread clinical use for increasing the oxygen content in the lungs, and thus increasing blood oxygen saturation [2,3].Supplemental oxygen typically provides a constant flow of oxygen to the patient through a mask or nasal cannula.Pulse oximeters may be used to monitor blood oxygen saturation (SpO2).A valve that controls the rate of oxygen flow is manually adjusted by medical staff, care giver, or the patient.Such a manually adjusted system may result in a mismatch between the oxygen flow rate and the amount necessary to maintain the proper level of oxygen blood saturation [3].Such a mismatch could be due to several reasons, including oxygen tank depletion, accidental blockage or repositioning of the tube, lung respiration becoming less effective due to changes in body position, or an increase in physical activities.For example, a person with breathing difficulty might need more oxygen when they are walking up a set of stairs, an episode of coughing or even an episode of laughing.An insufficient supply of oxygen may result in cell damage and hypoxia [4].An excessive supply of oxygen also has disadvantages [2,5], such as risk of oxygen toxicity, headaches and depletion of the oxygen supply faster than necessary.
Negative feedback is used by the physiological system to maintain homeostasis.Blood gas concentrations for oxygen (O2) and carbon monoxide (CO2) are monitored.Based on deviations from the set point, neural and chemical signals are issued, which regulate respiration rate and intensity, heart rate and stroke volume, and vascular circulation.A control system for supplemental oxygen therapy could be developed that more closely mimics the function of this natural physiological negative feedback system.The primary input to this system would be patient SpO2 values.Based on target values for SpO2 [4], the flow of O2 to the patient could be adjusted.For example, when SpO2 is above 95%, minimal or no supplemental O2 would be supplied.As SpO2 decreases from 95% to 85%, the flow of O2 would be progressively increased.Values of SpO2 below 85% indicate higher risk of impairment and organ .failure, so the flow of O2 would be at maximum.In addition to the negative feedback control, the SpO2 values could be used to classify the state of respiration, and present indicators of the state or alerts when urgent medical attention would be necessary.
The purpose of this project was to develop and evaluate prototype modules of a system that would regulate gas flow based on SpO2 input values.Such a system would be a step closer to mimicking the physiological control system for maintaining homeostasis.Such developments would contribute toward more consistent supply of O2 to meet physiological need, and thus improve patient care.

MATERIALS AND METHODS
The proposed system is diagramed in Figure 1.SpO2 values from the patient would be input to the system.The SpO2 values would be compared to target ranges, and controls for the flow of O2 to the patient through the nasal cannula would be adjusted so that oxygen flow would better maintain SpO2 values.For development of the prototype, the control module was designed to control gas flow rate so inversely proportional to SpO2 values for the range of 95% to 85%.Once this linear relation was established, the control algorithm could potentially be adjusted in software to better regulate gas flow rate for changes in SpO2.The control system was based on a microcontroller, the MSP430 by Texas Instruments (Austin, TX).The SpO2 value was input to the microcontroller as an analog voltage that was digitized and processed by software running on the microcontroller.Figure 2 shows a diagram of the system.
The system was developed to function for a supply of O2 from a gas tank or from an oxygen concentrator [2].Oxygen tanks become depleted and need periodic replacement.Oxygen concentrator systems obtain O2 from the air, concentrate the O2 and then supply to the system for the patient.The concentrated gas may have low pressure.The prototype system used a gas pump to control the gas flow from a low pressure source.For development and testing, air was utilized as the gas.Later developments can supply concentrated O2 into the air pump of the prototype for actual control of O2 flow.Clinical applications of supplemental O2 may range the flow rate from 2 to 15 liters per minute (Lpm) [2,3].A pump was obtained for the prototype that could control the gas flow from 2.5 to 11.5 Lpm.The primary application of this air pump was for supply of air to aquariums for supply of O2.The control was a manual rheostat that would modulate the air flow between the minimum to maximum flow rate.

Figure 3: 3D picture of the belted wheel gears and coupled servo motor was made using Solidworks
For the microcontroller to control the gas pump for output flow rate, a servo motor (standard servo motor, Parallax Inc., Rocklin, CA) was utilized to rotate the rheostat, and thus control the output air flow of the pump.Pulse width modulation (PWM) by the microcontroller controlled the rotation of the motor.The servo motor rotation was coupled to rheostat rotation by a belted wheel system diagramed in Figure 3.
For the microcontroller to monitor the output flow rate of the pump, a pressure sensor was attached, such that the sensor was exposed to the chamber of the tube for the nasal cannula.With fixed length and diameter of the tube for the nasal cannula, flow rate can be calculated from the recorded values of pressure of the gas leaving the pump and entering the tube for the nasal cannula.The analysis of device function in this study monitored this output gas pressure as a reflection of the gas flow through the tube.
A custom made program in C was developed to run on the microcontroller.The programmed was developed in Code Composer (Texas Instruments, Austin, TX) software development environment.The program digitized the analog SpO2 value, and compared to target ranges.PWM signals were output the microcontroller to control the gas pump for flow.The SpO2 was categorized and a colored LED was activated to indicate the state and also indicate an alert that could be made to request medical assistance.The categorization was as follows.

RESULTS
Component tests of the servo motor were completed to ensure linear control of the rotation by PWM of the microcontroller.Also, component tests of the gas pump were done to ensure a linear relation between rheostat rotation and output gas flow.Figure 5 shows a result of test setup number 1.In each of these tests, pressure was recorded at the output of the gas pump and beginning of the tube for the nasal cannula.The recorded pressure was utilized as an indicator that would reflect the value of gas flow.Each mark (*) was the mean of the 8 trials.At SpO2 below 80%, the gas pressure was maximal.Above 94 percent the gas pressure was minimal.The regulated range was between 85 to 94% SpO2.The relation in the regulated range appears inversely proportional, but multiple markers at each SpO2 value (such as 90%) are visible, indicating possible hysteresis effect.Figure 6 shows only values within the regulated range.The markers are connected by lines to clarify the values recorded as the SpO2 values were rising (solid line) or falling (dotted line).A small hysteresis effect can be seen, where the output pressure values of the system were not the same for when the input values were rising or falling.Nevertheless, the difference was considered small and not a detriment to the functioning of the system.
For Figure 7, the mean of the 8 trials for rising and for falling SpO2 values were combined and the mean plotted.Then a linear line was fit as shown in the plot (Figure 7).The relation as being linear supported by the high R 2 value of 0.979, and the resulting linear equation is displayed (Figure 7).
The LED indicators were also recorded and monitored.They turned on or off according to the design.This supported the algorithm characterizing the SpO2 value in a way that would be useful for indications of state and to issue alerts requesting medical assistance as the SpO2 value decreased too low.
The results of test setup number 1 support the prototype did respond to the full expected range SpO2 value, and output control PWM signals for the gas pump and control voltages for the LED indicators for function.
Test setup number 2 utilized SpO2 data from an actual patient, as obtained for this test from Physionet database.Figure 8 shows the results, with the top part A) being a plot of the patient SpO2 values, and the lower part B) being a plot of the gas pressure.The dynamics of the plot seem to show an inverse relation as expected by the design of the system, such that as SpO2 value declined, the gas pressure values would increase.

DISCUSSION
Supplemental oxygen systems have benefited many patients who have conditions that led to low SpO2 values [1,3].Typically these systems have manual control that may not consistently balance the supply of O2 with consumption or with the changes in the efficiency of gas respiration in the lungs.Thus, periods of either too low SpO2 or too high SpO2 concentrations may result.Either case has disadvantages and risks for the patient [4,5].
The prototype system developed and tested in this study appears to support the concept of an automatic control system that would more closely mimic the physiologic negative feedback system that adjusts respiration, cardiac output and blood circulation to maintain homeostasis in blood gas concentrations, such as SpO2.
Further development and testing are required to better understand appropriate designs of such systems.The input SpO2 values should be derived directly from a pulse oximeter or other patient monitoring device.The regulation of gas flow should function for either case of a higher pressure source, such as an O2 tank, or for a lower pressure source, such as an O2 concentrator device.The regulator system should have fewer mechanical moving parts in order to increase robustness and decrease system cost.The output sensor should directly measure or determine gas flow, instead of only using the pressure value.
Moreover, a full closed loop system with a patient and the supplemental O2 system should be tested.The control algorithm may need to be modified to best supply a stable O2 flow and maintain a desired SpO2 level.A more sophisticated control algorithm based on machine learning may be more appropriate for the final algorithm design of this system.
In conclusion, the prototype shows promise for development toward automatic control of O2 flow to maintain SpO2.Such a system would provide a more consistent O2 therapy, issue alerts for medical help as need arises, and contribute to improved patient quality of life.

Figure 1 :
Figure 1: a sketch of a woman using oxygen therapy along with the automatic regulator and pulse oximeter.

Figure 2 :
Figure 2: Diagram of the supplemental oxygen therapy monitoring system.


Healthy: SpO2 values above 95% o gas flow minimal (Green LED)  Regulated Range: SpO2 values between 95-85% o inverse proportional control of gas flow (White LED)  Low: SpO2 values: 85-80%, o gas flow maximal o (Yellow LED to indicate alert for medical assistance)  Emergency: SpO2 values below 80% o gas flow maximal (Red LED and activate an audio beeper to indicate alert for urgent medical assistance) Based on the conditions above, the output gas flow was adjusted by the microcontroller based on SpO2 values.A diagram of the software algorithm is shown in Figure 4.

Figure 4 :
Figure 4: diagram for the software algorithm running on the microcontroller.A test setup was developed to provide inputs and monitor outputs of the developed prototype.A custom LabView program (National Instruments, Austin, TX) was developed to run on a laptop computer (Windows) and provide analog voltage signals to simulate patient SpO2 values to the microcontroller through an Elvis data acquisition module (National Instruments).The Elvis module recorded voltage signals from the microcontroller for LED indicators and from the pressure sensor that indicated gas flow rate.

Figure 5 :
Figure 5: Relation between input SpO2 values and output air pressure values from the air pump to the nasal cannula.SpO2 values below 85% resulted in the system generating maximum output pressure, and values of 95% and above resulted in the lowest output.SpO2 values between 85 and 94% were regulated, such that lower values resulted in higher output In test setup number 1, the LabView program output the analog voltage for SpO2 values from 75% to 100% and then back to 75%.A value (such as 75%) would be maintained for about 5 seconds.Then the program would increment 1% (such as to 76%) and hold that for 5 seconds.Thus one cycle of 75% to 100% and back to 75% took about 250 seconds.The purpose of this test was to exercise a full range of possible SpO2 values, and monitor gas pressure output and correct characterizing of the value as indicated by which LED was lit.Eight trials of this test setup were completed.In test setup number 2, the LabView program output values of SpO2 from a real patient that was obtained from the Physionet database (www.physionet.org;Challenge 2014 Training set P).Most of the SpO2 values were between 95% and 85%.The LabView program recorded the same signals through the Elvis module as in test setup number 1.The purpose of this test was to

Figure 6 :
Figure 6: Relation between SpO2 and pressure for the regulated range of 85 to 94%.Some hysteresis behavior could be observed in the system as the difference between the two traces in the graph (solid line and dotted line).When the SpO2 values were rising, the output pressure values were lower for the same value compared to when the SpO2 values were falling.

Figure 7 .
Figure 7. Linear relation between SpO2 values and output pressure values for the regulated range of 85 to 94%.Each plotted point at an input SpO2 value was the mean of 16 measurements, of the 8 trials during the rising and falling phase.

Figure 8 .
Figure 8. Response of system to input of patient SpO2 values.The patient data was obtained from Physionet.As the SpO2 values decreased within the regulated range, the output