Skip to main content
Anatolian Journal of Cardiology logoLink to Anatolian Journal of Cardiology
. 2017 Jan 17;17(5):398–403. doi: 10.14744/AnatolJCardiol.2016.7436

Investigating the effect of traditional Persian music on ECG signals in young women using wavelet transform and neural networks

Behzad Abedi 1, Ataollah Abbasi 1,, Atefeh Goshvarpour 1
PMCID: PMC5469088  PMID: 28100896

Abstract

Objective:

In the past few decades, several studies have reported the physiological effects of listening to music. The physiological effects of different music types on different people are different. In the present study, we aimed to examine the effects of listening to traditional Persian music on electrocardiogram (ECG) signals in young women.

Methods:

Twenty-two healthy females participated in this study. ECG signals were recorded under two conditions: rest and music. For each ECG signal, 20 morphological and wavelet-based features were selected. Artificial neural network (ANN) and probabilistic neural network (PNN) classifiers were used for the classification of ECG signals during and before listening to music.

Results:

Collected data were separated into two data sets train and test. Classification accuracies of 88% and 97% were achieved in train data sets using ANN and PNN, respectively. In addition, the test data set was employed for evaluating the classifiers, and classification rates of 84% and 93% were obtained using ANN and PNN, respectively.

Conclusion:

The present study investigated the effect of music on ECG signals based on wavelet transform and morphological features. The results obtained here can provide a good understanding on the effects of music on ECG signals to researchers.

Keywords: artificial neural network, discrete wavelet transform, electrocardiogram, music, probabilistic neural network

Introduction

An electrocardiogram (ECG) is a graphical representation of the electrical current generated by the depolarization and repolarization of heart muscles. ECG analysis can provide useful information about the condition of the heart. Each cardiac cycle in an ECG signal consists of P-QRS-T waves with varying time duration and amplitudes. Therefore, a good understanding of the time intervals and amplitudes defined by ECG waves can provide useful clinical information (1).

The analysis of ECG signals has been widely used for diagnosing many cardiac diseases. Music has been established to have a significant effect on cardiac electrical activity (2). Since 1918, some studies were conducted to investigate the effects of music on the heart rate and cardiovascular system (3). The effects of music on anxiety, pain, stress, depressive syndromes, and sleeplessness have been investigated (4, 5). It is claimed that patients benefited the most from listening to classical music, which could decrease the blood pressure and heart rate. Iwanaga et al. (6) evaluated the effects of music in patients’ anxiety levels before surgery. It has been shown that the blood pressure and heart rate are significantly reduced in these patients. Goshvarpour et al. (7) employed time, frequency, and nonlinear features such as the mean, power spectrum, and Lyapunov exponent for classifying the heart rate signals in healthy young college students during rest and while listening to music. They showed that mean heart rate signals decreased in women when listening to music and increased in men. Do Amaral et al. (8) investigated the acute effects of musical auditory stimulation on cardiac autonomic function. Their results showed that heavy-metal and baroque musical auditory stimulation at lower intensities significantly decreased heart global function, whereas heavy-metal music decreased heart rate variability at higher intensities.

Examining statistical features such as the mean and variance are some common methods for analyzing ECG signals. In this research, a new analysis method proposed for quantifying differences between ECG heartbeats before and while listening to music. As ECG signals have semi-periodic patterns, in this study, wavelet analysis was applied to observe the effects of traditional Persian music on ECG signals (9).

The present study is organized as follows: in the second section, the ECG dataset collected from a group of young women before and while listening to music is briefly described. In the third section, wavelet-based and morphological features are developed. Next, the results and comparisons between ECG heartbeats before and while listening to music are presented. Finally, the discussion and conclusions are described.

Method

Data collection

It is well established that women show more emotional reactions than men in response to music (10). In this study, 22 healthy female students voluntarily participated. The age range of the subjects was 20–24 years. All participants were students and had no previous history of neurological diseases. ECG signals were recorded under two different conditions from each subject. Initially, the participants were asked to lie in the supine position comfortably and close their eyes for five minutes. Then, five minutes of traditional Persian music was played for the participants at a comfortable volume. The ECGs - lead II- were recorded by a 16-channel PowerLab system (AD Instruments, Bella Vista, NSW, Australia) at a sampling rate of 400 Hz. A digital notch filter was used to remove the 50 Hz power-line interference from the ECG signal (11). All subjects provided written informed consent prior to study participation.

Discrete wavelet transform

Discrete wavelet transform (DWT) is a powerful technique in signal processing tasks. It has been widely used for analyzing different physiological signals such as electromyograms and electroencephalograms. DWT decomposes a signal into wavelet coefficients. It convolves the signal with a low-pass filter and high-pass filter for obtaining approximation coefficients and detail coefficients, respectively. As ECG signals consist of a large number of data points, their processing is difficult. Therefore, in the present study, DWT compressed ECG signals into a small number of parameters. DWT can be defined as follows:

graphic file with name AJC-17-398-g001.jpg

where f represents the mother wavelet, which is dilated by integers m and translated by integers n. The selection of an appropriate wavelet function and the number of decomposition levels play an important role in analyzing ECG signals using DWT. Wavelet families include Haar, Meyer, Morlet, Daubechies, and Gaussian wavelets. There is no special method for selecting a certain wavelet. Choosing a wavelet family, which closely matches the signal to be processed, play an important role in wavelet applications (12). As shown in Figure 1, the Daubechies wavelet family is similar in shape to the QRS complex.

Figure 1.

Figure 1

Daubechies wavelet family

In this study, the Daubechies wavelet of order 6 was used for decomposing ECG signals of order 5. Wavelet coefficients were calculated. Figure 2 represents the basic multiresolution decomposition steps for the “original signal.”

Figure 2.

Figure 2

Algorithm of DWT

Preprocessing de-noising

An ECG is often contaminated by noises of different kinds. These noises are usually generated by recording instruments or the movement of subjects. In the current study, db6 was employed for removing various kinds of noises from ECG signals 29. The proposed de-noising algorithm can be summarized as follows:

  • ECG signals were decomposed at level eight using db6.

  • The soft thresholding technique was employed for the quantization of detail wavelet coefficients on each level.

  • ECG signals were reconstructed using approximation wavelet coefficients of the last level N and de-noised detail wavelet coefficients of all levels.

Baseline shifting removing

Baseline wandering is a noise artifact that strongly affects ECG signal analysis 30. Electrode and respiration impedance changes due to perspiration play an important role in generating baseline wander. By removing baseline wander, we can minimize changes in beat morphology. Normally, the frequency content of baseline wander is concentrated in very low frequencies. In the present study, median filters were applied to minimize the influence of baseline drift. The proposed process consists of two steps. In the first step, the original ECG signal is smoothed with a moving average filter of length 150. In the second step, the filtered signal is subtracted from the “signal + baseline drift noise” signal and a signal with baseline drift elimination is obtained.

Peak detection

The accurate detection of ECG peaks plays an important role in ECG signal analysis because a lot of clinical information can be derived from amplitudes and intervals defined by P, Q, R, S, and T peaks 31. In the present study, DWT was used to detect the position of the occurrence of the P-QRS-T waves. The proposed algorithm consists of five important steps. In the first step, ECG signals were decomposed at level 8 using db6. In the second step, details between level 3 and level 5 were kept and the rest were removed. Attained signal samples were then squared to stress the signal. Then, an R wave was detected using automatic thresholding techniques. In the third step, all details down to level 5 were removed. Then, the ECG signal was reconstructed. ECG signals were reconstructed, and the minimum signal about each R peak within 0.1 s was registered as Q and S waves. In the fourth step, details between level 1 and level 5 were kept and the rest were removed; two zero crossing points of the signal were determined. Finally, for the detection of the P and T waves, only details between level 4 and level 8 were kept and the rest were removed (Figure 3).

Figure 3.

Figure 3

Detection procedure. (a) R-wave detection, (b) Q- and S-wave detection, (c) zero-level detection, and d) P- and T-wave detection

