# MPC输出加速度但底层控制器只收位置怎么办

> 原文链接：https://robotics.hellobike.com/pitfalls/2024-03-07-robotics-se-109686
> 频道：pitfalls | 更新日期：2024-03-07 | 标签：auto, stackexchange, robotic-arm, control, mobile-robot, kinematics
> 核心摘要：若底层只接受位置，可将MPC控制输入u二次积分，或用位置控制器跟踪MPC状态输出。

# MPC输出加速度但底层控制器只收位置怎么办

::: v-pre
> 本文由 AI 根据公开内容整理，可能有误，请以原文为准：[Mobile Manipulator: Is it possible to use the output state of an MPC position controller instead of the optimized control inputs (acceleration)?](https://robotics.stackexchange.com/questions/109686/mobile-manipulator-is-it-possible-to-use-the-output-state-of-an-mpc-position-co)（Robotics Stack Exchange #109686）

**状态**：有绕过办法

## 问题

实现移动机械臂喷洒轨迹控制时，`MPC`输出包含状态和优化控制输入，加速度`u`与底层已有码的位置/速度控制接口不一致，不确定应使用`y`、`u`还是状态矩阵。

## 环境

Linux / ROS 机器人软件与控制通用开发环境

## 解决办法

1. 若硬件只接受速度控制，可把速度作为`MPC`控制输入，或使用动态`MPC`后对加速度控制量`u`做一次数值积分得到速度再发送给底层速度控制器。
2. 若底层只接受位置控制，可按提问中思路对加速度`u`做两次数值积分，得到位置输入。
3. 若已有较好的位置控制器，也可以直接跟踪`MPC`的状态输出`x`；但这更接近移动时域规划，而不完全是`MPC`。

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

## 原始参考来源 (Sources)

- [Robotics Stack Exchange #109686：Mobile Manipulator: Is it possible to use the output state of an MPC position controller instead of the optimized control inputs (acceleration)?](https://robotics.stackexchange.com/questions/109686/mobile-manipulator-is-it-possible-to-use-the-output-state-of-an-mpc-position-co)