Search our resources

Tip: Start typing in the input box for immediate search results from our Support Resources Knowledge Base.
For a more comprehensive search, use the site search in the main menu above.

How to Assess Trigger Signal Properties and Adjust Settings Correctly in MR Experiments

Introduction

Triggers in MR settings are especially important because EEG recordings are heavily affected by artifacts correlating with the switching of the gradient magnetic fields that occur during the acquisition of fMRI volumes. Typically, MR devices are equipped with the needed tools to provide fMRI volume triggers that make it possible to synchronize the acquisition of the fMRI volume and the acquisition of the gradient artifact recorded in the EEG data. That said, the fMRI volume triggers may vary across scanner manufacturers. Determining the nature of these triggers is not always trivial, and some work needs to be done before starting recordings to make sure that all the settings are correct. In this article, we point out potential characteristics of such triggers and provide a guideline for making sure that the correct settings are selected according to the trigger coming from the MR device, by using the BrainAmp MR and the TriggerBox (Plus). This information can also be viable in other difficult scenarios where it is important to examine the trigger signal and adjust the settings accordingly.

When planning an experiment in an MR environment, it is often not possible to spend a lot of time on site, as MR recording time is usually expensive and time slots need to be reserved well ahead of time. With this in mind, the operators are often forced to plan many details without having the chance of running quick verification. It is, however, crucial to pilot EEG-fMRI studies properly to ensure the optimal EEG quality is achieved.

To help researchers using Brain Products equipment in the MR, we have collected some tips and tricks regarding the necessary steps to make such a quick and precise assessment possible. One of the first steps requires (1) setting up the Recorder Workspace with the correct recording settings and (2) choosing an EPI sequence that has an fMRI volume acquisition time (TR) that is an integer multiple of the EEG sampling rate to avoid having a jitter in the timing of the markers in the EEG recording.  At the recommended sampling rate of 5000 Hz for EEG-fMRI acquisitions, the smallest time difference that can properly be sampled by the recording software is 0.2 milliseconds. More information on the recommended recording parameters can be found in the Setting up BrainVision Recorder for simultaneous EEG-fMRI support article. Once these two criteria have been fulfilled, it is important to check for the type of fMRI volume marker and the presence of the marker in the EEG recording. In the next sections we provide the necessary steps to assess the fMRI triggers, which can easily be performed by the TriggerBox (Plus). We do not cover how to set up a trigger pipeline for EEG-fMRI in the first place.

Volume trigger signal: key criteria

In EEG-fMRI experiments, fMRI volume triggers are necessary to synchronize the acquisition of the fMRI volume and the acquisition of the gradient artifact recorded in the EEG data. These fMRI volume triggers may vary across scanner manufacturers, and it is crucial to adjust the settings in the recording setup correctly to avoid wrong or even missing markers. To apply the correct settings, it is necessary to know about the type and waveform of the provided volume trigger.

Type of the trigger signal: electrical versus optical

First, it is necessary to determine the type of the physical trigger signal. For that, it may be necessary to get access to the technical room of the MRI scanner to locate the fMRI volume trigger port.  Since many setups require fMRI volume triggers, it could be that an fMRI trigger cable has already been installed and directed into the MR scanner control room at your institution. It should be verified if there is an electrical or an optical outlet providing the trigger signal. Fortunately for the Brain Products user, with the TriggerBox (Plus), we have you covered in both cases as there are connectors for a fiber optic cable (FOC) input and BNC.

Waveform of the signal: length and level of the pulse

Next, the waveform of the signal needs to be checked. Here, we have to determine both length and level of the signal pulse. The length of the signal is important because it dictates the minimum sampling rate of the recording amplifier required to record the trigger. To reliably detect every trigger signal, the pulse needs to be longer than the time between two samples. Otherwise, it could happen that both onset and offset of the pulse are between samples, leaving the trigger undetected. To be on the safe side, it is recommended to have a minimum pulse width of 2x 1/sampling rate in seconds. For example, when sampling with 5000 Hz, the pulse needs to be at least 2x 1/5000, which means the pulse has to be at least 0.4 ms long to be detected under all circumstances.

Testing the volume trigger criteria

Now that we know about the minimum requirements, how can we make sure that the provided trigger pulse fulfills these? A first step can be to check the technical specifications of the MR device and/or any additional device that generates the triggers. As an alternative, or as a verification, we can run some quick tests by connecting the trigger cable to the TriggerBox (Plus), then connecting the TriggerBox (Plus) to the amplifier, and applying different Digital Port Settings in BrainVision Recorder. After every change, we record a short sequence of triggers in Recorder and look at the signals in BrainVision Analyzer where we are particularly interested in the exact sequence of recorded markers.

Note: We explicitly recommend looking at the recorded data in Analyzer, because in Recorder it is possible to miss triggers sent in rapid succession since they overlap visually.

Maximize the chance of seeing every state change

At first, we want to maximize the chance of seeing every state change possible and verify that the sampling rate of the amplifier is high enough for the length of the pulse. To get the most out of such a test by recording the onset and offset of the trigger pulse, we need to make sure that we do not accidentally miss a zero-trigger. Zero-triggers are triggers that are interpreted by Recorder as a zero, that is, they return to the lowest value possible. This can happen when the levels of all bits in a group return to low for the ‘High Active’ setting, or when all levels of a group return to high for the ‘Low Active’ setting. For the sake of testing, we want to avoid these zero-triggers, because they cause loss of valuable information for the verification test. For simplicity, let us keep the default ‘High Active’ setting or make sure to select it accordingly. To make sure we see both onset and offset of the trigger pulse, we have to take care that there is no situation in which all bits return to low.

Zero-triggers, ‘High Active’,  ‘Low Active’, and ‘Both Active’ Digital Port Settings in BrainVision Recorder:

In Recorder, ‘High Active’ setting only records a single bit’s state change from low to high, a return to low is ignored, unless the bit is grouped with other bits and the combined value is nonzero. Vice versa, in the ‘Low Active’ setting, only a single bit’s state change from high to low is recorded as ‘1’. Zero-triggers can happen when the combined interpreted value of the inputs is ‘0’. Note, if the ‘Low Active’ setting is used, values are inverted, therefore zero triggers would happen in case of a ‘1’ or in case of all bits in a group being ‘1’, e.g., ‘11111111’. Such zero-triggers are not shown in Recorder’s Monitoring View and are not recorded in the Marker file. Note that, for BrainAmp, the lower (Bits 0–7) and higher (Bits 8–15) can be set independently.

A safe way to avoid zero-triggers is to select ‘Both Active’ as an alternative. In this case, only one bit can be selected, it is automatically named “Toggle” and any state change from low to high results in a ‘T1_on’ and any change from high to low results in a ‘T1_off’. This means that no level changes will be missed. However, it leads to double triggers because a single pulse will always create both markers in the recording.
How to Assess Trigger Signal Properties and Adjust Settings Correctly in MR Experiments

This can be done by combining the single bit, to which the trigger cable from the MR device is connected to, with at least a second bit that is always high.

TriggerBox (Plus): Bits that are connected to the TriggerBox (Plus) from the outside are typically set to high by pull-up resistors. If you do not connect anything to the BNC inputs or the D-Sub 9 input In 8-15, these will be recognized as high levels. Remember to move the switch towards the BNC inputs when you want to use the lower 8 bits instead of the upper 8 bits, otherwise the levels are affected by whatever software is controlling the TriggerBox (Plus) via USB or the inputs of the parallel port at PC 0-7. Check the inputs of the TriggerBox Plus in Figure “TriggerBox Plus inputs and Bit stretcher”.

Recorder (Digital Port Settings): When using the BrainAmp system, we can simply leave the default settings at a group of 8x ‘Stimuli’ for the lower 8 bits and 8x ‘Response’ for the higher 8 bits. Ensure that the ‘High Active’ setting is kept for the higher 8-bit group. Connecting the trigger cable from the MR scanner to either the FOC or BNC connector of bit 15 and leaving the D-Sub 9 input (In 8-15) open makes sure that the marker generated in Recorder can only be either ‘R255’ or ‘R127’ because either all 8 bits are high (‘11111111’=255) or all bits except the highest bit are high (‘01111111’ = 127).  

Testing: For testing that every trigger arrives, we do not need to set up the whole EEG system. In an MRI environment it suffices to set up the amplifiers without the EEG cap in the scanner control room and connect the scanner interfaces.  Prepare an fMRI sequence with a given number of fMRI volumes and run a phantom scan. If everything goes as planned, the number of both the ‘R127’ and ‘R255’ markers should equal the number of sent fMRI volume triggers that are indicated by the fMRI sequence.

Zero triggers with 8-bit groups: Do not forget that you can still get zero triggers when combining a single bit that changes its value with 7 other bits that are constant, depending on the ‘High Active’ versus ‘Low Active’ setting:

‘High Active’: ‘10000000’ vs. ‘00000000’ = 128 vs. 0: You will get zero triggers when all constant bits are normally 0.

‘Low Active’: ‘11111111’ vs. ‘01111111’ = 0 vs. 128: You will get zero triggers when all constant bits are normally 1, because Recorder interprets low levels as 1 and high levels as 0 in this setting.

As an alternative, use the ‘Both Active’ setting to use only a single bit and switch between ‘T1_on’ and ‘T1_off’ markers.
TriggerBox Plus inputs and Bit stretcher. 1) Inputs for the trigger cable from the MR scanner: optical FOC on the left and electrical BNC on the right. 2) In 8-15 DSub-9 input for upper 8 bits. These 8 bits are set to high if nothing is connected. 3) Bit stretcher switches for bit 15 and bit 7. 4) Individual inputs for the lower 8 bits. For each bit, the user can decide whether to use the BNC input or the input from the PC (via USB or LPT).

Verify the length of the trigger signal

If we find out that there are fewer saved markers than sent triggers determined by the MRI sequence protocol, we know that we either have to (1) increase the sampling rate (which for EEG-fMRI recordings should already be set to the maximum sampling rate of the BrainAmp MR) or (2) stretch the length of the pulse. Fortunately, the TriggerBox (Plus) provides two mechanical switches (for bit 7 and bit 15) with this required function (see Figure “TriggerBox Plus inputs and Bit stretcher”). However, one has to be aware that the effect of the bit stretcher can be confusing: The bit stretcher pulls the default level of either bit 7 or bit 15 to low, no matter what the original input looks like. As soon as there is a state change of this level to high, the high level is maintained for approximately 5 ms and afterwards, the level is pulled back down to low. See Figure “Bit stretcher” for a visualization of this effect.

Bit stretcher: An activated bit stretcher always pulls the level of either bit 7 or bit 15 to low. Only at a level change from low to high, the bit stretcher period of ~5 ms is started. On the left, a high-level pulse starts this period at the onset of the trigger. On the right, with the example of a low-level pulse, the bit stretcher period is only started at the offset of the pulse.

This can have unwanted consequences, as it basically inverts the input level if the input was previously high. It also means that a state change at the input from high to low is ignored and only when the state changes back to high, the bit stretcher comes into effect and stretches the pulse long enough for the recording software to detect a trigger. This is just another reason why it is so important to be aware of the trigger signal and how to plan the use of ‘High Active’ versus ‘Low Active’ or ‘Both Active’, trigger groups, and the bit stretcher accordingly. That said, after increasing the sampling rate and/or activating the bit stretcher, the verification test should be repeated and only when we are satisfied with a 100 % detection rate of triggers, we can proceed and adjust the Digital Port Settings in Brain Vision Recorder to get exactly the kind of information we want.

Verify the level of the trigger signal

As mentioned before, the sequence of the high and low levels in the trigger pulse is an important factor as well, mainly because it is easy to miss the onset or offset if one of those state changes results in a zero-trigger. As explained before, by combining the input bit with other bits or by selecting ‘Both Active’, we can make sure to rule out zero-triggers. However, by making sure to record markers at every level change we invariably are causing double triggers, which are often not wanted because it is not immediately clear which one of the two resulting markers should be used for further analysis. In addition, a common recommendation is to use the marker ‘R128’, but as you will see in the examples at the end of this article, receiving this marker exactly at the expected point in time is not that straightforward. Before finalizing the settings in the recording setup accordingly (either to know which of the double-triggers to use or to ensure a single marker at the correct time), we need to know whether the level of the trigger input is always high and a state change to low encodes the event information, or if the level is always low, with the state change to high corresponding to the event onset. In some cases, it is even possible to link events to every state change. In this so-called toggle-mode, we need to make sure that each state change results in a marker that is saved with the EEG. This mode is also the main reason behind the ‘Both Active’ setting as it perfectly captures all level changes of the toggling input. In addition, the necessity of the bit stretcher can completely change the expected behaviour of the pulse, as already indicated before.

Detecting the trigger signal reliably is the most important aspect, but interpreting the signal correctly should not be disregarded. Misreading the trigger signal can have serious implications, such as confusing the input with other triggers or introducing a difficult-to-measure latency that has direct implications on future signal processing and data analysis.

In the next step, we should find out if the level of the trigger input is usually high or low, or if it toggles between high and low. There are two ways to verify this directly with Brain Products equipment:

  • In the Digital Port Settings: For this, we should connect the trigger input to the chosen bit, disable the bit stretcher, and start a sequence of triggers by running a phantom fMRI scan. In the Digital Port Settings’ Current State, the level of the input is represented as a red or black bullet, for high or low, respectively. Because a short pulse will most likely be missed by the naked eye or even be too short to be displayed in the GUI at all, we need to look at the idle level, i.e., the level of the input that is shown when there is no trigger being sent. If the level is always on high, we can assume that the trigger pulse goes from high to low and back to high. If the level is always low, we can assume the trigger pulse goes from low to high and back to low. If the levels are indeed alternating between high and low, we can assume that we are dealing with a toggle situation.
  • If we record the test setup like before, we can infer the waveform by looking at the sequence of triggers over time in the marker file, assuming we are using the upper 8 bits grouped under ‘Response’ and select the ‘High Active’ setting. Attention: the two triggers ‘R255’ and ‘R127’ can appear very close together which means they overlap in the Monitoring view. It is important to look at recorded data in Analyzer to make sure to really see all the recorded markers.
How to Assess Trigger Signal Properties and Adjust Settings Correctly in MR ExperimentsHere, we have a short pulse that is usually started from a low level. The input sets the level to low, and a short high pulse indicates the start and end of the trigger pulse.
How to Assess Trigger Signal Properties and Adjust Settings Correctly in MR ExperimentsIf we select only a single bit and call its type ‘Trigger’ (or any other word that starts with a ‘T’), we will only see a ‘T  1’ that would appear at the position of ‘R255’.
How to Assess Trigger Signal Properties and Adjust Settings Correctly in MR ExperimentsHere, we have a short pulse that is usually started from a high level. The input sets—or rather leaves—the input at high, and a short low pulse indicates the start and end of the trigger pulse.
How to Assess Trigger Signal Properties and Adjust Settings Correctly in MR ExperimentsIf we select only a single bit and call its type ‘Trigger’, we will only see a ‘T  1’ that would appear at the position of ‘R255’. In this case, this means the onset of the fMRI volume trigger is missed, as it would be interpreted as a zero-trigger. Instead, we record only the offset of the fMRI volume trigger.
How to Assess Trigger Signal Properties and Adjust Settings Correctly in MR ExperimentsIf the input toggles, there are no pulses but the level alternates between high and low.
How to Assess Trigger Signal Properties and Adjust Settings Correctly in MR ExperimentsHow to Assess Trigger Signal Properties and Adjust Settings Correctly in MR ExperimentsIf we select only a single bit and call its type ‘Trigger’, we will only see a ‘T  1’ that would appear at the position of ‘R255’. In this case, only half of the intended fMRI volume triggers would be recorded as markers.

Please see additional examples for different inputs and Digital Port Settings at the end of this article.

When to change ‘High Active’, ‘Low Active’, and ‘Both Active’

The correct setting for ‘High Active’ or ‘Low Active’ is most important when we want to use only a single bit for encoding the marker for every detected trigger, or when we want to avoid double triggers. Remember, in Recorder, zero-triggers are not visible, so of the single-bit code that can be either ‘0’ or ‘1’, only the ‘1’ is recorded. The ‘High Active’ setting only records each state change to high, a return to low is ignored. Vice versa, in the ‘Low Active’ setting, only a state change to low is recorded as ‘1’. ‘Both Active’ is special as it always creates double triggers but makes it impossible to miss triggers. Here, a high level is always encoded as ‘T1_on’ and a low level always as ‘T1_off’.

When we know the waveform, we can adjust the setting accordingly. However, it is not that simple. There is a problem when the original waveform would require the ‘Low Active’ setting, but it is so short that it also requires the use of the bit stretcher. But what does that mean exactly:

Let us assume we have an optical trigger signal and connect it via the FOC input at bit 15. Optical signals are often very short and, therefore, we have to activate the bit stretcher. This immediately changes the usually high input to low. Now, when the optical pulse arrives, the onset of the pulse that normally pulls the input to low has no effect because the level is already at low due to the bit stretcher. Only at the end when the input returns to high, the bit stretcher comes into effect and pulls the input back to low after approximately 5 ms. For a visualization in a timeline, please look at Figure “Timeline of an optical trigger”.

Timeline of an optical trigger (indicated by the yellow color) that needs stretching with ‘Low Active’ setting and a single bit type called ‘Trigger’. The red line represents the level of the FOC input. The black line represents the level that is sent to the amplifier. The input gets drawn to low as soon as the light is detected but has no effect since the bit stretcher already pulls the input to low. Only the end of the light activates the bit stretcher pulse which lasts approximately 5 ms. Worse, the onset of the bit stretcher is invisible due to value ‘1’ being interpreted as a zero-trigger by the ‘Low Active’ setting. The marker ‘T  1’ is only written when the bit stretcher pulse is over and, therefore, delayed by the pulse length of the trigger and the 5 ms bit stretcher interval.

In this case, there are three things you can do:

  1. Add more bits to the group so that the end of the trigger pulse/onset of the bit stretcher pulse does not result in a zero-trigger. This may not be that trivial because when using the upper 8 bits of the TriggerBox (Plus), all of the inputs are high per default. That said, if at least one of the bits can be pulled to low (e.g., by a custom cable), the zero-trigger can be avoided and the 5-ms delay could be made visible by adding an additional marker.
  2. Change the setting to ‘High Active’. Although this is counter-intuitive, when the bit stretcher is in play, this may be the best-case scenario. Because the bit stretcher pulls the input to low, the marker is only delayed by the length of the pulse trigger, and as we already clarified, its length should be negligible anyway. Just do not forget to change the setting again if the bit stretcher is not in use.
  3. Use the ‘Both Active’ setting, resulting in a quick ‘T1_on’ > ‘T1_off’ double trigger sequence.

Conclusion

We have provided a detailed explanation on how to identify the type of fMRI volume trigger for your scanner and set up the correct trigger settings in Recorder using the TriggerBox (Plus). To summarize, if you are experiencing issues receiving the correct number of fMRI volume triggers, we recommend:

  1. If no fMRI volume triggers are present, most likely the incoming pulse is too short and requires the bit stretcher.
  2. Keep in mind that when using the bit stretcher, a normally high level at the input gets pulled down to low. This may require updating your Digital Port Settings in Recorder.
  3. If the number of recorded fMRI volume triggers are less than the number of fMRI volumes defined by the sequence protocol, your Digital Port Settings may be incorrect resulting in zero-triggers that are not recorded. In this case, using the ‘Both Active’ setting may be a good alternative.
  4. If more than one fMRI volume trigger gets recorded for every fMRI volume acquired, then the Digital Port Settings need to be adjusted by changing the ‘High Active’ versus ‘Low Active’ status for the 8-bit groups, by changing the combination with other bits in the group, by manually adjusting the input levels of the grouped bits, or by selecting the correct markers in the data analysis part.
  5. If it is still uncertain which type of trigger you have, we recommend recording some trigger data while keeping track of the different digital port settings and trigger configurations that were tested and reaching out to our technical support team.
Check out our other articles and resources regarding triggers and MR:
-> Differences between TriggerBox and TriggerBox Plus
-> How to design trigger codes to obtain accurate markers
-> Communication with the trigger port: A beginner’s guide
-> Setting up BrainVision Recorder for simultaneous EEG-fMRI
-> Simultaneous EEG and BOLD fMRI: Best setup practice in a nutshell 

Appendix: Visualization of frequent trigger input signals and corresponding Digital Port Settings

Table of Contents
Go to Top