Feature extraction

This study focused on two types of features, “morphological features of ECG signals” and “wavelet coefficient-based features,” to investigate cardiac autonomic functioning during rest and while listening to music. Unfortunately, applying wavelet coefficients to neural networks will increase the hidden layer, which has a negative effect on network operation. Therefore, statistical feature vectors were used instead of high-dimensional wavelet coefficients. Finally, the following statistical features were selected to exhibit the general behavior of the time–frequency energy distribution of the ECG waveform:

  • The average of the absolute values of approximation wavelet coefficients at any sub-band.

  • The standard deviation (SD) of approximation wavelet coefficients at each level.

  • The average of the absolute values of detail wavelet coefficients at any sub-band.

  • The SD of detail wavelet coefficients at each level.

Beside wavelet coefficient-based features, morphological features were extracted from ECG signals. The selected morphological features are mean and SD values of RR intervals, PT intervals, PR intervals, TT intervals, ST intervals, QT intervals, and PP intervals and maximum and mean values of P, Q, R, S, and T peaks. Using all these features is not suitable for classifications; therefore, final features are accordingly selected to provide the best diagnostic accuracy.

Morphological and wavelet-based features have different quantities. Therefore, normalization is applied to standardize feature vectors to the same range. This process permits the neural network to analysis each feature vector as they originate from the same underlying dynamic system (13).

Probabilistic neural network

A probabilistic neural network (PNN) is a set of artificial neurons connected together in a manner similar to feedforward neural networks. The architecture of a PNN consists of four layers: the input layer, pattern layer, summation layer, and output layer. Pattern neurons are divided into K groups, one for each class. The output of i-th pattern neuron in the k-th group can be expressed by the following equations:

graphic file with name AJC-17-398-g005.jpg

where Xk, i represents the center of the kernel and s (spread parameter) determines the size of the receptive field of the kernel. Each summation neuron receives inputs from one class. The output of the k-th summation neuron can be computed as follows:

graphic file with name AJC-17-398-g006.jpg

where Mk represents the number of pattern neurons in class k. Note that w is a positive coefficient.

Finally, feature vector x classify to belong to the class that corresponds to the summation neuron with the greatest output.

Artificial neural network

An artificial neural network (ANN) is a set of artificial neurons arranged similar to the pattern of natural neurons. ANN is an effective tool for pattern recognition, classification, image processing, and financial modeling (14). The advantages of ANNs are due to the parallel processing and the attempt to mimic the huge computational capacity of the human nervous system.

In the present study, the designed neural network consists of three layers, interconnected by proper weights. The layer of input neurons receives feature vectors. In addition, each hidden neuron computes the weighted sum of its inputs and delivers them to an activation function. Output neurons are used for the classification of pattern classes.

In the present study, the performance of the proposed algorithm was measured in terms of sensitivity (SE), accuracy (AC), and specificity (SP). These metrics can be written as follows:

graphic file with name AJC-17-398-g007.jpg

where TP, TN, FN, and FP represent the number of true positive samples, true negative samples, false negative samples, and false positive samples, respectively.

Results

For studying the effects of music on cardiac functioning, we focused on wavelet coefficient-based and morphological features of ECG signals. ECG signals in the time domain were similar semi-periodic signals that have no significant difference in two classes: before and while listening to music. Table 1 shows the mean and SD values of the approximate coefficients of ECG signals for the same subject. The mean values of approximate coefficients decreased while listening to music. Beside wavelet coefficient-based features, morphological features were also extracted from an ECG signal. Table 2 represents the mean and SD values of RR, PR, PT, TT, and TR intervals. SD values of morphological features decreased while listening to music music. In contrast, the mean values of the same features increased while listening to music.

Table 1.

Approximate coefficients statics before and while listening to music

Parameters While listening to music Before listening to music
A1 0.08686±0.00786 0.19244±0.08499
A2 0.08685±0.00780 0.19214±0.08498
A3 0.08612±0.00788 0.19186±0.08480
A4 0.08010±0.00787 0.19650±0.08106
A5 0.07159±0.00788 0.19424±0.0729

