Next Article in Journal
Role of Machine Learning-Based CT Body Composition in Risk Prediction and Prognostication: Current State and Future Directions
Previous Article in Journal
Negative Samples for Improving Object Detection—A Case Study in AI-Assisted Colonoscopy for Polyp Detection
Previous Article in Special Issue
A Novel Strategy to Fit and Validate Physiological Models: A Case Study of a Cardiorespiratory Model for Simulation of Incremental Aerobic Exercise
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Self-Regulating Adaptive Controller for Oxygen Support to Severe Respiratory Distress Patients and Human Respiratory System Modeling

Heritage Institute of Technology, Kolkata 700107, WB, India
*
Author to whom correspondence should be addressed.
Diagnostics 2023, 13(5), 967; https://doi.org/10.3390/diagnostics13050967
Submission received: 2 January 2023 / Revised: 21 February 2023 / Accepted: 23 February 2023 / Published: 3 March 2023
(This article belongs to the Special Issue Computerized Decision Support Systems for Lung Ventilation)

Abstract

:
Uncontrolled breathing is the most critical and challenging situation for a healthcare person to patients. It may be due to simple cough/cold/critical disease to severe respiratory infection of the patients and resulting directly impacts the lungs and damages the alveoli which leads to shortness of breath and also impairs the oxygen exchange. The prolonged respiratory failure in such patients may cause death. In this condition, supportive care of the patients by medicine and a controlled oxygen supply is only the emergency treatment. In this paper, as a part of emergency support, the intelligent set-point modulated fuzzy PI-based model reference adaptive controller (SFPIMRAC) is delineated to control the oxygen supply to uncomforted breathing or respiratory infected patients. The effectiveness of the model reference adaptive controller (MRAC) is enhanced by assimilating the worthiness of fuzzy-based tuning and set-point modulation strategies. Since then, different conventional and intelligent controllers have attempted to regulate the supply of oxygen to respiratory distress patients. To overcome the limitations of previous techniques, researchers created the set-point modulated fuzzy PI-based model reference adaptive controller, which can react instantly to changes in oxygen demand in patients. Nonlinear mathematical formulations of the respiratory system and the exchange of oxygen with time delay are modeled and simulated for study. The efficacy of the proposed SFPIMRAC is tested, with transport delay and set-point variations in the devised respiratory model.

1. Introduction

At present, respiratory distress may be due to different respiratory tract-infected viruses, which are mainly rhinoviruses and enteroviruses (Picornaviridae), influenza viruses (Orthomyxoviridae), parainfluenza, metapneumoviruses and respiratory syncytial viruses (Paramyxoviridae), coronaviruses (Coronaviridae), several adenoviruses, or maybe some critical medical conditions. Out of the above viruses, adenoviruses have a DNA genome, and all others possess an RNA genome [1]. They are usually transmitted by direct hand-to-surface-to-hand contact or aerosol inhalation and replicate in both the upper and lower airways.
Breathing exercise issues due to any one of the above are one of the most uncontrollable and uncomfortable conditions of humans due to any cause, such as chronic obstructive pulmonary disease(COPD), bronchitis, emphysema, fibrosis, asthma, any medical critical care condition, and so on. There also are other physical conditions with acute respiratory infection symptoms in particular for older people and immune-suppressed patients such as fatigue, reduced alertness, reduced mobility, and many more [2,3]. As a result, there is a probability to reduce the oxygen saturation for the different above conditions of the patients. A longer duration of this condition may also extend to the end of an individual’s life. In the damaged area of the respiratory tract, there is a secretion that is a plasma protein that accumulates on the alveolus wall and thickens the lining. This produces a blockage in the path of oxygen transfer to the red blood cells, resulting in difficulty breathing, which creates a deficiency of oxygen in the internal organs. In this condition, the deficiency of oxygen in the human body, malfunctioning of organs, and also immunity deficiency enhance the present condition, which aggravates the crisis [4,5]. Mehedi, Ibrahim et al. [6] implemented a fuzzy PID controller for mechanical ventilation processes. Tuning a fuzzy controller is a strenuous task due to the substantial number of control parameters involved. But Mehedi, Ibrahim et al. [6] did not tune the controller, which is very much essential for critical processes such as the human respiratory system. Hansen et al. [7] proposed the O2matic®-based closed-loop controlled oxygen supply in COVID time, which has limitations of flow rate and it adjusts flow every second based on 15 s averaging of SpO2 reading.
To sort out this emergency crisis, a scheme is proposed in this paper to design a modified model-based adaptive controller that can automatically control the oxygen level with a faster response but without overshoot, which is also the most important part of the designed controller to protect the patient from the over-concentration of oxygen. To suppress the above problem, a set-point modulated fuzzy PI-based model reference adaptive controller (SFPIMRAC) is proposed to control the oxygen level of respiratory distress patients without human intervention. The block diagram of the proposed scheme is shown in Figure 1.

2. Proposed Components of Respiratory Distress Treatments

The basic components of the proposed model to control the oxygen supply to critical respiratory distress patients are briefed in Figure 1. In this critical time, patients with respiratory distress need to be treated with oxygen therapy to restore normal breathing and also receive proper medication support. The proposed model could be an answer to this problem due to its automatic control capability of oxygen supply to patients without much human intervention. Mathematical modeling of the proposed system components, as listed in Figure 1, is derived below for the simulation study.

2.1. Oxygen Cylinder/Oxygen Concentrator

