\documentclass[11pt,twoside]{article}\makeatletter

\IfFileExists{xcolor.sty}%
  {\RequirePackage{xcolor}}%
  {\RequirePackage{color}}
\usepackage{colortbl}
\usepackage{wrapfig}
\usepackage{ifxetex}
\ifxetex
  \usepackage{fontspec}
  \usepackage{xunicode}
  \catcode`⃥=\active \def⃥{\textbackslash}
  \catcode`❴=\active \def❴{\{}
  \catcode`❵=\active \def❵{\}}
  \def\textJapanese{\fontspec{Noto Sans CJK JP}}
  \def\textChinese{\fontspec{Noto Sans CJK SC}}
  \def\textKorean{\fontspec{Noto Sans CJK KR}}
  \setmonofont{DejaVu Sans Mono}
  
\else
  \IfFileExists{utf8x.def}%
   {\usepackage[utf8x]{inputenc}
      \PrerenderUnicode{–}
    }%
   {\usepackage[utf8]{inputenc}}
  \usepackage[english]{babel}
  \usepackage[T1]{fontenc}
  \usepackage{float}
  \usepackage[]{ucs}
  \uc@dclc{8421}{default}{\textbackslash }
  \uc@dclc{10100}{default}{\{}
  \uc@dclc{10101}{default}{\}}
  \uc@dclc{8491}{default}{\AA{}}
  \uc@dclc{8239}{default}{\,}
  \uc@dclc{20154}{default}{ }
  \uc@dclc{10148}{default}{>}
  \def\textschwa{\rotatebox{-90}{e}}
  \def\textJapanese{}
  \def\textChinese{}
  \IfFileExists{tipa.sty}{\usepackage{tipa}}{}
\fi
\def\exampleFont{\ttfamily\small}
\DeclareTextSymbol{\textpi}{OML}{25}
\usepackage{relsize}
\RequirePackage{array}
\def\@testpach{\@chclass
 \ifnum \@lastchclass=6 \@ne \@chnum \@ne \else
  \ifnum \@lastchclass=7 5 \else
   \ifnum \@lastchclass=8 \tw@ \else
    \ifnum \@lastchclass=9 \thr@@
   \else \z@
   \ifnum \@lastchclass = 10 \else
   \edef\@nextchar{\expandafter\string\@nextchar}%
   \@chnum
   \if \@nextchar c\z@ \else
    \if \@nextchar l\@ne \else
     \if \@nextchar r\tw@ \else
   \z@ \@chclass
   \if\@nextchar |\@ne \else
    \if \@nextchar !6 \else
     \if \@nextchar @7 \else
      \if \@nextchar (8 \else
       \if \@nextchar )9 \else
  10
  \@chnum
  \if \@nextchar m\thr@@\else
   \if \@nextchar p4 \else
    \if \@nextchar b5 \else
   \z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi
   \fi \fi  \fi  \fi  \fi  \fi  \fi \fi \fi \fi \fi \fi}
\gdef\arraybackslash{\let\\=\@arraycr}
\def\@textsubscript#1{{\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}
\def\Panel#1#2#3#4{\multicolumn{#3}{){\columncolor{#2}}#4}{#1}}
\def\abbr{}
\def\corr{}
\def\expan{}
\def\gap{}
\def\orig{}
\def\reg{}
\def\ref{}
\def\sic{}
\def\persName{}\def\name{}
\def\placeName{}
\def\orgName{}
\def\textcal#1{{\fontspec{Lucida Calligraphy}#1}}
\def\textgothic#1{{\fontspec{Lucida Blackletter}#1}}
\def\textlarge#1{{\large #1}}
\def\textoverbar#1{\ensuremath{\overline{#1}}}
\def\textquoted#1{‘#1’}
\def\textsmall#1{{\small #1}}
\def\textsubscript#1{\@textsubscript{\selectfont#1}}
\def\textxi{\ensuremath{\xi}}
\def\titlem{\itshape}
\newenvironment{biblfree}{}{\ifvmode\par\fi }
\newenvironment{bibl}{}{}
\newenvironment{byline}{\vskip6pt\itshape\fontsize{16pt}{18pt}\selectfont}{\par }
\newenvironment{citbibl}{}{\ifvmode\par\fi }
\newenvironment{docAuthor}{\ifvmode\vskip4pt\fontsize{16pt}{18pt}\selectfont\fi\itshape}{\ifvmode\par\fi }
\newenvironment{docDate}{}{\ifvmode\par\fi }
\newenvironment{docImprint}{\vskip 6pt}{\ifvmode\par\fi }
\newenvironment{docTitle}{\vskip6pt\bfseries\fontsize{22pt}{25pt}\selectfont}{\par }
\newenvironment{msHead}{\vskip 6pt}{\par}
\newenvironment{msItem}{\vskip 6pt}{\par}
\newenvironment{rubric}{}{}
\newenvironment{titlePart}{}{\par }

\newcolumntype{L}[1]{){\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{){\centering\arraybackslash}p{#1}}
\newcolumntype{R}[1]{){\raggedleft\arraybackslash}p{#1}}
\newcolumntype{P}[1]{){\arraybackslash}p{#1}}
\newcolumntype{B}[1]{){\arraybackslash}b{#1}}
\newcolumntype{M}[1]{){\arraybackslash}m{#1}}
\definecolor{label}{gray}{0.75}
\def\unusedattribute#1{\sout{\textcolor{label}{#1}}}
\DeclareRobustCommand*{\xref}{\hyper@normalise\xref@}
\def\xref@#1#2{\hyper@linkurl{#2}{#1}}
\begingroup
\catcode`\_=\active
\gdef_#1{\ensuremath{\sb{\mathrm{#1}}}}
\endgroup
\mathcode`\_=\string"8000
\catcode`\_=12\relax

\usepackage[a4paper,twoside,lmargin=1in,rmargin=1in,tmargin=1in,bmargin=1in,marginparwidth=0.75in]{geometry}
\usepackage{framed}

\definecolor{shadecolor}{gray}{0.95}
\usepackage{longtable}
\usepackage[normalem]{ulem}
\usepackage{fancyvrb}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{marginnote}

\renewcommand{\@cite}[1]{#1}


\renewcommand*{\marginfont}{\itshape\footnotesize}

\def\Gin@extensions{.pdf,.png,.jpg,.mps,.tif}

  \pagestyle{fancy}

\usepackage[pdftitle={Design and Implementation of a Real-Time Automated ECG Diagnosis (AED) System},
 pdfauthor={}]{hyperref}
\hyperbaseurl{}

	 \paperwidth210mm
	 \paperheight297mm
              
\def\@pnumwidth{1.55em}
\def\@tocrmarg {2.55em}
\def\@dotsep{4.5}
\setcounter{tocdepth}{3}
\clubpenalty=8000
\emergencystretch 3em
\hbadness=4000
\hyphenpenalty=400
\pretolerance=750
\tolerance=2000
\vbadness=4000
\widowpenalty=10000

\renewcommand\section{\@startsection {section}{1}{\z@}%
     {-1.75ex \@plus -0.5ex \@minus -.2ex}%
     {0.5ex \@plus .2ex}%
     {\reset@font\Large\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
     {-1.75ex\@plus -0.5ex \@minus- .2ex}%
     {0.5ex \@plus .2ex}%
     {\reset@font\Large}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
     {-1.5ex\@plus -0.35ex \@minus -.2ex}%
     {0.5ex \@plus .2ex}%
     {\reset@font\large}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
     {-1ex \@plus-0.35ex \@minus -0.2ex}%
     {0.5ex \@plus .2ex}%
     {\reset@font\normalsize}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
     {1.5ex \@plus1ex \@minus .2ex}%
     {-1em}%
     {\reset@font\normalsize\bfseries}}


\def\l@section#1#2{\addpenalty{\@secpenalty} \addvspace{1.0em plus 1pt}
 \@tempdima 1.5em \begingroup
 \parindent \z@ \rightskip \@pnumwidth 
 \parfillskip -\@pnumwidth 
 \bfseries \leavevmode #1\hfil \hbox to\@pnumwidth{\hss #2}\par
 \endgroup}
\def\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}}
\def\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}}
\def\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}}
\def\l@subparagraph{\@dottedtocline{5}{10em}{5em}}
\@ifundefined{c@section}{\newcounter{section}}{}
\@ifundefined{c@chapter}{\newcounter{chapter}}{}
\newif\if@mainmatter 
\@mainmattertrue
\def\chaptername{Chapter}
\def\frontmatter{%
  \pagenumbering{roman}
  \def\thechapter{\@roman\c@chapter}
  \def\theHchapter{\roman{chapter}}
  \def\thesection{\@roman\c@section}
  \def\theHsection{\roman{section}}
  \def\@chapapp{}%
}
\def\mainmatter{%
  \cleardoublepage
  \def\thechapter{\@arabic\c@chapter}
  \setcounter{chapter}{0}
  \setcounter{section}{0}
  \pagenumbering{arabic}
  \setcounter{secnumdepth}{6}
  \def\@chapapp{\chaptername}%
  \def\theHchapter{\arabic{chapter}}
  \def\thesection{\@arabic\c@section}
  \def\theHsection{\arabic{section}}
}
\def\backmatter{%
  \cleardoublepage
  \setcounter{chapter}{0}
  \setcounter{section}{0}
  \setcounter{secnumdepth}{2}
  \def\@chapapp{\appendixname}%
  \def\thechapter{\@Alph\c@chapter}
  \def\theHchapter{\Alph{chapter}}
  \appendix
}
\newenvironment{bibitemlist}[1]{%
   \list{\@biblabel{\@arabic\c@enumiv}}%
       {\settowidth\labelwidth{\@biblabel{#1}}%
        \leftmargin\labelwidth
        \advance\leftmargin\labelsep
        \@openbib@code
        \usecounter{enumiv}%
        \let\p@enumiv\@empty
        \renewcommand\theenumiv{\@arabic\c@enumiv}%
	}%
  \sloppy
  \clubpenalty4000
  \@clubpenalty \clubpenalty
  \widowpenalty4000%
  \sfcode`\.\@m}%
  {\def\@noitemerr
    {\@latex@warning{Empty `bibitemlist' environment}}%
    \endlist}

\def\tableofcontents{\section*{\contentsname}\@starttoc{toc}}
\parskip0pt
\parindent1em
\def\Panel#1#2#3#4{\multicolumn{#3}{){\columncolor{#2}}#4}{#1}}
\newenvironment{reflist}{%
  \begin{raggedright}\begin{list}{}
  {%
   \setlength{\topsep}{0pt}%
   \setlength{\rightmargin}{0.25in}%
   \setlength{\itemsep}{0pt}%
   \setlength{\itemindent}{0pt}%
   \setlength{\parskip}{0pt}%
   \setlength{\parsep}{2pt}%
   \def\makelabel##1{\itshape ##1}}%
  }
  {\end{list}\end{raggedright}}
\newenvironment{sansreflist}{%
  \begin{raggedright}\begin{list}{}
  {%
   \setlength{\topsep}{0pt}%
   \setlength{\rightmargin}{0.25in}%
   \setlength{\itemindent}{0pt}%
   \setlength{\parskip}{0pt}%
   \setlength{\itemsep}{0pt}%
   \setlength{\parsep}{2pt}%
   \def\makelabel##1{\upshape ##1}}%
  }
  {\end{list}\end{raggedright}}
\newenvironment{specHead}[2]%
 {\vspace{20pt}\hrule\vspace{10pt}%
  \phantomsection\label{#1}\markright{#2}%

  \pdfbookmark[2]{#2}{#1}%
  \hspace{-0.75in}{\bfseries\fontsize{16pt}{18pt}\selectfont#2}%
  }{}
      \def\TheFullDate{2013-01-15 (revised: 15 January 2013)}
\def\TheID{\makeatother }
\def\TheDate{2013-01-15}
\title{Design and Implementation of a Real-Time Automated ECG Diagnosis (AED) System}
\author{}\makeatletter 
\makeatletter
\newcommand*{\cleartoleftpage}{%
  \clearpage
    \if@twoside
    \ifodd\c@page
      \hbox{}\newpage
      \if@twocolumn
        \hbox{}\newpage
      \fi
    \fi
  \fi
}
\makeatother
\makeatletter
\thispagestyle{empty}
\markright{\@title}\markboth{\@title}{\@author}
\renewcommand\small{\@setfontsize\small{9pt}{11pt}\abovedisplayskip 8.5\p@ plus3\p@ minus4\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus2\p@
\belowdisplayshortskip 4\p@ plus2\p@ minus2\p@
\def\@listi{\leftmargin\leftmargini
               \topsep 2\p@ plus1\p@ minus1\p@
               \parsep 2\p@ plus\p@ minus\p@
               \itemsep 1pt}
}
\makeatother
\fvset{frame=single,numberblanklines=false,xleftmargin=5mm,xrightmargin=5mm}
\fancyhf{} 
\setlength{\headheight}{14pt}
\fancyhead[LE]{\bfseries\leftmark} 
\fancyhead[RO]{\bfseries\rightmark} 
\fancyfoot[RO]{}
\fancyfoot[CO]{\thepage}
\fancyfoot[LO]{\TheID}
\fancyfoot[LE]{}
\fancyfoot[CE]{\thepage}
\fancyfoot[RE]{\TheID}
\hypersetup{citebordercolor=0.75 0.75 0.75,linkbordercolor=0.75 0.75 0.75,urlbordercolor=0.75 0.75 0.75,bookmarksnumbered=true}
\fancypagestyle{plain}{\fancyhead{}\renewcommand{\headrulewidth}{0pt}}

\date{}
\usepackage{authblk}

\providecommand{\keywords}[1]
{
\footnotesize
  \textbf{\textit{Index terms---}} #1
}

\usepackage{graphicx,xcolor}
\definecolor{GJBlue}{HTML}{273B81}
\definecolor{GJLightBlue}{HTML}{0A9DD9}
\definecolor{GJMediumGrey}{HTML}{6D6E70}
\definecolor{GJLightGrey}{HTML}{929497} 

\renewenvironment{abstract}{%
   \setlength{\parindent}{0pt}\raggedright
   \textcolor{GJMediumGrey}{\rule{\textwidth}{2pt}}
   \vskip16pt
   \textcolor{GJBlue}{\large\bfseries\abstractname\space}
}{%   
   \vskip8pt
   \textcolor{GJMediumGrey}{\rule{\textwidth}{2pt}}
   \vskip16pt
}

\usepackage[absolute,overlay]{textpos}

\makeatother 
      \usepackage{lineno}
      \linenumbers
      
\begin{document}

             \author[1]{Masudul Haider  Imtiaz}

             \affil[1]{  University of Dhaka, Bangladesh}

\renewcommand\Authands{ and }

\date{\small \em Received: 10 December 2012 Accepted: 3 January 2013 Published: 15 January 2013}

\maketitle


\begin{abstract}
        


Automated ECG diagnosis (AED) & classification is essential to the timely diagnosis of potentially lethal heart conditions in clinical settings. In noisy environment, ECG feature extraction problem with considerable accuracy still remains open for research.Although, Wavelet Transform (WT) has been proved to be more prominent approach than any other conventional detection algorithms, but much abstruse to implement in commercial software. To reduce this implementation complexity, in this work, a combination of DWT and FFT-IFFT pair is proposed with Adaptive thresholding technique. MATLAB analysis supports this preprocessing and automatic detection idea in terms of accuracy. A software implementation of this AED system is presented here in .net framework which can be interfaced with any commercial ECG machine by changing some parameters.

\end{abstract}


\keywords{AED system, ECG, feature extraction, heart beat detection, P-QRS-T wave, wavelet transform.}

\begin{textblock*}{18cm}(1cm,1cm) % {block width} (coords) 
\textcolor{GJBlue}{\LARGE Global Journals \LaTeX\ JournalKaleidoscope\texttrademark}
\end{textblock*}

\begin{textblock*}{18cm}(1.4cm,1.5cm) % {block width} (coords) 
\textcolor{GJBlue}{\footnotesize \\ Artificial Intelligence formulated this projection for compatibility purposes from the original article published at Global Journals. However, this technology is currently in beta. \emph{Therefore, kindly ignore odd layouts, missed formulae, text, tables, or figures.}}
\end{textblock*}


\let\tabcellsep& 	 	 		 
\section[{I. INTRODUCTION he electrocardiogram (ECG or EKG from the}]{I. INTRODUCTION he electrocardiogram (ECG or EKG from the}\par
German Elektrokardiogram) refers to the linear recording of quasi-periodical, rhythmically repeating small voltage signal (\textasciitilde 1mV) synchronized by the heart, the bioelectric event generator \hyperref[b0]{[1,}\hyperref[b1]{2]}. The term ECG was coined into medical practice 100 years ago by Nobel Prize winner, William Einthoven, who first introduced the fundamental function of the ECG \hyperref[b0]{[1]}. Like a signature or figure-print, ECG provides electrophysiology that indicates an overview of the cardiac health. The non-invasive recording process and the visual interpretation facility have made it as a powerful tool for the medical professionals to extract clinical information about of their patients' health. The starting point for electrocardiography is the detection of Rspikes of QRS-complex and then P and T waves reflecting the process of depolarization of the ventricles, atria \& final re-polarization of ventricular myocardium respectively \hyperref[b2]{[3]}. Researchers of biomedical field have set the standard amplitude and duration values of those peaks and their derivatives. Deviation from the standard value and asymmetric phase relationships of the resulting ECG signal reflect abnormality of the human body. Thus, it is used as the primary diagnostic tool of almost all heart diseases. Sometimes, a short period ECG test in the clinical environment may prove not to be steady at all, as often it cause imperfect reports which is a threat to the potentially lethal patients. Arrhythmia, a disease caused by irregularity in heart rhythm has always been unpredictable for short time ECG Test \hyperref[b3]{[4]}. Those limitations often let physicians to prescribe costly hazardous diagnosis instead this non-invasive method. In spite of these highlighted drawbacks of ECG accuracy, it does not lose its zeal in patient's mind because of its cost-effectiveness and availability. Regarding this issues, a lot of researches have been carried out recently to make ECG analysis as accurate as possible. To reduce the noise and artifacts as possible, highly efficient ECG machine with the combination of analog and digital filter is of ultimate necessity in modern cardio pathology. Again, automatic detection software is now also included in all ECG system with digital display and dedicated printing facility. But the philosophy of ECG detection method behind the gorgeous front end is not transparent at all and the accuracy factors. So, physicians often reject the diagnosis reports generated by this system and follow the traditional methods like visual inspection or manual comparison with standard waveform. So, the precise arrangement of automated ECG diagnosis (AED) system can not only reduce the physician's labor, but also can assist in complicate diagnosis. Also, it may let the patients to self-study their cardiac conditions even in lethal conditions without any help of the physician. This work mainly focuses on these issues and proposes an accurate solution with pointing out the pros and cons of the system. 
\section[{II. ECG DETAILS}]{II. ECG DETAILS}\par
ECG is the graphic tracing of the time duration and magnitude of 3-characteristics wave peaks P, QRS, and T. P wave is the epoch related to atrial contraction. The event of ventricular contraction is represented by QRS epoch. Atrial relaxation does not produce any distinct waveform in the ECG as it is overshadowed by the following QRS wave. PQ, ST segment are two isoelectric base-line indicators \hyperref[b0]{[1,}\hyperref[b1]{2]}. PR interval represents the time interval between the beginning of the de-polarizations of the atrium and the ventricle respectively. The QT interval extends from the beginning of the Q wave to the end of the T wave, represents the time of ventricular contraction and re-polarization    
\section[{STATE OF THE ART}]{STATE OF THE ART}\par
The development of the electrocardiography was the culmination of scientific efforts aimed at improving the physiological phenomenon and the welfare of mankind \hyperref[b0]{[1]}. Difficulties arise mainly from the huge diversity of the waveform, noises and artifacts accompanying non-stationary ECG signals. Hence, universally acceptable solution of feature extraction has not been found yet. Several QRS detection algorithms have been proposed in early eighties \hyperref[b2]{[3,}\hyperref[b6]{7]} mainly emphasized R spike detection by amplitude derivative approaches \hyperref[b7]{[8,}\hyperref[b8]{9]}. Fraden and Neuman \hyperref[b7]{[8]} developed a QRS detection scheme where a threshold is calculated as a fraction of the peak value of the ECG. Algorithms \hyperref[b8]{[9]}\hyperref[b9]{[10]}\hyperref[b10]{[11]} are based on the first derivative only or both first and second derivatives. Balda \hyperref[b9]{[10]} suggested searching values exceeding the threshold in a weighted summation of the first and second derivative. Ahlstrom and Tompkins in \hyperref[b10]{[11]} proposed that the absolute values of the first derivative would be smoothed and added with the absolute values of the second derivative.  \hyperref[b6]{[7,}\hyperref[b13]{13,}\hyperref[b14]{14]}. WT is proved more effective one. In 1995, Li et al. \hyperref[b15]{[15]} used an algorithm based on finding the maxima larger than a threshold obtained from the pre-processed initial beats. Later in 1999, Kadambe et al. produced a method allocating a R peak at a point being the local maxima of several consecutive dyadic wavelet scales. In both methods, a post-processing is allowed to eliminate false R detections. Based on these two publications, a lot of researches were published on the beat detection based on the WT  {\ref (Shyuand et al., 2004;} {\ref Fard et al., 2007;}\hyperref[b14]{Martinez et al., 2004;}\hyperref[b19]{Addison, 2005;} {\ref Chen et al., 2005;} {\ref Chen et al., 2006)}  \hyperref[b17]{[16]}\hyperref[b18]{[17]}\hyperref[b19]{[18]}. Based on the functionality, WT is categorized in sub sections, CWT, DWT; continuous and discrete. DWT is only the sampled version of CWT \hyperref[b20]{[19]} although the choice of wavelets, scale factor, re-configurability is limited in CWT comparatively \hyperref[b17]{[16]}\hyperref[b18]{[17]}\hyperref[b19]{[18]}\hyperref[b20]{[19]}. But, the main problem of any WT is that one has to choose the mother wavelet from a wide prototype range and the scales used to analyze the signal on an empirical basis. The mother wavelet can easily be chosen based on its characteristics and resemblance with a QRS wave, the ideal scale(s) at which the QRS are matched is harder to guess a priori  {\ref [20]}. All citation mentioned earlier are based on the MATLAB analysis using a dedicated tool box. MATLAB is always useful for research work as lots of built-in library functions are developing day-by-day to make it easier for end users. But, it is not at all useable in commercial software attached with a portable ECG machine. The exclusion of bulky computerized system from an ECG system is of ultimate importance which may sacrifice well-proved algorithms in research field due to the computational complexities. Hence, only thresholding based elementary algorithms are preferred to implement than any other established research patents. Responding all these motivations, authors were intended to develop acommercial software especially for the portable ECG machine. It was needed to make some trade-offs with WT based detection algorithm to make it implementable. So, the choice was limited to dyadic DWT approach and the Daubechies (DB) type wavelet families. A lot of arguments had risen between the effectiveness of two members DB4 and DB6; as both prove comparatively better in different approaches \hyperref[b22]{[22]}. In this work, a comparative study has done and set DB4 as mother wavelet with specific scale factors. In noise reduction issue, an extra FFT-IFFT pair is engaged for further de-noising along with the popular WT tool. Feature extraction has been done here with some modification of the established algorithms of \hyperref[b19]{[18]}\hyperref[b20]{[19]} {\ref [20]}\hyperref[b21]{[21]}\hyperref[b22]{[22]}. After proving the accuracy of this, MIT-BIH database is also engaged to prove the comparative accuracy and readiness of it. Wavelets may of orthogonal, orthonormal, bioorthogonal, scalar or multi-wavelet type. This work is only limited to the orthonormal dyadic type having restricted resolution of order 2 j (where j Z) i.e. a=2 j and b=2 j k. Such discrete wavelet associated with scaling functions (t) can be convolved with x(t) to produce approximation coefficients S But the input signal coefficient S 0 is of finite length N=2 M . So the range of scales that can be investigated is 0 m M. Hence a discrete approximation of the signal is written as: 
\section[{IV. THEORY OF WAVELET TRANSFORM}]{IV. THEORY OF WAVELET TRANSFORM}\par
Where the mean signal approximation at scale M is:\par
The detail signal approximation corresponding to scale m (error in approximation for finite length signal) is given by: So, the signal approximation at a specific scale is a combination of the approximation and the detail at the next lower scale.\par
If scale m = 3 were chosen, the signal approximation is like: The iso-electric baseline (indicating the PQ \& ST segment) shifting usually comes from the respiration and the electrode impedance at frequency wandering in 0.15\textasciitilde 0.3Hz range. As it is well under 0.5Hz, it can be suppressed without disturbing the original signal. Instead of conventional high pass (digital) filter, WT is a better approach to remove the baseline wandering as it introduces no latency and less distortion than the digital filter. Here, we decompose the ECG signal into 8 levels shown in Figure4 where the set of numbers a j  {\ref [n]} represents the 'coarse approximation' of the signal at the resolution 2 -(j-1) \& the set of numbers d j [n] represents the 'details' lost in approximating the signal at the resolution 2 -j . Thus, given a discrete time-domain signal X[n] assumed to be at the resolution 2 0 is equal to a o [n] decomposed into two sets of numbers a 1 [n] and d 1  {\ref [n]}. a 1 [n] can be further divided into a 2 [n]and d 2 [n] and so on. This happens by passing X[n] through successive low pass G(w) and high pass H(w) symbolic analysis filters. At every level, filtering and sub-sampling result in doubled frequency resolution, halved time resolution and the elimination of half of the samples to adhere the Nyquist criteria. Reconstruction process is the reverse of decomposition, where the approximation, the detail coefficients at every level are up-sampled by 2 and passed through exactly matched low-pass G(w) and high pass H(w) synthesis filters and finally added as shown in Figure4. The same number of levels is taken as in the case of the decomposition. This WT principle can be used significantly in noise elimination in ECG analysis. by using DB4 prototype and reconstruct the approximation (A8) and detail (D8) signals at level 8. The DB4 prototype wavelet and the details level (D1-D8) is shown in Figure5 and Figure6 respectively. The summation of A8 and D8 will be the low frequency component of ECG signal that causes the baseline shifting. This low frequency signal is deducted from the original ECG signal to get the one excludes baseline shifting. The problem of baseline shifting is solved here by an advance filtering techniques i.e. De-trended Signal (DS) Original Signal-(A8+D8). Figure5b depicts the result of De-trending process. This filtering technique is adapted influenced by \hyperref[b22]{[22]} where DB6 was used as mother prototype. This approach achieves 8\% more SNR than the proposal in \hyperref[b22]{[22]}. After removing baseline wander, the resulting ECG signal is now more stationary and explicit than the original one. However, some other types of noises may still affect feature extraction process. These noises may be of complex stochastic processes within a wideband, so one cannot remove them by using traditional digital filters. To remove such high frequency noises, one can efficiently use the Wavelet decomposed signal components found by earlier successive approximations. Each wavelet coefficient of those sub-bands can be modified by applying a threshold function \& finally reconstructing the de-noised signal. This subtle approach confirms not to lose signal's sharpest features, discarding only the portions of the details that exceed a certain limit due to the occurrence of noise. Such global thresholding option is derived from Donoho-Johnstone fixed-form thresholding strategy for an unscaled white noise \hyperref[b22]{[22]}. Hence, the lower details are removed from the original and the high frequency components are vitiated.\par
In this work, lower details D1, D2 are removed and the signal becomes smoother and noise disappears since noises are marked by high frequency components picked up along  QRS complex identification is the most important segment of any ECG feature extraction algorithm. The efficiency of total algorithm largely depends on the accuracy of this module. The R peaks have the largest amplitude among all, allowing them the easiest way to detect and good reference points for farther detections. In this study, for detecting R-waves, the benefits of WT are utilized intelligently. Only details up to the level D6 are kept for QRS complex detection and all the rest are discarded. By observing the average amplitudes of the R-waves, 30\% of the maximum value is being set initially as the threshold level (T). any upward excursion that exceeds the T is taken as an Rwave otherwise termed as noise. Thus, by calculating two slope values, one upward \& one downward, an Rwave can be detected. Consecutive R-waves are detected using the same technique and noise peaks are eliminated. The detection of the QRS complex is being done from identified R peaks based on modulus maxima \hyperref[b21]{[21]}\hyperref[b22]{[22]}. The Q and S point occurs about the R Peak with in 0.15second. The left point denotes the Q point and the right one signify the S point. Calculating the distance from zero point or close to zero on the left side of R Peak within the threshold limit denotes the presence of Q point. Similarly the S point comes from the right hand detection [Figure9]. This is the most convenient way to measure those peaks and their derivatives.\par
ii. P and T wave detection P wave is detected from filtered and de-noising ECG signal using the method "Length-Amplitude-Slope" introduced by [20]. To determine P wave amplitude, slope, starting point, destination and forms, the fourth scale WT information is employed here. Fourth scale is chosen based on energy analysis of P wave in ECG signal and the impact of baseline drift. This method is only possible if QRS detection and interval calculation is done correctly. Employing a threshold amplitude, P wave is searched in RR interval. RR and PR standard intervals are 0.6-1.0s and 0.12-0.20s respectively. It is assumed that this is a P peak in every 0.40s before the identified R spike. Then applying a threshold value of 30\% of the standard value 0.25mV, all detected maxima points are leveled as P wave. Also the instantaneous P-R and P-P intervals are measured accordingly. After detecting P-wave and QRS-complex, "Curve Length Transform" described in \hyperref[b20]{[19]} is followed as T-wave detection algorithm. The details are omitted here. Summarizing all the steps, outcome of the complete feature extraction method is shown in Figure10.  needed a graphical user interface (GUI) with an input segment to provide the raw ECG signal and a separate report generation section. Being motivated by this, arule based architecture is designed based on the well known "Water Fall Method" of software development with the following steps: system requirement, system design, implementation \& the verification. This system will extract the characteristic feature of ECG signal with the comparison of predefined standard parameters and predict the diagnosis based on abnormalities found on that The user interface form, termed as "Main Form" is designed for the end-user or physician. It contains three menus named "Setup", Task" and "Exit". "Setup" tab is to set the standard amplitude and duration values for three categorized patients: male, female \& children in separated forms named "Normal Amplitude" \& "Normal Duration" under "Normal Amplitude Setup" and "Normal Duration Setup" sub-menus of "Setup" menu [Figure11].\par
The total information of the deviation of standard parameters for any specific disease is needed to input in the "Abnormalities" form through the "Abnormalities\par
Setup" sub-menu under the "Setup" menu. For an instance, Hypocalcaemia, a heart disease has deviations mainly in ST segment with the prolonged QT specified by the physicians. These syndromes are stored in the attached SQL server 2008 database in the process schematically shown in Figure12. These procedures are repeated many times to store all the deviations [Table2].\par
b) Core/ Processing Unit\par
The standard values and disease syndromes being input on "Normal Duration", "Normal Amplitude", "Abnormalities" forms are being stored in tables "Wave Standard Duration", "Wave Standard Amplitude", "Abnormalities Symptom Data" respectively in "ECG Analytical Soft DB" database. Another table, "Patient" is reserved for storing patient personal information attached with his/her ECG (.xml) file. The Relational Database schema is shown in Figure13. This userfriendly system is developed in .net framework using C\# language. The characteristic features being extracted using De-noising, De-trending, WT, FFT-IFFT pair techniques, will be stored in "Patient Real Data info"   The fields of this table will be compared with the standard values and abnormalities stored earlier and will generate a probabilistic diagnosis based on this ruled based architecture. Thus "Comparison Result" table will be filled on and to display in report generation unit. c) Report Generation and Case Study "Task" menu containing "ECG Analysis" and "ECG Signals" sub-menu in the "Main Form" is the report generation section where to recognize/ browse the given ECG log file (.xml format) with patient details. Extracted characteristic features from all 12-leads will be displayed in tabular format with probabilistic diagnosis in "ECG Analysis" form Figure14. Again, in some analysis purposes, sometimes it is necessary for physicians to have visual representation of ECG waveform than to have the measured characteristic value, may be 12-lead graph all-together for comparison. "ECG Signals" form is designed (Figure15) for this purpose with the scales are in millisecond and millivolt in time \& amplitude axis respectively. 
\section[{VII. ANALYSIS}]{VII. ANALYSIS}\par
To analysis the performance of the proposed system, it was needed the noise simulated raw ECG signal and the real life ECG data. Using advanced signal processing toolkit (ASPT) in Lab VIEW (Laboratory Virtual Instrument Engineering Workbench)-2009, the low noise ECG signal (used in earlier analysis) and the raw waveform from MIT-BIH Arrhythmia database are simulated by mixing different types of noises (Figure13).   For the performance analysis of the proposed software, a series of raw ECG log files with the diagnosis report by their system has been collected from the Department of Biomedical Engineering, University of Dhaka. Table4 shows the comparisons with the proposed system developed in SectionVI. It is obvious from these outcomes that the diagnosis reports generated by the proposed algorithm are quite similar to the diagnosis report collected from the reference system with only 10\% variation. The functionality of this software has also being checked by a physician. The proposed algorithm obtains an average sensitivity rate of 93.7\% and average error rate below 8\% after analyzing 25 records. To our knowledge, only the R spike detectors based on Li's algorithm \hyperref[b15]{[15]} obtained the comparable results with sensitivity between 99.7\% and 99.9\%. However, that algorithm makes use of several heuristic rules and requires the setting of many empirical parameters. Here the proposed algorithm achieves comparable performances with a simple non-parametric thresholding method and without any need of advanced post processing stage comparing to that article. Also, the presented the software implementation of this algorithm proves that the accurate diagnosis is always satisfactory utilizing this detection logic. 
\section[{IX. CONCLUSION AND FUTURE WORK}]{IX. CONCLUSION AND FUTURE WORK}\par
The large variety of ECG feature extraction algorithms and the continuous efforts for their enhancement proves that universally acceptable solution has not been found yet. In this study, emphasizing on wavelet thresholding, relevant noise removal and utilization of simple detection logic for the ECG characteristics detection is present. A robust and efficient tool for fast, less complex practical software is also provided that can be interfaced efficiently with commercial ECG machines. The complete verification of the proposed software can lead a massive utilization in even rural areas where the presence of the physicians is not so available. The day-by-day improvement in Biomedical field demands the comprehensive update of the software's database to include the miniature researches. And the more attractive feature could have been\begin{figure}[htbp]
\noindent\textbf{1}\includegraphics[]{image-2.png}
\caption{\label{fig_0}Figure 1 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{2}\includegraphics[]{image-3.png}
\caption{\label{fig_1}Figure 2 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{3}\includegraphics[]{image-4.png}
\caption{\label{fig_2}Figure 3 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{}\includegraphics[]{image-5.png}
\caption{\label{fig_3}}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{}\includegraphics[]{image-6.png}
\caption{\label{fig_4}Wavelet}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{4}\includegraphics[]{image-7.png}
\caption{\label{fig_5}Figure 4 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{}\includegraphics[]{image-8.png}
\caption{\label{fig_6}}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{56}\includegraphics[]{image-9.png}
\caption{\label{fig_7}Figure 5 Figure 6 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{7}\includegraphics[]{image-10.png}
\caption{\label{fig_8}Figure 7 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{8}\includegraphics[]{image-11.png}
\caption{\label{fig_9}Figure 8 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{9}\includegraphics[]{image-12.png}
\caption{\label{fig_10}Figure 9 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{10}\includegraphics[]{image-13.png}
\caption{\label{fig_11}Figure 10 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{11}\includegraphics[]{image-14.png}
\caption{\label{fig_12}Figure 11 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{12}\includegraphics[]{image-15.png}
\caption{\label{fig_13}Figure 12 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{13142)15}\includegraphics[]{image-16.png}
\caption{\label{fig_14}Figure 13 :Figure 14 : 2 ( ) YearFigure 15 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{1315}\includegraphics[]{image-17.png}
\caption{\label{fig_15}Figure 13 :Figure 15 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{.} \par 
\begin{longtable}{}
\end{longtable} \par
 
\caption{\label{tab_0}table .}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{3} \par 
\begin{longtable}{P{0.11428571428571428\textwidth}P{0.22380952380952382\textwidth}P{0.16190476190476188\textwidth}P{0.19047619047619047\textwidth}P{0.1595238095238095\textwidth}}
\tabcellsep \multicolumn{3}{l}{using reference MIT-BIH Database}\tabcellsep \\
Record\tabcellsep Total\tabcellsep Detected\tabcellsep Sensitivity\tabcellsep Accuracy\\
No.\tabcellsep Beats\tabcellsep Beats TP\tabcellsep (\%)\tabcellsep (\%)\\
100\tabcellsep 2273\tabcellsep 2172\tabcellsep 89.96\tabcellsep 11.04\\
101\tabcellsep 1865\tabcellsep 1864\tabcellsep 93.12\tabcellsep 6.88\\
102\tabcellsep 2179\tabcellsep 2100\tabcellsep 92.15\tabcellsep 7.75\\
103\tabcellsep 2078\tabcellsep 2123\tabcellsep 94.52\tabcellsep 5.48\\
105\tabcellsep 2543\tabcellsep 2633\tabcellsep 91.86\tabcellsep 8.14\\
107\tabcellsep 2124\tabcellsep 2088\tabcellsep 92.35\tabcellsep 7.65\\
108\tabcellsep 1775\tabcellsep 1864\tabcellsep 93.49\tabcellsep 6.51\\
109\tabcellsep 2530\tabcellsep 2520\tabcellsep 89.67\tabcellsep 10.33\\
115\tabcellsep 1953\tabcellsep 1825\tabcellsep 90.23\tabcellsep 9.77\\
118\tabcellsep 2278\tabcellsep 2187\tabcellsep 94.56\tabcellsep 5.44\\
119\tabcellsep 1987\tabcellsep 1768\tabcellsep 95.16\tabcellsep 4.84\\
124\tabcellsep 1473\tabcellsep 1366\tabcellsep 89.65\tabcellsep 10.35\\
200\tabcellsep 2601\tabcellsep 2806\tabcellsep 90.12\tabcellsep 9.88\end{longtable} \par
 
\caption{\label{tab_2}Table 3 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{4} \par 
\begin{longtable}{P{0.21570996978851964\textwidth}P{0.1027190332326284\textwidth}P{0.3055891238670695\textwidth}P{0.0513595166163142\textwidth}P{0.03595166163141994\textwidth}P{0.0513595166163142\textwidth}P{0.08731117824773414\textwidth}}
\tabcellsep \multicolumn{2}{l}{Case 1}\tabcellsep \multicolumn{2}{l}{Case 2}\tabcellsep \multicolumn{2}{l}{Case 3}\\
ECG\tabcellsep This\tabcellsep Ref.\tabcellsep This\tabcellsep Ref.\tabcellsep This\tabcellsep Ref.\\
Features\tabcellsep system\tabcellsep system\tabcellsep system\tabcellsep system\tabcellsep system\tabcellsep system\\
P-int\tabcellsep 10ms\tabcellsep 12ms\tabcellsep 15ms\tabcellsep 20ms\tabcellsep 10ms\tabcellsep 15ms\\
\multicolumn{7}{l}{QRS-int 10ms 14ms 20 ms 18 ms 15ms 20ms}\\
T-int\tabcellsep 15ms\tabcellsep \multicolumn{4}{l}{16ms 35 ms 30 ms 40ms}\tabcellsep 42ms\\
PQ-int\tabcellsep 20ms\tabcellsep \multicolumn{4}{l}{23ms 15 ms 18 ms 15ms}\tabcellsep 19ms\\
QT-int\tabcellsep 45ms\tabcellsep \multicolumn{4}{l}{40ms 30 ms 35 ms 35ms}\tabcellsep 32ms\\
PR-int\tabcellsep 20ms\tabcellsep \multicolumn{4}{l}{15ms 15 ms 20 ms 16ms}\tabcellsep 15ms\\
ST-int\tabcellsep 40ms\tabcellsep \multicolumn{4}{l}{38ms 20 ms 22 ms 25ms}\tabcellsep 28ms\end{longtable} \par
 
\caption{\label{tab_3}Table 4 :}\end{figure}
 			\footnote{© 2013 Global Journals Inc. (US) Volume} 			\footnote{© 2013 Global Journals Inc. (US)} 			\footnote{© 2013 Global Journals Inc. (US) Volume Design and Implementation of a Real-Time Automated ECG Diagnosis (Aed) System} 			\footnote{© 2013 Global Journals Inc. (US) Design and Implementation of a Real-Time Automated ECG Diagnosis (Aed) System} 		 		\backmatter  			 \par
included based on the interests of end-level users (patients). These are left open for the future.			 			  				\begin{bibitemlist}{1}
\bibitem[ Biolog. Eng. Comput]{b12}\label{b12} 	 		\textit{},  	 	 		\textit{Biolog. Eng. Comput}  		1 p. .  	 
\bibitem[1995r and Balda ()]{b16}\label{b16} 	 		 			A 1995r 		,  		 			Balda 		.  		\textit{Trends in Computer-Process Electrocardiograms},  				1977. North Holland. p. .  	 
\bibitem[Zhou et al. ()]{b3}\label{b3} 	 		‘A New System Dedicated to Real-time Cardiac Arrhythmias Tele-assistance and Monitoring’.  		 			Haiying Zhou 		,  		 			Kun Mean 		,  		 			Laurent Hou 		,  		 			Christophe De Gineste 		,  		 			Vaulx 		.  	 	 		\textit{Journal of Universal Computer Science}  		2006. 12  (1)  p. .  	 
\bibitem[Holsinger ()]{b8}\label{b8} 	 		‘A QRS Preprocessor Based on Digital Differentiation’.  		 			W P Holsinger 		.  	 	 		\textit{IEEE Trans. Biomed. Eng}  		1971. 18 p. .  	 
\bibitem[Zong et al. ()]{b20}\label{b20} 	 		‘A QT Interval Detection Algorithm Based on ECG Curve Length Transform" USA’.  		 			W Zong 		,  		 			Saeed 		,  		 			Heldt 		.  		 \url{http://lcp.mit.edu/pdf/Zong06.pdf20}  	 	 		\textit{International Scientific Conference Computer Science}  		2008.  	 	 (Wavelet Transform Based ECG Characteristic Points Detector) 
\bibitem[Pan and Tompkin ()]{b10}\label{b10} 	 		‘A Real-Time QRS Detection Algorithm’.  		 			J Pan 		,  		 			W J Tompkin 		.  	 	 		\textit{IEEE Trans. Biomed. Eng}  		1985. 1985. p. .  	 
\bibitem[Martinez et al. ()]{b14}\label{b14} 	 		‘A wavelet-based ECG delineator: evaluation on standard databases’.  		 			J P Martinez 		,  		 			R Almeida 		,  		 			S Olmos 		,  		 			A P Rocha 		,  		 			P " Laguna 		.  	 	 		\textit{IEEE Transactions on Biomedical Engineering}  		2004. 51 p. .  	 
\bibitem[Balda ()]{b9}\label{b9} 	 		 			R A Balda 		.  		\textit{Trends in Computer-Process Electrocardiograms},  				1977. North Holland. p. .  	 
\bibitem[Rangayyan ()]{b2}\label{b2} 	 		‘Biomedical Signal Analysis, A Case Study approach’.  		 			R M Rangayyan 		.  	 	 		\textit{IEEE Press Series in Biomedical Engineering}  		2002. Wiley. p. .  	 
\bibitem[Li et al.]{b15}\label{b15} 	 		‘Detection of ecg Characteristic Points using Wavelet Transform’.  		 			C Li 		,  		 			C Zheng 		,  		 			C " Tai 		.  	 	 		\textit{IEEE Trans. Biomed}  		42  (1)  p. .  	 
\bibitem[Gautam and Sharma ()]{b22}\label{b22} 	 		‘Detection of QRS complexes of ECG recording based on wavelet transform using MATLAB’.  		 			R Gautam 		,  		 			A K Sharma 		.  	 	 		\textit{International Journal of Engineering Science and Technology}  		2010. 2  (7)  p. .  	 
\bibitem[ECG]{b1}\label{b1} 	 		\textit{ECG},  		 \url{http://en.wikipedia.org/wiki/Electrocardiogram}  		 	 
\bibitem[Su´arez et al. ()]{b13}\label{b13} 	 		‘Ecg beat Detection using a Geometrical Matching Approach’.  		 			K V Su´arez 		,  		 			J C Silva 		,  		 			Y Berthoumieu 		,  		 			P Gomis 		,  		 			M " Najim 		.  	 	 		\textit{IEEE Transactions on Biomedical Engineering}  		2007. 54  (4)  p. .  	 
\bibitem[Dr and Abdullah]{b4}\label{b4} 	 		\textit{ECG in Medical Practice},  		 			A B M Dr 		,  		 			Abdullah 		.  		p. .  	 	 (3 rd Edition, Sole Distributor) 
\bibitem[Dr and Carlies ()]{b5}\label{b5} 	 		‘ECG Standards and Abnormalities’.  		 			M H Dr 		,  		 			Carlies 		.  	 	 		\textit{Journal of BioMedicine}  		2006. 9  (3)  p. .  	 
\bibitem[Bhyri et al. (2009)]{b18}\label{b18} 	 		‘Estimation of ECG features using LabVIEW’.  		 			Channappa Bhyri 		,  		 			S V T Kalpana 		,  		 			L M Hamde 		,  		 			Waghmare 		.  	 	 		\textit{TECHNIA -International Journal of Computing Science and Communication Technologies}  		July 2009. 2  (1) .  	 
\bibitem[Human-heart]{b0}\label{b0} 	 		\textit{Human-heart},  		 \url{http://en.wikipedia.org/wiki/Humanhear}  		 	 
\bibitem[Lascu and Lascu ()]{b21}\label{b21} 	 		‘LabVIEW Electrocardiogram Event and Beat Dection’.  		 			Mihaela Lascu 		,  		 			Dan Lascu 		.  	 	 		\textit{WSEAS Transactions on computer research}  		2008. 3  (1)  p. .  	 
\bibitem[Fraden and Neuman ()]{b7}\label{b7} 	 		‘QRS Wave Detection’.  		 			J Fraden 		,  		 			M R Neuman 		.  	 	 		\textit{Med. Biolog. Eng. Comput}  		1980. 18 p. .  	 
\bibitem[Mahoudeauxp]{b11}\label{b11} 	 		\textit{Simple Microprocessorbased System for On-line ECG Analysis},  		 			P M Mahoudeauxp 		.  		Med.  	 
\bibitem[Kohler et al. ()]{b6}\label{b6} 	 		‘The principles of software QRS detection’.  		 			B Kohler 		,  		 			C Henning 		,  		 			R Orglmeister 		.  	 	 		\textit{IEEE Engineering in Medicine and Biology}  		2002. p. .  	 
\bibitem[Shyuand et al.]{b17}\label{b17} 	 		‘Using wavelet Transform and Fuzzy Neural Network for QRS detection from the Holter ECG’.  		 			L.-Y Shyuand 		,  		 			Y.-H Wu 		,  		 			W " Hu 		.  	 	 		\textit{IEEE Transactions on Biomedical Engineering}  		51 p. 4.  	 
\bibitem[Addison ()]{b19}\label{b19} 	 		‘Wavelet transform and the ECG" a review’.  		 			P Addison 		.  	 	 		\textit{Physiological Measurement}  		2005. 26 p. .  	 
\end{bibitemlist}
 			 		 	 
\end{document}
