0

This morning, I asked a similar question about separating simple signals - with constant frequency - into exponential components. User @AndreasH suggested that a hilbert transform can do this as follows:

$$\cos(\omega_1 t) + j ~\textrm{Hilbert}[\cos(\omega_1 t)] = e^{j\omega_1 t}$$

This works great when $\omega_1$ is a real constant, and when time is linear. Is there a way to do it for a more complicated signal? For example,

$$x(t)=\cos(\omega_o t^2 ) $$

When I perform a hilbert transform on this one, I get something with a lot of error functions.

How can I get $y(t)=e^{j\omega_o t^2}$ from $x(t)$?

axsvl77
  • 199
  • 10
  • Perhaps this isn't possible analytically; but perhaps digitally? – axsvl77 Oct 18 '17 at 19:39
  • I don't know what you mean by "is there a transform to give..." – Dave Kielpinski Oct 18 '17 at 23:22
  • I think what he means is whether there's a transform (like Hilbert transform) that would turn $x(t)=cos(w_0t^2)$ into $y(t)=e^{j w_0 t^2}$. – Atul Ingle Oct 19 '17 at 01:56
  • @axsvl77 I think you are missing a $j$ from many of your complex exponentials. – Atul Ingle Oct 19 '17 at 01:57
  • @DaveKielpinski More clear? – axsvl77 Oct 19 '17 at 11:29
  • @axsvl77 Just out of curiosity, are you trying to ask a more general question about how to express any function in that complex exponential form? Or are you only interested in functions of the form $cos(f(t))$? Or are you only interested in $cos(wt^2)$? – Atul Ingle Oct 19 '17 at 14:05
  • @AtulIngle Both. I am more interested in a general method of extracting $e^{j\omega(t) t + j \phi(t)}$ from $\cos(\omega(t)t + \phi(t))$, but am also specifically interested in $\cos(\omega t^2)$ – axsvl77 Oct 19 '17 at 14:22

1 Answers1

1

Hilbert transform method from your earlier question and Jason R's answer should still work. What you are interested in is extracting the instantaneous phase of your function. For a signal $x(t)$ this is given by $\phi(t) = \angle x_a(t)$ where $x_a(t)$ is the analytic signal of $x(t)$.

Digitally you can do this using a Hilbert transform too. Here's a code snippet in Python:

import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import hilbert
plt.style.use('presentation')

if __name__=='__main__':

  t = np.linspace(0,3,100)
  x = np.cos(10*t*t)

  y = np.imag(hilbert(x))

  x_a = x + 1j*y
  inst_phase = np.angle(x_a)

  true_phase = 10*t*t
  true_phase_wrapped = (true_phase-np.pi)%(2*np.pi)-np.pi

  plt.figure(1)
  plt.plot(t, x)
  plt.plot(t, inst_phase)
  plt.plot(t, true_phase_wrapped)
  plt.legend((r'$x(t)=\cos(10t^2)$', r'$\angle x_a(t)$', 
      r'$10 t^2$ wrapped to $[-\pi,\pi]$'))

  plt.figure(2)
  plt.plot(t, np.unwrap(inst_phase))
  plt.plot(t, true_phase)
  plt.legend(('unwrapped inst. phase', 'true phase=$10t^2$'))
  plt.show(block=False)

Figure 1 Figure 2

Atul Ingle
  • 3,994
  • 1
  • 12
  • 25
  • Thanks for your answer! When I implement the hilbert transform [using this code in mathematica](https://mathematica.stackexchange.com/a/350/22432), It most certainly works for $\cos(\omega t^2)$. However, with a time shift, $\cos(\omega (t-1)^2)$ it does not work. – axsvl77 Oct 27 '17 at 18:12
  • [Here's my graph](https://imgur.com/EfFwQVF) - for t<1, the green line and the blue line should be similar. What did I do wrong? – axsvl77 Oct 27 '17 at 18:29
  • I installed python, ran your code with every `t` replaced by `(t-1)`, and have a similar response as my mathematica code; for $0 – axsvl77 Oct 27 '17 at 18:41