Skip to main content
. 2018 Jan 28;18(2):379. doi: 10.3390/s18020379
Algorithm 1: Delineation of ECG feature points.
Input:
Vecg: Vector of ECG data points with amplitude, Sr: ECG data sampling rate,
Hr: Heart rate, RFV: Set of referenced feature values.
Output:
Fecg={P,Q,R,S,T}: ECG feature point set.
Notations:
ζpt: Maximum amplitude data point,
cnRpts: Candidate R points,
Xrg: Range of points to locate point X, where X{P,Q,S,T},
α: User defined error margin constant,
σRpt(0,1): Constant to detect R points,
Fecga: ECG feature point set for athcardiac cycle.
1 Initialize Fecg=null;
2 Estimate cardiac cycle length: CL=SrHr;
3 Calculate # of cardiac cycles: CCs=|Vecg|CL;
4 Select maximum amplitude data point: ζpt =max(Vecg1,,Vecg|Vecg|);
5 for a=1 to CCs do
6  Initialize Fecga=null;
7  Select candidate R points: cnRpts=(VecgjσRptζpt), jVecg;
8Rpt=max(cnRpts); // Delineation of feature point R.;
9Fecga=FecgaRpt;
10Qrg=Rpt(ΔQRSwvSr2+α),Rpt;
11Qpt=min(Vecgj), jQrg; // Delineation of feature point Q.;
12Fecga=FecgaQpt;
13Prg=Rpt(ΔPRinvSr+α),Rpt;
14Ppt=max(Vecgj), jPrg; // Delineation of feature point P.;
15Fecga=FecgaPpt;
16Srg=Rpt,Rpt+(ΔQRSwvSr2+α);
17Spt=min(Vecgj), jSrg; // Delineation of feature point S.;
18Fecga=FecgaQRSpt;
19Trg=Rpt,Rpt+(ΔQTinvSrΔQRSwvSr2+α);
20Tpt=max(Vecgj), jTrg; // Delineation of feature point T.;
21Fecga=FecgaTpt;
22Fecg=FecgFecga;
23 endfor
24 return Fecg;