Parameter estimation of an artificial respiratory system under mechanical ventilation following a noisy regime

Introduction: This work concerns the assessment of a novel system for mechanical ventilation and a parameter estimation method in a bench test. The tested system was based on a commercial mechanical ventilator and a personal computer. A computational routine was developed do drive the mechanical ventilator and a parameter estimation method was utilized to estimate positive end-expiratory pressure, resistance and compliance of the artificial respiratory system. Methods: The computational routine was responsible for establishing connections between devices and controlling them. Parameters such as tidal volume, respiratory rate and others can be set for standard and noisy ventilation regimes. Ventilation tests were performed directly varying parameters in the system. Readings from a calibrated measuring device were the basis for analysis. Adopting a first-order linear model, the parameters could be estimated and the outcomes statistically analysed. Results: Data acquisition was effective in terms of sample frequency and low noise content. After filtering, cycle detection and estimation took place. Statistics of median, mean and standard deviation were calculated, showing consistent matching with adjusted values. Changes in positive end-expiratory pressure statistically imply changes in compliance, but not the opposite. Conclusion: The developed system was satisfactory in terms of clinical parameters. Statistics exhibited consistent relations between adjusted and estimated values, besides precision of the measurements. The system is expected to be used in animals, with a view to better understand the benefits of noisy ventilation, by evaluating the estimated parameters and performing cross relations among blood gas, ultrasonography and electrical impedance tomography.


Introduction
This work concerns the assessment of a novel system for mechanical ventilation and a parameter estimation method in a bench test.The tested system was based on a commercial mechanical ventilator and an embedded platform utilizing a digital processing unit, which in the present case is a personal computer in view of its capability for developing software routines.A computational routine was developed to drive the mechanical ventilator in variable volume and variable pressure controlled ventilation regime, henceforth referred to noisy ventilation.The parameter estimation method was utilized to estimate parameters of positive end-expiratory pressure (PEEP), resistance and compliance of an artificial respiratory system comprised of a mechanical lung simulator and artificial airways (Victor, 2014).
During acute respiratory failure, intubation and invasive mechanical ventilation may be life saving procedures (Moerer, 2013).The general aim of mechanical ventilation is to provide adequate gas exchange support, while not damaging the respiratory system.This technique is one of the most important life support tools in the intensive care unit (ICU).However, it may also be harmful by causing ventilator induced lung injury (VILI) (Kuchnicka and Maciejewski, 2013) and other undesirable effects (Cordioli et al., 2013).
There is a growing interest in the development (Beda et al., 2010;Fernández et al., 2013;Mesić et al., 2003) and use of variable mechanical ventilation (Gama de Abreu et al., 2008;Spieth et al., 2009a;2009b;Suki et al., 2002) performing variable volume and variable pressure controlled ventilation.This technique can improve lung functions and reduce lung damage in experimental acute lung injury (ALI) models, when compared to standard mechanical ventilation.Moreover, variable tidal volume ventilation would improve lung mechanics and gas exchanges (Spieth et al., 2011).
Online estimation of respiratory system mechanics (Albanese et al., 2013;Mulqueeny et al., 2010) at the bedside is a diagnostic tool to follow the mechanical conditions of the mechanically ventilated patients in the ICU.Different methods have been developed to calculate the volume-dependent dynamic compliance, which may provide information to identify overdistension and recruitment without the need of obtaining the static pressure-volume curve (Zhao et al., 2012).Most of these methods are based on the linear first-order equation of motion (Carvalho and Zin, 2011;Diong et al., 2007).Linear respiratory system models, in which the respiratory system is represented by linear elements, have been used in frequency analysis and evaluated in the literature (Saatçi and Akan, 2008).
The importance of characterizing biomechanical properties includes the study of pulmonary physiology.
Pulmonary function testing provides global information about lung function and depends on age, gender, and body habitus to interpret the normalcy of respiratory parameters from a patient.The results of this study should also be related with image data from lungs.The effects of certain lung pathologies include alterations in lung physiology negatively affecting pulmonary compliance.Current approaches to diagnosis and treatment assessment of lung disease commonly rely on pulmonary function testing.Such testing is limited to global measures of lung function, neglecting regional measurements, which are critical for early diagnosis and localization of disease (Tustison et al., 2011).
In order to implement noisy ventilation regime, firstly, the mechanical ventilator was chosen and the computational routine was built.Once both components were properly working, there was a need to assess the whole developed system.The bench test was intended to evaluate the system, because some related physical quantities can be controlled.A calibrated measuring device was coupled to the system to improve the reliability of the measurements.The assessment of the parameter estimation method was carried out based on the collected data by the measuring device.The outcomes were compared with respective adjusted data which were directly set in each component of the artificial respiratory system as well as statistics of each estimation were analysed.

