4

$$ x(t) = |a \cos(\omega_0 t) + b \cos(\omega_1 t)| $$ with $a, b \geq 0$, $\omega_0, \omega_1 > 0$, but $a, b > 0$ or all $a, b$ (negatives included) is also acceptable, or replacing $\cos$ with $\sin$.

Is there a known result for $\mathcal{F}\{x(t)\}$? Derivation not needed but is welcome. Of main interest is the DFT, but I don't reckon we can find it without $\mathcal{F}$.


Periodicity is maintained for all $a, b$, though I'm unsure how predictable it is depending on $a,b$, from which we could build a periodic windowing function to isolate $d(t)=|y(t)| - y(t)$, where $x(t) = |y(t)|$.

W|A gives for $a \cos(A) + b \cos(B)$

$$ \sum_{k=0}^{\infty} \frac{\cos(k\frac{\pi}{2} + z_0)(a(A - z_0)^k + b(B - z_0)^k)}{k!} $$

for any $z_0$, which for $z_0=0$ is sort of within $2k$ of product of cosines, and we have for the $\sin$ version, from here

$$ c \sin {\left( A + \sin^{-1}\left(\frac{b}{c} \sin (B - A)\right) \right)} $$

where $c = \sqrt{a^2 + b^2 + 2ab \cos(B - A)}$. So even $y(t)$ has nonlinearities...


OverLordGoldDragon
  • 8,912
  • 5
  • 23
  • 74
  • 1
    Interesting questions. Nothing comes to mind. And both Wolfram Alpha and Matlab symbolic math toolbox barf on it. :-) This is related but doesn't answer your question. – Peter K. Jun 05 '22 at 22:18
  • 1
    @PeterK. DFT modulus property not looking too hot right now... also strange WA can't even do |cos(x)|. – OverLordGoldDragon Jun 05 '22 at 22:23
  • @OverLordGoldDragon : abs cos() can be written as a boxcar times cos() convolved with and infinite train of Dirac deltas. From there the FT should fall out using FT properties and the FTs of the 3 functions. – Andy Walls Jun 06 '22 at 02:25
  • @AndyWalls But this is abs of a.cos + b.cos? Are you saying we can rewrite in terms of some 3 functions? Note it's not |a.cos| + |b.cos| – OverLordGoldDragon Jun 06 '22 at 02:43
  • Interesting question and don’t know how I missed this! So the approach for me would be to see that the result is the same as multiplying the sum of the two waveforms with the sign of that sum. For both components (the sum, and the sign of that sum) we can readily establish what the FT will be (the sum is just those components and the sign of it would be the FT of the resulting rectangular function which will have components at integer harmonics of its joint periodicity, some of those zero based on duty cycle. Then the result you seek if the convolution of the two and then as a DFT aliased … – Dan Boschen Aug 01 '22 at 18:55
  • based on the relative periodicity of the DFT frame and the signals (easier when they are related by integer prime factors). – Dan Boschen Aug 01 '22 at 19:05
  • @DanBoschen Is this different from the $d(t) = |y(t)| - y(t)$ I describe? Like here – OverLordGoldDragon Aug 01 '22 at 20:34
  • @OverLordGoldDragon Yes different, not sure if simpler. Here |y(t)| is what you seek so I am proposing doing it as |y(t)| = sign(y(t)) * y(t) and then using the convolution property of the FT. I haven't worked through it but if I have time later in the week will post as an answer if there is interest. The FT of the sign(y(t)) for your y(t) is clear to me, so I think it would be tractable... certainly the FT and the DFT if I am allowed the luxury of the frequencies being at bin centers. – Dan Boschen Aug 01 '22 at 22:58
  • @DanBoschen Well yes, that's the idea both would use. If sign(y(t)) tractable, life is good - I only tried superficially, now tried a little again, looks better than I recall! Look forward to your take. – OverLordGoldDragon Aug 02 '22 at 01:38
  • @DanBoschen So this is equivalent to solving the inequality $a\cos(\omega_0 t) > \cos(\omega_1 t)$, which we can get to by solving the equality and periodicity. For DFT, it seems doable, but for CFT... It's possible WA is overcomplicating but given the expressions, if there's a general closed form then seems it uses infinite sums or special funcs. I've asked. – OverLordGoldDragon Aug 06 '22 at 10:58
  • @OverLordGoldDragon A lot harder than I first expected. I resort to computing the FSE coefficients through integration at integer multiples of the known periodicity which is $(\omega_1 - \omega_0)/2$. That part was likely obvious to you but not the closed for equation you are are interested in. – Dan Boschen Aug 06 '22 at 17:22

0 Answers0