Main siteMain site  ForumForum  ForumSearch  Private messageEmail contact  RegisterRegister  Log inLog in 
Topic: Question about filter orders
Reply to topic
Author Message
ltrigero



Joined: Sep 29, 2019
Posts: 13

PostPosted: Sep 29, 2019 9:04 PM    Post subject: Question about filter orders

I am trying to train at the infralow range. I am training a range of 0 to 0.0000004 hz. When i use filter order 1 the signal is visible, but when I use any filter order higher than 1 i get a solid a solid orange bar where the signal should be that covers the entire oscilloscope.

Why does this happen and can it be fixed?
jarek



Joined: Oct 22, 2007
Posts: 746

PostPosted: Sep 29, 2019 9:19 PM    Post subject:

I can't really tell anything without seeing a snippet (smallest design which demonstrates this).
ltrigero



Joined: Sep 29, 2019
Posts: 13

PostPosted: Sep 29, 2019 9:27 PM    Post subject:

https://m.imgur.com/a/G5s6rbL
jarek



Joined: Oct 22, 2007
Posts: 746

PostPosted: Sep 29, 2019 9:32 PM    Post subject:

It seems like the range to display may be too small. So it could be a matter of precision. Maybe you could try to convert your design to DoubleFloat elements.
ltrigero



Joined: Sep 29, 2019
Posts: 13

PostPosted: Sep 29, 2019 9:50 PM    Post subject:

I just made the range very large to test out that hypothesis (1000 microvolts). Still have the same problem. Also, when I use any filter order other than 1 the filter delay goes to 0.
jarek



Joined: Oct 22, 2007
Posts: 746

PostPosted: Sep 29, 2019 9:53 PM    Post subject:

If the filter delay is 0 then seems something is wrong. Are you reading data from a device or a simulator?

Maybe try to set a larger frequency range, e.g. 0.1Hz and see if that is also happening there.
ltrigero



Joined: Sep 29, 2019
Posts: 13

PostPosted: Sep 29, 2019 9:57 PM    Post subject:

It works correctly at higher frequencies. I just tried 0.05 hz. Im using a device.
alexr



Joined: Mar 25, 2019
Posts: 15

PostPosted: Sep 29, 2019 10:30 PM    Post subject:

I played around with the filters and can confirm that once the filter delay reaches 8,000,000 milliseconds that it shows 0 for the delay and creates a large orange block in the oscilloscope.
ltrigero



Joined: Sep 29, 2019
Posts: 13

PostPosted: Sep 30, 2019 1:07 PM    Post subject:

So, Jarek, does what alexr say mean that it?s a software issue?
jarek



Joined: Oct 22, 2007
Posts: 746

PostPosted: Sep 30, 2019 1:45 PM    Post subject:

Well, yes and no. 8000 seconds is a long time. And BioEra is about real time processing. Can feedback which occurs 2 hours after an event be still considered "real time"? IMO that would be too much to ask.

For such small numbers, I would probably only consider using DoubleFloat elements. But I personally have never experimented with ULF, so this is just an idea.
ltrigero



Joined: Sep 29, 2019
Posts: 13

PostPosted: Sep 30, 2019 11:56 PM    Post subject:

Doublefloat also goes to zero
jarek



Joined: Oct 22, 2007
Posts: 746

PostPosted: Oct 1, 2019 10:26 AM    Post subject:

I tried this frequency range in a snippet. I do get some output with filter order 2, and it doesn't look unreasonable to me considering the range:

http://proatech.com/design/lf_filter.png

This is the snippet design:

http://proatech.com/design/LF_filter.bpd
ltrigero



Joined: Sep 29, 2019
Posts: 13

PostPosted: Oct 1, 2019 1:53 PM    Post subject:

Could the fact that you don?t have this problem be due to a software update?
jarek



Joined: Oct 22, 2007
Posts: 746

PostPosted: Oct 1, 2019 3:00 PM    Post subject:

I don't think so, unless you have a very old version. All options in this snippet were developed years ago.

Did you try to run the snippet I attached? Those numbers can only be visible because I used a ultra small amplitude range (atto Volts). You may not see any change in your design's behavior if your range is high (as the default).
ltrigero



Joined: Sep 29, 2019
Posts: 13

PostPosted: Oct 1, 2019 8:01 PM    Post subject:

The Cyton amp from OpenBCI works a bit better but also has the same issue once I go down to around 0.0000003 hz. In my previous experiments I was using my Qwiz.
jarek



Joined: Oct 22, 2007
Posts: 746

PostPosted: Oct 1, 2019 8:37 PM    Post subject:

I think it might be best to first test everything with a simulator before trying it with a device.

Only when it works as expected try to replicate that with real data.
ltrigero



Joined: Sep 29, 2019
Posts: 13

PostPosted: Oct 2, 2019 2:44 PM    Post subject:

Jarek, why is it that the default filter order is 4? Is there a reason why neurofeedback is better with a 4th order filter rather than a 9th order filter?
jarek



Joined: Oct 22, 2007
Posts: 746

PostPosted: Oct 2, 2019 3:15 PM    Post subject:

Only one reason: time delay. For any real time feedback you want the delay as low as possible.
ltrigero



Joined: Sep 29, 2019
Posts: 13

PostPosted: Oct 2, 2019 3:48 PM    Post subject:

It seems like the training feels more stimulating with higher order filters. Do you know why that is? It seems like you can get feedback with just about any order but it effects the training. Do different frequency ranges need different filter orders? Do you know what filter order the Othmers use for infralow?
Reply to topic