1 Introduction

The loss of a limb, especially of an arm or hand, causes a severe worsening of the quality of life. To regain the ability for an independent and unimpaired life, artificial limbs have been developed over the past decades. These initiatives include hand prostheses that can be controlled by the user through the activity of the remnant muscles above the amputation. These systems provide the possibility to control multiple degrees of freedom so that the movement can mimic well that of the human hand [20]. The control methods for prostheses using signals recorded using electromyography (EMG) are based on either direct control, or pattern classification, or regression [5, 10].

In myocontrol applications, the quality of the EMG signal is one of the most important factors for performance. Both for classification and regression approaches, the noise level and the spatial selectivity of the input EMG signal substantially impact the performance. Therefore, extensive work has been devoted in the past to increase the quality and information content of the control signal [6, 8, 20].

Previous preprocessing methods for EMG have focused on the reduction in common noise and in cross talk. These methods include spatial filtering that can be performed with bipolar, double-differential [1, 3, 13], Laplacian or other two-dimensional configurations [4, 19]. Spatial filters for EMG have usually a high-pass spatial transfer function that eliminates the spatial DC and reduces the influence of distant sources (see [4, 19] for details). Additionally, time-domain filters are often used to eliminate the power line interference [16], to reduce motion artifacts [7] and artifacts from electrocardiography (ECG) [21].

For multi-electrode systems, the common average reference (CAR), also known as virtual reference (VR) [15], has also been used in EMG applications [7, 12], although this approach is most often implemented in electroencephalography (EEG) recordings [14, 17]. The CAR filtering is based on a sample-by-sample subtraction from each channel of the average signal value over all channels. As other spatial filters for EMG processing, CAR has a high-pass transfer function that eliminates the spatial DC.

In EEG analysis, the CAR filter is used to remove dominant noise components present in all channels and thus enhances the signal-to-noise ratio (SNR) [15]. For EEG signals, the common noise has usually greater power than the signal component of interest; thus, the CAR filter has a strong effect in improving SNR [14]. However, when the CAR is applied to EMG signals, it may actually introduce undesired components and negatively affect the shape of the recorded EMG as discussed in [15]. In contrast to EEG, the common noise in EMG recordings is indeed usually smaller than the signal component. Thus, the virtual reference of the CAR is not dominated by the common noise components, but additionally contains the inverted signal of the channels with large EMG activity. The effect of the CAR filter on EMG may thus be even a reduction in spatial selectivity (Fig. 1), which is usually negative for myocontrol.

Fig. 1
figure 1

a Raw multi-channel EMG signal (16 monopolar channels). b The same signal filtered using the classic common average reference (CAR) method. For the first EMG burst (approximately from 1 to 2 s of the recording), signal components are added by CAR in channels 1–4, which are originally not active. A similar effect is visible for the second burst of activity for channels 5–16

In this paper, we present an extension of the CAR approach based on an adaptive calculation of the common mean value on a subset of EMG channels. We will refer to this new method as adaptive common average reference (ACAR). The effectiveness of the proposed ACAR will be demonstrated on myocontrol applications, including both pattern recognition and regression-based control.

2 Methods

2.1 Adaptive common mean reference (ACAR)

The proposed ACAR algorithm is based on the assumption that the signal intensity on all channels is greater than the common noise, for instance, when the power line noise has been reduced by a comb filter or the technical design of the EMG equipment. This is generally the case for EMG recordings, as shown in Fig. 1a. Additionally, we make the assumption that the signal power of more distant sources is smaller than that of closer sources. Using these hypotheses, ACAR is based on the calculation of the common mean only from a subset of channels. By selecting this subset in a manner that the channels with EMG activity (and therefore information content) are excluded, the resulting mean reference signal is dominated by the common noise, which needs to be eliminated.

Considering a signal S ∊ R K×N with K channels and N samples, the signal is separated in non-overlapping windows

$$W_{j} = \left[ {\begin{array}{*{20}c} {w_{1,1}^{j} } & \cdots & {w_{1,L}^{j} } \\ \vdots & \ddots & \vdots \\ {w_{K,1}^{j} } & \cdots & {w_{K,L}^{j} } \\ \end{array} } \right] \in R^{K \times L}$$
(1)

of length L, where j denotes the order of the windows. For each window, we compute the channel-wise signal intensity

$$\vec{p}_{j} = [p_{1j} ,p_{2j} , \ldots ,p_{Kj} ]^{T} ,$$
(2)

where

$$p_{kj} = \sum\limits_{l = 1}^{L} {\left| {w_{k,l}^{j} } \right|}$$
(3)

is the sum over absolute values (average rectified value). Based on \(\vec{p}_{j}\), a subset of κ j channels Λ j  ⊆ {1, 2, …, K} with the lowest signal intensity is selected. For this channel selection, several approaches can be used. A simple method is to select the \(\left\lceil {K/2} \right\rceil\) channels with the lowest intensity (further denoted as K/2 criteria). Alternatively, it is possible to set a threshold on the intensity estimate, either dynamic (i.e., mean or median across the channels) or fixed. In any case, Λ should always contain more than one channel to avoid susceptibility toward a single channel. For the dynamic threshold, this implies a second override step to use the three channels with lowest intensity if the dynamic threshold results in less than three channels for Λ j . Finally, the sample-wise mean value is calculated for the selected channel subset as:

$$\vec{\mu }_{j} = [\mu_{j,1} ,\mu_{j,2} , \ldots ,\mu_{j,L} ],$$
(4)

where

$$\mu_{j,l} = \frac{1}{{\kappa_{j} }}\sum\limits_{{k \in \varLambda_{j} }} {w_{k,l}^{j} }$$
(5)

and subtracted from all channels in W j

$$W_{j}^{*} = W_{j} - \left[ {\begin{array}{*{20}c} {\vec{\mu }_{j} } \\ \vdots \\ {\vec{\mu }_{j} } \\ \end{array} } \right]_{K \times 1}$$
(6)

The filtered signal S * = [W * j W * j , …, W * j ] can then be obtained by concatenating all processed windows. The resulting filter is a spatial filter changing its transfer function over time.

2.2 Quantitative evaluation of noise reduction and selectivity

To quantify the common noise reduction and the increase in signal selectivity, the proposed filter has been applied to EMG data recorded (sampling rate of 2,048 Hz) from the forearm muscles of four healthy male subjects (age range 25–37), with 16 monopolar electrodes, placed as 8 pairs of 2 equidistantly in a circular manner around the proximal third of the forearm [18]. This setup is shown in Fig. 2. All measures have been performed under the approval of the local ethics committee. Out of the 16 electrodes, two were located above the flexor and two above the extensor muscles of the wrist. The metrics used were chosen according to [19], where wrist flexor and extensor muscles were used as agonist/antagonist pair. As the ACAR filter is designed for the use in myoelectric applications, the subjects contracted their muscles voluntarily up to MVC instead of using stimulation, as was done in [19]. Based on the acquired data for maximal flexion and extension, two signal-to-noise ratio (SNR) indexes were calculated.

Fig. 2
figure 2

EMG recording setup used for the evaluation studies. The 16 electrodes were placed as 8 pairs of 2 equidistantly around the proximal third of the subject’s forearm. Therefore, only 4 pairs are visible in the figure, while the other 4 are placed on the opposite, not visible side of the arm

To assess the within-channel SNR, the data of the same channel were used to calculate the signal power for the relaxation phase P agonist,relax and for full contraction P agonist,MVC, leading to the factor as follows:

$${\text{SNR}}_{\text{within}} = \frac{{P_{{{\text{agonist}},{\text{MVC}}}} }}{{P_{{{\text{agonist}},{\text{relax}}}} }}$$
(7)

The between-channel SNR was calculated using the data of one agonist and one antagonist channel for the same full contraction as follows:

$${\text{SNR}}_{\text{between}} = \frac{{P_{{{\text{agonist}},{\text{MVC}}}} }}{{P_{{{\text{antagonist}},{\text{MVC}}}} }}$$
(8)

For both cases, a greater SNR represents a better signal quality for the agonist channel. The calculation was done for 200-ms windows, each subject performing four contractions for both wrist flexion and wrist extension. This resulted for each method in two pairs of SNRwithin and SNRbetween, one for wrist flexion and one for wrist extension.

Based on the above indexes, the ACAR filter was tested using different channel selection criteria. Based on this, the criterion that was found to be most promising was compared with unfiltered raw data, the bipolar filter, and the CAR filter.

The results were statistically tested using two-factor ANOVAs, with the preprocessing method and the subject as factors. A significance level of α = 0.05 was used for all tests.

2.3 Impact on myocontrol based on pattern classification

The performance of the ACAR was also evaluated on classical pattern classification methods for myocontrol, to prove the impact to applied research. For this purpose, four time-domain features (RMS, wave length, zero crossing, and slope sign changes; [9] ) extracted from the 16 channels (window length of 400 samples) were obtained from the unfiltered EMG and the EMG filtered with CAR and ACAR, using the same electrode setup as above. The data were recorded from seven able-bodied subjects (2 female, 5 male, age range 25–57) for six wrist dynamic movements (flexion, extension, abduction, adduction, supination, and pronation), each performed 4 times for 4 s at approximately 50 % MVC force. A feedback was provided to the subject using a motion tracking system (XSens MTx, XSens, Enschede, the Netherlands), estimating the wrist angles in the six different directions. For quantitative comparison of the approaches, the separability index (SI, larger indicates better performance) and the mean semi-principal axes (MSA, lower indicates better performance) [2] were used. Additionally, the quotient of SI and MSA (distinctness coefficient DCOFF = SI/MSA, larger indicates better performance) was introduced as a further performance metrics.

