Openvibe 2.2.0 filters

Obtaining data from various hardware devices
Post Reply
arnau
Posts: 1
Joined: Fri Aug 21, 2020 2:26 pm

Openvibe 2.2.0 filters

Post by arnau »

Hi all,

I work in a project where we use Openvibe 2.2.0. and we have a couple of questions regarding the acquisition server application. Hopefully someone in this forum may be able to help us.

Question 1: Are the acquisition servers bench test? Did anyone performed frequency swept test on them?
Explanation: We run a swept frequency test with 10Hz carrier frequency and 1Hz to 10Khz swept modulated frequency. On the image https://drive.google.com/file/d/1xS-YrY ... sp=sharing you can see we find a mirror effect on 256Hz. Does anyone face the same problem?

Question 2: does anybody know if its possible to update the filters of the acquisition server (under: .\openvibe\applications\acquisition-server\filters) without recompile the acquisition server application?

Thanks a lot for your help!

General information:
Host: Ubuntu 18.04
virtual macahine: Virtualbox
Virtual OS: Win10 64 bits
software: Openvibe 2.2.0
Amplifier: 16 ch Vamp from BrainProducts

Thibaut
Posts: 264
Joined: Wed Oct 31, 2018 9:14 am

Re: Openvibe 2.2.0 filters

Post by Thibaut »

HI,
1) It's hard to test in CI a connection with a non existing hardware.^^ We launch some test but the acquisition server are not enough tested.
2) the filters xxxxx.bin are not compiled juste copied, I think there are make with python but i don't know by who and when.

Code: Select all

	
from scipy import signal
	
N = 200
signal.firwin(N, cutoff= 256./(0.5*2000.), window='hamming').tofile("f64_2k_512.bin")
signal.firwin(N, cutoff= 128./(0.5*2000.), window='hamming').tofile("f64_2k_256.bin")
signal.firwin(N, cutoff=  64./(0.5*2000.), window='hamming').tofile("f64_2k_128.bin")
	
N = 2000
signal.firwin(N, cutoff=2048./(0.5*20000.), window='hamming').tofile("f64_20k_4096.bin")
signal.firwin(N, cutoff=1024./(0.5*20000.), window='hamming').tofile("f64_20k_2048.bin")
signal.firwin(N, cutoff= 512./(0.5*20000.), window='hamming').tofile("f64_20k_1024.bin")
signal.firwin(N, cutoff= 256./(0.5*20000.), window='hamming').tofile("f64_20k_512.bin")
signal.firwin(N, cutoff= 128./(0.5*20000.), window='hamming').tofile("f64_20k_256.bin")
signal.firwin(N, cutoff=  64./(0.5*20000.), window='hamming').tofile("f64_20k_128.bin")
...
Thibaut

acrema
Posts: 1
Joined: Mon Aug 24, 2020 8:11 am

Re: Openvibe 2.2.0 filters

Post by acrema »

Hi Thibaut, all,

I prepared the sweeping testbench with Arnau, and I can confirm that something was a bit off.
The filters shipped with release 2.2.0 are saved to specification so, if reopened with the code here below, they appear correct.

Code: Select all

import matplotlib.pyplot as plt
import numpy as np
coeff = np.from_file(fname)
ww, hh = signal.freqz(coeff)
plt.plot(ww, 20*np.log10(np.abs(hh)))
plt.title('Digital filter frequency response')
plt.ylabel('Amplitude Response [dB]')
plt.xlabel('Frequency (rad/sample)')


To have a more conservative filtering we saved elsewhere the original "f64_2k_512.bin" and substituted it with a more conservative cutoff. However, the spectrogram of the sweep looked like the same.

Code: Select all

N = 200
signal.firwin(N, cutoff= 100./(0.5*2000.), window='blackman').tofile("f64_2k_512.bin")
Since nothing was changing, we removed the file f64_2k_512.bin and tried another run without any matching filename. In this case we expected some kind of warning/error to pop up, but it didn't.

So this left us with a few possible issues:
1) filters are embedded in the executable. You exclude this option
2) filters are not embedded, and can be replaced. It did not work so we may have picked the wrong filename from the git.
3) the gui is calling the wrong filter filename, or using a default one if none is present.

If the expected behaviour is 2) we can have a look together.

Best,
Andrea

Thibaut
Posts: 264
Joined: Wed Oct 31, 2018 9:14 am

Re: Openvibe 2.2.0 filters

Post by Thibaut »

Hi,
For me the good location to change file is where you build your OpenviBE (for me : )

Code: Select all

C:\OVBE-META\dist\extras-Release-x64\share\openvibe\applications\acquisition-server\filters
Thibaut

Post Reply