Classification of Cardiac Arrhythmia using Hybrid Technology of Fast Discrete Stockwell-Transform ( FDST ) and Self Organising Map

: The diagnosis of Cardio-Vascular diseases (CVD) is highly dependent on analysis of ECG signals. ECG analysis can be helpful in estimating the underlying cause and condition of heart in cardiac abnormality. The effectiveness of ECG signal analysis in detection of CVDs is widely accepted by professional healthcare service provider. Many algorithms have been proposed but almost all of them have some kind of limitations, and these limitations largely influence the effectiveness of ECG analysis. The performed research work is dedicated for design of unique self-organizing maps (SOMs) based neural network for classification of arrhythmia according to a particular ECG signal, the generation of SOMs is based on the certain unique signatures of ECG signals and have potential to classify different cardiac conditions. For extraction of unique features from ECG signals, we have proposed to use Fast Discrete Stockwell Transform (FDST). Since the proposed technique is a result of combining two different techniques hence called as hybrid technology. The purpose of using FDST is to identify unique signatures of ECG signals in a more improved manner than existing one, the term improved is used because it has several advantages over existing techniques such as wavelet and Fourier Transform based methods. Results obtained from the implementation of the technique are capable in visualizing the ECG sinus rhythm and arrhythmia conditions in form of unique SOM for each associated arrhythmia condition. This unique SOM based classification makes them ideal for being used as a diagnostic tool. This ability of arrhythmia classification using FDST and SOMs makes the technique unique and useful providing valuable information about patient condition. Using proposed technology a portable diagnosis tool for monitoring of patient at their site may be facilitated later, that will improve the quality of life of the patient by diagnosing cardiac condition.