2.4 Impact on regression-based myocontrol

Additionally to the classification scheme, the impact of the proposed filter was also tested for EMG regression methods. For this purpose, the online target-hitting task using the nonnegative matrix factorization (NMF) online myocontrol algorithm for wrist flexion/extension and rotation has been used, as described in [18]. This algorithm is a regression system to estimate the angles for the two degrees of freedom. The estimates for the two degrees of freedom were translated into the control of a virtual arrow on the screen, with the flexion/extension angle of the wrist mapped to the horizontal position and the wrist rotation angle mapped to the rotation of the arrow.

Using both degrees of freedom simultaneously, the arrow tip had to be placed into target circles. This interface is shown in Fig. 3. Four male subjects (age range 25–39) participated in this study. A 16-electrode setup, as described above, was mounted on their dominant arm to record calibration data. Then, the regression system was calibrated using the recorded calibration data unfiltered, filtered with CAR and filtered with ACAR. Once calibrated, the regression algorithm was applied for online control. For each of this three preprocessing configurations, the subjects were asked to hit 20 standardized targets, distributed in the control range, that all required simultaneous and proportional control to be accomplished. As described in [18], for each target, the subjects had to position the arrow tip within the circle and stay in it for 300 ms. If the subject did not manage to accomplish this task within 20 s, the target-reaching task was considered failed. Consequently, the time to reach the targets as well as a completion rate was recorded and used as performance metrics.

Fig. 3
figure 3

Paradigm for evaluating the regression-based EMG control. The subject can control the position of the black arrow using simultaneously wrist flexion/extension and wrist rotation to position the tip of the arrow into the target circle. An example of successful positioning is shown by the gray arrow. In the setup, the area shown is mapped to the controllable range of the subject. For a detailed description, see [11, 18]

3 Results

3.1 Quantification of noise reduction and selectivity

The results of the impact of the selection criteria are shown in Fig. 4 for a representative subject. Besides the CAR and ACAR with K/2 method, also the mean and the median threshold within each 25-sample window were tested. Both K/2 and the median criteria yielded equally good results, which were found also for the other subjects.

Fig. 4
figure 4

Comparison of the different selection criteria for the ACAR algorithm. These results are obtained from subject 3 and show that all methods exceed the SNRs of the standard CAR. The same results were found for the other subjects

Additionally, the impact of the window length L for the K/2 selection criteria is shown for the same subject in Fig. 5. The K/2 method was used in this case due to its simplicity and similar performance to other selection methods (Fig. 4). The analysis for the other subjects showed very similar results. The selection method and the window length did not impact the performance when analyzed statistically over all subjects (all p > 0.05). Therefore, the K/2 method with 25-sample window length was the only one tested in the following.

Fig. 5
figure 5

Comparison of the SNRs using K/2 criteria and different window length L for subject 3. The results show that a longer window length has a stronger impact to the between-channel SNR, therefore increasing the separability. Similar results were found for the other selection criteria and subjects

The comparison among methods for common noise reduction and signal selectivity is shown in Fig. 6. Over all subjects, both the within-channel SNR and the between-channel SNR were the highest for the ACAR method (K/2 method, 25 samples) for both wrist flexion and extension. For the between-channel SNR, which represents the channel selectivity, the ACAR exceeded the CAR by a minimum of 6 dB for all subjects.

Fig. 6
figure 6

The results of the offline analysis for the four preprocessing methods are shown grouped by the four subjects (S1–S4). For the ACAR, the window length chosen was 25 samples with the K/2 channel selection criteria. The bars indicate the mean values over the four measures for each subject, with the standard deviation shown on top

The statistical analysis for the comparison resulted in a strong significance for all four metrics (all p ≪ 0.05).

3.2 Myocontrol based on pattern classification

The feature spaces for a representative subject calculated from the unfiltered EMG signal as well as the signal filtered with CAR and ACAR are presented in Fig. 7, where, for graphical representation, only the first two principal components of the feature space are shown. The clusters for each wrist movement are represented by the different colors.

Fig. 7
figure 7

Projection of the LDA spaces for subject 3 onto the first two components, separated by the three input signals. Only the unfiltered monopolar signal and the CAR- and ACAR-filtered data were used. Note: The three plots have the same axis range, which as LDA components have arbitrary units

