Neural Plasticity

Neural Plasticity / 2021 / Article
Special Issue

Large-Scale Neuroscience and Neural Plasticity

View this Special Issue

Research Article | Open Access

Volume 2021 |Article ID 6675052 |

Qiang Yin, Dai Shen, Qian Ding, "Influence of Sliding Time Window Size Selection Based on Heart Rate Variability Signal Analysis on Intelligent Monitoring of Noxious Stimulation under Anesthesia", Neural Plasticity, vol. 2021, Article ID 6675052, 8 pages, 2021.

Influence of Sliding Time Window Size Selection Based on Heart Rate Variability Signal Analysis on Intelligent Monitoring of Noxious Stimulation under Anesthesia

Academic Editor: Jianzhong Su
Received04 Dec 2020
Revised15 May 2021
Accepted24 May 2021
Published07 Jun 2021


In recent decades, little progress of objective evaluation of pain and noxious stimulation has been achieved under anesthesia. Some researches based on medical signals have failed to provide a general understanding of this problem. This paper presents a feature extraction method for heart rate variability signals, aiming at further improving the evaluation of noxious stimulation. In the process of data processing, the empirical mode decomposition is used to decompose and recombine heart rate variability signals, and the sliding time window approach is used to extract the signal features of noxious stimulation, respectively. The influence of window size on feature extraction is studied by changing the window size. By comparing the results, the feature extraction in the process of data processing is valuable, and the selection of window size has a significant impact. With the increase of selected window sizes, we can get better detection results. But for the best choice of window size, to ensure the accuracy of the results and to make it easy to use, then, we need to get just a suitable window size.

1. Introduction

The clinical anesthesiologists must know whether the patient is sufficiently anesthetized to tolerate direct laryngoscopy and tracheal intubation. In the absence of an accurate and objective method to determine the level of general anesthesia, this can lead to conditions such as under- or overdose of anesthesia [1]. Patients may be adequately anesthetized for a given stimulus level, but when faced with other more intense stimuli, such as tracheal intubation, there is a risk of underanesthesia. Current anesthesia depth monitors are accurate in assessing the hypnotic component of general anesthesia but are less reliable in assessing the analgesic and reflex inhibition components of anesthesia [2]. We hope to use a more effective tool to solve this problem.

A significant relationship between the autonomic nervous system and many physiological factors modulating has been investigated during the last several decades. Heart rate variability (HRV) has been proposed as a method to be able to measure the stress response and the balance of analgesia and nociception in real-time when patients are under general anesthesia by assessing the autonomic nervous system [3, 4], making it possible to objectively evaluate noxious stimulation through HRV analysis. By comparison, HRV represents one of the most promising indicators. The easy derivation of this method has popularized its use. It is also seen as a simple tool for both theoretical research and clinical research. However, the significance of many different measures of HRV is more complex than generally appreciated and there is a potential for incorrect conclusions and excessive or unfounded extrapolations.

HRV analysis is a tool that can be used to observe the interaction of the sympathetic and parasympathetic nervous systems [5]. The quantification methods of HRV are categorized as follows: time domain, frequency domain, and nonlinear methods [6]. In time-domain analysis, the intervals between adjacent normal R waves are measured over the period of recording. Various statistical variables can be calculated directly from the differences between intervals and intervals. Traditionally, spectral analyses are always adopted in short-term studies, and often standard 5-minute electrocardiograph (ECG) segments are analyzed. A large number of nonlinear measures of HRV have been studied, but only a few have shown clear utility. Many practical applications of HRV analysis use different time domains, frequency domain, and nonlinear analysis techniques [710]. The features of HRV signals are of great and practical benefits for early diagnosis, monitoring, and prognostic assessments of the diseases [11, 12]. Combined efforts of clinicians and engineers have made it possible to use the data extracted from the heart rate variability to aid the diagnosis and prediction of various heart diseases as well as ailments originating from different human organs but indirectly influencing the autonomous nervous system. A lot of methods of nonlinear dynamics (e.g., estimating Lyapunov exponents) and complexity measures (e.g., correlation dimension or entropies) have been applied to HRV analysis [1316]. In recent years, empirical modal decomposition (EMD) of nonlinear and nonstationary time series has been proposed. This signal analysis technique is used for the analysis of HRV signals and other signals [7, 8, 1720]. To accurately extract the features of the signals, the time window method can be used to accurately set the size of the time window for more effective feature recognition [21]. In recent years, neural networks have received increasing attention for medical applications and are gradually being used in clinical practice, but direct application of neural networks has not led to more general conclusions in medical signal analysis, so aiding appropriate signal feature extraction may be more effective than specific classification methods [15, 22, 23]. Applying these research methods properly will give a great advancement to the research of revealing the underlying law and physical nature of HRV.

