running g.USBamp with BCI2000 using Windows 11

This forum deals with BCI2000 configuration issues.
Post Reply
whwilbur
Posts: 64
Joined: 04 Jan 2024, 15:38

Re: running g.USBamp with BCI2000 using Windows 11

Post by whwilbur » 04 May 2024, 06:56

mellinger wrote: 04 May 2024, 05:27 Regarding the gUSBamp issue: did you record with all inputs being short-circuited and connected to ground? Otherwise, you might pick up a signal from some electric/electronic device nearby. EEG amplifiers are extremely sensitive to all sorts of noise when run with unconnected (open) inputs.

Also, the low frequency peaks might suggest that you have a signal that is so strong that it exceeds the amplifier's linear range, or leads to numeric issues in the digital filters. You might try running the gUSBamp without digital filters, and see what the spectrum looks like.

The BCI2000Viewer.zip I downloaded above didn't run in my pc. I tried several times. It's in Download directory directly. Maybe some components missing that are not present in my computer. The BCI2000Viewer.exe is only 2M whereas in the original installer it is 19M. Hope you can send a more contented executible one.

I tested running the g.USBamp without any filters (no bandpass nor notch) but at 4800Hz sampling. I shorted the inputs and here is the result.

Image

There are large peak at 958Hz and 2nd harmonic at 1916Hz (because of lack of 1000Hz low pass digital filter).

The following is with same parameter at 4800Hz sampling and no filters too, but the inputs opened.

Image

The peaks changed to 911Hz with the 958Hz much much weaker.

If your friend with g.USBamp and Matlab will try it. Please let him short the 3 inputs at channel 1. The 958Hz peak is present with inputs shorted, when Netech EEG simulator used and even on actual EEG signal. The 958Hz peak is very strong.

Some electronics engineers I consulted said it could be ESD damage or USB problem.

Also they said the g.USBamp has aliasing problem. Here is why. According to the following:

https://www.bci2000.org/mediawiki/index ... gUSBampADC
"FilterEnabled

Choose 1 if you want a pass band filter, and 0 if you don't. The gUSBamp is a DC amplifier and thus you most likely will want a pass band filter. Please note that, because the g.USBamp internally has a 5kHz antialiasing filter and always samples with 38.4kHz, you DO NOT need to enable any filter if you do not want. You will never experience aliasing."

The electronic engineers said if I used say 4800Hz sampling with 2400Hz Nyquist frequency. Any signal above 2400Hz and 5000Hz would suffer aliasing. They said the 38.4kHz ADC sampling can't prevent the aliasing in the analog front end. It is not a factor. So those peaks you see may be normal with the g.USBamp which could be suffering aliasing from signal below 5kHz. That is why if you know someone with g.USBamp and Matlab. Pls let him record with all inputs shorted (In+, In-, ground) and no filters with sampling set to 4800Hz and share the FFT with the Matlab codes given in last message. Let's see if there are also peaks and major one at 958Hz. If yes. Then it is factory flaw. If none. Then my g.USBamp unit has ESD damage already or USB problem and in that case I have to take effort to convince a friend to install BCI2000 and test it with my equipment. Thank you.

mellinger
Posts: 1341
Joined: 12 Feb 2003, 11:06

Re: running g.USBamp with BCI2000 using Windows 11

Post by mellinger » 04 May 2024, 07:17

The BCI2000Viewer.zip I downloaded above didn't run in my pc. I tried several times. It's in Download directory directly. Maybe some components missing that are not present in my computer. The BCI2000Viewer.exe is only 2M whereas in the original installer it is 19M. Hope you can send a more contented executible one.
When you double-click the zip file, Windows Explorer will display its contents, making you believe it were extracted. It is not unless you right-click on it and choose "Extract here". Then you will be able to execute BCI2000Viewer.exe from the extracted folder.

whwilbur
Posts: 64
Joined: 04 Jan 2024, 15:38

Re: running g.USBamp with BCI2000 using Windows 11

Post by whwilbur » 04 May 2024, 07:22

mellinger wrote: 04 May 2024, 07:17
The BCI2000Viewer.zip I downloaded above didn't run in my pc. I tried several times. It's in Download directory directly. Maybe some components missing that are not present in my computer. The BCI2000Viewer.exe is only 2M whereas in the original installer it is 19M. Hope you can send a more contented executible one.
When you double-click the zip file, Windows Explorer will display its contents, making you believe it were extracted. It is not unless you right-click on it and choose "Extract here". Then you will be able to execute BCI2000Viewer.exe from the extracted folder.
Yes I extracted it 2 times in 2 directories. The BCI2000Viewer.exe wouldnt run even when I tried admin mode, maybe because I lacked some necessary files like C in my windows? pls try it on another computer with no programmer files.

