Tracy Petrie
University of Colorado, Colorado Springs
In the previous project, we looked at a system (bouncing balls) that used position, velocity, and constant acceleration parameters. The model of the system that used these parameters was linear which made Kalman filters an especially attractive solution being relatively efficient and linear by nature. In this project, we mix it up a bit by introducing coupled components that have non-linear motion. One of the questions that is interesting (and the one focused on here) is whether simplified linear Kalman models can adequately track non-linear systems.
The objects tracked in this project were point masses (rather than real masses with 2D shape that needed to be tracked) coupled by a rigid rod. These objects were then rotated and translated in a frictionless 2D space. Data was generated by randomly creating two radii lengths (to simulate the effect of an off-center centroid caused by varying values of the two masses), an initial rotation angle, an angle velocity, and a translation vector for each object to track. The object was then rotated and moved (translated) and the point-mass locations were recorded as the event.
Unimodal Distributions
Only one Gaussian distribution was used to introduce model/measurement
noise.
Model Noise
In the first pass, noise is injected into the model parameters (radii,
translation velocities Vx,Vy, and angle velocity).
Measurement Noise
In the second pass, noise is injected into the X and Y coordinates of the
data generated in the first pass. Again, noise is drawn from the
unimodal distributions and multiplied (without further scaling) by the
supplied noise factor.
One thing that I did was to separate out the point masses and to have one Kalman filter track one point mass. In retrospect, it would have been better to work harder at associating data so that we could have tracked the dual-mass objects, not the individual masses..
Initialization
Three different models were used with Kalman filters in an effort to see
how increased model complexity affected accuracy and performance. These
are called in the results section below "None",
"Partial", and "All".
The "None" filter simply initializes the A matrix to the Identity matrix. In essence, this model presumes nothing changes. In fact, the only thing we pay attention to is the location of the point mass we're tracking. So the state vector is simply (x,y) and the A matrix is simply:
1 | 0 |
0 | 1 |
The "Partial" filter recognizes that constant velocity is relatively easy to model and so the velocity parameters are included. The state vector is (x,y,Vx,Vy) and the A matrix is:
1 | 0 | 1 | 0 |
0 | 1 | 0 | 1 |
0 | 0 | 1 | 0 |
0 | 0 | 0 | 1 |
The "All" filter acknowledges the fact that the sinusoidal motion (in each dimension) can be modeled with changing velocity even if the linear Kalman model cannot predict it exactly. It can (if the angular velocity is small enough) hypothetically adjust the state using the correction function to track better than the Partial filter. The state vector is (x,y,Vx,Vy,Ax,Ay,Jx,Jjy) where V is velocity, A is acceleration, and J is "jerk" (using Dr. Boult's terminology) the rate of change for acceleration. The A matrix is a bit larger this time. The initial state matrix set the acceleration values to 1 and the jerk values to 0.1.
1 0 1 0 0 0 0 1 0 1 0 0 0 0 1 0 1 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 1
Data Association
Due to time considerations, I simply used a "closest" algorithm.
In mutliple-object tracking experiments, many point-masses were orphaned.
Experiments
To test the variations, a quadrant of four combinations of
rotation/translation was created and each type of filter was tested with
each quadrant's values. The idea was to contrast how well the Kalman
filter tracked the objects when the major motion influence came from the
rotational component relative to the translation component and visa versa.
To set these measurements in perspective, we needed to also see how well
it was tracking when there was very little motion and when there was a
great deal of motion in each estimate/correct iteration. These values were
chosen "instinctively" but a better mathematical basis probably
should have been used to pick them. Also, more experimentation with the
rotational velocity would tell us if there is a "sweet spot" in
between the .1 and .7 values used (i.e. a curve with a local maximum). The quadrant looks like:
Q11 | Q11 |
Rotational velocity 0.1 radians, translation 1 pixel | Rotational velocity 0.1 radians, translation 10 pixels |
Q21 | Q22 |
Rotational velocity 0.7 radians, translation 1 pixel | Rotational velocity 0.7 radians, translation 10 pixels |
Results
The results are shown visually and described quantitatively. The
quantitative results were obtained by tracking the distances between the
estimated position and the actual (model) position with no model noise and
a measurement error factor of 5 and calling this distance the error.
Average and standard deviation values were obtained from only one run in
each quadrant for each model type (with at least 39 values). A better
experiment would probably include several runs (how many is
enough?).
The only unusual standard deviation was observed in the Q12 quadrant using the full model. This is explained by some initial tracking difficulty on the first few measurements but the subsequent error rate settled down after that and the standard deviation returned to an expected value. Interesting cases occurred in the Q11 and Q12 quadrants. In the Q11 quadrant, the partial model appeared to work best although both the partial and full models were better than the simple model. In the Q12 quadrant, the full model appeared to be dramatically better than the other models but the partial model actually got worse than the simple model. This was especially surprising because my expectation was that it would perform significantly better. I would actually expect to run this test a few more times before drawing any conclusions.
In the images, the green circles represent the point-masses (connected by the green line), the red Xs represent the measurements, and the small blue circles represent the estimated position. A yellow line connects the estimated position with the actual.
An Excel file with the data can be found here.
Other interesting movies or experiments are shown below:
In addition to getting the data association model to be more accurate, we need to be able to measure the association so we can quantitatively evaluate the accuracy.
Finally, an unmet goal of this particular project was to apply the "partial" model to the condensation tracker and compare it with the "simple" model's performance. They hypothesis is that we can achieve similar accuracy using fewer condensation iterations or fewer points.