Kx9.txt updated using Kalman cost functions which include the "constant" terms log(2 pi) + log(Kv) --- For the Asil'98 example, with N=21 sets of 4 measurements (2 real and 2 false) for two parabolic tracks, using the Kalman cost function without missed target events, w(K) is the total cost of the best paths for K=1..4 (using Kn=0.01, S2a=2, L=4): w = -17.7 -27.7 861 2556.1 The large increase in w(K) at K=3 seems to indicate that K=2 is the best choice, meaning that the number of tracks is 2. But that is just a heuristic judgement. Since the false detections were generated uniformly over 0..4 for x and y, the volume is V=16 and m1=-log(1/V) is log(16), i.e. the cost for associating a measurement as a false detection instead of a track is: m1 = log(16) Section II,D of YBS "Tracking Methods in a Multitarget Environment", Eq(3.11), indicates a way to add a penalty to the cost function for unused measurements, but it doesn't seem to have the right definition for Nl. Eq(20) of Morefield "Application of 0-1 Integer Programming to Multitarget Tracking Problems" seems to be correct, leading to a term f*log(V) where f is the number of false alarm points. I think the overall costs should be adjusted as follows for this example to include a penalty for unused measurements: mw = w + [3*N1*m1 2*N1*m1 1*N1*m1 0*N1*m1] where N1=N-1. N-1 is used as a factor instead of N because the first measurement set is used to initialize the Viterbi states and is assigned 0 cost. With K=1, 3 out of each 4 measurements are unused at each of N1 points in time, so 3*N1*m1 is the overall penalty cost; with K=2, 2 out of each 4 measurements are unused, so 2*N1*m1 is the overall penalty cost; etc. This yields: mw = 149 83.2 917 2556.1 That result shows quantitatively that K=2 has the lowest cost. The above penalty cost for unused measurements is now built into the Viterbi M code and is enabled by setting the variable UNUSED_PENALTY non-zero. Now continuing and considering missed target events, let's first rerun the above example with five missed target events in the middle of the first track, with no penalty for unused measurements. The total costs vs. K with missed target detection enabled in the Viterbi/Kalman cost function are: w = -14.9 20.2 87.2 95 Although the cost increases with increasing K, it does not increase as much as the original costs above without missed target event detection. This is because, for K>2, it is choosing missed target events since they have lower cost than associating random false detections with a track. For example, with K=4, the measurement combinations associated with the best paths are: combos(path_index(1)) = 1 2 3 4 1 5 5 5 1 2 5 5 1 2 4 5 1 2 4 5 1 2 5 5 1 2 5 5 1 2 5 5 * 2 5 5 5 * 2 5 5 5 * 2 4 5 5 * 1 2 5 5 * 2 5 5 5 1 2 5 5 1 2 5 5 1 2 5 5 1 2 5 5 1 2 5 5 1 2 5 5 1 2 5 5 1 2 5 5 In the above table, the number 5 represents a missed target event detection. Numbers 1 to 4 represent selections of the four measurements, with 1 and 2 corresponding to real target measurements (except for rows 9-13, marked with *, where the first measurement was replaced with random values), and 3 and 4 corresponding to false detections. Row 1 is for time = 1, row 2 for time = 2, etc. If we rerun this example and include a penalty for unused measurements together with missed target events, the total costs vs. K are: w = 153 114 92.7 95 This turns out "worse", with the overall cost decreasing for K>2. By including missed target event detection, we loose the ability to determine the number of tracks simply by looking at cost vs. K. However, we can still look at the percentage of missed target events in the paths, and conclude that paths containing mostly missed target events do not represent targets, and thus deduce the correct number of tracks. Now let's try creating the false detections in a 1-by-1 square region centered at each true measurement value. First the baseline costs, with no missed target events and no penalty for unused measurements: w = -18.3 -31 22.2 80.6 Note that the costs do not dramatically increase for K>2 since the false detections, being near the actual tracks, form reasonable tracks of their own. In this case, the volume of the false detection region is V=1, and m1=-log(1/V) = 0. If we include the penalty for unused measurements, but do not include missed target events, we get the same costs as the baseline costs, since the penalty costs are 0. If we use missed target events, and missed target event detection with no penalty for unused measurements, we get costs vs. K: w = -20.2 -27.5 -33.3 -26 In this case, for K=4, the measurement combinations associated with the best paths are: combos(path_index(1)) = 1 2 3 4 1 2 4 5 1 2 4 5 1 2 5 5 1 2 5 5 1 2 5 5 1 2 5 5 1 2 5 5 * 5 5 5 5 * 2 5 5 5 * 2 5 5 5 * 3 5 5 5 * 5 5 5 5 2 5 5 5 4 5 5 5 4 5 5 5 2 5 5 5 2 5 5 5 2 5 5 5 2 5 5 5 2 5 5 5 Analysis to be continued...