Pages

Monday, October 17, 2011

Matlab Program for Simulating ECG Waveforms with an Arbitrary Waveform Generator

Because of the popularity of my 2/21/11 post Simulating Complex ECG Patterns with an Arbitrary Waveform Generator I decided to create a Matlab program that allows you to create and customize electrocardiogram (ECG) waveforms that can be easily transferred to an arbitrary waveform generator (AWG). The program is called "ECG Waveform Simulator" and can be downloaded free of charge from Matlab Central (see link below). The program allows you to customize the "typical" ECG waveform by allowing you to modify amplitude, duration, and in some cases interval for the standard ECG waveform parts including the P wave, Q wave, R wave, S wave, T wave, and U wave. The program allows you to directly transfer the ECG waveform you created to an 33521A or 33522A AWG via a Ethernet connection or to store it on a CSV file that could later be uploaded to an AWG. This programmed combined with an AWG provides engineers involved with designing and testing ECG monitoring and measurement equipment an simple and flexible test solution.

One huge benefit of using modern AWGs, like the 33521A and 33522A, for simulating ECG waveforms is a feature typically referred to as arbitrary waveform (arb) sequencing. Arb sequencing allows the user to seamlessly create a complex waveform pattern combining multiple arbs stored on the AWG. It is analogues to creating a playlist on your MP3 player using various songs stored in the MP3's memory. Sequencing gives you the ability to create complex ECG patterns by combining multiple ECG waveforms. Below is a screen shot from a scope showing an example of three different ECG waveforms that I created using the ECG Waveform Simulator. The three waveforms were output using the sequencing capability on the 33522A AWG (notice the second waveform is played twice).

In the above sequence the first ECG waveform is played once, the second is played twice, and the third is played once. Of course we could have just as easily played the fist waveform 50 times, the second 10 times, and third 101 times. For more information on creating arb sequences with the 33521A or 33522A check out my post Creating Arbitrary Waveform Sequences.

Hello There. I found your blog using msn. This is an extremely well written article. I will be sure to bookmark it and return to read more of your useful information. Thanks for the post. I’ll certainly comeback. surplus electronics