Download presentation
Presentation is loading. Please wait.
Published byΜέγαιρα Κόρακας Modified over 5 years ago
1
ENEE222 Elements of Discrete Signal Analysis Lab 9 1
2
Prepare your working environment
Download the script for lab 9 from ELMS or: terpconnect.umd.edu/~rssaketh/ene222/lab Move files to your desktop Double click the MATLAB icon on the desktop In MATLAB, set “Current Folder” to your desktop Double click the file “lab_09_script.zip” inside MATLAB 2
3
Item 1: The Fourier Matrix
The discrete Fourier transform (DFT) and its inverse can be computed using FFT and IFFT An N-by-N Fourier matrix V can be generated using V=fft(eye(N))’ or V=N*ifft(eye(N)) or V=dftmtx(N)' The matrix V consists of N complex sinusoids, each of length N, at frequencies w = 2πk/N, k = 0:N-1. 3
4
Item 2: DFT of an Audio Signal
A WAVE file can be imported into MATLAB with [samples, sampling_rate]=wavread('clip.wav') Suppose the sampling rate is fs = 32kHz the number of samples is N = 160,000 the magnitude spectrum has a sharp cutoff at k = 30,000 What is the actual cutoff frequency in Hz? 4
5
Item 3: Phase Component While seemingly random, the phase spectrum contains important information and cannot be ignored. Let’s try to reconstruct x using the correct magnitude spectrum and a random phase spectrum. Phase component generation: q = pi*rand(size(x)) q = q - q([1 N:-1:2]) Y = abs(X).*exp(j*q) To obtain reconstructed signal, real(ifft()) should be used instead of merely ifft(). Why? 5
6
Item 4: Circular Time Reversal
Recall (y=) Rx ↔ RX (=Y). In Matlab, Rx can be implemented by y=x([1 N:-1:2]) y undergoes a circular time reversal, and in addition, x is a real signal. So what will the plots of real and imaginary parts of Y look like compared to those of X? (recall the property of circular conjugate symmetry) 6
7
Item 4: Circular Time Shift (Delay)
Recall (y=) PMx ↔ F−MX (=Y). In Matlab, circular shift is implemented by y = circshift(x,M) The DFT in this case is Y = X.*exp(-j*k*2*pi*M/N) Again, the phase component plays an important role and cannot be changed arbitrarily. Basis Vectors 7
8
Item 5: Amplitude Modulation
An AM signal is generated by multiplication of the original signal and a real sinusoid in the time domain, i.e., Xmod[n] = x[n]cos(n) In Matlab, it is implemented by elementwise multiplication x_mod=x.*cos(n*2*pi*K/N) Since the cosine term above is the sum of two Fourier sinusoids, the spectrum of the AM signal is obtained by adding together two circularly shifted versions of the original DFT. 8
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.