trackErrorMetrics
Track error and NEES
Description
The trackErrorMetrics
System object™ provides quantitative comparisons between tracks and known truth
trajectories.
To generate track assignment metrics:
Create the
trackErrorMetrics
object and set its properties.Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?
Creation
Description
creates a
errorMetrics
= trackErrorMetricstrackErrorMetrics
System object with default property values.
sets properties for the errorMetrics
= trackErrorMetrics(Name,Value
)trackErrorMetrics
object using one or more
name-value pairs. For example, metrics =
trackErrorMetrics('MotionModel','constvel')
creates a
trackErrorMetrics
object with a constant velocity motion model. Enclose
property names in quotes.
Properties
Usage
To estimate errors, call the track error metrics object with arguments, as if it were a function (described here).
Syntax
Description
[
returns the metricsposRMSE
,velRMSE
,posANEES
,velANEES
] = errorMetrics(tracks
,trackIDs
,truths
,truthIDs
)
posRMSE
– Position root mean squared errorvelRMSE
– Velocity root mean squared errorposANEES
– Position average normalized-estimation error squaredvelANEES
– Velocity average normalized-estimation error squared
for constant velocity motion at the current time step.
trackIDs
is the set of track identifiers for all tracks.
truthIDs
is the set of truth identifiers.
tracks
are the set of tracks, and truths
are
the set of truths. trackIDs
and truthIDs
are
each a vector whose corresponding elements match the track and truth identifiers found
in tracks
and truths
, respectively.
The RMSE and ANEES values for different states are calculated by averaging the
errors of all tracks at the current time step. For example, the position RMSE value,
posRMSE
, is defined as:
where M is the total number of tracks with associated truth trajectories in the current time step, and
is the position difference between the position of track i,
ptrack,i,
and the position of the corresponding truth,
ptruth,i,
at the current time step. The RMSE values for other states (vel
,
pos
, acc
, and yawRate
) are
defined similarly.
The position ANEES value, posANEES
, is defined as:
where
Cp,i
is the covariance matrix corresponding to the position of track i at
the current time step. The ANEES values for other states (vel
,
pos
, acc
, and yawRate
) are
defined similarly.
To enable this syntax, set the ErrorFunctionFormat
property to
'built-in'
and the MotionModel
property to
'constvel'
.
[
also returns the metricsposRMSE
,velRMSE
,accRMSE
,posANEES
,velANEES
,accANEES
] = errorMetrics(tracks
,trackIDs
,truths
,truthIDs
)
accRMS
– Acceleration root mean squared erroraccANEES
– acceleration average normalized-estimation error squared
for constant acceleration motion at the current time step.
To enable this syntax, set the ErrorFunctionFormat
property to
'built-in'
and the MotionModel
property to
'constacc'
.
[
also returns the metricsposRMSE
,velRMSE
,yawRateRMSE
,posANEES
,velANEES
,yawRateANEES
] = errorMetrics(tracks
,trackIDs
,truths
,truthIDs
)
yawRateRMSE
– yaw rate root mean squared erroryawRateANEES
– yaw rate average normalized-estimation error squared
for constant turn-rate motion at the current time step.
To enable this syntax, set the ErrorFunctionFormat
property to
'built-in'
and the MotionModel
property to
'constturn'
.
[
returns the user-defined metrics out1
,out2
, ... ,outN
] = errorMetrics(tracks
,trackIDs
,truths
,truthIDs
)out1
, out2
,
... , outN
.
To enable this syntax, set the ErrorFunctionFormat
property to
'custom'
. The number of outputs corresponds to the number of
elements listed in the EstimationErrorLabels
property, and must
match the number of outputs in the EstimationErrorFcn
. The results
of the estimation errors are averaged arithmetically over all track-to-truth
assignments.
Tip
These usage syntaxes only calculate the RMSE and ANEES values of all tracks with
associated truths at the current time step. To obtain the cumulative RMSE and ANEES values
for each track and truth, use the cumulativeTrackMetrics
and cumulativeTruthMetrics
object functions, respectively. To obtain the current
RMSE and ANEES values for each track and truth, use the currentTrackMetrics
and currentTruthMetrics
object functions, respectively.
Input Arguments
Output Arguments
Object Functions
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)