Documentation

initcvekf

创建常量-velocity extended Kalman filter from detection report

Syntax

filter = initcvekf(detection)

Description

example

filter= initcvekf(detection)creates and initializes a constant-velocity extended Kalman filter,filter, from information contained in a detection report,detection.

Examples

collapse all

Create and initialize a 3-D constant-velocity extended Kalman filter object from an initial detection report.

Create the detection report from an initial 3-D measurement, (10,20,−5), of the object position.

detection = objectDetection(0,[10;20;-5],'MeasurementNoise',1.5*eye(3),...'SensorIndex',1,'ObjectClassID',1,'ObjectAttributes',{'Sports Car',5});

Create the new filter from the detection report.

filter = initcvekf(detection)
filter = trackingEKF with properties: State: [6x1 double] StateCovariance: [6x6 double] StateTransitionFcn: @constvel StateTransitionJacobianFcn: @constveljac ProcessNoise: [6x6 double] HasAdditiveProcessNoise: 1 MeasurementFcn: @cvmeas MeasurementJacobianFcn: @cvmeasjac MeasurementNoise: [3x3 double] HasAdditiveMeasurementNoise: 1

Show the filter state.

filter.State
ans =6×110 0 20 0 -5 0

Show the state covariance.

filter.StateCovariance
ans =6×61.5000 0 0 0 0 0 0 100.0000 0 0 0 0 0 0 1.5000 0 0 0 0 0 0 100.0000 0 0 0 0 0 0 1.5000 0 0 0 0 0 0 100.0000

Initialize a 3D constant-velocity extended Kalman filter from an initial detection report made from a 3D measurement in spherical coordinates. If you want to use spherical coordinates, then you must supply a measurement parameter structure as part of the detection report with theFramefield set to'spherical'. Set the azimuth angle of the target to, the elevation to, the range to 1000 meters, and the range rate to -4.0 m/s.

frame ='spherical'; sensorpos = [25,-40,0].'; sensorvel = [0;5;0]; laxes = eye(3); measparms = struct('Frame',frame,'OriginPosition',sensorpos,...'OriginVelocity',sensorvel,'Orientation',laxes,'HasVelocity',true,...'HasElevation',true); meas = [45;-10;1000;-4]; measnoise = diag([3.0,2.5,2,1.0].^2); detection = objectDetection(0,meas,'MeasurementNoise',...measnoise,'MeasurementParameters',measparms)
detection = objectDetection with properties: Time: 0 Measurement: [4x1 double] MeasurementNoise: [4x4 double] SensorIndex: 1 ObjectClassID: 0 MeasurementParameters: [1x1 struct] ObjectAttributes: {}
filter = initcvekf(detection);

Filter state vector.

disp(filter.State)
721.3642 -2.7855 656.3642 -2.7855 -173.6482 0.6946

Input Arguments

collapse all

Detection report, specified as anobjectDetectionclass object.

Example:detection = objectDetection(0,[1;4.5;3],'MeasurementNoise', [1.0 0 0; 0 2.0 0; 0 0 1.5])

Output Arguments

collapse all

Extended Kalman filter, specified as atrackingEKFclass object.

Algorithms

  • The function computes the process noise matrix assuming a one second time step and an acceleration standard deviation of 1 m/s2.

  • You can use this functions as theFilterInitializationFcn财产的multiObjectTrackerobject.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced in R2017a

Was this topic helpful?