Methods
This section describes how utilized hardware and software were organized and implemented to work in an integrated manner.The main setup consisted of a mechanical ventilator and a personal computer implementing the routine responsible for the noisy regime.The data were collected and analysed in the computer.For testing the proper operation, a mechanical lung simulator and a measuring device were utilized.

Development of the noisy ventilation routine
The implemented routine was responsible for: i. Establishing bidirectional connection between the personal computer and the other two devices: the mechanical ventilator and the measuring device; ii. Sending commands to the mechanical ventilator; iii.Reading parameters from the mechanical ventilator and the measuring device; iv.Calculating sequences of volume or pressure following a skew normal distribution; v. Calculating period, for each generated volume or pressure.
Figure 1 shows the overview of the experimental setup.Through a serial port, connection was established between the mechanical ventilator, the measuring device and the personal computer.The computer screen provides the option of selecting between standard and noisy ventilation, both of which run volume controlled ventilation (VCV) or pressure controlled ventilation (PCV).Although the user can choose between these two modes of ventilation, this article only discusses VCV, because the research team decided to investigate VCV firstly.
For standard ventilation, the user can choose the value of tidal volume (V T ) in millilitres [mL] and flow in litters per minute [L/min].After this, it is possible to start standard ventilation using the developed routine.Once the user sets the initial standard ventilation mode, it is possible to set the noisy ventilation mode.Its choice implies the adjustment of six parameters: mean (µ); variability (σ); shape (α); low (V low ) and high (V high ) cut off volumes and number of sequence elements (N).Where mean is the target V T in mL; variability is the percentage value of the mean and indicates the standard deviation (SD) for the sequence to be generated; shape is a parameter associated with the skewness of the skew normal distribution; low and high cut off volumes are the safety values within which the volumes must remain and N is the number of elements to be generated.
Besides safety boundaries for volume, there is a boundary for pressure.The upper boundary was limited to 35 cmH 2 O, directly applied to the mechanical ventilator.Parameters such as inspiratory and expiratory lengths can also be adjusted directly on the mechanical ventilator.
Once the sequence of tidal volumes is generated, the corresponding periods are calculated adopting constant flow.The constant flow is based on the mean V T and the target respiratory rate (RR).Finally, these two values, namely volume and period, are sent to the mechanical ventilator for execution.So, at each respiratory cycle, the variability is imposed through the variation of V T and RR, all other ventilation factors remain constant.
One cycle later, the mechanical ventilator returns readings of actual performed tidal volume, airflow and pressure to the personal computer.Simultaneously, the measuring device sends the same readings to the personal computer as well as the volume curve, by integrating the airflow curve.Both devices constantly monitor these physical quantities, through airways.

Ventilation tests
The experiments were based on a mechanical lung simulator coupled with the developed system.It was possible to directly adjust the compliance of the mechanical lung simulator, by moving a selector on a scale.The bench tests were conducted with V T set as 300, 400 and 500 mL.For each value of V T , the following protocol was performed: i. Compliance was initially adjusted to 40 mL/cmH 2 O; ii.
Step changes in PEEP were adjusted to: 0, 5, 10 and 15 cmH 2 O, respectively; iii.Each of the four steps in PEEP was observed for at least fifteen minutes; iv.After the four values of PEEP, compliance was increased to 50 mL/cmH 2 O; v. Steps ii and iii were performed for increased compliance; vi.Finally, after the four values of PEEP, compliance was increased to 60 mL/cmH 2 O; vii.Steps ii and iii were repeated to the last value of adjusted compliance.

Data acquisition
Although data were collected from both devices -mechanical ventilator and measuring device -, only the data from measuring device were used for evaluating the system, because it is a calibrated device.
Every 6 milliseconds -sample frequency of 166.6 Hz -the values of airflow, pressure and volume were sent to the computer and stored in the memory for analysis.There was also a time tag for each group of these three values, which came from the internal clock of the personal computer running the routine.

Hardware and software
The proposed noisy ventilation regime was implemented and tested using a mechanical ventilator, provided by Magnamed  , model Oxymag  -emergency and transport pulmonary ventilator (Oxymag, 2015).The measuring device, provided also by Magnamed  , was model Ventmeter  -lung ventilator certification system (Ventmeter, 2015).The mechanical lung simulator, by Michigan Instruments  , was an adult mechanical lung simulator model 5601i (Michigan Instruments, 2015).The dedicated software used to develop the routine was Labview  , by National Instruments  and the utilized software to perform data analysis was Matlab  , by Mathworks  .

