Offline analysis of sensor data in BrainVision Analyzer 2
by Dipl.-Psych. Michael Hoppstädter and Dr.-Ing. Kidist Mideksa
Scientific Consultants (Brain Products)
BrainVision Analyzer 2 was originally designed to process EEG data and analyze ERPs. However, the data from sensors measuring peripheral physiological signals resembles EEG in many aspects. Therefore, Analyzer 2 can also be used for such signals. Please note that Analyzer 2 often has no specific transformation to handle signals from a sensor but there are some useful utilities that can be arranged into a processing pipeline. Importantly, there are also external tools available that support special analyses for specific sensor signals. We will mention such tools if their functionality is not covered by Analyzer 2 and if we offer a compatible export option.
In the following respective topics, we will give you some information about what you could do with your sensor signals in Analyzer 2. Please note that the pipelines described are not meant to represent any standard processing guidelines.
Almost all referenced Analyzer 2 functions can be found in the ribbon menu under Transformations or Export. The path to each function is mentioned in brackets to facilitate orientation in the ribbon menu. You can find more information about each transformation or export utility in the respective Analyzer 2 User Manual topics. The manual can be accessed in Analyzer 2 via Help > User Manual.
Additional functions, the solutions, are mentioned as well in this guide. Solutions are not part of the Analyzer 2 installation and need to be installed separately. We offer a defined package of solutions (individual or all-in-one installer) as free download from our website. After installation, you can find those solutions under the path specified in brackets. After installation, you can find some documentation for each solution in Analyzer 2 under Solutions > Solutions Help.
Please note that this guide is always based on the most current version of BrainVision Analyzer 2.
Overview
1D and 3D Acceleration Sensor
The data output of the acceleration sensor delivers one channel for each movement dimension. This means that you will get a single channel for the one-dimensional acceleration sensor and three output channels for the three-dimensional sensor. Therefore, in the latter case there will be separate channels for the x, y and z directions.
A typical goal of analyzing the acceleration signal would be to identify the onset of a movement. This could be done by detecting the time point at which an acceleration in the direction of movement is initiated.
There is no transformation or solution available in Analyzer that would specifically deal with acceleration signals. However, Level Trigger (Transformations > Dataset Preprocessing > Level Trigger) can be used to identify amplitude thresholds which would indicate a movement in a certain direction. The markers set by Level Trigger can then be a reference for subsequent segmentation. If the signal is segmented, the solution MinMax Markers (Solutions > Markers > MinMax Markers) can be used to search and mark the minimum and/or maximum based on amplitude, first or second derivative of the acceleration signal within a user-defined time-interval.
However, if your goal is not to use the acceleration signal to find movement onsets but rather to exclude time intervals with movement, you could flag portions of data where the acceleration signal exceeds a certain threshold, i.e. where a too large movement into a certain direction has occurred. Data can be marked as Bad Intervals by applying Raw Data Inspection (on continuous data; Transformations > Artifact Rejection/Reduction > Raw Data Inspection) or Artifact Rejection (on segmented data; Transformations > Artifact Rejection/Reduction > Artifact Rejection). The “Amplitude” criterion is best suited to check for threshold violations.
ECG (Electrocardiography/Electrocardiogram)
Extracting features of the ECG and computing the most commonly used data measures for ECG analysis can be easily achieved within BrainVision Analyzer 2.
Detecting the ECG profile
You can easily detect the five standard ECG components (P,Q,R,S,T) using the solution EKG Markers (Solutions > EKG > EKG Markers). Prior to applying the solution make sure that the ECG signal is as clean as possible from high-frequency noise as this will interfere with the gradient profile of the peaks, making it difficult to detect the R-peak. Alternatively, you can also detect the R-Peaks in your ECG signal with the help of the transformation CB Correction (Transformations > Special Signal Processing > CB Correction) using the option “Use Peak Detection” along with the option “Write Only Markers”. This will enable you to detect the R-peak using template matching. It is recommended to use the “Semiautomatic Mode” to enable you to accept and/or reject peaks for e.g. those resembling the R-Peak depending on the chosen pulse template.
Exporting the detected peaks
The solution Write Markers (Solutions > Markers > Write Markers) enables you to export the peak amplitudes along with positions (either in milliseconds or in data points).
Obtaining ongoing heart rate information
You can make use of the solution Heart Rate Channel (Solutions > EKG > Heart Rate Channel). The solution will use the detected “R” markers and generate a new dataset with an additional channel, labeled “IBI”, containing the heart rate information in bpm (i.e., the temporal structure of two consecutive R-waves). The numerical values from this newly created channel can be exported using the Generic Data Export module (Export > Node Export > Generic Data) for further processing (for e.g., calculation of mean and standard deviation). In case you want to compute and export the average of the heart rate information in one go, you can apply the solution Heart Rate Export (Solutions > Export > Heart Rate Export).
Computing the peak-to-peak interval between two consecutive peaks
The solution IBI Export (Solutions > Export > IBI Export) computes and exports the inter-beat-interval in milliseconds (i.e. R-R time interval) to a text file which will be stored under the “Export” folder of your current workspace. The exported beat-to-beat interval values can be used for further heart rate variability analysis. Thus, if it is of interest to have access to a broader range of measures for ECG signal analyses, we do recommend making use of an external software like Kubios HRV. This tool is especially designed for heart rate variability analysis and reads the IBI Export output.
The solution Marker Timing (Solutions > Views > Marker Timing) plots the value of the beat-to-beat marker distance as an amplitude value along time, indirectly indicating the heart rate variability.
EMG (Electromyography/Electromyogram)
The most common EMG signal analysis techniques can be easily applied using BrainVision Analyzer 2.
Removing movement and other artifacts by applying a filter
This can be done with the help of the transformation IIR Filters (Transformations > Artifact Rejection/Reduction > Data Filtering > IIR Filters). Filter parameters can be set according to the specific purpose of the study.
Applying a full-wave rectification to the EMG signal
Use the transformation Rectify (Transformations > Dataset Preprocessing > Data Preprocessing > Rectify) to derive the absolute value of the signal and thereby transform the raw EMG signal to positive polarity.
Power density spectrum of the EMG signal
You can apply frequency analysis by means of fast Fourier analysis with the FFT transformation (Transformations > Frequency and Component Analysis > FFT).
Calculating the envelope of the EMG signal
The Moving Average solution (Solutions > Transforms > Moving Average) will smooth the signal using a moving average filter acting like a low-pass filter. The solution gives you the possibility to rectify your EMG signal prior to smoothing.
Detecting the onset of muscle contraction activity
We offer a dedicated solution called EMG Onset Search (Solutions > EMG > EMG Onset Search) that allows one to detect the EMG onset. Note that the solution works only on segmented data, i.e., segments based on marker positions or equal sized segments.
Detecting the EMG peak
You can use the solution MinMax Markers (Solutions > Markers > MinMax Markers) to search the maximum based on amplitude, first or second derivative of the EMG signal within a user-defined time-interval. The detected peaks can be inspected and modified if necessary with the Edit Markers transformation (Transformations > Data Preprocessing > Edit Markers). Use the solution Peak Export (Solutions > Export > Peak Export) to export peak information.
An overview of an application of EMG signal analysis based on startle can be found in the Reference section of this article [1].
EOG (Electrooculography/Electrooculogram)
EOG is usually recorded as auxiliary data to facilitate processing of the scalp EEG data rather than being the focus of data processing. Therefore, the main use case for EOG data is to support ocular artifact correction.
Slow drifts and high-amplitude artifacts from movements can confound the EOG signals and conflict with subsequent use of the channels. Drifts can be eliminated with IIR Filters (Transformations > Artifact Rejection/Reduction > Data Filtering > IIR Filters) using a high-pass filter while other noise can be marked as Bad Intervals with Raw Data Inspection (on continuous data; Transformations > Artifact Rejection/Reduction > Raw Data Inspection) or Artifact Rejection (on segmented data; Transformations > Artifact Rejection/Reduction > Artifact Rejection). Please make sure that the ocular artifacts that you want to correct are not marked as “bad”.
In BrainVision Analyzer 2, EOG channels can be used in Ocular Correction (Transformations > Artifact Rejection/Reduction > Ocular Correction) and Ocular Correction ICA (Transformations > Artifact Rejection/Reduction > Ocular Correction ICA) transformations. Both vertical and/or horizontal EOG can be selected. Blinks, however, can only be derived from vertical EOG.
It is recommended to use dedicated EOG channels with Ocular Correction while Ocular Correction ICA usually delivers good results when scalp channels showing the EOG artifacts are used instead of EOG channels.
You can find further detailed information about the use of EOG signals to remove ocular artifacts in our support tip on Ocular Correction ICA.
GSR (Galvanic Skin Response)
There is no dedicated module in Analyzer 2 to analyze GSR data. However, isolation of phasic and tonic activity can be achieved with the help of filtering using the transformation IIR Filters (Transformations > Artifact Rejection/Reduction > Data Filtering > IIR Filters). Generally, high-pass filtering will remove the slow drifting tonic component resulting in the phasic response, whereas, low-pass filtering will result in the tonic response.
Moreover, if you are interested in detecting peak or trough-to-peak amplitudes at a single trial analysis level, it can be achieved with the solution MinMax Markers (Solutions > Markers > MinMax Markers). It searches and marks the minimum and/or maximum based on amplitude, first or second derivative of the GSR signal within a user-defined time-interval. The detected peaks can be inspected and modified if necessary with the Edit Markers transformation (Transformations > Dataset Preprocessing > Edit Markers). Use the solution Peak Export (Solutions > Export > Peak Export) to export peak information.
For a complete analysis of electrodermal activity we recommend exporting the data and making use of a dedicated software package like Ledalab. This is a Matlab-based software used for the analysis of skin conductance data. It performs event-related analysis relative to markers and returns various parameters of phasic and tonic activity like integral measures and trough-to-peak analysis.
To facilitate the export procedure, we offer a dedicated solution called Create MAT File (Solutions > Matlab > Create MAT File) to export the data and import it in Ledalab (e.g., V3.4.9) via the import option File > Import Data > Vision Analyzer (Matlab Export). Alternatively, you can make use of the solution Ledalab Export (Solutions > Export > Ledalab Export) which exports the data in a format compatible to older and newer versions of the Ledalab software. The solution exports your data into a text file (*.txt) which you can then import in Ledalab (e.g., V3.4.9) via the import option File > Import Data > Time SC (Marker). For a comprehensive overview of GSR data analysis we recommend referring to the guidelines found in the publication recommendations for electrodermal measurements [2].
PPG (Blood pulse sensor for photoplethysmography)
The PPG signal shows periodic peaks corresponding to the blood pulse waves arriving at the fingertip. The signal therefore has similar characteristics to the ECG signal.
The method of choice in BrainVision Analyzer 2 to identify markers of cardiac function is the pulse detection included in CB Correction (Transformations > Special Signal Processing > CB Correction). This transformation is designed to be applied to an ECG channel and detect the R-peak of the QRS complex. However, as characteristics of PPG and ECG signals are comparable, the detection can be used for pulse waves in the PPG signal as well.
The CB Correction should be used with the options “Use Peak Detection” and “Semiautomatic Mode”. As there is no need to apply a correction, the option “Write Only Markers” must be enabled. A prototypical pulse wave should be selected as template. It might be necessary to fit the pulse rate, correlation and amplitude triggers to the individual dataset to achieve a robust detection of the pulse wave peaks. However, semiautomatic mode allows one to start from a certain parameter set (like the default values) and to recalculate the detection on the fly if parameters need to be adapted.
Similar to ECG signals, you can also apply solutions to the PPG channel, for example, Marker Timing (Solutions > Views > Marker Timing) to check for the intervals between pulses. The resulting values can be exported with Generic Data Export (Export > Node Export > Generic Data). It is also possible to use the IBI Export (Solutions > Export > IBI Export) solution to export the inter-pulse intervals of the PPG signal to a text file.
If both ECG and PPG were measured and peaks have been determined in both signals, the so-called Pulse Transit Time can be approximated by measuring the distance between the R-peak markers and the PPG pulse wave markers. This can be done conveniently with the solution Write Markers (Solutions > Markers > Write Markers).
Alternatively, you may want to externally process the PPG signal. For this purpose, you could export the list of pulse wave markers as text or XML file via Markers Export (Export > Node Export > Markers). An overview of continuous blood pressure measurements as with PPG can be found in [3].
Respiration Sensor
Respiration signals are characterized by a slow oscillation that varies in a physiological range between 8 breaths / min (0.13 Hz, adult) and 40 breaths / min (0.67 Hz, baby).
The respiration signal might be confounded by slow drifts as well as by fast, non-respiratory components like heart synchronous pulsation of the aorta. Both can be removed by using IIR Filters (Transformations > Artifact Rejection/Reduction > Data Filtering > IIR Filters) with a combination of low and high cutoff frequencies that preserve the physiological respiration range.
There is no dedicated transformation in BrainVision Analyzer 2 to process respiration belt data. However, single breaths can be identified with Level Trigger (Transformations > Dataset Preprocessing >Level Trigger). It is possible to mark inhalation and/or exhalation peaks using an amplitude threshold.
The breath duration can be analyzed with the solution Marker Timing (Solutions > Views > Marker Timing) that monitors variations in the inter-peak intervals over the duration of the measurement.
You can export the inter-peak intervals if you apply Generic Data Export (Export > Node Export > Generic Data) to the output of Marker Timing.
Alternatively, you may want to externally process the respiration signal. You could therefore export the list of peak markers as text or XML file via Markers Export (Export > Node Export > Markers).
If you have any further questions regarding processing of sensor data in Analyzer 2, please do not hesitate to get in touch.
References
[1] T. D. Blumenthal, B. N. Cuthbert, D. L. Filion, S. Hackley, O. V. Lipp, and A. van Boxtel,
“Committee report: Guidelines for human startle eyeblink electromyographic studies”,
Psychophysiology, vol. 42, pp. 1-15, Jan 2005.[2] W. Boucsein, D. C. Fowles, S. Grimnes, G. Ben-Shakhar, W. T. roth, M. E. Dawson, et al.,
“Publication recommendations for electrodermal measurements”,
Psychophysiology, vol. 49, pp. 1017-34, Aug 2012.[3] Peter, L., Noury, N., & Cerny, M. (2014).
A review of methods for non-invasive and continuous blood pressure monitoring: Pulse transit time method is promising?
Irbm, 35(5), 271-282.