Human information processing is a multilayered process involving the concurrent and coherent activation of both the central and peripheral nervous systems, particularly in cases in which mental effort, stress, or emotion are involved (Cacioppo, Tassinary, & Berntson, 2007). Emotions play a key role in theories of personality, decision making, and psychopathology (Kring & Bachorowski, 1999; Moors, Ellsworth, Scherer, & Frijda, 2013; Schwarz, 2000) and have strong peripheral bodily signatures (Kreibig, 2010). Similarly, stress is known to be accompanied by broadband peripheral psychophysiological changes (Thayer, Åhs, Fredrikson, Sollers, & Wager, 2012). Affective neuroscience has made tremendous strides in delineating the central regulatory circuits supporting such functions, backed by substantial development in biosignal processing software for electroencephalography (EEG) and functional magnetic resonance imaging (fMRI) analysis. More work is needed, however, in the field of peripheral nervous system activity, where biosignal processing faces similar demands due to the heterogeneity of the innervated physiological systems and organs and their idiosyncratic waveforms.

The peripheral nervous system entails the autonomic nervous system (ANS), itself divided into parasympathetic (PNS) and sympathetic (SNS) branches. The ANS is responsible for several key functions in the expression of emotions, and thus is associated with healthy and pathological forms of affective functioning, motivational states, and decision making. Among the multitude of psychological functions, fear and anxiety have probably been studied most intensely, recruiting distinct ANS systems such as the cardiovascular and electrodermal systems (Schweighofer et al., 2015), and in addition the muscular and respiratory systems, to support an adaptive and effective response to (anticipated) threat (e.g., Wilhelm & Roth, 1998). Since these responses typically function automatically and below individual awareness, the research field of psychophysiology has developed an impressive array of well-validated measures to characterize the activity in peripheral physiological systems.

Two of the most frequently measured biosignals are electrodermal activity (EDA) and the electrocardiogram (ECG; Kreibig, 2010). These two raw signals (termed channels in the following text) are easily acquired with appropriate amplifiers and sensors. The extraction of several well-validated measures, such as skin conductance responses (SCRs) and heart rate (HR) responses, are readily accomplished with widely available software. However, their interpretation is not as straightforward as it may seem. Three main problems arise. First, there are problems of specificity (Cacioppo & Tassinary, 1990; Hinz, Seibt, Hueber, & Schreinicke, 2000; Janig & Habler, 2000): SCRs, for example, index sympathetic arousal, but elevated SCRs are elicited by both positive and negative stimuli (e.g., emotional images: Bradley, Cuthbert, & Lang, 1999; Lang, Greenwald, Bradley, & Hamm, 1993). Thus, SCRs alone do not discriminate well between negative and positive emotions, and observing elevated SCRs in a certain task or psychopathology would not indicate whether appetitive or defensive systems are altered, but only index elevated arousal. Similarly, such nonspecific arousal responses are often observed for HR. The second problem for the interpretation of psychophysiological signals arises from the dual innervation of most autonomic organ systems: The heart, for example is innervated by both the SNS and the PNS, so an HR increase could be the result of sympathetic activation or parasympathetic withdrawal. Furthermore, the SNS and PNS do not always operate in reciprocal modes in their chronotropic or isotropic cardiac control, but several other coupling modes have been observed (Berntson, Cacioppo, & Quigley, 1991, 1993). Thus, elevated HR responses may not easily be attributed to a specific branch of the ANS without further, more specific measures. A third problem for interpretation arises from the complex interactions between measures: Not only do certain signals cause artifacts in another channel (such as movement artifacts in the ECG), but some measures systematically influence or even distort other measures (such as the influence of breathing on HR variability; see, e.g., Grossman & Kollai, 1993; Hirsch & Bishop, 1981).

To solve these three groups of problems, contemporary peripheral psychophysiology often adopts a multichannel/multimeasure approach. To address the lack of specificity of measures such as HR and SCR, measures from several channels are aggregated. The field of affective computing, for example, uses multivariate pattern recognition analyses on such multimeasure data to discriminate between several discrete emotional states with good accuracy (e.g., Kolodyazhniy, Kreibig, Gross, Roth, & Wilhelm, 2011). Similarly, groups of patients with different anxiety disorder diagnoses are better separable via several psychophysiological measures than via a single measure. For example, Blechert et al. (2007) discriminated patients with posttraumatic stress disorder from patients with panic disorder and controls with 70.4 % accuracy through a combination of six autonomic measures obtained during a quiet-sitting baseline in the laboratory. Ninety-seven percent of flight phobics were correctly distinguished from healthy controls through a combination of five physiological measures obtained ambulatorily during flying (Wilhelm & Roth, 1998). To address the second problem, of dual innervation, measures such as HR are complemented by measures that map on the SNS and the PNS more specifically, such as respiratory sinus arrhythmia (RSA) for PNS activity, and cardiac preejection period (PEP) for SNS activity. Table 1 lists a selection of validated measures from different peripheral physiological systems that are frequently used in psychophysiology, and it shows their availability in Open ANSLAB versus ANSLAB Professional. The third problem, of interaction between measures, calls for specific control procedures and computational methods. For example, respiratory influences on RSA can be accounted for by paced breathing calibrations in addition to specific computational corrections using cross-spectral analysis.

Table 1 Selection of frequently used psychophysiological measures from the electrodermal and cardiovascular autonomic, respiratory, and muscular systems, and their availability in Open ANSLAB versus ANSLAB Professional

Importantly, the multichannel/multimeasure approach of contemporary peripheral psychophysiology requires integrated and powerful analysis tools. Recent years have seen rapid developments in commercial and freely available, and often open source, programs (for open source options, see, e.g., the software repository of the Society of Psychophysiological Research www.sprweb.org/repository/). Unfortunately, most of these programs are specialized for one or a few physiological channels, with only partial coverage of the range of measures that could be extracted. To our knowledge, no software currently supports the integrated and comprehensive assessment of measures from electrodermal, cardiovascular, respiratory, and muscular systems. Furthermore, psychophysiological research is characterized by a steady development of new experimental tasks, methods, and measures. Thus, research-oriented software should provide enough flexibility to adapt to many different settings and allow researchers to tailor the software to their needs. Finally, a multichannel/multimeasure approach generates large raw-data sets, which need to be artifact-scored and postprocessed. Thus, a comprehensive software solution should be optimized to enhance productivity and effectiveness, while at the same time ensuring high accuracy and user control.

In the following sections, we describe some of the functions of the software suite ANSLAB and show how it addresses key research issues in contemporary psychophysiology. In the following section, we start with a general program description of the free and professional versions of the software and provide some examples of ECG artifact editing and analysis accomplished with ANSLAB. We also highlight how this software accommodates the requirements of a dynamic research field through program flexibility and productivity. In the Advanced ANSLAB Analyses section, we describe the computational methods of the cardiovascular and respiratory modules in more detail and show how ANSLAB users can carry out more advanced analyses, such as disentangling respiratory from parasympathetic influences on RSA and computing cross-spectral measures of HR variability.

Methods and results

Section 1: General ANSLAB program description and analysis approach

Open ANSLAB versus ANSLAB Professional

ANSLAB is a MATLAB (MathWorks, Inc., Natick, MA, USA) based software suite that was developed in the context of research on emotions, particularly anxiety and its disorders. Through more than 20 years of development, it has grown and incorporated modules that allow its flexible application to a wide range of research problems, some of which we discuss below. Open ANSLAB currently consists of 12 analysis modules, called through a graphical user interface (GUI). User dialogs are mainly implemented through the MATLAB command window (Fig. 1). ANSLAB Professional was introduced in 2004 and currently consists of 20 analysis modules (the availability of functionality in Open ANSLAB vs. ANSLAB Professional is indicated in Table 1). It uses a customizable GUI that controls all program modules and makes command line operation obsolete (Fig. 2). The operation of ANSLAB is supported by a comprehensive set of online help files and training videos (Professional version) that describe the basics of signal analysis with ANSLAB and program handling. Open ANSLAB is listed in the software repository of the Society for Psychophysiological Research (www.sprweb.org/repository) and can be downloaded and updated from a separate website (www.anslab.net), where ANSLAB Professional files are also located. ANSLAB Professional is kept current via an automatic update module. Although Open ANSLAB is open source and therefore is completely free of charge, a one-time licensing fee is charged for ANSLAB Professional, which entitles the licensee to use the software on an unlimited number of computers within a lab or working group. License fees are used to provide support to users and to update, maintain, and further develop ANSLAB Professional. To run ANSLAB, at least MATLAB 7.8 is needed (i.e., R2009a); the software might also run well with earlier versions of MATLAB, but these are untested.

Fig. 1
figure 1

Open ANSLAB graphical user interface (panel a) and command line user interaction during editing of interbeat intervals extracted from the electrocardiogram (panel b)

Fig. 2
figure 2

ANSLAB Professional graphical user interface, comprising a data viewer (top window) and a control window with several subsections for settings, user dialog, navigation, editing, display control, dynamically changing sections, and exit routines (bottom window). See the text for details

The multichannel/multimeasure approach in ANSLAB

As we indicated above, psychophysiological assessment often cannot be confined to a single channel, due to low specificity and/or the unclear autonomic pathways involved. Likewise, a focus on only a few channels overlooks multichannel interactions and sources of artifacts. In contrast to combining several software packages to analyze different channels in a given research study, an integrated software package is advantageous with regard to consistency, efficacy, data integrity, and usability. ANSLAB reads a particularly broad range of physiological channels and from them computes a large number of validated psychophysiological variables. In addition to the popular cardiovascular, electrodermal, and muscular measures, ANSLAB also covers the respiratory system in detail and contains several specialized analysis modules.

Both versions of ANSLAB require a specific file-naming system and a study folder with a standard structure for the storage of raw data and preprocessed (“reduced”) time series. This allows multiple channels to be processed by means of the same methods and user interaction routines (such as similar artifact rejection routines for all channels) in one computational pipeline. Through a consistent file-naming system and the fixed folder structure, reduced data from one channel (e.g., ECG analysis) can be automatically called to support the subsequent analysis of another channel, such as pulse wave or HR variability analysis. Such integrated data storage and management also facilitates automated analyses, as is detailed below.

Multichannel integration: Artifacts

As we indicated above, many peripheral channels interact in one or several ways. A first and obvious interaction is represented by artifacts that originate from one physiological system (e.g., muscular activity, respiration) and that contaminate the integrity of a channel from another system (e.g., ECG, EDA). These artifacts need to be screened for and excluded in a manual, semiautomatic, or automatic fashion. For this purpose, the information from several channels (e.g., accelerometry for the assessment of movement) needs to be visualized in parallel or taken into account during analysis.

ANSLAB supports several levels of artifact detection, correction, and rejection. In ECG editing, for example, where artifacts are particularly critical if HR variability computation is aimed for (Berntson & Stowell, 1998), automatic preprocessing suggests R-wave detection settings and displays these for a representative section of the ECG signal to be analyzed (see the top panel of Fig. 2). These settings would suggest rejecting unusual or out-of-range values such as interbeat intervals (IBIs) of <375 ms in typical human data; this is the minimal distance between successive R-spikes indicated by the green horizontal line in Fig. 2. The blue box indicates a minimal rise time (to 0.53 mV within 38 ms) required for valid R-wave detection. The user inspects these settings and either accepts or adjusts them, or optimizes the signal by applying one or several signal transformation options (i.e., high- or low-pass filtering, first derivative, and signal inversion). In a subsequent step, IBI time series (termed “reduced data” in the following discussion) are computed and displayed for the whole file. Additional channels can be viewed time-locked to the analyzed channels in order to infer possible sources of artifacts (such as the accelerometry or respiration channel). The reduced data can again be checked for outliers, and these can be edited quickly by insertion, deletion, or interpolation by means of “exclusion boxes” (see Fig. 3). The user can switch back to the raw ECG values to see possible sources of R-wave misidentification. After editing, instantaneous IBI series are saved at 4-Hz resolution (achieved through weighted-average interpolation; Cheung & Porges, 1977) into a specific result folder for later export of the mean values or import into dependent analyses such as HR variability or pulse wave analyses (see below). Artifact editing for all other channels largely follows this procedure.

Fig. 3
figure 3

Artifact rejection for interbeat intervals using an exclusion box. Points above or below the box are deleted and linearly interpolated. Experimental epochs of interest are overlaid on the signal to allow constraining editing to important data segments

Multichannel integration: Interdependency of channels

Some channels cannot be analyzed without time-locked input from another channel. For example, pulse wave transit time (the time that the pulse wave needs to travel from the left cardiac ventricle to the peripheral vasculature, often measured by plethysmography sensors at the finger or ear) indexes peripheral vasoconstriction/vasodilatation, a well-validated sympathetic indicator (e.g., Szabo, 1993). Its calculation requires the time of the R-wave as input, which is then subtracted from the time of the maximum of the pulse wave (or the point of the steepest upstroke in noisy pulse wave data, to increase accuracy). Likewise, impedance cardiography, allowing assessments of cardiac blood volume shifts across the cardiac cycle and cardiac muscle contractility, requires timing information from the ECG. Similarly, T-wave amplitude, inversely related to sympathetic cardiac activity (Kline, Ginsburg, & Johnston, 1998), requires knowledge of the R-wave time stamps. Respiration is known to influence HR variability (Grossman & Taylor, 2007), an issue that inspired specific analyses in ANSLAB that we describe below. In summary, the integrated file management system and analysis pipelines of ANSLAB allow for straightforward analyses of a variety of psychophysiological channels that require input from other channels.

Flexibility

The research field of peripheral psychophysiology is characterized by a dynamic development of novel experimental tasks to study psychological processes and the development of new psychophysiological measures in an attempt to better tap into these processes. This requires software with a high degree of flexibility and many ways of customizing the analyses. For example, high flexibility is required with respect to the temporal segmentation of data streams. Classical baseline—emotion provocation/stress—recovery paradigms are increasingly complemented by event-related designs featuring repeated presentation of stimuli (trials) and requiring averaging of the responses using different segmentation approaches. Experimental time stamps for stimulus onsets or the beginning of experimental phases are stored in specific timing files in ANSLAB. These are typically obtained from digital or analog markers provided in the data file, but they can also be sourced from external experimental records. These timing files can be preprocessed and separated from the raw values to allow their modification according to the users’ needs. Timing files can also be visually overlaid over raw data during artifact editing to constrain editing to the crucial experimental segments. Most importantly, timing files provide the basis for result value extraction (e.g., HR means during the last minute of a 5-min baseline). ANSLAB Professional includes several timing file detection and modification tools that aid the subdivision/modification of timing information in an automatized (batched) fashion across files/participants. For example, the mean values for an experiment involving a 5-min baseline and a 5-min stress phase can be extracted in 1-min subsegments based on modified timing files. A separate set of timing files is typically used for HR variability or other variability analyses that require a specific segment length to be reliable. Timing files also provide the basis for ensemble averaging across trials, which is a common approach to event-related designs, similar to signal averaging in event-related EEG potential studies (e.g., Luck, 2014).

ANSLAB further supports analysis flexibility through its program options: Most raw signal filtering procedures during preprocessing, sample rates, and feature detection settings are customizable through the module-specific option menus in ANSLAB Professional. In Open ANSLAB, this is achieved in the commented analysis program headers, where most analysis parameters and signal detection thresholds can be changed. Study-specific program options are saved in the study folder, ensuring that the same settings are applied irrespective of which computer, program version, or user analyzes the data. In addition, since all analysis modules in Open ANSLAB and ANSLAB Professional are in noncompiled MATLAB program code, they can be modified relatively easily for specialized signal analysis problems.

ANSLAB Professional further supports flexibility with regard to data formats. With the growing number of suppliers of amplifiers for peripheral and central nervous system activity, and the resultant large number of data formats, a comprehensive software package should ideally be capable of reading in several of the most common data formats. Likewise, researchers might want to postprocess artifact-free data in other applications, requiring flexibility on the output side. ANSLAB Professional reads a substantial number of data formats, including some of the common data formats used by EEG and other biosignal amplifiers (such as the European [EDF], Biosemi [BDF], Neuroscan [CNT], Vitaport/Varioport [VPD], Biopac [ACQ], and Vivosense [VIV] data formats). For use in Open ANSLAB, such data formats have to be exported to ASCII format in order to be read. Exports of extracted values are usually written as tab-delimited ASCII files. These ASCII files can be preconfigured to be easily imported into software packages such as Excel (Microsoft Inc., Redmond, WA, USA) or SPSS (IBM, Armonk, NY, USA). An interface with R (R Development Core Team, 2013) is currently being developed. Time series of reduced values of each variable are further stored in MATLAB-formatted data files (MAT files) in the respective subfolder of the ANSLAB study folder. These data can be further postprocessed in other signal-processing packages.

Productivity

Computing an adequate number of psychophysiological variables from extended recording sessions in studies with large numbers of participants can become quite time-consuming with regard to artifact scoring. Similarly, computation of HR variability indices can involve high computing loads, quickly amounting to significant CPU processing time. To facilitate such analyses, most analysis steps in ANSLAB Professional can be automatized. For example, ECG processing or HR variability computation can be automatized through batch processing: The range of participants, experimental files for each participant, and channels to be processed can be specified by the user, and analysis of these files then automatically proceeds in loops. However, many psychophysiological channels require some degree of visual inspection to assure optimal data integrity. This is achieved through the storing of detailed processing records during batch processing for later review. This includes customizable screen shots of the preprocessed time series that are saved in a single JPG file for later visual inspection. In this visual analysis record, segments with artifactual data can quickly be detected and edited manually by the user. This approach allows a combination of automation, on the one hand, with visual inspection/data integrity checking and manual editing, on the other hand, thereby significantly reducing the time for analysis supervision and artifact editing at no cost with regard to data quality. Channels requiring little manual intervention can be batch-processed entirely automatically across an unlimited number of participants and files (such as HR variability computations, once the IBI time series have been carefully cleaned of artifacts). Furthermore, result value aggregation for data segments and export of values from a study for further processing with statistical software are typically done in batched mode across participants, files, and measures.

Section 2: Advanced ANSLAB analyses

After the previous descriptions of the general architecture, basic principles, and processing steps in ANSLAB, this section illustrates how some of the more complex analysis problems in peripheral psychophysiology are approached by ANSLAB.

Cardiovascular system

Few organ systems of the body consist of a similarly wide array of integrated and interacting components as the cardiovascular system. As we indicated above, psychophysiological science has moved from indexing only a few, multiply determined measures (such as HR) toward aggregating a larger set of measures that reflect the activity of the PNS and the SNS more specifically. Several measures within the cardiovascular system are available to index SNS activity (see also Table 1 above). PEP, derived from impedance cardiography (ICG), is one well-validated measure of cardiac SNS activity (e.g., Sherwood et al., 1990) referring to the period in milliseconds between the onset of depolarization of the left ventricle (ECG Q-wave) and start of the ejection of blood during systolic contraction (B point of the dZ/dt wave, visible as a “notch” in the waveform). The ICG module of ANSLAB supports beat-by-beat analysis or ensemble averaging over multiple cardiac cycles within a given experimental phase (determined by the timing file). With noisy or artifactual ICG data, ensemble averaging across beats is the method of choice, because this method can overcome stochastically distributed noise and uncover the dZ/dt signal relating to the velocity of blood expelled from the left cardiac ventricle. Figure 4 displays how ensemble averaging is performed in ANSLAB. The right panel illustrates a problem with locating the B point when it is barely recognizable and the notch algorithm wrongly placed it at 80 ms (Point 2). Manual editing could be employed by dragging the B-point marker to a more adequate location on the ensemble averaged dZ/dt waveform, or the ANSLAB option of locating it at the “zero-crossing” (Point 1) could be used for automatic analysis with particularly problematic waveforms. The ICG module also estimates the stroke volume of the left ventricle (in mL) using the Kubicek formula (Kubicek, Karnegis, Patterson, Witsoe, & Mattson, 1966) and several other cardiac volume and timing indices. Further sympathetic measures are T-wave amplitude, pulse wave amplitude, and pulse wave transit time, which can be calculated from the ECG and pulse wave signals, as we partially described in the previous section.

Fig. 4
figure 4

Impedance cardiography analysis in ANSLAB: Raw dZ/dt waveforms synchronized by ECG for 43 heart beats, with potential outliers (left panel), and the ensemble averaged waveform with detected signal features for subsequent calculation of preejection period (PEP), left-ventricular ejection time (LVET), and stroke volume (SV). See the text for details

With regard to cardiovascular PNS activity, RSA is considered the only available valid noninvasive measure. One frequent and straightforward approach focuses on IBI time series variability for the estimation of PNS activity and disregards respiratory influences. After ECG editing, the resulting IBI time series are read in by the spectral variability module of ANSLAB Professional to compute spectral and other variability indices within specified intervals indicated by the timing files. As is listed in Table 1, ANSLAB computes most of the indices suggested by the Task Force of the European Society of Cardiology and the North American Society of Pacing and Electrophysiology (1996). Additional variability indices are sometimes desirable, depending on the research question. For example, to circumvent the limitations of fast-Fourier-transform-derived measures in shorter segments (such as vulnerability to violation of stationarity assumptions; Weber, Molenaar, & van der Molen, 1992), complex demodulation (CDM) indices were introduced (Hayano et al., 1993; Wilhelm, Grossman, & Roth, 2005). CDM-derived indices can be computed and displayed continuously with 4-Hz resolution for the whole data file in ANSLAB (however, statistical values should be based on at least 15 s). Furthermore, nonlinear indices and chaos measures can be computed, which outperform linear measures in some circumstances (Rao & Yeragani, 2001). Several other approaches to estimate PNS activity with regard to respiratory factors are described below.

Respiratory system

Few analysis programs cover the respiratory system in detail. This is unfortunate, since physiological changes at the level of respiratory pattern regulation and the resulting alterations in chemical blood composition play a role in disorders such as hypertension (Anderson, Dhokalia, Parsons, & Bagrov, 1996), hyperventilation syndrome (Folgering, 1999), panic disorder, functional cardiac disorder, and chronic pain syndromes (Wilhelm, Gevirtz, & Roth, 2001). Furthermore, dysregulated respiratory behavior may play a role in the quality of performance both in the workplace and in sports (Forster & Pan, 1988; Schleifer & Ley, 1994). A detailed quantification of volume, timing, and shape parameters in the respiratory pattern waveform can map onto different emotional states along the dimensions of calm–excitement, relaxation–tenseness, and active versus passive coping (Boiten, Frijda, & Wientjes, 1994; Grossman, 1983; Wientjes, 1992). Specific emotion expressions, such as crying, startling, or shouting have unique respiratory signatures. Detailed assessment of respiratory responses has been neglected in emotion research and in clinical research, to some degree also because of the difficulties of acquiring accurate measurements and of analyzing them efficiently.

Often-studied respiratory measures such as respiratory rate and minute ventilation (the amount of air inhaled in 1 min) have been complemented increasingly by more detailed measurements of the respiratory pattern based on a better understanding of the respiratory control mechanisms (Dempsey & Pack, 1995): The respiratory duty cycle (inspiratory time divided by total time of a breath) is related to the cyclic on- and off-switching of inspiration in the brain stem, whereas the inspiratory flow rate is related to the central respiratory drive and the feeling of shortness of breath. Specific abnormalities in the respiratory pattern—for example, inspiratory pauses, apneas, or tidal volume outliers—may also contain emotional or clinical information. For example, frequent sighs and high tidal volume variability have been documented in panic disorder (Wilhelm, Trabert, & Roth, 2001a, b). Analysis of the capnographically measured end-tidal partial pressure of expired carbon dioxide (pCO2) complements these analyses and allows for further conclusions regarding hyperventilation and hypocapnia (i.e., low pCO2), which figure prominently in emotions such as anxiety and related disorders (e.g., Blechert et al., 2007).