Filtering and cycle detection
Before starting the analysis, data should be filtered and split into breathing cycles.These tasks were performed utilizing a finite impulse response (FIR) filter and cycle detection, regarding the concepts of respiratory physiology.
A low pass filter (LPF) was designed to cut off noise.The FIR was chosen, because it has good properties such as phase linearity at pass band and stability, although a computational power is required.The Hamming window method was chosen at a high order filter.In this case, there was no problem with computational complexity as this resource is not short and all computational processing ran in a personal computer.
Cycle detection was carried out considering the data of airflow from the measuring device, after filtering.A detection algorithm was built, knowing that flow becomes positive during the inspiratory period.A threshold was established and all transitions which obey this relation means a new cycle mark.As there was noise from the airflow data, a robust algorithm was developed to deal with this condition.Knowing that a certain value of airflow is an actual inspiration, for instance 200 mL/s, the cycle detection moves backwards, searching for an instant in which the airflow can be considered zero.In the present case, a range of airflow within -10 and +10 mL/s was considered to be zero.Finally, finding that range, the cycle mark could be placed for each cycle throughout the whole data of airflow.

Modelling
The respiratory system can be modelled as a first-order linear model, as shown in Equation 1 (Carvalho and Zin, 2011;Diong et al., 2007).It is an ordinary differential equation whose time-dependent variables are P, V and V. iii.R is the resistance of the respiratory system [cmH 2 O.s/mL]; iv.C is the compliance of the respiratory system

Parameter estimation method
The equation error method (EEM) was used to provide the parameter estimation.This method is based on the principle of least squares (LS).The EEM minimises a quadratic cost function of the error in the equations.It is assumed that states, their derivatives and control inputs are available or accurately measured.The method is relatively fast and simple, and applicable to linear systems.For a system described by the state Equation 2, the equation error can be written as Equation 3.

[
] , (5) In this case, the cost function is given by Equation 6, Then, based on cost minimization and LS, the estimator is given as (Girija et al., 2004) ,   ( )

Application of EEM on model
Given Equations 1 and 5, they can be rearranged as follows, Combining Equations 7 and 10, ˆa A can be easily obtained utilizing matrix multiplication and stored data.In the end, the parameters of compliance, PEEP and resistance are calculated.

Statistics
In view to analyse precision and accuracy of adjusted and estimated parameters, statistical analysis was done.From the estimation, data were grouped in same adjusted compliance cycles and same adjusted PEEP cycles.For instance, for adjusted compliance equal to 40 cmH 2 O, statistics of median, mean and SD were calculated.The same procedure was adopted with adjusted compliance equal to 50 and 60 cmH 2 O and adjusted PEEP equal to 0, 5, 10 and 15 cmH 2 O. Further, for the whole period of the same compliance, each of the four subgroup -each one corresponding to one value of adjusted PEEP -were compared searching for statistical differences among them.Similar procedure was adopted within periods of the same PEEP, as there were three adjusted compliances for each adjusted PEEP.The aiming was to statistically investigate if changes in compliance imply changes in PEEP and vice versa, based on the outcomes from estimation.

Results
For the purpose of assessment, only one V T trial was needed.So, the showed results are about V T = 400 mL.

Filtering and cycle detection
Figure 2 shows a sample of data randomly chosen before and after filtering.The chosen filter was a 100-order FIR filter.To determine the cut off frequency, the spectrum was analysed as well as the curves in time domain.The cut off frequency of 5 Hz exhibited adequacy in terms of cut noise and keep the morphological characteristics of the signals.It can be seen that flow exhibits considerable noise at transitions, mostly at the end of inspiratory period.The pressure curve exhibits noise at the end of inspiratory period and at the beginning of expiratory period.The large amplitude of that noise, in part, can be explained by the nature of lung simulator.It is a set of springs and bellows, which can function as seen.Finally, the volume curve is the cleanest.It is obtained by the measuring device from an embedded integration of the airflow.As the integration process represents a natural LPF, the volume curve is naturally filtered.All curves proved sufficiently clean after filtering.
In Figure 3, the results from cycle detection can be seen.In fact, curves from Figures 2 and 3 are from the same randomly chosen cycles.The displayed peaks represent the beginning and the end of each cycle.

Parameter estimation
After detecting all cycles under study, parameters of compliance, PEEP and resistance can be estimated by applying Equations 7 and 10.The data from airflow, pressure and volume were the basis for the calculations.
Figure 2. Data of airflow, pressure and volume provided by the measuring device.Filtered data were overlapped with raw data to highly the differences between them before and after filtering.
Figure 4 shows the parameter estimation for the whole observed respiratory period, for tidal volume V T = 400 mL.

