Influence of Parameter Selection in Fixed Sample Entropy of Surface Diaphragm Electromyography for Estimating Respiratory Activity

Fixed sample entropy (fSampEn) is a robust technique that allows the evaluation of inspiratory effort in diaphragm electromyography (EMGdi) signals, and has potential utility in sleep studies. To appropriately estimate respiratory effort, fSampEn requires the adjustment of several parameters. The aims of the present study were to evaluate the influence of the embedding dimension m, the tolerance value r, the size of the moving window, and the sampling frequency, and to establish recommendations for estimating the respiratory activity when using the fSampEn on surface EMGdi recorded for different inspiratory efforts. Values of m equal to 1 and r ranging from 0.1 to 0.64, and m equal to 2 and r ranging from 0.13 to 0.45, were found to be suitable for evaluating respiratory activity. fSampEn was less affected by window size than classical amplitude parameters. Finally, variations in sampling frequency could influence fSampEn results. In conclusion, the findings suggest the potential utility of fSampEn for estimating muscle respiratory effort in further sleep studies.


Introduction
Assessment of respiratory muscle function provides valuable information for the diagnosis and treatment capabilities of patients with respiratory muscle weakness [1], for instance, in specialties such as respiratory medicine [2][3][4][5], intensive care [6,7], and sleep medicine [8][9][10][11][12][13].Analyzing electromyographic signals of the respiratory muscles in routine clinical studies can provide useful complementary information for measuring respiratory effort [1].Diaphragm electromyography (EMGdi) presents valuable information as an indirect measurement of the load exerted by the respiratory muscles [2].EMGdi signals can be invasively recorded using multiple pairs of esophageal electrodes [8,9].Nevertheless, this technique is unpleasant for patients and of limited use in clinical practice [2].Instead, surface electromyography has been used for the non-invasive assessment of respiratory muscle function [1,4,[10][11][12][13][14]. It is possible to record surface EMGdi signals with electrodes placed on the chest wall surface, near the zone of apposition of the diaphragm, as described in [15].
Both surface and esophageal EMGdi signals have the drawback of being affected by the electrocardiographic (ECG) signal [16], and the estimation of the respiratory effort from EMGdi signals is affected by the accuracy of this measurement.Classical amplitude-based estimators, such as the average rectified value (ARV) and root mean square (RMS) have been widely used for analyzing EMGdi signals, but these are highly influenced by cardiac noise.
Sample entropy (SampEn) is a technique that quantifies the regularity of the signal.It is appropriate for short-length and noisy physiological data [17], and represents a refining of approximate entropy, a technique with a lack of consistency as it depends on data length and counts self-matches [18].Formulating SampEn necessitates three parameters: the embedding dimension, m (length of compared runs); the tolerance value, r (similarity criterion); and the total length, N, of the analyzed series.In addition, there are several refined versions of conditional entropy that enhance the entropy rate estimation [19].Recently, we proposed a variant of SampEn called fixed sample entropy (fSampEn) to quantify the intensity of the electromyographic [20] and mechanomyographic [21] activity of respiratory muscles.fSampEn has proven to be not as sensitive to the presence of less complex components, such as cardiac activity [20,21], than the ARV and RMS value.This index has been useful in surface EMGdi signals corrupted by ECG for quantifying respiratory effort [20] and detecting the onset and offset [22] of the electromyographic activity.
fSampEn is determined by calculating SampEn on overlapping moving windows using a previously fixed tolerance value as a function of the global standard deviation of the signal [21].As with the classical SampEn algorithm, the sampling frequency is also important in the fSampEn algorithm as, once the window size is fixed, this determines the number of samples in which the sample entropy is calculated.The typical choice for m has been 1 or 2, while r has often been selected as 0.2 times the standard deviation of the dataset [17].In [20,22] we used a sampling frequency of 1000 Hz, and fSampEn parameters were m equal to 1, with r set to 0.3 times the standard deviation of the whole signal, and the size of the moving window was 0.25 s [22] and 1 s [20].However, although the adequate selection of these parameters is very important when assessing respiratory effort using the fSampEn technique, there are no general guidelines on how to make this choice.
Based on the above considerations, the objectives of this study were: (1) to evaluate the influence of m, r, the size of the moving window, and the sampling frequency on the estimation of respiratory activity by means of the fSampEn of surface EMGdi signals; and (2), based on this evaluation, to establish recommendations and a range of suitable values for estimating respiratory activity using the fSampEn of surface EMGdi signals.To achieve these objectives, we analyzed the relationship between the inspiratory mouth pressure (Pmouth) with the fSampEn parameter in an experimental study with surface EMGdi signals during an incremental load respiratory protocol.Pmouth was considered the gold standard reference for quantifying respiratory muscle effort [23].Changes in Pmouth may give a reasonable approximation of the overall mechanical output of the synergistic respiratory muscles and the distensibility of the system [1].The respiratory protocol was designed to evaluate different levels of inspiratory effort.The range of fSampEn parameters analyzed were: m equal to 1 and 2; r between 0.01 and 1 times the standard deviation of the whole signal; window lengths of the moving average ranging from 0.1 s to 2 s; and sampling frequencies ranging from 500 to 2000 Hz.

Experimental Setup
One healthy male volunteer (age: 31 years; height: 1.69 m; weight: 84 kg) was recruited for this study.The subject presented no clinical evidence of cardiac or respiratory disease.The study protocol was approved by the Institutional Review Board of the Institute for Bioengineering of Catalonia (IBEC), Barcelona, Spain, and the participant gave his written informed consent.
The subject underwent an inspiratory load protocol in which he began to breathe via a mouthpiece with no obstruction at quiet breathing.He was then made to breathe through an attached hand-held inspiratory muscle training device (Threshold IMT, Phillips Respironics, Amsterdam, The Netherlands).The IMT device imposes a respiratory load during inspiration, limiting the air passing through the device to the lungs and consequently increasing the respiratory muscle effort while expiration remains unloaded.The IMT device was set at four different inspiratory loads: 9, 17, 25, and 33 cm H 2 O.The inspiratory protocol both with and without the IMT device lasted 1 min followed by 2 min of rest.During the protocol, the subject was instructed to sit up straight in a comfortable chair with his arms beside his body, and wear a nose clip to prevent nasal breathing.
Costal EMGdi activity was measured on the surface of the lower right chest, the zone of apposition of the diaphragm.Two surface electrodes in bipolar configuration were placed at the seventh and eight intercostal space, one below the other along the anterior axillary line and above the costal margin.Additionally, a common electrode was placed over the right ankle.All surface electrodes were disposable and pre-gelled (Ag/AgCl, 11-mm diameter contact area, foam electrode 50/PK-EL501, Biopac Systems Inc., Santa Barbara, CA, USA).Prior to attaching the electrodes, the site was mildly abraded with gel (Nuprep, Weaver and Company, Aurora, CO, USA) and cleaned with alcohol to reduce skin-electrode impedance.The bipolar electrode configuration was plugged into a modular amplifier (EMG 100C, Biopac Systems Inc.) with a gain of 5000 and an analog band-pass filter with cut-off frequencies of 1 and 500 Hz.
Inspiratory mouth pressure (Pmouth) was measured simultaneously, using a differential pressure transducer (TSD160, Biopac Systems, Inc.).Pmouth may give a reasonable approximation of the overall mechanical output of the inspiratory muscles during breathing.Pmouth is a combination of both the mechanically-expressed inspiratory muscle activity and the distensibility of the system [1].The pressure transducer was connected to a modular differential amplifier (DAC100C, Biopac Systems Inc.) with a gain of 50 and an analog low-pass filter with a cut-off frequency of 300 Hz.The EMGdi and Pmouth signals were digitized at a sampling rate of 2000 Hz using a 16-bit analog-to-digital converter data acquisition system (MP150, Biopac Systems Inc.).The signals were visualized in real time and stored on a computer (AcqKnowledge software v.3.2,Biopac Systems Inc.).Figure 1 depicts the traces corresponding to the Pmouth and EMGdi recordings measured during the inspiratory load protocol.and 33 cm H2O.The inspiratory protocol both with and without the IMT device lasted 1 min followed by 2 min of rest.During the protocol, the subject was instructed to sit up straight in a comfortable chair with his arms beside his body, and wear a nose clip to prevent nasal breathing.
Costal EMGdi activity was measured on the surface of the lower right chest, the zone of apposition of the diaphragm.Two surface electrodes in bipolar configuration were placed at the seventh and eight intercostal space, one below the other along the anterior axillary line and above the costal margin.Additionally, a common electrode was placed over the right ankle.All surface electrodes were disposable and pre-gelled (Ag/AgCl, 11-mm diameter contact area, foam electrode 50/PK-EL501, Biopac Systems Inc., Santa Barbara, CA, USA).Prior to attaching the electrodes, the site was mildly abraded with gel (Nuprep, Weaver and Company, Aurora, CO, USA) and cleaned with alcohol to reduce skin-electrode impedance.The bipolar electrode configuration was plugged into a modular amplifier (EMG 100C, Biopac Systems Inc.) with a gain of 5000 and an analog band-pass filter with cut-off frequencies of 1 and 500 Hz.
Inspiratory mouth pressure (Pmouth) was measured simultaneously, using a differential pressure transducer (TSD160, Biopac Systems, Inc.).Pmouth may give a reasonable approximation of the overall mechanical output of the inspiratory muscles during breathing.Pmouth is a combination of both the mechanically-expressed inspiratory muscle activity and the distensibility of the system [1].The pressure transducer was connected to a modular differential amplifier (DAC100C, Biopac Systems Inc.) with a gain of 50 and an analog low-pass filter with a cut-off frequency of 300 Hz.The EMGdi and Pmouth signals were digitized at a sampling rate of 2000 Hz using a 16-bit analog-to-digital converter data acquisition system (MP150, Biopac Systems Inc.).The signals were visualized in real time and stored on a computer (AcqKnowledge software v.3.2,Biopac Systems Inc.).Figure 1 depicts the traces corresponding to the Pmouth and EMGdi recordings measured during the inspiratory load protocol.

Fixed Sample Entropy
SampEn provides a value that depends on the conditional probability of two sequences that are similar for m samples (where m is a positive integer), remaining similar within a tolerance of r in the next sample m + 1.If r is too small, noise affects the entropy measure, whereas if r is too large, some changes in the signal cannot be detected [18].SampEn is calculated as follows [17]:

Fixed Sample Entropy
SampEn provides a value that depends on the conditional probability of two sequences that are similar for m samples (where m is a positive integer), remaining similar within a tolerance of r in the next sample m + 1.If r is too small, noise affects the entropy measure, whereas if r is too large, some changes in the signal cannot be detected [18].SampEn is calculated as follows [17]: where B m (r) and A m (r) are defined as: and represent the average of the frequency of the patterns encountered that are similar in subsequences X(i) and X(j), such that the distance between two vectors d[X(i), X(j)] ≤ r: The foundations of fixed sample entropy (fSampEn) [21] are based on the sample entropy algorithm: fSampEn is determined by calculating SampEn on overlapping moving windows using a fixed tolerance value for all the moving windows [21].fSampEn allows amplitude variations of complex components of stochastic origin, such as electromyographic activity, to be quantified, while being not as sensitive to the presence of less complex components, such as electrocardiographic activity [20].

Signal Processing
Signal processing and data analysis was performed using MATLAB (The MathWorks, Inc., v. R2014a, Natick, MA, USA).The EMGdi signal was digitally band-pass filtered using a zero-phase fourth-order Butterworth filter with cut-off frequencies of 5 and 400 Hz.The fSampEn, ARV and RMS parameters were calculated over the EMGdi signal using a moving window with 90% overlap.
Calculating fSampEn requires a priori determination of its input parameters.Firstly, fSampEn was evaluated over the EMGdi signal recorded at quiet breathing and for the set of all inspiratory loads.fSampEn was measured using m equal to 1 and 2 [24][25][26][27], r varying between 0.1 to 1 times the standard deviation of the whole EMGdi signal with increments of 0.02, a window size of 1 s [21,23,28], and resampling the signal to 1000 Hz.Secondly, once m and r were adjusted to 1 and 0.3 times the standard deviation of the whole signal, respectively, we analyzed the effect of the window size.To this end, fSampEn was calculated over the EMGdi signal in 20 windows, with sizes ranging from 0.1 s to 2 s, with increments of 0.1 s.Finally, fixing the window size to 1 s, the influence of sampling frequency on fSampEn was assessed by decimating the EMGdi signal to obtain sampling frequencies of 1750, 1500, 1250, 1000, 750, and 500 Hz, respectively.
Pearson's correlation coefficient (R) was used to assess the goodness-of-fit of the linear relationship between Pmouth and fSampEn, ARV and RMS of the EMGdi signal.R was computed at the five levels of EMGdi intensities (R0, R1, R2, R3, R4) corresponding to quiet breathing and the inspiratory loads of 9, 17, 25, and 33 cm H 2 O, respectively.The R0 to R4 values reflect the ability of the methods to detect the amplitude variations produced by cyclical nature of breathing for different loads or EMGdi intensities.Furthermore, to evaluate the ability of the fSampEn to assess respiratory effort in EMGdi intensity variations due to changing the inspiratory load we computed the R values throughout the whole protocol (Rtot), with five levels of respiratory effort.fSampEn was calculated over the EMGdi signal using a 1 s moving window and a 90% overlap.

Effect of m and r Selection on fSampEn
Figure 3 shows the Pearson's correlation coefficient for the Pmouth signal and fSampEn calculated over the EMGdi signal recorded during quiet breathing, as well as for the set of all inspiratory loads (R0 and Rtot, respectively).Calculations were performed for m = 1 and 2 with r ranging from 0.01 to 1, using a 1 s moving window.To obtain a range of suitable values for estimating the respiratory activity, the average of the correlation values obtained at quiet breathing (R0) and using the whole signal (Rtot) was calculated.The range of r values in which R is higher than 99.5% of the maximum of the average of R0 and Rtot were from 0.1 to 0.64, when using m = 1, while for m = 2, they ranged from 0.13 to 0.45.
From these results, to analyze the effect of window size and sampling frequency we set r to 0.3 and m = 1.  Figure 3 shows the Pearson's correlation coefficient for the Pmouth signal and fSampEn calculated over the EMGdi signal recorded during quiet breathing, as well as for the set of all inspiratory loads (R0 and Rtot, respectively).Calculations were performed for m = 1 and 2 with r ranging from 0.01 to 1, using a 1 s moving window.To obtain a range of suitable values for estimating the respiratory activity, the average of the correlation values obtained at quiet breathing (R0) and using the whole signal (Rtot) was calculated.The range of r values in which R is higher than 99.5% of the maximum of the average of R0 and Rtot were from 0.1 to 0.64, when using m = 1, while for m = 2, they ranged from 0.13 to 0.45.
From these results, to analyze the effect of window size and sampling frequency we set r to 0.3 and m = 1. Figure 3 shows the Pearson's correlation coefficient for the Pmouth signal and fSampEn calculated over the EMGdi signal recorded during quiet breathing, as well as for the set of all inspiratory loads (R0 and Rtot, respectively).Calculations were performed for m = 1 and 2 with r ranging from 0.01 to 1, using a 1 s moving window.To obtain a range of suitable values for estimating the respiratory activity, the average of the correlation values obtained at quiet breathing (R0) and using the whole signal (Rtot) was calculated.The range of r values in which R is higher than 99.5% of the maximum of the average of R0 and Rtot were from 0.1 to 0.64, when using m = 1, while for m = 2, they ranged from 0.13 to 0.45.
From these results, to analyze the effect of window size and sampling frequency we set r to 0.3 and m = 1.

Effect of Window Size Selection on fSampEn
Figure 4 illustrates an example of 15 s of an EMGdi signal during quiet breathing and the corresponding fSampEn, ARV and RMS parameters calculated over the signal using moving window sizes of 0.2, 0.6, 0.9 and 1.6 s with 90% overlap.As expected, it can be seen that the larger the window size, the greater the smoothing produced in the three parameters calculated over the EMGdi signal.However, it is clear that fSampEn is less affected by cardiac interference.

Effect of Window Size Selection on fSampEn
Figure 4 illustrates an example of 15 s of an EMGdi signal during quiet breathing and the corresponding fSampEn, ARV and RMS parameters calculated over the signal using moving window sizes of 0.2, 0.6, 0.9 and 1.6 s with 90% overlap.As expected, it can be seen that the larger the window size, the greater the smoothing produced in the three parameters calculated over the EMGdi signal.However, it is clear that fSampEn is less affected by cardiac interference.Interestingly, Figure 4 also shows that the attenuation of the ECG interference in the ARV and RMS parameters is highly dependent on the window size.This is due to the typical behavior of a moving average filter.Figure 5 shows the frequency response of this filter for each window size shown in Figure 4.In this example, the cardiac period at quiet breathing estimated from the EMGdi signal (R wave of the QRS complex) was around 0.8 s (1.25 Hz), and the respiratory period was around 3.33 s (0.3 Hz).As observed, when the cardiac frequency (vertical red dashed line) matches Interestingly, Figure 4 also shows that the attenuation of the ECG interference in the ARV and RMS parameters is highly dependent on the window size.This is due to the typical behavior of a moving average filter.Figure 5 shows the frequency response of this filter for each window size shown in Figure 4.In this example, the cardiac period at quiet breathing estimated from the EMGdi signal (R wave of the QRS complex) was around 0.8 s (1.25 Hz), and the respiratory period was around 3.33 s (0.3 Hz).As observed, when the cardiac frequency (vertical red dashed line) matches one zero of the moving average filter, there is the greatest attenuation of ECG.Furthermore, the inherent respiratory activity from the EMGdi signal is attenuated at higher window size values (vertical green dashed line).In all cases, fSampEn was less sensitive to ECG noise compared with ARV and RMS.A video clip showing the effect of window size selection on fSampEn, ARV and RMS can be found in the Supplementary Materials.
one zero of the moving average filter, there is the greatest attenuation of ECG.Furthermore, the inherent respiratory activity from the EMGdi signal is attenuated at higher window size values (vertical green dashed line).In all cases, fSampEn was less sensitive to ECG noise compared with ARV and RMS.A video clip showing the effect of window size selection on fSampEn, ARV and RMS can be found in the Supplementary Materials.Figure 6 shows a boxplot of the Pearson correlation coefficients between the Pmouth signal and the fSampEn, ARV and RMS parameters calculated over the EMGdi signal applying different window sizes (0.1 s to 2 s in increments of 0.1 s).The distribution of the correlation values provides information on the variability of the three parameters.As can be seen, the correlation values of fSampEn, ARV, and RMS show an increasing trend as the inspiratory load increases.In general terms, fSampEn obtained the highest median correlation values under each inspiratory load when compared to those from ARV and RMS.At quiet breathing, ARV and RMS presented the lowest median correlation values of 0.34 and 0.18, respectively, while fSampEn had a value of 0.57.The maximum values were observed at 33 cm H2O of inspiratory load, with a median correlation value of 0.78 and 0.70 for ARV and RMS, respectively.fSampEn had the highest correlation value (0.82) during the inspiratory load protocol.Furthermore, Rtot of fSampEn reflected the highest median correlation values (0.82) when EMGdi intensity variations due to changes in the inspiratory load were evaluated.Unlike fSampEn, ARV and RMS showed a higher dispersion of the correlation values reflected by the interquartile range and the presence of more atypical values.fSampEn was less affected by the window size compared to the classical amplitude parameters.The correlation analysis showed significant positive R values (p < 0.001) between Pmouth and the parameters of respiratory muscle EMGdi at any imposed inspiratory load.Figure 6 shows a boxplot of the Pearson correlation coefficients between the Pmouth signal and the fSampEn, ARV and RMS parameters calculated over the EMGdi signal applying different window sizes (0.1 s to 2 s in increments of 0.1 s).The distribution of the correlation values provides information on the variability of the three parameters.As can be seen, the correlation values of fSampEn, ARV, and RMS show an increasing trend as the inspiratory load increases.In general terms, fSampEn obtained the highest median correlation values under each inspiratory load when compared to those from ARV and RMS.At quiet breathing, ARV and RMS presented the lowest median correlation values of 0.34 and 0.18, respectively, while fSampEn had a value of 0.57.The maximum values were observed at 33 cm H 2 O of inspiratory load, with a median correlation value of 0.78 and 0.70 for ARV and RMS, respectively.fSampEn had the highest correlation value (0.82) during the inspiratory load protocol.Furthermore, Rtot of fSampEn reflected the highest median correlation values (0.82) when EMGdi intensity variations due to changes in the inspiratory load were evaluated.Unlike fSampEn, ARV and RMS showed a higher dispersion of the correlation values reflected by the interquartile range and the presence of more atypical values.fSampEn was less affected by the window size compared to the classical amplitude parameters.The correlation analysis showed significant positive R values (p < 0.001) between Pmouth and the parameters of respiratory muscle EMGdi at any imposed inspiratory load.Figure 6.Box-plot for comparing Pearson's correlation coefficient (R) between the Pmouth signal and each of fSampEn, ARV and RMS of the EMGdi signal calculated using 20 moving windows of analysis of different lengths, ranging from 0.1 s to 2 s in increments of 0.1 s, at each level of inspiratory load (L0 to L4) and for the whole signal (Ltot).A significant positive correlation (p < 0.001) was found at any imposed load.fSampEn was set to m equal to 1, with r at 0.3 times the standard deviation of the whole EMGdi signal.The EMGdi was resampled to 1000 Hz.

Effect of Sampling Frequency on fSampEn
Figure 7a,c,e depict representative traces of the fSampEn, ARV, and RMS parameters calculated over the EMGdi signal (quiet breathing), sampled at 2000 Hz and decimated at sampling frequencies of 1500, 1000 and 500 Hz.It can be seen that as the sampling frequency of the EMGdi signal decreases, the offset and dispersion of the amplitude of the fSampEn calculated over the EMGdi signals increase, whereas for the ARV and RMS these remain constant.The effect produced in the offset and dispersion of the amplitude when calculating the fSampEn, ARV and RMS over resampled EMGdi signals was assessed by analyzing changes in the mean and standard deviation of these parameters at each level of inspiratory load.As shown in Figure 7b,d,f, the mean and standard deviation of the three parameters are greater as the inspiratory load increases.Moreover, it can be seen that the higher the inspiratory load, the greater the mean and standard deviation of fSampEn evaluated over the EMGdi signal at each sampling frequency value (Figure 7b).ARV obtained mean values ranging from 0.02 to 0.03 and the standard deviation values ranged from 0.0035 to 0.009.RMS showed mean and standard deviation values ranging from 0.04 to 0.045 and from 0.005 to 0.01, respectively.The ranges of the mean and standard deviation values for fSampEn depend on the sampling frequency: ranges from 0.52 to 0.89 and from 0.10 to 0.28, respectively, at 500 Hz, and from 0.17 to 0.31 and from 0.03 to 0.12, respectively, at 2000 Hz.

Effect of Sampling Frequency on fSampEn
Figure 7a,c,e depict representative traces of the fSampEn, ARV, and RMS parameters calculated over the EMGdi signal (quiet breathing), sampled at 2000 Hz and decimated at sampling frequencies of 1500, 1000 and 500 Hz.It can be seen that as the sampling frequency of the EMGdi signal decreases, the offset and dispersion of the amplitude of the fSampEn calculated over the EMGdi signals increase, whereas for the ARV and RMS these remain constant.The effect produced in the offset and dispersion of the amplitude when calculating the fSampEn, ARV and RMS over resampled EMGdi signals was assessed by analyzing changes in the mean and standard deviation of these parameters at each level of inspiratory load.As shown in Figure 7b,d,f, the mean and standard deviation of the three parameters are greater as the inspiratory load increases.Moreover, it can be seen that the higher the inspiratory load, the greater the mean and standard deviation of fSampEn evaluated over the EMGdi signal at each sampling frequency value (Figure 7b).ARV obtained mean values ranging from 0.02 to 0.03 and the standard deviation values ranged from 0.0035 to 0.009.RMS showed mean and standard deviation values ranging from 0.04 to 0.045 and from 0.005 to 0.01, respectively.The ranges of the mean and standard deviation values for fSampEn depend on the sampling frequency: ranges from 0.52 to 0.89 and from 0.10 to 0.28, respectively, at 500 Hz, and from 0.17 to 0.31 and from 0.03 to 0.12, respectively, at 2000 Hz.The variation associated with the mean and standard deviation values when calculating fSampEn over sampled EMGdi signals using different sampling frequencies limits proper evaluation.For this reason, to reduce the inherent variability of using the fSampEn parameter the values were normalized.This consisted of subtracting the mean of the fSampEn and then dividing by the standard deviation value, as shown in Figure 8 [26].The variation associated with the mean and standard deviation values when calculating fSampEn over sampled EMGdi signals using different sampling frequencies limits proper evaluation.For this reason, to reduce the inherent variability of using the fSampEn parameter the values were normalized.This consisted of subtracting the mean of the fSampEn and then dividing by the standard deviation value, as shown in Figure 8 [26].Figure 9 shows a boxplot of the Pearson's correlation coefficient for the Pmouth signal and the fSampEn, ARV and RMS parameters calculated over EMGdi sampled at different frequencies (from 500 to 2000 Hz, in increments of 250 Hz).As reported, the fSampEn parameter obtained the highest median correlation values (range 0.56 to 0.82) at each level of inspiratory load when compared with ARV (range 0.33 to 0.77) and RMS (range 0.17 to 0.68).However, unlike the latter two, fSampEn revealed a slight dispersion, reflected by the interquartile range of its correlation values.Furthermore, Rtot showed the highest median correlation values (0.82) when the inspiratory load increased.The correlation analysis showed significant positive R values (p < 0.001) between Pmouth and the parameters of respiratory muscle EMGdi at any imposed inspiratory load.Figure 9 shows a boxplot of the Pearson's correlation coefficient for the Pmouth signal and the fSampEn, ARV and RMS parameters calculated over EMGdi sampled at different frequencies (from 500 to 2000 Hz, in increments of 250 Hz).As reported, the fSampEn parameter obtained the highest median correlation values (range 0.56 to 0.82) at each level of inspiratory load when compared with ARV (range 0.33 to 0.77) and RMS (range 0.17 to 0.68).However, unlike the latter two, fSampEn revealed a slight dispersion, reflected by the interquartile range of its correlation values.Furthermore, Rtot showed the highest median correlation values (0.82) when the inspiratory load increased.The correlation analysis showed significant positive R values (p < 0.001) between Pmouth and the parameters of respiratory muscle EMGdi at any imposed inspiratory load.Figure 9 shows a boxplot of the Pearson's correlation coefficient for the Pmouth signal and the fSampEn, ARV and RMS parameters calculated over EMGdi sampled at different frequencies (from 500 to 2000 Hz, in increments of 250 Hz).As reported, the fSampEn parameter obtained the highest median correlation values (range 0.56 to 0.82) at each level of inspiratory load when compared with ARV (range 0.33 to 0.77) and RMS (range 0.17 to 0.68).However, unlike the latter two, fSampEn revealed a slight dispersion, reflected by the interquartile range of its correlation values.Furthermore, Rtot showed the highest median correlation values (0.82) when the inspiratory load increased.The correlation analysis showed significant positive R values (p < 0.001) between Pmouth and the parameters of respiratory muscle EMGdi at any imposed inspiratory load.

Discussion
Analyzing the EMGdi signal is a potential method for measuring respiratory effort in clinical studies.However, the EMGdi signal has the drawback of being affected by ECG interference.This cardiac contamination greatly affects the performance of the classical ARV and RMS parameters, which are the most commonly used EMGdi amplitude estimators.To overcome this inherent problem of cardiac activity, fSampEn, a technique that is robust against impulsive noise has previously been introduced [20,21].This technique has the advantage of avoiding excessive filtering of the EMGdi signal while preserving most of its spectral information [20,29].fSampEn is based on the SampEn technique and quantifies the amplitude variation of the complex components of the EMGdi signal while being less sensitive to deterministic signals, such as ECG.
Unlike ARV and RMS, fSampEn requires the adjustment of its input parameters m, r, and the total length of the data.To date, there is no consensus about the optimal values or the method required to select suitable m and r values for fSampEn.For SampEn, several works recommend m values of 1 or 2 and r values within the range of 0.1 to 0.25 times the standard deviation of the signal in the local window of analysis [18,30,31].However, this set of values does not ensure the accurate measurement of complexity [28].Furthermore, the selection of m and r values depends on the nature of the signals.In this study, we determined that m equal to 1 and r ranging from 0.1 to 0.64, and m equal to 2 and r ranging from 0.13 to 0.45, are suitable values for appropriately evaluating respiratory activity and respiratory effort with fSampEn of the surface EMGdi signals recorded at different inspiratory loads.These results are in agreement with those proposed in previous studies [20,22], as well as when studying mechanical respiratory muscle activity [21], where it has been suggested that m equal to 1 and r equal to 0.3 times the standard deviation of the whole signal be used.However, in this study, we observed that different values within the proposed set of m and r parameters yield similar results.
The effect of the moving window size is key in the evaluation of respiratory electromyographic signals.Properly selecting this establishes a tradeoff between greater or lesser smoothing of the EMGdi signals.In this work, the fSampEn, ARV, and RMS parameters were calculated over a moving window of analysis with an overlap.It was observed that the ARV and RMS parameters were more sensitive to the moving window size calculated over the surface EMGdi signal when compared to fSampEn, since there is a clear dependence between the frequency response of the moving average filter and cardiac frequency (Figure 4).Interestingly, ARV and RMS only performed well when the cardiac frequency matched one zero of the moving average filter.Notably, of the three parameters, fSampEn was the least sensitive to window size and ECG signal.Moreover, it obtained the highest correlation values when compared to the Pmouth signal, indicating the high performance of the parameter in the presence of cardiac noise.This result was more evident for quiet breathing, where ECG activity was found to be higher with respect to the surface EMGdi signal (lower signal to noise ratio).
Pmouth provides a reasonable approximation of the muscular effort during inspiration and could be used as a global reference index for synergistic respiratory muscle action.The Pearson's correlation coefficient between Pmouth and all EMGdi parameters (fSampEn, ARV, and RMS) showed an increasing trend and reduced variability with increased inspiratory load (higher signal to noise ratio).The effect of using different processing window lengths and overlaps has been addressed in a study of surface electromyographic signals recorded in the gluteus maximus using the RMS parameter [32].As proposed in that paper, the processing window length affects reliability and interindividual variability, mainly at the peak value of the electromyographic signal followed by its mean value.It was also observed that a 1 s window had less variability when compared to shorter windows [32].Furthermore, the robustness of SampEn has been evaluated in short datasets recorded from the musculoskeletal system [33].In that study, it was shown that SampEn is highly sensitive to input parameter selection, particularly when the analyzed data involves less than 200 samples [33].The authors suggested that window lengths larger than 200 samples stabilize SampEn results.The smallest number of samples used in this study was 200, therefore fulfilling the same criteria to ensure stability in the calculations made with fSampEn.
Another issue, that of sampling frequency, is also important when acquiring surface electromyographic signals.Its use affects the number of samples in the window analysis.The effect of sampling frequency on surface electromyographic recordings has been studied during isometric contractions in the biceps [34].This was assessed using quality of muscle fatigue detection algorithms based on spectral parameters, as well as SampEn [34].This latter was evaluated using subsampled electromyographic signals in the range of 256 to 1024 Hz.The authors found that SampEn is more sensitive to sampling frequency than frequency-based methods in muscle fatigue studies.Moreover, they suggest that the choice of the input SampEn parameters strongly depends on the sampling frequency [34].In other related work, Rhea et al. suggests that the influence of noise and sampling frequency can yield inconsistent results and erroneous data interpretation when using SampEn [35].In this study, we also report that the fSampEn measurements were strongly dependent on the sampling frequency of the surface EMGdi signal.As a direct consequence of fSampEn, varying the number of samples in the time window of analysis influenced the offset (mean) and range of values (standard deviation) of fSampEn.We observed that the lower the sampling frequency, the higher the mean and the standard deviation of fSampEn calculated over the surface EMGdi signal.However, the mean and standard deviation of ARV and RMS remained constant during the study.Importantly, variations in sampling frequency could influence fSampEn results.Therefore, the same sampling frequency must be used to compare different respiratory effort values estimated with the fSampEn of EMGdi signals.The Pearson's correlation coefficient for the Pmouth signal and fSampEn calculated over the subsampled EMGdi signals revealed slight variability compared to ARV and RMS.This variation in our results can be attributed to the inherent non-constant values of the mean and standard deviation when using different sampling frequencies.Importantly, the EMGdi signal was not evaluated below a sampling frequency of 500 Hz because most of the distribution of power of inspiratory diaphragmatic activity is concentrated in a bandwidth of 25-250 Hz [36].As would be expected, each derived inspiratory muscle variable showed a similarly increasing trend to that observed when varying the window size, with fSampEn performing better as the inspiratory load increased.
One limitation of this study is the very small sample size (n = 1), which could limit the generalization of the results.Nevertheless, the sample was sufficient to reveal a strong, statistically significant correlation between Pmouth and fSampEn of the EMGdi signals.Furthermore, the present findings are consistent with a previous study of five healthy subjects [20].However, the optimal values of fSampEn parameters could vary between diseased and healthy subjects, although in previous studies of COPD patients [23] and healthy subjects [21] similar fSampEn parameters (m = 1 and r = 0.3 times the global SD) were used to compute the fSampEn of respiratory mechanomyographic signals.Therefore, future studies should examine a large sample size of healthy subjects and patients with respiratory diseases to confirm the obtained results.Another limitation is the fact that this study was designed to evaluate respiratory effort in the seated position, whereas some respiratory applications, such as sleep studies, are generally interested in evaluating respiratory effort in the supine position.The inspiratory load protocol used in this study provided us with a controlled scenario to properly vary the inspiratory load that allowed us to evaluate the influence of parameter selection in the fSampEn of surface EMGdi for estimating respiratory effort and, thus, assess the potential of the method.Finally, this study proposed fSampEn for estimating the entropy rate in muscle respiratory signals; however, fSampEn is not the only estimator of entropy, and further studies should be performed to analyze refined versions of conditional entropy, such as the model-free conditional entropy and linear model-based approaches [19].

Conclusions
fSampEn analysis is a robust technique that allows the evaluation of inspiratory effort in muscle respiratory signals, and has potential utility in clinical respiratory studies, in which respiratory effort has to be analyzed.It overcomes the high sensitivity problem of the classical ARV and RMS parameters when evaluating EMGdi signals in the presence of an ECG signal.However, to appropriately evaluate respiratory activity at different levels of diaphragm activation the m and r values, and the size of the moving window of fSampEn must be carefully selected.In this work, we have established a range of suitable values for estimating respiratory activity using the fSampEn of EMGdi signals.Values of m and r of 1 and 0.3 times the standard deviation of the whole signal, respectively, and a window size of 1 s, ensure adequate estimation of the respiratory activity when using the fSampEn of EMGdi signals.Moreover, variations in the sampling frequency of the EMGdi signal influence the offset and amplitude of fSampEn results.In this sense, special attention should be paid when evaluating muscle respiratory signals using distinct sampling frequencies at different levels of inspiratory effort.In conclusion, this study describes the potential utility of fSampEn as a technique for improving the estimation of muscle respiratory effort in clinical respiratory studies.

Figure 1 .
Figure 1.(a) Pmouth and (b) EMGdi signals recorded during the inspiratory load protocol.L0 to L4 are the increments in the inspiratory load corresponding to quiet breathing, 9, 17, 25, and 33 cm H 2 O.

Figure 2 15 Figure 2 .
Figure2shows representative traces of the fSampEn calculated over the EMGdi signal recorded during quiet breathing for m = 1 and 2 with different r values.It can be observed that in both cases, as r

Figure 3 .
Figure 3. Pearson's correlation coefficient for the Pmouth signal and the fSampEn of the EMGdi signal (resampled to 1000 Hz) during quiet breathing (R0) and using the set of all inspiratory loads (Rtot).fSampEn was determined for (a) m = 1 and (b) m = 2, and, in both cases, for r values ranging from 0.01 to 1, using a 1 s moving window.The shaded area represents the range of r values in which the R is higher than 99.5% of the maximum value of (R0 + Rtot)/2.

Figure 2 .
Figure 2. fSampEn technique calculated over the EMGdi signal using (a) m = 1 and (b) m = 2, with representative values of r = 0.15, 0.30, 0.45, and 0.75, a 1 s moving window, and EMGdi resampled to 1000 Hz.The EMGdi signal corresponds to 60 s of quiet breathing (with low diaphragm activity).fSampEnwas calculated over the EMGdi signal using a 1 s moving window and a 90% overlap.

Figure 2 .
Figure 2. fSampEn technique calculated over the EMGdi signal using (a) m = 1 and (b) m = 2, with representative values of r = 0.15, 0.30, 0.45, and 0.75, a 1 s moving window, and EMGdi resampled to 1000 Hz.The EMGdi signal corresponds to 60 s of quiet breathing (with low diaphragm activity).fSampEnwas calculated over the EMGdi signal using a 1 s moving window and a 90% overlap.

Figure 3 .
Figure 3. Pearson's correlation coefficient for the Pmouth signal and the fSampEn of the EMGdi signal (resampled to 1000 Hz) during quiet breathing (R0) and using the set of all inspiratory loads (Rtot).fSampEn was determined for (a) m = 1 and (b) m = 2, and, in both cases, for r values ranging from 0.01 to 1, using a 1 s moving window.The shaded area represents the range of r values in which the R is higher than 99.5% of the maximum value of (R0 + Rtot)/2.

Figure 3 .
Figure 3. Pearson's correlation coefficient for the Pmouth signal and the fSampEn of the EMGdi signal (resampled to 1000 Hz) during quiet breathing (R0) and using the set of all inspiratory loads (Rtot).fSampEn was determined for (a) m = 1 and (b) m = 2, and, in both cases, for r values ranging from 0.01 to 1, using a 1 s moving window.The shaded area represents the range of r values in which the R is higher than 99.5% of the maximum value of (R0 + Rtot)/2.

Figure 4 .
Figure 4. (a) fSampEn, (b) ARV, and (c) RMS calculated over the EMGdi signal using moving window sizes of 0.2, 0.6, 0.9 and 1.6 s with 90% overlap.The EMGdi signal was resampled to 1000 Hz and corresponds to 15 s of quiet breathing (with low diaphragm activity).fSampEn was set to m equal to 1, with r at 0.3 times the standard deviation of the whole EMGdi signal.

Figure 4 .
Figure 4. (a) fSampEn, (b) ARV, and (c) RMS calculated over the EMGdi signal using moving window sizes of 0.2, 0.6, 0.9 and 1.6 s with 90% overlap.The EMGdi signal was resampled to 1000 Hz and corresponds to 15 s of quiet breathing (with low diaphragm activity).fSampEn was set to m equal to 1, with r at 0.3 times the standard deviation of the whole EMGdi signal.

Figure 5 .
Figure 5.The frequency response of moving average filters for a window size (D) of 0.2, 0.6, 0.9, and 1.6 s.Vertical dashed red and green lines correspond to cardiac and respiratory frequencies, respectively, for the EMGdi shown in Figure 4.

Figure 5 .
Figure 5.The frequency response of moving average filters for a window size (D) of 0.2, 0.6, 0.9, and 1.6 s.Vertical dashed red and green lines correspond to cardiac and respiratory frequencies, respectively, for the EMGdi shown in Figure 4.

Figure 6 .
Figure 6.Box-plot for comparing Pearson's correlation coefficient (R) between the Pmouth signal and each of fSampEn, ARV and RMS of the EMGdi signal calculated using 20 moving windows of analysis of different lengths, ranging from 0.1 s to 2 s in increments of 0.1 s, at each of inspiratory load (L0 to L4) and for the whole signal (Ltot).A significant positive correlation (p < 0.001) was found at any imposed load.fSampEn was set to m equal to 1, with r at 0.3 times the standard deviation of the whole EMGdi signal.The EMGdi was resampled to 1000 Hz.

Figure 7 .
Figure 7. (a) fSampEn, (c) ARV and (e) RMS parameters calculated over the EMGdi signal recorded during quiet breathing, sampled originally at 2000 Hz and decimated at sampling frequencies of 1500, 1000 and 500 Hz.(b,d,f) correspond to the mean (left column) and the standard deviation (right column) of the fSampEn, ARV, and RMS parameters calculated over sampled EMGdi signals at different levels of inspiratory load.L0 to L4 are the increments in the inspiratory load from quiet breathing, 9, 17, 25, and 33 cm H2O, respectively.The three parameters were calculated over EMGdi signals using a 1 s moving window and a 90% overlap.fSampEn was set to m equal to 1, with r at 0.3 times the standard deviation of the whole EMGdi signal.

Figure 7 .
Figure 7. (a) fSampEn, (c) ARV and (e) RMS parameters calculated over the EMGdi signal recorded during quiet breathing, sampled originally at 2000 Hz and decimated at sampling frequencies of 1500, 1000 and 500 Hz.(b,d,f) correspond to the mean (left column) and the standard deviation (right column) of the fSampEn, ARV, and RMS parameters calculated over sampled EMGdi signals at different levels of inspiratory load.L0 to L4 are the increments in the inspiratory load from quiet breathing, 9, 17, 25, and 33 cm H 2 O, respectively.The three parameters were calculated over EMGdi signals using a 1 s moving window and a 90% overlap.fSampEn was set to m equal to 1, with r at 0.3 times the standard deviation of the whole EMGdi signal.

Figure 8 .
Figure 8. Normalized fSampEn calculated over EMGdi signals recorded during quiet breathing, and decimated at sampling frequencies of (a) 500 Hz, (b) 1000 Hz, (c) 1500 Hz, and (d) 2000 Hz, using a 1 s moving window and a 90% overlap.Normalization consists of subtracting the mean of fSampEn and then dividing by its standard deviation value.

Figure 9 .
Figure 9. Box-plot for comparing the Pearson's correlation coefficient for the Pmouth signal and the fSampEn, ARV, and RMS parameters calculated over the EMGdi sampled at different frequencies, ranging from 500 Hz to 2000 Hz in increments of 250 Hz, at each level of inspiratory load (L0 to L4) and for the whole signal (Ltot).A significant positive correlation (p < 0.001) was found at any imposed load.fSampEn was set to m equal to 1, with r at 0.3 times the standard deviation of the whole EMGdi signal.The three parameters were calculated over EMGdi signals using a 1 s moving window and a 90% overlap.

Figure 8 .
Figure 8. Normalized fSampEn calculated over EMGdi signals recorded during quiet breathing, and decimated at sampling frequencies of (a) 500 Hz, (b) 1000 Hz, (c) 1500 Hz, and (d) 2000 Hz, using a 1 s moving window and a 90% overlap.Normalization consists of subtracting the mean of fSampEn and then dividing by its standard deviation value.

Entropy 2017, 19 , 460 10 of 15 Figure 8 .
Figure 8. Normalized fSampEn calculated over EMGdi signals recorded during quiet breathing, and decimated at sampling frequencies of (a) 500 Hz, (b) 1000 Hz, (c) 1500 Hz, and (d) 2000 Hz, using a 1 s moving window and a 90% overlap.Normalization consists of subtracting the mean of fSampEn and then dividing by its standard deviation value.

Figure 9 .
Figure 9. Box-plot for comparing the Pearson's correlation coefficient for the Pmouth signal and the fSampEn, ARV, and RMS parameters calculated over the EMGdi sampled at different frequencies, ranging from 500 Hz to 2000 Hz in increments of 250 Hz, at each level of inspiratory load (L0 to L4) and for the whole signal (Ltot).A significant positive correlation (p < 0.001) was found at any imposed load.fSampEn was set to m equal to 1, with r at 0.3 times the standard deviation of the whole EMGdi signal.The three parameters were calculated over EMGdi signals using a 1 s moving window and a 90% overlap.

Figure 9 .
Figure 9. Box-plot for comparing the Pearson's correlation coefficient for the Pmouth signal and the fSampEn, ARV, and RMS parameters calculated over the EMGdi sampled at different frequencies, ranging from 500 Hz to 2000 Hz in increments of 250 Hz, at each level of inspiratory load (L0 to L4) and for the whole signal (Ltot).A significant positive correlation (p < 0.001) was found at any imposed load.fSampEn was set to m equal to 1, with r at 0.3 times the standard deviation of the whole EMGdi signal.The three parameters were calculated over EMGdi signals using a 1 s moving window and a 90% overlap.