Recently I'm trying to solve a following problem: Let's say that we have some data that has been created by sampling some sinusoidal wave (ie. a wave that "looks" like a sine wave in which frequency is changing over time in some unknown manner - it is still a continuous function, has values between -1 and 1, but sometimes it is "squashed", othertimes it is "widened"). What's more, our sampled data might be a little bit noisy. What is the best way to estimate where each of the S-shaped part of this sinusoidal wave (by "S-shaped part" I mean something that looks like part of the graph of the standard sine wave on the interval [0, 2*pi]) has it's begining? I tried to use autocorrelation and FFT, but using it on entire data is not a good solution, because a frequency of given sinusoidal wave can change over time. Tracing points in which the sine wave is crossing zero isn't good as well, because the noise can create some artificial points in which noised sinusoidal wave is reaching zero. Have you got any ideas how to solve this problem efficiently? PS. A good model of data on which we are operating can be build using the following Matlab functions: WAVE = sin((0:0.01:8*pi).^1.75); NOISE = 0.5*randn(1,length(WAVE)); WAVE = WAVE + NOISE;
'Local periods' of a sinusoidal wave
Started by ●October 4, 2010
Reply by ●October 4, 20102010-10-04
On Oct 4, 1:47�pm, shapeshifter <krzysztof.kol...@gmail.com> wrote:> Recently I'm trying to solve a following problem: > > Let's say that we have some data that has been created by sampling > some sinusoidal wave (ie. a wave that "looks" like a sine wave in > which frequency is changing over time in some unknown manner - it is > still a continuous function, has values between -1 and 1, but > sometimes it is "squashed", othertimes it is "widened"). What's more, > our sampled data might be a little bit noisy. > > What is the best way to estimate where each of the S-shaped part of > this sinusoidal wave (by "S-shaped part" I mean something that looks > like part of the graph of the standard sine wave on the interval [0, > 2*pi]) has it's begining? > > I tried to use autocorrelation and FFT, but using it on entire data is > not a good solution, because a frequency of given sinusoidal wave can > change over time. Tracing points in which the sine wave is crossing > zero isn't good as well, because the noise can create some artificial > points in which noised sinusoidal wave is reaching zero. > > Have you got any ideas how to solve this problem efficiently? > > PS. A good model of data on which we are operating can be build using > the following Matlab functions: > > WAVE = sin((0:0.01:8*pi).^1.75); > NOISE = 0.5*randn(1,length(WAVE)); > WAVE = WAVE + NOISE;FM demodulate it and see what bin would be closest at each sample if that frequency were constant during the entire FFT interval and actually fell exactly in 1 bin ;-). Dirk
Reply by ●October 4, 20102010-10-04
Dirk Bell <bellda2005@cox.net> wrote:>On Oct 4, 1:47�pm, shapeshifter <krzysztof.kol...@gmail.com> wrote:>> Recently I'm trying to solve a following problem: >> [snip]>FM demodulate it and see what bin would be closest at each sample if >that frequency were constant during the entire FFT interval and >actually fell exactly in 1 bin ;-).Hmm. "FM demodulate it" is not an exact specification of a particular mathematical technique. Or is it? Steve
Reply by ●October 4, 20102010-10-04
On Oct 4, 2:27�pm, spop...@speedymail.org (Steve Pope) wrote:> Dirk Bell �<bellda2...@cox.net> wrote: > > >On Oct 4, 1:47�pm, shapeshifter <krzysztof.kol...@gmail.com> wrote: > >> Recently I'm trying to solve a following problem: > >> [snip] > >FM demodulate it and see what bin would be closest at each sample if > >that frequency were constant during the entire FFT interval and > >actually fell exactly in 1 bin ;-). > > Hmm. �"FM demodulate it" is not an exact specification of a particular > mathematical technique. �Or is it? > > SteveHow about " Perform Instantaneous FM demodulation" ? (See Ferking) Dirk
Reply by ●October 4, 20102010-10-04
On Oct 4, 2:27�pm, spop...@speedymail.org (Steve Pope) wrote:> Dirk Bell �<bellda2...@cox.net> wrote: > > >On Oct 4, 1:47�pm, shapeshifter <krzysztof.kol...@gmail.com> wrote: > >> Recently I'm trying to solve a following problem: > >> [snip] > >FM demodulate it and see what bin would be closest at each sample if > >that frequency were constant during the entire FFT interval and > >actually fell exactly in 1 bin ;-). > > Hmm. �"FM demodulate it" is not an exact specification of a particular > mathematical technique. �Or is it? > > SteveHow about " Perform Instantaneous FM demodulation" ? (See Frerking) Dirk
Reply by ●October 4, 20102010-10-04
On 10/04/2010 12:12 PM, Dirk Bell wrote:> On Oct 4, 2:27 pm, spop...@speedymail.org (Steve Pope) wrote: >> Dirk Bell<bellda2...@cox.net> wrote: >> >>> On Oct 4, 1:47 pm, shapeshifter<krzysztof.kol...@gmail.com> wrote: >>>> Recently I'm trying to solve a following problem: >>>> [snip] >>> FM demodulate it and see what bin would be closest at each sample if >>> that frequency were constant during the entire FFT interval and >>> actually fell exactly in 1 bin ;-). >> >> Hmm. "FM demodulate it" is not an exact specification of a particular >> mathematical technique. Or is it? >> >> Steve > > How about " Perform Instantaneous FM demodulation" ? (See Ferking)How instantaneous? That could get you into trouble with noise, too. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html
Reply by ●October 4, 20102010-10-04
On 10/04/2010 10:47 AM, shapeshifter wrote:> Recently I'm trying to solve a following problem: > > Let's say that we have some data that has been created by sampling > some sinusoidal wave (ie. a wave that "looks" like a sine wave in > which frequency is changing over time in some unknown manner - it is > still a continuous function, has values between -1 and 1, but > sometimes it is "squashed", othertimes it is "widened"). What's more, > our sampled data might be a little bit noisy. > > What is the best way to estimate where each of the S-shaped part of > this sinusoidal wave (by "S-shaped part" I mean something that looks > like part of the graph of the standard sine wave on the interval [0, > 2*pi]) has it's begining? > > I tried to use autocorrelation and FFT, but using it on entire data is > not a good solution, because a frequency of given sinusoidal wave can > change over time. Tracing points in which the sine wave is crossing > zero isn't good as well, because the noise can create some artificial > points in which noised sinusoidal wave is reaching zero. > > Have you got any ideas how to solve this problem efficiently? > > PS. A good model of data on which we are operating can be build using > the following Matlab functions: > > WAVE = sin((0:0.01:8*pi).^1.75); > NOISE = 0.5*randn(1,length(WAVE)); > WAVE = WAVE + NOISE;What do you mean by "beginning"? The rising zero crossing? How much does the frequency vary? 1:1.001? 1:2? 1:10? Are the limits of the frequency variance well known? Is the probability distribution of the frequency variance well known? Just how tightly do you need to measure the "beginning" point? How much time do you have to devote to your algorithm? If the limits of the frequency variance is known and not too large, if you can give up a few dB off of the absolute optimal result, and if you can't spend too much time calculating then running the thing through a matched filter for one cycle of the highest-ever frequency and looking for peaks may work well. It's a nonlinear optimization problem, and further one that does not look like it has a holonomous representation that is linear. So there's no one easy solution, and the 'best' solution will be elusive. This means that on the one hand there ain't no pat answers (grief), but on the other hand there may be _good_ solutions that you can come by easily (qualified joy) and that that no matter what solution you do come up with first, there'll probably be room for improvement later, meaning that your product will have a known upgrade path and you'll have guaranteed employment (joy). -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html
Reply by ●October 4, 20102010-10-04
On Oct 4, 1:21�pm, Dirk Bell <bellda2...@cox.net> wrote:> On Oct 4, 2:27�pm, spop...@speedymail.org (Steve Pope) wrote:...> > Hmm. �"FM demodulate it" is not an exact specification of a particular > > mathematical technique. �Or is it? > > > Steve > > How about " Perform Instantaneous FM demodulation" ? (See Frerking) > > DirkIt sounds like you are unable or unwilling to provide a useful description or reference. Dale B. Dalrymple
Reply by ●October 4, 20102010-10-04
dbd wrote:> On Oct 4, 1:21 pm, Dirk Bell<bellda2...@cox.net> wrote: >> On Oct 4, 2:27 pm, spop...@speedymail.org (Steve Pope) wrote: > ... >>> Hmm. "FM demodulate it" is not an exact specification of a particular >>> mathematical technique. Or is it? >> >>> Steve >> >> How about " Perform Instantaneous FM demodulation" ? (See Frerking) >> >> Dirk > > It sounds like you are unable or unwilling to provide a useful > description or reference. > > Dale B. DalrympleI think you jumped to conFUSION. www.google.com/search?q="FM+demodulation"+Frerking gives ~77 hits From glancing at first page of results, an indirect reference might be more useful than a explicit reference to a single paper. YMMV
Reply by ●October 4, 20102010-10-04
On Oct 4, 10:47�am, shapeshifter <krzysztof.kol...@gmail.com> wrote:> Recently I'm trying to solve a following problem: > ...> What is the best way to estimate where each of the S-shaped part of > this sinusoidal wave (by "S-shaped part" I mean something that looks > like part of the graph of the standard sine wave on the interval [0, > 2*pi]) has it's begining? > ...> Have you got any ideas how to solve this problem efficiently? > ...Subtract any DC component if you think there is one. Run a sliding median filter over the data. Use the zero crossings. A larger median window reduces variance, smaller reduces bias. The median filter gives a better approximation to the zero crossings than to the peaks. Dale B. Dalrymple