Many psychophysiological studies do not obtain respiratory data, and if they do, they only obtain data from one sensor band surrounding the upper body. The analysis of such data is also facilitated by ANSLAB; however, high-quality respiratory analysis that includes accurate volume information requires two bands, one placed over the thorax and one over the abdomen (Konno & Mead, 1967). The first step in analyzing these channels is to convert the raw signals to the calibrated lung volume change using data from a spirometry or fixed-volume bag calibration procedure. The ANSLAB respiration calibration module uses a least-squares fit multiple regression procedure to establish stretch-to-volume ratios so as to best predict calibration air volume from the output of the two bands (Morel, Forster, & Suter, 1983). The two band outputs are subsequently multiplied by these ratios and summed to obtain a continuous measure of lung volume change. ANSLAB calculates a wide variety of respiratory parameters from the calibrated respiratory patterns using feature detection algorithms. For example, the onset of inspiration, expiration, and pauses are defined by slope criteria (flow rates exceeding 100 ml/s define onsets), and tidal volumes (in mL) are calculated between the peaks and valleys of valid breaths. Total breath duration is converted to the instantaneous respiratory rate (in breaths or cycles per minute). Minute ventilation (in L/min) is calculated as the product of tidal volume and respiratory rate. Inspiratory flow rate (in mL/s) and inspiratory duty cycle time are then calculated (Boiten, 1993). Similar to other ANSLAB modules, the respiration analysis module includes the options of (a) manual breath-by-breath editing of the points of inspiration on- and offset and expiration on- and offset at the level of the raw signal; (b) marking of artifactual segments to be excluded from analysis; (c) excluding outlying and artifactual data at the level of the extracted variable time series (continuous measures of tidal volume, minute ventilation, etc.); or (d) fully automatized, batched analysis, with optional subsequent visual inspection of the obtained reduced data (see Fig. 5).

Fig. 5
figure 5

Analysis of respiration in ANSLAB Professional. Points of inspiration and expiration onset (red, blue) and offset (green, yellow) can be manually edited and artifactual segments marked. Accelerometry and thorax–abdomen asynchrony (“z-value”, lowest panel) signals aid the identification of artifactual segments. See the text for details

Cross-spectral analysis: Relating HR variability to respiratory activity

The issue of respiratory influences on RSA (often operationalized by high-frequency HR variability) has been subject to a long methodological debate, which can only briefly be summarized here. Whereas one approach assumes that RSA can be considered roughly equivalent to efferent cardiac PNS activity (sometimes called cardiac vagal tone; e.g., Porges, 2007), another approach has highlighted several caveats in this interpretation (Grossman & Taylor, 2007; Ritz & Dahme, 2006; Wilhelm, Grossman, & Coyle, 2004). These include that basic respiratory factors—breathing rate and depth—as well as arterial CO2 concentration (which is lowered by hyperventilation) have profound effects on RSA (Eckberg, 2003). For example, pharmacological autonomic blockade studies have shown that slow and deep respiration will increase RSA profoundly without corresponding PNS activity changes (Grossman & Kollai, 1993). Thus, experimental tasks that change breathing (as, in fact, many tasks do; Boiten et al., 1994) will change RSA, but possibly without underlying change in vagal activity. This compromises the validity of RSA as a vagal activity measure. Several solutions to adjust RSA for these factors and obtain more valid measures of true vagal activity changes have been proposed (Grossman & Taylor, 2007; Wilhelm et al., 2004) but are often ignored in studies (Ritz & Dahme, 2006).

For example, within participants, the respiratory confounds respiratory rate (RR) and tidal volume (VT) can be accounted for by having participants complete a paced breathing “baseline” before the experiment, involving at least three different respiratory frequencies (e.g., 8, 11.5, 18 breaths per minute). The influence of VT on RSA can be accounted for either through simple division (RSA/VT; Ritz & Dahme, 2006) or through calculating the magnitude of the transfer function relating IBI oscillations to lung volume oscillations at the modal breathing frequency (Saul et al., 1991; Wilhelm et al., 2004). This cross-spectral approach has the advantage of ensuring that quantified IBI oscillations are truly at the respiratory frequency and have sufficient coherence (>0.5) with the respiratory signal to truly constitute respiratory sinus arrhythmia. Within participants, a strong decrease of this VT-corrected RSAVT across increasing breathing speeds is typically observed. A participant-specific regression equation is then computed to determine the individual intercept and slope of this decrease. During the experimental task of interest (with naturally varying respiration), RSAVT can be computed and compared against RSAVT values predicted at the same respiratory frequency by the paced breathing baseline regression model. The difference between the values observed during the task (based on natural breathing) and the values predicted for this respiratory frequency based on the paced breathing procedure is an index of RSA adjusted for VT and RR changes and represents a less confounded index of true vagal activity changes.

