Graded Assignment 1 ECE 712

1
Graded Assignment 1 ECE 712
James P. Reilly
Nominal Due Date: Thurs Feb 27 2014, in class.
Please Note: This assignment is based on the honour system and as such you are expected to complete it without
any assistance from any other person, except possibly me. You are welcome to use any form of written or internet
material as a reference, but please acknowledge the source in your work. I will be available to answer questions if
need be.
1) Download the file 2012 H1 Q1.mat on the course website. It contains a 25 × 50 matrix X. Each column of
X contains a linear combination of three Gaussian pulses. Each pulse has the form
(
)
(t − µi )2
gi (t) = exp −
,
t = 0 : 0.5 : 12,
i = 1, . . . , 3.
2σ 2
(1)
The variances σ 2 of the three components are all equal to unity, but the means µi (delays) are different for
each pulse gi (t).
The jth column xj ∈ R25 of X is then given as
xj = Gaj + nj ,
j = 1, . . . , 50.
(2)
Each of the three columns of G ∈ R25×3 contain the samples of gi (t) over the range of t, i.e., t = 0 : 0.5 : 12,
for i = 1, . . . , 3; i.e. corresponding to each respective value of µi . The vector aj ∈ R3 is a vector of random
amplitudes, and the vector nj contains zero-mean, uncorrelated noise samples which are also uncorrelated
with the signal, i.e., the vector Ga.
Estimate the values of the µi .
2) Download the file 2012 H1 Q2.mat on the course website. It contains a slowly varying sequence y[n]. Using
the discussion in class on representing convolution as a matrix-vector multiplication, find the sequence f [n]
⊗
of length 10, so that the sequence z[n] = y[n] f [n] has minimum power under the constraint ||f ||22 = 1,
⊗
where the operator
denotes convolution.
3) Consider a tall matrix A. Let B be any square matrix so that B T B = AT A. (B is referred to as a square
root matrix of AT A). Given such a matrix A, use matlab to compute a corresponding B.
What special property does the matrix AB −1 possess? Using this property, what can you say about the matrix
A(AT A)−1 AT ?
4) This question is an example of an unsupervised pattern classification problem. Suppose we have a collection
of colour images of widgets. Lets say there are two characteristics of widgets we are interested in: whether
they are spherical or cylindrical in shape, and whether they are green or yellow in colour. This gives us
February 26, 2014
DRAFT
2
four classes of image, one corresponding to each combination of the two characteristics. Our objective is,
given a set of measurements corresponding to a new, previously unseen image, to determine what class the
corresponding widget belongs.
We want to determine these characteristics of a particular widget from our available images. To do this, we
take four measurements on each image in our collection. These measurements may be correlated.
Download the file 2012 H1 Q5 from the website. It contains a 199 × 4 matrix X, each row of which contains
the four measurements of the widget. Each row represents a different widget. The row vector xcontained in
the file are measurements from a new widget. Develop a procedure for determining to which class our new
widget belongs.
Hint: Do a Karhunen–Loeve transform on each row of X. A scatterplot of the transformed coefficients will
help.
5) Question 5 a)
a) Prove that if the SVD of a given matrix A ∈ Rm×n can be expressed as A = U ΣV T , then A can
also be written as
A=
p
∑
σi ui v Ti
(3)
i=1
where p = min m, n.
b) Show that, if the singular vectors U and V are known, then the corresponding singular value σi can be
determined from σi = uTi Av i .
c) Here we get to explore the use of the SVD on images. Download the image ’lena.tif’ onto your local
directory from the course website and then read in the image. To do this in the Matlab environment,
issue the following command sequence
image=imread(’lena.tif);
%loads the image
image=single(image);
%convert to single precision floating pt format, so
% that matrix operations can be performed.
Then, after you process the image, you can show it in a figure window as follows:
image=uint8(image);
% convert to unsigned 8-bit integer format.
imshow(image);
% display image in a figure window
d) Reconstruct various versions of the image corresponding to p = 1, 2, . . . in (3). Notice how the image
gradually becomes more defined as p increases.
e) Now load the file “noisy lena.mat”. (Use the conventional matlab ”load” command). You will see that it
is a noisy version of the original lena. You can restore the image using the U and V from the original
clean image. Reconstruct the image using (3), using an appropriate method for finding the respective
σi . Discuss how you chose your value for p. Is this approach useful in practice?
February 26, 2014
DRAFT