From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

# Life Science

cancel
Showing results for
Did you mean:

## Re: Analysis of ECG signal

It should be the same.  Try putting your t0 and dt value into the properties of the graph (offset and mulitplier) and see if it looks OK.
Randall Pursley
Message 21 of 32
(10,940 Views)

## Re: Analysis of ECG signal

2. Perform a Hilbert Transform of X to get Y

Randall Pursley

Hi Randall, can you explain better the function of the Hilbert Transform in your code ? I doens´t understood the step 2 above.

Eduardo Alvarenga

Message 22 of 32
(10,679 Views)

## Re: Analysis of ECG signal

The Hilbert Transform takes a signal (which, by definition, is made up of sinusoidal components) and changes the sines to cosines and vice versa.

The most basic case is if you input a cos(x), the output of the Hilbert transform is a sin(x).

Another way to explain it is if you look at your signal in the frequency domain, the Hilbert transfrom changes the sign of the spectrum on the negative side of 0 Hz.

The reason I use it here is to turn the ECG signal into an analytic signal using the Hilbert transform.  The magnitude of which is the envelope of your original signal.  The envelope of the signal gives a better peak that is easier to detect.

The most basic case is the cos(x).  The Hilbert transform result is a sin(x).  The analytic signal would be y=cos(x) + jsin(x).  And, of course, the magnitude of this would be one.

Hope this helps.  There is plenty of info on the web on Hilbert Transforms and analytic signals.
Randall Pursley
Message 23 of 32
(10,672 Views)

## Re: Analysis of ECG signal

thanks Randall... this helps me a lot

Message 24 of 32
(10,662 Views)

## Re: Analysis of ECG signal

can someone tel how  BPM is calculated in EKG processor.vi.i am not able to understand.here
waiting for help

Message Edited by iam on 03-18-2008 04:22 AM
Message 25 of 32
(10,483 Views)

## Re: Analysis of ECG signal

Hi iam,

rpursley8 explains how to calculate the beats per minute in the first page of this discussion forum. Here is what it says about how the EKG processor.vi calculates the BPM:

I have attached a VI that should do what you want if you have Labview 7.1 and Advanced Analysis Library.

If not, then this is what the VI does.

First you process the signal a little to enhance the R wave.

1. Take the derivative of the signal (difference function), name this signal X
2. Perform a Hilbert Transform of X to get Y
3. Combine to get Z = X + iY (complex) and take the magnitude of Z
4. This process will enhance the R wave amplitude in relation to the rest of the signal

Then you perform a peak detection to find all of the peaks and their locations.

Find the difference between the peaks to get the number of points between beats.

Divide this number by (Sampling Rate * 60) and invert the number to convert to beats/min.

The Advanced Analysis Library has the Derivative, Peak Detect, and Hilbert Transform functions used in the VI. I tried to save it as version 7.0 but it wouldn't let me.

If you have more specific questions about certain parts of the calculations, please let us know!

Carla

National Instruments
Applications Engineer
Message 26 of 32
(10,461 Views)

## Re: Analysis of ECG signal

Hi,

Instead of generating a ECG signal, can I use a real ECG signal-using same technique to calculate the Heart rate-Peak detection.

I substituted the Waveform.in to a DAQ Assistant and obtained a mismatch error. Can you please correct me...

I appreciate any help.
Message 27 of 32
(10,372 Views)

## 回复： Re: Analysis of ECG signal

You can read the following app notes for more help on HRV detection and analysis.

http://zone.ni.com/devzone/cda/epd/p/id/5832

Message 28 of 32
(10,364 Views)

## Re: Analysis of ECG signal

Hello

I tried to compare the result of the beat per minute to constant number; To use the output and activate a case containing an alarm but since the output is array of Boolean there was an error in the wiring. Is there a way to compare the beat per minute and get a Boolean output?

I attached the VI

Thank you

Message 29 of 32
(10,152 Views)