Rob MacLeod, Brian Birchler, and Cris Lapierre
In this lab, we will make use of the simulation program ECGSIM, which carries out simulations of body-surface ECGs from cardiac sources. The user (you) can alter the sources by changing features of the action potentials in regions of the heart and then immediately generating a new set of heart and body surface data.
The goal of using a program like ECGSim is to understand relationships between parameters and features of the heart tissue and the resulting measurable features of the electrograms and electrocardiograms. You have seen some examples of these relationships in the experimental lab exercise, especially the frog lab; you have also seen the limitations and challenges in these experiments, some of which a simulation can easily overcome.
The best source of background for the ECGSim program are the papers written by the authors of the program:
From the perspective of the class and how we have discussed the ECG, this program represents a complete simulation of the spread of activation through a human heart and the resulting electric potentials on the inner and outer surfaces of the heart and the outer surface of the body. It contains a time varying source model, a realistic volume conductor model, and approximations of the biophysics that links the sources to the surface potentials. The program has predetermined locations of the sources, shape of the heart, and heart within the torso volume conductor-these facets of the simulation are all fixed. What the user can alter are the parameters of the action potentials of each region of the heart. The model starts with a default sequence of activation, i.e., the order in which the action potentials fire. The user can adjust for any region of the heart the timing and the duration of the action potential as well as its resting potential (and hence amplitude). In this way, most features of the source of the ECG are freely adjustable. As soon as each adjustment is complete (and in some cases while the adjustment is in progress), the program computes the resulting potentials throughout the heart and thorax.
Another notable feature of the program is the ability to view the output in many different forms, e.g., activation time, repolarization time, action-potential duration, transmembrane potential, and extracellular surface potential, distributed over the surfaces of the model and as functions of time. It is also possible to compare the time signals resulting from a modified version of the simulation settings against the default settings. The surface display resembles what you have already seen with map3d and this is no accident--there has been a lot of interaction between researchers at Utah and the authors of ECGSim over the years.
An essential conceptual aspect of ECGSim is that it is running a simulation based on an underlying discrete model of the heart. Adjustments made to the model parameters act over a region of the heart, i.e., not for each cell individually. It is possible to alter the region of influence of changes in the parameters but within limits; the lower limit is the size of the underlying triangular elements that make up the discrete heart model. The Heart Display menu allows for visualization of the model nodes and/or triangles, which is useful to appreciate the resolution of the underlying simulations.
Make sure you have an active account for the CADE lab (not your UNID). If you do not this account already, go to the CADE lab in WEB 224 and ask about it. You may also want to set up your ID card so that you can gain access to the lab itself (which has a card scanner).
Note: ECGSim is also loaded onto all computers in labs 1, 2 (Linux) and 7
(Windows). On a Linux machine, type "ecgsim" in the shell window and hit
enter. For Windows, click on the ecgsim icon in the start menu (Start >
For the report on this lab, use a screen capture utility to grab images. On
Mac/OSX systems, there is a utility called Grab that will capture
a window or a selected region of the screen. For manipulating images and
doing basic editing, the program Graphic
Converter
is outstanding (and cheap).
Also very reasonably priced and more powerful than Grab is
Snapz Pro, which is also capable of
capturing animation as well as single images.
Windows has a screen capture utility as well. The screen shot is copied to
the clipboard and can be pasted into paint and saved in a variety of image
formats. Use ctrl + PrintScreen to capture the entire screen, or alt +
PrintScreen to capture just the active window. In Linux, use a command
called ``import'' to save images from the screen to files. For details on
the Linux command, type
Another program for manipulating images is called ``gimp'' and is available
on the CADE computers. As with all computer programs, different operating
systems have their own programs for image manipulation so learn about these
before coming to the lab.
For each of the images you capture and save to your labs report, include a
caption describing the contents and which feature of the image is of special
interest.
ECGSIM allows you to see the electrical activation of the heart in a number
of different forms, as a sequence of color maps of membrane potential,
heart potential, and body surface potential and then summarized as a map of
activation time or repolarization time. It also allows you to see the
dipole vector as a function of time. The program allows the user to adjust
features such as cell resting potential or action potential duration and
amplitude from a selected region on the inner or outer surfaces of the
heart. Figure fig:ecgsim-startup shows the standard layout of the
display windows. The icons at the top of each window are shortcuts to
specific functions while pull down menus along the top of the main computer
window provide pathways to special menus and windows for adjusting
simulation and display parameters.
Specific things to try in the lab include the following:
Be sure you understand the concept of activation time; it is the time at
which the cells in a specific location undergo depolarization, i.e., the
rapid transition from the resting state to the excited stated. ECGSim
allows you to display the depolarization time for the heart beat in a single
image on the heart surface. For the default heart beat in the simulation,
switch back and forth between displaying the activation time map and the
sequence of heart-surface potentials.
By selecting a point (control-click) on the epicardial surface, you can
also see the associated action potential and (by pushing the button with
the light blue signal icon) electrogram shape for the
associated region. Try this for several locations and observe the
relationship between action potential and electrogram.
Question: From your observations, how is it possible to tell from
the morphology of heart surface potentials if a region has become
activated, i.e., is there a feature of the time signal that can indicate
when activation occurs?
Recovery is a term used when referring to extracellular potentials and is
the complement of activation. It is the time at which a region experiences
return to the resting (polarized) state and corresponds to the time at
which the nearby cells undergo repolarization. Using the same heart beat
as above, switch back and forth between potentials and repolarization time
displays (there is a button for this above the display window that shows
and down-sloping smooth step function) and observe the relationship. Also,
compare the shapes of the action potential and the electrogram from the
same location and look for a correlation.
Question: From your observations, is there a feature in the
morphology of the electrogram that could indicate when repolarization
occurs, i.e., if you had to predict repolarization from the electrogram
only, what feature of the electrogram signal would be a reasonable
surrogate for that repolarization time.
Next, find a location on the heart surface where there are some notable
potentials during the T wave and then control-click on that region in the
heart display window; the action potential from that location will appear
in the lower left-hand window; turn on the display of electrograms in that
window (click on blue time signal button in upper left of action potential
window) and then compare repolarization time with the electrogram signal.
Question: Can you describe an algorithm for detecting activation
and recovery times from the electrogram signals? (This question is the
practical application of the two previous questions).
Another important metric of the heart tissue electrical activity is the
duration of the action potentials and there is a parameter available in the
electrogram signal called the ``activation-recovery interval'', ARI, that
is considered a reflection or surrogate of AP duration. To show ARI
values, select the button above the heart display that contains a
horizontal line with arrows at both ends.
Question: Look at the pattern of ARI's and describe (with a
figure or two) how this parameter varies over the heart surface, epicardial
and endocardial. Make sure to include the figure and some text to describe
and interpret its contents, in the report.
Now select, (control-click) some points on the heart surface and observe
the local action potentials. See if their duration matches the ARI values
for a set of points selected from all around the heart.
The real power of ECGSim lies in simulating the electrocardiographic
response to changes in action potential characteristics. All such changes
occur by means of sliders in the lower left panel of the display, where you
can see the local action potential and electrogram shape for the currently
selected heart location.
To see this behavior in action, in a few regions of the heart, try shifting
the duration of the action potential and observe the effects on the
electrogram shape.
Question: From your observations about ARI (or AP duration),
identify (with a figure and text) one set of ECG signal features that
depend on AP duration?
To download your own copy of ECGSIM, visit the web site http://www.ecgsim.org. If you have questions
about the software and what else it might be good for, please ask Rob.
This document was generated using the
LaTeX2HTML translator Version 2002-2-1 (1.71)
Copyright © 1993, 1994, 1995, 1996,
Nikos Drakos,
Computer Based Learning Unit, University of Leeds.
The command line arguments were:
The translation was initiated by Rob Macleod on 2008-03-12
2.3 Capturing images
man import
or ask the TA or instructor for assistance.
2.4 Learning to use ECGSim

2.5 Lab Exercises
2.5.1 Activation and repolarization maps
2.5.2 Activation recovery interval and AP duration
3 Lab Report
4 Obtaining the software
About this document ...
ECG Simulation
Copyright © 1997, 1998, 1999,
Ross Moore,
Mathematics Department, Macquarie University, Sydney.
latex2html -split 3 -no_white -link 3 -no_navigation -no_math -html_version 3.2,math -show_section_numbers -local_icons descrip
Rob Macleod
2008-03-12