For all subjects, the three metrics (MSA, SI, DCOFF) were calculated and are presented in Fig. 8. Generally, the MSA values, as a measure of cluster density, were the lowest for either the unfiltered data or ACAR, while the highest SI was obtained by ACAR or CAR. Finally, the DCOFF as a combination of SI and MSA always yielded the highest values for the ACAR preprocessing.

Fig. 8
figure 8

The three performance metrics (MSA, SI, DCOFF) have been calculated for all subjects and the three different preprocessing methods. The figure depicts the mean values and standard deviations for the four subjects. For better comparison, the values have been normalized on subject base using the results for unfiltered data (black) as reference

3.3 Regression-based myocontrol

The resulting performance metrics of the online control task for the four subjects are shown in Fig. 9. For the subjects S1 and S2, the completion rates increased equally using CAR or ACAR in comparison with the unfiltered EMG signal. For subject S4, the completion rate was the highest using ACAR, while using the unprocessed EMG signal, only 6 out of 20 targets were completed. In fact, the controllability of the online paradigm for this subject without CAR or ACAR was very poor. For the very experienced subject S3, all three preprocessing methods yielded 100 %. However, for all subjects, the ACAR preprocessing resulted in the most stable control experience. This controllability is represented by the time to reach the target (Fig. 9b). For all subjects, the mean time to reach the target as well as the standard deviation was the lowest for the ACAR preprocessing, followed by the CAR algorithm.

Fig. 9
figure 9

Acquired metric data of the online regression myocontrol using NMF. The left plot (a) shows the completion rate for the 20 targets of the four subjects using the three different EMG preprocessing methods in randomized order. The corresponding mean time to reach the targets and standard deviation is given in the right plot (b)

For subject S4, the unfiltered EMG signal yielded a similar mean time to reach as for ACAR, while the standard deviation was about double. However, since this subject was able to complete only 30 % of the targets, specifically those that were the closest from the initial position and therefore easier to reach, the unfiltered EMG obviously performed poorer than both CAR and ACAR.

The statistical analysis of the time to reach the target on all data acquired indicated an evident significance (p < 0.05).

4 Discussion

A new time-varying spatial filter for myocontrol applications has been proposed. The filter is based on the subtraction from each channel of the mean value of the subset of channels with minimal signal intensity.

The tests on the channel selection criteria for the proposed ACAR filter identified the K/2 criterion as adequate and simple. The median and mean criteria require an additional thresholding without significant improvement. Regarding the window length, 25 samples (equals 12.2 ms) were identified as a good trade-off for SNR improvement and response time of the filter. An increased window length might give a slightly better performance in terms of signal quality, but would be less appropriate for quick control changes. Using this configuration set, the ACAR filter has been shown superior for gain in signal quality to all other tested filters. These include also the bipolar recording, which is the current state of the art in industrial applications.

Furthermore, we have also shown a gain in class separability when using the ACAR filter on the feature space for pattern classification. As stated by [2], an increasing SI, as identified for the CAR and ACAR, is due to more distinct classes in the transformed feature space, resulting from either more dense clusters or greater distances between classes. For the presented results for SI, the CAR and ACAR can be used to increase the separability of the contractions in comparison with unfiltered data. Additionally, the MSA is reduced for all subjects when using the ACAR in comparison with CAR. This indicates that the clusters are both more compact and better distributed in the feature space for ACAR filtering. In comparison with the unfiltered data, the MSA was slightly increased, but an increasing MSA can be compensated by a proportional increase in SI, to ensure separability between the classes. These combined effects of SI and MSA can be expressed by the DCOFF, according to which the ACAR outperformed the other methods.

Finally, the evaluation of the proposed ACAR algorithm in an online performance task with 20 targets resulted in a significant increase in controllability. In this evaluation, all subject performed best with the ACAR as part of the preprocessing chain. As the ACAR filter increases the separability while reducing the noise, the subjects experienced a more smooth control of the arrow, resulting in a faster and more reliable completion of the tasks.

5 Conclusion

In this paper, the ACAR filter has been presented as an adaptive approach to improve the signal quality of monopolar recordings by significantly reducing the common noise level and increasing the spatial selectivity. This improvement has been quantified using an SNR measure and comparing it to three other methods commonly used in myocontrol. In contrast to other preprocessing methods, the ACAR filter does not need training or adjustments and is based on simple calculations suitable for online applications. The impact of the increased signal quality and separability has then been presented for classical EMG pattern classification, where the ACAR preprocessing generated an increased separability and distinctness of the different gesture classes in the feature space. Furthermore, the signal improvement was visible in the online regression control, with the simultaneous and proportional control of two degrees of freedom. As the latter approach leads toward a more natural control, the increased performance underlines the benefit and advantage of the proposed algorithm.

While this paper is focused on myocontrol applications, the ACAR filter might also have potential in other EMG applications.