You should work through the tutorial. You may wish to review
output of my
There are seven distinct exercises. For the first few exercises
the input data can be easily generated. But as you proceed generating the
input time series can, in itself, be time consuming. To this end
I provide a simple ascii data file for each exercise. I suggest that you
simply proceed these data files.
We start with a pure tone.
Generate a pure tone: y(k)=cos(2*pi*k*f0/N) where N=1024 and
k=0,1..,N-1. Note for reasons explained in the class the amplitude
of the Fourier transform should be normalized by N/2. (1) f0=32.
Plot the power spectrum.
You will note that high value of 1/4 at
bin 33 (for Matlab convention; this means that the frequency is
really 32) and bin N-31 (for Matlab convention). Connect this finding
to what you learnt.
You will find that the peak is
not longer a delta-like function.
That is because your signal has
finite temporal width and so you are seeing the effect of a window
Now set f0=924.
A frequency above N/2 is "aliased"
as explained in the class. Look at the power spectrum. Change f0=930
and note that the spike in the power spectrum is going to lower
We now add Gaussian noise with zero mean and unit variance,
The time series looks quite ratty but in the power
spectrum you can easily see the spike at the correct frequency.
Now we consider a simple square wave.
You will note that the power
specturm has many spikes. If you look carefully you will find the
spikes are at f0, 3*f0, 5*f0. The square wave is apparently made
up of many cosines.
Finally, we will randomly sample the pure
tone [discussed in (1)] above.
I used the Matlab "rand" function
which generates a random number uniformly distributed between 0 and
<1. If this variate was between 0.8 and 1 then I selected the sample
but not otherwise. We can still see the spike!
- Consider a satellite
in low earth orbit (e.g. Hubble). For most sources, you can observe only
half the time (the Earth will occult the source the remaining half).
This last exercise shows that value of observing a tone with Earth gaps.
Notice the "sidebands" (in physics this is called as beat frequency).