LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Data Time Axes for Bandpass Filter

Solved!
Go to solution

Hi,

 

Does anybody know why my bandpass filter VI is not incorporating time to the waveform chart? Probing the filtered signal produces a voltage but all I'm seeing is are the values moving vertically up down. Also what's with the configuration of the time? I want to make it look like the waveform chart above. Thanks!

CaptureEEG.JPG

 

0 Kudos
Message 1 of 14
(2,094 Views)

Hi od,

 


@od805 wrote:

Does anybody know why my bandpass filter VI is not incorporating time to the waveform chart?


How do you know the filter is working correctly after all?

 

You create an array of exactly one (1) element. Then you build a waveform from this one-element-array. And then you apply a filter on a waveform containing just one (1) sample: which result do you expect from your filter?

 

Suggestion 1: filters work much better when they are applied to an array of more than one sample…

Suggestion 2: Your VI will be much more maintainable once you get rid of ExpressVIs. There is a palette full of (plain) filter functions…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 14
(2,062 Views)

Hi Gerd,

 

Thanks for the feedback. Attached is my updated VI. I'm able to get some data, although idk how significant. Any tips on EEG signal processing? Probably need to implement 60 Hz notch filter and maybe a high pass to get rid of ECG waveform. I'm using this an EEG click coupled with an Arduino. Link below. Thanks!

 

https://www.mikroe.com/eeg-click

CaptureEEGnew1.JPG

CaptureEEGnew.JPG

  

Download All
0 Kudos
Message 3 of 14
(2,052 Views)

Hi od,

 

you still create an array consisting of exactly one sample: this does not look right to me…

 

Additionally it seems you use the output of one Bandpass filter function as input for the next bandpass filter: this also doesn't look right to me!

Usually I apply several bandpass filters on the original signal to get several filtered bands of the original signal…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 14
(2,047 Views)

Hi Gerd,

 

I’m not sure what else I can do besides an array with one sample. I am reading an analog pin of arduino to capture my data so naturally yes it is only one array. Do you have any suggestions? 

I purposely made that input design for the band pass filters because I think EEG signal extraction/decomposition builds off filtering from the previous signal in the broader frequency range. But I could be wrong.

0 Kudos
Message 5 of 14
(2,043 Views)

Hi od,

 


@od805 wrote:

I’m not sure what else I can do besides an array with one sample. I am reading an analog pin of arduino to capture my data so naturally yes it is only one array. Do you have any suggestions? 


Well, have you ever tried to create an array containing more than one sample?

Like using a loop to read 1000 samples before applying your filters on the resulting array?

 


@od805 wrote:

I purposely made that input design for the band pass filters because I think EEG signal extraction/decomposition builds off filtering from the previous signal in the broader frequency range.


I'm not an EEG expert but in my experience you don't apply bandpass filters on already bandpassed signals…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 14
(2,039 Views)

Hi Gerd,

 

I'm not sure how to do this in LabView. Can you please explain how to implement this. Thanks

0 Kudos
Message 7 of 14
(2,021 Views)

Hi Gerd,

 

I'm not sure if you've moved on from this post or not, but I wanted to ask you, why does it matter if I'm filtering single data points at a time vs. 1000 or 10,000 points? I don't understand the difference. I am also still struggling to create a for loop that reads 100 sample before applying the filters, thanks.

0 Kudos
Message 8 of 14
(1,967 Views)

Attached is a photo of what I've done since to reproduce what you have recommended. But my this loop is not executable by my computer and there is something evidently wrong, I just don't know what. 

od805_0-1644995394955.png

 

0 Kudos
Message 9 of 14
(1,964 Views)

Hi od,

 


@od805 wrote:

Attached is a photo of what I've done since to reproduce what you have recommended. But my this loop is not executable by my computer and there is something evidently wrong, I just don't know what. 


Yes, there is something wrong…

 

In the inner loop you initialize an array of 10000 elements with the value of that single point measurement. Why?

Then you use a concatenating tunnel to create a larger array of 10000×10000 elements. Why?

(Is your computer capable of managing that array of 100M elements? Does it make sense to display those 100M points on a chart???)

 

Did you do any of those basic Training courses to learn simple array handling?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 10 of 14
(1,962 Views)