Designing an ECG Feature Extractor Part 2: Extracting ECG Features (Biomedical Toolkit)
- Updated2023-02-21
- 4 minute(s) read
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.
| |||
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.
| |||
Use an indicator to view the extraction results. Complete the following steps to create an indicator that displays the extraction results:
| |||
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:
|
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 |