Oxygen therapy-related data with signs of severe respiratory distress, hypoxemia (i.e., SpO2 < 90%), or shock are initiated oxygen therapy at 5 L/min and titrated to SpO2 ≥ 90% in non-pregnant adults, and it will be SpO2 ≥ 92–95% in pregnant patients. A pulse oximeter measures the SpO2 level and checks the availability of an oxygen delivery system in the patient care unit [3].
Ideally, in any hospital, oxygen is supplied to the patients from the dedicated oxygen plant only for medical applications with a percentage of O2 (not less than 99.5% v/v of O2) concentration in that hospital through piping as shown in Figure 2, but unfortunately, most hospitals and nursing homes do not have this facility, and thus they purchase oxygen cylinders from private vendors for treatment.
In this paper, a typical oxygen cylinder is modeled for the simulation study. In Figure 3, the variables P1, P2, q, R, and C are the input oxygen pressure (from the oxygen cylinder), output oxygen pressure (to the patient), oxygen flow rate, resistance in the flow path (valve resistance), and capacity (patient oxygen requirement) of the system, respectively. Considering the above parameters, the mathematical equation is formed using the electrical analogy.
P 1 P 2 R = C dP 2 dt
The transfer function of the oxygen cylinder (TFcy) is derived by the Laplace transform of Equation (1).
T F c y = P 2 ( S ) P 1 ( S ) = 1 R C S + 1 = 1 τ   S + 1
Equation (2) states that if a patient has severe breathing issues and needs more oxygen, then the C-value will be higher, which will make the R-value lower (i.e., the percentage of valve opening connected to the oxygen cylinder will be higher) or vice versa. In the present work, the value of the time constant (τ = CR) for the simulation study is considered as 0.50 s. and its reason is studied in the result section; however, it can work for other values also. The regulation of oxygen supply is manipulated by the valve opening (here, a change in R-value).
An instant supply of oxygen is very much essential for the treatment of uncontrolled acute breathing problems and thus needs immediate attention to improve and stabilize the SpO2 level. In emergency times, when traditional compressed-oxygen cylinders provide a limited amount of oxygen, it is better to equip each hospital with an oxygen concentrator/oxygen plant. Oxygen concentrators operate by drawing air from the environment to deliver a clean, continuous flow at a concentration of oxygen in the range of 82–96%. It would be better to use a high-efficiency particulate air (HEPA) filter with an oxygen concentrator to create a more protected environment for the patients. The Institute of Environmental Sciences and Technology dictates that a HEPA filter must trap 99.97% of particulates of 0.01 microns or larger, whereas the average size of any virus is not less than around 0.123 microns [3].

2.2. Pulse Oximeter

A pulse oximeter is used to measure the oxygen concentration in a patient’s blood in a non-invasive manner. The output of the pulse oximeter signal is fed to the comparator to monitor oxygen therapy in this proposed model, as outlined in Figure 1 [3].

3. Mathematical Model of Respiratory System

The airway of the human respiratory system, comprising the nose, mouth, pharynx, larynx, trachea, bronchi, and alveoli, carries air between the lungs and the body’s exterior. In this paper, the human respiratory system is modeled in two halves. In the first part of the model, the flow of oxygen from the oxygen concentrator/cylinder to the alveoli passing through the nasal cavity, trachea, and bronchi is considered [6,7,8]. Gas exchange in the human respiratory system is modeled in the next part [9,10,11]. Moreover, a variable transport delay is included in the model to increase effectiveness.
The critical respiratory infection makes the alveolar sacs in the lungs stiff and thick. This degraded condition of the tissues makes it harder for O2–CO2 exchange to take place through the walls of the alveoli with the bloodstream. Thus, the alveolar sacs stiffen, and as a result, the characteristic compliance of the alveoli decreases [10].

3.1. Respiratory Model Part I

The human respiratory system is broadly divided into four subgroups, starting with the nasal cavity, as shown in Figure 4. The next three subgroups, i.e., trachea-bronchial trees, are further subdivided into 24 generations (Table 1) [12,13,14]. In Table 1, generation ‘0’, generation 1 to 19, and generation 20 to 23 correspond to the trachea, bronchi, and alveolar sacs, respectively. In this model, each branch of a given generation is further subdivided into two identical daughters; therefore, generation ‘n’ has 2n branches [14,15]. The electrical equivalence of each generation in terms of resistance (R), inertance (L), and compliance (C) is derived as shown in Table 1 [13,16].
The transfer functions of the respiratory parts are derived from their electrical equivalent model, as depicted in Figure 4. The corresponding values in terms of R, L, and C, and their combinations, are presented in Table 2 [17,18,19]. Different sub-groups of Figure 4 are then modeled in terms of transfer functions as follows:
TF N = 1 / ( 2.7 × 10 3 S 2 + 2.165 S + 1 )
TF T = 1 / ( 3.7 × 10 4 S 2 + 5.4 × 10 3 S + 1 )
TF B = 1 / ( 1.44 × 10 5 S 2 + 4.02 × 10 4 S + 1 )
TF A = 1 / ( 6.72 × 10 8 S 2 + 5.71 × 10 4 S + 1 )

Change in Respiratory Model Due to Defect in Alveoli Area

Abnormality in the alveoli area can be reflected in the developed model in terms of a decrement in the capacitance value of the alveoli by about 100 to 1000 times, which means that the effective impedance Z = R 2 + ( X L X C ) 2 of the circuit will increase. The model of the alveolar section represented by Equation (6) thus gets modified to:
TF A = 1 / ( 1.0 × 10 10 S 2 + 1.15 × 10 6 S + 1 )
where TF A refers to the transfer function of the alveolar section of a respiratory distress patient being affected by any of the above-mentioned viruses/critical medical conditions.
The resultant model, TFM is derived from the series of combinations of the individual models, i.e.,
TF M = TF N TF T TF B TF A

3.2. Respiratory Model Part II (Gas Exchange)

From Figure 5, it is seen that the gas exchange takes place in the area of alveolar air space, lung tissue, and capillary blood accordingly. In the case of the diffusion process, the movement of the gas from a high-concentration region to a low-concentration region is followed by the gradient profile [19]. This principle is followed during respiration, where gas exchange occurs between the blood and lungs. During this time, the concentration of oxygen is high and the carbon dioxide concentration is low in the blood, which undergoes the gas exchange with air in the lungs with a higher gradient profile than the blood. This process is the opposite of the expiration process [10,11,20]. Each of the alveoli is surrounded by a network-like structure of very small blood vessels of diameter 5 to 10 μm. For a normal person, under resting conditions, the volume of air available for gas exchange corresponds to the alveolar zone, which sums up to around 2.5 to 3 L, and the volume of blood in the neighborhood of the exchange surface is around 70 mL [21,22].

