synchronization hardware-software

Come here to discuss about OpenViBE in general!
Post Reply
matthieuG
Posts: 54
Joined: Thu Nov 12, 2009 10:22 am
Location: grenoble

synchronization hardware-software

Post by matthieuG »

Hello,

The team in which I work have to deal with synchronization issue. So we need the more information it is possible on the behavior from acquisition (hardware interface) to designer (software). I expect from this post to have a good understanding of what is going on.

An acquisition-amplifier system is used. The information broadcast are basically channels name and number, sampling rate and samples. At this point, there is no additional time information, the hardware is only designed to work at this sampling rate.
To interface that, openViBE driver is created. After initialization, the thread of the acquisition server lunch the loop function as soon as possible. I think there is no periodic call, only as fast as possible...is it right?
When the callback "setsample" is used, the buffer is available at the used port and the client (designer) can grab these data. When channels name, sampling rate is communicated?
When data are received in the Designer, they are tagged with time of reception. Box process and time of processing is checked to warning if real time is not respected.

So if I am right, that mean that if an EEG acquisition is done in New York with the acquisition server and send to a designer in France, there is no synchronisation possible with feedback system (which is in NY, with the subject). I understand, it is not a usual case, but it could explain the issue.

What is the frequency of the loop? (should depend of the PC, processus activated, etc.)

Thanks to correct what I wrote.

yrenard
Site Admin
Posts: 645
Joined: Fri Sep 01, 2006 3:39 pm
Contact:

Re: synchronization hardware-software

Post by yrenard »

Dear matthieuG,
matthieuG wrote: The team in which I work have to deal with synchronization issue. So we need the more information it is possible on the behavior from acquisition (hardware interface) to designer (software). I expect from this post to have a good understanding of what is going on.
I will do my best to help you understand that.
matthieuG wrote: An acquisition-amplifier system is used. The information broadcast are basically channels name and number, sampling rate and samples. At this point, there is no additional time information, the hardware is only designed to work at this sampling rate.
To interface that, openViBE driver is created. After initialization, the thread of the acquisition server lunch the loop function as soon as possible. I think there is no periodic call, only as fast as possible...is it right?
You are right !
matthieuG wrote: When the callback "setsample" is used, the buffer is available at the used port and the client (designer) can grab these data. When channels name, sampling rate is communicated?
The header part (number of channels, number of samples per block, sampling rate and channel names) is sent as soon as a client connects to the server.
matthieuG wrote: When data are received in the Designer, they are tagged with time of reception. Box process and time of processing is checked to warning if real time is not respected.
They are not tagged with the time of reception. They are tagged with incrementing dates depdending on the number of samples received since the connection. There can't be any holes in the signal at acquisition time.
matthieuG wrote: So if I am right, that mean that if an EEG acquisition is done in New York with the acquisition server and send to a designer in France, there is no synchronisation possible with feedback system (which is in NY, with the subject). I understand, it is not a usual case, but it could explain the issue.
I don't understand what you want here. I understand the example, I understand the fact that the long distance may cause greater latency, but I don't understand what you want to synchronise here. Please give more details.
matthieuG wrote: What is the frequency of the loop? (should depend of the PC, processus activated, etc.)


As you said, the loop is called as often as possible. Depending on the driver implementation (whether it waits for all the samples of a single block before exiting the loop function or not), the frequency can be very different. If you want an estimation for your driver, just put a clock spy at the begining of the loop and compute the frequency. As I said, this will only be for your driver.

matthieuG wrote: Thanks to correct what I wrote.


I hope this helps,
Best regards,
Yann

matthieuG
Posts: 54
Joined: Thu Nov 12, 2009 10:22 am
Location: grenoble

Re: synchronization hardware-software

Post by matthieuG »

yrenard wrote:
matthieuG wrote: So if I am right, that mean that if an EEG acquisition is done in New York with the acquisition server and send to a designer in France, there is no synchronisation possible with feedback system (which is in NY, with the subject). I understand, it is not a usual case, but it could explain the issue.
I don't understand what you want here. I understand the example, I understand the fact that the long distance may cause greater latency, but I don't understand what you want to synchronise here. Please give more details.
I mean that if you use a P300 speller in NY (only acquisition and screen) and control by openViBE designer in France (data processing, flash command), you can't synchronize EEG data with flash stimulation, so P300 use is not possible.

yrenard
Site Admin
Posts: 645
Joined: Fri Sep 01, 2006 3:39 pm
Contact:

Re: synchronization hardware-software

Post by yrenard »

Indeed such scenario would probably fail to work correctly. I don't like to think it this way, but why would you have Acquisition Server and Visualisation on one side, and Processing so far away ? Do you believe this is a reasonable use case ? OpenViBE has not been designed for this. However, if you work on a Local Area Network, everything should run just fine.

Best regards,
Yann

matthieuG
Posts: 54
Joined: Thu Nov 12, 2009 10:22 am
Location: grenoble

Re: synchronization hardware-software

Post by matthieuG »

This improbable scenario is only an extrapolation of the encountered issue. We have some computers which communicate and if one send command, the others don't execute immediately. The latency induce is also variable. But don't worry, if softwares can't make synchronization by themselves, adding hardware touch can make the difference! ;)

yrenard
Site Admin
Posts: 645
Joined: Fri Sep 01, 2006 3:39 pm
Contact:

Re: synchronization hardware-software

Post by yrenard »

matthieuG wrote:This improbable scenario is only an extrapolation of the encountered issue. We have some computers which communicate and if one send command, the others don't execute immediately. The latency induce is also variable.
Right, this is also true if on a single application, you request to display something : it won't appear immediately on screen... It will be faster but not immediate. So what do you consider as "fast enough", what kind of latency do you expect ?
matthieuG wrote:But don't worry, if softwares can't make synchronization by themselves, adding hardware touch can make the difference! ;)
Do you plan to put some wire from your place to New York ;) ?

The problem you pointed out to sync three applications with one of them being in New York can not be solved with hardware, you have to do software. As I said, this example, be it an extrapolation, is not reasonable.
From the information you gave to us, I don't know if your real synchronization concern is actually an issue or not.

Hope this helps,
Yann

Post Reply