This might be an easy one!

Please preface your answer with spoiler notation by typing the following two characters first ">!"

Given the following equation that describes a cosine wave as a function of time:

$$m(t) = \cos(2\pi f t) $$

We know that $t$ is the independent variable for time in seconds, and $f$ as a constant value will be the frequency of the cosine in $\textrm{Hz}$.

What if f is a linear ramp over time?

Given a time domain waveform $m$ with a linearly increasing frequency over time, that starts at $t=0$ with frequency $F_1\textrm{ Hz}$ and ends with frequency $F_2\textrm{ Hz}$:

Provide the expression for $f(t)$ in terms of $F_1$ and $F_2$ and $T$, that would create a function $m(t)$ whose frequency starts at $F_1$ and ends at $F_2$, with the frequency linearly increasing over some arbitrary time period $T$.

The actual spectrum, as in any spreading effect due to the ramp rate, is of no interest to this solution.


The answer is a simple linear equation ($y = mx+b$), with a $y$-intercept $b$ that is a constant dependent only on $F_1$ and value $y$ at time $T$ is another constant dependent only on $F_2$ --- what are those two constants with relation to $F_1$ and $F_2$?

  • 3
    $\begingroup$ I guess you also need to specify the time interval during which you go from $F_1$ to $F_2$. $\endgroup$
    – Matt L.
    Commented Jun 16, 2016 at 22:56
  • 1
    $\begingroup$ I'm liking these puzzles, Dan. Keep them coming! :-) $\endgroup$
    – Peter K.
    Commented Jun 16, 2016 at 23:33
  • $\begingroup$ Matt- I see your point and updated the question to include the time span as a variable. $\endgroup$ Commented Jun 17, 2016 at 10:17
  • $\begingroup$ Off Topic but "What is a spoiler notation ?", and what for? $\endgroup$
    – Fat32
    Commented Jun 17, 2016 at 20:35
  • $\begingroup$ It hides the answer until you hover over it since it is a "puzzle" in case someone wants the opportunity to think about it before seeing the answer. $\endgroup$ Commented Jun 17, 2016 at 21:22

1 Answer 1


I waited a bit to see if someone else takes the challenge, but since there are no answers yet, I'm providing mine now.

For a given signal $m(t)=\cos(\phi(t))$ the instantaneous frequency is given by $$\nu(t)=\frac{\phi'(t)}{2\pi}\tag{1}\\$$One pitfall here is that if we write $m(t)=\cos[2\pi f(t)t]$, $f(t)$ is generally not the instantaneous frequency (unless $f(t)$ is constant).

We want the following instantaneous frequency:$\nu(t)=\begin{cases}F_1,&t<t_1\\F_1+\frac{F_2-F_1}{t_2-t_1}(t-t_1),&t_1<t<t_2\\F_2,&t>t_2\end{cases}\tag{2}\\$

From $(1)$ and $(2)$, in the time interval $[t_1,t_2]$ the phase $\phi(t)$ must be chosen as $$\frac{\phi(t)}{2\pi}=F_1t+\frac{F_2-F_1}{t_2-t_1}\left(\frac{t^2}{2}-t_1t\right)+C\tag{3}$$

Choosing $C=0$, and since $\phi(t)/(2\pi)=f(t)\cdot t$, we get from $(3)$ $$\begin{align}f(t)&=F_1+\frac{F_2-F_1}{t_2-t_1}\left(\frac{t}{2}-t_1\right)\\&=F_1-\frac{\Delta F}{\Delta t}t_1+\frac12\frac{\Delta F}{\Delta t}t,\quad t_1<t<t_2\tag{4}\end{align}\\$$ with $\Delta F=F_2-F_1$ and $\Delta t=t_2-t_1$.

  • $\begingroup$ Yes, it looks like mathjax and markdown spoiler code don't play nicely together. One option is to write all the maths in one line, which is a little painful. $\endgroup$
    – Peter K.
    Commented Jun 17, 2016 at 12:46
  • $\begingroup$ @PeterK.: Thanks Peter, I saw that post too, but I got kind of discouraged ... $\endgroup$
    – Matt L.
    Commented Jun 17, 2016 at 13:12
  • $\begingroup$ @MattL. fixed ! $\endgroup$
    – Gilles
    Commented Jun 17, 2016 at 16:39
  • $\begingroup$ @Gilles: THANKS! (must check how you did that ...) $\endgroup$
    – Matt L.
    Commented Jun 17, 2016 at 16:40
  • 1
    $\begingroup$ @MattL, Yes that's much better- I updated it as you suggested.. $\endgroup$ Commented Jun 17, 2016 at 20:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.