LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6210 ECG setup

You should read the article that you referenced - its really very good.  He isn't just going straight from electrodes to the sound card.  The amplifier that he shows you how to build ("Adventures in analog land") is the differential amplifier and filter that is needed before the 6210.  In his description of the amplifier, he also goes into some detail about the safety issues and what he did to make his amplifier a little more safe.  So if you don't have money to buy a good bioamplifier, just build his homemade amplifier and you should get a good enough results for your rat studies.

 

The USB-6210 takes the place of the sound card in his system - it's more accurate, more flexible, and easier to program than the sound card. 

 

 

0 Kudos
Message 11 of 21
(1,639 Views)
That's precisely what I was planning on doing this weekend!
0 Kudos
Message 12 of 21
(1,637 Views)

Cool - let us know how it goes.  Once you have the amplifier built, there are some pretty nice articles on our user group about doing ECG processing, including heart rate variability (HRV) analysis here:  http://decibel.ni.com/content/docs/DOC-4715

 

While your over there, please join our user group and maybe share your experience!

 

thanks,

Steve

Message 13 of 21
(1,629 Views)

It's been a while since I last posted on this thread, but I've since constructed my amplifier, which works brilliantly btw, and am acquiring tons of data with my rats.  I've run into an issue with analysis though, hence this post.  In general, the signal is pretty noisy.  It's not so noisy that I can't pick out the peaks, but it does have a fair bit of noise.  I've attached a sample tdms file.  Most of the noise looks like typical electrical interference, but occasionally I get some movement-related noise.  So, to counteract the movement related noise, I've been collecting the intervals between peaks, finding the mean interval and standard deviation, and then throwing out any data points that are more or less than the mean plus 1.5 times the standard deviation (a typical test for outliers).  In general, this gives me acceptable quality R-R intervals.

 

The problem I'm having is in the filtration step.  I'm currently running a bandpass with cutoffs at 70Hz and 150Hz, using a 1st order butterworth.  I selected this because it made the data "prettiest", but my signal is well below 70Hz, so my gut tells me this is a bad idea and I should be choosing something else.  My rat HRs are usually in the neighborhood of 300-400bpm.  So, I've finally come to my question.  I'm not sure which filter to select (butterworth, etc), or what order filter to use.  I have zero experience with signal analysis, so could anyone recommend anything based on the tdms I've attached?

0 Kudos
Message 14 of 21
(1,423 Views)

Is your bandpass filter implemented as part of your amplifier, or is this being done in software during or after data acquisition?

 

When you are acquiring signals that are going to be digitized, typically you set the low filter (high pass) only as high as needed to prevent amplifier blocking (keep the signal in the linear part of the amplifier) and the high filter (low pass) as high as possible but low enough to prevent aliasing (block most of the energy in the signal that is higher than 1/2 the sampling rate).  For rat ECG, you should be able to get away with a .5 Hz low filter.  If you are digitizing at 500Hz then be sure to set you high filter to something like 100Hz-150Hz like you have done.  A 2nd-order (or higher) low-pass filter is better since it has a steeper cut-off - this is important for the high filter.  If there is a lot of 50/60Hz AC line interference, you may need to block this frequency with a sharp band-stop filter ("notch" filter) to prevent amplfier issues as well - but this can usually be prevented with good recording technique and setup (keep all AC sources far away, use a Faraday cage if needed, etc.).

 

Now that you are passing as much of the rat signal through the amplifier as possible without distortion, you can now play with the low and high filters in LabVIEW on the digitized data without fear of losing anything, and you can try several different filter combinations on the same data.

0 Kudos
Message 15 of 21
(1,405 Views)

Thanks!  Excellent explanation.  However, I've recorded my signal with no hardware filtration.  I planned to do my filtration off-line, with software, so that's what I'm experimenting with.  This makes a pretty big difference in my data quality, so it's frustrating that I'm unsure of what the best solution is.  I've added a bandstop filter (low cut-off at 0.5, high cutoff at 160), which takes care of quite a bit of noise.  Thanks for that idea.  Any other suggestions so far as offline filtration goes?

0 Kudos
Message 16 of 21
(1,399 Views)

If you are just trying to pick off the R waves to get reliable R-R interval measurements, then you can get pretty aggressive with the filters and just play around until you get the best results - phase and other types of distortion really won't change the intervals.

 

If you haven's already, check out the two ECG analysis DevZone articles referenced on our Biomedical User Group here:  http://decibel.ni.com/content/docs/DOC-4715

 

The members of the Biomedical User Group might have some specific tricks or techniques to add and the whole community may be interested in what you are doing.  So if you are not already a member please join and share your challenges and successes.

 

Steve

 

0 Kudos
Message 17 of 21
(1,381 Views)

I am in fact an active member, but unfortunately much of the filter discussion there revolves around using the Advanced Signal Processing Toolkit, which I don't have and can't afford.  I'm stuck with the digital and analog filters built into Labview 2009...

0 Kudos
Message 18 of 21
(1,375 Views)

Understand - either way, once you get it working to your satisfaction, maybe you can post the "poor man's ECG analysis VI" - I'm sure you are not the only one without the advanced analysis toolkits.

 

By the way - if you are doing this work on a university/college campus, we have some pretty attractive pricing for researchers that includes all these analysis modules and can put together packages for multiple seats, departments, and even campus wide.

0 Kudos
Message 19 of 21
(1,370 Views)

I followed your idea, and just put a rather lengthy post on the biomedical user group discussion board.  Check it out here if you're interested: http://decibel.ni.com/content/thread/8715?tstart=0

0 Kudos
Message 20 of 21
(1,362 Views)