Introduction
Recent time ECG has become one of the most widely used non-invasive method of cardiac monitoring [1].Large number of work has been done to improve the ECG processing techniques, as a result of this ECG analysis has become sufficiently advanced enough to correctly measure the cardiac abnormality.Since various wireless and wearable devices for ECG signals have been developed, therefore round the clock monitoring of patients has become an easy task.Round the clock monitoring of a patient requires analysis of a large number of data in order to classify the cardiac abnormalities [2].To fulfil these requirements different wearable devices has been equipped with capability of analysing the data [3].By required analysis of recorded ECG data these devices can classify the abnormalities associated with ECG signals.To perform the classification of ECG signals, many Techniques have been proposed by researcher's working on ECG signal processing, few of them are Pan-Tompkins Algorithms for ECG analysis [4], Fourier Transform based algorithms such as Fast Fourier Transform (FFT) method [5], Wavelet Transform based Algorithms [6], Principal Component Analysis methods [7].Apart from these conventional signal processing approaches researchers have applied the principles of statistics in analysis of ECG and developed the methods like Probabilistic Classifiers [8], Support Vector Machines [9], some other methods like power spectral density based analysis has been also introduced [10].Upon going through literature available to this reference we have concluded that classification between normal and abnormal ECG signals can be done by analysis of morphological features present in ECG sinus rhythm.We have also noticed that along with the morphological features of ECG signal, the temporal information related to these features is required in order to accurately predict the cardiac abnormality [11].To perform the classification of ECG signals, the most popular method from years to recent time is wavelet transform, and the literature available related to ECG signal processing also have a major portion from wavelet based methods and techniques.Obviously the reason behind this dominance is that wavelet based signal processing method is such a powerful method that can provide the information of the time domain as well as frequency domain at the same time, hence it has advantage of containing the location of signal feature in time graph as well as frequency spectrum, this was limited to just one domain in all other above mentioned methods [12].While going through detailed literature review of wavelet based methods, we noticed an important characteristics of wavelet transform that it uses a predefined mother wavelet for representing every signal [12].In order to extract the information from signal shifting and scaling is used over mother wavelet as shown in figure 1.The location of high frequency signal shown as blue coloured spike is determined by shifting and multiplying mother wavelet, the magnitude will be zero for all other location except the location of the high frequency spike and in this way temporal information of the feature can be captured.In the same way to capture the spectral information, mother wavelet is stretched or compressed to fit in the signal shown in figure 1, product of the signal with the mother wavelet will be maximum at the frequency of signal, since wavelet fitted in the signal has predefined known frequency and compression or stretch factor.If this is known one can easily calculate and acquire frequency domain information of the signal [13].By analysis of above mentioned characteristics of wavelet transform we observed that, it requires a predefined mother wavelet to extract the information from signal features.Since ECG signal of each and every person has a unique patterns in some manner, therefore using predefine mother wavelet in all cases is seems to be inappropriate.If we use a predefined mother wavelet for all the subjects we might be ending with some approximation which may correspond to misinterpretation of ECG signal in case of faulty selection of mother wavelet [13].
Due to this disadvantages present in wavelet based analysis of ECG signals, research is still ongoing to develop appropriate methods that can classify normal and abnormal signal accurately.Last decade and more have seen a drastic change in this domain due to emergence of artificial intelligence, machine learning and ANN based methods [14].The signal processing domain has become quite advanced due to use of artificial neural network (ANNs), the reason for this is the potential of ANNs to provide high level of accuracy.The ANNs employ brain model to perform the complex calculation and hence results in a better and faster classification tool.Use of ANN based methods for classifying ECG signals is increasing at rapid rate.This increase is a result of some promising advantages that an ANN based model offers.During the training of ANN based pattern recognition techniques, it provides advantage in clustering the data set according to the particular cardiac conditions that results in a more accurate training.Proper training of ANN ensures better predictions when they are deployed for classifying a new data input and hence improves overall performance, such results are being reported by several research groups in their communication [15].Further study related to ANN technology provides important information related to the training of the ANN.This proper training of an ANN necessitates identifying certain unique signatures in training data set for classification purpose by employing these unique signatures for training data set with ANN maps the input to target data for classification.Therefore, performance of ANN is greatly affected by these signatures extracted by employing a certain Feature Extraction Technique [16].
Till now using wavelet based methods for extracting the ECG signal has remained a common practise, but disadvantages like using a predefined mother wavelet as mentioned in earlier sections may affect the performance of ANN by a possible error in feature extraction.Several other methods are also proposed by authors but each and every method has some of the unavoidable disadvantages associated with it, hence this domain is still in search of an appropriate method for feature extraction in order to enhance the computational performance of ANN by improving quality of training dataset [8].
In this study, we have proposed a unique method for feature extraction of ECG signals using Fast Discrete Stockwell Transform (FDST).It is fast discrete implementation of Stockwell Transform (ST).The algorithm is capable of measuring both the true frequency and globally referenced phasic information of the Fourier Transform with simultaneous generation of local spectra like Wavelet Transform.Due to this major advantage, it has been successfully demonstrated in several biomedical signal processing application(s) along with their majority use in image processing.It has shown the excellent frequency and time resolution at the same time, and only disadvantage associated with this is high computational demand which can be reduced drastically by implementing in a discrete manner.In further sections, majority of focus is given to Stockwell-Transform as FDST is derived from it and only differs in implementation.The detailed procedure of feature extraction using FDST is explained in below sections as later on these features can be used for training data employing ANN based classification method.In this article SOMs based clustering method has been proposed for ECG signal classification due to the capability to classify the data into many clusters.Due to this ability they are supposed to be used for diagnostic examine the normal and abnormal rhythm based on cluster model [17].

