# Kalman filter 不过滤噪声的状态方程不匹配

> 原文链接：https://robotics.hellobike.com/pitfalls/2017-07-05-robotics-se-12683
> 频道：pitfalls | 更新日期：2017-07-05 | 标签：auto, stackexchange, control, robotic-arm, kalman-filter, matlab
> 核心摘要：LQG 模型中状态方程与框图不一致，修改控制项符号并让量测包含噪声。

# Kalman filter 不过滤噪声的状态方程不匹配

::: v-pre
> 本文由 AI 根据公开内容整理，可能有误，请以原文为准：[Why doesn't this kalmanfilter filter anything? Reduce disturbances and noises with LQG controller](https://robotics.stackexchange.com/questions/12683/why-doesnt-this-kalmanfilter-filter-anything-reduce-disturbances-and-noises-wi)（Robotics Stack Exchange #12683）

**状态**：已解决

## 问题

在 GNU Octave/MATLAB 风格代码中搭建 LQG/Kalman filter 后，滤波器似乎没有过滤扰动和噪声；采纳答案认为框图与状态方程不匹配。

## 环境

状态估计 / EKF 滤波器

## 解决办法

1. 不要在左上块用 `A-BL` 直接用未知真实状态 `x` 控制系统，按答案建议改为 `dot{x}=Ax`。
2. 将右上块符号改为负，使方程成为 `dot{x}=Ax-BL\tilde{x}`。
3. 修改量测矩阵/方程，让传感器噪声进入 Kalman filter，即形式为 `y=Cx+n`。

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

## 原始参考来源 (Sources)

- [Robotics Stack Exchange #12683：Why doesn't this kalmanfilter filter anything? Reduce disturbances and noises with LQG controller](https://robotics.stackexchange.com/questions/12683/why-doesnt-this-kalmanfilter-filter-anything-reduce-disturbances-and-noises-wi)