DSPRelated.com
Forums

narrow band (notch?) filters at a range of frequencies

Started by Unknown February 28, 2008
On Mar 1, 4:15 am, Rune Allnor <all...@tele.ntnu.no> wrote:
> On 1 Mar, 00:43, wbs <cssm...@gmail.com> wrote: > > > > > On Feb 29, 12:26 pm, Rune Allnor <all...@tele.ntnu.no> wrote: > > > > 2) if this is entirely nonsensical, what is a more standard way of > > > > finding frequency-specific differences between two signals, and then > > > > generating a third signal that is a frequency-dependent difference of > > > > one signal from another? > > > > The cross spectrum is one approach to test. Mind you, it > > > basically detects the frequency bands where both the two > > > signals have large energy. You want to identify where one > > > signal is large and the other is small. That might require > > > some tweaking, which might not be worth the effort. > > > right, so i first looked at the cross spectrum of the two signals, and > > then didn't really know what to do with that. while this may not be > > 'worth the effort' i wonder if you can help me figure out how i might > > actually use the cross-PSD to get at this issue. > > A *very* peliminary, naive approach (not to mention untested!) > would be to first compute the energy normalized autospetcra: > > pxx(f) = Pxx(f)/Px > pyy(f) = Pyy(f)/Py > > where Px means 'Pxx(f) integrated over f'. Then compute the > cross spectrum cxy(f) with the same normalization - I wouldn't > be surprised if this would look something like > > cxy(f)^2 = Cxy(f)^2/sqrt(Px*Py) > > This, all of a sudden, looks very similar to measuring the > coherence between x and y. Which, in turn, *might* suggest > that fitting a filter to the coherence spectrum between x > and y might help you in your task. > > Just keep in mind that I post this on an 'early' saturday > morning following a late friday night, long before I got > any hint of breakfast. If you still take the chance to > follow up on my dubious hunches, you might want to check > out > > Bendat & Piersol: "Random Data" > > Rune
yes, signal coherence... this is a good lead, i think. however, when i do plot the coherence of the two signals, i am not entirely sure how to interpret the results... i mean, clearly, places where the coherence is very low are places i should think about setting bandpass filters... problem is, i do not know how to define "very low" since the range of the coherence plot is really only between 0 and 5e-5. i suppose i could start by setting bandpass filters at the local minima in the coherence function. comments on this idea? thanks for this lead. i was thinking about coherence in looking at the cross spectral density, but hadn't specifically tried this out. bryan
On 3 Mar, 20:22, wbsm...@gmail.com wrote:
> On Mar 1, 4:15 am, Rune Allnor <all...@tele.ntnu.no> wrote: > > > > > > > On 1 Mar, 00:43, wbs <cssm...@gmail.com> wrote: > > > > On Feb 29, 12:26 pm, Rune Allnor <all...@tele.ntnu.no> wrote: > > > > > 2) if this is entirely nonsensical, what is a more standard way of > > > > > finding frequency-specific differences between two signals, and then > > > > > generating a third signal that is a frequency-dependent difference of > > > > > one signal from another? > > > > > The cross spectrum is one approach to test. Mind you, it > > > > basically detects the frequency bands where both the two > > > > signals have large energy. You want to identify where one > > > > signal is large and the other is small. That might require > > > > some tweaking, which might not be worth the effort. > > > > right, so i first looked at the cross spectrum of the two signals, and > > > then didn't really know what to do with that. &#4294967295;while this may not be > > > 'worth the effort' i wonder if you can help me figure out how i might > > > actually use the cross-PSD to get at this issue. > > > A *very* peliminary, naive approach (not to mention untested!) > > would be to first compute the energy normalized autospetcra: > > > pxx(f) = Pxx(f)/Px > > pyy(f) = Pyy(f)/Py > > > where Px means 'Pxx(f) integrated over f'. Then compute the > > cross spectrum cxy(f) with the same normalization - I wouldn't > > be surprised if this would look something like > > > cxy(f)^2 = Cxy(f)^2/sqrt(Px*Py) > > > This, all of a sudden, looks very similar to measuring the > > coherence between x and y. Which, in turn, *might* suggest > > that fitting a filter to the coherence spectrum between x > > and y might help you in your task. > > > Just keep in mind that I post this on an 'early' saturday > > morning following a late friday night, long before I got > > any hint of breakfast. If you still take the chance to > > follow up on my dubious hunches, you might want to check > > out > > > Bendat & Piersol: "Random Data" > > > Rune > > yes, signal coherence... this is a good lead, i think. &#4294967295;however, when > i do plot the coherence of the two signals, i am not entirely sure how > to interpret the results... i mean, clearly, places where the > coherence is very low are places i should think about setting bandpass > filters...
That was the idea, yes...
> problem is, i do not know how to define "very low" since > the range of the coherence plot is really only between 0 and 5e-5.
Ouch! Very low numbers. Wouldn't trust them at all. Either the numerics has bugs or the general idea is flawed. I would like to see coherence numbers in the range 0.1-1 before proceeding.
>&#4294967295;i > suppose i could start by setting bandpass filters at the local minima > in the coherence function. &#4294967295;comments on this idea?
Bail out! Unless you can find (and fix!) blunders and/or flaws.
> thanks for this lead. &#4294967295;i was thinking about coherence in looking at > the cross spectral density, but hadn't specifically tried this out.
Rune
On Mar 3, 11:32 am, Rune Allnor <all...@tele.ntnu.no> wrote:

> Ouch! Very low numbers. Wouldn't trust them at all. Either the > numerics has bugs or the general idea is flawed. I would like > to see coherence numbers in the range 0.1-1 before proceeding.
or maybe the signals just have very low coherence? i am pretty sure the algorithm is working (i am using the matlab 'mscohere' function, which returns an array of ones if i measure the coherence of one signal with itself). and actually, there is a high value (nearly 1) for the lowest frequency values of my two signals. but when i get above anything near about 0.5 kHz (my sampling frequency is 44.1 kHz), the values decrease to the aforementioned range. bryan
On 3 Mar, 21:41, wbsm...@gmail.com wrote:
> On Mar 3, 11:32 am, Rune Allnor <all...@tele.ntnu.no> wrote: > > > Ouch! Very low numbers. Wouldn't trust them at all. Either the > > numerics has bugs or the general idea is flawed. I would like > > to see coherence numbers in the range 0.1-1 before proceeding. > > or maybe the signals just have very low coherence? &#4294967295;i am pretty sure > the algorithm is working (i am using the matlab 'mscohere' function, > which returns an array of ones if i measure the coherence of one > signal with itself).
That doesn't mean too much. I don't think the Mathworks have been all out wrong in the past, but they have a long history of doing very simple things in very awkward ways.
>&#4294967295;and actually, there is a high value (nearly 1) > for the lowest frequency values of my two signals. &#4294967295;but when i get > above anything near about 0.5 kHz (my sampling frequency is 44.1 kHz), > the values decrease to the aforementioned range.
Maybe my idea about using cross spectra and coherence functions was flawed in the first place. Rune