Adding Wavelet Decomposition to Neural Networks for the Classification of Fatigue SEMG N D Pah, D K Kumar and P Burton School of Electrical and Computer System Engineering RMIT University, Melbourne 3000 AUSTRALIA
[email protected] Abstract – Surface Electromyography (SEMG) is the noninvasive recording of electrical activity of the muscle. This signal is an indicator of the muscle activity and is also known to change if the muscle suffers localised fatigue. Clinicians are able to classify the signal visually but because of its complex and the fact that the signal is dependent on a number of parameters, automatic classification becomes difficult. This paper reports our efforts at using Artificial Neural networks (ANN) to classify the signal. It reports that the use of Wavelet Transforms to represent the signal before classification greatly improves the ability of ANN to classify the signal.
I. INTRODUCTION Surface Electromyograph (SEMG) is the recording of the electrical activity of the muscle from the surface of the body. It is a result of the summation of a large number of electrical pulses stimulating the muscle fibres in the vicinity of the electrodes and is dependent on the activity of a number of muscles. It is also dependent on the physiological and anatomical properties of surrounding tissues. This makes the signal very complex and automated analysis is therefore difficult. The complexity of the signal makes mathematical classification extremely difficult. Artificial neural networks (ANN) provide a technique whereby it is possible to classify inputs without requiring mathematical description of the signal. ANNs classify the input by ‘learning’ the features of the input from the samples provided during training. In the case of inputs such as the SEMG, it is possible to build a large database of the signal for training and thus ANNs are suitable for classifying such signals. The ability of the ANN to classify is enhanced if the complexity of the input is reduced before the process of classification. For this purpose, the input signal is preprocessed. The pre-processing helps reduce noise as well as the signal component redundant to the process of classification. This paper reports the use of wavelet transforms for the purpose of pre-processing the signal. Wavelet transform (WT) decomposes a signal into multi-resolution components using ‘wavelet function’ as the basis function. It can be seen as a mathematical microscope that provides a tool to pick-up a short time component in a non-stationary signal while also helping to see the broader trend of the signal. Due to the flexibility it offers, WT has
found numerous applications in data compression and feature enhancement for images, speech and bio-signals [13]. This paper reports our efforts at using ANN for classifying the signal after wavelet decomposition. The results of classification using WT and without using WT are compared to determine the efficacy of pre-processing.
II. SURFACE ELECTROMYOGRAM (SEMG) SEMG recording is a result of electrical activity in muscles and dependent on numerous factors such as the rate of stimulation of the muscle, size of motor units recruited, morphology of the motor units, electrical properties of the tissues and the presence of any synchronisation of the activity of different motor units. The rate of stimulation of the muscle is dependent on the force of contraction required to be produced by the muscle while the recruitment pattern of different motor units is for the purpose of maintaining a smooth contraction and preventing muscle fatigue. Properties of muscles to produce force vary with time. There is a variation of motor unit recruitment pattern and this is dependent on the load and the fatigue status of the muscle [11]. There is also a variation of the property of the body tissues conducting the signal from the muscle to the surface of the body. If muscles are considered the source of SEMG, there is a variation of the property of the SEMG signal source with time, making SEMG a non- deterministic and non-stationary signal. In order to use SEMG for classification of muscles based on muscle fatigue, it is important to reduce the signal data while enhancing those features that correlate with muscle fatigue. It is also important to be able to measure the time variation of the properties of the muscle to ensure that the time when the change occurred is recorded.
III. NEURAL NETWORK FOR SIGNAL CLASSIFICATION Artificial neural networks (ANN) are networks formed of cells simulating the low level functions of neurones. ANNs are very useful for classification of input signals where the signals cannot be defined mathematically [10]. Further, ANNs have redundant networking and are very robust, providing a mathematical flexibility not available to
The generalised delta rule [10] is used to adjust the weighting factors of the BPN to find the best mapping between input pattern and target output. After being trained properly, the ANN can be used to classify other input patterns based on the classification of the training vectors. Beale et al [3] and Freeman et al [6] have showed the complete equations and algorithms to train and simulate BPN.
x1
w x2 w x3 w w x4
Input Layer
Oi(t)
fi
Hidden Layers
The ANN in this paper uses adaptable momentum and learning rate. This has been done for the purpose of avoiding local minimum and speeding the training process of the ANN. The ability of the ANN to avoid local minimum can be of great advantage for classification of signals that have some similarities [14].
Output Layer
b) IV. WAVELET TRANSFORM Figure 1. a) A single neuron, b) Back Propagation Neural Network (BPN) algorithm based classifiers. There is an added advantage that these can be simulated on digital computers very easily. Bioelectric signals like SEMG are mathematically defined as chaotic signals [5] and therefore suited for ANN based classifiers. ANN responds to an input by producing an output. This is a result of the transmission of the input through the network of neurones linked by weights. The output of the ANN is a combination of outputs of each of the neurones in the output stage of the ANN. Output of an individual neuron is calculated as: oi (t) = fi (neti (t) )
Wavelet decomposition of a signal provides information related to the time-frequency variation of the signal. This is referred to as scale-translation information. The multi-resolution property of the wavelet transform gives an opportunity to study different components of the signal.
(1)
where n
net i (t ) = ∑ wij (t )o j (t )
Wavelet Transform (WT) is a relatively new technique for signal decomposition. Unlike Fourier techniques where the basis functions are time invariant, the basis functions of WT are localised in time and scale (scale is related to frequency). WT offers the user flexibility and there is a wide choice of wavelet functions available. The user can choose the wavelet most appropriate to the application from a variety of functions available, and can also design the wavelet if required.
(2)
WT consists of determining the coefficients of the signal by taking the inner product of the signal and the wavelet function. Wavelet transform of a signal x(t) is defined as:
j =1
and fi is the threshold function, and wij are the weights for connection from neurone i to neurone j. This may be time dependent. There are a number of different ANN structures available, the choice of which is dependent on the application. Backpropagation neural network (BPN) is a commonly used ANN for applications where there are predetermined targets and samples of the data along with the targets are available. Neurones in BPN are grouped into layers, an input layer, an output layer and several hidden layers as shown in Figure 1. Each neurone in a layer is connected to every neuron in the next layer. Before the ANN can be used for classification, it has to be trained during the time when it learns of the input/ output relationship for the training vector set. During the training cycle, BPN is given sets of input patterns and corresponding target outputs representing the training vector.
W ( s,τ ) = ∫ x(t )ψ s*.τ (t )dt
(3)
The fundamental or mother wavelet (ψ) is scaled through its parameter s and translated by τ. Large s correlates with lower frequency components of the signal, and small s with high frequency. The above wavelet transform is called continuous wavelet transform (CWT). If both the input signal and the parameters are discrete, the transform is called discrete wavelet transform (DWT). The discrete values of s and t are commonly on a dyadic grid. The efficient way to implement DWT is by using digital filter bank i.e. Mallat’s algorithm [1,2,8,9]. This technique uses filter bank pairs which are similar to low-pass and band-pass filtering and down-sampling (decimation). The ability of DWT to extract features from the signal is dependent on the appropriate choice of the mother wavelet function. Some of the popular families of wavelet
Table 1. Frequency Band for Sampling Rate 5kHz Wavelet Function
Haar
Db2
Db3
Db4
Decomposition Level 4 5 6 7 8 9 4 5 6 7 8 9 4 5 6 7 8 9 4 5 6 7 8 9
Time frame size (ms) 3.4 6.6 13 25.8 51.4 102.6 9.6 19.2 38.4 76.8 153.6 307.2 16 32 64 128 256 512 22.4 44.8 89.6 179.2 358.4 716.8
Frequency Band (Hz) 208 – 417 104 – 208 52 – 104 26 – 52 13 – 26 6.5 – 13 198 – 395 99 – 198 50 – 99 24 – 50 12 – 24 6 – 12 191 – 380 96 – 191 48 – 96 24 – 48 12 – 24 6 – 12 186 – 375 93 – 186 47 – 93 24 – 47 12 – 24 6 – 12
muscle contraction. For the sake of training the ANN, the recordings were divided into two groups: training signals (40 recordings) and test signals (40 recordings).
VI. SIGNAL PROCESSING AND CLASSFICATION The ANN was used to classify the raw signal and the signal after decomposition by Wavelet Transform. It was implemented using the Matlab software package. The SEMG
Wavelet Decomposition
Decimation & Framing
Training Signals
Test Signals
Neural Network
_
Error
Target
Figure 2. Flow chart for Signal Processing and Classification
basis functions are Haar, Daubechies, Coiflet, Symmlet, Morlet, and Mexican Hat. For a more precise choice of wavelet function, the properties of wavelet functions and the characteristics of the signal being analysed need to be matched. The frequency band and the properties of wavelet functions are tabulated in Tables 1 and 2.
V. DATA COLLECTION The SEMG was recorded using an Amlab EMG amplifier and was filtered with a band-pass filter (5 Hz – 2 kHz) and a notch filter centred at 50 Hz to remove power line interference. Each signal was recorded for 5 seconds and sampled with frequency sampling of fs = 5 kHz. The signals were recorded from the surface of right arm biceps-brachii muscles of healthy young male volunteer subjects by using bipolar surface electrodes of 1 cm diameter, the distance of separation being 2 cm. The electrodes were placed along the longitudinal midline of the muscle between the end-plate region and the tendons. The reference electrode (ground electrode) was placed distant under the elbow. The signals were recorded while a load of 15 lbs (approximately 50% Maximum Voluntary Contraction) was held with an elbow flexion of 900. Fatigue SEMGs were recorded after the subject had lifted the load for a long period of time, had complained of fatigue, the muscle was observably fatigued and the subject was unable to continue with the task of
network had one input layer (1000 neurons), one hidden layer (200 neurons) and one output layer (1 neuron). All nodes in the hidden and output layers used sigmoid function as their threshold function. As a first step, the signals were decomposed using discrete wavelet transform (Mallat’s algorithm) with different wavelet functions for levels 5 to 8. The reason for choosing these levels was because the important frequency range of the SEMG (10 – 150 Hz) is covered by this range for the given sampling rate (Table 1). The DWT was implemented using MATLAB’s Wavelet Toolbox. Different wavelet functions used in this experiment were Haar and Daubechies (db2, db3 and db4). The ANN was trained for the wavelet coefficients for each of the levels of resolution. For each experiment, the network was trained using a momentum parameter of 0.9 and an initial learning rate of 0.1 until it reached SSE = 0.01. The target output was chosen to be zero if the input was normal SEMG and one for fatigue SEMG. The neural network was tested to classify the normal and fatigue SEMG. The error in the classification by the neural network was recorded and used as the parameter to evaluate the effect of using WT prior to the neural network. Figure 2 shows the block diagram of the experiment.
. Table 2. Properties of Wavelet Functions.
Orthogonal Time Support Frequency Support Regularity Symmetry Zero Moment
Haar Yes [0,1] 1/ω 0 Yes 1
DbN Yes [0,2N-1] 1/ω0.2N 0.2N No N
SymN Yes [0,2N-1] 1/ω0.2N 0.2N Yes N
VII. RESULT Table 3 shows the failure rate of the ANN as used to classify the test signals. Since the failure rates of other levels are relatively high, the table gives only the result of decomposition level 7 and 8. The failure rate of Db2, Db3 and Db4 at level 8 are all 0 %. Table 4 depicts average error of the neural network highlighting the difference between these wavelets. The results show that using level 8 can reduce the classification error. The results also indicate the effect of selecting different wavelet functions and decomposition levels. Table 3 The Failure Rate of the Neural Network Wavelet Haar Db2 Db3 Db4 Raw SEMG
Level 7 Level 8 Fail % Fail Fail % Fail 20 50.0 % 20 50.0 % 20 50.0 % 0 0% 15 37.5 % 0 0% 10 25.0 % 0 0% Fail = 19 (47.5 %)
evident that for the classification of SEMG from normal and fatigue muscles, detail components from level 8 (12 to 26 Hz) are most suitable for the given sampling rate. The comparison of the average error in Table 4 indicates that wavelet functions with higher zero moment gives less error. The zero moment correlates with the frequency selectivity of a wavelet function. Wavelet functions with sharp transition in frequency domain, therefore, give better result.
REFERENCES: 1. 2.
3.
4.
5.
6.
7.
8. Table 4 The Average Error of the Neural Network Wavelet Db2 Db3 Db4
Average Error for Level 8 8% 6% 5%
9.
10. 11.
VIII. DISCUSSION AND CONCLUSION
12.
The results indicate that by including wavelet decomposition in the classification process using ANNs for classifying SEMG from normal and fatigue muscles can reduce the error of the network. They also show that the choice of decomposition level is important.
13.
The selection of the decomposition level is dependent on the frequency of the signal components. The most suitable decomposition level for the analysis is the level that corresponds to the frequency range which contains those parts of the signal that correlate well with the differences required for classification of the signal. From the results it is
14.
‘MATLAB; Wavelet Toolbox User’s Guide’, The MathWorks Inc, Prentice Hall New Jersey. Amara, G. (1995) ‘An Introduction to Wavelet’, IEEE Computational Science and Engineering, Summer 1995, vol. 2, num. 2. Beale, R. and Jackson, T. ‘Neural Computing: An Introduction’, Department of Computer Science, University of New York Bristol and Philadelphia. Daubechies, I. (1992) ‘Ten Lectures on Wavelet’, Society for Industrial and Applied Mathematics Philadelphia, Pennsylvania. DeLuca, C. J. (1997) ‘Surface Electromyography Detection and Recording’, Neuro-Muscular Research Center, Boston University [WWW document]. Freeman, J. A. and Skapura, D. M. (1991) ‘Neural Networks; Algorithm, Applications, and Programming Techniques’ Addison Wesley New York. Lee, J. S. ‘EMG Page’ [WWW document]. URL http://home.earthlink.net/~leejs/ EMG.html [1998, October 15]. Lee, J. S. ‘Wavelet Page’ [WWW document]. URL http://home.earthlink.net/~leejs/ wavelet.html [1998, October 15] Shensa, M. J. (1992) ‘The Discrete Wavelet Transform: Wedding the A Trous and Mallat Algorithm’ IEEE Transaction on Signal Processing vol. 40, nom. 10, pp 2464-2482. Skapura, D. M. (1996) ‘Building Neural Networks’, Addison Wesley New York. Kumar, Sharwan and Mital, Anil. (1996) ‘Electromyography in Ergonomics’, Taylor and Francis, London. ‘MATLAB; Neural network Toolbox User’s Guide’, The MathWorks Inc, Prentice Hall New Jersey. Walker, James S. (1999) ‘A Premier on Wavelets and Their Scientific Applications’, Chapman & Hall/CRC United States. Kumar, D K and Mahalingam N. (1999) ‘Faster Convergence Using Adaptive BP Algorithm’, International AMSE on Comp. Model & Comm. 1999, Jaipur, India.