EEE3004/EEE8129 Intelligent Signal Processing Assignment, School of Engineering - Newcastle University, UK
Task 1 -
The process x[n] mathematically described as:
x[n] = A cos(2π fnTs)
where: A = 1.0; f= 0.2 Hz; fa = 5 Hz. Complete the following task-
i. Plot and compare the computational cost (no of additions and multiplications) for the estimation of frequency transform of x[n] using DFT and FFT methods for data point N = 2: 1024.
ii. Plot and compare the processing timing for the case 1.
iii. If you are to select DFT or FFT for designing any source code, which one would you select? Justify your selection.
[Hint: Use formulae given in table below for number of products and additions, for DFT estimation, use DFT equations discussed in class whilst frequency estimation using FFT method, use Matlab in-built command 'ffs'. In Matlab, the processing time can be estimated using command: 'tic ...function or model... toc'.. ]
OFT 34° A(N-1)
EFT (A72)Iou2N AloniN
|
No. of multiplication
|
No. of Addition
|
DFT
|
N2
|
N(N-1)
|
FFT
|
(N/2)log2N
|
Nlog2N
|
Task 2 -
The process x[n] mathematically described as:
x[n] = A1cos[2πf1nTs] + A2cos[2πf2nTs]
where: A1 = A2 = 10; f1 = 0.2Hz; f2 = 0.225; Ts = 1 sec (sampling frequency). Complete the following tasks:
i. Generate N = 64 samples of the process x[n] and estimate the discrete spectrum using the fft function in Matlab. Repeat this for N= 128, 256. Plot the discrete spectrum and compare the effect of different data points.
[Hint: Use the command stem in Matlab. The spectrum exists as complex number and hence, you may plot the magnitude response only. A continuous spectrum can be obtained by joining the discrete points of the FFT output. To do this, simply use the command plot in Matlab.]
ii. Now rescale the frequency axis using Hz as a unit and plot the full range of positive frequencies [0, f1] If we were to view the spectrum from -f1/2 to f1/2, sketch what this spectrum will look like.
Task 3 -
Investigate the effects of spectral leakage in Task 2 by varying N. Comment on the shape of the spectrum and how it deviates from the ideal response where the number of samples is infinite. Try with different windows: Hamming, Harming and Blackman.
[Hint Use the command hamming, hanning and blackman in Matlab: default is a rectangular window.]