Based on the abovementioned physiological basis and research methods, the sliding time window method is introduced to extract the features of noxious stimulation in HRV analysis, thus aiding the classification method, and we need to study the effect of window size on feature extraction.

2. Materials and Methods

2.1. Data Collection

This study has been approved by the Ethics Committee of the hospital, and all patients have signed the informed consent. Sixty individuals (ASA grade I or II, all genders, age 18~60, BMI<30 kg/m2) have undergone oral and maxillofacial surgery under general anesthesia. Exclusion criteria: the diseases are known to affect autonomic nerve function.

ECG signals are continuously recorded by BMD101 (NeuroSky Inc.) at a sampling rate of 512 Hz and stored in the computer during perioperation. Signal processing is conducted to form the RR intervals to be analyzed. Three kinds of signals are obtained from the RR intervals: preoperative (T0), intubation (T1), and intraoperative (T2). In this study, all we need are the T1 and T2 signals. The T1 signals represent the occurrence of a noxious stimulation during anesthesia. T2 signals mean that only during anesthesia. The original RR intervals from the ECG signal are a function of the number of heartbeats instead of the time. To make the RR intervals be the function of the time, the signals are resampled using cubic spline at a sampling rate of 8 Hz as recommended for HRV studies [24].

2.2. Empirical Mode Decomposition

The EMD method is that any complicated signal can be decomposed into a finite and often small number of intrinsic mode functions (IMF). Since the decomposition is based on the intrinsic timescale of the signal, it is suitable for nonstationary signals [25]. The IMFs are computed by the sifting process, which is an iteratively detrending operation. To extract IMFs from a given signal , the procedure is described as follows:

Step 1: confirm all the local extrema

Step 2: generated the upper envelope and lower envelope by the local maxima and minima by using the cubic spline

Step 3: calculate the means of the upper envelope and the lower envelope as

Step 4: compute the IMF candidate by the difference between and ; it can only be considered as an IMF if it meets the sifting stopping criteria

Step 5: compute the residue by the difference between and the IMF

Step 6: repeat the above steps until is decomposed into a finite number of IMFs and one residue, and the residue is either a steady trend or a constant.

EMD decomposes the nonstationary signal into a finite set of IMFs without information loss or distortion [19]. In this study, IMFs need to be recombined according to requirements to become the feature signals.

2.3. Sliding Time Window Method

The sliding time window (STW) method is a very effective feature extraction method. However, determining the optimal value for the window size is an important and difficult problem. The size of the sliding time window will affect the effect of feature extraction. If the size is too large, features may be confused together, affecting the accuracy of the results and increasing the computational load. On the contrary, if the size is too small, the features cannot be extracted completely, so that better results cannot be obtained [21].

The appropriate size of STW can be selected according to the characteristics of the research object. The size range of STW is generally determined according to the target object or application requirements under the guidance of prior knowledge. For this study, we can further compare the effects of different sizes of STW on feature extraction, to establish the selection criteria. This is also possible to explore the relationship between window size selection and the autonomic nervous system.

2.4. Model Building

In this work, we are interested in how to accurately detect noxious stimulation during anesthesia. Firstly, RR interval signals are decomposed and recombined into high-frequency (HF) component signals and low-frequency (LF) component signals, corresponding to sympathetic and parasympathetic activity in the autonomic nervous system, respectively. Secondly, the signal features of noxious stimulation are reflected in LF component signals, and LF signals are processed by the sliding time window method for feature extraction. Finally, the feature is extracted as the input to the deep neural network to determine whether the noxious stimulation (tracheal intubation stimulation) occurs under general anesthesia.

The long short-term memory (LSTM) network is used in the deep neural network model. The deep neural network model has the capability of feature extraction, so the RR intervals are directly used as the input to the deep neural network, and the results can be obtained directly by training the deep learning model. The results obtained by using raw data directly are compared with those obtained by extracting features with different time window sizes. This comparison can reflect whether the features obtained in the data processing are representative and whether they have a significant impact on the results.

3. Results

During the study period, the RR interval signals are from 60 patients, and a total of 104 signals are selected for the investigation after the screening, which includes 42 T1 signals and 62 T2 signals. These signals are randomly divided into 71 for the training set, 15 for the validation set, and 18 for the test set.

