EE3901/EE5901 Sensor Technologies Week 4 Tutorial
Question 1
Given a state prediction model of the form
the extended Kalman filter predicts the covariance using the equation:
where
Calculate the Jacobian for each prediction model given below.
(a)
(b)
(c)
(d)
(a) In this case the Jacobian is a scalar.
(b)
(c)
(d)
Question 2
Develop the equations for an extended Kalman filter for a vehicle moving in a 2D plane as shown in Figure Q2.
The vehicle is described by the state vector
where
(a) Write a prediction function
(b) Calculate the Jacobian of
(c) Suppose that the sensors on the vehicle are GPS (measuring position), a speedometer, and a compass. Define which variables would go into the measurement vector
(d) Suppose that the vehicle has no GPS and the only sensors are a speedometer and compass. Repeat part (c) with a reduced set of sensors.
(a) Prediction step (based upon an assumption of constant speed)
If control inputs were available then additional terms could be added
to reflect predicted changes in
(b) The Jacobian of
for a covariance prediction of
where
(c) The measurements can be arranged in a measurement vector
This is the same ordering as the state vector so the measurement model is linear and is given by
where the measurement matrix
If your measurement vector had the measurements in a different order
then the corresponding rows of
(d) In this case there are only two measurements
and the measurement matrix becomes
Question 3
Develop an unscented Kalman filter for the non-linear circuit shown in Figure Q3.1.
This is a second-order system, so it requires two state variables. Choose the following state vector:
The measurements are the voltages,
The LED is described by the Shockley diode equation,
where the device parameters (e.g. reverse bias saturation current,
ideality factor, and temperature) have already been substituted into
the equation. Notice that the voltage across the diode is the same
as the voltage across
(a) Analyse the circuit and show that it is described by the following set of differential equations:
(b) At the point where the diode begins to turns on, these equations are highly non-linear and are numerically challenging to solve. A simple prediction model of the form
fails to converge to the correct solution (unless
The instability (indicated with an arrow) would cause problems for
any kind of Kalman filter since the prediction model is failing. An
improved prediction model requires the use of a differential equation
solver that can dynamically choose
Write code to implement an unscented Kalman filter for this system. Starter code is provided that implements an accurate prediction step. Based upon this predictive model, you can build a reliable filter. Write your code and evaluate its performance.
Using the parameters in the starter code, the working UKF produces output like Figure Q3.3.