After HD-sEMG decomposition, various analyses can be performed. One of the most commonly studied features is the firing rate of Motor Units (MUs).
In addition to the Instantaneous Discharge Rate (IDR), its smoothed form is often used.
A widely adopted approach for smoothing the firing rate is the application of a 400 ms Hanning window, as first proposed by De Luca et al. (1982). However, I could not find an "official" implementation of this method online, so I decided to implement it myself.
This script was used in my MSc Thesis at Politecnico di Torino, where I analyzed MU behavior and functional performance in patients with brachial plexus injury following nerve transfer surgery.
Input Data:
MUPulses
: 1 × N cell array, whereN
is the number of identified MUs; each cell contains a variable-length vector, where each element represents the sample index at which the MU fired. This function expectsMUPulses
to follow the same structure as the output from DEMUSE®.fsamp
: Sampling frequency of the HD-sEMG signals (Hz).sigLen
(optional): Total length of the signal in samples. ProvidingsigLen
is recommended for easier batch processing of multiple files.
To compute the smoothed firing rate:
sIDR = smoothFiringRateMU(MUPulses, fsamp, sigLen);
where sIDR
is numMUs × sigLen matrix, where each row contains the smoothed instantaneous discharge rate (pps) of the corresponding MU over time.
Below are two example plots showing the smoothed firing rate of MUs using a 400 ms Hanning window.