LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

peak detection( take 100 ms samples?)

Hi...
I have a problem using peak detection under Analysis=>waveform monitoring.
I want to get the real data (ECG data), and detect the peak of the data. Then i want to store the index of the peak into array so that i can measure the time difference between two peaks.
my problem is that when i use peak detection, i cannot get the result as above mentioned. Before this i have tried to test the peak detector and found that if it will detect the peak for 100 ms time interval only. SO if i have waveform with f=100 Hz, then it will detect only 10 peaks..Is it correct that this vi takes 100 ms sample for detection? *correct me if i'm wrong
And since i want to get the real data from ECG hardware, is there any method to measure index of the occurence of all peaks and store it into array? (not only for 100 ms)
-I saw the formula in peak detector help :
To view the locations in terms of time, use the following equation.
Time Locations[i] = t0 + dt*Locations[i]
What does [i] here represent?
Thanks for the help...

Regards,
Rismi *newbie...:d
0 Kudos
Message 1 of 4
(2,594 Views)
Hi Rismi,

1. There's an input to that VI called width. If you select 10 for this input, then you are correct. The VI will detect only 100 ms sample for detection, because dt=0.01 and you asked for width of 10 samples => 0.1 sec. If you select 1 for the Width Input you will get detection of 0.01 sec, like your frequency.

2.When you use the "Peak Detection" VI you get an array of the locations of the highest value at the waveform. It means:
If you have 100 samples and f=100Hz and the VI detect a single peak at location 20, it means that the peak occurred after 0.2 sec from the start of the waveform. The number 20, is the location of the highest value at your 100 samples array.

The Bush-Man
0 Kudos
Message 2 of 4
(2,582 Views)
Hi...
Thanks, now i can understand about peak detection for simulate signal...
Then if i use this vi to detect peak of ECG data(data from DAQ or recorded data)..This vi will detect the locations of peak of current block of data. what "current block of data" in this case represents..??
i attach my simple program to detect the index of peak of my data. But i cannot get my desired result. And when i detect the number of the peak, the values is either 0 or 1. I don't know how to fix this problems.Can anyone give me advice?
0 Kudos
Message 3 of 4
(2,573 Views)
Hi,

1. I need more details about your desired results....
2. You have to send to the "Peak Detection" amount of data. This will be your 'current block of data'. You will decide about its duration and how many samples will be in it.
3. The VI you sent, can't help me for trying to help you. Send the measurements file or the simulated parameters so I can try to understand your wishes and your peaks detection.

The Bush-Man
0 Kudos
Message 4 of 4
(2,557 Views)