Improved Spectrogram Analysis for ECG Signal in Emergency Medical Applications

This paper presents the spectrogram effect of biomedical signal, especially for ECG. Simulation module developed for the spectrogram implementation. Spectrogram based on ECG signal and power spectral density together with off-line evaluation has been observed. ECG contains very important clinical information about the cardiac activities of heart. The features of small variations in ECG signal with time-varying morphological characteristics needs to be extracted by signal processing method because there are not visible of graphical ECG signal. Small variations of simulated normal and noise corrupted ECG signal have been extracted using spectrogram. The spectrogram found to be more precise over conventional FFT in finding the small abnormalities in ECG signal. These form time-frequency representations for processing time-varying signals. By using the presented method, it is ensure that high resolution time-varying spectrum estimation with no lag error can be produced. Other benefits of the method are the straightforward procedure for evaluating the statistics of the spectrum estimation.


I. INTRODUCTION
Electrocardiogram (ECG) is the electrical manifestation of the heart muscle activity.Electric impulse originating at sino-atrial node (SA) has an intrinsic rate that is regulated by the sympathetic and parasympathetic branches of Autonomic Nervous system (ANS) [1].Nerve impulses arriving from the sympathetic branch tend to increase the mean heart rate while impulses from the parasympathetic branch mediated by vagus nerve have the opposite effect.These nerve impulses do not occur with exact regularity as they can be modulated by central and peripheral oscillators, causing variations in beat-to-beat interval which is termed as Heart Rate Variability (HRV) [1] [3] [6].
Bioelectrical signals are typically very small in amplitude (mV) and an amplifier is required to accurately depending on the hardware and software used, the biological amplifier serves to amplify the signal.It is also known that the frequency of heart signals is very low, approximately 5 to 10 H Z. Spectrogram returns the time-dependent Fourier transform for a sequence, or displays this information as a spectrogram.The time-dependent Fourier transform is the discrete-time Fourier transforms for a sequence computed using a sliding window.This form of the Fourier transform, also known as the short-time Fourier transform (STFT), has numerous applications in speech, sonar, and radar processing.The spectrogram of a sequence is the magnitude of the time-dependent Fourier transform versus time [2] [4].The estimation procedure was initiated with low pass filtering the ECG data which was originally sampled at 360Hz, and down sampled to 4Hz.The spectrogram (time frequency energy distribution) for signal S(t) was estimated as where h(-t) is a window function which slides along S(t).This corresponds to the maximum of P(t,f) in a given frequency range [13].As the HRV does not vary abruptly, a frequency range of around 0.2 Hz was used for detection of the dominating frequency apart from the harmonics.From the spectrogram the mean frequency for a short interval of every 6 seconds was calculated.A band-pass filter whose center frequency (mean value from spectrogram) was varied according to the varying dominating frequencies was designed.Time-frequency estimation of power spectral density (PSD) is a common step in the analysis of nonstationary signals.The spectrogram is arguably the most popular technique, though the scaleogram and Wigner-Ville distribution are also common [1] [5] [7].The spectrogram estimates the PSD by applying the modified periodogram to windowed signal segments separated by a fixed interval [2].The user-specified length of the window controls the tradeoff between time and frequency resolution of the image.In this paper, time-varying resolution has been estimated with no lag error statistically.The Matlab Simulink process is http://ijacsa.thesai.org/used to verify the process.FFT methods have been used in a large number of biomedical applications.There is some works on precise detection of ECG using FFT [14][15][16][17][18][19][20][21].Karel et al. proposed the performance criteria to measure the quality of a wavelet, based on the principle of maximization of variance [14].Mahmoodabadi et al. developed and evaluated an electrocardiogram (ECG) feature extraction system based on the multi-resolution wavelet transform [15].David et al. presented a method to reduce the baseline wandering of an electrocardiogram signal [16].Shantha et al. discussed the design of good wavelet for cardiac signal from the perspective of orthogonal filter banks [19].Nikolaev and Gotchev proposed a two-stage algorithm for electrocardiographic (EGG) signal denoising with Wiener filtering in the translation-invariant wavelet domain [20].

