entropy Article Electromyography-Based Respiratory Onset Detection in COPD Patients on Non-Invasive Mechanical Ventilation Leonardo Sarlabous 1,2,3 , Luis Estrada 1,2,3 , Ana Cerezo-Hernández 4,5 , Sietske V. D. Leest 6, Abel Torres 1,2,3, Raimon Jané1,2,3 , Marieke Duiverman 5,7 and Ainara Garde 6,* 1Biomedical Signal Processing and Interpretation, Institute for Bioengineering of Catalonia (IBEC), The Barcelona Institute of Science and Technology (BIST), 08028 Barcelona, Spain; [email protected] (L.S.)
[email protected] (L.E.);
[email protected] (A.T.); [email protected] (R.J.) 2Department of Automatic Control (ESAII), Universitat Politècnica de Catalunya (UPC)—Barcelona Tech, 08028 Barcelona, Spain 3 Biomedical Research Networking Center in Bioengineering, Biomaterials and Nanomedicine (CIBER-BBN), 08028 Barcelona, Spain 4Department of Pulmonology, Rio Hortega University Hospital, 47012 Valladolid, Spain; anacerezo.bar[email protected] 5Department of Pulmonary Diseases/Home mechanical Ventilation, University of Groningen, University Medical Center Groningen, 9713 Groningen, The Netherlands; [email protected] 6 Biomedical Signals and Systems Group, Faculty of Electrical Engineering, Mathematics & Computer Science, University of Twente, 7500 Enschede, The Netherlands; [email protected] 7Groningen Research Institute of Asthma and COPD (GRIAC), University of Groningen, 9712 Groningen, The Netherlands *Correspondence: [email protected]; Tel.: +31-642-526-154 Received: 7 January 2019; Accepted: 28 February 2019; Published: 7 March 2019 Abstract: To optimize long-term nocturnal non-invasive ventilation in patients with chronic obstructive pulmonary disease, surface diaphragm electromyography (EMGdi) might be helpful to detect patient-ventilator asynchrony. However, visual analysis is labor-intensive and EMGdi is heavily corrupted by electrocardiographic (ECG) activity. Therefore, we developed an automatic method to detect inspiratory onset from EMGdi envelope using fixed sample entropy (fSE) and a dynamic threshold based on kernel density estimation (KDE). Moreover, we combined fSE with adaptive filtering techniques to reduce ECG interference and improve onset detection. The performance of EMGdi envelopes extracted by applying fSE and fSE with adaptive filtering was compared to the root mean square (RMS)-based envelope provided by the EMG acquisition device. Automatic onset detection accuracy, using these three envelopes, was evaluated through the root mean square error (RMSE) between the automatic and mean visual onsets (made by two observers). The fSE-based method provided lower RMSE, which was reduced from 298 ms to 264 ms when combined with adaptive filtering, compared to 301 ms provided by the RMS-based method. The RMSE was negatively correlated with the proposed EMGdi quality indices. Following further validation, fSE with KDE, combined with adaptive filtering when dealing with low quality EMGdi, indicates promise for detecting the neural onset of respiratory drive. Keywords: fixed sample entropy; adaptive filtering; root mean square; diaphragm electromyography; non-invasive mechanical ventilation; chronic obstructive pulmonary disease Entropy 2019,21, 258; doi:10.3390/e21030258 www.mdpi.com/journal/entropy
Entropy 2019,21, 258 2 of 15 1. Introduction Chronic obstructive pulmonary disease (COPD) is the fourth leading cause of death in the world [ 1 , 2 ]. Due to ageing of the population and continuation of risk factors, this problem will keep increasing in the coming decades. The disease is characterized by an airway obstruction leading to airflow limitation and, as a consequence, persisted respiratory symptoms such as dyspnea and production of sputum [ 1 ]. Patients with end-stage COPD frequently develop chronic hypercapnic respiratory failure, which is associated with end-of-life [ 3 ]. Long-term application of nocturnal intermittent non-invasive ventilation (NIV) in patients with chronic hypercapnic respiratory failure due to neuromuscular and thoracic restrictive disorders improves clinical outcomes and survival. However, this therapy has long been controversial in COPD patients [ 3 , 4 ]. With the introduction of high-intensity NIV, benefits of long-term NIV have been shown in stable COPD patients with chronic hypercapnic respiratory failure [ 3 , 5 , 6 ]. High-intensity NIV is defined as a mode of ventilation that delivers sufficient inspiratory positive airway pressure in combination with a higher backup breathing frequency to decrease arterial carbon dioxide levels. However, for some patients, adapting to high-intensity NIV is difficult and compliance rates in clinical practice are therefore sometimes disappointing. Furthermore, the response to NIV in terms of improvement in gas exchange and patient-centered outcomes such as improvement in health-related quality of life is variable between patients, despite the application of high-intensity NIV. A reason for a more prolonged adaption period, lower compliance rates and less effective ventilation might be the occurrence of patient-ventilator asynchrony with high-intensity NIV [7,8]. The surface diaphragm electromyography (EMGdi) signal provides a real-time indirect measure of neural respiratory drive, which reflects the load on the respiratory muscles [ 9 ]. Its non-invasive nature makes the method extremely useful during NIV; both to visually detect patient-ventilator asynchrony, and for repeated measurements [ 3 ]. However, for longer recordings, such as whole night recordings, visual inspection is burdensome and time-consuming. In addition, NIV is normally applied during sleep. Thus, there is a clear need to develop an automatic method to reliably detect the respiratory onset from EMGdi signal. This is crucial since the timing of respiratory effort versus the timing of the ventilator pressure wave determines the control of ventilation. Nevertheless, the EMGdi signal is heavily contaminated by electrocardiographic (ECG) activity, compromising inspiratory onset detection. A number of methods have been used to estimate the envelope of EMGdi and automatically identify inspiratory onset [ 10 – 13 ]. Traditionally, the EMGdi envelope has been estimated using the average rectified value or the root mean square (RMS) of EMGdi signal after suppressing all QRS complexes (ECG interference) [ 11 ]. Recently, fixed sample entropy (fSE) has proved to be a more robust technique to estimate the amplitude variation in respiratory EMGdi signals. In addition, fSE permits extracting the EMGdi envelope without requiring a prior removal of QRS complexes [ 12 , 13 ]. However, poor EMGdi signal quality or high ECG interference can reduce the robustness of fSE. The use of adaptive filters has also been proposed to remove ECG interference and then estimate EMGdi amplitude [ 10 ]. However, these methods have been evaluated separately and in different contexts. Therefore, there is a clear need to explore whether reducing ECG interference by adaptive filtering can improve EMGdi envelope estimation and consequently respiratory onset detection. In this study, we aim to compare the performance of previously proposed methods estimating EMGdi envelope and respiratory onset, to optimize the automatic detection of the onset of neural respiratory drive in COPD patients initiated on home NIV. First, to estimate EMGdi envelope, the use of fSE in combination with adaptive filtering was explored and compared to the RMS-based EMGdi envelope provided by the EMG acquisition device. Then, a dynamic threshold based on kernel density estimation (KDE), applied to the EMGdi envelopes, was proposed to detect the respiratory onset. The performance of the onset detection was validated using EMG-based visual scores completed by two well-trained clinicians.
Entropy 2019,21, 258 3 of 15 2. Dataset and Visual Scores 2.1. Study Population The clinical study was performed at the Department of Pulmonary Diseases of the University Medical Center Groningen (Groningen, The Netherlands). Nine patients with COPD initiated on home NIV in the hospital were included in this analysis. All patients participated in a randomized controlled trial of which investigating respiratory EMG and patient-ventilator asynchrony during NIV initiation was a secondary objective. Both studies, including the EMG measurements, were approved by the Ethical Committee Groningen (ClinicalTrials.gov NCT02652559 and NCT03053973). All patients gave written informed consent for participation in the trial and for the EMG measurements. Table 1 summarizes the characteristics and clinical data of the analyzed patients. Table 1. Characteristics and clinical data of the included COPD patients. Sex, female/male (n) 5/4 Age (years) 63 (58–72) BMI (kg/m2)25 (22–29) FEV1(L) 0.59 (0.52–0.75) FEV1(%pred) 20 (16–26) FVC (L) 2.22 (1.43–2.63) FVC (%pred) 53 (44–66) FEV1/FVC (%) 28 (23–33) TLC (L) 8.01 (6.82–9.22) TLC (%pred) 134 (116–156) RV (L) 5.29 (4.88–6.21) RV (%pred) 252 (215–267) RV/TLC (%) 66 (61–74) PaCO2before NIV initiation (kPa) 6.6 (6.2–8.9) PaO2before NIV initiation (kPa) 8.3 (5.9–9.4) BMI, body mass index; FEV 1 , postbronchodilator forced expiratory volume in 1 s in liters (L); FVC, forced vital capacity in liters (L); RV, residual volume; TLC, total lung capacity; %pred: percentage of the predicted values [ 14 , 15 ]; PaO 2 , arterial oxygen pressure at daytime without ventilation; PaCO 2 , arterial carbon dioxide pressure at daytime without ventilation; kPa, kilopascal; NIV, non-invasive ventilation. Characteristics are represented by their median and inter-quartile range. 2.2. Data Acquisition The EMGdi was measured in the COPD patients once they got used to sleeping with NIV during the night. In 7 patients nocturnal measurements were performed during the initiation period performed in the hospital after 2–5 nights NIV acclimatization and titration, and in 2 patients the EMG measurements were performed after a longer period of NIV used at home (in 1 patient a nocturnal measurement was performed after 6 months NIV use and in the other patient a daytime measurement was performed after more than 2 years NIV use). The EMGdi was measured using two 24 mm surface electrodes (Covidien Kendall Disposable Surface EMG/ECG/EKG Electrodes, Germany) placed bilaterally midclavicular at the costal margin. A common electrode was placed on the sternum. Moreover, a pressure sensor was placed between the mask and the ventilator to measure the pressure changes applied by the ventilator (DEMCON—Macawi Respiratory Systems BV, Enschede, The Netherlands). Both pressure and EMGdi signals were amplified and transferred to a laptop by the Dipha-16 ® (DEMCON—Macawi Respiratory Systems BV, Enschede, The Netherlands). Data were recorded using Polybench data-acquisition and processing package (Applied Biosignals GMBH, Weener, Germany), with a sample frequency of 500 Hz [3]. 2.3. Visual EMG Onset Detection The data was transferred to MATLAB (The Mathworks, Inc., vR2014a, Natick, MA, USA) in order to perform the visual analysis and automatic onset detection. EMGdi signals were filtered with a
Entropy 2019,21, 258 4 of 15 4th-order zero-phase Butterworth band-pass filter between 5 Hz and 400 Hz. Power line interference at 50 Hz and its harmonics were removed using a 10th-order zero-phase notch filters. For each patient, one hour of the EMGdi recording was selected. The EMGdi signals were visually evaluated separately by two physicians. The visual analysis included the onset annotations of every inspiration. A graphic user interface developed in MATLAB facilitated visually determining the onset points over the EMGdi signals (see Figure S1). The onset of diaphragm activity was selected as the point at which the surface EMGdi amplitude exceeds the value of basal expiratory activity. Respiratory cycles where the visual onset marks significantly differed between both experts (a difference greater than a specific tolerance value) were considered unreliable and removed from further analysis. The physicians, based on their clinical experience, set this tolerance value to 150 ms. When the visual onset marks were within the tolerance value, the mean of the two annotations was considered as the gold standard. This metric provides a more objective onset value that reduces the subjective judgments of single scorers, thus minimizing the imperfect nature of visual inspection scorers. 3. Data Analysis An adaptive filter was applied to remove the cardiac interference from the EMGdi and improve signal quality for respiratory onset detection. Three EMGdi envelopes were used to automatically estimate the respiratory onset: the envelopes estimated applying fSE to both EMGdi and adaptively filtered EMGdi signals, and the envelope provided by the EMG acquisition device, which is based on the RMS calculation of the QRS-removed EMGdi signal. The performance between each method and the visual scorer reference onset value was evaluated through the root mean square error (RMSE). This metric is indifferent to the direction of errors. Therefore, the difference between visual score and automatic onset detection was taken to evaluate premature or delayed onset detections. In addition, the relationship between the EMGdi signal quality indexes and RMSE was assessed using the Pearson correlation coefficient (R). A single average value of EMG signal quality indexes and RMSE for each patient was used to calculate the R values. p-values lower than 0.05 were considered significant. 3.1. Quantifying EMGdi Signal Quality The quality of EMGdi was evaluated by estimating the inspiratory activity increment with respect to basal expiratory activity, and the influence of the ECG interference [ 16 ]. The ratio between the mean power spectral density (PSD) of inspiratory segments without ECG and the mean PSD of expiratory segments without ECG (Rinex) was used as an expression of the increment of inspiratory EMGdi activity with respect to basal expiratory EMGdi activity. The higher the Rinex, the greater the difference between EMGdi inspiratory and expiratory segments. This ratio could be related to the ability of the automatic method to detect the inspiratory onset. In addition, the ratio between the mean PSD of inspiratory EMGdi segments without ECG and the mean PSD of expiratory EMGdi segments with ECG was used as an expression of the ECG interference over the EMGdi signals (Rcardio). The higher the Rcardio, the greater the difference between the amplitude of the ECG interference with respect to the inspiratory EMGdi. Figure 1depicts the different segments of EMGdi and the corresponding PSD. Inspiratory and expiratory EMGdi segments without ECG interference were selected, inside the inspiratory and expiratory cycle, respectively, as the EMGdi activity between the end of the T wave and the start of the P wave of the next beat. The ECG signal corresponds to a filtered EMGdi signal version between 0.5 Hz and 35 Hz with a zero-phase 4th order Butterworth filter. The PSD was calculated for each type of signal segment using the modified periodogram with a Hamming window and the discrete Fourier transform calculated with 4096 points, as described in reference [16].
Entropy 2019,21, 258 5 of 15 Entropy2019,21,xFORPEERREVIEW5of15 Figure1.(a)EMGdisignalsegmentsfromaCOPDpatientwithhighqualitysignalrecordedduring non‐invasiveventilationatnight.Inspiratorycyclesarerepresentingbydottedlineboxes.EMGdi inspiratoryandexpiratorysegmentswithoutECGinterference(solidmagentaandgreentraces, respectively),andECGinspiratoryandexpiratorysegments(solidredandcyantraces,respectively) arealsoshown.Solidbluetracesshownnotincludedsegments.(b)PSDcorrespondingtoECG inspiratoryandexpiratoryand(c)PSDcorrespondingtoEMGdiinspiratoryandexpiratoryphases. 3.2.AdaptiveFiltering Weimplementedanadaptivenoisecancelerbasedonevent‐synchronouscancellationto improvethequalityofEMGdisignalsbyreducingtheECGinterference.Theadaptivenoisecanceler schemeusedwaspreviouslyproposedbyreferences[17–19].TheEMGdisignalwasusedasthe primaryinputtoadaptivenoisecanceler.Thissignal,bandpassfilteredbetween2and40Hz,was usedtodetecttheQRScomplex.Thereferenceinput,uncorrelatedwiththeEMGdibutcorrelated withtheECGinterference,wasartificiallygeneratedaccordingtoreference[19].Thenumberof weightsofthelinearcombinerandtheadjustmentoradaptiveconstantoftheLeast‐Mean‐Square (LMS)algorithmweresetto10and10 −6 ,respectively.Thatconstantofadaptationminimizedthe energydifferencebetweentheoutputorcancellationsignalandthereferenceinputsignal.The EMGdi‐LMSsignalrepresentstheEMGdisignaladaptivelyfilteredusingtheLMSalgorithm(Figure 2(d1,d2)),andfSE‐EMGdi‐LMSrepresentstheenvelopeextractedwithfSE(Figure2(e1,e2)). 3.3.EMGdiEnvelopeEstimation 3.3.1.RMS‐BasedMethod TheEMGdienvelopeprovidedbytheEMGacquisitiondevicewasbasedontheRMSmethod (RMSp)proposedbyPrechtletal.[11].Thismethodremovestheelectricalheartactivityfromtheraw EMGdibymeansofthegatingtechnique.AswasdescribedbyPrechtl,theQRScomplexesare stretchedintoastandardQRSpulseandcutoutoftherawEMGdisignal.TheremainingEMGdi signalisaveragedwithamovingwindowandtheRMSiscalculated(Figure2(b1,b2))[11]. 3.3.2.FixedSampleEntropy Sampleentropy(SampEn)isameasureofirregularityusedtoanalyzeshortandnoisy physiologicaltimeseries[20,21].Itrepresentstheconditionalprobabilitythattwosequencesof patternsofmconsecutivesamples,whicharesimilartoeachotherwithinatolerancer,willremain similarwhenoneconsecutivesampleisadded(m+1).SampEnalgorithmimprovestheperformance Figure 1. ( a ) EMGdi signal segments from a COPD patient with high quality signal recorded during non-invasive ventilation at night. Inspiratory cycles are representing by dotted line boxes. EMGdi inspiratory and expiratory segments without ECG interference (solid magenta and green traces, respectively), and ECG inspiratory and expiratory segments (solid red and cyan traces, respectively) are also shown. Solid blue traces shown not included segments. ( b ) PSD corresponding to ECG inspiratory and expiratory and (c) PSD corresponding to EMGdi inspiratory and expiratory phases. 3.2. Adaptive Filtering We implemented an adaptive noise canceler based on event-synchronous cancellation to improve the quality of EMGdi signals by reducing the ECG interference. The adaptive noise canceler scheme used was previously proposed by references [ 17 – 19 ]. The EMGdi signal was used as the primary input to adaptive noise canceler. This signal, band pass filtered between 2 and 40 Hz, was used to detect the QRS complex. The reference input, uncorrelated with the EMGdi but correlated with the ECG interference, was artificially generated according to reference [ 19 ]. The number of weights of the linear combiner and the adjustment or adaptive constant of the Least-Mean-Square (LMS) algorithm were set to 10 and 10 −6 , respectively. That constant of adaptation minimized the energy difference between the output or cancellation signal and the reference input signal. The EMGdi-LMS signal represents the EMGdi signal adaptively filtered using the LMS algorithm (Figure 2(d1,d2)), and fSE-EMGdi-LMS represents the envelope extracted with fSE (Figure 2(e1,e2)). 3.3. EMGdi Envelope Estimation 3.3.1. RMS-Based Method The EMGdi envelope provided by the EMG acquisition device was based on the RMS method (RMSp) proposed by Prechtl et al. [ 11 ]. This method removes the electrical heart activity from the raw EMGdi by means of the gating technique. As was described by Prechtl, the QRS complexes are stretched into a standard QRS pulse and cut out of the raw EMGdi signal. The remaining EMGdi signal is averaged with a moving window and the RMS is calculated (Figure 2(b1, b2)) [11]. 3.3.2. Fixed Sample Entropy Sample entropy (SampEn) is a measure of irregularity used to analyze short and noisy physiological time series [ 20 , 21 ]. It represents the conditional probability that two sequences of patterns of m consecutive samples, which are similar to each other within a tolerance r, will remain
Entropy 2019,21, 258 6 of 15 similar when one consecutive sample is added (m+ 1). SampEn algorithm improves the performance of the approximate entropy [ 22 ] overcoming the bias due to self-matching counted and the lack of relative consistency [20] by the following procedure: Entropy2019,21,xFORPEERREVIEW6of15 oftheapproximateentropy[22]overcomingthebiasduetoself‐matchingcountedandthelackof relativeconsistency[20]bythefollowingprocedure: Figure2.RepresentativeexamplesofEMGdisignal(a1,a2)recordedintwopatientswithlow(left panels)andhigh(rightpanels)signalquality,respectively.Derivedrootmeansquare(b1,b2) envelopesgivenbytheEMGrecordingsystem(RMSp).Derivedfixedsampleentropy(fSE)envelopes overtheEMGdisignal(fSE‐EMGdi)(c1,c2).fSEwascalculatedusingm=1,r=0.2×standarddeviation ofEMGdifreeofelectrocardiographicinterferenceandoverlappingslidingwindowof0.25s.The EMGdisignalwasadaptivelyfiltered(d1,d2)usinganLMS‐basedadaptivealgorithm(EMGdi‐LMS) andfSE(e1,e2)wasalsocalculated(fSE‐EMGdi‐LMS).Rinexisanexpressionofincrementof inspiratoryEMGdiactivitywithrespecttobasalexpiratoryEMGdiactivity,whileRcardioisan expressionoftheECGinterferenceovertheEMGdisignals.Expertonsetdetectionsareshownin blacksolidlines(blackandredlines).Theonsetsofneuralrespiratoryactivity(bluedottedlines)were detectedthroughadynamicthresholdoverthefSE‐EMGdiandfSE‐EMGdi‐LMSusingtheGaussian kerneldensityestimationapproach. GivenatimeseriesofNsamples𝑥𝑛𝑥1,𝑥2,…,𝑥𝑁,asubsetofN−m+1overlapping vectors𝑋𝑖oflengthmareconstructed 𝑋𝑖𝑥𝑖, 𝑥𝑖1,…,𝑥𝑖m1, 𝑖 1, 2,…,𝑁𝑚1.(1) Then,defineChebyshevdistance,i.e.,themaximumabsolutedifferencebetweencorrespondingpairs ofscalarcomponentsofm‐dimensionvectors𝑋𝑖and𝑋𝑗. d𝑋𝑖,𝑋 𝑗 max ,…,|𝑥𝑖𝑘𝑥 𝑗 𝑘|, 𝑖 𝑗 .(2) 𝐵𝑟denotesthenumberof𝑋𝑗, 𝑗1,…, 𝑁𝑚, 𝑖𝑗thatresemble𝑋𝑖andarelessthanor equaltoathresholdr,suchthat𝑑𝑋𝑖,𝑋𝑗𝑟, 𝑖𝑗. Then,for𝑖 1,2,...𝑁𝑚𝐵𝑟𝐵𝑟 𝑁𝑚1.(3) Theaveragefor𝐵𝑟esdefinedas 𝐵𝑟1 𝑁𝑚𝐵𝑟 .(4) Thispreviousprocedureisrepeated,increasingthedimensionmtom+1toobtain (e2)(e1) (c2)(c1) (b2)(b1) (a2)(a1) (d2)(d1) Figure 2. Representative examples of EMGdi signal ( a1 , a2 ) recorded in two patients with low (left panels) and high (right panels) signal quality, respectively. Derived root mean square ( b1 , b2 ) envelopes given by the EMG recording system (RMSp). Derived fixed sample entropy (fSE) envelopes over the EMGdi signal (fSE-EMGdi) ( c1 , c2 ). fSE was calculated using m= 1, r= 0.2 × standard deviation of EMGdi free of electrocardiographic interference and overlapping sliding window of 0.25 s. The EMGdi signal was adaptively filtered ( d1 , d2 ) using an LMS-based adaptive algorithm (EMGdi-LMS) and fSE ( e1 , e2 ) was also calculated (fSE-EMGdi-LMS). Rinex is an expression of increment of inspiratory EMGdi activity with respect to basal expiratory EMGdi activity, while Rcardio is an expression of the ECG interference over the EMGdi signals. Expert onset detections are shown in black solid lines (black and red lines). The onsets of neural respiratory activity (blue dotted lines) were detected through a dynamic threshold over the fSE-EMGdi and fSE-EMGdi-LMS using the Gaussian kernel density estimation approach. Given a time series of Nsamples x(n)=[x(1),x(2), . . . , x(N)] , a subset of N − m+ 1 overlapping vectors Xm(i)of length mare constructed Xm(i)=[x(i),x(i+1), . . . , x(i+m−1)],i=1, 2, . . . , N−m+1. (1) Then, define Chebyshev distance, i.e., the maximum absolute difference between corresponding pairs of scalar components of m-dimension vectors Xm(i)and Xm(j). d[Xm(i),Xm(j)] =max k=0,...,m−1[|x(i+k)−x(j+k)|],i6=j. (2) Bi(r) denotes the number of Xm(j) , j= 1, . . . , N−m , i6=j that resemble Xm(i) and are less than or equal to a threshold r, such that dm[Xm(i),Xm(j)] ≤r,i6=j. Then, for i=1, 2, . . . N−m Bm i(r)=Bi(r) N−m−1. (3) The average for Bm i(r)es defined as
Entropy 2019,21, 258 7 of 15 Bm(r)=1 N−m N−m ∑ i=1 Bm i(r). (4) This previous procedure is repeated, increasing the dimension mto m+ 1 to obtain Am(r)=1 N−m N−m ∑ i=1 Am i(r). (5) Thus, Bm(r) is the probability that two sequences will match for msamples, whereas Am(r) is the probability that two sequences will match for m+ 1 samples. Sample entropy is then defined as SampEn(m,r)=lim n→∞−lnAm(r) Bm(r), (6) which is estimated by the statistic: SampEn(m,r,N)=lnAm(r) Bm(r). (7) The mparameter is generally taken as 2 while rparameter is set in range of 0.1 to 0.25 times the standard deviation of the segment analyzed of length N[23]. The fixed sample entropy (fSE), is a metric based on the original SampEn formulation to quantify the amplitude variation of complex components of stochastic signals [ 12 , 24 ]. fSE is calculated using a sliding window with overlap. fSE calculation requires the adjustment of three parameters: the embedding dimension m, the tolerance value rand the size of the sliding window (Nparameter) [ 24 , 25 ]. The main difference between SampEn and fSE is that the latter uses a fixed tolerance value (r) defined as a fraction of the global standard deviation of the signal instead of the local standard deviation. To optimize the neural respiratory activity estimation and reduction of ECG interference over EMGdi signal, the influence of several m,rand Ninput parameters were investigated in reference [ 25 ]. In the present study, based on recommendations of [ 25 ], fSE was explored using mequal to 1 and 2, r equal to 0.1, 0.2 and 0.3 times the standard deviation of the EMGdi signal and a sliding window equal to 0.25, 0.3, 0.4 and 0.5 s with 90% of overlap. Unlike in reference [ 25 ], the standard deviation of the EMGdi signal was calculated excluding ECG interference segments. The fSE parameters that provided the lowest geometric mean value of the RMSE were selected as the optimal parameter set. To compute fSE-based EMGdi envelope we also applied a smoothing filter (using a moving average filter of 300 ms) and computed the exponential value of the resulting signal, to enhance high amplitude variations and reduce small amplitude variations, which might optimize onset detection (Figure 2(c1,c2)). 3.4. Automatic Respiratory Onset Detection Breathing exhibits nonlinear patterns due to intrinsic changes associated to the respiratory system dynamic. Static thresholding methods used to detect onsets in EMGdi signals are limited since they provide only temporal information using the baseline amplitude characteristics of electromyographic signals [ 26 ]. Moreover, they can be affected by baseline variation such as ECG, movements artefacts or muscle interferences [ 26 ]. Thus, we propose the use of a dynamic thresholding that takes into account the breath by breath respiratory muscle variability [ 13 ]. This dynamic thresholding is based on the KDE, a nonparametric method used for the estimation of the probability density function p(x). KDE is calculated between two successive inspiratory cycles over the EMGdi envelope, which provides a smooth amplitude histogram. KDE estimation of the p(x) is given by:
Entropy 2019,21, 258 8 of 15 ˆ p(x)=1 Nh N ∑ i=1 Kx−xi h, (8) where K(x) is the kernel function, Nis the number of samples and his the bandwidth or the smoothing parameter. We adopt a Gaussian kernel function of the form K(x)=1 √2π e−x2 2. (9) Assuming that the distribution is Gaussian and using a Gaussian kernel, the optimal bandwidth h is defined by (9), where σis the standard deviation of the data [27] hopt =σ5 r4 3N. (10) The dynamic threshold for each breathing was determined as the global maximum (mode) of the p(x). Finally, the inspiratory onset was then defined as the last point the threshold crosses the EMGdi envelope in upward direction. Figure 2shows an example of automatic onset detection, with the different envelope extraction methods, for a patient with high signal quality (left panels) and a patient with low signal quality (right panels). 4. Results 4.1. Visual Onset Analysis The scorers manually annotated 8117 breaths using the EMGdi as a reference. The cycles where the difference between scorers was higher than 150 ms were considered unreliable and excluded from further analysis (Table 2). The onset difference in ms and percentage of discarded cycles are represented in Table 2. On average, 26.5% of the cycles were rejected. Moderate negative correlations were observed between the percentage of discarded cycles and both Rinex (R = − 0.63) and Rcardio (R = −0.43) indices. Table 2. Onset difference between manual detections considering reliable breaths less than 150 ms. Percentage of cycles removed. COPD Differences between Scores (ms) Discarded Cycles (%) 1−6±77 34.2 2−32 ±73 39.3 3 15 ±74 27.1 4 10 ±68 21.0 5−10 ±70 40.0 6−13 ±67 24.4 7 6 ±81 45.0 8 33 ±56 5.4 9 16 ±46 2.2 Mean ±SD 5 ±69 26.5 ±15.1 4.2. EMGdi Signal Quality Analysis In general, the EMGdi quality (Table 3) was varying, with some patients having lots of disturbance and others (i.e., patient 9) with high quality EMGdi signals, which was reflected by much lower errors detecting inspiratory onset. At large, both the Rinex and Rcardio indices improved after the adaptive filter, improving the EMGdi signal quality for monitoring respiratory drive. However, the ECG interference has not been reduced completely by the LMS approach as shown in Figure 2, leading in one case to the addition of noise to the filtered signal slightly reducing the Rinex index (i.e., patient 7, from 3.65 to 3.29).
Entropy 2019,21, 258 9 of 15 Table 3. Rinex and Rcardio indices calculated over the EMGdi signal before and after applying the LMS-based adaptive algorithm. Rinex Rcardio COPD EMGdi EMGdi-LMS EMGdi EMGdi-LMS 1 1.70 1.73 0.0060 0.4019 2 5.09 6.59 0.0009 0.5051 3 6.31 6.57 0.0082 0.3306 4 3.44 4.82 0.0100 0.0790 5 6.65 10.48 0.0035 1.2849 6 9.63 15.18 0.0047 0.6149 7 3.65 3.29 0.0129 0.1493 8 5.82 9.23 0.0011 0.2751 9 43.74 64.30 0.0293 7.2753 EMGdi-LMS: EMGdi signal filtered using an LMS-based adaptive algorithm. Rinex: ratio between the mean power spectral density (PSD) of inspiratory segments without ECG and the mean PSD of expiratory segments without ECG. Rcardio: ratio between the mean PSD of inspiratory EMGdi segments without ECG and the mean PSD of expiratory EMGdi segments with ECG. 4.3. RMSE Compared to Visual Analysis The geometric mean of the RMSE for all the analyzed patients, between gold standard onsets and automatic onsets estimated over the fSE envelopes using different settings is shown in Figure 3. The lower RMSE ranged between 253.7 and 341.6 ms for fSE-EMGdi-LMS (Figure 3). As illustrated, the parameter set that reduced the geometric mean RMSE detecting the respiratory onset using fSE-EMGdi (276.4 ms) and fSE-EMGdi-LMS (253.7 ms) was m= 1, r= 0.3, and sliding moving window equal to 0.25 s in both cases. Thus, this parameter set was considered optimal and was applied throughout the study. Entropy2019,21,xFORPEERREVIEW9of15 69.6315.180.00470.6149 73.653.290.01290.1493 85.829.230.00110.2751 943.7464.300.02937.2753 EMGdi‐LMS:EMGdisignalfilteredusinganLMS‐basedadaptivealgorithm.Rinex:ratiobetweenthe meanpowerspectraldensity(PSD)ofinspiratorysegmentswithoutECGandthemeanPSDof expiratorysegmentswithoutECG.Rcardio:ratiobetweenthemeanPSDofinspiratoryEMGdi segmentswithoutECGandthemeanPSDofexpiratoryEMGdisegmentswithECG. 4.3.RMSEComparedtoVisualAnalysis ThegeometricmeanoftheRMSEforalltheanalyzedpatients,betweengoldstandardonsets andautomaticonsetsestimatedoverthefSEenvelopesusingdifferentsettingsisshowninFigure3. ThelowerRMSErangedbetween253.7and341.6msforfSE‐EMGdi‐LMS(Figure3).Asillustrated, theparametersetthatreducedthegeometricmeanRMSEdetectingtherespiratoryonsetusingfSE‐ EMGdi(276.4ms)andfSE‐EMGdi‐LMS(253.7ms)wasm=1,r=0.3,andslidingmovingwindow equalto0.25sinbothcases.Thus,thisparametersetwasconsideredoptimalandwasapplied throughoutthestudy. Figure3.Root‐mean‐squareerror(RMSE)betweenthevisualonsetdetectionandautomaticonset detections.Fixedsampleentropy(fSE)wasestimatedoverboththeEMGdisignal(fSE‐EMGdi)and filteredEMGdisignalusinganLMS‐basedadaptivealgorithm(fSE‐EMGdi‐LMS).fSEwascalculated fordifferentsettings:m=1and2,andtolerancevaluesr=0.1,0.2and0.3×standarddeviationof EMGdifreeofelectrocardiographicinterference,andoverlappingslidingwindowsof0.25,0.3,0.4 and0.5s.EachRMSErepresentsthegeometricmeanofobtainedvaluesforthe9analyzedpatients. TheRMSEofeachpatientobtainedbetweenthedifferenttechniquesandvisualanalysisis representedinTable4.ThelowestmeanRMSEwasobservedforfSE‐EMGdi‐LMS,whilethelowest RMSEdispersionwasshownforRMSpfollowedbyfSE‐EMGdi‐LMS.Ingeneral,RMSEdecreases whentheadaptivefilterisapplied.However,insomepatientstheRMSEobtainedoverfSE‐EMGdi waslowerthanobtainedbyRMSp.ThecorrelationsbetweenRinexandRcardioindexes(Table3) andRMSE(Table4)wereassessed.Moderateandstrongnegativecorrelationwereobservedbetween RinexandRMSEforfSE‐EMGdi(R=−0.62)andfSE‐EMGdi‐LMS(R=−0.8,p‐value<0.05), respectively.ModerateandstrongnegativecorrelationwerealsoobservedbetweenRcardioand Figure 3. Root-mean-square error (RMSE) between the visual onset detection and automatic onset detections. Fixed sample entropy (fSE) was estimated over both the EMGdi signal (fSE-EMGdi) and filtered EMGdi signal using an LMS-based adaptive algorithm (fSE-EMGdi-LMS). fSE was calculated for different settings: m= 1 and 2, and tolerance values r= 0.1, 0.2 and 0.3 × standard deviation of EMGdi free of electrocardiographic interference, and overlapping sliding windows of 0.25, 0.3, 0.4 and 0.5 s. Each RMSE represents the geometric mean of obtained values for the 9 analyzed patients. The RMSE of each patient obtained between the different techniques and visual analysis is represented in Table 4. The lowest mean RMSE was observed for fSE-EMGdi-LMS, while the lowest RMSE