**2. Strategies for EMG decomposition**

One of the most rudimentary strategies for isolation of MUAPs belonging to a common group is by means of a thresholding scheme. The central idea of this technique is to use a voltage threshold trigger for detection of MUAPs that have similar height, which is represented by the amplitude of the highest peak of a MUAP. In this method the experimenter positions the recording electrode so that MUAPs of interest are maximally separated from the background activity (noise). MUAP activities are then measured with a hardware threshold trigger, which generates a pulse whenever the measured voltage crosses the threshold. Such pulses may be used for triggering data collection and further storage of MUAPs or their occurrence time in a computer. The main advantages of this method are that: (i) It is easy to apply since it requires minimal hardware and software; (ii) It is a good starting point for detection of the strongest MUAPs. The main drawbacks of this technique are that: (i) The threshold level, mainly dependent on the signal-to-noise ratio, determines the trade-off between missed spikes (false negatives) and the number of background events that cross the threshold (false positives); (ii) Only a single feature (the MUAP highest peak) is used for data classification. As a consequence of this strategy two MUAPs with different shapes might be grouped together because they have similar peak amplitude.

The drawbacks related to the technique discussed above highlight the importance of a pre-processing stage prior to grouping MUAPs. The presence of high levels of background activity in the signal suggests that the use of a filter for reduction of the background activity is necessary. Different digital filters may be used for this purpose. Typically high band-pass filters are used for attenuation of very low frequency components in the signal related to noise, which can be either inherent from the hardware used for data acquisition or the contribution of distant MUAPs from the detection point.

Another common approach is the use of differential filters. Such filters are low-pass filters and have been used in many investigations. The main drawback of such filters is that they may generate artificial spikes and modify the shape of MUAPs. This has motivated the use of alternative filtering procedures, for instance, wavelets and a spatial filter, known as a Laplacian filter. The implementation of these filters as well as the introduction of an alternative method for EMG signal filtering is further discussed in the chapter.

2 Computational Intelligence in Electromyography Analysis: A Perspective on Current Applications and Future Challenges

detection of MUAPs from superficial muscles [8]. This advancement has received widespread support among researchers and clinicians because of the ease of use, reduced risk of infection, and the greater number of motor unit action potential trains obtained compared to needle

Currently, computer-based EMG has become an indispensable tool for investigations seeking to explain the state of the muscle. Different methodologies, ranging from simple quantitative measures to automatic systems that enable the assessment of neuromuscular disorders, have been developed [30]. Such tools are important for standardization of results and also they may reveal important features in the signals, which might be barely perceived from a manual

A typical system for extraction of MUAPs from EMG signals may require several stages of signal processing, for instance, signal detection and filtering (i.e., artefact removal) [45], feature extraction or selection [36], data clustering or classification [23]. Specific research may

One of the most rudimentary strategies for isolation of MUAPs belonging to a common group is by means of a thresholding scheme. The central idea of this technique is to use a voltage threshold trigger for detection of MUAPs that have similar height, which is represented by the amplitude of the highest peak of a MUAP. In this method the experimenter positions the recording electrode so that MUAPs of interest are maximally separated from the background activity (noise). MUAP activities are then measured with a hardware threshold trigger, which generates a pulse whenever the measured voltage crosses the threshold. Such pulses may be used for triggering data collection and further storage of MUAPs or their occurrence time in a computer. The main advantages of this method are that: (i) It is easy to apply since it requires minimal hardware and software; (ii) It is a good starting point for detection of the strongest MUAPs. The main drawbacks of this technique are that: (i) The threshold level, mainly dependent on the signal-to-noise ratio, determines the trade-off between missed spikes (false negatives) and the number of background events that cross the threshold (false positives); (ii) Only a single feature (the MUAP highest peak) is used for data classification. As a consequence of this strategy two MUAPs with different shapes might be grouped together

The drawbacks related to the technique discussed above highlight the importance of a pre-processing stage prior to grouping MUAPs. The presence of high levels of background activity in the signal suggests that the use of a filter for reduction of the background activity is necessary. Different digital filters may be used for this purpose. Typically high band-pass filters are used for attenuation of very low frequency components in the signal related to noise, which can be either inherent from the hardware used for data acquisition or the contribution

