ENEE 222 Elements of Discrete Signal Analysis Lab
ENEE 222 Elements of Discrete Signal Analysis Lab 7
Prepare your working environment Download the script for lab 7 from ELMS or: terpconnect. umd. edu/~rssaketh/ene 222 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_07_script. txt” inside MATLAB 2
Item 1 – Orthogonal Matrices Given matrix A = [v 1 v 2 v 3 v 4], where vi’s are length-4 column vectors mutually orthogonal to each other, e. g. , <v 1, v 2>=0, <v 2, v 4>=0, … It follows that ATA is a diagonal matrix. (Why? ) 3
Item 2 – Vector Projection (Projection) If A is an N-by-N matrix with orthogonal columns, then Ax = b can be solved by projecting b onto each of the columns of A. Hence, we obtain x. (Perfect reconstruction) If we have x and also the transformation matrix A in hand, we are free to discard b since we can reconstruct b perfectly by b = Ax 4
Item 2 – Vector Projection (Non-perfect reconstruction) If we approximate x by a manipulated version x(m) (e. g. , rounded or even zeroed-out entries), Ax(m) may still approximate the original b. Example shows how to zero out some entries of x in Matlab: x_m = x. * ismember((1: N)', J) This is referred to as Lossy Compression of the original signal. 5
Item 3 – The haar 222 function Functions can be created in MATLAB the same way as scripts, but with a line telling: what arguments the function takes what value the function returns function V = haar 222(N) 6
Item 4 – Haar Wavelet Transform Entries of V take values 0, 1 and -1. The mutually orthogonal columns are called basis (or reference) vectors. Each basis vector can be thought of a signal vector in discrete time (t=0: 63). Question: what should the 5 th column be like? Basis Vectors 7
Item 5 – Scales of Haar Wavelets The columns of V show the basic wavelet at different scales or resolutions: Scale 0 1 2 3 4 5 6 Column Index Range 1 2 3: 4 5: 8 9: 16 17: 32 33: 64 Wavelet Duration constant 64 32 16 8 4 2 Question: Are basis vectors within a particular scale orthogonal? What about basis vectors from different scales? Explain. 8
Item 6 – Generating Coefficients (Orthonormal Matrix) Forward Transform (Forward) Transform Matrix Coefficients Basis Vectors Input Signal Note that the transform matrix used should be a normalized version. The unnormalized version VT shown here is for the sake of simple illustration. 9
Item 7 – Null Out Some Coefficients Null out some coefficients Matlab Code: c_hat = c. * ismember(1: 8, J); One example for J: J = [3 7 4 1 0] + 1 ( why? ) 10
Item 7 – Reconstruction (lossy) Inverse Transform (Reconstruction of input signal) Basis Vectors Modified Coefficients Reconstructed Signal Inverse Transform Matrix 11
- Slides: 11