DSPRelated.com
Forums

STFT and median frequency of EMG signal in MATLAB

Started by marieclare January 24, 2012
I am using MATLAB to analyse EMG signals.  So far I have rectified the data
and performed a STFT (using a Hamming Window).  I am now looking to
calculate the median frequency of the power spectrum and would be grateful
if someone could advise me on the best way to do this.

Thanks


On Jan 24, 9:21�am, "marieclare"
<marieclare.mccormick@n_o_s_p_a_m.uws.ac.uk> wrote:
> I am using MATLAB to analyse EMG signals. &#4294967295;So far I have rectified the data > and performed a STFT (using a Hamming Window). &#4294967295;I am now looking to > calculate the median frequency of the power spectrum and would be grateful > if someone could advise me on the best way to do this. > > Thanks
Going to Google and putting "median frequency" in the search window yields the second entry as Median Frequency Calculation The median frequency of a spectrum is calculated in two steps: 1) The Intensity in the signal in the whole spectrum is summed, and divided by 2 2) The frequency is selected at which the cumulative intensity (i.e. all the intensity values for frequencies lower and including the focal intensity) first exceeds the value calculated in step 1. So, what's the problem?
On Tue, 24 Jan 2012 09:21:59 -0600, "marieclare"
<marieclare.mccormick@n_o_s_p_a_m.uws.ac.uk> wrote:

>I am using MATLAB to analyse EMG signals. So far I have rectified the data >and performed a STFT (using a Hamming Window). I am now looking to >calculate the median frequency of the power spectrum and would be grateful >if someone could advise me on the best way to do this. > >Thanks >
Well I am assuming you mean meadian IF from the spectrogram? Mark DeArman
On Wed, 25 Jan 2012 03:35:55 -0800, Mac Decman
<dearman.mark@gmail.com> wrote:

>On Tue, 24 Jan 2012 09:21:59 -0600, "marieclare" ><marieclare.mccormick@n_o_s_p_a_m.uws.ac.uk> wrote: > >>I am using MATLAB to analyse EMG signals. So far I have rectified the data >>and performed a STFT (using a Hamming Window). I am now looking to >>calculate the median frequency of the power spectrum and would be grateful >>if someone could advise me on the best way to do this. >> >>Thanks >> > >Well I am assuming you mean meadian IF from the spectrogram? > >Mark DeArman
If that is true, then you will fit an IF curve to your spectrogram and then calculate the median from that. Otherwise you will use the power spectrum method above by the other poster. Mark DeArman
On Tue, 24 Jan 2012 09:21:59 -0600, "marieclare"
<marieclare.mccormick@n_o_s_p_a_m.uws.ac.uk> wrote:

>I am using MATLAB to analyse EMG signals. So far I have rectified the data >and performed a STFT (using a Hamming Window). I am now looking to >calculate the median frequency of the power spectrum and would be grateful >if someone could advise me on the best way to do this. > >Thanks
Hello marieclare, If you have signal, let's call it signal "A". If you rectify signal "A" you have a different signal that we'll call signal "B". I hope you realize that the spectrum of signal "A" will not be the same as the spectrum of signal "B". [-Rick-]
On 1/26/12 9:58 PM, Rick Lyons wrote:
> On Tue, 24 Jan 2012 09:21:59 -0600, "marieclare" > <marieclare.mccormick@n_o_s_p_a_m.uws.ac.uk> wrote: > >> I am using MATLAB to analyse EMG signals. So far I have rectified the data >> and performed a STFT (using a Hamming Window). I am now looking to >> calculate the median frequency of the power spectrum and would be grateful >> if someone could advise me on the best way to do this. >> >> Thanks > > Hello marieclare, > If you have signal, let's call it signal "A". > If you rectify signal "A" you have a different signal > that we'll call signal "B". I hope you > realize that the spectrum of signal "A" will not > be the same as the spectrum of signal "B". >
oh c'mon Rick, you're not saying that two signals need be at all alike to have the same spectrum. say A is a dirac impulse and B is white noise. two impossible signals with real-world approximations that have nothing to do with each other except, um, i forgot. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On Fri, 27 Jan 2012 03:50:08 -0500, robert bristow-johnson
<rbj@audioimagination.com> wrote:

>On 1/26/12 9:58 PM, Rick Lyons wrote: >> On Tue, 24 Jan 2012 09:21:59 -0600, "marieclare" >> <marieclare.mccormick@n_o_s_p_a_m.uws.ac.uk> wrote: >> >>> I am using MATLAB to analyse EMG signals. So far I have rectified the data >>> and performed a STFT (using a Hamming Window). I am now looking to >>> calculate the median frequency of the power spectrum and would be grateful >>> if someone could advise me on the best way to do this. >>> >>> Thanks >> >> Hello marieclare, >> If you have signal, let's call it signal "A". >> If you rectify signal "A" you have a different signal >> that we'll call signal "B". I hope you >> realize that the spectrum of signal "A" will not >> be the same as the spectrum of signal "B". >> > >oh c'mon Rick, you're not saying that two signals need be at all alike >to have the same spectrum. say A is a dirac impulse and B is white >noise. two impossible signals with real-world approximations that have >nothing to do with each other except, um, i forgot.
Hi Robert, no, I sure didn't mean to imply that two signals need be at all alike to have the same spectrum. Perhaps I misunderstood the original poster. It just seemed odd to me that he said he's analyzing an EMG signal and I assumed by "analyzing" he meant spectrum analysis. And then he said he was rectifying the EMG signal, and that would produce a signal with a different spectrum than the spectrum of the original EMG signal. I was merely trying to point that out to the original poster. Being that I know nothing about analyzing EMG signals, perhaps I should just keep quiet. See Ya', [-Rick-]
On Fri, 27 Jan 2012 03:47:42 -0800, Rick Lyons
<R.Lyons@_BOGUS_ieee.org> wrote:

>On Fri, 27 Jan 2012 03:50:08 -0500, robert bristow-johnson ><rbj@audioimagination.com> wrote: > >>On 1/26/12 9:58 PM, Rick Lyons wrote: >>> On Tue, 24 Jan 2012 09:21:59 -0600, "marieclare" >>> <marieclare.mccormick@n_o_s_p_a_m.uws.ac.uk> wrote: >>> >>>> I am using MATLAB to analyse EMG signals. So far I have rectified the data >>>> and performed a STFT (using a Hamming Window). I am now looking to >>>> calculate the median frequency of the power spectrum and would be grateful >>>> if someone could advise me on the best way to do this. >>>> >>>> Thanks >>> >>> Hello marieclare, >>> If you have signal, let's call it signal "A". >>> If you rectify signal "A" you have a different signal >>> that we'll call signal "B". I hope you >>> realize that the spectrum of signal "A" will not >>> be the same as the spectrum of signal "B". >>> >> >>oh c'mon Rick, you're not saying that two signals need be at all alike >>to have the same spectrum. say A is a dirac impulse and B is white >>noise. two impossible signals with real-world approximations that have >>nothing to do with each other except, um, i forgot. > >Hi Robert, > no, I sure didn't mean to imply that two signals need >be at all alike to have the same spectrum. Perhaps >I misunderstood the original poster. It just seemed odd >to me that he said he's analyzing an EMG signal and I >assumed by "analyzing" he meant spectrum analysis. >And then he said he was rectifying the EMG signal, and >that would produce a signal with a different spectrum >than the spectrum of the original EMG signal. I was merely >trying to point that out to the original poster. > >Being that I know nothing about analyzing EMG signals, >perhaps I should just keep quiet. > >See Ya', >[-Rick-] > > > >
I don't think the OP is dealing with spectrums as much as he is dealing with IF of the signals. Not sure but from what I have read on the subject I believe this. I would be happy to hear the reply from the OP. Mark DeArman
On 1/27/2012 6:47 AM, Rick Lyons wrote:
> On Fri, 27 Jan 2012 03:50:08 -0500, robert bristow-johnson > <rbj@audioimagination.com> wrote: > >> On 1/26/12 9:58 PM, Rick Lyons wrote: >>> On Tue, 24 Jan 2012 09:21:59 -0600, "marieclare" >>> <marieclare.mccormick@n_o_s_p_a_m.uws.ac.uk> wrote: >>> >>>> I am using MATLAB to analyse EMG signals. So far I have rectified the data >>>> and performed a STFT (using a Hamming Window). I am now looking to >>>> calculate the median frequency of the power spectrum and would be grateful >>>> if someone could advise me on the best way to do this. >>>> >>>> Thanks >>> >>> Hello marieclare, >>> If you have signal, let's call it signal "A". >>> If you rectify signal "A" you have a different signal >>> that we'll call signal "B". I hope you >>> realize that the spectrum of signal "A" will not >>> be the same as the spectrum of signal "B". >>> >> >> oh c'mon Rick, you're not saying that two signals need be at all alike >> to have the same spectrum. say A is a dirac impulse and B is white >> noise. two impossible signals with real-world approximations that have >> nothing to do with each other except, um, i forgot. > > Hi Robert, > no, I sure didn't mean to imply that two signals need > be at all alike to have the same spectrum. Perhaps > I misunderstood the original poster. It just seemed odd > to me that he said he's analyzing an EMG signal and I > assumed by "analyzing" he meant spectrum analysis. > And then he said he was rectifying the EMG signal, and > that would produce a signal with a different spectrum > than the spectrum of the original EMG signal. I was merely > trying to point that out to the original poster. > > Being that I know nothing about analyzing EMG signals, > perhaps I should just keep quiet.
I don't know how modern analyses of EMGs are done, but I suspect that the term "rectify" here isn't related to absolute values, but maybe to taking the tilt out of the baseline. I've heard it used that way in Auger spectrometry. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On 1/27/2012 7:06 AM, Mac Decman wrote:

   ...

> I don't think the OP is dealing with spectrums as much as he is > dealing with IF of the signals. Not sure but from what I have read on > the subject I believe this. I would be happy to hear the reply from > the OP.
I meant to ask before. It can't be "intermediate frequency". What does IF mean here? Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;