In ANSLAB Professional, this is achieved by first processing the IBI and (calibrated) breathing channels. Then, the cross-spectral analysis module is run, specified to load IBI and respiration time series. As is shown in Fig. 6, for each of the two signals, the power spectral density is plotted (panels a and b), as well as the cross-spectral density of the two (panel c). The cross-spectrum is used to identify the primary shared frequency of the two signals within a user-specified band (very low frequency, low frequency, or high frequency). For this frequency (marked by a red line), the following functions and values are computed: transfer function (indicating how many milliseconds’ change in IBI at a certain frequency is related to a 1-ml change in tidal volume breathing at that frequency; panel d), the cross-spectral phase angle (0 deg would indicate that both signals peak and wane at exactly the same time; 180 deg means a perfectly reciprocal relation, in which when one is peaking the other is ebbing; panel e), and the coherence function (panel f). If coherence is above .5 and no anomalies are detected (very low or irregular breathing), the resulting values can be interpreted. Obviously, the cross-spectral approach gives a lot more information regarding actual relationships between respiratory and cardiac signals than do pure IBI-based analyses, and it allows for a number of decisions, such as adjustment of the frequency bands (slower breathing) or exclusion of a given segment.

Fig. 6
figure 6

Cross-spectral and transfer function analysis module. Variables ending with a “0” have been resampled to an evenly sampled variable with sample rate 4. RS = calibrated breathing pattern, ibi = interbeat interval

It should be mentioned that the cross-spectral module is fully flexible to handle any kind of signal; for example, it also allows for the calculation of baroreflex sensitivity, simply by loading beat-by-beat systolic blood pressure data together with IBI and calculating the transfer function magnitude in the 0.07- to 0.015-Hz range. Further details on spectral and cross-spectral analysis in psychophysiology applications can be found in Wilhelm, Grossman, and Roth (1999).

Response coherence analysis

The module for response coherence analysis allows the researcher to assess the extent to which two signals cohere in the time domain. This module is of particular interest for analyzing the level of concordance between behavioral and physiological responses during varying levels of emotion intensity. One example of such an analysis is the detection of a correlation between subjective valence-rating values (e.g., provided through a dial wheel operated while watching an emotion-inducing film) and concurrently measured physiological variables (e.g., cardiovascular activation or skin conductance level; Mauss, Levenson, McCarter, Wilhelm, & Gross, 2005). Even if there is a coupling between two signals, it may be hidden due to a delay between the subjective rating and the physiological variable (e.g., in the case of skin conductance level). Therefore, the response coherence analysis module allows the researcher to specify a range of the theoretically meaningful and expected lag values (in seconds). On the basis of this range, the module computes the optimal lag that corresponds to the lag value leading to the highest absolute cross-correlation between the source signals. On the basis of a timing file, ANSLAB shows the two source signals within each segment of interest (the first two graphs in Fig. 7) and the cross-correlation curve over the defined range of expected lags (bottom graph). If necessary, detrending, low-pass filtering, and/or moving-average filtering for the source signals might be enabled within the ANSLAB settings.

Fig. 7
figure 7

Response coherence analysis module

The scoring box, displayed below the graphs in Fig. 7, allows manual processing of the coherence results for each segment. The results from low-quality signals can be set to “missing,” and missing values within either one of the source signals can be interpolated linearly before the coherence analysis. Another option is to ignore the parts within a segment that contain missing values for the coherence analysis (applied to both signals to keep them aligned, via the “remove gaps” button).

Eye-blink startle analysis

The module for analyzing eye-blink startle is one of the specialized modules for analyzing signals from the motoric system. The startle response is a skeletomotor response to intense acoustic, visual, or tactile stimuli that have a rapid onset (Davis, Walker, & Lee, 1999) and is measured by the strength and speed of eyelid closure. Modulation of the startle reflex involves the central amygdala (Angrilli et al., 1996; Hitchcock & Davis, 1986), making it an interesting peripheral marker of basal limbic activity. Eye-blink startle has been extensively used in basic emotion research. Elicited by startle probes such as sudden, loud noise bursts (e.g., 95 dB for 50 ms) overlaid over emotionally negative and positive images, it reliably differentiates aversive/defensive and positive/appetitive states (e.g., Lang, Bradley, & Cuthbert, 1997). Whereas early stages of picture processing reflect sensory and attentional processes (e.g., Lipp, Neumann, Siddle, & Dall, 2001), later stages are thought to reflect defensive and appetitive motivation (Bradley, Codispoti, & Lang, 2006). The preprocessing, scoring, and statistical analysis of eye-blink startle has been subject to much debate. Some of these issues have been resolved and organized in a guideline statement by the Society for Psychophysiological Research (Blumenthal et al., 2005). Some issues remain open and ANSLAB thus allows for several scoring schemes. On the basis of a timing file, ANSLAB visualizes the time segment surrounding the startle probe and displays that marker signal (top panel in Fig. 8), the raw electromyogram (EMG; second panel), which illustrates the onset of the EMG activity burst and indicates the signal quality. Time-locked below that, the digitally band-pass (28–500 Hz) and band-stop (customizable 50 or 60 Hz) filtered, integrated, and smoothed (25-ms moving average filter) EMG signal is displayed for onset detection. The bottom graph displays the same information along with scoring windows: The startle response amplitude (peak EMG response in microvolts) is typically calculated as the difference between the peak EMG response within 20–150 ms after probe onset (indicated by red dotted lines) and the startle baseline, scored as the mean EMG in the 50-ms window before probe onset (green dotted lines). The onset latency is calculated as the latency between probe onset and the point at which EMG activity rises more than five times the standard deviation of the baseline segment. The peak latency is calculated between the peak EMG response and the probe onset (in ms). Importantly, manual editing is possible and is supported by red and blue points for the response maximum and onset latency, respectively. Excess variability in the baseline, for example, can delay the onset latency, which could then be set manually with reference to the third panel if that trial is considered valid. Sometimes “double peaks” are visible, and the response maximum is typically set to the first of the peaks (regardless of the absolute amplitude, which is the automatic setting; this situation is sometimes caused by voluntary blinks that follow the reflex-driven blink). Most importantly, the scoring box, displayed below the graphs in Fig. 8, allows for a classification of trials, where trials with no observable startle response are scored as “zero.” “Invalid” indicates a trial in which an unstable baseline (e.g., due to movement or an eye-blink) prohibited startle detection.

