Announcement

Collapse
No announcement yet.

Using Matlab to find EMG frequency

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using Matlab to find EMG frequency

    Hi All,

    I am in the process of learning Matlab, particularly for signal processing. Currently I am trying to plot a frequency spectrum for a recorded EMG signal. I have used some of the plot functions available via the dropdown list on the main page but these only display the data with 'normalised frequency'.

    I have also looked at through the help files and noted there are three potential functions:

    1.) The power spectral density (PSD) is intended for continuous spectra.
    2.) The mean-squared spectrum is intended for discrete spectra (from periodic, discrete-time signals).
    3.) Powerest intended for music and eigenvector spectrum objects.

    I have also watched the Matlab tutorials and googled examples of producing a frequency spectrum, however generally the examples produce a sinusoidal waveform for analysis. When I try and reproduce this I am not sure how to generate the correct scale for the x-axis.

    Can anyone provide me with, or let me know where I can get, a script to analyse an EMG signal and produce a frequency spectrum?

    All help appreciated!!!
    Thanks
    Dan

  • #2
    Re: Using Matlab to find EMG frequency

    Hi
    There is a GUI in Matlab calling sptool ( signal proccessing toolbox) where you can do the processing there. It has got three tabs which can be helpful:
    -signal viewer
    -filter design
    -spectrual analysis
    Good luck
    Zahra

    Comment


    • #3
      Re: Using Matlab to find EMG frequency

      Hi Zahra,

      Thanks for getting back to me. I have tried sptool but I get a strange plot, for some reason the graph does not seem to look anything like a spectrum plot I get from any other software. I am not sure but I think it may be due to the fact that I have more than Fs/2 data points - do you think this will affect the results from sptool?

      As I am still learning I am hoping someone can help me produce a script so I can understand the steps required to prodcue the graph from scratch. Is this difficult to write for data stored as a vector?

      Thanks again.
      Dan

      Comment


      • #4
        Re: Using Matlab to find EMG frequency

        Hi
        Regarding the plot, I think you need to change the scale to the linear. I guess what you are having is logaritmic scale. For writing the script you can easily use Matlab help , as far as I know there is an example just like as what you're looking for.

        Comment


        • #5
          Re: Using Matlab to find EMG frequency

          Ok, thanks. I'll look at settings (axis properties I guess?) and see if I can change it.

          Appreciate your help.
          Dan

          Comment


          • #6
            Re: Using Matlab to find EMG frequency

            Hi Dan
            In case you do not want to use any toolbox, try the fast fourier transformation to obtain frequency content of an EMG signal (note: only for isometric contractions and relatively small time windows)

            see: http://www.demotu.org/aulas/controle/ABCofEMG.pdf (p. 50)

            In case you want to analyze the frequency in time-frequency space (and thus of nonstationary myoelectric signals) you have to use a wavelet transform (refer to the works of von Tscharner) or a Wigner-Ville transform.

            Regards
            Stefan

            Comment


            • #7
              Re: Using Matlab to find EMG frequency

              Hi Stefan,

              Thanks for the advice, the links look very helpful, I understand that FFT is aimed at studies of stationary signals - but could you explain why only short time windows can be used? If you know of one, please can you also recommend a simple 'dummies guide' to applying wavelt transforms?

              Thanks again
              Dan

              Comment


              • #8
                Re: Using Matlab to find EMG frequency

                Hi Dan,

                If you use a short time window for the FFT, you can assume that the frequency content of the signal does not change much, i.e. the signal is more or less stationary.

                Then, by calculating the FFT for several short time windows along the length of the signal, you can get an impression of how the frequency content of the signal changes with time.

                The wavelet analysis is a better way of obtaining such dynamic frequency information. You can find an old, but useful and quite simple guide to wavelet analysis at:

                http://users.rowan.edu/~polikar/wave...ttutorial.html

                Best regards,
                Lasse

                Comment


                • #9
                  Re: Using Matlab to find EMG frequency

                  Thanks Lasse,

                  That is an excellent website, very helpful!! I also appreciate your explanation for the FFT window size, that makes sense. Is there an upper limit for the window size for FFT or should it be based on the movements/signal changes being analysed?

                  Thanks again
                  Dan

                  Comment

                  Working...
                  X