3.3. Partial Pressure Model

The concept of partial pressure is adopted to develop the mathematical model of the gas exchange part of the respiratory system. Mathematically, to find out the individual components’ concentration in a mixture of gases, the partial pressure measuring method is used here, and the total pressure is calculated by the sum of the individual components [10,19]. The rate of diffusion of a gas is measured by its partial pressure within the total gas mixture, and they are linearly related. In this gas exchange model, the partial pressures for the alveolar air, lung tissue, and capillary blood are illustrated by p o 2 A ,   p o 2 T , and p o 2 B respectively [20]. The diffusion of oxygen, as shown in Figure 5, across lung tissue/alveolar air barriers and the lung tissue/capillary blood is modeled as follows:
(i)
Oxygen diffusion from alveolar air space to lung tissue:
d p o 2 A d t = D T A σ A V A ( p o 2 T p o 2 A )
(ii)
Similarly, oxygen exchange between lung tissue, alveolar air space, and capillary blood is derived by:
d p o 2 T d t = D T B σ T V T ( p o 2 B p o 2 T ) + D T A σ T V T ( p o 2 A p o 2 T )
(iii)
Oxygen transfer between lung tissue and capillary blood:
d p o 2 B d t = D T B σ B V B ( p o 2 T p o 2 B )
VA, VT, and VB are the respective volumes of alveolar air space, lung tissue, and capillary blood. The parameters σ A ,   σ T , and σ B are used to convert the partial pressure of oxygen in alveolar air space, lung tissue, and capillary blood regions to their corresponding molar concentrations, respectively. In the model, the diffusion rates for lung tissue to alveolar air and lung tissue to capillary blood are illustrated by D T A and D T B , respectively. The different parameter values of the model are presented in Table 3. The gas exchange with the capillary blood is a very complex process. Ideally, different biological processes are functioning in this process of gas exchange, such as diffusion of oxygen and carbon dioxide, hemoglobin uptake of oxygen, and enzymatic reactions governing carbon dioxide and bicarbonate levels [10,20]. However, to make the model simple, in this work, only the rate of oxygen transfer is assumed, and some assumptions are considered as follows:
Assumptions: (i) Diffusion takes place in only two zones: capillary blood/lung tissue and lung tissue/alveolar air space. (ii) The alveolar air space must be well mixed. (iii) The same diffusion rate is considered here for each section of the gas exchange module (iv) and the continuous supply of oxygen is achieved by the ventilation process that provides fresh oxygen to the lungs, whereas venous blood is periodically pumped onto the exchange zone by the heart.

Electrical Analogy Model

An electrical equivalent circuit of Figure 5 is drawn in Figure 6.
Considering the flow of oxygen as current flow, the following equations are derived from Figure 6:
(i)
Flow of oxygen from the alveolar air space (AA) to the lung tissue (LT):
d v A A d t = v L T v A A R A C A
(ii)
Oxygen exchange between lung tissue (LT), alveolar air space (AA), and capillary blood (CB):
d v L T d t = v C B v L T R T C T + v A A v L T R A C T
(iii)
Oxygen transfer between LT and CB:
d v C B d t = v L T v C B R B C B
The following equation parameters are derived from a careful comparison of Equations (12) to (14) with (9) to (11) and the data in Table 3:
RACA = 1/0.2429, RACT = 1/4.76,
RTCT = 1/15.87, and RBCB = 1/88.88
The ultimate gas exchange model (TFBO2) due to the diffusion of oxygen in the capillary blood is calculated by the Laplace transform of Equations (12) to (14). The transfer function (TFBO2) is derived by putting the corresponding resistance and capacitance values in Equation (15).
TF BO 2 = ( 20 s 2 + 200 s + 62 ) / ( s 3 + 110 s 2 + 350 s + 67 )
The ultimate human respiratory system (TPM) in the infected area of the alveoli of the patient is modeled by a series combination of the models (TFM) and (TFBO2).
T P M = T F M × T F B O 2
The stability of the model is checked by the Bode plot in Figure 7. The positive values of gain margin (Gm) and phase margin (Pm) ensure that the respiratory model is a stable system.

3.4. Transport Delay

To make the model more realistic, in this study, a variable transport delay is included between the respiratory model and the gas exchange model. The study is carried out with various transport delays, as the time taken in gas exchange is not fixed in respiratory infected patients; it varies depending on the severity.

4. Design of the Proposed Controller

In this section, the design part of the proposed set-point modulated fuzzy PI model reference adaptive controller (SFPIMRAC) is elaborated. Initially, the developed respiratory model for the respiratory distress patient is tested with a conventional PID controller and MRAC to control the oxygen supply and later MRAC is modified by incorporating the knowledge of fuzzy logic with a set-point tracking facility.

4.1. Design of MRAC

