Using an electrocardiogram (ECG sometimes called an EKG) is an invaluable way to identify various physical ailments. Today there is a wide array of cardiac equipment that displays and interprets ECG signal patterns. Medical equipment designers need a flexible way to seamlessly generate accurate ECG signal patterns to verify and test their designs. In this post, I will discuss how to generate complex ECG signal patterns with an arbitrary waveform generator (AWG). Below in the figure is a 12-lead ECG waveform.
There are three methods to create and store an ECG on an AWG:
- You can use a device such as a digitizer or oscilloscope to capture an actual ECG signal from a patient. Then you upload the digitized points to the AWG. With modern AWGs, there are many ways to accomplish this, including using a .csv file and a memory stick.
- You can use mathematical software to create an ECG signal. There may be custom software for the AWG that can do this, or you could use a standard software package, such as MATLAB ®.
- If your instrument has this capability, you can use your AWG’s built-in "typical" ECG waveform. The Keysight 33500B & 33600A series has a built-in ECG waveform.
Using an AWG’s arb sequencing capability to simulate complex ECG patterns
AWGs that have arb sequencing ability, like the 33500B/33600A function/arb waveform generators, can seamlessly transition from one arb waveform stored in memory to another without any discontinuities in the output. The figure below shows an example using the 33500B/33600A’s arb sequencing feature to combine three different ECG waveforms stored in different places in memory into one waveform.
The first ECG waveform cycle is meant to be an "ideal" ECG waveform. The other two were based on the first one but were changed in a systematic way using MATLAB software. Notice the second ECG waveform has a flattened T wave. In the third ECG waveform, the T wave is inverted.
The 33500B/33600A’s sequencing capability provides flexibility for controlling when it sequences from one waveform to another. One way to control sequencing is to specify how many cycles each waveform is run before sequencing to the next. Sequences can also return to a waveform that was used previously in that sequence.
Combining the 33500B/33600A’s arb sequencing feature with its large arb memory, 1 million points per channel standard with 16 million optional, gives you the ability to simulate complex ECG patterns for thorough testing of cardiac monitoring equipment designs. For example, each ECG waveform shown in the above figure were created with about 500 points. You could store up to 2,000 different ECG waveforms of this size in the 33500B/33600A’s standard arb memory. The 33500B/33600A allows arb sequences to contain up to 512 steps, allowing you to create complex ECG patterns for thorough testing. You can control arb sequences on the 33500B/33600A asynchronously by using triggers to control waveform transitions instead of cycle counts. This provides you with the ability to continuously cycle a waveform for some undetermined time period until it receives a software trigger or external trigger or front-panel trigger. Once it receives the trigger, the 33500B/33600A transitions to the next waveform in the sequence. You can also mix the two ways of transitioning through a sequence, specifying a count and using triggers.
Free Matlab ECG simulation program
You can download and use an ECG simulator program created in MATLAB®. You can find the ECG simulator download and instructions at http://www.mathworks.com/matlabcentral/fileexchange/10858-ecg simulation-using-matlab or type “ECG MATLAB” into a search engine and it should be at the top of the results. The program creates ECG waveforms using multiple Fourier series summed together. A Fourier series is used for each distinct wave shape in the ECG waveform, such as the P wave, T wave, etc. The program allows you to adjust various ECG waveform parameters to simulate various cardiac conditions. You can then transfer the ECG waveform you created to a 33500B/33600A either by storing it in a .csv file and using a memory stick or remotely via Matlab's instrument toolbox feature or BenchVue FG application software.