Using Fourier transform for an oscillator?

215 Views Asked by At

I am currently having a lot of difficulty with the following question:

Consider an oscillator whose characteristic frequency is $\omega_0$ and which is excited in such a way as to give out a pulse of Gaussian shape. Its energy state is characterized by the function $E(t)=e^{f(t)}e^{iω_0 t}$ where $$f(t)=[-(t-t_0)^2/2(Δt)^2 ] e^{iω_0 t}$$ The pulse of radiation is centered at $t=t_0$ and has a spread in time of $\Delta t$. measured at the half-amplitude points of the pulse. Find the spectral $E(\omega)$ distribution of this signal. Plot $E(t)$vs $t$, and $E(\omega)$ vs $\omega$.

Any help would be greatly appreciated. All I know is that I must use the Fourier transform, but I am not so sure as of how to apply it.

1

There are 1 best solutions below

4
On BEST ANSWER

Here's an example using numpy's discrete Fourier transform (dft) implementation

 import numpy as np
 import matplotlib.pyplot as plt

 # Calculates the DFT of a Gaussian pulse
 def gauss_pulse(time, f0):

     tw = 2 / f0
     t0 = 3 * tw        
     e = np.exp(-(time - t0)**2 / (2 * tw**2)) * np.exp(1j * time * 2 * np.pi * f0)

     return  np.fft.fft(e)


 # Sets the peak frequency and sampling rate
 f0 = 1e3
 fsampling = 10 * f0
 dt = 1 / fsampling
 nt = 200

 df = 1 / (nt * dt)
 freq = np.arange(nt / 2) * df
 time = np.arange(nt) * dt

And for plotting the pulse in frequency-domain just use

 pulse = gauss_pulse(f0)
 plt.plot(freq, np.log(np.abs(pulse))[ : nt / 2])
 plt.show()

If you want it in time-domain

 pulse = gauss_pulse(f0)
 plt.plot(time, np.real(np.fft.ifft(pulse)))
 plt.show()

You should get something like this

enter image description here