1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Wave with oscillating frequency

  1. Dec 18, 2008 #1

    In order to test-drive a data analysis program, I am looking for a function that generates sine waves with slowly oscillating frequency, i.e. the distance between the maxima should be slowly changing.

    I thought that I could simply achieve this by using a function of the form
    f(t) = \sin\Bigl( 2 \pi t \bigl[ 5 + \cos( 2 \pi t / 10 ) \bigr] \Bigl)
    and expected to get something that oscillates with a frequency that slowly changes between 4 and 6 over when t goes from 0 to 10.

    However, the function behaves in a very different way. It reaches a maximum of f(t)~0.5 at t~3 and has to minima very close to each other at t~4.2.

    Can someone help me to understand (a) why the above function doesn't behave the way I expect it to and (b) what function I could use to generate the desired data?

  2. jcsd
  3. Dec 18, 2008 #2


    User Avatar
    Science Advisor

    Hi Nik, you've fallen for a really common mistake with regard to frequency modulation.

    In general the instantaneous radian frequency (w=2 pi f) is the time rate of change of phase (phi), this of course is not the same thing as "phase" divided by "t" except for the special case where the phase is a linear function of "t", that is where [itex]\phi = 2 \pi f t[/tex].

    So what you really want is,

    [tex]\frac{d\phi}{d t} = 2 \pi ( 5 + \cos(\pi t /5) )[/tex]

    Which upon integration gives,

    [tex]\phi = 10 \pi t + 10 \sin(\pi t /5)[/tex]

    Try using f(t)=sin(phi), with phi as given above and I think you'll find it does what you're looking for.
  4. Dec 18, 2008 #3
    Yes, that was it! Thank you very much!
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Threads - Wave oscillating frequency Date
B Oscillations in a driven spring Sunday at 8:04 AM
I Period of a sine wave Dec 4, 2017
I Regression of a sine wave Aug 10, 2017
A Difference of WMA & EMA on a sinusoid becomes superposed? Jul 1, 2017
I Generating Aperiodic Tilings with Plane Waves Dec 26, 2016