LabVIEW Biomedical Toolkit API Reference

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.

Example

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.
time steps specifies the sampling period, in samples, along the time axis in the joint time-frequency domain. The default is -1, which specifies that this VI adjusts time steps automatically.
frequency bins specifies the FFT block size of the STFT. frequency bins must be a power of two and greater than zero. You also can consider frequency bins as the number of bins along the frequency axis to sample the signal in the joint time-frequency domain. The default is 512.
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.
type specifies the type of the sliding window.

0None
1Hanning (default)
2Hamming
3Blackman-Harris
4Exact Blackman
5Blackman
6Flat Top
74 Term B-Harris
87 Term B-Harris
9Low Sidelobe
10Gaussian
length specifies the relationship between the time resolution and the frequency resolution of the time-frequency representation. A large window length provides better frequency resolution but poorer time resolution. The default is -1.
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.
upper specifies the percent of noise power at high frequencies to the total power of the spectrogram. upper must be less than 100 minus lower. The larger the percentage, the more bins at high frequencies that this VI trims.
lower specifies the percent of noise power at low frequencies to the total power of the spectrogram. lower must be less than 100 minus upper. The larger the percentage, the more bins at low frequencies this VI trims.
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.
t0 returns the lowest value of the time bins in seconds.
dt returns the interval between the time bins in seconds.
frequency returns the resulting median instantaneous frequencies at each time bin in hertz.
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.
time steps specifies the sampling period, in samples, along the time axis in the joint time-frequency domain. The default is -1, which specifies that this VI adjusts time steps automatically.
frequency bins specifies the FFT block size of the STFT. frequency bins must be a power of two and greater than zero. You also can consider frequency bins as the number of bins along the frequency axis to sample the signal in the joint time-frequency domain. The default is 512.
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.
type specifies the type of the sliding window.

0None
1Hanning (default)
2Hamming
3Blackman-Harris
4Exact Blackman
5Blackman
6Flat Top
74 Term B-Harris
87 Term B-Harris
9Low Sidelobe
10Gaussian
length specifies the relationship between the time resolution and the frequency resolution of the time-frequency representation. A large window length provides better frequency resolution but poorer time resolution. The default is -1.
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.
upper specifies the percent of noise power at high frequencies to the total power of the spectrogram. upper must be less than 100 minus lower. The larger the percentage, the more bins at high frequencies that this VI trims.
lower specifies the percent of noise power at low frequencies to the total power of the spectrogram. lower must be less than 100 minus upper. The larger the percentage, the more bins at low frequencies this VI trims.
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.
t0 returns the lowest value of the time bins in seconds.
dt returns the interval between the time bins in seconds.
frequency returns the resulting median instantaneous frequencies at each time bin in hertz.
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.

Log in to get a better experience