CustomSensor
Description
A CustomSensor
object contains a custom sensor specification. You
can modify this specification by defining its measurement model, detectability model, clutter
model, and birth model. Use this object as an input to the multiSensorTargetTracker
function.
Creation
To create a CustomSensor
object, use the trackerSensorSpec
function with the input argument "custom"
. For example:
spec = trackerSensorSpec("custom")
Properties
Sensor Models
Measurement model for the sensor, specified as a sensor measurement model object.
You can use the sensorMeasurementModel
function to generate the object. The model
defines what the sensor measures and how it relates to the state of the target.
Detectability model for the sensor, specified as a sensor detectability model
object. You can use the sensorDetectabilityModel
function to generate the object. The model
defines the sensor's fields of view and the probability of detecting a target at a
given state within each field of view.
Clutter model for the sensor, specified as a sensor clutter model object. You can
use the sensorClutterModel
function to generate the object. The model defines
the distribution of clutter in the measurement space.
Birth model for the sensor, specified as a sensor birth model object. You can use
the sensorBirthModel
function to generate the object. The model defines the
distribution of newly appearing targets in the measurement space.
General Properties
Maximum number of measurements per update, specified as a positive integer.
Example: 5
Data Types: single
| double
Option to enable updating sensor models with time and measurements, specified as
true
or false
. When you set this property to
true
, you can use the ModelUpdateFcn
property to update the specification.
Example: true
Data Types: logical
Maximum number of timestamps per update, specified as a positive integer. This property allows you to send time-varying data from the sensor to update the models.
To enable this property, set the UpdateModels
property to
true
.
Example: 64
Data Types: single
| double
Model update function, specified as a function handle. This property defines how
to update the specification based on time and measurement. The function signature is
spec = ModelUpdateFcn(spec,data)
.
data
is a subset of the input data. You provide this subset as
an input to the tracker. The tracker selects appropriate timestamps and measurements
from the data and calls the function. Use the dataFormat
function of the specification to understand the data format
required by the sensor.
To enable this property, set the UpdateModels
property to
true
.
Object Functions
dataFormat | Structure for data format required by task-oriented tracker |
Examples
Create a specification for a marine radar. The radar of interest is on top of a stationary tower.
radarPosition = [0;0;35]; % radar's relative position to the tower origin. towerPosition = [3800;15200;110]; % tower origin location in scenario coordinate. radarOrientation = [0 1 0;-1 0 0;0 0 1]; % radar's relative orientation to the tower origin. towerOrientation = [-0.2 0.6 0.7;0.9 0.3 0;-0.2 0.7 -0.6]; % tower orientation in scenario coordinate. marineRadarSpec = trackerSensorSpec("custom")
marineRadarSpec = CustomSensor with properties: MaxNumMeasurements: 32 MeasurementModel: [] DetectabilityModel: [] ClutterModel: [] BirthModel: [] UpdateModels: 0
Define the measurement, detectability, clutter, and birth model of the marine radar specification. For measurement, specify that the radar of interest reports the position in the scenario coordinates.
measurementModel = sensorMeasurementModel("position");
measurementModel.OriginPosition = zeros(3,1);
measurementModel.Orientation = eye(3);
For detectability, specify that the radar detects targets within its field of view around a center beam.
detectabilityModel = sensorDetectabilityModel("field-of-view");
detectabilityModel.AzimuthLimits = [-10 10];
detectabilityModel.ElevationLimits = [-15 15];
detectabilityModel.RangeLimits = [0 10000];
detectabilityModel.OriginPosition = cat(2,radarPosition,towerPosition);
detectabilityModel.Orientation = cat(3,radarOrientation,towerOrientation);
detectabilityModel.DetectionProbability = 0.95;
For clutter, specify that the radar assumes a uniform Poisson clutter model, which assumes false measurements or noise (referred to as "clutter") in radar data are uniformly distributed across the observation space.
clutterModel = sensorClutterModel("uniform-poisson");
clutterModel.ClutterDensity = 5e-9;
For birth, specify that the radar assumes a uniform Poisson birth model, which assumes new targets can appear uniformly across the entire observation space.
birthModel = sensorBirthModel("uniform-poisson");
birthModel.BirthDensity = 5e-9;
Configure the marine radar specification using these models.
marineRadarSpec.MeasurementModel = measurementModel; marineRadarSpec.DetectabilityModel = detectabilityModel; marineRadarSpec.ClutterModel = clutterModel; marineRadarSpec.BirthModel = birthModel;
To update the specification based on time or measurement, you can set the UpdateModels
property to true
and specify the ModelUpdateFcn
function handle of the specification. For example, the following model update function allows you to update the radar center beam orientation with time, and update the position variance with measurement.
marineRadarSpec.UpdateModels = true; marineRadarSpec.ModelUpdateFcn = @updateRadarSpec; function spec = updateRadarSpec(spec, data) if ~isempty(data.Time) spec.DetectabilityModel.Orientation(:,:,1) = data.TimeVaryingModelData.BeamOrientation; end if ~isempty(data.MeasurementTime) spec.MeasurementModel.PositionVariance = data.MeasurementVaryingModelData.PositionVariance; end end
More About
When you initialize a tracker using this object, you need sensor data to update the
tracker. For a full list of required sensor data and their descriptions, see the table
below. See the dataFormat
function for details on updating the tracker with sensor data.
Field Name | Description | Comment |
---|---|---|
MeasurementTime | A scalar or a 1-by-N array defining the timestamps of the measurements. N is the maximum number of measurements. | None |
Measurements | An array representing measurements reported by the sensor concatenated along the columns. | None |
Time | A 1-by-P array defining the timestamps of data reported by the sensor. P is the maximum number of timestamps. | Applies only when the UpdateModels property is set to
true . |
TimeVaryingModelData | A 1-by-P structure array defining the model data that changes with time. P is the maximum number of timestamps. | Applies only when the UpdateModels property is set to
true . |
MeasurementVaryingModelData | A 1-by-N structure array defining the model data that changes with measurements. N is the maximum number of measurements. | Applies only when the UpdateModels property is set to
true . |
Tip
To update the tracker at a timestamp when the sensor scan is not complete, specify
"LookTime"
as empty using
zeros(0,1,dataType)
.
Version History
Introduced in R2025a
See Also
Functions
multiSensorTargetTracker
|trackerTargetSpec
|trackerSensorSpec
|hasTrackerInput
|dataFormat
|sensorBirthModel
|sensorMeasurementModel
|sensorClutterModel
|sensorDetectabilityModel
Objects
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.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- 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)