Documentation

initctukf

Create constant turn-rate unscented Kalman filter from detection report

Syntax

filter = initctukf(detection)

Description

example

filter= initctukf(detection)creates and initializes a constant turn-rate unscented Kalman filter,filter, from information contained in a detection report,detection.

Examples

collapse all

Create and initialize a 2-D constant turn-rate unscented Kalman filter object from an initial detection report.

Create the detection report from an initial 2D measurement, (-250,-40), of the object position. Assume uncorrelated measurement noise.

Extend the measurement to three dimensions by adding a z-component of zero.

detection = objectDetection(0,[-250;-40;0],'MeasurementNoise',2.0*eye(3),...'SensorIndex',1,“ObjectClassID”,1,'ObjectAttributes',{'Car',2});

Create the new filter from the detection report and display the filter properties.

filter = initctukf(detection)
过滤器= trackingUKF属性:状态:[5 x1double] StateCovariance: [5x5 double] StateTransitionFcn: @constturn ProcessNoise: [5x5 double] HasAdditiveProcessNoise: 1 MeasurementFcn: @ctmeas MeasurementNoise: [3x3 double] HasAdditiveMeasurementNoise: 1 Alpha: 1.0000e-03 Beta: 2 Kappa: 0

Show the filter state.

filter.State
ans =5×1-250 0 -40 0 0

Show the state covariance matrix.

filter.StateCovariance
ans =5×52 0 0 0 0 0 100 0 0 0 0 0 2 0 0 0 0 0 100 0 0 0 0 0 100

Initialize a 2D constant-turnrate extended Kalman filter from an initial detection report made from an initial 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 toand the range to 1000 meters.

frame ='spherical'; sensorpos = [25,-40,-10].'; sensorvel = [0;5;0]; laxes = eye(3);

Create the measurement parameters structure. Set'HasVelocity'and'HasElevation'tofalse. Then, the measurement consists of azimuth and range.

measparms = struct('Frame',frame,'OriginPosition',sensorpos,...'OriginVelocity',sensorvel,'Orientation',laxes,'HasVelocity',false,...'HasElevation',false); meas = [45;1000]; measnoise = diag([3.0,2].^2); detection = objectDetection(0,meas,'MeasurementNoise',...measnoise,'MeasurementParameters',measparms)
detection = objectDetection with properties: Time: 0 Measurement: [2x1 double] MeasurementNoise: [2x2 double] SensorIndex: 1 ObjectClassID: 0 MeasurementParameters: [1x1 struct] ObjectAttributes: {}
filter = initctekf(detection);

Filter state vector.

disp(filter.State)
732.1068 0 667.1068 0 0

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

Unscented Kalman filter, specified as atrackingUKFclass object.

Algorithms

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

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

Extended Capabilities

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

Introduced in R2017a

Was this topic helpful?