Irregular timing with 2 g.tec amps

This forum deals with BCI2000 configuration issues.
Locked
ageronimo
Posts: 26
Joined: 04 Dec 2012, 14:00

Irregular timing with 2 g.tec amps

Post by ageronimo » 17 May 2013, 11:08

Im sorry if this has been addressed before.

I am having irregular timing when I connect two gUSB amplifiers for recording. I don't have this problem when I record with one.
Timing plot with two amps
Timing plot with two amps
2amptiming.PNG (10.19 KiB) Viewed 11980 times
I am using the CursorTask_gUSBamp batch file that came with the distribution, and two gUSBamps connected with a sync cable. I tried uploading the parameter file, but this not allowed? I am recording at 256 sps, 16 channels, 8 on each amp.

Could this be a driver issue? My amps are ~6 years old (not exactly sure if they are version 2, or earlier). I tried following the instructions about drivers on the User Reference:gUSBampADC page http_nospam_www.bci2000.org/wiki/index. ... gUSBampADC. I do have gUSBamp.dll (version 1.0.0.1) in my Windows\system32 folder, but no such driver in by BCI2000/prog directory.

Thanks in advance,
Andrew

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

Re: Irregular timing with 2 g.tec amps

Post by gschalk » 20 May 2013, 09:04

Andrew,

I would suggest to contact g.tec to get a new driver. Yours appears to be ancient.

Gerv

ageronimo
Posts: 26
Joined: 04 Dec 2012, 14:00

Re: Irregular timing with 2 g.tec amps

Post by ageronimo » 28 May 2013, 10:00

I've updated both the drivers and firmware for my amps.

From the gUSBamp demo application:
SNR=UA-2006.10.05
HWVER=V2.0
VER=2.0.2

SNR=UA-2006.10.06
HWVER=V2.0
VER=2.0.2

In device manager, I can see that both are using driver version 3.4.1.20

With both amps connected, I get block time irregularities every 5 seconds or so. (This is an improvement compared to nearly continuous block irregularities)
2 amplifiers connected
2 amplifiers connected
newD2amps.PNG (7.3 KiB) Viewed 11940 times
When I ran CursorTask with 1 amp, I saw no timing irregularities
1 amp connected
1 amp connected
newD1amp.PNG (7.1 KiB) Viewed 11940 times

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

Re: Irregular timing with 2 g.tec amps

Post by gschalk » 28 May 2013, 14:28

Which BCI2000 version are you using?

Gerv

ageronimo
Posts: 26
Joined: 04 Dec 2012, 14:00

Re: Irregular timing with 2 g.tec amps

Post by ageronimo » 28 May 2013, 14:39

3.0.5

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

Re: Irregular timing with 2 g.tec amps

Post by gschalk » 28 May 2013, 15:22

What happens when you use the TaskManager to set the CPU Priority of the Source module to Real Time?

Gerv

ageronimo
Posts: 26
Joined: 04 Dec 2012, 14:00

Re: Irregular timing with 2 g.tec amps

Post by ageronimo » 28 May 2013, 16:50

While CursorTask was running, I changed the priority on the gUSBampSource process from Realtime to Normal to Low.

Realtime:
Realtime Priority
Realtime Priority
Normal:
Normal Priority
Normal Priority
Low:
Low Priority
Low Priority
It makes sense that the stimulus duration becomes more erratic when I devote more CPU to the source module, but I see no differences in the block irregularities.

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

Re: Irregular timing with 2 g.tec amps

Post by gschalk » 29 May 2013, 10:42

A few more ideas.

#1: I understand you do 256 Hz. What is the SampleBlockSize?
#2: Does anything change if you go to 16 channels on each amp (32 total)?
#3: How did you connect the g.USBamps? If you use a USB splitter, or even otherwise, they may be on the same USB controller, and what you see may be an issue with that controller. You could try to put the two amps on two separate controllers (e.g., connect one to the front of the computer, and one to the back).

Gerv

ageronimo
Posts: 26
Joined: 04 Dec 2012, 14:00

Re: Irregular timing with 2 g.tec amps

Post by ageronimo » 30 May 2013, 13:54

1) My sample block size is 8
2) Changed both amps to record 16 channels each. No change.
3) I connect my amps with the sync cable, and plug each of their usb cables into a port on my laptop. I tried plugging one into a port on the opposite side of the laptop, but there was no change.

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

Re: Irregular timing with 2 g.tec amps

Post by gschalk » 31 May 2013, 10:49

I think I am running out of possible reasons for this. We definitely know of (even much more demanding) configurations that do not show these irregularities. The only thing I can still think of is to try a different computer, or to see if you can increase the polling cycle of the USB controller and/or decrease the time slice of the Windows scheduler.

What I do know is that these timing irregularities do not happen often and are quite small (half a Sample Block=16 ms). You will also not lose any data. Thus, this will only be of concern for a very small fraction of applications. The effect on typical mu-rhythm or P300 experiments should be negligible.

Gerv

ageronimo
Posts: 26
Joined: 04 Dec 2012, 14:00

Re: Irregular timing with 2 g.tec amps

Post by ageronimo » 31 May 2013, 11:37

Thank you for your help Gerv,

I agree with your second point. I haven't seen any data loss with these irregularities. How exactly might periodic 16 ms delays affect a P300 task? My guess is not much because the P300 signal is broader than this.

Andrew

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

Re: Irregular timing with 2 g.tec amps

Post by gschalk » 02 Jun 2013, 01:36

I do not think that a sporadic 16 ms jitter will affect the P300 system very much. We have been very successful with P300 experiments with wireless EEG devices that typically have quite poor timing performance.

Gerv

Locked

Who is online

Users browsing this forum: No registered users and 10 guests