# 梯形速度曲线

梯形速度曲线是一种运动曲线：机器的速度以恒定加速度上升，在恒定巡航速度下保持，再以恒定减速度下降，因此以时间为横轴绘制的速度曲线构成一个梯形。它是工业机器人、计算机数控（CNC）机床以及步进电机和伺服电机驱动中的标准点到点运动规律，因为其计算简单，且能在路径点之间给出确定性的时序。<sup>[1](https://github.com/Emil-labs/R-I-P3/blob/main/tutorial_doc/04_TrajectoryPlanning.md)</sup><sup> • </sup><sup>[2](https://www.sciencedirect.com/science/article/pii/S0736584518300693)</sup>

| 关键事实 | 详情 |
|---|---|
| 阶段 | 每次移动分三段：恒定加速度、恒定速度（巡航）和恒定减速度。<sup>[1](https://github.com/Emil-labs/R-I-P3/blob/main/tutorial_doc/04_TrajectoryPlanning.md)</sup> |
| 定义参数 | 结束时间、峰值速度、加速时间和峰值加速度；四者中任意两个即可完全确定该曲线。<sup>[3](https://www.mathworks.com/help/robotics/ug/design-a-trajectory-with-velocity-limits-using-a-trapezoidal-velocity-profile.html)</sup> |
| 速度界限 | 峰值速度必须大于平均速度，且至多为平均速度的两倍；达到上限时巡航阶段消失，曲线变为三角形。<sup>[3](https://www.mathworks.com/help/robotics/ug/design-a-trajectory-with-velocity-limits-using-a-trapezoidal-velocity-profile.html)</sup> |
| 加加速度 | 加加速度（加速度的变化率）在阶段转换处为无穷大，因为加速度在 0 与峰值之间发生不连续跃变。<sup>[4](https://www.chiefdelphi.com/uploads/default/original/3X/9/9/9907013bdc178a6aba7ecca5b656c1a50d012e06.pdf)</sup> |
| 实际作用 | 因能简化在线时间最优轨迹规划而广泛用于工业机器人。<sup>[2](https://www.sciencedirect.com/science/article/pii/S0736584518300693)</sup> |
| 平滑性代价 | 在一个并列对比示例中（移动 100 mm，速度 100 mm/s，加速度 500 mm/s²，加加速度上限 5000 mm/s³），梯形方案耗时 1.200 s，而受加加速度限制的 S 形曲线耗时 1.300 s，加加速度代价为 0.100 s。<sup>[5](https://roboticsprojecthub.com/motion-profile-simulator/)</sup> |

## 曲线的结构

该曲线将每个路径点至路径点的区段分为三个阶段。在加速阶段，速度从静止以恒定斜率上升，直至达到峰值速度；在巡航阶段，机器保持该速度；在减速阶段，速度以恒定斜率回落至零。其名称来自速度—时间曲线的形状，平坦的顶部和倾斜的两侧构成一个梯形。<sup>[1](https://github.com/Emil-labs/R-I-P3/blob/main/tutorial_doc/04_TrajectoryPlanning.md)</sup><sup> • </sup><sup>[6](https://etasl.pages.gitlab.kuleuven.be/markdown/eTaSL_task_specifications/etasl_libraries/3_trapezoidal_motionprofile/)</sup>

在斜坡阶段以恒定加速度 \( a \) 运动时，速度按 \( v(t) = a \cdot t \) 增长，位置按 \( s(t) = a \cdot t^{2}/2 \) 增长；巡航期间加速度为零，位置线性推进；减速期间加速度为 \( -a \)，速度按 \( a \cdot (t_{\mathrm{end}} - t) \) 下降。<sup>[3](https://www.mathworks.com/help/robotics/ug/design-a-trajectory-with-velocity-limits-using-a-trapezoidal-velocity-profile.html)</sup> 所走过的距离等于梯形的面积，正是这一点将四个曲线参数联系在一起。<sup>[3](https://www.mathworks.com/help/robotics/ug/design-a-trajectory-with-velocity-limits-using-a-trapezoidal-velocity-profile.html)</sup>

**允许不对称。** 减速度可以指定为与加速度不同的独立常量，因为制动往往可以比加速更快完成。<sup>[7](https://www.cs.cmu.edu/~jbruce/thesis/chapters/thesis-ch08.pdf)</sup> 大多数曲线是对称的，加速度与[减速](https://www.edgepedia.org/zh/deceleration)度的大小相等，但不对称曲线适用于机器人必须比启动更快停止的情形，例如紧急制动。<sup>[8](https://www.azrobots.com/glossary/trapezoidal-velocity-profile)</sup>

## 参数的选择

有四个量描述一个区段：结束时间、峰值速度、加速时间（花在斜坡阶段的时间）和峰值加速度。指定其中任意两个即可完全确定该曲线；只接收一个参数的工具会自动指定第二个参数，使平均速度落在允许界限的中点。<sup>[3](https://www.mathworks.com/help/robotics/ug/design-a-trajectory-with-velocity-limits-using-a-trapezoidal-velocity-profile.html)</sup>

区段长度对峰值速度施加两个限制。下限是平均速度 \( |s| / t_{\mathrm{end}} \)，当斜坡阶段缩短、速度曲线趋于矩形时，峰值速度趋近于该下限；实际上斜坡不可能真正无穷小，因此峰值速度必须严格大于平均速度。上限是平均速度的两倍，在运动尽可能多地把时间用于加速、不再保留巡航阶段时达到，此时产生三角形速度曲线，其面积为峰值速度与结束时间乘积的一半。<sup>[3](https://www.mathworks.com/help/robotics/ug/design-a-trajectory-with-velocity-limits-using-a-trapezoidal-velocity-profile.html)</sup> 因此短距离移动可能永远达不到指令速度：例如，一个加速度上限为 30 rad/s² 的关节被要求移动 0.3 rad，其峰值速度为 \( \sqrt{30 \cdot 0.3} = 3.0 \) rad/s，并在 \( 2 \cdot \sqrt{0.3/30} = 0.20 \) s 内完成。<sup>[9](https://unseel.com/engineering/trajectory-planning)</sup>

在多维移动中，同一结束时间必须服务于每个轴，而速度约束按维度分别适用。从 \([0, 0]\) 到 \([1, 2]\) 的一秒区段不能对两个轴使用同一个峰值速度，因为第一维要求峰值速度在 1 与 2 之间，而第二维要求在 2 与 4 之间；解决办法是为每一维指定不同的峰值速度。<sup>[3](https://www.mathworks.com/help/robotics/ug/design-a-trajectory-with-velocity-limits-using-a-trapezoidal-velocity-profile.html)</sup>

## 加加速度与振动

该曲线在运动学上的主要弱点在于加速度的不连续性。由于加速度在每个阶段边界处从零瞬时跃变到峰值，加加速度（加速度的导数）在理想指令曲线的这些转换处为无穷大。<sup>[4](https://www.chiefdelphi.com/uploads/default/original/3X/9/9/9907013bdc178a6aba7ecca5b656c1a50d012e06.pdf)</sup><sup> • </sup><sup>[10](https://atlasofengineering.com/mechanical-engineering/jerk/)</sup> 对梯形曲线而言，加加速度根本不是受控因素，这与 S 形曲线不同——后者中加加速度是一个设计参数。<sup>[11](https://literature.rockwellautomation.com/idc/groups/literature/documents/um/motion-um001_-en-p.pdf)</sup>

这些加速度跃变会产生运动冲击，在机械系统中诱发显著振动，激发弹性齿轮箱和结构的共振。<sup>[12](https://journals.sagepub.com/doi/full/10.1177/17298806261431130)</sup> 后果在实践中可见：在一项移动携带敞口水容器的 Kinova Gen3 机械臂的实验中，与矩形曲线相比，梯形曲线降低了加速度并给出相对平滑的运动，但与无限加加速度相关的振动导致移动开始和结束时液面上形成波纹；而限制加速度和加加速度的 S 形曲线显著减小了扰动，并将溢出的风险降至最低。<sup>[13](https://pmc.ncbi.nlm.nih.gov/articles/PMC11359329/)</sup>

## 与 S 形曲线的比较

受加加速度限制的 S 形曲线是通常的替代方案。它把每个加速度跃变替换为斜坡，产生七阶段移动：以正加加速度增大加速度、保持加速度、以负加加速度减小加速度、巡航，以及用于停止的镜像过程。<sup>[14](https://roboticsprojecthub.com/tutorials/motion-profiles-trapezoidal-s-curve/)</sup> 更平滑的运动学特性减少了跟随误差，消除了运动开始时造成皮带和电缆磨损及间隙冲击的加加速度尖峰，并产生更柔和的机械停止。<sup>[15](https://industrialmonitordirect.com/blogs/knowledgebase/drives-and-safe-stopping-motion-control-profile-brake-design)</sup>

代价是时间。在一项针对 100 mm 移动、100 mm/s 最高速度、500 mm/s² 加速度上限和 5000 mm/s³ 加加速度上限的详细对比中，梯形方案在 1.200 s 内完成移动，而 S 形曲线需要 1.300 s，差值即为对加速度进行斜坡化的代价。<sup>[5](https://roboticsprojecthub.com/motion-profile-simulator/)</sup> 梯形曲线在计算上也仍然有吸引力：它简单、时序确定，并能生成适合实时控制的动力学一致的关节轨迹。<sup>[1](https://github.com/Emil-labs/R-I-P3/blob/main/tutorial_doc/04_TrajectoryPlanning.md)</sup> 由于梯形曲线在工业机器人中部署极为广泛，一条研究路线是对其进行预成形，即修改指令曲线以抑制它所激发的残余振动，而不是直接替换它。<sup>[2](https://www.sciencedirect.com/science/article/pii/S0736584518300693)</sup>

## 应用场合

该曲线贯穿于运动控制之中。MATLAB 的 Robotics System Toolbox 提供 `trapveltraj`，它用梯形曲线连接路径点，在每个路径点处停止，并返回位置、速度、加速度以及轨迹的分段多项式形式。<sup>[16](https://www.mathworks.com/help/robotics/ref/trapveltraj.html)</sup> 业余和教育平台也依赖它：AccelStepper Arduino 库的 `setMaxSpeed()` 和 `setAcceleration()` 调用产生梯形曲线，仅此而已。<sup>[14](https://roboticsprojecthub.com/tutorials/motion-profiles-trapezoidal-s-curve/)</sup>

## References

1. [Trajectory Planning, R-I-P3 tutorial documentation, Emil-labs GitHub](https://github.com/Emil-labs/R-I-P3/blob/main/tutorial_doc/04_TrajectoryPlanning.md)
2. [Preshaping input trajectories of industrial robots for vibration suppression, ScienceDirect](https://www.sciencedirect.com/science/article/pii/S0736584518300693)
3. [Design Trajectory with Velocity Limits Using Trapezoidal Velocity Profile, MathWorks](https://www.mathworks.com/help/robotics/ug/design-a-trajectory-with-velocity-limits-using-a-trapezoidal-velocity-profile.html)
4. [Practical Guide to State-space Control, Chief Delphi](https://www.chiefdelphi.com/uploads/default/original/3X/9/9/9907013bdc178a6aba7ecca5b656c1a50d012e06.pdf)
5. [Motion Profile Simulator: Trapezoidal and S-Curve, Robotics Project Hub](https://roboticsprojecthub.com/motion-profile-simulator/)
6. [Trapezoidal Motion Profile, eTaSL task specifications, KU Leuven](https://etasl.pages.gitlab.kuleuven.be/markdown/eTaSL_task_specifications/etasl_libraries/3_trapezoidal_motionprofile/)
7. [Motion control chapter, J. Bruce thesis, Carnegie Mellon University](https://www.cs.cmu.edu/~jbruce/thesis/chapters/thesis-ch08.pdf)
8. [Trapezoidal Velocity Profile, AZRobots glossary](https://www.azrobots.com/glossary/trapezoidal-velocity-profile)
9. [Trajectory Planning: Velocity Profiles, S-Curves, Jerk Limits, Unseel](https://unseel.com/engineering/trajectory-planning)
10. [Jerk: Meaning and Motion-Control Limits, Atlas of Engineering](https://atlasofengineering.com/mechanical-engineering/jerk/)
11. [SERCOS and Analog Motion Configuration and Startup, Rockwell Automation](https://literature.rockwellautomation.com/idc/groups/literature/documents/um/motion-um001_-en-p.pdf)
12. [An improved S-curve motion profile with local input shaping for vibration suppression in robotic systems, Liu et al., Journal of Field Robotics / SAGE](https://journals.sagepub.com/doi/full/10.1177/17298806261431130)
13. [Optimal Path Planning Algorithm with Built-In Velocity Profiling for Collaborative Robot, PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC11359329/)
14. [Motion Profiles: Trapezoidal and S-Curve Acceleration, Robotics Project Hub](https://roboticsprojecthub.com/tutorials/motion-profiles-trapezoidal-s-curve/)
15. [Drives Safe Stopping: VFD Motion Profile & Mechanical Brake, Industrial Monitor Direct](https://industrialmonitordirect.com/blogs/knowledgebase/drives-and-safe-stopping-motion-control-profile-brake-design)
16. [trapveltraj: Generate trajectories with trapezoidal velocity profiles, MathWorks](https://www.mathworks.com/help/robotics/ref/trapveltraj.html)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 工程与制造 › 机器人技术与自动化 › Mechanical foundations of robotics › Motion and trajectory planning

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/trapezoidal-velocity-profile

English original: https://www.edgepedia.org/trapezoidal-velocity-profile
