LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Design Efficient Filter Bank for Multiple waveforms?

hello, and help!

I need to run a 160 X 512 (EEG channel X sample index) into a 13 channel filter bank (Butterworth bandpass filters), and I would like to do this in real-time data acquistion (256Hz Sampling Frequency).  What would be the most efficient way in which to implement such a feat?  I am using LabVIEW 7.1.  I've looked into the Wavelet and Filter Bank Design Toolkit, but I don't have this toolkit, and I'm not sure it is what I'm looking for. 

My inclination was to just convert my data matrix into a waveform and send it through 13 Filter express vi's, but I'm having trouble creating the waveforms.  I feed my 2-D data array into a for loop with indexing enabled.  I then construct a 1-D waveform inside the loop and subsequently build an array using the waveform with that coming from a shift register.  However, I cannot turn off the Concatenate Inputs feature with this setup.

Any assistance would be great.

Message Edited by Alias77 on 07-17-2007 03:56 PM

0 Kudos
Message 1 of 4
(3,282 Views)
You sure don't need the Wavelet and Filter Bank Design toolkit, if you have full or above you already have Butterworth filters.

I would start with
Digital IIR Filter.vi, put it INSIDE the loop and try to have the loop index vary the filter parameters. I suppose you could do the same thing with an express vi (never used them, myself). That would be slower but i have no idea how much slower, maybe someone else has experience.

I don't understand your problem with concatenation (I'm not saying you don't have it, I just can't visualize what it is).



0 Kudos
Message 2 of 4
(3,274 Views)
Thanks for the response.  In order to incorporate the sampling information (sampling frequency) into my data ( 160 X 512 2-D Array), I use "Build Waveform.vi." However, for the input argument "Y," I can only use a 1-D array.  I try with my 2-D array, but it gives me a connection error.  So, my first thought was to stick the Build Waveform.vi into a for loop with a shift register.  I use an indexing tunnel node when guiding my data array into the loop.  I then connect the 1-D array to the build waveform.vi, and send the output to a "Build Array.vi" where the output goes to the shift register, and the other input comes from the first shift register.  What prevents this from working i.e., creating a 2-D waveform array, is that the option to uncheck the "Concatenate Inputs" is not available when i right click on the  Build Array.vi.  I notice that I do have the option to uncheck it when i'm just using 2 waveforms without the shift register.  Would you have any suggestions?  I want keep it running as efficient as possible, so i figured that I might want to avoid doing the filtering 160*13 times, manually.

would there be any advantage to using the Digital IIR Filter.vi over the Butterworth Filter.vi ?  The input for the former is a waveform while for the latter is a plain ol' array, but i notice that i can send a waveform into it and i don't get an error.

Message Edited by Alias77 on 07-17-2007 06:35 PM

0 Kudos
Message 3 of 4
(3,271 Views)
I am not sure I followed everything you have tried to do, so I may be misinterpreting something. I think you can build an array of waveforms rather than trying to put a 2D array of data into a single array. Then you would have a 1D array of waveforms which has 160 elements. You could put the filter bank inside a for loop and autoindex through the 160 channels.

The problem with this approach is the transient response of the filters. Each time you put a different channel into a filter, you need to wait for the transient to die out. Look into reentrancy or using the VI server to spawn multiple copies of the filter bank.

Post what you have tried. It is much easier to lookat code than to figure it out from a written description.

Lynn
0 Kudos
Message 4 of 4
(3,259 Views)