# PID多航点轨迹会在每个设定点停稳

> 原文链接：https://robotics.hellobike.com/pitfalls/2015-02-04-robotics-se-6522
> 频道：pitfalls | 更新日期：2015-02-04 | 标签：auto, stackexchange, quadcopter, pid
> 核心摘要：四旋翼用固定航点PID飞多点轨迹不平滑，采纳方案是做轨迹生成并随时间更新PID设定值。

# PID多航点轨迹会在每个设定点停稳

::: v-pre
> 本文由 AI 根据公开内容整理，可能有误，请以原文为准：[PID controller for trajectory with mutliple setpoints](https://robotics.stackexchange.com/questions/6522/pid-controller-for-trajectory-with-mutliple-setpoints)（Robotics Stack Exchange #6522）

**状态**：已解决

## 问题

四旋翼已有PID可从A飞到B，但用于A到B到C或圆形采样点轨迹时，PID会迫使飞机在每个设定点稳定，导致轨迹不够平滑。

## 环境

闭环运动控制器

## 解决办法

1. 不要把每个航点作为长期固定目标，而是随时间改变发送给PID控制器的设定点。
2. 例如从A到B在`T`秒内完成，生成期望位置`x^d(t)=t p_B + (T-t) p_A`，其中`t=0`为动作开始时刻。
3. 为更好控制，同时定义期望速度`v^d=||p_B-p_A||/T`。
4. 该过程称为轨迹生成。

原问题作者：alcon；采纳答案作者：ryan0270。原内容依 CC BY-SA 4.0 授权，本页摘要同样依 CC BY-SA 4.0 授权。
:::

## 原始参考来源 (Sources)

- [Robotics Stack Exchange #6522：PID controller for trajectory with mutliple setpoints](https://robotics.stackexchange.com/questions/6522/pid-controller-for-trajectory-with-mutliple-setpoints)