Skip to content

Script for smoothing the Instantaneous Discharge Rate (IDR) of Motor Units (MUs) after HD-sEMG decomposition.

Notifications You must be signed in to change notification settings

innavoig23/Smooth-MU-Firing-Rate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Smooth Motor Unit (MU) Firing Rate

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.

📌 Usage

Input Data:

  • MUPulses: 1 × N cell array, where N 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 expects MUPulses 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. Providing sigLen 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.

📌 Example Plots

Below are two example plots showing the smoothed firing rate of MUs using a 400 ms Hanning window.

Example 1:

Example 1

Example 2

Example 2

About

Script for smoothing the Instantaneous Discharge Rate (IDR) of Motor Units (MUs) after HD-sEMG decomposition.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages