Main Content

Platform

Platform object belonging to radar scenario

Description

Platform defines a platform object belonging to a radar scenario.

Creation

You can create Platform objects using the platform function of the radarScenario object.

Properties

expand all

This property is read-only.

Scenario-defined platform identifier, specified as a positive integer. The scenario automatically assigns PlatformID values to each platform, starting with 1 for the first platform and incrementing by 1 for each new platform.

Data Types: double

Platform classification identifier, specified as a nonnegative integer. You can define your own platform classification scheme and assign ClassID values to platforms according to the scheme. The value of 0 is reserved for an object of unknown or unassigned class.

Example: 5

Data Types: double | single

This property is read-only.

Current position of the platform, specified as a three-element numeric vector.

  • When the IsEarthCentered property of the scenario is set to false, the position is expressed as Cartesian coordinates [x, y, z] in meters.

  • When the IsEarthCentered property of the scenario is set to true, the position is expressed as geodetic coordinates [latitude, longitude, altitude], where latitude and longitude are in degrees and altitude is in meters.

Data Types: double

This property is read-only.

Current orientation of the platform, specified as a three-element numeric vector in degrees. The orientation is expressed as [yaw, pitch, roll] rotation angles from the local reference frame to the body frame of the platform.

Data Types: double

Platform dimensions and origin offset, specified as a structure. The structure contains the Length, Width, Height, and OriginOffset of a cuboid that approximates the dimensions of the platform. The OriginOffset is the position vector from the center of the cuboid to the origin of the platform coordinate frame. The OriginOffset is expressed in the platform coordinate system. For example, if the platform origin is at the center of the cuboid rear face as shown in the figure, then set OriginOffset as [-L/2, 0, 0]. The default value for Dimensions is a structure with all fields set to zero, which corresponds to a point model.

Platform depicted as a cuboid whose center is offset from the center of the platform frame coordinate system

Fields of Dimensions

FieldsDescriptionDefault
LengthDimension of a cuboid along the x direction0
WidthDimension of a cuboid along the y direction0
HeightDimension of a cuboid along the z direction0
OriginOffsetPosition of the platform coordinate frame origin with respect to the cuboid center[0 0 0 ]

Example: struct('Length',5,'Width',2.5,'Height',3.5,'OriginOffset',[-2.5 0 0])

Data Types: struct

Platform motion, specified as a kinematicTrajectory object, a waypointTrajectory object, or a geoTrajectory object. The trajectory object defines the time evolution of the position and velocity of the platform frame origin, as well as the orientation of the platform frame relative to the scenario frame.

  • When the IsEarthCentered property of the scenario is set to false, use the kinematicTrajectory or the waypointTrajectory object. By default, the platform uses a stationary kinematicTrajectory object.

  • When the IsEarthCentered property of the scenario is set to true, use the geoTrajectory object. By default, the platform uses a stationary geoTrajectory object.

Platform signatures, specified as a cell array of signature objects or an empty cell array ({}). The default value is a cell array containing an rcsSignature object with default property values. If you have Sensor Fusion and Tracking Toolbox™, then the cell array can also include irSignature (Sensor Fusion and Tracking Toolbox) and tsSignature (Sensor Fusion and Tracking Toolbox) objects. The cell array contains at most one instance of each type of signature object. A signature represents the reflection or emission pattern of a platform, such as its radar cross-section, target strength, or IR intensity.

Platform pose estimator, specified as a pose-estimator object such as an insSensor object. The pose estimator determines the platform pose with respect to the local NED scenario coordinates. The interface of any pose estimator must match the interface of the insSensor object. By default, the pose-estimator accuracy properties are zero.

Emitters mounted on the platform, specified as a cell array of emitter objects such as radarEmitter objects. If you have Sensor Fusion and Tracking Toolbox, then the cell array can also include sonarEmitter (Sensor Fusion and Tracking Toolbox) objects.

Sensors mounted on the platform, specified as a cell array of sensor objects such as radarDataGenerator objects.

Object Functions

detectCollect detections from all sensors mounted on platform
emitCollect emissions from all emitters mounted on platform
poseUpdate pose for platform
receiveReceive IQ signal from radars mounted on platform
targetPosesTarget positions and orientations as seen from platform

Examples

collapse all

Create a radar scenario with two platforms that follow different trajectories.

sc = radarScenario('UpdateRate',100,'StopTime',1.2);

Create two platforms.

platfm1 = platform(sc);
platfm2 = platform(sc);

