tunableFilterProperties
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. The tunable tracking filters are:
Object Functions
setPropertyTunability | Modify property tunability |
Examples
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]
Create a trackingUKF object using the initcvukf function.
filter = initcvukf(objectDetection(0,[0;0;0]));
Obtain the tunable properties of the filter using the tuanbleProperties object function.
tps = tunableProperties(filter)
tps =
Tunable properties for object of type: trackingUKF
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
Property: Alpha
PropertyValue: 0.001
TunedQuantity: Value
IsTuned: true
TunedQuantityValue: 0.001
TunableElements: 1
LowerBound: 1e-05
UpperBound: 1
Property: Beta
PropertyValue: 2
TunedQuantity: Value
IsTuned: false
Property: Kappa
PropertyValue: 0
TunedQuantity: Value
IsTuned: false
From the display, the ProcessNoise property is tuned and the StateCovariance property is not tuned by default.
Set the Beta property as tuned.
setPropertyTunability(tps,"Beta",IsTuned=true);
disp(tps);Tunable properties for object of type: trackingUKF
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
Property: Alpha
PropertyValue: 0.001
TunedQuantity: Value
IsTuned: true
TunedQuantityValue: 0.001
TunableElements: 1
LowerBound: 1e-05
UpperBound: 1
Property: Beta
PropertyValue: 2
TunedQuantity: Value
IsTuned: true
TunedQuantityValue: 2
TunableElements: 1
LowerBound: 0
UpperBound: Inf
Property: Kappa
PropertyValue: 0
TunedQuantity: Value
IsTuned: false
Set the tuned elements for the process noise 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]); disp(tps)
Tunable properties for object of type: trackingUKF
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: false
Property: Alpha
PropertyValue: 0.001
TunedQuantity: Value
IsTuned: true
TunedQuantityValue: 0.001
TunableElements: 1
LowerBound: 1e-05
UpperBound: 1
Property: Beta
PropertyValue: 2
TunedQuantity: Value
IsTuned: true
TunedQuantityValue: 2
TunableElements: 1
LowerBound: 0
UpperBound: Inf
Property: Kappa
PropertyValue: 0
TunedQuantity: Value
IsTuned: false
Create a trackingIMM object using the initekfimm function.
filter = initekfimm(objectDetection(0,[0;0;0]));
Obtain the tunable properties of the filter using the tuanbleProperties object function.
tps = tunableProperties(filter)
tps =
Tunable properties for object of type: trackingIMM
Property: TransitionProbabilities
PropertyValue: [0.9 0.05 0.05;0.05 0.9 0.05;0.05 0.05 0.9]
TunedQuantity: Rows sum to one
IsTuned: true
TunedQuantityValue: [0.9 0.05 0.05;0.05 0.9 0.05;0.05 0.05 0.9]
TunableElements: [1 2 3 4 5 6 7 8 9]
LowerBound: [0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001]
UpperBound: [1 1 1 1 1 1 1 1 1]
Property: ModelProbabilities
PropertyValue: [0.333333333333333;0.333333333333333;0.333333333333333]
TunedQuantity: Columns sum to one
IsTuned: true
TunedQuantityValue: [0.333333333333333;0.333333333333333;0.333333333333333]
TunableElements: [1 2 3]
LowerBound: [0.001 0.001 0.001]
UpperBound: [1 1 1]
The filter contains 3 tracking filters
Show tunable properties for filter 1
Show tunable properties for filter 2
Show tunable properties for filter 3
Set the ModelProbabilities property to untuned.
setPropertyTunability(tps,"ModelProbabilities",IsTuned=false);
disp(tps);Tunable properties for object of type: trackingIMM
Property: TransitionProbabilities
PropertyValue: [0.9 0.05 0.05;0.05 0.9 0.05;0.05 0.05 0.9]
TunedQuantity: Rows sum to one
IsTuned: true
TunedQuantityValue: [0.9 0.05 0.05;0.05 0.9 0.05;0.05 0.05 0.9]
TunableElements: [1 2 3 4 5 6 7 8 9]
LowerBound: [0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001]
UpperBound: [1 1 1 1 1 1 1 1 1]
Property: ModelProbabilities
PropertyValue: [0.333333333333333;0.333333333333333;0.333333333333333]
TunedQuantity: Columns sum to one
IsTuned: false
The filter contains 3 tracking filters
Show tunable properties for filter 1
Show tunable properties for filter 2
Show tunable properties for filter 3
Set the tuned elements for the process noise matrices in the three trackingEKF objects. In this example, set the tunable elements as the diagonal elements with specified bounds.
setPropertyTunability(tps,"ProcessNoise",FilterIndex=1,TunableElements=sub2ind([3,3],[1 2 3],[1 2 3]), ... LowerBound=[0 0 0],UpperBound=[10 10 10]); setPropertyTunability(tps,"ProcessNoise",FilterIndex=2,TunableElements=sub2ind([3,3],[1 2 3],[1 2 3]), ... LowerBound=[0 0 0],UpperBound=[10 10 10]); setPropertyTunability(tps,"ProcessNoise",FilterIndex=3,TunableElements=sub2ind([3,3],[1 2 3],[1 2 3]), ... LowerBound=[0 0 0],UpperBound=[10 10 10]);
Version History
Introduced in R2022b
See Also
tunableProperties | setTunedProperties | trackingFilterTuner
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.
Amerika
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)