In the process of preprocessing RR interval signals, uniform time-domain sampling is obtained through cubic spline piecewise interpolation, which makes the RR series more suitable for feature extraction. In the frequency domain, the spectrum of the short-term HRV signal can be distinguished into several frequency bands [26]. These bands are referred to as the high frequency (HF) band (0.15 Hz to 0.4 Hz), the low frequency (LF) band (0.04 Hz to 0.15 Hz), and the very low-frequency band (VLF), i.e., bands less than 0.04 Hz [18]. Here, we combine the LF and VLF bands and consider them both as LF bands uniformly. Hence, using the EMD to decompose the resampled RR interval sequence into limited IMF components and performing spectrum analysis on each IMF, the results shown in Figure 1 indicate that the HF components (0.15~0.4 Hz) and LF components (0.04~0.15 Hz) are distinguished. By recombining the HF IMF component and the LF IMF component separately, two feature signals corresponding to autonomic nervous system regulation are formed, as shown in Figure 2. The HF band reflects only parasympathetic changes, while the LF band reflects changes in sympathetic and some other stress responses. Under general anesthesia, the HF component with tracheal intubation is similar to the HF component without tracheal intubation, and the LF components are significantly different.

The LF component signals with the tracheal intubation stimulation have the obvious feature, and the feature extraction of noxious stimulation is completed within the STW, as shown in Figures 3 and 4. The extracted feature is the difference between the left endpoint and the right endpoint of the LF component signal within the STW. We can get different feature results for different window sizes, and by comparing these results, we can choose the best one. The minimum window size is 100 resampling points, and each increase of 50 sampling points is used to extract the feature results of the LF signal once. As shown in Figure 3, the window size is between 100 and 300 sampling points. We can find that the features of noxious stimulation have been extracted and the features become better and better as the window size increases. The extracted features have a corresponding change in amplitude when the noxious stimulation occurs. In Figure 4, we can see that as the number of sampling points increases gradually, the features that can be extracted become more obvious. This indicates that the window size directly affects the effect of feature extraction, and the larger the window size is, the more significant the effect is. For such a result, we finally select the features extracted from 150,250,350,450,550,650 sampling points to verify the effect.

Because the total number of signals we have is very limited, we have to verify the results multiple times for each window size. As shown in Figure 5, we can obtain that the accuracy of detecting the noxious stimulation corresponding to different window sizes is 77.8%, 88.9%, 83.3%, 88.9%, 88.9%, and 94.4%. By comparing the results, we conclude that the feature extraction in the process of data processing is valuable, and the selection of window size has a significant impact. If the window size is relatively small, the extracted features are concentrated in a small area of the signal, which makes the features of a small area of the signal less easy to capture. However, as the window size gradually increases, the STW method can easily capture the feature differences between different states.

As shown in Figure 6, the data are directly fed into the LSTM network [27] for training on the same dataset, so that the corresponding results can be obtained. Due to the limited number of signals, the data set is randomly divided into training and test sets several times to obtain multiple results. Comparing with the results obtained by the method proposed in this paper, the results obtained by the method in this paper are more satisfactory.

4. Discussion

In this study, ECG signals are collected under general anesthesia, and then, RR interval signals are obtained. HRV analysis includes time-domain, frequency-domain, and nonlinear analysis. Although these methods have been widely used, they still have limitations. HRV analysis has a good physiological basis for the evaluation of the autonomic nervous system; however, because HRV signals contain many complex components, no significant progress has been made in analytical methods and applications for many years. To solve this problem, the RR intervals are decomposed into the HF component and the LF component, corresponding to the autonomic nervous system. Under anesthesia, the HF component with the tracheal intubation stimulation is similar to the hf component without the tracheal intubation stimulation, and the LF components are significantly different, as shown in Figure 7.

In the research, the size of samples is relatively limited. To better address this limitation, it is very important to extract the common features of the signals. The quality of the signal features is also critical. If good enough signal features can be extracted, excellent results can also be obtained in the case of a limited number of signals. The conclusion of small sample data depends on the extraction effect of features.

Different sizes of STW have a definite effect on feature extraction. With the increase of selected window sizes, we can get better detection results. Although better results can be obtained when the window size is larger, it affects the real-time performance and practicability of detection. We should make the optimal choice under these conditions, it not only ensures the accuracy of the result but also makes it easy to use and operate, so we need to select the size of the window not to be too big. We also have to make sure that the effect is good and that the window size is chosen following autonomic nervous system regulation.