Platform 1 follows a circular path of radius 10 m for one second. This is accomplished by placing waypoints in a circular shape, ensuring that the first and last waypoint are the same.

wpts1 = [0 10 0; 10 0 0; 0 -10 0; -10 0 0; 0 10 0];
time1 = [0; 0.25; .5; .75; 1.0];
platfm1.Trajectory = waypointTrajectory(wpts1,time1);

Platform 2 follows a straight path for one second.

wpts2 = [-8 -8 0; 10 10 0];
time2 = [0; 1.0];
platfm2.Trajectory = waypointTrajectory(wpts2,time2);

Verify the number of platforms in the scenario.

disp(sc.Platforms)
    {1x1 radar.scenario.Platform}    {1x1 radar.scenario.Platform}

Run the simulation and plot the current position of each platform using an animated line.

figure
grid
axis equal
axis([-12 12 -12 12])
line1 = animatedline('DisplayName','Trajectory 1','Color','b','Marker','.');
line2 = animatedline('DisplayName','Trajectory 2','Color','r','Marker','.');
title('Trajectories')
p1 = pose(platfm1);
p2 = pose(platfm2);
addpoints(line1,p1.Position(1),p1.Position(2));
addpoints(line2,p2.Position(2),p2.Position(2));

while advance(sc)
    p1 = pose(platfm1);
    p2 = pose(platfm2);
    addpoints(line1,p1.Position(1),p1.Position(2));
    addpoints(line2,p2.Position(2),p2.Position(2));
    pause(0.1)
end

Figure contains an axes. The axes with title Trajectories contains 2 objects of type animatedline. These objects represent Trajectory 1, Trajectory 2.

Plot the waypoints for both platforms.

hold on
plot(wpts1(:,1),wpts1(:,2),' ob')
text(wpts1(:,1),wpts1(:,2),"t = " + string(time1),'HorizontalAlignment','left','VerticalAlignment','bottom')
plot(wpts2(:,1),wpts2(:,2),' or')
text(wpts2(:,1),wpts2(:,2),"t = " + string(time2),'HorizontalAlignment','left','VerticalAlignment','bottom')
hold off

Figure contains an axes. The axes with title Trajectories contains 11 objects of type animatedline, line, text. These objects represent Trajectory 1, Trajectory 2.

Create a radar scenario.

rs = radarScenario;

Create a cuboid platform for a truck with dimensions 5 m by 2.5 m by 3.5 m.

dim1 = struct('Length',5,'Width',2.5,'Height',3.5,'OriginOffset',[0 0 0]);
truck = platform(rs,'Dimension',dim1);

Specify the trajectory of the truck as a circle with radius 20 m.

truck.Trajectory = waypointTrajectory('Waypoints', ...
    [20*cos(2*pi*(0:10)'/10) 20*sin(2*pi*(0:10)'/10) -1.75*ones(11,1)], ...
    'TimeOfArrival',linspace(0,50,11)');

Create the platform for a small quadcopter with dimensions 0.3 m by 0.3 m by 0.1 m.

dim2 = struct('Length',.3,'Width',.3,'Height',.1,'OriginOffset',[0 0 0]);
quad = platform(rs,'Dimension',dim2);

Specify the trajectory of the quadcopter as a circle 10 m above the truck with a small angular delay. Note that the negative z coordinates correspond to positive elevation.

quad.Trajectory = waypointTrajectory('Waypoints', ...
    [20*cos(2*pi*((0:10)'-.6)/10) 20*sin(2*pi*((0:10)'-.6)/10) -11.80*ones(11,1)], ...
    'TimeOfArrival',linspace(0,50,11)');

Visualize the results using theaterPlot.

tp = theaterPlot('XLim',[-30 30],'YLim',[-30 30],'Zlim',[-12 5]);
pp1 = platformPlotter(tp,'DisplayName','truck','Marker','s');
pp2 = platformPlotter(tp,'DisplayName','quadcopter','Marker','o');

Specify a view direction and run the simulation.

view(-28,37);
set(gca,'Zdir','reverse');

while advance(rs)
    poses = platformPoses(rs);
    plotPlatform(pp1,poses(1).Position,truck.Dimensions,poses(1).Orientation);
    plotPlatform(pp2,poses(2).Position,quad.Dimensions,poses(2).Orientation);
end

Figure contains an axes. The axes contains 2 objects of type line. These objects represent truck, quadcopter.

Introduced in R2021a