Data are given as mean±SD. A1 - 1st approximation wavelet coefficient; A2 - 2nd approximation wavelet coefficient; A3 - 3rd approximation wavelet coefficient; A4 - 4th approximation wavelet coefficient; A5 - 5th approximation wavelet coefficient; SD - standard deviation

Table 2.

SD and mean values of extracted morphological features

Parameters Music Rest
RR 0.786±0.073 0.767±0.080
PT 0.451±0.075 0.443±0.081
TT 0.754±0.101 0.747±0.113
ST 0.184±0.045 0.180±0.049
QT 0.261±0.054 0.251±0.059

Data are given as mean (second)±SD. RR - R-peak to R-peak interval; SD - standard deviation; ST - S-peak to T-peak interval; TT - T-peak to T-peak interval; QT - Q-peak to T-peak interval; PT - P-peak to T-peak interval

For each ECG signal, 20 morphological and wavelet-based features were selected. These features were fed into classifiers. Seventy percent of the features were randomly chosen as the training data set, and the remaining features were used as the test data set. The results show that using 10 and 6 neurons in the hidden layer, relatively higher classification rates can be achieved with PNN and ANN, respectively. To classify ECG signals during rest and while listening to music, two neurons were employed in the output layer. Considering sensitivity, specificity, and accuracy, the PNN classifier outperformed the ANN classifier. The overall sensitivity of the PNN classifier was approximately 14 % higher than that of the ANN classifier. In addition, the specificity of PNN increased by nearly 5% more than that of ANN. Hence, the overall accuracy of the PNN classifier increased by 10% more than that of the ANN classifier. The performances of the designed classifiers are displayed in Table 3.

Table 3.

Accuracy, sensitivity, and specificity of the ANN and PNN classifiers for train and test data sets

Test Train
ANN PNN ANN PNN
Accuracy 84 93 88 97
Sensitivity 81 95 86 100
Specificity 86 90 90 95

Data are given as %. ANN - artificial neural network; PNN - probabilistic neural network

Discussion

Listening to music is a complex phenomenon, which consists of neurological, psychological, emotional, and cardiovascular fluctuations, with behavioral modifications of breathing. Previous studies have indicated that music has a significant effect on the heart rate, blood pressure, and skin conductance (15). These effects have been examined for different kinds of music such as delicate, harmonic, and romantic. However, different findings have been revealed over time regarding physiological responses while listening to music. De Jong et al. (16) showed that music can decrease heart rate and blood pressure, while Scheugfele et al. (17) claimed that listening to music has no effect on the heart rate or blood pressure. It seems that the main cause of this difference is the autonomic nervous system response induced by music. Therefore, a more quantified understanding of the autonomous control of cardiovascular functions can be obtained by investigating the physiological effect of listening to music. Direct visual monitoring of ECGs by personnel is a time-consuming process and usually involves the loss of information. To handle this problem, computer-based systems have been developed for detecting ECG characteristic points. Usually, the time-domain analysis of an ECG signal provides us some useful information, but some studies have reported that using frequency analysis can be advantageous in processing an ECG signal. However, an important drawback of this FFT is that the all-time resolution is lost. Short-time Fourier analysis has been proposed for overcoming this limitation: by windowing the area of interest. The main weakness of this technique is that its frequency precision is unacceptable (18). Therefore, in the present study, ECG signals were characterized while listening to music using DWT. DWT is an effective tool for the analysis of non-stationary signals such as an ECG. Furthermore, it has been established that applying DWT to ECG signals can be helpful in detecting clinically significant features that may be missed by other analysis techniques (1921). Besides wavelet-based coefficient features, morphological features were also extracted from ECG signals. The reason behind using morphological and wavelet coefficient-based features is that some studies have reported their ability in the investigation of cardiac autonomic function (22).

Table 2 provides the mean and SD values of extracted morphological features. SD values decreased more while listening to music that at rest. These results are not in line with those found by Knight et al. (23) who found that there were no significant differences between heart rate variability before and after listening to music.