mellinger
Posts: 1341
Joined: 12 Feb 2003, 11:06

Re: running g.USBamp with BCI2000 using Windows 11

Post by mellinger » 04 May 2024, 09:35

OK, maybe it works when you try this (this time, you can execute it directly after downloading):
bci2000.org/tmp/BCI2000Viewer.exe

Note that there is a warning dialog telling you whether you want to execute a file from an unknown source.
Click "More info" and then "Run anyway".

whwilbur
Posts: 64
Joined: 04 Jan 2024, 15:38

Re: running g.USBamp with BCI2000 using Windows 11

Post by whwilbur » 04 May 2024, 10:00

mellinger wrote: 04 May 2024, 09:35 OK, maybe it works when you try this (this time, you can execute it directly after downloading):
bci2000.org/tmp/BCI2000Viewer.exe

Note that there is a warning dialog telling you whether you want to execute a file from an unknown source.
Click "More info" and then "Run anyway".
Yes. It works now with full screen displayed without cut. :)

Image


For the g.USBamp with unknown peak at 958Hz. I tried to use other channels to see if the same peaks occurs at all 16 channels. But it seems one can't use single channel 5 only but a group at once meaning channel 1, 2, 3, 4, 5 need to be used at same time? All is ok but in the case of the following 8 channels displayed. There is no option to view channel 5 only and see the waveform. The waveform only appear tiny. Maybe the ability to display single channel is already there in the new release (as you seem to say last time)? I'll just wait for it. Without it. How can I view the waveform of channel 5 only real time. I knew there was a peak because I saved it and look at it using BCI2000viewer and viewed channel 5 only. And then export it to ascii and let Sigview read it. But my 14 day evaluation of Sigview is over and I can't read ascii file anymore and plot it FFT via Matlab.

Image


My major concern now is whether my g.USBamp has ESD damage or USB damage or it is typical noise meaning all units have peaks at 958Hz when inputs are used or shorted? Hope someone you know with both g.USBamp and Matlab can try it this weekend. I'll wait for the result so I can decide whether I got a used g.USBamp lemon. Thank you.

mellinger
Posts: 1341
Joined: 12 Feb 2003, 11:06

Re: running g.USBamp with BCI2000 using Windows 11

Post by mellinger » 04 May 2024, 12:43

You may view channel by its own if you choose "fewer channels" until only channel 1 is displayed, and then pressing the down arrow on your keyboard until channel 5 is displayed. Alternalively, you can deselect all the other channels in the channel list.

Also, I wonder where the large signals on your other channels come from? To test properly, you need to short-circuit all the channels, even if you don't (ntend to) record them.

mellinger
Posts: 1341
Joined: 12 Feb 2003, 11:06

Re: running g.USBamp with BCI2000 using Windows 11

Post by mellinger » 04 May 2024, 12:44

Also, as I told you, you can use load_bcidat() in Matlab to directly read BCI2000 files. There is no third party software required.

whwilbur
Posts: 64
Joined: 04 Jan 2024, 15:38

Re: running g.USBamp with BCI2000 using Windows 11

Post by whwilbur » 04 May 2024, 15:15

mellinger wrote: 04 May 2024, 12:44 Also, as I told you, you can use load_bcidat() in Matlab to directly read BCI2000 files. There is no third party software required.
But FFT will plot all 8 channels if I used load_,bcidat(). I dont know how to plot only channel 5.

In the inputs. Only channel 5 inputs are shorted. I cut 3 leads to short them by twisting the 3 wires. I dont have 8 x 3 = 24 leads to cut to short the other inputs.

Also in my Source Signal screen. You can see there is no Channel List option listed when right click. I mentioned this before. You said I had older version. Why does the Download still has old version.. Pls share the newer version with Channel List available at Source Signal here if you can. That way I can deselect the 7 channels. See the screenshot of our exchange here 3 weeks ago about the missing Channel List with screenshot of the options.

Image

whwilbur
Posts: 64
Joined: 04 Jan 2024, 15:38

Re: running g.USBamp with BCI2000 using Windows 11

Post by whwilbur » 04 May 2024, 15:38

whwilbur wrote: 04 May 2024, 15:15
mellinger wrote: 04 May 2024, 12:44 Also, as I told you, you can use load_bcidat() in Matlab to directly read BCI2000 files. There is no third party software required.
But FFT will plot all 8 channels if I used load_,bcidat(). I dont know how to plot only channel 5.

In the inputs. Only channel 5 inputs are shorted. I cut 3 leads to short them by twisting the 3 wires. I dont have 8 x 3 = 24 leads to cut to short the other inputs.

Also in my Source Signal screen. You can see there is no Channel List option listed when right click. I mentioned this before. You said I had older version. Why does the Download still has old version.. Pls share the newer version with Channel List available at Source Signal here if you can. That way I can deselect the 7 channels. See the screenshot of our exchange here 3 weeks ago about the missing Channel List with screenshot of the options.

Image

To continue above. There was something I couldn't understand since April 16. How come the documentation (url below) has option to show Channel List when right clicked, but not in the current download page file. How can the documentation have new version than the one at download page?

Image

whwilbur
Posts: 64
Joined: 04 Jan 2024, 15:38

Re: running g.USBamp with BCI2000 using Windows 11

Post by whwilbur » 06 May 2024, 01:46

mellinger wrote: 04 May 2024, 05:27 Regarding the gUSBamp issue: did you record with all inputs being short-circuited and connected to ground? Otherwise, you might pick up a signal from some electric/electronic device nearby. EEG amplifiers are extremely sensitive to all sorts of noise when run with unconnected (open) inputs.

Also, the low frequency peaks might suggest that you have a signal that is so strong that it exceeds the amplifier's linear range, or leads to numeric issues in the digital filters. You might try running the gUSBamp without digital filters, and see what the spectrum looks like.
After discussing more with electronic engineers. I understood better about the g.USBamp antialiasing performance (or lack of). With it's 6.6kHz analog anti-aliasing filter. Yes, wifi, radio waves, microwaves, etc signal may not get into it but if you do the typical eeg at 256Hz or below with 512Hz sampling. You can still get aliasing if any analog signal between 512Hz and 6.6kHz are present in the environment. So a full Faraday Cage in sensitive experiments may be the only prevention. Also the 958hz peak you see in my unit may be present in all units due to numerical artifacts of the digital signal processing or aliasing effects. True?

Whatever. I have another Bioamplifier that produces even cleaner output than the g.USBamp. It's the BMA-200.

Image


It has individual analog low pass filer like 100Hz, 1000Hz. so it can eliminate any aliasing signal between the 100Hz and 6.6kHz that the g.USBAMP can't remove. It has this specs.

Image


It has BNC output (analog voltage out) and I connect it to the world's 2nd most quietest ADC, the E1DA Cosmos ADC marketed only to measure the noises of other audio gears. Is it possible to use this as Source in BCI2000? I tried using SoundcardSource at Signal Source in BCI2000Launcher but it says "Selected AudioInputDevice #0 does not exist." so how do I use the BMA-200 and E1DA Cosmos ADC or BMA-200 with another stand alone ADC with the BCI2000? Since the BMA-200 has less noise than g.USBamp. It is even better for interfacing to computer and training to control peripherals/computers, etc.

https://www.linsoul.com/products/e1da-cosmos-adc

mellinger
Posts: 1341
Joined: 12 Feb 2003, 11:06

Re: running g.USBamp with BCI2000 using Windows 11

Post by mellinger » 06 May 2024, 07:38

How come the documentation (url below) has option to show Channel List when right clicked, but not in the current download page file. How can the documentation have new version than the one at download page?
BCI2000 comes with a local copy of the documentation, which corresponds to the binaries you have.
The documentation on the wiki corresponds to the version of the current source code.

A current version of the Operator module is here: https://bci2000.org/tmp/Operator.exe

mellinger
Posts: 1341
Joined: 12 Feb 2003, 11:06

Re: running g.USBamp with BCI2000 using Windows 11

Post by mellinger » 06 May 2024, 07:45

Is it possible to use this as Source in BCI2000? I tried using SoundcardSource at Signal Source in BCI2000Launcher but it says "Selected AudioInputDevice #0 does not exist." so how do I use the BMA-200 and E1DA Cosmos ADC or BMA-200 with another stand alone ADC with the BCI2000?
First, try setting the ADC as an audio input in your system's sound settings. If that works, try recording from it using Audacity.

It seems the BCI2000 SoundcardSource is currently broken but for your purposes you will be able to use Audacity for recording, and then read the resulting WAV file into Matlab.

whwilbur
Posts: 64
Joined: 04 Jan 2024, 15:38

Re: running g.USBamp with BCI2000 using Windows 11

Post by whwilbur » 06 May 2024, 19:28

mellinger wrote: 06 May 2024, 07:45
Is it possible to use this as Source in BCI2000? I tried using SoundcardSource at Signal Source in BCI2000Launcher but it says "Selected AudioInputDevice #0 does not exist." so how do I use the BMA-200 and E1DA Cosmos ADC or BMA-200 with another stand alone ADC with the BCI2000?
First, try setting the ADC as an audio input in your system's sound settings. If that works, try recording from it using Audacity.

It seems the BCI2000 SoundcardSource is currently broken but for your purposes you will be able to use Audacity for recording, and then read the resulting WAV file into Matlab.
Thanks for the Operator.exe. I've been using Audacity to display my 2 pcs of BMA-200 for months. And i'm interested in BCI to make 2 users control avatars and race just ike they do yearly at the BCI race. I also read this:

https://www.frontiersin.org/articles/10 ... 05064/full

"Thus, in the last two decades, many types of BCI techniques and applications have emerged, especially in the clinical field where it represents a promising technology for assisting or rehabilitating neurological patients and contribute to the faster reintegration of brain-injured patients (e.g., Chaudhary et al., 2016; Verplaetse et al., 2016). However, recent advances in neuroscience and technology, especially non-invasive and portable brain imaging techniques related to EEG, have encouraged the development of novel applications outside the medical and scientific areas (e.g., Abdulkader et al., 2015; Rashid et al., 2020). Notably, one might list the following fields of education (e.g., Wegemer, 2019), entertainment (e.g., Bonnet et al., 2013; Kerous et al., 2018; Ramchurn et al., 2018; Vasiljevic and Miranda, 2020), biometrics authentification (e.g., Alariki et al., 2018; Chan et al., 2018), or even civil and military aviation (e.g., Dehais et al., 2018)."

So soon, hope the programmer who initially made the SoundcardSource can fix it and make it able to interface with general sound cards or ADCs like the E1da Cosmos ADC. Not only is the g.USBamp so expensive at $17500 (so getting 2 pcs is out of quesiton). But it is very noisy as illustrated in this thesis for instance:

https://etda.libraries.psu.edu/files/fi ... ssions/503

Image

Image


Thanks for all the assistances. No further questions. In case you meet a colleague with g.USBamp and Matlab soon. I guess he will have the same 958Hz peak as mine as well as noisy bursts due to the g.USBamp really noiser due to lack of any anti-aliasing filter below 6.6kHz unlike the BMA-200 which has anti-aliasing filter at 100Hz so the EEG displayed would be much cleaner (it is only 1 channel thought compared to the 16 channel g.USBamp so there are advantages and disadvantages. If you know of other 16 bit EEG/EMG with 0 to 2400Hz signal range and less noisy. Please share it in future so we BCI users, experimenters have many choices). Thank you.

mellinger
Posts: 1341
Joined: 12 Feb 2003, 11:06

Re: running g.USBamp with BCI2000 using Windows 11

Post by mellinger » 07 May 2024, 11:38

An updated version of the SoundcardSource executable is here:
https://bci2000.org/tmp/SoundcardSource.exe

whwilbur
Posts: 64
Joined: 04 Jan 2024, 15:38

Re: running g.USBamp with BCI2000 using Windows 11

Post by whwilbur » 09 May 2024, 00:29

mellinger wrote: 07 May 2024, 11:38 An updated version of the SoundcardSource executable is here:
https://bci2000.org/tmp/SoundcardSource.exe
SoundcardSource is working good.

I also found out the source of the mysterious 958Hz peak. In the parameter setup

Image

Settting the CommonGround and CommonReference to false removes the 958Hz peak. By the default "true". It connects all the grounds of the 16 channels attracting the noises of other channels. In the g.USBamp Demo software. The default is false or not connected. Just wondering. How many simultaneous channels the most a user can use? I thought it was only one channel. If say 8 channels. How do you use 8 channels to move a cursor??

By setting CommonGround and CommonReference to false. the noises are less too. But still the BMA-200 seems to have clearer waveforms. The following is the BMA-200 + E1DA Cosmos ADC connected to Soundcardsource

Image

The BMA-200 is set to 1000Hz bandwidth, 50,000 gain. 2nd order Butterworth filter. The source is the usual Netech 50Hz 10uV.

The following is output from the g.USBamp set to 1000hHz Low pass. 0.1Hz High pass, 8th order Butterworth with same Netech 50Hz 10uV signal generator used. I think it has no gain because input is mapped directly to the ADC.

Image

The waveforms from g.USBamp with disconnected ground appears to be noiser than the BMA-200. but then in fairness I still haven't shorted all the inputs of the separated banks of the g.USBamp. I thought disabling the grounds of all channels via the software is enough.

If one uses gtec Active electrodes. Maybe the noises would even be less. The g.USBAmp has made many discoveries as many R&D Centers worldwide uses it, including some important Sigma 5 result im trying to replicate. It is 16 channel compared to the BMA-200 only one channel.

Whatever. After a month of learning how to configure the equipments. I can finally use BCI2000 for the first time today. :)

Well. I read the BCI2000 start up tutorial and load for example the CursorTask_SignalGenerator.bat and also load up for example P300 Speller_SignalGenerator.bat.

However. One thing I'm somewhat puzzled now is. When you load them up. How are you supposed to load up the g.USBamp parameter for example? Should you load them up together or only the P3 Speller?

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests