Design and Development of a Practical Muscle Fatigue Monitor Bahattin Karagözolu, Waleed H. Sindi, Ahmed A. Al-Omari Department of Electrical and Computer Engineering Faculty of Engineering, King Abdulaziz University, PO Box: 80204, Jeddah, 21589, Saudi Arabia
Abstract — The — The purpose of the study is to develop a method to monitor the patient during the exercise and advice him to stop as he is approaching the fatigue condition. The median frequency of the EMG signal has been recognized as the best indicator of th e muscular fatigue during the voluntary contraction of skeletal muscles. The EMG signal is picked up from the body using a pair of biopotential electrodes. A special preamplifier and a band-pass filer are designed to process the raw signal. The signal is applied into a personal computer (PC) via the sound card. The power spectrum of the signal is calculated using the Fast Fourier Transform (FFT) algorithm in MATLAB. The median frequency is calculated and plotted against time during the exercise. Experiments are designed to test the procedure in the lab. The fluctuations in the median frequency are eliminated using averaging over time. The tests indicate a drop in the mean value of the median frequency before the test subject feels the fatigue. Index Terms — Median frequency detection, Muscle fatigue, MATLAB, FFT, Sound card
I. I NTRODUCTION The human body is a dynamic mechanism which is under continuous motion. The extent of the activity ranges from unintentional peristalic movements of smooth muscles to severe physical exertions that require generation of huge muscular forces. All these actions are carried out by small motors inside the body distributed around all organs and limbs. They produce mechanical energy by burning the fuel carried to them through special vessels. These motor organs of the body are the muscles. For neuromuscular disorders, the action of the muscle is partly replaced by others in the vicinity of it until it recovers. If the motor nerve of a muscle is interrupted somehow, then the muscle does not work and decays very quickly if the interruption continues for a while. This is called the paralysis of the muscle and the recovery involves a programmed physical exercise. The dose and duration of the exercise is set by a physician or a physiotherapist. The exercise may yield a temporary loss of power that is called the muscular fatigue. At this stage, the patient may feel pain and he might be reluctant to continue the exercise. Hence, the dose and duration must be determined very carefully so that the patient shall stop exercising before he feels the fatigue. The current study concerns with development of a method to monitor the patient during the exercise and advice him to stop as he is approaching the fatigue condition. The onset of muscle fatigue will be detected
and exercise will be stopped before the patient feels the fatigue. The paper starts with definition of the muscular fatigue, its symptoms and causes, and realistic design constraints for developing a method to study it. It then presents the methodology of the project including design requirements, feasibility discussion and implementation. Finally, it presents test results in lab and filed tests, the discussion of results and conclusions reached. II. MUSCLE FATIGUE The muscle fatigue is an exercise-induced reduction in maximal voluntary muscle force. It has two main components: The inability to produce force due to a decline in the sensitivity of troponin to calcium; the strength of the muscle has been exhausted and the muscle no longer responses to signals from the brain. Fatigue due to a buildup of lactic acid. Fatigue from lactic acid usually occurs from aerobic activities and the body’s need for oxygen. In this project, the fatigue is taken as the first component from the physiologist’s view that is the decline in the ability to produce force due to the decrease in the troponin’s sensitivity to calcium. Brainstorming on muscle fatigue detection yields nontechnical and technical solutions.
Non-Technical Solutions The intensity and duration of exercise can be controlled by the patient himself, by a physiotherapist or by a physician. This traditional technique does not need any effort to achieve to the required results. The patient needs to exercise to the maximal possible level to improve his muscular strength. However, monitoring of the activity and control of its duration based on personal judgments may not yield objective assessments. At the same time, patients freedom is limited and social environment is interfered leading into the white-coat syndrome. Hence, we eliminate this alternative from the beginning and dive into the technical solutions.
Technical Solutions There are many indicators that we can use for detecting the muscular fatigue during an exercise. They can be briefed as follows: Physiological tremor: All external body organs have small vibrations whose intensities increase with the muscular fatigue. They can be detected and used as an indicator. The technique requires external transducers and sophisticated signal processors. Drop in the level of physical activity: The speed of muscular contraction is expected to decrease with the fatigue. The speed can be measured using accelerometers and the fatigue condition can be established via signal processing. The electromyogram (EMG): During muscular fatigue, there are electrochemical changes in the muscle that may alter some characteristics of the electromyogram waveform. The change occurs both in the amplitude and frequency characteristics of the signal. EMG can be detected using surface electrodes and processed to determine the onset of fatigue. As will be illustrated later, there are good indications that physiological fatigue can be detected before the physical one via the EMG signal processing. Ultrasound imaging: Detecting, ultrasound imaging can inherently provide the morphological information of individual muscle, thus the architectural changes of muscles during fatigue can be obtained. A decision analysis yields the detection of muscular fatigue via EMG as the best solution.
III. MEASUREMENT AND PROCESSING OF EMG The electromyogram (EMG) is an electrical signal generated by the muscles during their contractions. It shows however, an interference pattern of the action potentials generated by muscle fibers underneath the measuring site. As the surface electromyography (SEMG) can be used to estimate the features of neuromuscular activations associated with muscle contractions, it has been widely employed as an objective tool to evaluate muscle fatigue. Electromyogram (EMG) can be measured by applying conductive elements or electrodes to the skin surface, or invasively within the muscle. The surface EMG is the more common method of measurement, since it is noninvasive and can be conducted by personnel other than medics or paramedics, with minimal risk to the subject. The amplitude of the signal in the surface EMG (sEMG) ranges from micro volts to a few milli volts depending upon the technique of measurement. The frequency range covers the lower audio range that is from 20 Hz to 500 Hz. The amplitude, time, and frequency domain
properties of the sEMG signal depends upon factors such as the timing and intensity of muscle contraction the distance of the electrode from the active muscle area the properties of the overlying tissue (e.g. thickness of overlying skin and adipose tissue) the electrode and amplifier properties the quality of contact b etween the electrode and the skin Measuring and accurately representing the sEMG signal depends on the properties of the electrodes and their interaction with the skin, amplifier design, and the conversion and subsequent storage of the EMG signal from analog to digital form (A/D conversion). The quality of the measured EMG is often described by sinal to noise ratio (SNR) which is the ratio between the measured EMG signal and unwanted noise contributions from the environment. The goal is to maximize the amplitude of the signal while minimizing the noise, assuming that the amplifier design and process of A/D conversion exceed acceptable standards. Fig. 1 shows a raw EMG signal taken from the biceps during interrupted physical exercise.
Fig. 1. The raw EMG recording of 3 contractions bursts of the biceps.
Sources of Noise in the EMG Signal Before we can develop strategies to eliminate unwanted noise we must understand what the sources of noise are. There are three types of noise as the ambient noise, transducer noise and electronic noise. 1- Ambient noise The ambient noise is generated by electromagnetic devices such as computers, force plates, power lines etc. Essentially any device that is plugged into the wall A/C (Alternating Current) outlet emits the ambient noise. This noise has a wide range of frequency components, however, the dominant frequency component is 50 Hz or 60 Hz, corresponding to the frequency of the A/C power supply (i.e. wall outlet). It can be reduced by: Turning off the fluorescent light Unplugging unused instrument Using shielded cables or at least twisted wires for input connections. 2- Transducer noise Transducer noise is generated at the electrode – skin interface. Electrodes serve to convert the ionic currents
generated in muscles into an electronic current that can be manipulated in electronic circuits and stored in either analog or digital form as a voltage potential. There are two types of noise sources that result from this transduction from an ionic to an electronic form: • D/C (Direct Current) Voltage Potential: caused by differences in the impedance between the skin and the electrode sensor, and from oxidative and reductive chemical reactions taking place in the contact region between the electrode and the conductive gel . • A/C (Alternating Current) Voltage Potential: generated by factors such as fluctuations in impedance between the conductive transducer and the skin. One effective method to decrease impedance effects is to use Ag-AgCl electrodes. The effect of the transducer noise can be minimized by reducing the electrode impedance via careful skin preparation and cleaning. 3- Electronic noise The electronic noise is inherent in all electronic devices. It can be minimized by Using low noise amplifiers at the preamplifier level Avoiding the use of high-value (over a few M) Match the noise impedances at amplifier inputs Matching the impedance in all electrodes Typical EMG Processing Techniques It is reported by many research workers that during the muscular fatigue the frequency spectrum of the EMG is shifted toward lower frequencies accompanied by an increase in its amplitude. Eventually there are two distinct techniques available to analyze the EMG signal to detect the muscular fatigue. 1- Time domain analysis: The root mean square (RMS) value of a signal is the indicator of its power. It is a somewhat easy technique. However, it is affected by various environmental conditions and it is not recommended in studying the behavior of the signal as a function of force or time under sustained contractions. There is a linear relationship between the number of zero crossings and the number of motor unit action potential turns (MUAPT) at low level contractions. Additionally recruited motor units contribute to the EMG signal as the contraction level increases and the linear relationship does not hold any more. Hence, it is difficult to use it as an indicator of the onset of muscle fatigue. 2- Frequency domain analysis: The analysis of the EMG signal in the frequency domain involves determination of parameters that describe specific aspects of the frequency spectrum of the signal. Fast Fourier transform (FFT) techniques are used to obtain the power density spectrum usually through digital computers on off-line basis. There are several parameters that characterize the spectrum and can be
detected by electronic means like mean and frequencies are the most reliable ones. The frequency is less sensitive to noise. Electronic are developed to study the changes in the frequency during localized muscular fatigue.
median median systems median
IV. MUSCLE FATIGUE MONITORING AS A DESIGN PROJECT It is a requirement in the Faculty of Engineering to do a capstone design project before graduation. The intention is to give students training on an in-depth design work on a practical engineering problem at a technical level similar to that might be encountered in the industry. In due course, students will gain experience in planning and managing projects, as well as documenting and communicating engineering works. We feel that design of a method for the monitoring of the muscular fatigue is feasible and will provide us with the necessary design exposure. The project is feasible in the sense that: 1- The project is sufficiently open-ended with many technical and non-technical solutions available. 2- We are a team of two students. Hence, in two semesters that is partially allocated for the project, and at the beginning of the third semester after finishing courses we can study the problem in detail and hopefully come up with a useful solution. 3- Projects were carried out in the BME lab around 20 years ago on this subject. Hence, we have academic staff with necessary expertise and qualifications to supervise the project. 4- We feel that we have necessary technical background needed as pre-requisite for the design work on this topic from biological and physiology courses. We also took all technical courses in electronics, computer and biomedical engineering fields necessary for implementing such a project. 5- Experiments can be performed in the biomedical engineering lab, hence there is no political and social problem related to them. No license is required for production and/or utilization of the developed devices. 6- Possible cost for a system like this, including the materials, should not exceed 500 SR. Necessary electronic components can be procured from the local market. Our expectation for the marketing cost is about 150 SR. V. PROJECT METHODOLOGY The prime objective of this project is to develop a technique to confirm that, under voluntary contraction,
the frequency spectrum of an EMG signal shifts to lower frequencies as a muscle fatigue occurs. A second objective is to gain engineering experience through the design and construction of the EMG apparatus. The developed system shall be practical in using commonly available facilities in the patient's environment. The system involves the design of hardware and software for data acquisition and signal analysis, measurement and signal processing as illustrated in Fig. 2. It is realized in four distinct stages:
Band Pass Filter
Fig. 2. EMG measurement and acquisition system
detect the EMG and resolving the relatively small EMG signal from background noise by the design and construction of the EMG apparatus. use the sound card of a personal computer and the data acquisition functions in MATLAB to collect data. design of a program to sample an EMG signal in real time, to transform them to the frequency domain, and to calculate the median frequency. experiment to try the developed system under real life conditions.
The System Hardware There are several considerations in building a working device. First, the device must be constructed so that internal noise does not obscure the signal. Second, the electrodes must be designed to minimize ambient noise, including signals from other parts of the body. Lastly, frequencies outside the usable range of the EMG signal, 20-500 Hz, need to be filtered out. Three surface electrodes are required; two exploring (signal) and one reference. of the electrodes are for the differential signal and the third is for the reference. The signal electrodes are placed on the muscle with spacing of about 2 cm and the reference electrode is placed into a silent region away from the muscle. The system hardware is composed of an EMG amplifier and a band-pass filter, and a PC with its
interface. The EMG-amplifier acts as a differential amplifier to eliminate the power line artifacts and unwanted physiological signals such as the ECG. The "Common Mode Rejection Ratio" (CMRR) represents the relationship between differential and common mode gains and is therefore a criteria for the quality of the chosen amplification technique. The CMRR should be as high as possible because the elimination of interfering signals plays a major role in the signal quality. A value over 95dB is regarded as acceptable. An amplification level between 500 and 1000 is generally acceptable for the sEMG processing. The band-pass filter that follows the amplifier limits the frequency range of the signal that goes to the sound card between 10 Hz and 500 Hz. Personal computers are available everywhere with integrated sound cards. Hence, utilization of a readily available PC reduces the cost of the project and contributes a lot to its practicality. Software Requirements Since the frequency range of the EMG signal is within the audio band, it is possible to use the sound card as the sampling and digitization tool. The MATLAB is a scientific program that has the necessary functions to control the sound card and to use it as a data acquisition device. After acquiring the EMG signal with suitable resolution and sampling rate, the signal is saved in a data file for further processing. Then, the Fast Fourier Transform (FFT) routine available in the signal processing toolbox of the MATLAB is used for computing the median frequencies of these sampled data. MATLAB program developed for data acquisition by sound card and median frequency computations are given in Appendix A and B respectively. The internal circuits of each recording channel of the sound card include a sampler and an analog to digital converter (ADC). The sampler samples the voltage signal presented on the microphone input or the line-In port of the sound card at a specified sampling rate. Each sample is then digitized using a binary code word ( 8 bits or 16 bits ). These code words are available to any software application interfaced to the sound card. The frequency range of the sound card is limited to the audible frequencies, 10 Hz to 15000 Hz. These limits may vary slightly from one sound card to another. The sampling rate at which the sound card functions is specified by the application, and 8000 Hz, 16000 Hz, and 44100 Hz are frequently used standard sampling frequencies.
VI. SIGNAL DISPLAYS The sound card has a dynamic range ± 0.5 V and it offers a resolution of 16 bits per sample. The sampling frequency must be at least 1000 Hz to avoid aliasing. However the lowest sampling frequency is 8000
samples per second which is much more than sufficient for the EMG signal works. The only concern with higher sampling rate is the occupation of more memory space due to extra data points collected. This is not an issue for the computers used today.
Fig. 3. EMG signal from biceps captured during a
Fig. 5. A sinusoidal test signal at 150 HZ and it's spectrum
repetitive exercise for 20 seconds
Signal Recording and Display A MATLAB program script is written to capture the EMG signal coming through the sound card (AppendixA). The resulting data is plotted as indicated in Fig. 3. The signal is recorded from the biceps during an arm flexion exercise. The exercise continued for 20 seconds with 2 seconds intervals. Fig. 4 shows an expended display of the first spell. It is clear that the signal amplitude increases during the contraction and only noise appears at the rest time.
A real time EMG recording is carried out and it's spectrum is computed as shown in Fig. 6. The signal continued for 5 seconds with two spells of exercise.
Fig. 6. Part of the EMG signal and it's power spectrum
VII. THE MEDIAN FREQUENCY Fig. 4. The EMG signal from a single contraction The EMG Spectrum The FFT subroutine from the MATLAB's signal processing toolbox is used to compute the spectral components of the signal. A sinusoidal test signal is applied at various frequencies to test the system. Fig. 5 shows the 150 Hz signal and it's spectrum.
The median frequency is defined as the particular frequency that would divide the power spectrum into two parts of equal areas. It is calculated in two steps as: The total area of the power spectrum of the signal by numerically integrating the power spectrum curve, Adding up the area from frequency 10 Hz onwards until the accumulated area is equal to half the total area of the power spectrum. The frequency when this half signal power is reached is identified as the median frequency and recorded into a file. In order to get a closer look at the results of median frequency analysis, the following steps are performed: 1- The arm muscle is exercised for several minutes continuously with a load and EMG signal is captured for analysis.
2-
This signal is packed into six 5-second sections. The power spectrum and median frequency are computed for each section. 3- The average and standard deviation of median frequencies of each package are computed such that each group has 6 sections and all information is graphed at every 30 seconds. Fig. 7 shows the progress of the median frequency during the exercise. The test subject is 25 year old male with height 165 cm and weight 73 kg. The recording is done from the right arm as the subject lifts a load of 5 kg. Sudden drop in the median frequency two minutes after the onset of the exercise is a clear indication of muscular fatigue.
operational one by more than a standard deviation and stop the exercise as this value is reached. Conclusion The median frequency is an indicator for the muscle weakness (Fatigue) as illustrated in the previous chapters. We studied the frequency domain of the picked up signal by FFT (Fast Fourier transform) to detect the median frequency from that spectrum. The system can be improved by adding a wireless link between the system hardware and the PC. Then, the patient can exercise freely without limitations of the harness and it can be applied on any muscle in locomotion. The system can give early warnings to the patient to stop the exercise before he reaches into a state of exhaustion.
ACKNOWLEDGEMENT The work was carried out as a graduation project by the 2nd and 3rd authors and supervised by the 1st author. The authors express their gratitude to the staff in the Biomedical Engineering Group for their continual supports throughout the project work.
R EFERENCES
Fig. 7. Error bar graph for median frequency for test -1
VIII. DISCUSSION AND CONCLUSION Discussion From the results of the median frequency analysis, we can see that the median frequency does indeed decrease as the muscle exercise continues and this is due to the fact that the muscle is getting closer to the fatigue state. However, we see also that the median frequency fluctuates due to errors from several sources such as signals from the heart, signals from other muscles and outside sources such as the 60 Hz power line noise. Another reason for error is the limited accuracy of the instrument used, namely the computer sound card. The error magnitude introduced in the median frequency is +/- the standard deviation. The mean value of the MF indicates a statistically stable score as illustrated in Fig. 6. The decay in the MF as the muscle gets tired is very clear. The standard deviation is used as an indicator of the error in the MF. It also changes during the exercise. Nevertheless, the change is around a central value that can be detected from the early parts of the records. We can set a threshold value that is safely below the normal
[1] B. Karagözolu M. N. Abdulqadir, “ A System for Analyzing Performance of Muscles Revealed by Electromyogram During Exercise", Project 410/051, Faculty of Engineering, KAU, 1991. [2] B. Karagözolu, “Development of an electronic
system to study muscular activity”, J. of King Abdulaziz University, Engineering Sciences, special issue, pp. 135-141, 1999. [3] W.H. Sindi, A.A. Al-Omari, “ Development of a Method to Detect Onset of Muscle fatigue” Senior Project Report, Faculty of Engineering, KAU, March, 2008.
APPENDIX-A:THE SIGNAL CAPTURE PROGRAM % Capture a signal for the given duration T % Plot the signal in time clear all close all clc T=20; %Duration %-------------------------------------------AI = analoginput('winsound'); chan = addchannel(AI,1); duration = T; set(AI,'SampleRate',8000) ActualRate = get(AI,'SampleRate'); set(AI,'SamplesPerTrigger',duration*ActualRate) set(AI,'TriggerType','Manual') BB = get(AI,'BitsPerSample') blocksize = get(AI,'SamplesPerTrigger'); Fs = ActualRate; start(AI) trigger(AI)
data = getdata(AI); delete(AI) clear AI %----------------------------------------------------t=1/8000:1/8000:T; plot(t,data) grid on ylabel('Magnitude') xlabel('Time (Sec)') title('Captured Signal') p = [0 0.5]; figure, plot(t,data) xlim([p(1) p(2)]) grid on ylabel('Magnitude') xlabel('Time (Sec)') title('Captured Signal') %----------------------------------------------------save('emg_1','data','t')
APPENDIX – B: MEDIAN FREQUENCY CALCULATION AND DISPLAY PROGRAM % Read the captured EMG signals, cut each signal and find spectrum clear all close all clc % load('Ahmed_3','data','t') % load('Waaleed_1','data','t') % load('Hessain_L1','data','t') % load('sami_2','data','t') load('L_5','data','t') % load('ex_360_sec','data','t') % figure, % plot(t,data) % grid on % ylabel('Magnitude') % xlabel('Time (Sec)') % title('Captured Signal') %--------------------------------------------T = length(data)/8000; k=1; for n = 1:5:T s = data((n-1)*8000+1:(n+4)*8000); tt = t((n-1)*8000+1:(n+4)*8000); % % figure, % subplot(2,1,1);plot(tt,s) % ylabel('Magnitude') % xlabel('Time (Sec)') % title('Captured Signal') %----------------------------------------------------Fs = 8000; z1 = fft(s)/Fs; z1 = abs(z1(1:length(z1)/2+1)); z1 = z1.^2; % Power spectrum f1 = [0:length(z1)-1]*Fs/length(z1)/2; subplot(2,1,2);plot(f1,z1); ylabel('Magnitude (abs)') xlabel('Frequency (Hz)')
title('Frequency Spectrum') xlim([10 500] %%%%%%%%%%%%%%%%%%%%%%%%%%%%% % compute median frequency % step1 compute area of spectrum n1 = length(z1); df = f1(20)-f1(19); area = 0; for m = 1:n1-1 area = area + df*(z1(m)+z1(m+1))/2; end % step2 start from zero and compute % 1/2 area of spectrum %The median frequency defined as the particular %frequency that would divide the %power spectrum into two parts of equal area. %http://www.mathworks.com/support/solutions/data/12UVGQ4.html?product=SG&solution=1-2UVGQ4
ar = 0; for m = 1:n1-1 ar = ar + df*(z1(m)+z1(m+1))/2; if ar >= area/2 break end end median_freq(k) = m*df; k = k+1; end median_freq'; figure, plot(median_freq) length(median_freq); h = 6; % number of median frequencies to be averaged med =[]; for k = 1:h:length(median_freq) s = median_freq(k:k+h-1)'; med = [med s]; end med; tt = 5*h:5*h:T; av = mean(med); st = std(med); figure, errorbar(tt,av,st) ylabel('Median Frequency (Hz)') xlabel('Time (Sec)') title('Median Frequency Error Bar Graph') grid on