Skip to content Skip to navigation

Connexions

You are here: Home » Content » Algorithms

Navigation

Lenses

What is a lens?

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

This content is ...

Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
  • Rice University ELEC 301 Projects

    This module is included inLens: Rice University ELEC 301 Project Lens
    By: Rice University ELEC 301As a part of collection: "ELEC 301 Projects Fall 2009"

    Click the "Rice University ELEC 301 Projects" link to see all content affiliated with them.

Also in these lenses

  • Lens for Engineering

    This module is included inLens: Lens for Engineering
    By: Sidney BurrusAs a part of collection: "ELEC 301 Projects Fall 2009"

    Click the "Lens for Engineering" link to see all content selected in this lens.

Recently Viewed

This feature requires Javascript to be enabled.
 

Algorithms

Module by: Sharon Du, Dan Calderon. E-mail the authors

There are a range of available algorithms for QRS detection, based on various methods such as peak detection, slope transform analysis, and length transform analysis. Most of these algorithms involve the use of adaptive filters, and others use non-adaptive filters. Adaptive filters are preferred when it comes to heart rate analysis, largely because ECG signals are non-linear. For this reason, it is necessary to periodically analyze the output and modify the filter parameters accordingly.

We aim in this project to give a brief overview of the existing literature and algorithms, and compare the robustness of two leading QRS detection algorithms in accurately detecting heartbeats.

Algorithms for ECG Analysis

There is an extensive library of QRS detection algorithms available in the medical literature, since QRS detectors are the most important signal processing algorithm involved in ECG analysis. We will here analyze three primary algorithm methods: Peak Detections, Slope transform analysis, and length transform analysis.

Particular Peak Detection Algorithm

The peak detection algorithm that we chose to analyze specifically looks at a 160ms window, splits the window into three segments, and finds if the maximum value is contained within the center segment; if so, a beat is annotated. If no beat is detected for longer than 200ms, the threshold is updated using an adaptive filter that functions according to the rate described below:

Figure 1
Figure 1 (graphics1.png)

We were unable to generate a working peak detection algorithm in order to insert it into the algorithm tester; however, an in-depth review of the literature indicated that it was overall less accurate than the other two algorithms.

SQRS

The slope-detection algorithm that we chose uses a Finite Impulse response filter with the following filter mask:

[1 4 6 4 1 −1 −4 −6 −4 −1];

This filter mask corresponds to the basic shape of a QRS wave. After low-pass filtering to eliminate any remaining noise, this QRS “template” is convolved with the actual signal; the output of the convolution thus provides information about the places in which the signal best matches the QRS shape, wherein the peaks of the convolution correspond to the best matches.

Figure 2
Figure 2 (graphics2.jpg)
The algorithm incorporates an adaptive threshold that updates at every beat annotation, after 2 seconds without a beat annotation, or if the signal proves too noisy and contains too many physiologically impossible false positive detections. This is one of the two algorithms we investigated and tested. The algorithm is described by the following flow chart:

WQRS:

Finally, the second filter that we are investigating and testing is based on what is called the WQRS algorithm. This algorithm is different from the SQRS algorithm in the information it extracts from the raw ECG signal and the manner in which it does so. The main step in this algorithm that makes it different from the SQRS algorithm is that this takes a length transform of the ECG signal. This is a transformation that essentially serves to convert the erratic ECG signal into another signal from which it is easier to analyze and extract useful information. When applied to a potential QRS complex, the length transform can tell us how wide the distance from Q to S is, and where the onset and the end of the complex are located in time. The length transformation also introduces a non-linear scaling factor into the mix, which scales different parts of the signal differently. This results in areas that we are interested in, i.e. the QRS complex being accentuated, and the areas that we do not require, such as noise and the P and T waves, being suppressed. Thus, we are able to obtain the information necessary to determine the heart rate whilst not letting noise interfere.

Figure 3
Figure 3 (Picture 2.png)

The first step in the algorithm is to low pass filter the signal in order to eliminate noise. Following this, the length transform is applied and a threshold value of the algorithm is set as three times the mean value of the length transform of the first set of data points. After 10 seconds have elapsed, the threshold value is readjusted to be one-third the threshold base value. Following this, the threshold base value is periodically adjusted.

Figure 4
Figure 4 (graphics3.jpg)
Once the algorithm detects a potential QRS complex in which the length of QS has just exceeded the threshold, the time ‘t’ the event occurred is saved. Then we travel backward for 125 ms to the minimum value of the length Lmin and forward for 125 ms from ‘t’ to obtain the maximum value Lmax, where L is the magnitude of the length transform. Next, we again travel backward to recover where the QRS onset is located in time and forward to recover where the end is located in time. The onset and end times are added with -20ms and +20ms respectively, in order to provide for potential losses caused by the threshold. This adjustment is based on statistical observations of typical heart rates and ECG signals. Finally, the algorithm waits for 250ms before proceeding to check for another QRS complex in order to avoid detecting the same beat again by mistake.

Content actions

Download module as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks