Motor Unit Potential Train Validation and Its Application in Emg Signal Decomposition

Electromyographic (EMG) signal decomposition is the process of resolving an EMG signal into its constituent motor unit potential trains (MUPTs). The purpose of EMG signal decomposition is to provide an estimate of the firing pattern and motor unit potential (MUP) template of each active motor unit (MU) that contributed significant MUPs to the EMG signal. The extracted MU firing patterns, MUP templates, and their estimated feature values can assist with the diagnosis of neuromuscular disorders (Stalberg & Falck, 1997; Troger & Dengler, 2000; Fuglsang-Frederiksen, 2006; Pino et al., 2008; Farkas et al., 2010), the understanding of motor control ( De Luca et al. 1982a, 1982b; Contessa et al.,2009), and the characterization of MU architecture (Lateva & McGill, 2001), but only if they are valid trains. Depending on the complexity of the signal being decomposed, the variability of MUP shapes and MU firing patterns, and the criteria and parameters used by the decomposition algorithm to merge or split the obtained MUPTs, several invalid MUPTs may be created.


Introduction
Electromyographic (EMG) signal decomposition is the process of resolving an EMG signal into its constituent motor unit potential trains (MUPTs). The purpose of EMG signal decomposition is to provide an estimate of the firing pattern and motor unit potential (MUP) template of each active motor unit (MU) that contributed significant MUPs to the EMG signal. The extracted MU firing patterns, MUP templates, and their estimated feature values can assist with the diagnosis of neuromuscular disorders (Stalberg & Falck, 1997;Tröger & Dengler, 2000;Fuglsang-Frederiksen, 2006;Pino et al., 2008;Farkas et al., 2010), the understanding of motor control ( De Luca et al. 1982a, 1982bContessa et al.,2009), and the characterization of MU architecture (Lateva & McGill, 2001), but only if they are valid trains. Depending on the complexity of the signal being decomposed, the variability of MUP shapes and MU firing patterns, and the criteria and parameters used by the decomposition algorithm to merge or split the obtained MUPTs, several invalid MUPTs may be created.
An extracted MUPT is considered valid when it accurately represents the activity of a single MU and is contaminated by low numbers of false-classification errors (FCEs). Alternatively, an invalid MUPT either represents the activity of more than one MU (i.e., it is a merged MUPT) or contains a high percentage of FCEs (i.e., it is a contaminated MUPT).
Unfortunately, the MUP template shapes and MU firing patterns of invalid MUPTs cannot be easily distinguished from those of valid trains. Often, the MUP template shape of an invalid train looks similar to that of a valid train; nevertheless, the train does not represent the MUPs of a single MU. As such, the variability of MUP shapes and possibly the MU firing pattern are greater for invalid trains compared to valid trains. If such inaccurate information is not detected and excluded from further analysis, it could improperly suggest an abnormal muscle when interpreted clinically or it may contribute to scientific misstatements. Consequently, the first and most critical step in the quantitative analysis of MUPTs is assessing their validity.
Detecting invalid trains during decomposition can assist with improving the performance of these decomposition methods in terms of estimating the correct number of MUPTs constituting an EMG signal as well as reducing the number of missed-classification errors (MCEs) and FCEs in the extracted trains. At the end of each pass of assigning MUPs to detected MUPTs, invalid MUPTs are detected and then either have their FCEs corrected or are split into valid trains. Such corrections can help find the correct number of constituent www.intechopen.com Applied Biological Engineering -Principles and Practice 322 MUPTs, lead to better estimates of the MUP template and MU firing pattern statistics of each train, and also allow more MUPs to be correctly assigned to the obtained trains (i.e., reduce MCEs) during the next steps of decomposition. Consequently, MUPT validation can improve decomposition accuracy.
The majority of the existing MUPT validation methods are either time consuming or related to operator experience and skill (see Section 3). More importantly, they cannot be executed during automatic decomposition of EMG signals to assist with improving decomposition results. To overcome these issues, an automated system is presented to estimate the validity of MUPTs extracted from an EMG signal using a decomposition algorithm. The presented system to estimate the validity of a MUPT uses both its MU firing pattern information and its MUP shape information. MU firing pattern information is employed by a supervised classifier that determines MU firing pattern validity by assessing MU firing pattern consistency and MU firing pattern variability of the train under question. MUP shape information is used by a cluster validation-based algorithm that assesses the MUP shape consistency in the given train to determine its MUP shape validity. A train is considered valid based on a combination of its MU firing pattern and MUP shape validity. The MUP validation system can be used both during EMG signal decomposition and once the process is completed.
The effectiveness of using the developed MUPT validation systems and the MUPT editing methods during EMG signal decomposition was investigated by integrating these algorithms into a certainty-based EMG signal decomposition algorithm. During decomposition, invalid MUPTs are detected and then either have their FCEs corrected or are split into valid trains before decomposition continues. The minimum assignment threshold for each extracted MUPT is adjusted based on the estimated validity. With these modifications, the decomposition accuracy on average was improved 9% on average. This chapter includes a brief review of the composition and decomposition of EMG signals, a discussion of MUPT validation concepts, a description of a system developed for automatic validation of MUPTs during EMG decomposition, and a discussion of a decomposition system that uses the proposed MUPT validation algorithm to merge or split MUPTs and to adjust the assignment threshold for each MUPT adaptively. Evaluation results using several simulated and real EMG signals and a discussion of the results will be presented at the last section.

EMG signal composition and decomposition
To appreciate the concepts of EMG signal decomposition, it is crucial to be familiar with the composition of an EMG signal. This section presents the fundamentals of EMG signal composition followed by a discussion of EMG signal decomposition.

EMG signal composition
An EMG signal is the sequence of voltages detected from a contracting muscle over time. The potentials are detected in the voltage field generated by the active muscle fibres of a contracting muscle. The muscle fibres of a muscle are organized into groups for the control of muscle force with each muscle fibre of a group being connected to an α-motor neuron. Each muscle fibre of a group is activated concurrently by the -motor neuron to which they 323 are connected. Formally, a single α-motor neuron, its axon and the set of connected muscle fibres are called a MU (Basmajian & De Luca, 1985). The summation of the muscle fibre potentials created by the spatially and temporally dispersed depolarization and repolarization of all of the excited fibres of a single MU is known as MUP.
During a muscle contraction, MUs fire repetitively to maintain the force of the muscle contraction. Consequently, each active MU generates a train of MUPs during a muscle contraction known as MUPT. A MUPT is mathematically described as (De Luca, 1979;Basmajian & De Luca, 1985;Stashuk, 2001;Parsaei et al., 2010): where M is the number of times that the j th motor unit fires,  ji is the i th firing time of motor unit j, and MUP ji (t) is the i th MUP generated by motor unit j during its i th firing.
Assuming K MUs were active during a muscle contraction, the detected EMG signal can be mathematically represented as (De Luca,1979;Basmajian & De Luca, 1985;Stashuk, 2001;Parsaei et al., 2010): where MUPT j (t) is the MUPT generated by the j th motor unit, and ) t ( n is background noise. Fig.1 shows both an anatomical and physiological model for an EMG signal. In this figure, h i (t) is a filter with impulse response MUP i , and the impulses represent action potentials emerging from an motor neuron to innervate the connected muscle fibers. As shown, an EMG signal is in fact the superposition of the MUPTs created by MUs active during a muscle contraction and background noise.
The characteristics of a detected EMG signal depend on several factors such as the level of contraction, the shape and size of the electrode used, and the position and orientation of the electrode relative to the muscle fibres of the active MUs (De Luca, 1979;Basmajian & De Luca, 1985). In addition, the characteristics of an EMG signal detected from a contacting muscle are related to the anatomical and physiological features of the muscle and therefore to its age and state of health or fatigue (Stalberg & Falck, 1997;Tröger & Dengler, 2000;Fuglsang-Frederiksen, 2006;Pino et al., 2008;Farkas et al., 2010). Some parameters of EMG signals for normal and abnormal muscles are compared in Table 1. Consequently, analyzing EMG signals provides information that can be used clinically or for physiological investigation. The technique of detecting, evaluating, and analyzing EMG signals is known as electromyography. One useful technique in electromyography is EMG signal decomposition.

EMG signal decomposition
EMG signal decomposition is the process of resolving a detected EMG signal into is constituent MUPTs. This process that is conceptually shown in Fig.2 is implemented by employing digital signal processing and pattern recognition techniques in four/five steps: www.intechopen.com Applied Biological Engineering -Principles and Practice 324 signal preprocessing, signal segmentation and MUP detection, feature extraction, and then clustering and possibly supervised classification of detected MUPs (Stashuk, 2001;Parsaei et al., 2010).The first step is to remove background noise and low-frequency information from the detected EMG signal, to shorten the duration of MUPs and decrease MUP temporal overlap, and to sharpen the MUPs and increase discrimination between them. The second step is to section the signal into segments containing possible MUPs that were generated by active MUs that contributed significantly to the detected EMG signal. The detected MUPs are represented by a feature vector in the third steps and finally are sorted into MUPTs using clustering and/or supervised classification technniques. If a full or complete decomposition is required, superimposed MUPs (SMUPs) are resolved into their constituent MUPs in another step. For clinical use of EMG signal decomposition results, where only mean MU firing rate and MU firing rate variability are to be studied, resolving SMUPs is not essential ( Stashuk,1999( Stashuk, ,2001 because the desired MU firing parameters can be estimated from incomplete discharge patterns (Stashuk & Qu, 1996b;Stashuk, 1999). However, for detailed studies of MU control and muscle architecture, SMUPs must be resolved. A recent comprehensive review of the algorithms developed for the decomposition of indwelling EMG signals is provided by Parsaei et al. (2010).  Table 1. Some parameters of EMG signals for normal and abnormal muscles. Once the decomposition process is completed, the prototypical MUP shape (MUP template) and MU firing pattern statistics for each extracted MUPT are estimated for future analysis (especially for quantitative electromyography). This provides information, regarding the temporal behaviour and morphological layout of the MUs that significantly contributed to the detected EMG signal, which can assist with the diagnosis of various neuromuscular diseases and the study of MU control, and lead to a better understanding of healthy, pathological, ageing or fatiguing neuromuscular systems ( De Luca et al., 1982a, 1982bStalberg & Falck, 1997;Tröger & Dengler, 2000;Stashuk, 2001;Fuglsang-Frederiksen, 2006;Calder et al., 2008;Farkas et al., 2010). However, this is achieved only when this information is valid. In fact, before using decomposition results and the MUP shape and MU firing pattern information for either clinical or research purposes the validity of the extracted MUPTs needs to be confirmed.

MUPT validation
In general, validating a MUPT is a process of determining whether a given MUPT accurately represents the activity of a single MU or not. The validity of a MUPT can be defined using two different criteria: MU firing pattern validity, and MUP shape validity.
MU firing pattern validity of a MUPT is determined by assessing its inter-discharge interval (IDI) histogram (density function) and the instantaneous firing rate of the corresponding MU versus time. The MU discharges corresponding to a valid MUPT occur at regular intervals and in general, have a Gaussian-shaped IDI histogram while for invalid MUPTs the IDIs have large variations and will not have a Gaussian-shaped IDI histogram. Even though some researchers have demonstrated that the IDI distribution of a MU may not actually be Gaussian (De Luca & Forrest,1973;Matthews, 1996), for MUPTs of MUs that are consistently recruited, the Gaussian density is an appropriate approximation (Clamann, 1969;Stashuk, 1999;Moritz et al., 2005;Rasheed et al., 2010;. If an extracted MUPT represents the firing of a single MU and has suitably low percentage of FCEs (FCE rate), it has MU firing pattern validity. As an example, the first two MUPTs shown in Fig. 3 have MU firing pattern validity, but the third MUPT does not have firing pattern validity.
To determine MUP shape validity, a given train is assessed using the shapes of its MUPs. Assuming the MUPs generated by a single MU are homogeneous in shape, the MUPT under study can be assumed to have MUP-shape validity when its MUPs have consistent shapes. As an example, MUPTs shown in the first and third rows of Fig. 3 have MUP-shape validity; however, the MUPT given in the second row does not have MUP-shape validity.
Finally, a train can be considered valid based on a combination of its MU firing pattern and MUP shape validity. For example, the first MUPT shown in Fig. 3, which has both MU firing pattern and MUP shape validity, is considered valid, but the MUPTs shown in rows 2 and 3 will be labelled invalid because they do not have MUP-shape or MU firing pattern validity.
To date, MUPT validation is mainly conducted qualitatively by an expert operator. The MUP shape validity of a MUPT is assessed by an expert using raster/shimmer plots of its assigned MUPs ( Doherty & Stashuk,2003;Stashuk, 2001;Stashuk et al., 2004;Boe et al., 2005, Calder et al., 2008Parsaei et al., 2010). MU firing pattern validity of a MUPT is determined by viewing and qualitative evaluation of its IDI histogram and the plots of the firing rate as a function of time. The accuracy of such qualitative MUPT evaluations, as with other methods that need operator supervision, depends on operator experience and skill. In addition, such evaluations are too time consuming to be practically completed in a busy clinical environment. More importantly, manual MUPT validation methods cannot assist with improving the performance of automatic EMG signal decomposition algorithms. To overcome these issues, methods need to be developed to automatically estimate the validity of a given MUPT.
McGill and Marateb (2010) developed a rigorous statistical method for assessing the validity of MUPTs extracted by decomposing an EMG signal. The evaluation results are encouraging, but due to the computational complexity of the procedures used in this method, the algorithm is only efficient for assessing the decomposition accuracy of 5-second-long, low-complexity signals composed of at most 6 MUPTs. In addition, full decomposition in required in this method. Therefore, this method cannot be used during decomposing or in a busy clinical environment. Parsaei and his co-workers Parsaei&Stashuk, 2011a) developed several methods for automatic validation of MUPTs extracted by a decomposition algorithm: a MU firing pattern based validation method, and a MUP shape based validation method. Across the sets of real and simulated data used for evaluating each of these two MUPT validation methods, the methods performed well in categorizing a train correctly. In addition these methods are fast enough to be used during the decomposition process. However, the accuracy of the firing pattern validity system in correctly classifying invalid trains decreases as the MCE rate (percentage of MCEs) in the MUPTs increases such that this accuracy was reduced to < 60% when the MCE rate was >80%. Likewise, the accuracy of the MUP-shape validation methods decreases as the separability between the trains used to create an invalid train decreases such that the methods failed to detect the majority ( >80%) of invalid trains composed of MUPTs with highly similar MUP templates. In this work, using both the MU firing pattern and MUP shape information of a MUPT to estimate its validity was explored with the hope of overcoming these two issues; the achievements of these efforts are presented in this chapter. The objective of developing such methods was to: 1) facilitate the use of intramuscular EMG signal decomposition results for clinical applications of quantitative electromyography by providing the overall validity of MUPTs and excluding or highlighting invalid MUPTs; 2) assist with improving the accuracy and completeness of decomposition results. Using the characteristics of the IDI distribution, MU firing patterns, and within train MUP shape variability of invalid MUPTs two methods based on a combination of feature extraction, cluster validation techniques and supervised classification algorithms were developed; details are presented in the following Section.

An automated system for estimating MUPT validity
As discussed in the previous section and illustrated in Fig.3, the characteristics of IDI histograms, MU firing rates over time, and within-train MUP shape inconsistencies of invalid trains differ from those of valid trains. These facts motivate the development of an automated system to determine whether a given MUPT accurately represents the activity of a single MU (i.e., is valid) or not. With the developed MUPT validation method, a given train is considered valid if it has both MU firing pattern validity and MUP-shape validity; otherwise, the train is labelled invalid. MU firing pattern validity is estimated by a firing pattern validity classifier (FPVC) that uses a supervised classifier along with several features extracted from the IDI histo-gram and instantaneous firing rate of the MUPT. MUP-shape validity is determined by assessing the homogeneity of the wave shape of the MUPs of the given train using a MUP-shape validity system that is mainly based on a cluster validation technique. The overall procedure of the system is illustrated in Fig.4. Both the MU firing pattern system and MUP-shape validation system used are discussed below. Fig. 4. The procedure of the developed MUPT validation system that estimates the validity of a MUPT by combining its MU firing pattern validity and MUP shape validity estimated using a supervised classifier and a cluster validation technique.

Firing pattern validity classifier
The overall procedure of the developed FPVC is shown in Fig. 5. The goal of using the FPVC is to determine whether a MUPT accurately represents the firings of a single MU or not. This categorization is performed by a supervised classifier that uses nine features extracted from the IDI histograms and MU firing rates of the given MUPT.
The features used in this work are listed in Table 2; detailed definitions and calculation methods for these features are presented in Parsaei, 2011). In short, the majority of these features are extracted from the IDI distribution of the given MUPT and target the left side of this distribution, where short IDIs (i.e., the errors of interest) are reflected. The identification rate targets the right side of the IDI distribution to measure the MCE rate in the MUPT. The firing rate mean consecutive difference measures the variation in the instantaneous firing rate over time. The instantaneous firing rate at each MUP occurrence in a MUPT is defined as the inverse of a local IDI that is obtained by applying a normalized Hamming filter of length 11 to the IDIs of the train.  For supervised classification, a support vector machine (SVM) classifier (Vapnik, 1999), which uses a Gaussian radial basis function (Eq.3) as a kernel, was employed.
where x is an input data point to a SVM, ' x is the centre of the kernel and 2  is the width of the kernel specified a priori by the user. In training a SVM, in addition to 2  there is another parameter that has to be selected by the user, the cost parameter, C. This parameter, which is also known as the regularization parameter, controls the trade off between allowing training errors and the complexity of the machine. For the objectives of this work, 2  and C were determined experimentally using cross-validation.

MUP -shape validity system
Assuming the MUPs generated by a single MU are homogeneous in shape (but with possibly different degrees of variability across different MUs), the MUP-shape validity of a MUPT can be estimated by assessing the shape consistency of its MUPs. Overall, the process of EMG signal decomposition can be considered a clustering problem because neither the number of MUPTs (i.e., clusters) nor the labels of the MUPs are known in advance. During EMG signal decomposition, detected MUPs are clustered into groups called MUPTs. Therefore, the MUP-shape validation of a MUPT extracted by a decomposition algorithm can be considered a cluster validity problem and the decision to be made is whether the extracted MUPT represents one cluster in terms of the shapes of the assigned MUPs or not. For this purpose, in this work the Beal method (Gordon, 1999), and the Duda and Hart (DH) method (Duda et al., 2000), which are presented for estimating the numbers of clusters in a data set, were employed to develop two automated MUP-shape validation systems. Although numerous methods have been developed to estimate the number of groups in a dataset (Milligan & Cooper, 1985;Gordon, 1999), the majority of these methods cannot be used for assessing MUP-shape validity of a MUPT because of one of these two reasons: a) they cannot be used for testing one cluster versus multiple clusters in a dataset; b) they are computationally too expensive to be used for online validation of MUPTs and especially during EMG signal decomposition (Parsaei, 2011;Parsaei & Stashuk, 2011a).
For a data set consisting of N observations (patterns) each of which repented by d uncorrelated feature values, both the Beal and DH methods test the existence of clusters in the data set by comparing its within cluster dispersion (W 1 ) to the resulting within cluster dispersion when it is partitioned into two clusters using a clustering algorithm (W 2 ). The parameter W K (k=1,2) is usually given by where X is a vector of features representing each object of the given data set, m i is the sample mean of the N i objects assigned to cluster C i .
For the Beal method (Gordon, 1999), the null hypothesis of a single cluster is rejected in favor of multiple clusters if: where the value for F critical i s o b t a i n e d f r o m a n F d,(N-2)d distribution at an   level of significance.
For the DH method (Duda et al., 2000), the null hypothesis of one cluster is rejected if where z is given by The effectiveness of Beal and DH methods in estimating the MUP-shape validity of a MUPT was investigated using some simulated MUPTs (see Section 6 for the description of the simulated data). For a given MUPT, each of its MUPs is represented using the 80 low-pass differencing (LPD) filtered data samples centred about its peak value (i.e., d=80) and then the MUP-shape validity of the given train was determined using one of these two methods. To split the given train into two clusters, the K-means algorithm was used.
The LPD filtered samples were used instead of unfiltered samples because they discriminate between the MUPs generated by different MUs better than the raw. The 1 st -order LPD filter  used is, in fact, a two-point central difference algorithm (Semmlow, 2004) that acts as a differentiator for the lower frequencies and as a low-pass filter for higher frequencies.
where L is the skip factor and T S is the sampling interval.
It is worth pointing out that a 2 nd -order LPD filter was also evaluated for filtering the MUPs, but the accuracy obtained for classifying valid MUPTs was drastically decreased compared to the accuracy obtained when the MUPs are filtered using a 1 st -order LPD filter. Therefore, a 1 st -order LPD filter is preferred to a 2 nd -order one.
Preliminary tests showed that when representing MUPs using LPD filtered time samples, neither the Beal method (Gordon, 1999) nor the DH method (Duda et al., 2000) (each with α =0.05) was accurate in correctly classifying valid trains. Their accuracy for classifying a valid train correctly was only 5% while that for an invalid train was 99%. The reason for the low accuracy for valid MUPTs were discovered to be: 1) the 80 LPD filtered time samples used as features are highly correlated; 2) the algorithms are sensitive to the inherent MUP shape variability in the valid MUPTs caused by jitter or jiggle (Stålberg & Sonoo, 1994); valid MUPTs with high jitter or jiggle are erroneously classified as invalid trains. To overcome these two issues, an adaptive method based on a combination of feature extraction techniques and the Beal orDH method was developed. An overview of the system is given in Fig. 6. A brief description of each step is given below, detailed discussion can be found elsewhere (Parsaei, 2011;Parsaei & Stashuk, 2011a).

Prepossessing
Preprocessing was completed to increase the signal-to-noise ratio (SNR) of the MUPs, sharpen MUPs, and ultimately enhance the discrimination between the MUPs created by two or more different MUs but mistakenly assigned to one MUPT. For this purposes, MUPs of a MUPT each of which represented using 80 time samples are filtered using a LPD filter (Eq. 7). Fig. 7 shows the effectiveness for a MUPT that consists of the MUPs of two MUs. As shown, LPD filtering increased the distinguishability of the MUPs and ultimately clarified that the given train is an invalid train.

Feature extraction
The feature extraction step is to extract/select effective, uncorrelated, and discriminative features out of the 80 LPD filtered sample points used to represent the MUPs of a MUPT. These features can be extracted using principal component analysis (PCA), however due to computational complexity of the PCA, a PCA-based MUPT validation algorithm will be slow and ultimately will not be efficient to be used during EMG decomposition (Parsaei, 2011;Parsaei &Stashuk, 2011a). In this work a gap-based feature selection technique which is based on the way that a human would assess the validity of a MUPT using its MUP shimmer plot was employed for feature extraction. A human operator visually assesses the consistency of the shapes of the MUPs assigned to a MUPT by inspecting the existence of any gap or obvious differences between specific Given gap values and active parts are respectively estimated and identified for the MUPT under study, the sample corresponding to the maximum gap value in each active part is chosen as an effective feature. Consequently, the number of selected features will be equal to the number of active parts. Additional features, if required are selected based on their gapvalues and also their intervals from the previous selected features. Each feature should have the maximum gap value among the remaining samples and also be at least eight samples (i.e. 0.26 ms) before or after any selected features.