II. METHODOLOGY
ECG signal is generated by writing a function.This function generates a wave similar to a sine function which representative of a true ECG waveform.An ECG signal is the superposition of action potentials that occur throughout the heart.A typical ECG signal for one heartbeat is shown in Figure 1.
An ECG signal is characterized by the P wave, the QRS complex wave and the T wave, with each wave created by specific heart activities."The P wave is produced by atrial depolarization, the QRS complex primarily by ventricular depolarization and the T wave by ventricular repolarization" [9] [10].Some ECG signals also contain a small amplitude U wave following the T wave; U waves are common in slow heart rates but a prominent U wave may reflect a heart abnormality.
An ECG signal can also be broken down into three main intervals: the P-R interval, the Q-T interval and the S-T interval.The P-R interval is mainly caused by the depolarization of the atrium and slow conductance of the associated impulse to the ventricle by the atrioventricular (AV) node.The Q-T interval is defined by the depolarization and repolarization of the ventricle.The S-T interval corresponds to the "average duration of the plateau regions of individual ventricular cells [11] [12].

III. ANALYSIS AND DISCUSSION
The simulated standard ECG signals as well as the simulated noise corrupted signal have been implemented using FFT and spectrogram for proper feature extraction.From the human body, sudden pain of any parts may occur the continuous sinusoidal signal with very low frequency with approximately 0.5/1 Hz cause the small abnormalities of the cardiac activities of heart.Signals have been generated with different parameters using the following steps: Step Step 3: Generate the response of the signal using FFT method.
Step 4: Generate the response of the signal using wavelet method.The algorithm is based on ECG which is represented by workspace block converted the captured file into 2dimentional data file.Signal is characterized by the frequencies, amplitudes and phases of the sine-wave components.It is applied in every 10 ms.frame using the simulink block system's rules and regulations.From the principle of FFT, it does not have possibilities to detect the little change of the signals which is show in below.The brief discussions of the various block of simulated method of spectrogram have been introduced in the following.
Workspace (Figure 3.)-Simulink allows us to import input signal and initial state data from the MATLAB workspace and export output signal and state data to the MATLAB workspace during simulation.This capability allows us to use standard or custom MATLAB functions to generate a simulated system's input signals and to graph, analyze, or otherwise postprocess the system's outputs STFT reconstruction (Fig. 2) -The frequencies, phases and amplitudes are combined to form a sine-wave representation.The final reconstructed STFT is constructed from the sine waves by a convolution procedure.
To use this format, it selects input in the load from workspace pane and selects the array option from the format list on the data import/export pane.Selecting this option causes simulink to evaluate the expression next to the input check box and use the result as the input to the model.The expression must evaluate to a real (noncomplex) matrix of data type double.The first column of the matrix must be a vector of times in ascending order.The remaining columns specify input values.In particular, each column represents the input for a different import block signal (in sequential order) and each row is the input value for the corresponding time point.Simulink linearly interpolates or extrapolates input values as necessary if the interpolate data option is selected for the corresponding import.The total number of columns of the input matrix must equal n + 1, where n is the total number of signals entering the model's imports.
Vector Scope (Figure 3.) -The vector scope block is a comprehensive display tool similar to a digital oscilloscope.The block can display time-domain, frequency-domain, or user-defined signals.We can use the Vector Scope block to plot consecutive time samples from a frame-based vector, or to plot vectors containing data such as filter coefficients or spectral magnitudes.To compute and plot the periodogram of a signal with a single block, use the Spectrum Scope block.The input to the Vector Scope block can be any realvalued M-by-N matrix, column or row vector, or 1-D (unoriented) vector, where 1-D vectors are treated as column vectors.Regardless of the input frame status, the block treats each column of an M-by-N input as an independent channel of data with M consecutive samples.The block plots each sample of each input channel sequentially across the horizontal axis of the plot conversion to time domain (Fig. 2) -This is the final stage in which the time domain signal frame is computed [13].
Buffer(Figure 3.)-Convert scalar samples to a frame output at a lower sample rate.We can also convert a frame to a smaller or large size with optional overlap [13].
Periodogram(Figure 3.)-Nonparametric spectral estimation using the periodogram method.In this block, the power spectral density is estimated and viewed in both time time-domain and frequency domain.The method tried to produce the spectrogram and power spectral density in a relatively short period of time based on ECG.By using the presented method, high resolution timevarying spectrum has been estimated with no lag error.The straightforward procedures for evaluating the statistics of the spectrum estimation are as follows.
Step 1: Generation of ECG pattern having amplitude of 3.5 mV. Figure 4shows the generation of ECG signal and it has been generated in offline and the time domain data imported from the workspace.
Step 2: power spectrum density of different time varying in time domain has been showed in Fig. 5.
Step 3: Fig. 6 shows the power spectrum density in frequency domain.
Step 4: Fig. 7 shows the dB conversion of power spectral density.
Step 5: Different time varying spectrogram of ECG are shown in Fig. 8 Time-frequency evaluation of power spectral density (PSD) is a frequent step in the analysis of nonstationary signals in which the information is extracted (Fig. 6).The spectrogram is possibly the most popular technique, though the scaleogram and Wigner-Ville distribution are also common [1].The spectrogram estimates the PSD by applying the modified periodogram to windowed signal segments separated by a fixed interval [2].The userspecified length of the window controls the trade-off between time and frequency resolution of the image.We can have the decision from the above point of view that high resolution time-varying spectrums' lag error have been eliminated in terms of time-varying spectrum density and the peak amplitude is quite visible in spectrogram where the time-domain peak amplitude appears.In the following graph (Fig. 9) we can see the time versus lag error has been reduced exponentially.In conclusion, the effect of biomedical signal, especially for ECG, has been experimented using the spectrogram implementation.A method of estimating the harmonic power spectral density that combines the power of the fundamental and harmonic components is also described.Spectrogram based on ECG signal and Power spectral density together with off-line evaluation has been observed.The status of the signal is performed by evaluating the statistics of the signal in time-domain and frequency domain.Further the power spectral density is considered by using the characteristic of periodogram.The gain and losses are also considered in dB.It accounts for variations in the power distribution among harmonic frequencies.It achieves better frequency resolution by leveraging the relatively better resolution at the harmonic frequencies.The presented method, high resolution timevarying spectrum has been estimated.Finally, lag error have been eliminated in terms of time-varying spectrum density and the peak amplitude is quite visible in spectrogram where the time-domain peak amplitude appears.

Figure 1 .
Figure 1.A general representation of ECG signal

1 :
Generation of standard ECG pattern having amplitude of 3.5mV and pulse repetition rate of 75 per minute.This signal is shown in Figure-2(a).Step 2: Generation of a noisy signal having frequency of 0.5/1 and amplitude of 0.1 mV which is 2.85 percent of the standard ECG signal.This signal is shown in Figure-2(b).

Figure 2 .
Figure 2. Response using FFT of simulated normal (a) and noise corrupted (b) ECG signals.

Figure 3 .
Figure 3. Diagram of proposed simulation method of Spectrogram

dB
Conversion(Figure 3.)-Converts inputs of Watts or Volts to decibels.Voltage inputs are first converted to dB //ijacsa.thesai.org/power relative to the specified load resistance, where P = ( V^2/R).When converting to dBm, the power is scaled to units of miliWatts [13].Matrix Viewer(Figure 3.)-Compute the matrix transpose.Vector input signals are treated as [Mx1] matrices.The output is always a matrix.The input and output data types may be any real signed 16-bit fixed point data type [13].