From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ecg

Solved!
Go to solution

helloo!!

i urgently need ur help.im doing my graduation project on emotion recognition using body signals like ecg.eeg.i will than get the signals on labview my interfacing & compare the beat per minute and display the emotion.for eg:if my heart rate is greater than 110 im most probably scared & nervous.so the question here is how will the software detect the beats perminute wen th person is connected through electrodes n v gt sgnals on labview.cez vl be getting ecg waveform..but we wnt bpm so tht th values gt compared n th emotion is detected..

 

0 Kudos
Message 1 of 40
(3,985 Views)

Please spend a few minutes actually spelling out complete words and sentences.  Intelligent and well constructed queries will generate more intelligent and well thought out responses.

 

Next - please visit the Biomedical User Group at ni.com/biomedusers. You will find resources and a free biomedical starter kit download that will be very helpful.

 

Steve

Message 2 of 40
(3,975 Views)

Please spend a little more of your own time writing a message that is understandable, instead of wasting everyone else's time by posting gibberish.

0 Kudos
Message 3 of 40
(3,961 Views)

ok here it is.my graduation project is about recognizing emotions by taking body signals that include ecg,eeg,skin conductance & respiratory rate.im suppose to design a program that will take the body signals from the body through interfacing using DAQ card and as the signal is detected it is suppose to analyse the signal and tell what emotion the person is currenlty undergoing.i will give an example to be clear

 

i have connected eletrodes to a person and take his ecg and transfer it into labview through interfacing.than i want the software to analyse the signal and tell me the emotion like is the person happy,sad,angry etc.my question is how will i design a code that will determine the human emotion if they are currently connected through electrodes to obtain the result.like through interfacing we will a waveform,i want it to be converted into beats/minute.if it's 60-90 bpm the person is probably calm.how will the software know its 60-90bpm through the ec waveform

0 Kudos
Message 4 of 40
(3,956 Views)
Solution
Accepted by topic author sanaaa

I would imagine you would want to transform your input to the frequency domain and isolate the area of highest amplitude there to get the most likely fundamental frequency.

0 Kudos
Message 5 of 40
(3,954 Views)

callanb can you be more specific please

0 Kudos
Message 6 of 40
(3,941 Views)

You don't need to do it in the frequency domain (i.e. FFTs) - if it is pretty good quality ECG you can filter it and use a peak-detect to find the R-wave intervals. The reciprocal is heart rate.  There are other more robust strategies - you can google for ideas.  You can find links to some popular articles on our biomedical user forum here: http://decibel.ni.com/content/docs/DOC-4715

0 Kudos
Message 7 of 40
(3,927 Views)

Sounds like a good project.

Steve is right.  It can be done more easily and with good results in the time domain, not frequency domain.  You'll want to apply a bandpass filter, f_low=1 Hz, f_high=40 Hz, to remove drift and high frequency noise.  I recommend Zero Phase Filter.vi due to its nice phase properties.  If you use it, you must also use the Butterworth Coefficients.vi followed by Cascade to Direct.vi, which prvides the filters coefficients in the correct (forward and reverse) format that Zero Phase Filter.vi needs.  Or you can just use Butterworth.vi, instead of Zero Phase plus Butterworth Coefficients plus Cascade to Direct.  Whether you use Butterworth,vi or Butterworth Coefficients.vi, you want to specify 2nd order bandpass with 1 and 40 Hz cutoffs.  Now take the filtered ECG and peak-detect the R waves, as Steve said.  Oeak Detector.vi is good.  It puts out the number of peaks found.  Divide by the signal duration and you have events per unit time.  Convert time from events/second to events/minute since you want beats per minute.   

 

I have tried differentiating ECGs, on the theory that the sharp rise of the R wave would be even easier to detect than the peak of the R-wave.  In practice, I found this didn't work as well as just using the un-differentiated ECG.  Plot the bandpass-filtered ECG.  Add a horizontal cursor to the graph, which will serve as the inidcator of the detection threshold.  Add a property node to get the current cursor height.  Use that height as the threshold for Peak Detector.vi (under the Signal Processing palette).  The user sets the detection threshold by dragging the cursor up or down.  Put the graph and cursor-reading and peak-detecting and HR-calculating inside a while loop so the user can experiment with different cursor settings and observe the effects on computed heart rate. Keep the filtering outside the while loop since it only needs to be done once.

0 Kudos
Message 8 of 40
(3,921 Views)

thnakyou both of you.i will try this and will inform you if i succeeded.:).and what about eeg,skin conductance & respiratory rate?

0 Kudos
Message 9 of 40
(3,915 Views)

i have one more question.before i run the program for emotion recognition i would have to store some values before hand into the software.is it?like for example.i hve this patient whose bpm is 115.i hve connected him to the electrodes & see the signal in labview through interfacing.but for emotion analysis i should store ranges of bpm before i run the program,rite?otherwise how will the software know wwhats the patients emotional status.so how will i acheive that?

0 Kudos
Message 10 of 40
(3,900 Views)