Setting the parameter 
The objective of setting the value for parameter , that is the significance level for rejecting the null hypothesis of valid train, is to make the algorithm less likely to reject the MUPshape validity of a given MUPT when its MUPs are very similar to each other, and more likely to reject this null hypothesis when the MUPs of a MUPT are less similar to each other. To achieve this, the value of parameter  is set adaptively by first splitting a considered MUPT into two sub-trains using the K-means algorithm. The pseudo-correlation (PsC) between the MUP templates of the two sub-trains is then calculated as a measure of their similarity. Denoting S 1 and S 2 as the MUP templates of the two sub-trains, the PsC value between these templates is defined as (Florestal et al., 2006

Estimating MUP-shape validity
The MUP-shape validity which in this work is "1" when the shapes of the MUPs of a train are consistent and "0" vice versa is estimated using either Beal criterion or DH criterion as follows: a. Using the Beal criteria: If Bi <F d,(N-2)d at an α level of significance, MUP-shape validity=1; otherwise MUP-shape validity=0. b. Using DH method: If J<z, MUP-shape validity=1; otherwise MUP-shape validity=0.
In the remaining of this Chapter, the MUP-shape validation system that is based on the Beal criterion (Gordon,1999) is called the SVB method and the one developed using the Duda and Hart criterion (Duda et al., 2000) is called SVDH method.

Application of MUPT validation in EMG decomposition
The hypothesis is that if invalid trains are detected and corrected during EMG decomposition, especially during the classification step, the decomposition accuracy will be improved. The effectiveness of using the developed MUPT validation system during EMG signal decomposition was studied by integrating this system into a certainty-based EMG signal decomposition algorithm used in the DQEMG (Stashuk, 1999). In the original certainty-based EMG signal decomposition, the detected MUPs are grouped into several MUPTs using a shape and temporal-based clustering (STBC) algorithm (Stashuk&Qu, 1996a) and a supervised certainty-based classifier (CBC). The STBC algorithm is a customized K-means clustering method that uses both MUP shape and MU firing pattern information to cluster MUPs. In the STBC, MUPTs are split or merged based on several heuristic criteria. Assuming the MUPTs provided by the STBC algorithm are valid, they are augmented by the CBC algorithm (Stashuk&Paoli, 1998) in which a MUP is assigned to the MUPT that has the greatest certainty value, if this value is greater than a certainty assignment threshold (C AT ). Otherwise, the MUP is left unassigned. In the CBC algorithm, two MUPTs are merged if the resulting MUPT satisfies several predefined heuristic criteria but the MUPTs are not split nor assessed for splitting. The new decomposition system presented in this chapter employs the developed MUPT validation system -instead of those heuristic, user defined criteria-to merge or split MUPTs. The new system also adjusts the C AT value for each individual MUPT adaptively based its validity. The new decomposition program, which is called the validity-based EMG decomposition system, consists of four major steps: signal preprocessing, MUP detection, and clustering and supervised classification of the detected MUPs.

Signal preprocessing
The signal preprocessing step is involved with filtering the signal to improve the SNR of the signal, decrease MUP temporal overlap, to accentuate the differences between MUPs created by different MUs, and to increase the separation between MUPs and the background noise. For this purpose, a 1 st -order LPD filter  is employed. Fig.8 shows the effectiveness of LPD filtering an EMG signal. As shown, filtering flattens the signal baseline and makes the MUPs more narrow and recognizable.

MUP detection
MU detection identifies the position of the MUPs in a given EMG signal. The positions of suitable MUPs in the filtered signal are detected using a threshold crossing technique by which the prefilterd EMG signal is scanned and the peaks that satisfy several criteria (Stashuk, 1999) are detected and considered as the occurrence times of MUPs. In general, the amplitudes of detected MUPs are higher than the baseline noise. Fig. 8 illustrates the segmentation procedure for an EMG signal.
For clustering and supervised classification, each detected MUP is represented using the 80 filtered data samples (i.e., 2.56 ms at 31250 Hz sampling rate), centered about its peak value (i.e., about the position of maximum slope of the unfiltered MUP data).

Clustering of the detected MUPs
Detected MUPs are clustered to obtain the initial information required for supervised classification such as estimates of the number of MUPTs, their prototypical MUP shapes (or templates), and their MU firing pattern statistics. To extract such information, the MUPs detected in a specified portion (a 5 second interval with the highest number of detected MUPs) of the EMG signal are input to the STBC algorithm (Stashuk & Qu, 1996a) that groups the detected MUPs into several MUPTs using both firing time and shape information across multiple iterations. The initial estimate of the number of clusters (number of active MUs) is equal to the maximum number of MUPs and the initial cluster centers are the actual MUPs in the 30 ms interval within the selected 5 second interval. Having estimates for the number of clusters and their centers, each detected MUP is assigned to the closest cluster, if its distance to the core of the closest cluster is smaller than 0.25 times that of the second smallest distance from the candidate MUP and the cluster centers. In the STBC, a MUPT will be split into two trains if it includes a MU firing pattern inconsistency. Similar MUPTs are merged if their MUP templates are close and the firing pattern of the merged MUPT satisfies several criteria. The MUP assignment, cluster splitting, editing, and merging steps are repeated until the resulting MUPTs are stable. Details of the STBC algorithm can be found in (Stashuk & Qu, 1996a). Fig. 8. The effectiveness of LPD filtering and the segmentation procedure for an EMG signal. A portion of the signal containing ten MUPs (top row). The LPD filtering results for this portion. Gray region shows the estimated level of baseline noise.

Supervised classification of detected MUPs
Having the initial information about possible MUPTs provided by the clustering step, the detected MUPs are assigned to MUPTs using a supervised classifier. The objective here is to assign each MUP to the MUPT for which the MUP's time of occurrence and shape are more consistent with respect to the MU firing times and MUP shapes of the selected MUPT, respectively, than to the other MUPTs. Each of the MUPTs should have low MCE and FCE rates and represent the activity of a single MU that contributed detected MUPs to the given EMG signal. In this work, a new adaptive certainty-based classifier was developed for this purpose.
The CCB (Stashuk & Paoli, 1998) is a supervised classifier that combines both MUP shape and MU firing pattern information to calculate the confidence of assigning a candidate MUP (let's say MUP j ) to a MUPT. The certainties for assigning MUP j are evaluated for the two trains that have the most and the next most similar MUP templates found by calculating the Euclidian distance between MUP j and the MUP template of each MUPT. The certainties are calculated by combining MUP shape and MU firing pattern certainties. MUP shape certainty includes normalized absolute shape certainty (C ND ) and relative shape certainty (C RD ). The first represents the distance from MUPj to the template of a train, normalized by the energy of the template. The second represents the distance from MUP j to the most similar MUP template relative to the distance of MUP j to the next most similar MUP template. Firing pattern certainty, C FC , measures the consistency of the occurrence time of MUP j relative to the established MU firing pattern of a MUPT. Having the shape certainties and the firing pattern certainty, the overall certainties for assigning the MUP j to one of the two selected MUPTs are estimated by multiplying the shape and firing pattern certainties as where C j i is the overall certainty of assigning MUP j to MUPT i which is one of the two closest MUPT to MUP j . Having C j i , MUP j is assigned to the MUPT that has the greatest certainty value, if this value is greater than a C AT . Otherwise, the MUP is left unassigned.
In order to accommodate non-stationarity in MUP shapes, the algorithm updates the MUP templates with each MUP assignment. The MUP templates are calculated using a moving average for which the weights are the certainties with which MUPs are assigned to the MUPTs. If MUP j is assigned to MUPT i with certainty C j i higher than the updating threshold (0.6 in this work) the template of MUPT i (S i ) is updated as (Stashuk & Paoli, 1998): where a j is the feature vector of MUP j .
Once each classification pass through the set of detected MUPs is completed and before decomposition (the next pass) continues, the validity of each extracted MUPT is assessed using the system discussed in Section 4. Invalid trains are detected, corrected and have their C AT values adjusted. Merged MUPTs are split into valid trains using the K-means clustering algorithm; contaminated MUPTs have their FCEs corrected using an automated MUPT editing algorithm (Parsaei&Stashuk, 2011b).
To decrease the number of MCEs and FCEs in the MUPTs, the C AT value for each MUPT is adjusted based on its validity (i.e., an adaptive adjustment of the assignment threshold). For invalid MUPTs (either merged or contaminated), the C AT is increased by a step of 0.005 while the C AT of valid trains is decreased by 0.005. The C AT value of a MUPT is not decreased or increased below 0.005 or above 0.990, respectively.
In addition to splitting or editing invalid MUPTs, the chance of merging single MUPTs is evaluated. Pairs of MUPTs that have similar MUP templates (PsC ≥ 0.4) are merged if the resulting train is valid.
The MU firing pattern statistics of each MUPT are estimated using an error-filtered estimation algorithm that provides accurate estimates of these IDI statistics of a MUPT even when contaminated by a high MCE rate (Stashuk&Qu, 1996b). The MUP assignment and MUPT splitting, editing, and merging steps are repeated until either, the maximum number of iterations is exceeded or the MUPTs are stable. If trains are merged or split at least one more supervised classification pass will be completed.

Evaluation
The performance of both the MUPT validation system and the new decomposition algorithm was evaluated using both simulated and real data. For this purpose, the simulated and real reference data described in (Parsaei&Stashuk, 2011a) were used.
The simulated data was generated using a physiologically-based EMG signal simulation algorithm [54]. Two hundred and sixty one, 30-second-long, EMG signals with different levels of intensity, ranging from 24 to 193 pulses per second (pps), with MUP jitter values ranging from 50 to 150µs, with IDI variability (i.e., IDI-CV) ranging from 0.10 to 0.45, and with various myopathic or neurogenic degrees of involvement ranging from 0 to 50% were created.
The real data was comprised of three sets of EMG signals: single-channel EMG signals provided by Nikolic (2001); single-channel EMG signals provided by McGill (n.d.); and multi-channel (6 to 8) EMG signals provided by Florestal et al. (2009). In using the multichannel EMG signals, the signals detected by each electrode were considered as singlechannel EMG signals. These three data sets allowed us to study the performance of the developed methods across signals detected using different electrodes and instruments.

Evaluating MUPT validation system
For evaluting MUPT validation system, the simulated EMG signals were decomposed using the DQEMG algorithms (Hamilton-Wright & Stashuk, 2005). The resulting MUPTs were assessed visually and classified as valid or invalid. Additional valid trains were generated by selecting valid MUPTs with greater than 100 MUPs and randomly splitting them into sub-trains of at least 50 MUPs. Additional invalid trains that are representative of invalid trains likely to be produced by a decomposition algorithm were generated by merging valid trains having similar MUP templates (PsC ≥ 0.5). In total 20,386 MUPTs (18,000 valid and 2386 invalid trains) were generated.
The same analysis as with the simulated data was completed using these signals. However, in analyzing the EMG signals provided by Florestal et al. (2009) and McGill (n.d.), the results of manual decomposition completed by an expert investigator were used. As with the simulated data, the valid trains in these three data sets were split into sub-trains of at least 50 MUPs and those valid trains having similar MUP templates were merged to generate invalid trains. Consequently, 14,632 MUPTs (13,024 valid and 1,608 invalid trains) were generated.
Considering the reference MUPTs as the gold standard, the performance of the developed MUPT validation systems was evaluated in terms of correctly classifying valid and invalid trains. Three accuracy indices were defined for this purpose: accuracy for valid trains (A V ), accuracy for invalid train (A IV ), and total accuracy (A T ). These three indices are given by:

Evaluating decomposition system
For evaluating the performance of the developed MUPT validity-based EMG decomposition system, parts of the simulated and real EMG signals discussed in above were used. For each EMG signal used for this evaluation, the MU discharge patterns provided either by the EMG signal simulator used or by a human expert operator were used as reference.
For real data, the real EMG signals provided by Nikolic (2001) were not considered in this evaluation because the true decomposition results for this data were not known. A group of the real EMG signals provided in (Florestal et al., 2009;McGill, n.d.) were employed for this evaluation. Of the MUs contributed to each EMG signal used only the discharge patterns of those MUs that were selected by the expert as accurately identified patterns and the amplitude of the slope of their MUP templates were >0.01V/S were considered as reference and used for evaluation.
Four indices as defined below were used for evaluation: assignment rate (A r ), accuracy (A c ), correct classification rate (CC r ), and error in finding the correct number of MUPTs (E NMUPTs ).

MUPT validation system
The calculated means and standard deviations for the three accuracy indices used to evaluate the developed MUPT validation methods are summarized in Table 3. The numbers were obtained by testing each method using both simulated and real data sets when each set is split into the ten different data subsets. In this table VB stands for the MUP validation system developed by combing the FPVC and SVB outputs using AND logic. Likewise, VDH stands for the MUP validation system developed by combing the FPVC and SVDH outputs using AND logic.
As shown in Table 3, the accuracy in detecting invalid trains (i.e., in terms of A IV ) significantly improved when both MU firing pattern and MUP-shape information is employed for estimating the validity of a MUPT. However, the accuracy of both VB and VDH in correctly classifying valid MUPTs decreased compared to that of the FPVC, which only assesses the firing patterns of the MUPTs.
Figures 10 and 11 illustrate the advantage of using both MU firing pattern and MUP shape information for MUPT validation compared to using just MU firing pattern or MUP shape information.  11 demonstrates the advantages of using the VB and VDH algorithms (especially the VDH algorithm), which uses both MU firing pattern and MUP shape information in assessing the validity of a MUPT, over the FPVC that uses just MU firing pattern information. As shown, A IV for the FPVC decreases as the MCE rate in the trains increases such that the algorithm misclassified around 60% of the invalid trains having a MCE rate > 80%. One reason for the drop in A IV is that the accuracy with which the MU firing pattern statistics can be estimated and consequently the accuracy of the MU firing pattern features used decreases as a train becomes sparse ). The VBDH method performed significantly better than the FPVC for invalid trains with MCE rate > 80%. The A IV values of the VBDH method for such invalid trains was 31% higher than the A IV of the FPVC, which is a significant improvement in detecting invalid trains especially during the early stages of an EMG signal decomposition.

Simulated data
Based on the results presented in Table 3 and Fig.11

EMG decomposition system
Performance results for the validity-based decomposition system and that of the original decomposition algorithms of DQEMG for both simulated and real data are summarized in Tables 4 and 5, respectively. For each data set, the performance for each signal used along with the mean and standard deviation (STD) for the performance indices over all signals used is reported. Statistical comparison of the average values was conducted using paired t-tests (α= 0.05), while comparison of the STD values was conducted using F-tests (α= 0.05).  Table 4. The performnace of the validity-based decomposition system compared to that of the original decomposition algorithms of the DQEMG applied to the simulated data.

Original DQEMG
Overall, the validity-based decomposition system has significantly improved decomposition results in terms of all four performance indices (p<0.03); except for the real data that A C for both decomposition system was statistically equal. In addition, the validitybased system has lower STD for all performance measures (p<0.02), which shows that the system has better overall and less variable performance. The improvement in decomposition results (especially for CC r ) increases as the complexity of the signal increases, such that for the last two signals in Table 4 Table 5. The performnace of the validity-based decomposition system compared to that of the original decomposition algorithms of the DQEMG applied to the 10 real EMG signals.
Increases in MU firing pattern or MUP shape variability can decrease the performance of a decomposition system. Nonetheless, for the EMG signals with relatively high jitter or IDI-CV values studied (e.g., simulated EMG signal #10 which jitter value 100µs), the improvement gained using the validity-based system was significant.
Both DQEMG and the validity-based system are for decomposing intramuscular EMG signals mainly for clinical application; therefore, low amplitude MUPs, which are composed of low frequency components and created by MUs with no muscle fibers close to the electrode detection surface, are neither detected nor considered for clustering and supervised classification. If such MUPs were detected and then considered for clustering and supervised classification, the accuracies of both systems may not be as high as those presented in Tables 4 and 5. Finally, the accuracies of both DQEMG and the validity-based system for EMG signals contaminated by high levels of noise may be lower than the values reported for the simulated and real EMG signals used in this work.
Finally, both DQEMG and the validity-based system assume the mean and standard deviation of the IDIs of the MUs that contributed to the signal being decomposed did not change during signal detection. Such assumptions are valid for EMG signals detected during short-term isometric contraction; however, these assumptions may not be realistic for signals detected during either force-varying or long contractions. Such limitations restrict the use of both DQEMG and the validity-based system for research applications where the decomposition of signals detected during non-isometric or long-term contractions are required. Nevertheless, DQEMG has been useful for the decomposition of intramuscular EMG signals acquired for clinical applications (Stashuk,1999;Doherty & Stashuk, 2003;Boe et al., 2005;Pino et al.,2008;Calder at al.,2008)

Conclusions and future work
Decomposition of an EMG signal may result in several invalid MUPTs that do not accurately represent the activity of a signal MU; such invalid MUPTs must be identified and then either corrected or excluded before extracted MUPTs are quantitatively analyzed. Characteristics of IDI histograms, MU firing rates over time and within-train MUP shape inconsistencies of MUPTs extracted during EMG decomposition can be used to estimate their validity. The existing qualitative MUPT validation methods, which typically need human operator supervision, are time consuming, related to operator experience and skill, and cannot assist with improving the performance of automatic EMG decomposition systems. To overcome these issues, in this chapter an automated MUPT validation system that estimate the validity of a MUPT is estimated using both its MU firing pattern and MUP shape information is presented.
Based on the results obtained, the developed methods with overall A T >91.5% performed well in classifying MUPTs extracted by a decomposition system. Nevertheless, the methods that use only shape or only firing pattern information did not perform as well as the ones that used both types of information, especially for invalid trains. Of the method studied, the VDH method is the most accurate method in classifying sparse invalid trains, but the FPVC and VB are more accurate than the VDH in classifying valid MUPTs. Therefore, using VDH when MCE rate of the train >55% and VB or FPVC when MCE rate < 55% and even FPVC when MCE rate < 30% in the optimum scheme of using the proposed validation methods.
Finally, it was revealed that using the proposed MUPT validation system during decomposition will improve the results in terms of finding the correct numbers of MUPTs that constitute a given signal as well as decreasing the MCE and FCE rates in the extracted trains. Overall, the decomposition accuracy for 20 EMG signals (10 simulated and 10 real) was improved by 9.0%. For these 20 signals, the validity-based decomposition system with average E NMUPTs 0.3 was better able to estimate the number of constituent MUPTs than the previous system, with average E NMUPTs of 0.9. The improvement gained using the validitybased system for dificult-to-decompose EMG signals was even higher. Such improvements, especially in E NMUPTs , along with the confidence that the extracted MUPTs will be valid encourage using the validity-based decomposition system for decomposing intramuscular EMG signals for clinical application.
Future work will address: a) further analysis of the developed decomposition system, especially using clinical EMG signals acquired from myopathic and neurogenic muscles; b) improving the performance of the developed MUPT validation system in terms of both accuracy and computational time.