Fast Discrete Stockwell Transform
One of the critical task in biomedical signal processing is to extract the frequency content of the signal.A large number of transformation techniques have been proposed for this purpose, and development process of new transforms for executing this task in more efficient manner is ongoing.Fourier Transform has remained an important tool for analysis of signals in frequency domain.Using a set of complex sinusoids with different frequencies correlation of signal is done, this provides the true frequency spectrum of signal with globally referenced phase information associated with it.As it provides the information in form of global spectrum it does not convey any temporal information, hence application of Fourier Transform is only limited to stationary signals which has the global spectrum due to presence of a constant frequency over time [18].In case of non-stationary signals like biomedical signals and audio signals the frequency content of the signals keeps varying continously and hence requires a local spectrum analysis method.In order to fulfil this need modification is done in Fourier transform and Short-Time Fourier Transform is developed to produce the local spectrum of signal [19].This local spectrum is quite useful in revealing the frequency content of the signal with respect to time.Figures 3 and 4 demonstrate both the global and local spectrum of an ECG signal for better understanding this concept.In figure 2, an ECG signal of 4 seconds duration is plotted using Matlab.Figure 3 shows a two sided global spectrum plotted employing FFT method of Fourier Transform.By analysing global spectrum of signal we can extract the various information's related to the ECG signal like frequencies present in the signal, magnitude of the particular frequency etc. but at the same time spectrum fails to provide any information related to temporal domain such as time of a particular frequency or the order of the frequencies present etc.As explained in above section, local spectrum of signal provides information related to temporal as well as spatial domain at the same time.Figure 4 shows a local spectrum of ECG signal shown in Figure 2. The local spectrum is plotted using STFT and explains almost all question related to Spatio-Temporal domain at the same point.
The original global spectrum obtained by Fourier Transform is localized in Short-Time Fourier Transform using a short window, (in our case we have used a Kaiser window with 256 samples), and the Fourier Transform results inwindow being shifted to further samples and same procedure is repeated.In this manner, the frequency content of all the windowed segments of signals is measured and the spectrum is localized..This localization of spectrum results in a spectrum with time and frequency both at the same time interval.Since a fixed sized window is utilized in STFT leading to need of selecting appropriate window size in advance for better time and frequency resolution.If wider window is selected then time resolution will be decreased and choosing narrower window will reduce the frequency resolution.Solution of this problem faced in STFT is addressed in wavelet transform using phase corrective methods as explained above, but again problem of using predefined mother wavelet will come into picture [13].
. To solve these challenges R. G. Stockwell et.al.proposed a new method S-Transform for localizing the complex spectrum [20], S-Transform is also known as Stockwell Transform on the name of R. G. Stockwell, who invented this.The derivation of S-Transform can be obtained either in form of STFT with frequency dependent window size or as a phase corrective procedure for Wavelet Transform (WT).The beauty of this Transform is that it uses the set of a complex sinusoids as basis like FT and STFT, and content of this set are multiplied by Gaussian window functions whose length varies with respect to the frequency at which it is operating, hence it provides features of both STFT and WT without disadvantage like fixed window size in case of STFT and absent sinusoid basis functions in case of WT.The presence of above mentioned advantages over other existing techniques make this method useful in many biomedical signal and image processing applications such brain tumour classification from MRI images, functional MRI analysis, EEG, ECG analysis, it is also used in analysis audio recordings of sounds produced by heart.The only major disadvantage associated with this method is requirement of greater computational time, but recently a fast technique to compute the S-Transform has been developed as Fast Discrete Stockwell Transform (FDST).It is observed that computational time required in FDST is almost comparable to FFT and FWT.Due to improvement in computational time FDST has shown potential to be used in analysis of non-stationary signals [17].
Visualization of all domains and with their important properties is done using Figure 5 that pictorially differentiate all major techniques being used in signal processing till date.

Fig. 5 Visualization of various Signal analysis domains with their advantages and drawbacks 2
To obtain the mathematical model of ST fundamentals of Fourier transform are used, the following section reviews all necessary mathematical steps required for basic understanding of ST, and further the algorithm used to compute FDST is also explained.In above expression ( , ) is function representing scaled form of an original mother wavelet, whereas d stands for dilation and expresses the width of the scaled wavelet ( , ), hence d is used to control the resolution.Upon observing above equation we find that there exist an admissibility condition for ( , ) that it must have zero mean, for more information refer to Young [21], and Rioul & Vetterli [22].Step 2: Calculate basis functions as following , = , = Step 3: Calculate Fourier Transform of x (t), as X ( ) Step

Feature extraction using FDST
In order to perform the Feature extraction from ECG signals, several steps have been taken.The following section describes all steps one by one and over all process is illustrated using a flow diagram as shown in figure 3. Before going to in detail of whole procedure, we find it necessary to give the detail of data used to implement the feature extraction and SOM generation.
For the purpose of feature extraction authors used self-acquired data base, although several data bases like MIT-BIH are already available but due to the below mentioned reasons we have decided to use the self-acquired data base.One of prominent reason to avoid MIT-BIH database is use of tape based recording in the records, which was digitized later on and may affect the resolution of records, but using self-acquired data features some other monitoring parameters like SpO2, Chest Expansion, etc., and use of several other diagnostic methods such as holter Monitoring, echocardiography during follow up results in a more reliable final diagnosis of the subjects.
To perform the ECG Data acquisition authors have used Equivital EQ02, Netherlands, life monitor that records two leads of ECG data with resolution of 10 bit in digitizing the data.The sampling rate of 256 Hz is used for ECG recording and accuracy of EQ02 is in ±10 % tolerance band, also Equivital EQ02 life monitor has feature of integrating several other sensors as discussed above which are used to improve the final diagnosis of the recorded data [23].We have recorded and verified the data by taking the consultation of an expert Cardiologist and doctors at the North Eastern Indira Gandhi Regional Institute of Health and Medical Sciences (NEGRIHMS), Shillong who used a full 12-lead ECG record with several others diagnostic tools for verification of our results.

