This invention provides a method for
processing evoked
electromyography (EMG) artifacts based on slope acceleration detection and morphological scaling. The method includes: acquiring EMG signals with the stimulus trigger as the zero point of time; extracting the terminal resting segment, calculating the first-order difference standard deviation, and constructing an adaptive threshold; calculating the local slope amplitude, sign, and historical slope reference point by point within the search interval, and determining the artifact end index based on polarity reversal, slope acceleration, or smooth exit criteria; linearly scaling the artifact segment using the end point as an
anchor point to suppress artifact amplitude and eliminate boundary steps; performing a second-order bidirectional zero-phase bandpass filter on the scaled
signal to filter out interference and retain waveform phase; scaling the original
signal and backfilling it into the artifact segment, followed by level alignment and square root fade-in
processing to reconstruct a smooth and continuous physiological
signal. This invention achieves precise positioning of artifact boundaries and
distortion-free
signal reconstruction, possessing advantages such as thorough
artifact suppression, no
ringing distortion, complete preservation of physiological morphology, and strong adaptability.