Electrocardiography (ECG or EKG) scanner to detect R peaks and heart failure based on the QRS algorithm written in C. The main goal of this project is to learn the programming language C but also the benifits by using a low level language to optimize and make better performing software.
The low-pass filter is a filter hat passes signals with a frequency lower that a certain cut-off frenquency and group delay that is higer than the cut-off frequency. In short the filter takes some of the high frequencies that is not neeed and discharge them. The formula below will take the signal and cut-off the frequencies higer than 12 Hz and a group delay of 25ms.
In the formula, x is the signal data, y is the resulting filtered signal and n refers to the n'th sample.
The high-pass filter is very similar to the low-pass filter. Compared to the low-pass filter, the high-pass filter cut-off the low frequencies instead of blocking out the high frequencies. The formula below will ensure the signal to be centered around the 5-20 Hz approximately.
As previous the x is the signal data, y is the resulting filtered signal and n refers to the n'th sample.
Description of the derivative
Description of the Squaring
Description of the moving window integration
Description of the QRS detection algorithm
The following flow diagram is showing the different stages and decision making in the QRS detection algorithm. Furtheremore the variables being set at initialization, peak detection and R peak detection.