Exercise 4 MATLAB
Exercise 4 MATLAB
Exercise 4
M M
x[n] = Ai cos(2πfi Ts n) + Bi sin(2πfi Ts n) + w[n]
X X
i=1 i=1
where n = 0, 1, ..., N − 1 with white Gaussian noise w[n] of variance σ 2 . Let sampling
period Ts = 1, frequencies fi are known with fi = i/N , and 2M < N . The amplitudes
θ = [A1 , A2 , ..., AM , B1 , B2 , ..., BM ] are to be estimated. Hint: The column of H are
orthogonal for the given frequencies, then H T H = N2 I.
0⩽n⩽K −1
(
θ,
s[n] =
−3θ, K ⩽ n ⩽ L − 1
(a) Find the LSE of θ and the corresponding minimum squared error.
(b) Assume further that data x[n] = s[n] + w[n] for n = 0, 1, 2, ...L − 1 are observed.
If now w[n] is zero-mean WGN with variance σ 2 , find the PDF of the LSE.
1
Matlab Exercise 3
Instructions*Please read carefully*
Return your solution to Moodle before 11.10.2022 10:30. Late returning will
lead to deduction of points. It is strongly recommended not to leave returning
to last minute but to do this well before the deadline.
Upload your solutions to Moodle as ZIPPED file containing all files needed
to run your codes. Your codes must be ready to run without any additional user
configuration.
Use filename M AT LAB_Group(#) . In addition to the well-commented program, make
sure the report includes the following:
• The full name and the student number for each group member.
• Clear answers to the problems posted (including for example figures obtained by run-
ning the simulation program).
Tasks
1. The data
for n = 0, 1, 2, ...N − 1 where A > 0 and 0 < fo < 1/2. Multiple parameters A, fo and
ϕ are unknown. Implement MLE estimator for θ = [A fo ϕ]T by minimizing
N −1
J(A, fo , ϕ) = (x[n] − A cos(2πfo n + ϕ))2
X
i=0
Implement Monte Carlo Simulation for MLE estimator to check their variance satisfies
the CRLB.
Hint: See Example 3.14 and Example 7.16 for variance and estimator equations.
Use these parameter values:
N = 5;
A = 1;
σ 2 = 0.001;
fo = 1/4;
ϕ = π/3;
M C = 100000; % number of Monte Carlo loops
2
2. For the same data