07-02-2012 05:30 AM
Hi guys,
currently i'm working on validation of ecg feature extraction for my fyp.
what i want to do is to detect the time interval for P wave, PR interval and QRS interval
i use the ecg_QRS_detector by Wavelet Peak Detection.vi and ecg_feature_extraction_based_on_QRS.vi in my project
but somehow i found out that the output is not tally with the sample data i download from MIT-BIH (i compare the result by manually reading the ECG and calculate the time interval)
here i need few clarifications,
1) for ecg_feature_extraction_based_on_QRS.vi, i see that there is output for detecting P wave, but where the output is connected to? u can refer to picture i attach below (boolean Pwave is on its own)
2) the output for beat start, beat end, p offset, qrs onset, qrs offset, and t onset is in what unit? (seconds perhaps? but i dont think so) i try to figure out by my own but still dont have the answer
3) for the ecg_QRS_detector by Wavelet Peak Detection.vi, so far it's working fine, just the VI cannot detect inverted QRS peak from the sample data.
together with this thread, i attached the VI that i have worked on with few sample data from the MIT-BIH
07-02-2012 08:53 PM
Hi,
Here is my answer to your three questions:
1. The function of detecting P wave has not been developed yet, so it does not connect to anything.
2. These outputs are in index of the input signal.
The outputs are not correct now because you didn't input dt and R position.
This VI determines ECG Features based on a complete cycle of ECG signal and the position of R (in index). R positions can be firstly detected by "ecg_QRS_detector by Wavelet Peak Detection.vi".
3. To detect inverted QRS peaks, you should preprocessing the input signal using filtering and rectification.
Thanks!
Xuesong Liu
07-02-2012 11:50 PM
Hi Xuesong Liu.
thanks for your reply
nway, may i know what is the relation between dt and R position?
sorry but i dont have strong background of ecg signal.
many thanks
07-03-2012 01:22 AM
Hi,
dt is the time interval between two samples in a signal, which equals to 1/(sampling rate).
For "ecg_QRS_detector by Wavelet Peak Detection.vi", the output QRS times are in seconds, you have to divide them by dt in order to get R positions(in index).
Xuesong Liu
07-07-2012 10:50 PM
Hi again,
i have done as what u advised me.
but i still dont think the output is correct
as the time difference (Tp) between beat start and p offset is remain the same (101)
as well the other reading no matter any pattern of the waveform.
or maybe the way i do the coding is wrong?
hope u can help me by checking the vi i attached here.
n after i go through every flow of the data, i noticed that the final reading for the qrs onset is actually the value of iso start?
i doubt the algorithm inside the subvi ecg_qrs_onsetoffset.vi as i think every final output value is depends on the algorithm inside the subvi.
i'm not very sure about the algorithm but i think that something is wrong somewhere..
looking for your guidance.
thank you..
07-08-2012 08:21 PM
Hi,
The input of "ecg_feature_extraction_based_on_QRS.vi" must be a cycle of ECG signal.
and "R pos (index)" should be the index of R in THIS cycle of ECG signal.
While in your VI, you use "detected QRS time/dt", which is the R index in the complete file. This is not correct.
You should firstly detect all QRS times from the signal, then in another loop, load a cycle of ECG signal each time (according to the detected QRS times), and use feature extraction VI.
If you have installed source code version of Biomedical Startup Kit, you can refer to National Instruments\Biomedical Startup Kit Source Code\ECG Feature Extraction\util\ecg feature extraction using shared VI.vi to see how this two VIs works.
Thanks!
Xuesong Liu
10-24-2012 10:00 AM
if you have bio tmedical starter kit it wil nicely work for you when i tried the ecg signal it came normally as it is but i used analog protoboard so it does signal conditioning and gives the correct output also since the output is in waveform u convert in to an array of values and u fix the samples for the signal so that you can compare the other ecg signal based on these samples so it cross check the values of the normal and abnormal person