0
$\begingroup$

This question is about combining 2 sinusoids with frequencies $\omega_1$ and $\omega_2$ into 1 "wave shape", where the frequency linearly changes from $\omega_1$ to $\omega_2$, and where the wave starts at phase = 0 radians (point A in the image), and ends back at the completion of the at $2\pi$ radians (point E), resulting in a shape similar to this, assuming $\omega_1$ is a lot smaller (larger period) than $\omega_2$:

enter image description here

Note that the amplitude is the same for both waves: points B and D are at equal distance from the $x$-axis.

  • Is there a closed-form definition for this, like linear frequency modulation?
  • Part of my question is also: where does point C end up on the x-axis if the "wave" starts at the origin (0,0)?

I was thinking about something like this:

1*sin((w1*t)+((w2-w1)/T)*((t^2)/2))

with:

  • w1: frequency 1
  • w2: frequency 2
  • t: a vector going from 0 to ((1/w1)+(1/w2))
  • T: some arbitrary number: this is part of the question I suppose..
$\endgroup$
1
$\begingroup$

Let us assume the following signal form $$x(t)=\sin(2\pi t f(t))$$ where $f(t)$ is some "instantaneuous frequency", which should increase linearly from $w_1$ to $w_2$ over the time.

The time should end, when the sine wave has done one period, i.e. its argument became $2\pi$. At this time, $f(t)=w_2$. From that we can calculate:

$$2\pi w_2 t_e=2\pi\\t_e=1/w_2,$$ where $t_e$ is the end time of the simulation. Hence, we have $$f(w)=w_1+\frac{w_2-w_1}{t_e}t=w_1+(w_2-w_1)w_2t.$$ We can plot this function:

w1 = 5
w2 = 10
T = 1/w2

Fs = 100000

t = np.arange(0, T, 1/Fs)

f = np.linspace(w1, w2, len(t))
plt.plot(t, np.sin(2*np.pi*f*t))
plt.title('Graph')
plt.grid(True)

enter image description here

Now, regarding the question, where the zero is. The sine goes to zero, when its argument becomes $\pi$. Hence, we have

$$2\pi (w_1+(w_2-w_1)w_2t)t=\pi,$$

which we can solve by (its a quadratic equation, so nothing special, but I use mathematica for convenience):

$$\text{Solve}\left[t (t \text{w2} (\text{w2}-\text{w1})+\text{w1})=\frac{1}{2},t\right]$$

$$\left\{\left\{t\to \frac{\sqrt{\text{w1}^2-2 \text{w1} \text{w2}+2 \text{w2}^2}-\text{w1}}{2 \left(\text{w2}^2-\text{w1} \text{w2}\right)}\right\},\left\{t\to \frac{\sqrt{\text{w1}^2-2 \text{w1} \text{w2}+2 \text{w2}^2}+\text{w1}}{2 \left(\text{w1} \text{w2}-\text{w2}^2\right)}\right\}\right\}$$

There are two solutions, because for negative t, we can also end up with a solution (both $f(t)$ and $t$ would be negative to yield 1/2 as the argument).

To answer the comment from @Jason R: This indeed can also be seen as a frequency-modulation, given by

$$x(t)=\sin\left(2\pi\int_0^t\phi(\tau)d\tau\right)$$

when setting

$$\phi(\tau)=w_1+2(w_2-w_1)w_2\tau.$$

In this case we have $tf(t)=\int_0^t\phi(\tau)d\tau$.

$\endgroup$
  • $\begingroup$ This isn't really linear frequency modulation. The instantaneous phase of an FM signal is usually represented as the time integral of the signal's frequency function. In this example, you're instead taking subsequent samples of many sinusoids at different frequencies at slightly different periods of time, then interleaving them. That's not the same effect that you would get by starting with a sinusoidal function and linearly varying its frequency over time; you need to model the accumulation of phase from earlier time instants. $\endgroup$ – Jason R Jan 24 '17 at 16:37
  • $\begingroup$ @JasonR Well, actually, it can be considered as linear FM, see my edit: the phase as the integral of some function (that grows linear with time) gives the same expression for argument of the sine. $\endgroup$ – Maximilian Matthé Jan 24 '17 at 16:46
  • $\begingroup$ It is linear FM, but not in the manner you described. It is not a linear ramp between frequencies $w_1$ Hz and $w_2$ Hz. Look at the derivative of the phase of the signal you generated (i.e. the instantaneous frequency, a somewhat squishy term) and note that its rate of change exceeds $w_2$ Hz by the end of the array that your code snippet generates. $\endgroup$ – Jason R Jan 24 '17 at 17:29
  • 1
    $\begingroup$ Is it possible that there's a typo: "The time should end, when the sine wave has done one period, i.e. its argument became 2π. At this time, f(t)=w1f(t)=w1." Shouldn't that be ... At this time, f(t)=w2? $\endgroup$ – MisterH Jan 26 '17 at 5:16
  • $\begingroup$ Thans for pointing this out, I've corrected it. $\endgroup$ – Maximilian Matthé Jan 26 '17 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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