Clone wiki

openvibe-gipsa-extensions / SignalTagging

Signal Tagging


"Signal Tagging" or just "Tagging" is the process of annotating the EEG signal. In other words chunks of the EEG signal are marked. A typical example is when a stimulus such as a flash is performed in front of the user and then we tag exactly when this happened on the EEG timeline. Tagging is usually used for P300. A precise tagging (less than a millisecond) is very important because often we are interested in short EEG intervals in the exact moment when the Brain reacts to the stimulus.

Once again tagging is:

  • a way to annotate portion of the signal by merging both the EEG signal and the tags (not a trivial task)
  • a way for communication between the software that acquires the signal and the one doing the stimulation

Currently we use three tagging methods: two hardware and one software.

You are required to configure: your application (e.x. Brain Invaders) and OpenVibe and select the right scenarios when deciding which tagging method to use.

  • Brain Invaders has a configuration option selecting the preferred tagging method
  • For Software Tagging you need to use our version of the Acquisition Server. Also you need to enable the "Software Tagging" in the "Preferences" section every time you start it.
  • Our scenarios download archive will contain scenarios for both software and hardware tagging

In general Hardware Tagging is assumed better than Software Tagging.

Hardware Tagging

It allows for a very precise tagging. When a visual stimulation is performed such as flash we send a signal on the hardware port (serial/parallel) which goes into the amplifier. Then the amplifier merges both the tags and the EEG data signal which we receive back on the computer.

Tagging options:

  • Parallel Port - performs hardware tagging through the parallel port, which has no dangers of drift, but requires an EEG amplifier, cable and computer that support parallel port.
  • Serial Port - performs tagging on the serial port (COM1, COM2 ..). This option allows computers without parallel port to be used with hardware tagging. Thanks to a software serial to USB converter the USB port can be used. Then the USB cable uses a hardware converter to parallel port, so that it ca be connected to the parallel port of the amplifier. To use a virtual serial port that works over USB you need a USBtoUARTBridge or to install the Arduino development kit. This is indeed the most convenient way as it allows laptops to be used with Hardwate tagging (which do not have serial/parallel) port, but it requires a hardware box.


Hardware tagging benefits from a built-in feature of the amplifier to merge the tags and the EEG signal. No further actions are required.


Not all amplifiers support hardware tagging (with 7 bits). For example the Emotiv does not. Also parallel port is not available on modern computers such as laptops and Macs.

It is possible that due to not properly functioning data acquisition driver or defective hardware that some of the tags are actually lost.

Software Tagging

Software Tagging is performed computer to computer. Tags are generated on the machine where the stimulation is performed and where the signal is acquired. Software tagging is fully supported by our Gipsa's Acquisition Server. Later this finctionality has been integrated in the mainstream OpenVibe Acquisition server.


There is no need for cables, support for parallel port in the EEG amplifier, etc.


It is tricky to do the merging between software tags and the hardware signal coming from the amplifier.

Software tagging is typically a subject to some drift (resulting in inaccurate processing). Currently software tagging requires that the user resets OpenVibe's Acquisition Server every ten or twenty minutes.


Drift is only a concern when we do "Software Tagging". Drift causes time by time shifting of the marked time interval until the marked signal is not what we need. For example instead of getting the EEG signal exactly after the stimulus in the range 0 - 300ms, we actually start to get 3 - 305, 4 - 306, etc. Drift is slow and thus not easy to see in the first moment, but it can affect your P300 classification.

Problem description

Drift is due to the fact that we have two different clocks. First one is in the computer who performs the tagging and merging and the second clock is in the amplifier. These two clocks have different time precision and in the end the time they measure starts to differ. They both think 5 minutes have passed, but in reality it was something like 5 minutes 1 ms for the first one and 5 minutes 4 ms for the second one. With time this difference is accumulated resulting in a bigger and bigger drift.


OpenVibe implements an algorithm that does a software correction of the drift. Unfortunately this drift correction does not work well in all cases.


Software tagging is known not to work with specific versions of Boost C++ library.