ECGSYN - A Realistic ECG Waveform Generator
ECGSYN generates a synthesised ECG signal with user-settable mean heart rate, number of beats, sampling frequency, waveform morphology (P, Q, R, S, and T timing, amplitude,and duration), standard deviation of the RR interval, and LF/HF ratio (a measure of the relative contributions of the low and high frequency components of the RR time series to total heart rate variability). Using a model based on three coupled ordinary differential equations, ECGSYN reproduces many of the features of the human ECG, including beat-to-beat variation in morphology and timing, respiratory sinus arrhythmia, QT dependence on heart rate, and R-peak amplitude modulation. The output of ECGSYN may be employed to assess biomedical signal processing techniques which are used to compute clinical statistics from the ECG.
ECGSYN is hosted at Physionet and was contributed by Patrick McSharry from the Department of Engineering Science, University of Oxford, and by Gari Clifford of the Laboratory for Computational Physiology (LCP) at MIT.
Three basic implementations are available:
- A version for Matlab and Octave (sources)
- A version in C ( sources; ready-to-run binaries for GNU/Linux, Solaris, and MS-Windowsare also available)
- A Java applet by Mauricio Villarroel of the Universidad Católica Boliviana and Harvard-MIT's LCP ( run the applet in your web browser; the Java sources are also available)
Recent updates to include asymmetries in the T-wave, abnormal rhythms, fitting to real ECGs and can be found here.
The algorithms used by ECGSYN are described in:
P.E. McSharry, G.D. Clifford, L. Tarassenko, L.A. Smith (2003), Dynamical model for generating synthetic electrocardiogram signals. IEEE Transactions on Biomedical Engineering, 50(3): pp. 289-294.
Current implementations of ECGSYN allow the user to modify the morphology of the P-QRS-T cycle, which was not a feature of the original ECGSYN described in the paper. The angle of each attractor (P, Q, R, S and T) around the limit cycle is set by ti (initially, [-70 -15 0 15 100]*pi/180). Their positions above or below the z=0 plane are set by bi and the widths of the waveform components are given by ai. Since ti=0 defines the placement of the R-peak, the ordering of each element of ti, ai and bi is [P Q R S T]. The bi and the ti are stretched by the square root of the reciprocal mean RR interval, as suggested by Bazett's (empirical) formula relating the QT interval to the heart rate. This transformation does not cancel out the reduction of the inter-attractor angular distance that arises 'naturally' from augmented heart rates in this model.
ECGSYN is now being used by the American Board of Family Medicine. A coronary artery disease simulation is currently online as part of their Maintenance of Certification. A view of the tracings can be seen at: ECG1, ECG2, ECG3, ECG4, ECG5, ECG6. The tracing at ECG5 is a version modified using a graphics program to show reasonable ST depression at V5, V6.
 P.E. McSharry, G.D. Clifford (2005), Open-source software for generating electrocardiogram signals in Proceedings of Biomed 2005, IASTED International Conference on Biomedical Engineering, ACTA Press: Innsbruck, Austria.
 J. Healey, G.D. Clifford, L. Kontothanassis, P.E. McSharry (2004), An open-source method for simulating atrial fibrillation using ECGSYN in Computers in Cardiology 2004, Vol 31, Ieee: New York. pp. 425-427.
 G.D. Clifford, P.E. McSharry (2005), Method to filter ECGs and evaluate clinical parameter distortion using realistic ECG model parameter fitting in Computers in Cardiology 2005, IEEE: New York, (in press).