Problem 5: Estimating State of Charge with an Extended Kalman Filter
For the battery system of Problem 3, we now add a voltage sensor which gives us a noisy reading of the battery voltage after each time cycle. The measurement is given by zhqk+uk with wk~N(0, hq), where hq=4+q-1.
The battery is subject to the discharging process as before, with qk=q(k-1)-jk-1, where q0=I with no uncertainty and jk=Jo+(k-1) with zero mean and variance 4.0.
For our system, we set Jo=0.1, 0.05, and 0.1. Design an extended Kalman filter (EKF) to estimate the state of charge. We note that the amount of information that the EKF gets from the measurement is determined by the function h and specifically its slope with respect to the state. Because our system and measurements have the same time step, we can compare the state variance after getting the measurement, P', to the variance before the measurement, P.
a. Optional extra credit: Show that the reduction in variance due to a measurement, i.e., a measure of its usefulness, can be described as P-P' = HPH^T, where a value of 1 means that the measurement removed all uncertainty and a value of 0 means that the measurement made no difference to the uncertainty.
b. Using this metric, make a plot of the usefulness of the voltage measurement as a function of the estimated state of charge for q in the range [0.1]. Set P=0.1 and W=0.1. Where is the measurement most informative? Where is it least informative?
For the remainder of the problem, given is the following sequence of measurements:
time k: 7 19
measurement k: 4.04 3.81 3.95 3.90 3.88 3.88 3.90 3.55 3.18
c. Run your extended Kalman filter with this data and generate two plots: the estimated state of charge and the estimated variance of the state of charge.