# 四旋翼松开偏航杆后回转且不稳定怎么办

> 原文链接：https://robotics.hellobike.com/pitfalls/2019-08-11-robotics-se-14236
> 频道：pitfalls | 更新日期：2019-08-11 | 标签：auto, stackexchange, quadcopter, control, pid
> 核心摘要：用融合后的偏航角做偏航控制会回转，改为基于原始陀螺仪数据做偏航角速度 PID 后解决。

# 四旋翼松开偏航杆后回转且不稳定怎么办

::: v-pre
> 本文由 AI 根据公开内容整理，可能有误，请以原文为准：[Correct Quadcopter Yaw control implementation](https://robotics.stackexchange.com/questions/14236/correct-quadcopter-yaw-control-implementation)（Robotics Stack Exchange #14236）

**状态**：已解决

## 问题

自制四旋翼用 `Madgwick` 输出的 `Yaw/Pitch/Roll` 做 `PID`。俯仰和横滚正常，但偏航杆松开后飞机会快速回转一半，再慢慢回到目标角，机动后飞行稳定性变差并逐渐恢复。

## 环境

闭环运动控制器

## 解决办法

1. 重新实现偏航控制，不再使用传感器融合得到的当前 `Yaw` 角。
2. 直接使用原始陀螺仪数据做 `PID`，因为陀螺仪返回的是偏航角变化速度，正好对应摇杆想控制的角速度。

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

## 原始参考来源 (Sources)

- [Robotics Stack Exchange #14236：Correct Quadcopter Yaw control implementation](https://robotics.stackexchange.com/questions/14236/correct-quadcopter-yaw-control-implementation)