EEE 242 Chapter 5 Kalman Filter Problems Page 1 of 3

Name:______SID#______

Email, deliver to the EEE Department, or send via postal mail.

1. A Kalman Filter can eliminate measurement noise can from a narrowband signal or known deterministic signal that can be generated using a state space model. Note, that the Kalman Filter does not have access to the process noise or measurement noise directly. The Kalman Filter estimates the effect of the process noise and measurement noise via the covariance matrices, Qk and Rk.

Consider the following Narrowband Signal whose output is sampled and Kalman Filtered:

1.1 PROBLEM STATEMENT

You are to filter a signal generator’s output whose signal without noise is y = sin(2*pi*t), an sine wave with a frequency, f, of 1 Hz. For good fidelity, the sampling rate is selected to be dt = 1/(40*f) seconds. The measurement white noise, vk, added to y(t) is to be varied using v_var equal to 1e-10, 0.05, and 0.5. The process white noise, w1k and w2k, added to both states are to be varied using w1_var and w2_var equal to 0, 1e-4, and 0.002. w1k and w2k are to be added the x1k and x2k respectively. w1k and w2k and are to be uncorrelated and vk is to be uncorrelated with the process noise.

To assist you with the above, a mfile template Chap5NB_KF_Prob1.m, KalmanFilter.m, and other mfiles can be downloaded by putting in your web browser the address: ftp://ftp.ecs.csus.edu/hellerm/EEE242/KF_Homework/mfiles. If you can not ftp, let me know and I will email you the mfiles. Complete this script and run the experiments below. Only the diagonal elements of Pcov and Kgain are plotted. Pcov and Kgain at the end of a run is displayed in the MATLAB command window. Complete the matrices for those requested below:

F = H =

Phik = Qk(wk1=wk2=0.002) = GammaUk =

1.2. EXPERIMENT

Run the Chap5NB_KF_Prob1.m script for about 4 seconds for the experiments below.

1.2.1 Using w1var and w2var= 0 and vvar= 1e-10 (some small value for Rk is necessary in order to keep matrices in the Kalman filter from becoming nonsingular). The state variables and yest should be a clean sine wave of approximately 1 Hz; if not, you have a bug in your script - fix it try again.

1.2.2 Keeping the Process Noise zero, vary the Measurement Noise using Measurement Noise Variance equal to 1e-10, 0.05, and 0.5. Briefly describe the effect on Kalman estimates - x2kest, ykest, Kgain and Pcov:

End of Run Pcov diagonal (for v_var = 0.5) =

1.2.3 Keeping the Measurement Noise zero, vary the Measurement Noise using Process Noise Variance using v_var = 0, 1e-4, and 0.002. Briefly describe the effect on Kalman estimates - x2kest, ykest, Kgain and Pcov for each of the Process Noise Variances used:

End of Run Pcov diagonal (wk1=wk2=0.002) =

1.2.4 Using Measurement Noise of v_var = .05 and using Process Noise Variance, wik = w2k = 1e-4, briefly describe the effect on the Kalman estimates - x2kest, ykest, Kgain and Pcov.

End of Run Pcov diagonal =

2. Do Problem 5.8 (a) in text: