Brain Products is excited to introduce two new accessories for StimTrak – the Acoustical Stimulator Adapter and the Photo Sensor. This article is going to present the Acoustical Stimulator Adapter. The Photo Sensor will be addressed in a later issue.
Basically, an introduction to the Acoustical Stimulator Adapter for StimTrak would only require a couple of sentences. However, I would like to show you a number of practical examples in order to illustrate the benefits and explain why StimTrak is a vital tool in your lab.
Let me start with the brief introduction first. The Acoustical Stimulator Adapter for StimTrak makes it possible to feed an audio signal into StimTrak in order to record it or generate triggers with it.
First, let’s see how the adapter is connected to existing devices. As Figure 1 illustrates, the acoustical adapter receives a stereo audio signal, passes it through unalteredly and sends either the left or the right audio channel to StimTrak – or both channels, in case two StimTraks are available. The galvanic isolation allows to feed the audio signal to an EEG amplifier, even if a subject is connected to it at the same time – this would not be safe otherwise. Receiving the audio signal is the key to mark the real onset of the sounds, no matter whether the marking is done offline – based on the co-registered audio channel – or done online by StimTrak.
Figure 1: Connection diagram of StimTrak. Blue: analogue audio signal; orange: digital markers. The dotted line marks the connection without using StimTrak. In case StimTrak is used (solid lines), the stereo audio signal enters the acoustical adapter and passes through to the headphones. The acoustical adapter sends one audio channel to StimTrak, which forwards it to the AUX input of the EEG amplifier. If the threshold is violated, a trigger is generated, reaching the trigger port of the amplifier (possibly through a TriggerBox). The stimulation computer also sends a trigger to the amplifier (optionally through a TriggerBox).
Importance of marker accuracy
If you are a certified international grand master of triggering arts, feel free to jump to the next section.
Why did I mention real onset marker? Isn’t the trigger sent by the experiment control software marking the stimulus onset? Well, basically it should – however, this is not always the case, for which there are numerous reasons. Unfortunately, current operating systems no longer grant applications direct access to the hardware. In fact, the experiment control software doesn’t send a command directly to the digital port in order to release trigger or to the sound card to play a stimulus. The software rather sends a request to the operating system, which considers the request and, given that there aren’t any other tasks of greater importance waiting in line, performs it quickly (Everything was better in the good old days? Probably not. Although DOS was more accurate in terms of timing, I bet the majority of you are not using it anymore. If you do, you can stop reading this paragraph.) Additionally, the port and the sound card also need time to finish their task and they do not necessarily complete it synchronously. Consequently, the experiment control software simply cannot guarantee a completely delay and jitter free marker at any computer. I’m not pointing a finger on them, they are doing an excellent job – however, if the hardware is not perfect, a certain precision is just beyond their possibilities.
The onset of the stimulus simply is the beginning of the stimulation. Typically, the experiment control software aims to send a trigger in order to exactly mark this time point. This is called onset marker.
Marker delay is a fixed time difference between the trigger and the actual onset of the stimulation. This value can also be negative, thus the trigger may even arrive before the start of the sound, picture, etc..
Marker jitter is the trial-to-trial variation of the marker delay. Since the jitter is unpredictable, it is difficult to compensate for it.
The markers are fairly important for any event-related study since these experiments are aiming to investigate the phenomena that are time locked to the events. In an ordinary experiment, the events are not recorded, only their markers are. Thus, what actually is investigated are the phenomena being time locked to the trigger.
Marker jitter smears the average signal, e.g. it decreases the amplitude and the “peakedness” of ERP. Under extreme circumstances, a component can even be missing completely. Certainly, the desired marker accuracy heavily depends on the investigated feature of the EEG. A P300 is a pretty long – or slow – component, therefore it is more robust. Early components are more vulnerable. Brainstem potentials are one of the extreme examples – 1.5 ms wide peaks can easily disappear due to the smallest jitter.
Not only ERP requires precise triggering. Inter-trial phase coherency or phase locking factor calculation can also be affected easily.
To illustrate the potential benefit deriving from the combination of the Acoustical Stimulator Adapter and StimTrak, I am going to present a small sample dataset. The setup was very similar to the one shown in Figure 1. A commonly used experiment control software – yes, I do not write the name on purpose – was playing a 50 ms long, 1000 Hz auditory stimulation in every half second. Through the acoustical adapter the signal was fed into StimTrak, which passed it through and, at the same time, generated a trigger. The outputs were captured by an actiCHamp in order to take advantage of the high sampling rate – in this case, 100 kHz was used. The computer was also sending TTL triggers, while a TriggerBox was mixing the trigger sources.
Figure 2: Trial-to-trial marker accuracy. The left panel displays the incoming audio signal. The upper right panel shows the single segments using the trigger of the experiment control software (time scale: -10…+100 ms). The lower right panel displays the same data, segmented according to the trigger generated by StimTrak (time scale: -10…+100 ms). The 50 ms long, 1000 Hz auditory stimulus is clearly visible in both panels. Positive direction points downward. Note the considerable amount of jitter and lag using the trigger of the experiment control software and the accurate timing using StimTrak.
The newly designed, digital version of our newsletter makes it possible to show the result as an animated gif. Here, I used the well-known – at least I hope it is known – online averaging feature of the BrainVision Recorder. The upper right panel displays the same signal, segmented online according to the marker coming from the computer. Time 0 is the marker and the waveform is the audio signal. In other words, what you can see here is the trial-to-trial variability between the trigger of the experiment control software and the stimulus onset. The panel shows 100 ms. As can be taken from the figure, there is a considerable amount of delay and additional jitter from trial to trial (check Figure 3 for the histogram).
Figure 3: Marker delay histogram of 1000 trials. The horizontal axis represents the time difference categories between the marker of the experiment control software and the first peak of the auditory stimulus. Each category covers 1 ms. The vertical axis is the probability of the categories.
Let me show you another example (Figure 4). It’s the same setup, however this time I used a 50 Hz, one cycle long wave as audio signal. According to the simplest ERP model – ERPs are perfectly time and phase locked to the event without any jitter –, this could be even a component. Let’s see what happens when we start recording. Now the upper right panel shows the averages. As the average contains an increasing number of segments from frame to frame (see the counter below the signal), the amplitude becomes lower and lower. The 50 Hz peak turns into a 30 Hz peak, the amplitude shrinks to half of its original size. The time averages of 1000 trials show a delay of 42.51 ms and an amplitude reduction of 53.7% of the first peak (Figures 5 and 6).
Figure 4: Online averaging of auditory signal. The left panel displays the incoming audio signal. The upper right panel shows the average using the trigger of the experiment control software. The lower right panel displays the same data, averaged using the trigger generated by StimTrak. In both panels, the time scale ranges from -10 to +100 ms. The number of the segments used for the average varies between 1 and 300. The current number is shown by the counter (‘Total Segs’). Stimulus: 50 Hz sine wave, 20 ms long (1 cycle). Positive direction points downward. Note the remarkable decrease of peak amplitude and increased latency related to the trigger timing accuracy.
Figure 5: The time average and standard deviation of the auditory signal (processed similarly as an ERP) using the trigger of the experiment control software (average: red solid line; standard deviation: green dashed line) and StimTrak trigger (light blue solid line and dark blue dashed line). Stimulus (or signal): 50 Hz sine wave, 20 ms long (1 cycle). Number of trials: 1000. Note the remarkable peak amplitude and latency differences (53.7% and 42.51 ms, respectively) related exclusively to the trigger timing accuracy.
Figure 6: Wavelet analysis of the averages shown in Figure 5 (evoked time-frequency) using the trigger of the experiment control software (right panel) and the trigger of StimTrak (left panel). Morelet complex, spectral powers were calculated with the parameters c: 5, min freq: 10, max freq: 100, number of steps: 50 (logarithmic), Gabor amplitude normalization. Note the shift in all dimensions – time, frequency and decreased amplitude. The phenomenon is related exclusively to the trigger timing accuracy.
The EEG components are similarly affected during a real measurement using this computer. Knowing the marker jitter, it can be estimated how much it reduces the amplitude of different ERPs (Figure 7). Certainly, in reality there are additional – e.g. neuronal – factors which make the effect stronger. Let me point out again that these effects are additional effects.
Figure 7: Simulated reduction of ERP amplitude due to marker jitter.
It is important to emphasize again that these numbers are valid for one environment only, including hardware and software. Are you interested in how your lab performs? Why not test your own laboratory using a StimTrak? It can unveil and quantify factors in the measurement chain which otherwise would remain hidden. Measuring hidden parameters is the essence of research and accuracy is a key to success.
Towards the accurate triggers
StimTrak and the Acoustical Stimulator Adapter can do a lot more than just quantifying delay and jitter. They can eliminate delay and jitter completely.
Once the marker jitter is measured and proven to have an effect on the signal of interest, the next question is how to deal with it. One strategy is to try to alter the system in order to be more precise (see the text box), the other one simply is to use any inaccurate system and add the StimTrak in order to eliminate the jitter and the lag completely.
Tweaking the experiment control computer
The good part of the jitter as demonstrated above is caused by the hardware components. If the hardware can be changed, it is a good idea to exchange it – starting with a sound card. In case a laptop is planned to be used, this is not a suitable alternative.
Software settings might also have an effect on the delay and the jitter. Even with the most accurate sound card the proper software settings have to be found for the highest precision.
Undoubtedly, StimTrak is a useful tool when tweaking your system. In fact, it is the only tool that allows co-registering audio stimulation and EEG.
I believe at this point it would come as a rather big surprise if StimTrak was not able to handle the problem. Fortunately, it is in two ways. First, you can record the event signal and place the triggers offline, e.g. using the Level Trigger transformation of BrainVision Analyzer 2.
Second, the triggers of StimTrak are rather accurate, just check the lower right panel of Figure 4 – it does not seem to be changing from trial to trial, because StimTrak delivers accurate triggers and the amplifier precisely co-registers the analog and digital signals.
How accurate are the markers generated by StimTrak?
The histogram depicted in Figure 8 provides an answer to this question. The difference between StimTrak marker and stimulation peak is always 0.25 ms or 0.26 ms at 100 000 Hz sampling rate. This means that the variation between the marker and the real peak of the stimulation always is within two consecutive data points, which corresponds to the highest possible accuracy for a non-phase synchronized system. I have to admit that I tend to avoid marketing expressions such as “jitter-free”, but if 100 kHz is not enough to show inaccuracy, it very likely is more than enough for any event related study – including brainstem measurements.
Figure 8: Time difference between StimTrak markers and the first peak of the audio signal. Histogram made of 1000 trials. Stimulus: 1000 Hz sound. All of the cases fall into two neighbouring categories (0.25 ms and 0.26 ms), which corresponds to the highest possible accuracy.
In this article I presented how the combination of StimTrak and the Acoustical Stimulator Adapter for StimTrak can help to make the auditory stimulation more precise. It shows and quantifies the marker jitter and delay, which otherwise would remain hidden. Knowing the delay and jitter values, their effect on event related results like ERP, phase locking factor, etc., can be estimated. Furthermore, even at 100 000 Hz sampling rate it helps to deliver markers at the highest possible precision. StimTrak is the only device allowing you to safely record acoustical stimulation from any source while a human subject is connected to the same amplifier.