Fig. 8
figure 8

Eye-blink startle module

Discussion

We have indicated in this report that contemporary psychophysiology often follows a multichannel/multimeasure approach that requires both specialized analysis modules, on the one hand, and integration between these modules, on the other, to optimally extract useful information from the recorded data. We have also shown how such measures can be obtained and combined to infer the autonomic correlates of mental states with regard to PNS and SNS activity across different peripheral bodily systems. The multichannel/multimeasure approach also helps elucidate interactions of channels and measures, as seen, for example, in artifact editing or in respiratory confounds when obtaining RSA as a measure of cardiac vagal control. We have shown how ANSLAB supports the dynamic psychophysiological research field through multichannel integration, flexibility, and productivity-enhancing features, and we have highlighted the breadth of the modules and channels covered in ANSLAB by providing analysis examples.

ANSLAB has been developed throughout the last 20 years by researchers actively participating in the methodological development of peripheral psychophysiology. It has been used in numerous studies on emotion, stress, and psychopathology. Throughout this time, it has constantly been refined and expanded to accommodate the necessities of emerging research questions and to include new recording formats and channels. Importantly, new findings on useful algorithms have been steadily incorporated—for example, to stay in pace with published guideline statements by the Society for Psychophysiological Research (http://sprweb.org/journal). Furthermore, the facts that Open ANSLAB is completely open source and that ANSLAB Professional is delivered with the source code (only a few files related to licensing are encrypted) allow for customization by users. ANSLAB Professional continues to grow: Future developments include advanced statistical analysis within the program, interaction with the R statistical software (R Development Core Team, 2013), dynamic causal modeling-based EDA analysis (Bach, Daunizeau, Friston, & Dolan, 2010), enhanced functionality for long-term (>24 h) ambulatory recordings (Wilhelm & Grossman, 2010), EMG-based analysis of chewing activity (Amft & Troster, 2008), and signal averaging for EEG (event-related potentials) and other channels.

The ANSLAB software is quite popular. By June 2014, more than 1,200 articles had cited the Web resource of ANSLAB (Wilhelm & Peyk, 2005) or a previous methodological article describing it (Wilhelm et al., 1999). Open ANSLAB has been downloaded about 100 times/month over the last year, and ANSLAB Professional is currently licensed to 65 university research groups worldwide. The wider field of peripheral psychophysiology continues to grow: Since the burden of the peripheral sensors to the participant is comparatively low and sophisticated recording hardware is available at relatively low cost, and often is even portable (Goodwin, Velicer, & Intille, 2008; Kubiak & Stone, 2012), more and more researchers have started to use these measures, often in combination with EEG or fMRI. The high validity of autonomic measures as correlates of emotional activation has been utilized to aid in the validation and interpretation of emotion effects in central nervous system activity. For example, electrodermal activity is used as a validator of amygdala activity during fear conditioning (Phelps, Delgado, Nearing, & LeDoux, 2004). Similarly, prepulse inhibition, which can be measured by eye-blink startle responses, can index mesolimbic dopaminergic activity (Braff, Geyer, & Swerdlow, 2001).

In the past, psychological research has primarily been concerned with self-report data such as questionnaires or reaction time data to quantify mental constructs that by their nature are invisible. With increasingly user-friendly data collection and analysis systems, a clear propagation of psychophysiological measurements into different fields of psychology, psychiatry, psychosomatic medicine, and affective computing, as well as cognitive and autonomic neuroscience, has occurred in the past decade. In addition, mobile devices such as smart phones will increasingly be designed to allow for obtaining physiological data, such as accelerometry and ECG, from their users. These data can be utilized to infer the mental states of the user. These and other developments, such as telemetric sensor systems (Goodwin et al., 2008), make a further growth and significance of the field of psychophysiology highly likely and will require further development of psychophysiological processing algorithms and software. A software system such as ANSLAB that builds on a flexible and expanding signal-processing-oriented language, such as MATLAB, is well prepared to accommodate such developments.