According to the results of the time–frequency analysis, the main frequency components of ECG signals were focused in low frequencies (approximation wavelet coefficients) during rest. In contrast, the main frequency components of ECG signals of the participants were distributed in different frequency ranges (approximation and detail wavelet coefficients) while listening to music. These results are consistent with those found by Goshvarpour et al. (7) who found that low-frequency components of heart rate signals in women decreased while listening to music.

After studying wavelet coefficient-based and morphological features, we focused on quantifying the differences between ECG signals before and while listening to music. The collected data were separated into two data sets: train and test. The extracted features were fed into ANN and PNN classifiers. In total, the ANN achieved an accuracy of 88%, while PNN achieved an accuracy of 97%. It seems that the good classification results of PNN are due to its architecture, which closely resembles that of extracted features.

Study limitations

The results of this study should be interpreted with caution. The present study investigated the effect of traditional Persian music on ECG signals in young women. However, it should be noted that the physiological effects of different music types on different people are different.

Conclusion

It has shown that before and while listening to music, there is a significant difference between extracted features from heart rate signals, which confirms that music alters ECG signals in young women. However, further studies need to focus on other methods that can characterize the behavior of heart rate signals while listening to different kinds of music.

Footnotes

Conflict of interest: None declared.

Peer-review: Externally peer-reviewed.

Authorship contributions: Concept – B.A.; Design – All authors; Supervision – A.A., A.G.; Fundings – All authors; Materials – All authors; Data collection &/or processing – A.A.; Analysis &/or interpretation – All authors; Literature search – B.A.; Writing – B.A.; Critical review – All authors.