Figure 7: Flow diagram of Feature Extraction Using FDST
To illustrate the procedure of feature extraction and SOM generation authors have used following 4 records taken on random basis, and the detail of subjects is provided in Table 1.Since the present article deals with signal processing aspect of ECG signal, therefore authors of communication have not explained anything about the disease indicated in tables as that is beyond the scope of the article, a separate literature has to be studied for understanding of same.ECG signal shown in the figure 7 (a) is plotted after several pre-processing steps like signal conditioning and noise removal Ample no techniques are available to perform required pre-processing in our case we have used basic moving average filter with window width of 10 in order to make our signal smooth post digitization of the signal.One can use any other existing method as per their requirement and comfort.
After pre-processing of the signals R-Peak identification is done using a basic Matlab Script, successful detection of R-Peak is followed by estimation heart rate, by employing below formula:- Here 'T' is time in minutes, and in order to compute time in minutes we have used sampling frequency (Fs) and numbers of samples (N) present in signal of signal.Formula used to calculate time is given below:-

= * 60
Steps of algorithm used in detection of R-Peak are discussed below using pictorial representation for better understanding of readers.In this article for demonstration of technique we have presented only three of all listed features.Figure 9 shows morphological features of ECG signal with their unique signatures obtained using FDST approach.These features are extracted from the ECG signal of figure 9.

Figure 9: R _Peak detection from ECG signal for calculating Heart Rate
In order to find unique signatures of ECG signal, we have taken a full sinus rhythm signal of duration 1 second.Since it is sampled at 256 Hz, there were total 256 samples.To understand features we have taken a window of 100 samples and plotted the different part of an ECG signal in time domain as shown in figure 9. Further FDST is obtained using above discussed algorithm 1 in order to plot the unique signatures of Morphological ECG features.In figure 9 plot 1, 2, and 3 shows time domain ECG features, whereas plot 4, 5, 6 presents unique signatures of these features.In plot 4, 5, 6, of figure 9 on x-axes is for number of samples, y-axes for frequencies whereas power level of signal at certain co-ordinate is coded into colours For simplicity and better understanding we have divided the power level into seven categories, which is in increasing order from blue to magenta as indicated in colour bar.This 3-diamensional graph provides us an additional information in terms of power present in a particular feature.After obtaining the features we have performed some basic analysis and the results are presented.
To summarize the results obtained using FDST table 2 is created which list all the parameters of above extracted features.

Classification of ECG arrhythmia using SOM based clustering Method
After the feature extraction is done, we trained an ANN to classify the Arrhythmia based on above extracted features the purpose of using ANN is already discussed in above sections, here we are using clustering tool of Matlab to design ANN.Clustering tool uses SOMs based batch training algorithm to train a network, and SOMs consists of a competitive layer which can classify a dataset of vectors with any number of dimensions into as many classes as the layer has neurons.The neurons are arranged in a 2D topology, which allows the layer to form a representation of the distribution and a twodimensional approximation of the topology of the dataset [24].
Architecture of trained network using 900 Neurons arrange in Hexagonal shape is shown below.Since it has 900 neurons the network has ability to cluster data in to 900 groups which can increase accuracy that was earlier limited to the normal and abnormal only.To train the ANN we have used 5 different attributes extracted from the 90 subjects out of these 90 subjects 37 are controlled and 43 are diagnosed with certain cardiac disease, for each subject we have taken 2 leads of data hence for training of ANN we have used total 180 samples.Also, we have used above tabulated records listed in table 1 to show the result.show the distance between the nodes, and distance between node is coded by colour code in a manner that its color becomes darker and darker with the increase in distance, hence it can be supposed to one of the most important plot to visualize the data, using this feature we can estimate that relative difference between two data points [25],

