EMG Signal Processing in MATLAB
EMG Signal Processing in MATLAB
The EMG signal is processed using several techniques: band-pass filtering to retain frequencies between 20 and 450 Hz, removing unwanted high and low-frequency noise; notch filtering at 50 Hz to eliminate power line interference; full-wave rectification to convert negative signal amplitudes to positive; and smoothing through low-pass filtering with a cutoff at 6 Hz to extract the linear envelope of the rectified EMG, providing a cleaner, more interpretable signal for visualization .
Smoothing is achieved by applying a low-pass filter with a cutoff frequency of 6 Hz to the rectified EMG signal. This process extracts the signal's linear envelope, reducing signal fluctuation and generating a smooth, interpreted signal amplitude over time, allowing easier identification of muscle contraction patterns .
Full-wave rectification in EMG processing converts all negative amplitude signals into positive ones, which is crucial for accurately computing signal energy and facilitating subsequent steps like envelope detection. This process ensures that all parts of the signal contribute positively to the signal's mean amplitude measures .
The EMG signal includes random noise generated using a normally distributed random number function scaled by 0.3, simulating noise in the signal acquisition process. This added noise can obscure true signal patterns, complicate interpretation, and necessitate filtering to clarify the signal .
Linking axes in subplot visualizations aligns the time axes across different plots, allowing direct comparison of raw, filtered, rectified, and smoothed signal states. It facilitates coordinated analysis of how each processing method alters the signal over identical time intervals, enhancing interpretability .
Using both rectification and RMS (Root Mean Square) computation offers complementary benefits: rectification ensures all signal amplitudes are positive, aiding in direct comparisons, while RMS provides a measure of signal power by averaging the squares of the amplitudes, offering a statistically representative value of signal strength that is less influenced by transient peaks .
The code structures visualization by organizing sequential plots of each processing stage (raw, filtered, rectified, and smoothed signals) in a stacked fashion. This approach provides a clear, step-by-step view of the signal transformation, aiding in understanding the impact of each processing technique on the EMG data .
Visualizing the frequency spectrum of the filtered EMG helps identify which frequency components are present in the processed signal, assess if the filtering process was effective in eliminating unwanted frequencies, and confirm that signal components align with expected physiological frequencies related to muscle activity .
A simulation of baseline wander using a low-frequency sinusoid mimics slow, undesired changes in the signal baseline that occur due to factors like electrode movement or temperature shifts. In real EMG, such wander can distort signal interpretation if not corrected, making it crucial to account for in analysis .
Applying both a notch filter and a band-pass filter is essential because the notch filter specifically targets and removes power line interference at 50 Hz, a common frequency of electrical noise, whereas the band-pass filter removes general unwanted high and low frequencies outside the range of interest (20-450 Hz), allowing only the frequencies associated with muscle activity to pass through .