Although the method we proposed has achieved good results on this data set, the method of feature extraction is relatively single, which makes this method only applies to the situation of significant signal fluctuations, and more diverse feature extraction methods will be added in the future. Secondly, although the selection law of window size has been clear, different STW sizes may be adopted for signals in different states. Therefore, we need to further explore the adaptive STW to deal with signal feature extraction in various states. Finally, we will collect more signals for further research.

5. Conclusions

By comparing the results, we can find that feature extraction is valuable in data processing, and the selection of window size has a great impact. To balance the practical effect, it is necessary to choose an appropriate window size and follow the regulation rules of the autonomic nervous system.

Data Availability

The data that support the findings of this study are available from the corresponding author on reasonable request.

Conflicts of Interest

The authors declare that there is no conflict of interest regarding the publication of this article.


  1. S. Alpiger, H. S. Helbo-Hansen, W. Vach, and H. Ording, “Efficacy of A-line™ AEP Monitor as a tool for predicting acceptable tracheal intubation conditions during sevoflurane anaesthesia,” British Journal of Anaesthesia, vol. 94, no. 5, pp. 601–606, 2005. View at: Publisher Site | Google Scholar
  2. M. M. R. F. Struys, H. Vereecke, A. Moerman et al., “Ability of the bispectral index, autoregressive modelling with exogenous input-derived auditory evoked potentials, and predicted Propofol concentrations to measure patient responsiveness during anesthesia with propofol and remifentanil,” Anesthesiology, vol. 99, no. 4, pp. 802–812, 2003. View at: Publisher Site | Google Scholar
  3. B. Lown and R. L. Verrier, “Neural activity and ventricular fibrillation,” The New England Journal of Medicine, vol. 294, no. 21, pp. 1165–1170, 1976. View at: Publisher Site | Google Scholar
  4. T. A. Anderson, “Heart rate variability: implications for perioperative anesthesia care,” Current Opinion in Anesthesiology, vol. 30, no. 6, pp. 691–697, 2017. View at: Publisher Site | Google Scholar
  5. U. Rajendra Acharya, K. Paul Joseph, N. Kannathal, C. M. Lim, and J. S. Suri, “Heart rate variability: a review,” Medical & Biological Engineering & Computing, vol. 44, no. 12, pp. 1031–1051, 2006. View at: Publisher Site | Google Scholar
  6. R. E. Kleiger, P. K. Stein, and J. T. Bigger, “Heart rate variability: measurement and clinical utility,” Annals of Noninvasive Electrocardiology, vol. 10, no. 1, pp. 88–101, 2005. View at: Publisher Site | Google Scholar
  7. H. Li, S. Kwong, L. Yang, D. Huang, and D. Xiao, “Hilbert-Huang transform for analysis of heart rate variability in cardiac health,” IEEE/ACM Transactions on Computational Biology and Bioinformatics, vol. 8, no. 6, pp. 1557–1567, 2011. View at: Publisher Site | Google Scholar
  8. J. R. Yeh, S. Z. Fan, and J. S. Shieh, “Human heart beat analysis using a modified algorithm of detrended fluctuation analysis based on empirical mode decomposition,” Medical Engineering & Physics, vol. 31, no. 1, pp. 92–100, 2009. View at: Publisher Site | Google Scholar
  9. E. A. F. Ihlen, “A comparison of two Hilbert spectral analyses of heart rate variability,” Medical Biological Engineering Computing, vol. 47, no. 10, pp. 1035–1044, 2009. View at: Publisher Site | Google Scholar
  10. Y. Zhong, Y. Bai, B. Yang et al., “Autonomic nervous nonlinear interactions lead to frequency modulation between low- and high-frequency bands of the heart rate variability spectrum,” American Journal of Physiology-Regulatory, Integrative and Comparative Physiology, vol. 293, no. 5, pp. R1961–R1968, 2007. View at: Publisher Site | Google Scholar
  11. C.-C. Chang, T.-C. Hsiao, and H.-Y. Hsu, “Frequency range extension of spectral analysis of pulse rate variability based on Hilbert–Huang transform,” Medical Biological Engineering Computing, vol. 52, no. 4, pp. 343–351, 2014. View at: Publisher Site | Google Scholar
  12. K. Kudrynski and P. Strumillo, “Real-time estimation of the spectral parameters of heart rate variability,” Biocybernetics and Biomedical Engineering, vol. 35, no. 4, pp. 304–316, 2015. View at: Publisher Site | Google Scholar
  13. C. Bian, C. Qin, Q. D. Y. Ma, and Q. Shen, “Modified Permutation-Entropy Analysis of Heartbeat Dynamics,” Physical Review E, vol. 85, no. 2, 2012. View at: Publisher Site | Google Scholar
  14. H. V. Huikuri, T. H. Mäkikallio, C. K. Peng, A. L. Goldberger, U. Hintze, and M. Møller, “Fractal correlation properties of R-R interval dynamics and mortality in patients with depressed left ventricular function after an acute myocardial infarction,” Circulation, vol. 101, no. 1, pp. 47–53, 2000. View at: Publisher Site | Google Scholar
  15. T. F. Tafreshi, M. R. Daliri, and M. Ghodousi, “Functional and effective connectivity based features of EEG signals for object recognition,” Cognitive Neurodynamics, vol. 13, no. 6, pp. 555–566, 2019. View at: Publisher Site | Google Scholar
  16. J. S. Richman and J. R. Moorman, “Physiological time-series analysis using approximate entropy and sample entropy,” American Journal of Physiology-Heart and Circulatory Physiology, vol. 278, no. 6, pp. H2039–H2049, 2000. View at: Publisher Site | Google Scholar
  17. J. C. Echeverría, J. A. Crowe, M. S. Woolfson, and B. R. Hayes-Gill, “Application of empirical mode decomposition to heart rate variability analysis,” Medical and Biological Engineering and Computing, vol. 39, no. 4, pp. 471–479, 2001. View at: Publisher Site | Google Scholar
  18. K. Shafqat, S. K. Pal, S. Kumari, and P. A. Kyriacou, “Empirical mode decomposition (EMD) analysis of HRV data from locally anesthetized patients,” in 2009 Annual International Conference of the IEEE Engineering in Medicine and Biology Society, pp. 2244–2247, Minneapolis, MN, USA, 2009. View at: Publisher Site | Google Scholar
  19. M. Feldman, “Hilbert transform in vibration analysis,” Mechanical Systems and Signal Processing, vol. 25, no. 3, pp. 735–802, 2011. View at: Publisher Site | Google Scholar
  20. J. Wang, G. Du, Z. Zhu, C. Shen, and Q. He, “Fault diagnosis of rotating machines based on the EMD manifold,” Mechanical Systems and Signal Processing, vol. 135, article 106443, 2020. View at: Publisher Site | Google Scholar
  21. C. Ma, W. Li, J. Cao, J. Du, Q. Li, and R. Gravina, “Adaptive sliding window based activity recognition for assisted livings,” Information Fusion, vol. 53, pp. 55–65, 2020. View at: Publisher Site | Google Scholar
  22. D. A. Hashimoto, E. Witkowski, L. Gao, O. Meireles, and G. Rosman, “Artificial intelligence in anesthesiology current techniques, clinical applications, and limitations,” Anesthesiology, vol. 132, no. 2, pp. 379–394, 2020. View at: Publisher Site | Google Scholar
  23. M. Cukic, M. Stokic, S. Simic, and D. Pokrajac, “The successful discrimination of depression from EEG could be attributed to proper feature extraction and not to a particular classification method,” Cognitive Neurodynamics, vol. 14, no. 4, pp. 443–455, 2020. View at: Publisher Site | Google Scholar
  24. C. Broucqsault-Dedrie, J. De Jonckheere, M. Jeanne, and S. Nseir, “Measurement of heart rate variability to assess pain in sedated critically ill patients: a prospective observational study,” Plos One, vol. 11, no. 1, article e0147720, p. e0147720, 2016. View at: Publisher Site | Google Scholar
  25. N. E. Huang, Z. Shen, S. R. Long et al., “The empirical mode decomposition and the Hilbert spectrum for nonlinear and non-stationary time series analysis,” Proceedings Mathematical Physical, vol. 454, no. 1971, pp. 903–995, 1998. View at: Publisher Site | Google Scholar
  26. M. Malik, J. T. Bigger, A. J. Camm et al., “Heart Rate variabilityStandards of Measurement, Physiological Interpretation, and Clinical Use,” 1996. View at: Google Scholar
  27. K. Greff, R. K. Srivastava, J. Koutník, B. R. Steunebrink, and J. Schmidhuber, “LSTM: a search space odyssey,” IEEE Transactions on Neural Networks and Learning Systems, vol. 28, no. 10, pp. 2222–2232, 2017. View at: Publisher Site | Google Scholar

Copyright © 2021 Qiang Yin et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Related articles

No related content is available yet for this article.
 PDF Download Citation Citation
 Download other formatsMore
 Order printed copiesOrder

Related articles

No related content is available yet for this article.

Article of the Year Award: Outstanding research contributions of 2021, as selected by our Chief Editors. Read the winning articles.