Conclusion
In the present article usability of Fast Discrete Stockwell Transform in ECG signal processing is stated.The article explains why FDST should be encouraged in processing of biomedical signals, and drawbacks of other existing technologies are also pointed out using necessary explanation that will provide a broad understanding to readers about their applicability and limitations.The article also explains that how FDST has advantage over STFT by using a variable sized window to transform a time domain signal into time frequency domain.Since use of variable sized window localizes the time-frequency domain therefore FDST improves the resolution trade off drastically.The explanation of using FDST to overcome the drawbacks of wavelet transform based methods such as using a predefined mother wavelet to transform a signal is also presented in the paper.Based on above study it is concluded that FDST has ability to inherit advantages of STFT, and Wavelet based methods such as use of complex sinusoidal basis functions for transforming a signal into STFT and progressive translation of measurement for improving the resolution trade-off but at the same time FDST has To classify the arrhythmia the clustering method is utilized, unique SOMs are obtained for each disease and presented.Since SOMs have potential to cluster data into various groups without any supervised learning, therefore they can be used for relative diagnosis in place of fixed diagnosis, that means using further analysis of unique SOMs and establishing a relation according to particular disease may signify the distance of the signal from normal or abnormal.The earlier classification methods were presenting a fixed diagnosis in normal or abnormal condition.This classification method can follow the path traversed by particular disease.Due to this relative diagnosis ANN based drug effectiveness tool may also be developed that estimate that how much improvement in a particular cardiac condition is happening over a period of time.

Fig. 1
Fig. 1 Time domain information of signal using shifting of mother wavelet 1

Figure 2 :
Figure 2: ECG signal in Time domain

4 :Step 4 :Step 5 :Step 6 :Step 7 :Step 8 :
Calculate Window function as following Start a FOR loop supplying following arguments and DO FOR n ( , , ,...4, 2, 1 ) DO: Under FOR loop perform Band Pass Filtering of X (k) as following X' (k) = X (k) where < | | ≤ Calculate inverse Fourier Transform of X' (k) as x' (t) Start a FOR loop and for every point j DO Calculate the Transform samples as following END FOR In next section explanation related to the signal processing and feature extraction using above discussed algorithm of FDST are discussed.

Figure 8 shows 1
Figure 8 shows 1 Second of ECG signal with identified R_Peaks marked with red as shown in figure,

Figure 8 :
Figure 8: R _Peak detection from ECG signal for calculating Heart RateAfter successful identification of R_Peak and obtaing Heart Rate, we performed the extraction of other Morphological ECG features such as P Wave, QRS Complex and T Wave, ST Segment etc.In this article for demonstration of technique we have presented only three of all listed features.Figure9shows morphological features of ECG signal with their unique signatures obtained using FDST approach.These features are extracted from the ECG signal of figure9.

Figure 10 :
Figure 10: (a) Architecture of ANN Designed for classification of Data.

Figure 10 :
Figure 10: (b) SOM Topology used in ANN designed for classification of Arrhythmia.

Figure 10 :
Figure 10: (c) SOM Neighbour connection distance for ANN designed for Arrhythmia classification.

Figure 10 (
Figure 10 (c) shows the neighbour connection distance of designed network and figure 10 (d) is Representation of SOM neighbour weight distance, basically SOM neighbour weight distance is toshow the distance between the nodes, and distance between node is coded by colour code in a manner that its color becomes darker and darker with the increase in distance, hence it can be supposed to one of the most important plot to visualize the data, using this feature we can estimate that relative difference between two data points[25],

Figure 11 :Figure 11 :
Figure 11: (a) SOM Neighbour weight distance and (b) weight position for Controlled Subject Preprints (www.preprints.org)| NOT PEER-REVIEWED | Posted: 20 June 2018 doi:10.20944/preprints201806.0321.v1potential to overcome disadvantages of both methods.Since more improved resolution of time and frequency in complex domain can be obtained using FDST, this makes FDST ideal for various biomedical signals especially fast frequency translating signals.Due to above reasons authors of communication decided to use FDST in extracting the morphological features from ECG signals.Unique morphological signals are obtained and presented in result section which is better in resolution.Later sections of article deals with classification of ECG arrhythmia based on the morphological feature extracted from ECG signals.