References

  • 1.Alickovic E, Subasi A. Medical decision support system for diagnosis of heart arrhythmia using DWT and random forests classifier. J Med Syst. 2016;40:108. doi: 10.1007/s10916-016-0467-8. [DOI] [PubMed] [Google Scholar]
  • 2.Selvendran S, Aggarwal N, Vassiliou V. Tuning the heart with music. J R Soc Med. 2015;108:462–4. doi: 10.1177/0141076815600906. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Mofredj A, Alaya S, Tassaioust K, Bahloul H, Mrabet A. Music therapy, a review of the potential therapeutic benefits for the critically ill. J Crit Care. 2016;35:195–9. doi: 10.1016/j.jcrc.2016.05.021. [DOI] [PubMed] [Google Scholar]
  • 4.Trappe HJ. The effects of music on the cardiovascular system and cardiovascular health. Heart. 2010;96:1868–71. doi: 10.1136/hrt.2010.209858. [DOI] [PubMed] [Google Scholar]
  • 5.Uggla L, Bonde LO, Svahn B, Remberger M, Wrangsjö B, Gustafsson B. Music therapy can lower the heart rates of severely sick children. Acta Paediatr. 2016;105:1225–30. doi: 10.1111/apa.13452. [DOI] [PubMed] [Google Scholar]
  • 6.Iwanaga M, Moroki Y. Subjective and physiological responses to music stimuli controlled over activity and preference. J Music Ther. 1999;36:26–38. doi: 10.1093/jmt/36.1.26. [DOI] [PubMed] [Google Scholar]
  • 7.Goshvarpour A, Abbasi A, Goshvarpour A. Evaluating Autonomic Parameters: The role of sleep duration in emotional responses to music. Iran J Psychiatry. 2016;11:59–63. [PMC free article] [PubMed] [Google Scholar]
  • 8.Do Amaral JA, Guida HL, De Abreu LC, Barnabé VV, anderlei FM, Valenti VE. Effects of auditory stimulation with music of different intensities on heart period. J Tradit Complement Med. 2015;6:23–8. doi: 10.1016/j.jtcme.2014.11.032. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Kostka PS, Tkacz EJ. Feature extraction in time-frequency signal analysis by means of matched wavelets as a feature generator. Conf Proc IEEE Eng Med Biol Soc. 2011;2011:4996–9. doi: 10.1109/IEMBS.2011.6091238. [DOI] [PubMed] [Google Scholar]
  • 10.Baumgartner T, Esslen M, Jäncke L. From emotion perception to emotion experience: Emotions evoked by pictures and classical music. Int J Psychophysiol. 2006;60:34–43. doi: 10.1016/j.ijpsycho.2005.04.007. [DOI] [PubMed] [Google Scholar]
  • 11.Clarke J, Ramoz N, Fladung A, Gorwood P. Higher reward value of starvation imagery in anorexia nervosa and association with the Val66Met BDNF polymorphism. Transl Psychiatry. 2016;6:e829. doi: 10.1038/tp.2016.98. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Xia Y, Han J, Wang K. Quick detection of QRS complexes and R-waves using a wavelet transform and K-means clustering. Biomed Mater Eng. 2015;26:S1059–S65. doi: 10.3233/BME-151402. [DOI] [PubMed] [Google Scholar]
  • 13.Hausdorff JM, Mitchell SL, Firtion R, Peng CK, Cudkowicz ME, Wei JY, et al. Altered fractal dynamics of gait: reduced stride-interval correlations with aging and Huntington's disease. J Appl Physiol. 1997;82:262–9. doi: 10.1152/jappl.1997.82.1.262. [DOI] [PubMed] [Google Scholar]
  • 14.Çolak MC, Çolak C, Kocatürk H, Sağıroğlu S, Barutçu I. Predicting coronary artery disease using different artificial neural network models. Anadolu Kardiyol Derg. 2008;8:249–54. [PubMed] [Google Scholar]
  • 15.Dousty M, Daneshvar S, Haghjoo M. The effects of sedative music, arousal music, and silence on electrocardiography signals. J Electrocardiol. 2011;44:396, e1–6. doi: 10.1016/j.jelectrocard.2011.01.005. [DOI] [PubMed] [Google Scholar]
  • 16.de Jong MA. A physiological approach to aesthetic preference I. Paintings. Psychother Psychosom. 1972;20:360–5. doi: 10.1159/000286439. [DOI] [PubMed] [Google Scholar]
  • 17.Scheufele PM. Effects of progressive relaxation and classical music on measurements of attention, relaxation, and stress responses. J Behav Med. 2000;23:207–28. doi: 10.1023/a:1005542121935. [DOI] [PubMed] [Google Scholar]
  • 18.Li H, Yuan D, Wang Y, Cui D, Cao L. Arrhythmia Classification Based on Multi-Domain Feature Extraction for an ECG Recognition System. Sensors. 2016;16:E1744. doi: 10.3390/s16101744. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19.Ji SY, Belle A, Ward KR, Ryan KL, Rickards CA, Convertino VA, et al. Heart rate variability analysis during central hypovolemia using wavelet transformation. J Clin Monit Comput. 2013;27:289–302. doi: 10.1007/s10877-013-9434-9. [DOI] [PubMed] [Google Scholar]
  • 20.Martínez JP, Almeida R, Olmos S, Rocha AP, Laguna P. A wavelet-based ECG delineator: evaluation on standard databases. IEEE Trans Biomed Eng. 2004;51:570–81. doi: 10.1109/TBME.2003.821031. [DOI] [PubMed] [Google Scholar]
  • 21.Ota K, Tsutsumi T, Kawachi K, Wakatsuki D, Shimizu N, Asano F, et al. Time-frequency analysis of QRS complex with wavelet transform in patients with triple-vessel disease. Anadolu Kardiyol Derg. 2007;7:133–4. [PubMed] [Google Scholar]
  • 22.Begg R. Neural Networks in Healthcare: Potential and Challenges: Potential and Challenges: Igi Global. 2006 [Google Scholar]
  • 23.Knight WE, Rickard Ph, D NS. Relaxing music prevents stress-induced increases in subjective anxiety, systolic blood pressure, and heart rate in healthy males and females. J Music Ther. 2001;38:254–72. doi: 10.1093/jmt/38.4.254. [DOI] [PubMed] [Google Scholar]

Articles from Anatolian Journal of Cardiology are provided here courtesy of Turkish Society of Cardiology

RESOURCES