LabVIEW Biomedical Toolkit API Reference

Content Type
Programming Language
Current manual

Designing an ECG Feature Extractor Part 2: Extracting ECG Features (Biomedical Toolkit)

Designing an ECG Feature Extractor Part 2: Extracting ECG Features (Biomedical Toolkit)

In Part 1 of this tutorial, you designed a VI to read a logged electrocardiograph (ECG) signal from a file. In Part 2 of this tutorial, you design a VI to extract ECG features from the logged ECG signal.

What to Use

Use the following objects to extract ECG features from the logged ECG signal:

What to Do

Create the following block diagram to extract ECG features from the logged ECG signal.

The following list describes important details about the previous diagram:

Use the ECG Feature Extractor VI to extract ECG features from the logged ECG signal.
Note Note  The ECG Feature Extractor VI requires both a raw signal and a preprocessed signal in order to extract all ECG features. Because you use an ideal ECG signal in this tutorial, you wire the same ECG signal into both the ECG input and the raw ECG input of the ECG Feature Extractor VI.
Use an OR function so that the extraction stops if the ECG signal ends or if there is an error.
Use a shift register to pass the error code information from one loop iteration to the next. To add a shift register, right-click the While Loop and select Add Shift Register.
Add a constant to the shift register to create an initial error value for the While Loop. To add a constant, right-click the left shift register terminal and select Create»Constant. The default value passes a no error status into the first iteration of the While Loop when you run the VI.
Build an array of the ECG features. The VI you design in this tutorial extracts ECG features block-by-block, so you need to combine each set of features into an array.
Note Note  Make sure you wire the ECG features output of the ECG Feature Extractor VI into the n or n-1 dim array input of the Insert Into Array function so that each new set of ECG features adds to the end of the array instead of the beginning.
Use an indicator to view the extraction results. Complete the following steps to create an indicator that displays the extraction results:
  1. Right-click the While Loop and select Add Shift Register.
  2. Wire the output array output of the Insert Into Array function to the right shift register terminal.
  3. Right-click the output array output of the Insert Into Array function and select Create»Indicator
Add a constant to the left shift register terminal to create an initial array value for the While Loop. Complete the following steps to add a constant:
  1. Right-click the left shift register terminal and select Create»Constant.
  2. Wire the shift register terminal to the n-dim array input of the Insert Into Array function.

After you complete this part of the tutorial, you can run the VI to extract ECG features from a logged ECG signal and then view an array of the extracted features in the front panel window. You can use these extracted ECG features for other purposes, such as extrapolating the instantaneous heart rate.

Caveats and Recommendations

The constant in Step 7 passes an empty array into the first iteration of the While Loop each time you run the VI. If you do not add an empty constant to the shift register, the shift register passes on the array subset values from the previous run each time you run the VI. This causes erroneous results if you change the file used between runs.

Examples

Refer to labview\examples\Biomedical\Tutorials\Designing an ECG Feature Extractor.lvproj for a completed version of the VI you create in this part of the tutorial.

Previous: Reading a Logged ECG Signal from File Next: Extrapolating Instantaneous Heart Rate
Was this information helpful?