Main Content

tunableFilterProperties

Definition of tunable properties of filter

Description

The tunableFilterProperties object defines the tunable properties of a tracking filter object. To specify the properties to tune and how to tune them, use the setPropertyTunability object function. To tune the filter, create a trackingFilterTuner object and use the tune object function.

Creation

Create a tunableFilterProperties object by using the tunableProperties object function of a tunable tracking filter. As of R2022b, the tunable tracking filters are:

Object Functions

setPropertyTunabilityModify property tunability

Examples

collapse all

Create a trackingEKF object using the initcvekf function.

filter = initcvekf(objectDetection(0,[0;0;0]));

Obtain the tunable properties of the filter using the tunableProperties object function.

tps = tunableProperties(filter)
tps = 
Tunable properties for object of type: trackingEKF

Property:      ProcessNoise
   PropertyValue:   [1 0 0;0 1 0;0 0 1]
   TunedQuantity:   Square root
   IsTuned:         true
       TunedQuantityValue:  [1 0 0;0 1 0;0 0 1]
       TunableElements:     [1 4 5 7 8 9]
       LowerBound:          [0 0 0 0 0 0]
       UpperBound:          [10 10 10 10 10 10]
Property:      StateCovariance
   PropertyValue:   [1 0 0 0 0 0;0 100 0 0 0 0;0 0 1 0 0 0;0 0 0 100 0 0;0 0 0 0 1 0;0 0 0 0 0 100]
   TunedQuantity:   Square root of initial value
   IsTuned:         false

From the display, the ProcessNoise property is tuned and the StateCovariance property is not tuned by default.

Set the StateCovariance property as tuned.

setPropertyTunability(tps,"StateCovariance",IsTuned=true);
disp(tps);
Tunable properties for object of type: trackingEKF

Property:      ProcessNoise
   PropertyValue:   [1 0 0;0 1 0;0 0 1]
   TunedQuantity:   Square root
   IsTuned:         true
       TunedQuantityValue:  [1 0 0;0 1 0;0 0 1]
       TunableElements:     [1 4 5 7 8 9]
       LowerBound:          [0 0 0 0 0 0]
       UpperBound:          [10 10 10 10 10 10]
Property:      StateCovariance
   PropertyValue:   [1 0 0 0 0 0;0 100 0 0 0 0;0 0 1 0 0 0;0 0 0 100 0 0;0 0 0 0 1 0;0 0 0 0 0 100]
   TunedQuantity:   Square root of initial value
   IsTuned:         true
       TunedQuantityValue:  [1 0 0 0 0 0;0 10 0 0 0 0;0 0 1 0 0 0;0 0 0 10 0 0;0 0 0 0 1 0;0 0 0 0 0 10]
       TunableElements:     [1 7 8 13 14 15 19 20 21 22 25 26 27 28 29 31 32 33 34 35 36]
       LowerBound:          [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
       UpperBound:          [100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100]

Set the tuned elements for the process noise matrix as the diagonal elements with specified bounds. Also, set the tuned elements for the state covariance matrix as the diagonal elements with specified bounds.

setPropertyTunability(tps,"ProcessNoise",TunableElements=sub2ind([3,3],[1 2 3],[1 2 3]), ...
    LowerBound=[0 0 0],UpperBound=[10 10 10]);
setPropertyTunability(tps,"StateCovariance",TunableElements=sub2ind([6,6],1:6,1:6), ...
    LowerBound=zeros(1,6),UpperBound=100*ones(1,6));
disp(tps)
Tunable properties for object of type: trackingEKF

Property:      ProcessNoise
   PropertyValue:   [1 0 0;0 1 0;0 0 1]
   TunedQuantity:   Square root
   IsTuned:         true
       TunedQuantityValue:  [1 0 0;0 1 0;0 0 1]
       TunableElements:     [1 5 9]
       LowerBound:          [0 0 0]
       UpperBound:          [10 10 10]
Property:      StateCovariance
   PropertyValue:   [1 0 0 0 0 0;0 100 0 0 0 0;0 0 1 0 0 0;0 0 0 100 0 0;0 0 0 0 1 0;0 0 0 0 0 100]
   TunedQuantity:   Square root of initial value
   IsTuned:         true
       TunedQuantityValue:  [1 0 0 0 0 0;0 10 0 0 0 0;0 0 1 0 0 0;0 0 0 10 0 0;0 0 0 0 1 0;0 0 0 0 0 10]
       TunableElements:     [1 8 15 22 29 36]
       LowerBound:          [0 0 0 0 0 0]
       UpperBound:          [100 100 100 100 100 100]

Version History

Introduced in R2022b