$25
1. Work through the example codes and understand them.
2. Consider the function cos3(ω0t). Obtain its spectrum for ω0 = 0.86 with and without a Hamming window.
3. Write a program that will take a 128 element vector known to contain cos(ω0t +δ) for arbitrary δ and 0.5 < ω0 < 1.5. The values of t go from −π to π. You have to extract the digital spectrum of the signal, find the two peaks at ±ω0, and estimate ω0 and δ.
4. Suppose the data in Q3 has added “white gaussian noise”. This can be generated byrandn() in python. The extent of this noise is 0.1 in amplitude (i.e., 0.1*randn(N), where N is the number of samples). Repeat the problem and find the ω0 and δ
5. Plot the DFT of the function
for t going from −π to π in 1024 steps. This is known as a “chirped” signal, and its frequency continuously changes from 16 to 32 radians per second. This also means that the period is 64 samples near −π and is 32 samples near +π.
6. For the same chirped signal, break the 1024 vector into pieces that are 64 sampleswide. Extract the DFT of each and store as a column in a 2D array. Then plot the array as a surface plot to show how the frequency of the signal varies with time.
This is new. So far we worked either in time or in frequency. But this is a “timefrequency” plot, where we get localized DFTs and show how the spectrum evolves in time.