%% Benchmark Trajectories for Multi-Object Tracking
% This example shows how to generate and visualize trajectories of multiple
% aircraft using |trackingScenario| and |waypointTrajectory|.
%
% Copyright 2018 The MathWorks, Inc.
%% Introduction
% The six aircraft trajectories modeled in this example are described in
% [1]. The aircraft fly in an arrangement intended to be received by a
% radar located at the origin.
%% Choice of Interpolant
% Conceptually speaking, a trajectory is a curve through space which an
% object travels as a function of time. To define the curve, you may think
% of a curve through space that passes through a set of points called
% _waypoints_ connected by an interpolating function called an
% _interpolant_. An interpolant allows you to define the path between
% waypoints via a continuous function. Common interpolants are polynomial
% based (for example, piecewise linear or cubic splines). For a rapidly
% changing trajectory, more waypoints are required to keep the interpolated
% curve as close to the true curve as possible; however, we can reduce the
% number of required points by choosing interpolants carefully.
%
% Many motion models used in track filters consist of "constant velocity,"
% "constant turn," or "constant acceleration" profiles. To accommodate
% these motion models, the interpolant used in the |waypointTrajectory|
% object is based on a piecewise clothoid spline (horizontally) and a cubic
% spline (vertically). The curvature of a clothoid spline varies linearly
% with respect to distance traveled; this lets us model straight and
% constant turns with ease, having one extra degree of freedom to
% transition smoothly between straight and curved segments. Similarly,
% objects in the air experience the effects of gravity, following a
% parabolic (quadratic) path. Having a cubic spline to model vertical
% elevation allows us to model the path with a similar extra degree of
% freedom.
%
% Once the physical path through space of an object is known (and set),
% the speed of the object as a function of distance traveled is determined
% via cubic Hermite interpolation. This is useful for modeling
% trajectories of objects that accelerate through turns or straight
% segments.
%
% The benchmark trajectories we are using consist of straight, constant-g
% turns, and turns with acceleration.
%% Waypoint Construction
% The following file contains tables of waypoints and velocities (in units
% of meters and meters per second) that can be used to reconstruct six
% aircraft trajectories. Load it into MATLAB and examine the table
% containing the first trajectory.
load('benchmarkTrajectoryTables.mat', 'trajTable');
trajTable{1}
%% Scenario Generation
% The table contains a set of waypoints and velocities that the aircraft
% passes through at the corresponding time.
%
% To use the control points, you can create a scenario with six platforms
% and assign a trajectory to each:
scene = trackingScenario('UpdateRate',10);
for n=1:6
plat = platform(scene);
traj = trajTable{n};
plat.Trajectory = waypointTrajectory(traj.Waypoints, traj.Time, 'Velocities', traj.Velocities);
end
%% Trajectory Visualization
% Once you have the scenario and plotter set up, you can set up a
% |theaterPlot| to create an animated view of the locations of the
% aircraft as time progresses.
helperPlot = helperBenchmarkPlotter(numel(scene.Platforms));
while advance(scene)
% extract the pose of each of the six aircraft
poses = platformPoses(scene);
% update the plot
update(helperPlot, poses, scene.SimulationTime);
end
%%
% The trajectories plotted above are three-dimensional. You can rotate the
% plot so that the elevation of the trajectories is readily visible. You
% can use the |view| and |axis| commands to adjust the plot. Because the
% trajectories use a NED (north-east-down) coordinate system, elevation
% above ground has a negative z component.
view(60,10);
axis square
grid minor
set(gca,'ZDir','reverse');
%% Trajectory 1
% It may be instructive to view the control points used to generate the
% trajectories. The following figure shows the first trajectory, which is
% representative of a large aircraft.
%
% The control points used to construct the path are plotted on the leftmost
% plot. Only a few waypoints are needed to mark the changes in curvature
% as the plane takes a constant turn.
%
% The plots on the right show the altitude, magnitude of velocity (speed),
% and magnitude of acceleration, respectively. The speed stays nearly
% constant throughout despite the abrupt change in curvature. This is an
% advantage of using the clothoid interpolant.
[time, position, velocity, acceleration] = cumulativeHistory(helperPlot);
helperTrajectoryViewer(1, time, position, velocity, acceleration, trajTable);
%% Trajectory 2
% The second trajectory, shown below, represents the trajectory of a small
% maneuverable aircraft. It consists of two turns, having several changes
% in acceleration immediately after the first turn and during the second
% turn. More waypoints are needed to adjust for these changes, however the
% rest of the trajectory requires fewer points.
helperTrajectoryViewer(2, time, position, velocity, acceleration, trajTable);
%% Trajectory 3
% The third trajectory, shown below is representative of a higher speed
% aircraft. It consists of two constant turns, where the aircraft
% decelerates midway throughout the second turn. You can see the control
% points that were used to mark the changes in velocity and acceleration in
% the x-y plot on the left.
helperTrajectoryViewer(3, time, position, velocity, acceleration, trajTable);
%% Trajectory 4
% The fourth trajectory, also representative of a higher speed aircraft, is
% shown below. It consists of two turns, where the aircraft accelerates
% and climbs to a higher altitude.
helperTrajectoryViewer(4, time, position, velocity, acceleration, trajTable);
%% Trajectory 5
% The fifth trajectory is representative of a maneuverable high-speed
% aircraft. It consists of three constant turns; however it accelerates
% considerably throughout the duration of the flight. After the third turn
% the aircraft ascends to a level flight.
helperTrajectoryViewer(5, time, position, velocity, acceleration, trajTable);
%% Trajectory 6
% The sixth trajectory is also representative of a maneuverable high-speed
% aircraft. It consists of four turns. After the second turn the aircraft
% decreases altitude and speed and enters the third turn. After the third
% turn it accelerates rapidly and enters the fourth turn, continuing with
% straight and level flight.
helperTrajectoryViewer(6, time, position, velocity, acceleration, trajTable);
%% Summary
% This example shows how to use |waypointTrajectory| and
% |trackingScenario| to create a multi-object tracking scenario. In
% this example you learned the concepts behind the interpolant used inside
% |waypointTrajectory| and were shown how a scenario could be reproduced
% with a small number of waypoints.
%% Reference
% # W.D. Blair, G. A. Watson, T. Kirubarajan, Y. Bar-Shalom, "Benchmark for
% Radar Allocation and Tracking in ECM." Aerospace and Electronic Systems
% IEEE Trans on, vol. 34. no. 4. 1998
没有合适的资源?快使用搜索试试~ 我知道了~
基于Matlab生成并可视化多架飞机轨迹仿真.rar
共4个文件
m:3个
mat:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 29 下载量 93 浏览量
2023-02-08
19:48:40
上传
评论 12
收藏 10KB RAR 举报
温馨提示
此示例演示如何使用生成和可视化多架飞机的轨迹。 一、介绍 本例中建模的六种飞机轨迹进行了描述。飞机以一种形式安排飞行,旨在由位于原点的雷达接收。 二、插值器选择 从概念上讲,轨迹是物体作为时间函数穿越空间的曲线。要定义曲线,可以考虑一条穿过空间的曲线,该曲线穿过一组称为航路点的点,这些点由称为插值器的插值函数连接。插值符允许您通过连续函数定义航点之间的路径。常见的插值是基于多项式的(例如,分段线性样条或三次样条)。对于快速变化的轨迹,需要更多的航点来保持插值曲线尽可能接近真实曲线;但是,我们可以通过仔细选择插值符来减少所需点的数量。 轨道滤波器中使用的许多运动模型由“恒定速度”、“恒定转弯”或“恒定加速度”曲线组成。为了适应这些运动模型,对象中使用的插值基于分段布样条(水平)和三次样条(垂直)。布样条的曲率随行进距离线性变化;这使我们可以轻松地对直线和恒定转弯进行建模,并具有额外的自由度,可以在直线段和曲线段之间平滑过渡。同样,空气中的物体会经历重力的影响,遵循抛物线(二次)路径。使用三次样条来模拟垂直高程,使我们能够以类似的额外自由度对路径进行建模。
资源推荐
资源详情
资源评论
收起资源包目录
基于Matlab生成并可视化多架飞机轨迹仿真.rar (4个子文件)
基于Matlab生成并可视化多架飞机轨迹仿真
helperTrajectoryViewer.m 2KB
benchmarkTrajectoryTables.mat 5KB
BenchmarkTrajectoriesForMultiObjectTrackingExample.m 7KB
helperBenchmarkPlotter.m 3KB
共 4 条
- 1
珞瑜·
- 粉丝: 11w+
- 资源: 500
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- AlpineLinux基础镜像Dockerfile 构建tomcat镜像
- AOD4187-VB一款P-Channel沟道TO252的MOSFET晶体管参数介绍与应用说明
- java Smart系统-题库及试卷管理模块的设计与开发(源代码).zip
- 信息办公学校教务管理系统(jsp+servlet+javabean)-school.zip
- 信息办公学生课绩管理系统 jsp + servlet + javaBean + sql-server-scm.zip
- vue3 学习资料(带源码和课件)
- SIMATIC S7-1200 PLC产品样本.pdf
- AOD413Y-VB一款P-Channel沟道TO252的MOSFET晶体管参数介绍与应用说明
- Vertiv+Geist+GU1系列监控型PDU+
- nvm-setup window安装包
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
- 6
前往页