EMG Median Power Frequency VI
- Updated2023-02-21
- 7 minute(s) read
EMG Median Power Frequency VI
Owning Palette: EMG VIs
Requires: Biomedical Toolkit
Calculates the online median power frequency (MDF) of an electromyography (EMG) signal. This VI first computes the short-time Fourier transform (STFT) spectrogram of the EMG signal and then computes the MDF by using the STFT spectrogram.
You must manually select the polymorphic instance to use.
EMG Median Power Frequency (Waveform)

![]() |
initialize? specifies whether to initialize the internal state of the VI. This VI performs calculations that are dependent on all previous data since the VI last ran or since you set initialize? to TRUE. When initialize? is TRUE, this VI restarts the calculation dependency. The default is FALSE. | ||||||||||||||||||||||||||
![]() |
EMG specifies the EMG signal for calculating the MDF. | ||||||||||||||||||||||||||
![]() |
time-freq sampling info specifies the density that this VI uses to sample the EMG signal in the time-frequency domain.
| ||||||||||||||||||||||||||
![]() |
window info specifies the sliding window that this VI uses to truncate the EMG signal and specifies the resolution of the resulting time-frequency representation.
| ||||||||||||||||||||||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||||||||||||||||||||||
![]() |
trimmed percentage specifies how this VI trims the spectrogram at high frequencies and at low frequencies before computing the MDF. If obvious noise exists at high frequencies or at low frequencies, use trimmed percentage to improve the accuracy of the MDF estimation.
| ||||||||||||||||||||||||||
![]() |
spectrogram returns the STFT spectrogram of the EMG signal. | ||||||||||||||||||||||||||
![]() |
scale info returns the time scale and frequency scale information of the time-frequency representation, including the time offset, the time interval between every two contiguous rows, the frequency offset, and the frequency interval between every two continuous columns of spectrogram. | ||||||||||||||||||||||||||
![]() |
MDF returns the median power frequency of the EMG signal at each time bin.
| ||||||||||||||||||||||||||
![]() |
error out contains error information. This output provides standard error out functionality. |
EMG Median Power Frequency (Array)

![]() |
initialize? specifies whether to initialize the internal state of the VI. This VI performs calculations that are dependent on all previous data since the VI last ran or since you set initialize? to TRUE. When initialize? is TRUE, this VI restarts the calculation dependency. The default is FALSE. | ||||||||||||||||||||||||||
![]() |
EMG specifies the EMG signal for calculating the MDF. | ||||||||||||||||||||||||||
![]() |
time-freq sampling info specifies the density that this VI uses to sample the EMG signal in the time-frequency domain.
| ||||||||||||||||||||||||||
![]() |
window info specifies the sliding window that this VI uses to truncate the EMG signal and specifies the resolution of the resulting time-frequency representation.
| ||||||||||||||||||||||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||||||||||||||||||||||
![]() |
sampling rate specifies the sampling frequency of the EMG signal, in hertz. The default is 1. | ||||||||||||||||||||||||||
![]() |
trimmed percentage specifies how this VI trims the spectrogram at high frequencies and at low frequencies before computing the MDF. If obvious noise exists at high frequencies or at low frequencies, use trimmed percentage to improve the accuracy of the MDF estimation.
| ||||||||||||||||||||||||||
![]() |
spectrogram returns the STFT spectrogram of the EMG signal. | ||||||||||||||||||||||||||
![]() |
scale info returns the time scale and frequency scale information of the time-frequency representation, including the time offset, the time interval between every two contiguous rows, the frequency offset, and the frequency interval between every two continuous columns of spectrogram. | ||||||||||||||||||||||||||
![]() |
MDF returns the median power frequency of the EMG signal at each time bin.
| ||||||||||||||||||||||||||
![]() |
error out contains error information. This output provides standard error out functionality. |
Example
Refer to the EMG Spectrogram VI in the labview\examples\Biomedical\Biosignal directory for an example of using the EMG Median Power Frequency VI.