Statistics
Table 1 summarises statistics of median, mean and SD for the whole observed period.It is possible to compare adjusted values of compliance and PEEP with the statistics taken from their respective estimated values.
During the period which compliance was adjusted to 40 mL/cmH 2 O -roughly from cycle 1 to cycle 310, in Figure 4 -the respective four sub periods in which PEEP changed demonstrated different statistics, as was proved by analysis of variance (ANOVA) with p < 0.05.Similar outcomes were found during the periods of compliance 50 mL/cmH 2 O -from cycle 320 to cycle 520 -and compliance 60 mL/cmH 2 O -from cycle 530 to 710.Among the four steps of PEEP, for both compliance periods, ANOVA indicated that the means among the four sub periods are not equal (p < 0.05).These results suggest that changes in PEEP imply statistical changes in compliance, even though no additional mechanical adjust was performed in the system.
Analogous analysis was carried out for adjusted values of PEEP.For instance, for PEEP equal to 15 cmH 2 0, there were three different adjusted compliances: 40 mL/cmH 2 O -from cycle 160 to cycle 220 -, 50 mL/cmH 2 O -from cycle 420 to cycle 470 -and 60 mL/cmH 2 O -from cycle 620 to cycle 710.ANOVA indicated that the null hypothesis -equality among the three means -should not be rejected, with p < 0.05.Same outcomes -fail to reject the null  hypothesis -were obtained for adjusted PEEP equal to 0, 5 and 10 cmH 2 O.In contrast, these outcomes suggest that even with changes in compliance, adjusted value of PEEP remained stable, at least statistically and with a significance level of 0.05.

Discussion
The assessment of the parameter estimation method was based on the comparison between adjusted and estimated values as well as their statistics.
Table 1 shows that median and mean are very close to each other for the compliance values.As it is well known, median is a sample statistic which is more robust than mean (Barr et al., 2012), because mean is sensitive to outliers and median is not.The high number of data points benefits the robustness of estimated parameters.The low SD is an indicator of a fit relation between estimation method and number of sampled data.Also, the adjusted and estimated compliances are consistent with each other.
The resistance value was an effect of the forced mechanical ventilation, unlike the values of compliance and PEEP, which were adjusted.Figure 4 shows how it behaved throughout the experiment.Its median was 4.2, mean 4.2 and SD 0.4 [cmH 2 O.s/L].
The estimation of PEEP was the most precise between the three estimated parameters, which is shown in Figure 4 and Table 1 quantifies some statistics.As it was a directly imposed parameter by the mechanical ventilator, it is reasonable to expect a consistent estimation, once the mechanical ventilator provides adequate regulation and tracking of PEEP.
Other statistics outcomes showed that steps in PEEP imply statistical changes in compliance.It can be explained by the nature of the utilized lung simulator: a set of springs and bellows, which is not perfectly linear over a wide range.The adjusted PEEP translates the operational point of the spring-bellow system, as a result, the whole equivalent compliance changes.Interestingly, even though changes in compliance, the mechanical ventilator was capable of dealing with these changes and provided robust control of PEEP levels.More important than accuracy, precision was a very valuable quality of the system, once in an actual situation, respiratory parameters will not be adjusted -unless PEEP values -, but only observed.For instance, precision is important to indicate that the compliance of a patient is increasing or decreasing as well as be a tool to indicate equality or difference among splits of a respiratory period under study, as was done in the changes of compliance and PEEP throughout the experimental protocol as well as was studied with the aid of ANOVA tests.
As the data analysis was a high processor cost task, targeting an embedded and online usage, it will be necessary to find a good relation between acquired data and parameter estimation method, avoiding loss of precision and accuracy of estimated parameters.
The developed system comprised of a mechanical ventilator and a digital processing unit implementing the proposed noisy ventilation regime as well as the parameter estimation method was found to be satisfactory in terms of clinical parameters, in trials using an artificial lung.The assessment of the developed system was carried out using a calibrated measuring device and the changes in PEEP and compliance were analysed and compared with the estimation results, based on statistics.The system is expected to be used in vivo, initially in animals, with a view to better understand the benefits of noisy ventilation in patients, by evaluating the estimated parameters and performing cross relations between other results such as blood gas, ultrasonography and electrical impedance tomography.

Figure 1 .
Figure 1.Overview of the system.
is the total pressure [cmH 2 O]; ii.PEEP is the positive end-expiratory pressure [cmH 2 O];

Figure 3 .
Figure 3. Cycle detection over filtered data.To perform cycle detection filtered data of flow were taken.The bars indicate the beginning and the end of each cycle.

Figure 4 .
Figure 4. Parameter estimation of compliance, positive end-expiratory pressure (PEEP) and resistance.This overview translates the protocol of test.

Table 1 .
Statistics of median, mean and standard deviation (SD) about adjusted and estimated compliance and positive end-expiratory pressure (PEEP).