Another common approach is the use of differential filters. Such filters are low-pass filters and have been used in many investigations. The main drawback of such filters is that they may generate artificial spikes and modify the shape of MUAPs. This has motivated

sensor techniques [47].

be carried out in each of these steps.

**2. Strategies for EMG decomposition**

Computational Intelligence in Electromyography Analysis –

because they have similar peak amplitude.

of distant MUAPs from the detection point.

analysis [35].

262

Another relevant pre-processing step is the one that segments the EMG signal into windows containing active and inactive segments. This is a signal detection stage which aims to identify the activities of single MUAPs or their combinations, which is known as MUAP overlaps. Furthermore, this step separates noise in inactive segments from useful information in active segments. The detection of active and inactive segments may be performed visually or manually, i.e. the researcher may classify regions of an electromyographic signal into one of those categories, however such a method is time-consuming and requires concentration, which may introduce inconsistency in the signal analysis.

Different approaches may be employed for automation of this pre-processing stage: (i) The use of the root-mean square of the EMG signal together with a pre-defined threshold; (ii) A threshold proportional to the maximum peak in the signal; (iii) A threshold which is manually adjusted; (iv) Wavelets. The main assumption of this method is that there might be similarity between the mother wavelet and action potentials, and when the correlation between an active window and the mother wavelet is high an active segment is detected.

As one may note there exists a variety of strategies that could be considered for automation of the detection of active and inactive segments. Techniques that make an assumption about a pre-defined height and width of MUAPs may be more susceptible to failures, i.e. active regions that do not fit the predefined window will not be detected. Note also that the level of the background activity in the signal will also influence the determination of the beginning and end of active segments. The detection of active regions is further discussed in this chapter.

After detection of active regions it is possible to group them into logical units (clusters), however, it is very common to obtain features from those regions prior to data clustering. For example, morphological features of MUAPs, i.e. duration, amplitude, area, number of phases (number of baseline crossings) and number of turns (number of positive and negative peaks) have been employed. Other successful approaches include the use of coefficients of the Fourier transform, the coefficients of the Wavelet transform, the use of time samples of the band-pass filtered signal and low-pass differentiated signal, and the use of autoregressive and cepstral coefficients. Some other approaches, known as feature extraction and selection procedures, try to obtain features that maximize cluster separability. Examples of the use of such techniques include the application of Principal Component Analysis (PCA) and Independent Component Analysis (ICA).

The grouping of MUAPs is commonly performed by means of at least three distinct strategies: (i) Template matching: raw MUAPs, referred to as MUAP templates, are first classified or identified, and then used for classification of new MUAPs. The initial MUAP templates may be manually selected from the EMG signal or be chosen automatically from a clustering procedure. During data classification, usually MUAP templates are modified by an update rule, which takes into account the variability of MUAP shapes in the data set; (ii) Clustering: a clustering technique is used for grouping patterns represented by features selected from active regions; (iii) Hybrid: in this approach, first a clustering technique is used for grouping part of the data set (normally the first 3 to 5 seconds), and then the non-classified data set is grouped into one of the classes defined in the first step.

employed in the signal amplification and digitalization. As a result EMG signals are often

It may be very difficult, if possible at all, to extract useful information from very poor signal-to-noise ratio EMG signals. In some applications, for example, the decomposition of electromyographic signals, a high level of background activity could impede the accurate segmentation of the signal into regions of activity that may represent the activity of single motor unit action potentials, influencing thus the final results of the EMG decomposition.

Since its introduction, the low-pass differential filter (LPD) [44] has been widely employed in EMG signal processing [15, 19, 32, 40–42]. This filter is implemented in the time-domain as:

where *xk* is the discrete input time-series and *yk* is the filtered output. *N* is the window width to adjust the cut-off frequency. Increasing *N* will reduce the cut-off frequency of the filter. This

*x*[*k* + *n*] −

Its representation in the frequency domain may be obtained via its Z transform as follows,

*x*[*k* + *n*]

*Z*(*x*[*k* + *n*]) −

*<sup>z</sup>nX*(*z*) <sup>−</sup>

where the ratio *Y*(*z*)/*X*(*z*) is the filter transfer function *H*(*z*), *f* is the frequency in Hz and *fsr*

Figure 1 presents the results of the estimate of the filter transfer function with different sizes of windows, *N* = 40 and *N* = 20. Note how the cut-off frequency is shifted to a higher frequency

 *N* ∑ *n*=1

 *N* ∑ *n*=1

*N* ∑ *n*=1

*N* ∑ *n*=1

*Y*(*z*) = *X*(*z*)

*N* ∑ *n*=1

> − *Z*

*N* ∑ *n*=1

(*z<sup>n</sup>* <sup>−</sup> *<sup>z</sup>*−*n*)

*N* ∑ *n*=1

*z*<sup>−</sup>*nX*(*z*)

 *z*=*e j*2*π f fsr*

 *N* ∑ *n*=1

*Z*(*x*[*k* − *n*])

(*xk*<sup>+</sup>*<sup>n</sup>* − *xk*−*n*), (1)

*x*[*k* − *n*]

*x*[*k* − *n*]. (2)

EMG Decomposition and Artefact Removal 265

**3.1. Conventional methods for EMG signal noise removal**

*yk* =

may be easily perceived if Equation 1 is studied in the frequency domain.

*y*[*k*] =

*Z*(*y*[*k*]) = *Z*

*Z*(*y*[*k*]) =

*Z*(*y*[*k*]) = *Y*(*z*) =

is the sampling frequency in Hz.

when the window size is reduced.

For this, consider the following difference equation obtained from Equation 1:

*N* ∑ *n*=1

*N* ∑ *n*=1

corrupted by noise.

*3.1.1. Low-pass differential filter*

Both the template matching and hybrid techniques require a priori identification of patterns in the data set before classification of the entire data set. The main disadvantage of these methods is that if new MUAP classes appear they will not be identified. The main advantage is that extra information regarding MUAP activities, e.g. the study of the firing time of MUAPs, may be taken into account in the final classification. The clustering approach has the advantage that it makes no assumptions about the data set to be grouped.

The main processing steps discussed so far form the basis of a complete EMG decomposition system. When the final application of such system is to study the firing behaviour of sources that generate MUAPs, it may be necessary to include an extra stage that deals with a problem known as MUAP overlaps. Overlapping spikes occur when two or more spikes fire simultaneously. When using the clustering technique for grouping active segments it may be possible to detect such overlaps as outliers. There are at least three strategies for dealing with overlaps: (i) Once a spike is classified it is subtracted from the active segment, in the hope that this will improve the classification of subsequent spikes. This approach requires a template of the spike. It yields reasonable results when two spikes are separated well enough so that the first can be accurately classified, but fails when the spikes are close together. Another problem with this approach is that the subtraction can introduce more noise into the waveform if the spike model (template) is not accurate. Also subtraction-based approaches may introduce spurious spike-like shapes if the spike occurrence is not accurately estimated; (ii) Another approach is to compare all possible combinations of two or more spike models. However, for some applications the computation time for performing this comparison may be prohibitive; (iii) The use of multiple electrodes or an array of electrodes may reduce the problem of overlapping spikes, because what appears as an overlap on one channel might be an isolated unit on another. Since the main aim of solving the overlapping problem is to increase the accuracy of estimators (e.g. mean) obtained from the firing of motor units, an alternative option might be to work directly with a precise estimate of the estimator considering missing data points (i.e that some MUAPs are missing).

Finally, once the system is designed and implemented it is important to test its accuracy. At least three methods are well accepted for this purpose: (i) Synthetic signals: artificial EMG signals are generated and employed for testing the stages of the system. The main advantage of this approach is that the characteristics of the analyzed signal are totally known; (ii) Manual classification of MUAPs: MUAPs are visually classified by the researcher and the results of this classification are used as reference for evaluation of the automatic classification; (iii) Comparison between MUAP activities from different channels: the consistency of the decomposition data of the same units from two different electrodes provides an indirect measure of the accuracy in real data decomposition.