The basic concept of the MIT rule is applied to the design of the MRAC to control the oxygen supply to respiratory distress patients with respiratory infections associated with breathing problems. A basic scheme of MRAC is illustrated in Figure 8.
Optimization of control parameters to minimize the loss function is very important in any controller development. In this paper, the difference between patients’ output (y) (pulse oximeter reading) and the model process output (ym) is measured in terms of error (e) as pictured in Figure 8.
In the case of MRAC, there are two parameters: the adaptation gain (γ1) control and adjustable control parameter (θ) is the most important part of the design. A suitable adjustment mechanism of (θ) that makes the measured error (e) to a value zero is also used to minimize the loss function F(θ), as shown in Figure 8 [23,24,25].
F ( θ ) = e 2 2
Minimization of loss function F(θ) is derived from the variation of the parameter θ in the direction of the negative gradient of F(θ) and adaptation gain (γ1), i.e.,
d θ d t = γ 1 F θ = γ 1 e e θ
where ∂e/∂θ is expressed as the sensitivity of the system. For the large process, there are many numbers of process variables such as (θ1, θ2, etc.) where Equation (18) can also be applicable. But in that case, output (θ) should be taken as a vector quantity in place of scalar one and mathematically the gradient of the error concerning the parameters concept is used to calculate its partial derivative ∂e/∂θ [24,26]. In Figure 8, the patient and the reference models are represented by KG(s) and K0G(s), respectively (where K is an unknown and K0 is a known parameter). The output of the patient (y) always tracks the reference model output (ym). From the scheme shown in Figure 8, the process output (y), model output (ym), and error (e) are derived as follows:
y = u . K G ( s ) = r . θ . K G ( s )
y m = r K 0 G ( s )
e = y y m = r θ K G ( s ) r K 0 G ( s )
From (20):
r G ( S ) = y m K 0
where u is the controller output and r is the input to the reference model.
The calculation of ∂e/∂θ is derived by taking a partial derivative of (21).
e θ = r K G ( s ) = K . y m K 0 = ( K / K 0 ) y m
Finally, the equation for adjusting the parameter variation in (18) is modified by (22).
d θ d t = γ 1 e e θ = ( γ 1 K / K 0 ) y m e = γ y m e
From Figure 8, it is observed that the final output of the controller, or basically input to the process u [u = rθ] is obtained by the product of the reference input (r) with the adjustable control parameter (θ), which is obtained by integrating (dθ/dt). In Equation (23), the value of adaptation gain (γ1) is a user-defined parameter that is a positive number, and its value depends on the process model [27,28,29,30].
The choice of exact adaptation gain (γ1) is one of the most difficult steps in MRAC. To eliminate this difficulty, a set-point modulated fuzzy PI-based scheme is incorporated with MRAC to control the oxygen supply for respiratory distress patients.

4.2. Design of Set-Point Modulated Fuzzy PI-Based MRAC

A hybrid fuzzy PI logic is adopted for automatic gain adjustment of the controller. The two dynamic parameters (error and change of error) are used as the input parameters of the fuzzy system, as shown in Figure 9.

4.2.1. Fuzzy PI for Adaptive Gain (m) Adjustment

It is seen from Figure 9 that the output of the designed fuzzy PI model (m) is a function of the input variables (e, Δe) and linguistic if-then rules. Here m is used as the alternative of the adaptation gain (γ1) in the case of MRAC. A very simple, linear, equal base width, and widely used triangular type of fuzzy membership functions with the span of [−100, +100] are used for the inputs (e and Δe) and the span of [−1, +1] for output (m), and five fuzzy regions (termed negative big (NB), negative medium (NM), zero (ZE), positive medium (PM), and positive big (PB)) are used to develop the database and rule base of the proposed fuzzy scheme as shown in Figure 10 and Figure 11 [30,31,32,33].
The adaptation gain ‘m’ as per Equation (24) depends on the input variables (e, Δe and the rule base, which consists of 25 fuzzy linguistic if-then rules shown in Table 4. The control parameter ‘θ’ is derived by applying Equation (25) [30].
m = f   ( e   , Δ e )  
θ = ( 1 ) × m × y = m y m
The analysis of the control surface of fuzzy PI (e, Δe vs. m) reveals the smoothness of the surface, which is very much essential for the smooth operations of the control equipment present in the loop. The study of Figure 12 and Table 5 discloses that the output (m) of the system depends on the input system parameters (e, Δe). The capability of the controller is established from the analysis conducted in Table 5. In this design, the adaptation gain (γ1) of MRAC is replaced by m, which auto-tunes the control parameter (θ = −mym), for the right amount of oxygen supply to the patients. The effectiveness of the proposed controller is further enhanced by incorporating the set-point modulated scheme with fuzzy PI gain adjustment [28,29].

4.2.2. Proposed Scheme (SFPIMRAC)

The final control output u, as shown in Figure 11, is derived as the product of control output (θ) and dynamic set-point ŕ
u = r × θ
But the dynamic set point
r = r e
In the above Equations (26) and (27), the original set-point and error variables are symbolically represented as ‘r’ and ‘e’, respectively. The consequence of the new dynamic set-point on the proposed system is tabulated in Table 6.
From Equations (25) and (26), it is seen that due to the dynamic variation of the inputs (e, Δe) of fuzzy PI, the adaptation gain (m) and final control output (u) are also altered accordingly [28,29]. As the reference set-point (r) is a fixed value, the dynamic set-point (ŕ) is modulated only by the temporary increase or decrease in the process error (e). This mechanism of set-point variation is used to boost the system’s performance. It is seen from Table 6 that if the error is zero (steady-state condition), there is no variation in the dynamic set-point because ŕ = r. In cases of undershooting or at the beginning, when the process variable tries to catch the set-point, the error is positive during that period, which indicates that the system needs more oxygen supply, which can be conducted by increasing the set-point ( r = r + e ), which in turn increases the control output ( u = r × θ ).With the same principle, in the case of overshooting, the error is negative, and that helps to decrease the control output.

5. Results and Discussion

The effectiveness of the proposed controller (SFPIMRAC) is investigated to control oxygen supply to respiratory distress patients. The proposed simulation work is demonstrated using a software tool (MATLAB R2009/SIMULINK) with the following reference (TRM) and process model (TPM).
Reference   Model :   T R M = 1 S 2 + 2.5 S + 1 Process   Model :   T P M = T F M × T F B O 2
As far as patient conditions are concerned, the requirement for oxygen concentration varies from patient to patient, from mild to severe. The SpO2 reading in the oximeter varies depending on the severity of the infection of the respiratory tract, and the reading in severe respiratory distress patients falls below 90%. In this context, to show the effectiveness of the proposed controller, two set points (90% and 95%) are pondered in this study.
The open-loop step excitation response for both the normal respiratory model and the infected respiratory model is investigated in Figure 13. It is realized that in the case of the developed model, the response never reached the desired level without any control action.
The choice of a proper time constant for a process is a difficult task. A comparative study of the different time constants in terms of the RC value of the oxygen cylinder model is highlighted in Figure 14. The study reveals that at a time constant value of 0.50 s, the developed respiratory model performs better compared to other values.
Moreover, the performance of MRAC with different adaptive gains (γ1) is investigated in the developed model. The adaptive gain in MRAC and its consequent effects are observed in Figure 15.
A change in adaptation gain in MRAC makes the system highly oscillatory; as a result, it fails to reach the desired value quickly, which could be lethal for respiratory distress patients. Sometimes an excess supply of oxygen may create an unhealthy situation. The exact adjustment of adaptation gain in MRAC is a crucial problem, whereas in the SFPIMRAC, there is no need for any human intervention to control the oxygen concentration properly for the respiratory distress patient. The responses for conventional PID, MRAC, and SFPIMRAC are compared. The analysis of Figure 16 (set point 95% SpO2) and Figure 16a (set point 90% SpO2) reveals that the proposed SFPIMRAC is far more suitable than MRAC and conventional PID in severe respiratory distress patients. The variations in oximeter readings (% SpO2) did not impact the proposed controller performance divulged in Figure 16 and Figure 17. The model’s performance with variations in the set point (oximeter reading) and time delay are also depicted in Figure 18 and Figure 19. A PID controller is not suggested here, as over-concentration of oxygen can be lethal to patients considered here. The SFPIMRAC response is better than the MRAC response in terms of faster response, low settling time, and no overshoot, which is the most desirable condition in respiratory distress treatment.
The parameters of the human respiratory system model may change depending on the types of obstructive and restrictive lung diseases. The effectiveness of the proposed controller is tested with model parameter variations successfully with minimum deviations in responses. The original gas exchange model (TFBO2) is expressed in Equation (15):
TF BO 2 = 20 s 2 + 200 s + 62 s 3 + 110 s 2 + 350 s + 67 .
The responses of three different models (model1, model2, and model3) are shown with slight parameter variations in Equation (15), as observed in Figure 18 for a reference value of 95%SpO2. The convincingness of the proposed controller is further established even with human respiratory model parameter variations in Figure 18.
TF BO 2 ( model   1 ) = ( 10 s 2 + 300 s + 62 ) / ( s 3 + 110 s 2 + 350 s + 67 )
TF BO 2 ( model   2 ) = ( 20 s 2 + 400 s + 62 ) / ( s 3 + 110 s 2 + 350 s + 67 )
TF BO 2 ( model   3 ) = ( 20 s 2 + 400 s + 52 ) / ( s 3 + 110 s 2 + 350 s + 67 )

5.1. SFPIMRAC Response with Time Delay at Input and Set-Point/Load Variations

The effects of time delay and set-point/load variations at the input of the process (respiratory model of a severe patient, TPM) are observed in Figure 19 and Figure 20, respectively.
Figure 19 revealed that a time delay in patients’ treatment is not a good idea, though the proposed controller streamlines the flow within a few seconds. During treatment, if the SpO2 level falls below the desired value (suppose 95% to 80% for 20 s, as shown in Figure 20) for any unwanted reason, the proposed controller can deliver the required oxygen again immediately without any human intervention, even with the presence of a time delay.

5.2. SFPIMRAC Response with Atime Delay between Two Models and Set-Point/Load Variation

Figure 21 depicts the proposed controller being tested with the concept of time delay (delay due to gas exchange in infected alveolar conditions) in between primary and secondary respiratory models. The typical time delay for human respiratory gas exchange is 0.75 s at rest (transport delay of 0.30 s for inspiration and 0.45 s for expiration), and during exercise, this value comes down to 0.25 s [10]. Given this different time delay in different conditions, the proposed controller is tested with 0.30 s, 0.50 s, and 0.70 s intermediate time delays. The proposed SFPIMRAC can counteract the gas exchange time variations and even load/set-point variation, as successfully shown in Figure 22.
The proposed controller model can be useful for other simulated and real-time processes. The real-time practical implementation of the developed controller was already demonstrated successfully on a laboratory-based overhead crane [Make: FEEDBACK, UK] for both position and swing control [29].
The control of load pendulation in an overhead crane is a very difficult task. The control strategy for the swing angle control of the overhead crane is implemented and shown in Figure 23 [29]. A comparative study of the set-point modulated fuzzy PD-based model reference adaptive controller (SFMRAC) with the other controllers for the overhead crane model to control swing angle is illustrated in Figure 24 [29].

6. Conclusions

An integrated mathematical model of the human respiratory system is presented in this paper for the treatment of a critical patient suffering from respiratory distress. The consideration of inherent time delays caused by the gas exchange between alveolar air space, lung tissue, and capillary blood cells added a new dimension to this study. The efficacy of the mathematical model is verified with model parameter variations, set point changes, inserting different time delays, and stability analysis. The whole study was performed in a MATLAB Simulink environment, and we performed a spirometry test in the laboratory for future studies. The human respiratory system itself exhibits the properties of regulatory control. However, this inherent regulation of the respiratory system sometimes fails due to the attack of various viruses. One of the most popular treatments for patients with lung infections is oxygen support. In this paper, for the proper regulation of external oxygen, a new control strategy is proposed based on the model reference adaptive controller. However, the effective control by MRAC purely depends on the adjustment of the adaptive gain factor. To remove this inherent problem of gain adjustment, a fuzzy knowledge-based system is initiated for the dynamic change of adaptive gain that varies with variations of respiratory system parameters. Two useful concepts are combined to improve controller design: one is a fuzzy-based MRAC scheme, and the other is a dynamic variation of the set-point that is used to automatically track variations in the process parameter. The proposed controller, SFPIMRAC, is tested on different respiratory conditions effectively, and its performance is judged with various time delays and also with load changes. All these advantages of the proposed controller make it suitable for the supplement of oxygen to respiratory distress patients suffering from acute breathing problems. In this context, it is very difficult to conclude about the effectiveness of oxygen therapy and control, but surely it can be used as a supportive treatment. Although respiratory distress of the respiratory system appears to be a complex disease, this research provides some promising avenues for future research.

Author Contributions

All authors have equally contributed in terms of conceptualization, methodology, software, validation, formal analysis, resource, writing and reviewing, and visualization. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Papadopoulos, N.G.; Skevaki, C.L. Viruses of the Lung. Encycl. Respir. Med. 2006, 483–488. [Google Scholar] [CrossRef]
  2. Ranieri, V.M.; Rubenfeld, G.D.; Thompson, B.T.; Ferguson, N.D.; Caldwell, E.; Fan, E.; Camporota, L.; Slutsky, A.S. ARDS Definition Task Force. Acute respiratory distress syndrome: The Berlin Definition. JAMA 2020, 307, 2526–2533. [Google Scholar]
  3. WHO Guideline. Technical Specifications for Oxygen Concentrator; WHO: Geneva, Switzerland, 2015; pp. 1–68. [Google Scholar]
  4. Sul, B.; Oppito, Z.; Jayasekera, S.; Vanger, B.; Zeller, A.; Morris, M.; Ruppert, K.; Altes, T.; Rakesh, V.; Day, S.; et al. Assessing airflow sensitivity to healthy and diseased lung conditions in a computational fluid dynamics model validated in vitro. J. Biomech. Eng. 2018, 140, 1–49. [Google Scholar] [CrossRef] [Green Version]
  5. Devdatta, K.; Pratibha, V. Mathematical Modeling of Respiratory System: A Review. Indian J. Biomech. 2009, 56–60. [Google Scholar]
  6. Mehedi, I.M.; Shah, H.S.M.; Saggaf, U.M.; Al Mansouri, R.; Bettayeb, M. Fuzzy PID Control for Respiratory Systems. Hindawi J. Healthc. Eng. 2021, 2021, 1–6. [Google Scholar] [CrossRef] [PubMed]
  7. Hansen, E.F.; Bech, C.S.; Vestbo, J.; Andersen, O.; Kofod, L.M. Automatic oxygen titration with O2matic® to patients admitted with COVID-19 and hypoxemic respiratory failure. Eur. Clin. Respir. J. 2020, 7, 3695. [Google Scholar] [CrossRef]
  8. Ghafarian, P.; Jamaati, H.; Hashemian, S.M. A Review on Human Respiratory Modeling. Tanaffos 2016, 15, 61–69. [Google Scholar]
  9. Sarkar, S.; Bhattacharyya, P.; Mitra, M.; Pal, S. A novel approach towards non-obstructive detection and classification of COPD using ECG derived respiration. Australas. Phys. Eng. Sci. Med. 2019, 42, 1011–1024. [Google Scholar] [CrossRef]
  10. Reynolds, A.; Ermentrout, G.B.; Clermont, G. A mathematical model of pulmonary gas exchange under inflammatory stress. J. Theor. Biol. 2010, 264, 161–173. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  11. Axel, R.; Jörn, K.; Knut, M. Predicting eTCO2 response in a model of ventilation-perfusion mismatch. Biomed. Tech. 2013, 58. [Google Scholar] [CrossRef]
  12. Tehrani, F.T. Mathematical model of the human respiratory system in chronic obstructive pulmonary disease. Healthc. Technol. Lett. 2020, 7, 139–145. [Google Scholar] [CrossRef]
  13. Trusov, P.V.; Zaitseva, N.V.; Tsinker, M.Y. A Mathematical Model of the Human Respiratory System Considering Environmental Influence. In Proceedings of the 28th Russian Conference on Mathematical Modeling in Natural Sciences, Perm, Russia, 2–5 October 2019. [Google Scholar] [CrossRef]
  14. Tehrani, F.T. Computerized decision support for differential lung ventilation. Healthc. Technol. Lett. 2019, 6, 37–41. [Google Scholar] [CrossRef] [PubMed]
  15. Milhorn, H.T.; Benton, R.; Ross, R.; Guyton, A.C. A mathematical model of the human respiratory control system. Biophys. J. 1965, 5, 27–46. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  16. Lin, S.L.; Guo, N.R.; Chiu, C.C. Modeling and simulation of respiratory control with Lab View. J. Med. Biol. Eng. 2012, 32, 51–60. [Google Scholar] [CrossRef]
  17. Lutchen, K.R.; Costa, K.D. Physiological interpretations based on lumped element models fit respiratory impedance data: Use of forward-inverse modeling. IEEE Trans. Biomed. Eng. 1990, 37, 1076–1085. [Google Scholar] [CrossRef]
  18. Wall, W.A.; Wiechert, L.; Comerford, A.; Rausch, S. Towards a comprehensive computational model for the respiratory system. Int. J. Numer. Methods Biomed. Eng. 2010, 26, 807–827. [Google Scholar] [CrossRef]
  19. Axel, R.; Jörn, K.; Knut, M. Hierarchical structure of human gas exchange models to improve parameter identification. In Proceedings of the 2013 ICME International Conference on Complex Medical Engineering, Beijing, China, 25–28 May 2013; pp. 103–108. [Google Scholar]
  20. Martin, S.; Maury, B. Modeling of the oxygen transfers in the respiratory process. ESAIM: Mathematical Modeling and Numerical Analysis. EDP Sci. 2013, 47, 935–960. [Google Scholar]
  21. Xu, L.; Fu, M. Computer Modeling of Interactions of an Electric Motor, Circulatory System, and Rotary Blood Pump. ASAIO J. 2000, 46, 604–611. [Google Scholar] [CrossRef] [PubMed]
  22. Martin, J.C.; Donald, I.; Russell, L.; Mussivand, T. Development of a Mathematical Model of the Human Circulatory System. Ann. Biomed. Eng. 2006, 34, 1400–1413. [Google Scholar]
  23. Shekhar, A.; Sharma, A. Review of Model Reference Adaptive Controller. In Proceedings of the 2018 International Conference on Information, Communication, Engineering and Technology (ICICET), Pune, India, 29–31 August 2018; pp. 1–15. [Google Scholar]
  24. Tudu, B.; Metla, A.; Das, B.; Bhattacharyya, N.; Jana, A.; Ghosh, D.; Bandyopadhyay, R. Towards versatile electronic nose pattern classifier for black tea quality evaluation: An incremental fuzzy approach. IEEE Trans. Instrum. Meas. 2009, 58, 3069–3078. [Google Scholar] [CrossRef]
  25. Ghozlane, W.; Knani, J. Model Reference Adaptive Control Design for Nonlinear Plants. Int. J. Adv. Comput. Sci. Appl. 2019, 10, 116–124. [Google Scholar] [CrossRef] [Green Version]
  26. Mushiri, T.; Mahachil, A.; Mbohwa, C. A Model Reference Adaptive Control (MRAC) System for the Pneumatic Valve of the Bottle Washer in Beverages using Simulink. In Proceedings of the International Conference on Sustainable Materials Processing and Manufacturing, Kruger, South Africa, 23–25 January 2017; pp. 364–373. [Google Scholar]
  27. Bożena, M.-M.; Dariusz, M.; Stanisław, K. Processing of crisp and fuzzy measures in the fuzzy data warehouse for global natural resources. In International Conference on Industrial, Engineering and Other Applications of Applied Intelligent Systems; Springer: Berlin/Heidelberg, Germany, 2010; pp. 616–625. [Google Scholar]
  28. Pal, A.K.; Indrajit, N.; Sampa, P. A Fuzzy-Based Modified Gain Adaptive Scheme for Model Reference Adaptive Control. In Information and Decision Sciences, Advances in Intelligent Systems and Computing; Springer: Singapopre, 2018; Volume 701, pp. 315–324. [Google Scholar]
  29. Pal, A.K.; Indrajit, N.; Sampa, P. Fuzzy-based Gain Adaptive Scheme for Set-Point Modulated Model Reference Adaptive Controller. Int. J. Nat. Comput. Res. 2018, 7, 1–19. [Google Scholar] [CrossRef]
  30. Pal, A.K.; Indrajit, N.; Sampa, P.; Chakraborty, J. Auto adaptive fuzzy controllers with automatic set-point adjustment. In Intelligent Electrical Systems: A Step towards Smarter Earth; CRC Press: Boca Raton, FL, USA; Taylor & Francis Group: Abingdon, UK, 2020; pp. 181–189. [Google Scholar]
  31. Andreu-Perez, J.; Cao, F.; Hagras, H.; Yang, G.Z. A self-adaptive online brain–machine interface of a humanoid robot through a general type-2 fuzzy inference system. IEEE Trans. Fuzzy Syst. 2016, 26, 101–116. [Google Scholar] [CrossRef] [Green Version]
  32. Ravì, D.; Wong, C.; Deligianni, F.; Berthelot, M.; Andreu-Perez, J.; Lo, B. Deep learning for health informatics. IEEE J. Biomed. Health Inform. 2016, 21, 4–21. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  33. Naskar, I.; Pal, A.K. Self Adaptive Fuzzy Controller for Supplementary Oxygen Supply to the Respiratory Distress Patients. J. Sci. Res. 2022, 14, 843–860. [Google Scholar] [CrossRef]
Figure 1. Basic block diagram of the proposed model.
Figure 1. Basic block diagram of the proposed model.
Diagnostics 13 00967 g001
Figure 2. Oxygen supply system near to patient side.
Figure 2. Oxygen supply system near to patient side.
Diagnostics 13 00967 g002
Figure 3. Oxygen cylinder model with input–output.
Figure 3. Oxygen cylinder model with input–output.
Diagnostics 13 00967 g003
Figure 4. Equivalent electrical R, L, and C model of the human respiratory system.
Figure 4. Equivalent electrical R, L, and C model of the human respiratory system.
Diagnostics 13 00967 g004
Figure 5. Schematic representation of the simple oxygen exchange model.
Figure 5. Schematic representation of the simple oxygen exchange model.
Diagnostics 13 00967 g005
Figure 6. Electrical equivalent circuit diagram of the gas exchange model.
Figure 6. Electrical equivalent circuit diagram of the gas exchange model.
Diagnostics 13 00967 g006
Figure 7. Stability analysis of the proposed model.
Figure 7. Stability analysis of the proposed model.
Diagnostics 13 00967 g007
Figure 8. MRAC model to control oxygen concentration for acute respiratory distress patients.
Figure 8. MRAC model to control oxygen concentration for acute respiratory distress patients.
Diagnostics 13 00967 g008
Figure 9. Proposed SFPIMRAC model.
Figure 9. Proposed SFPIMRAC model.
Diagnostics 13 00967 g009
Figure 10. MFs for e and Δe.
Figure 10. MFs for e and Δe.
Diagnostics 13 00967 g010
Figure 11. MFs for adaptation gain (m).
Figure 11. MFs for adaptation gain (m).
Diagnostics 13 00967 g011
Figure 12. The control surface of fuzzy PI (e, Δe vs.m).
Figure 12. The control surface of fuzzy PI (e, Δe vs.m).
Diagnostics 13 00967 g012
Figure 13. Comparative study of healthy and infected patient with step input at 95%.
Figure 13. Comparative study of healthy and infected patient with step input at 95%.
Diagnostics 13 00967 g013
Figure 14. Comparative studies of different time constants of oxygen cylinder model with the proposed controller.
Figure 14. Comparative studies of different time constants of oxygen cylinder model with the proposed controller.
Diagnostics 13 00967 g014
Figure 15. Responses with MRAC for set-point at 95% SpO2.
Figure 15. Responses with MRAC for set-point at 95% SpO2.
Diagnostics 13 00967 g015
Figure 16. Comparative studies between PID, MRAC, and SFPIMRAC with set-point at 95% SpO2.
Figure 16. Comparative studies between PID, MRAC, and SFPIMRAC with set-point at 95% SpO2.
Diagnostics 13 00967 g016
Figure 17. Comparative studies between PID, MRAC, and SFPIMRAC with set-point at 90% SpO2.
Figure 17. Comparative studies between PID, MRAC, and SFPIMRAC with set-point at 90% SpO2.
Diagnostics 13 00967 g017
Figure 18. Process responses with SFPIMRAC for model parameters variations.
Figure 18. Process responses with SFPIMRAC for model parameters variations.
Diagnostics 13 00967 g018
Figure 19. Process responses with SFPIMRAC with different time delay.
Figure 19. Process responses with SFPIMRAC with different time delay.
Diagnostics 13 00967 g019
Figure 20. Process responses with SFPIMRAC for time delay and load/set-point variations.
Figure 20. Process responses with SFPIMRAC for time delay and load/set-point variations.
Diagnostics 13 00967 g020
Figure 21. Response with SFPIMRAC for transport delay and load/set-point variations.
Figure 21. Response with SFPIMRAC for transport delay and load/set-point variations.
Diagnostics 13 00967 g021
Figure 22. Simulink model of SFPIMRAC with transport delay in between respiratory model and gas exchange model.
Figure 22. Simulink model of SFPIMRAC with transport delay in between respiratory model and gas exchange model.
Diagnostics 13 00967 g022
Figure 23. Design of SFMRAC for swing angle control in MATLAB Simulink.
Figure 23. Design of SFMRAC for swing angle control in MATLAB Simulink.
Diagnostics 13 00967 g023
Figure 24. Performance response with PD, MRAC, FPDC, and SFMRAC in swing angle control.
Figure 24. Performance response with PD, MRAC, FPDC, and SFMRAC in swing angle control.
Diagnostics 13 00967 g024
Table 1. Geometrical dimensions of the morphological model of the respiratory system.
Table 1. Geometrical dimensions of the morphological model of the respiratory system.
Generation NumberNumber of Airways
Per
Generation
Airways
Diameter
in cm
Length
in cm
Total
Airways Area
in cm2
Avg. Air Flow
Velocity in cm/s
Resistance
in cm of H2O/L ltr./s
Calculated
Using Formula
Inertance
in cm of H2O/L/s2
Calculated
Using Formula
Compliance
in ltr./cm of H2O
Calculated
Using Formula
zn(z)d = 2rlsu8 μL/πr4 ρ L/sls/ ρ n(z)u2
011.8122.541970.00860.00590.06311
121.224.762.332150.0080.00250.0964
240.831.92.132360.00750.00110.0145
380.560.7622510.00720.00040.0024
4160.451.272.482020.01450.00060.0038
5320.351.073.111610.01670.00040.0032
6640.280.93.961260.01720.00020.0028
71280.230.765.1980.01590.00010.0025
82560.1860.646.95720.01570.00010.0026
95120.1540.549.56520.01417.03 × 10−50.0029
1010240.130.4613.4370.01184.27 × 10−50.0035
1120480.1090.3919.6260.01012.48 × 10−50.0044
1240960.0950.3328.8170.00741.43 × 10−50.0064
1381920.0820.2744.5110.00547.55 × 10−60.0097
1416,3840.0740.1669.47.20.00242.87 × 10−60.0105
1532,7680.050.131174.30.00481.41 × 10−60.0206
1665,5360.0490.112252.20.00226.19 × 10−70.0638
17131,0720.040.093001.70.0023.86 × 10−70.0591
18262,1440.0380.085430.920.00111.90 × 10−70.1632
19524,2880.0360.079780.510.00058.91 × 10−80.4034
201,048,5760.0340.0717400.290.00035.01 × 10−81.1099
212,097,1520.0310.0727300.180.00023.19 × 10−82.26
224,194,3040.0290.6750700.990.00161.64 × 10−70.664
238,388,6080.0250.0775300.660.00011.24 × 10−80.1241
Table 2. R, L, and C values.
Table 2. R, L, and C values.
Different Section of Human
Respiratory System
R
H2O/ltr/s
L
H2O/ltr/s2
C
ltr/cm of H2O
RCLC
NASAL CAVITY16.3327000.02000000000.13202.1560000.00270000000
TRACHEA0.0860000.00590000000.06310.0054000.00037000000
BRONCHI0.0087000.00029290000.04610.0004020.00001440000
ALVEOLI0.0005500.00000006471.03960.0005710.00000006720
Table 3. Parameters values of the gas exchange model.
Table 3. Parameters values of the gas exchange model.
ParametersAlveolar AirTissueCapillary Blood
Volume (L)VA = 1.9 × 10−7VT = 4.2 × 10−8VB = 7.5 × 10−9
Molar concentration (M/mm)σA = 2.5 × 10−5σA = 1.2 × 10−6σB = 1.2 × 10−6
Diffusion rate (L/s)DTA = 2.4 × 10−12DTA = (6.7 – 10) × 10−12
Table 4. Rules for computing fuzzy output.
Table 4. Rules for computing fuzzy output.
e/ΔeNBNMZEPMPB
NBNBNBNBNMZE
NMNBNBNMZEPM
ZENBNMZEPMPB
PMPMPMPMPBPB
PBPMPMPBPBPB
Table 5. Study of control surface (Figure 12).
Table 5. Study of control surface (Figure 12).
e = (y − ym)ΔemOutput (θ = −mym)
+ve (high); y > ym+ve (high)+ve (high)−ve/ need to decrease
oxygen flow as y > ym
0; y = ym00No change in oxygen flow,
maintain the same flow
−ve (high); y < ym−ve (high)−ve (high)+ve/ need to increase
oxygen flow as y < ym
Table 6. Mathematical representation of set-point variations.
Table 6. Mathematical representation of set-point variations.
er’ = r + eRemarks
+ver’→+ver’ > r
−ver’→+vee < r and r’ < r
zeror’ = rr’ = r
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Naskar, I.; Pal, A.K.; Jana, N.K. Self-Regulating Adaptive Controller for Oxygen Support to Severe Respiratory Distress Patients and Human Respiratory System Modeling. Diagnostics 2023, 13, 967. https://doi.org/10.3390/diagnostics13050967

AMA Style

Naskar I, Pal AK, Jana NK. Self-Regulating Adaptive Controller for Oxygen Support to Severe Respiratory Distress Patients and Human Respiratory System Modeling. Diagnostics. 2023; 13(5):967. https://doi.org/10.3390/diagnostics13050967

Chicago/Turabian Style

Naskar, Indrajit, Arabinda Kumar Pal, and Nandan Kumar Jana. 2023. "Self-Regulating Adaptive Controller for Oxygen Support to Severe Respiratory Distress Patients and Human Respiratory System Modeling" Diagnostics 13, no. 5: 967. https://doi.org/10.3390/diagnostics13050967

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop