SignalExpress

cancel
Showing results for 
Search instead for 
Did you mean: 

EMG analysis, median frequency, FFT

Hi,

 

Sorry to bother you but I really can not work this out. I'm trying to understand the EMG analysis.vi so I started to try it out.

It seem like there is some basic stuff that I do not understand. So please help me out!

 

To try the VI I created a testfile. I added 4 sinusoidials. 10, 20, 30, 40 Hz, (amplitude 1 of each sine).

150000 datapoints so it looks like the 1 min test file.

 

When I use the EMG analysis.vi the result confuses me.

 

Then I changed the filterlenght to 150000, just to get the medianfr. for the whole 60s.

What should the answer to that be? I expected 25Hz.

 

Thanks for any effort to help me out!

 

 

 

0 Kudos
Message 21 of 27
(4,288 Views)

*Bump*

I still have not figured this out. Any help is much appreciated!

 

Regards

0 Kudos
Message 22 of 27
(3,986 Views)

It has been a couple of years since I wrote the original code.  Please post your data set and the code you used to generate it so I can take a look.  Given what you have posted, the answer should be 25, but there are a lot of things that could change this, depending on your analysis.

 

Also, please be specific in what you do not understand.  What part of the analysis code do you not understand?

0 Kudos
Message 23 of 27
(3,978 Views)

Thank you for trying to help me with this! 🙂

 

The VI I used to generate my test-file and my test-file is attached.

 

When I run the EMG analysis.vi with my test-file, filterlenght set to 150000 the median freq is close to 30. I did expect 25 Hz.

(data colums = 0)

 

 

Download All
0 Kudos
Message 24 of 27
(3,956 Views)

Your file has only has one column of data, so you need to set the data column to 0 before your run.  The code then returns a median of 25, as expected.  Note that the graph is mislabeled.  The right Y axis should read median, not mean.

0 Kudos
Message 25 of 27
(3,943 Views)

Thank you for verifying the VI with my test file!

Yes, I only used column 0.

 

I attached a screendump of the result when I run:

My test file, on column 0 and filter width 25 000.

 

After your last reply I suspected som sort of system error on my part so I upgraded LabView from 9 to 11.0. Run on Windows 7 (Swedish)

I have tried Reginal settings = Eng (USA)

and also  = Swedish. Same result.

 

Any Ideas?

 

Thanks a lot for helping me out!! 🙂

 

0 Kudos
Message 26 of 27
(3,933 Views)

Hi DFGray,

 

This is brilliant.... Just what I needed... Thank you very much.

 

Whilst on the topic of EMG MDF, I wonder if you have ever heard of the EMG "spectral distribution functrion" to determine "sprectral compression"? I have a attached a paper cut n paste to relevant text below:

 

2.2.2. Measures of spectral compression
Measures of spectral compression were calculated for
each epoch for signal A1 (Fig. 2). The Spectral Distribution
Function (SDF) is defined as the normalised integral
of the amplitude spectrum of a signal, Fig. 3, [18].
It is similar to the cumulative power function described

by Lateva [10] and Merletti and Lo Conte [21] but is
derived from the EMG amplitude spectrum rather than
the power spectrum. From the SDF, the location of all
percentile frequencies may be calculated. The results
presented in [18] indicate that compression of the EMG
amplitude spectrum is not uniform at all frequencies.
The compression is most uniform in the region of the
spectrum lying between the 60th and 90th percentiles.
The SCE was therefore defined as the mean shift, with
respect to the first epoch, in all percentile frequencies
between the 60th and 90th, (0.6  SDF  0.9) i.e. the
mean value of the ratio of f2 to f1 in this region, Fig. 3.
The mean value was calculated to reduce the effects of
noise. The median frequency of the EMG amplitude
spectrum was also calculated i.e. the frequency at the
50th percentile (SDF  0.5), Fig. 3. The median frequency
of the EMG power spectrum was similarly calculated.

 

How would could amend your EMGAnalysis.vi to calculate EMG Amplitude Spectrum compression between the 60th and 90th percentiles?

 

Thanks,

Jack

0 Kudos
Message 27 of 27
(3,497 Views)