自适应卡尔曼滤波的噪声方差怎么推的_卡尔曼滤波中关键参数的调整

本文介绍了如何调整卡尔曼滤波的关键参数,包括预测噪声方差、测量噪声方差和误差协方差矩阵,探讨了它们对滤波效果的影响。通过实例展示了参数变化对系统输出的影响,并提供了参数整定的建议,强调了理解系统和实际测试的重要性。
摘要由CSDN通过智能技术生成

a88175f830488f199def3038cce2124b.png

写在前面

对于卡尔曼滤波,大多数人仅限于会用,很少有人能透彻的理解,而关于卡尔曼滤波中那几个关键参数的调整更是一头雾水。自从写完「深度解析卡尔曼滤波在IMU中的使用」一文,很多朋友咨询卡尔曼滤波的参数到底怎么调整,工作之余总结一下,由于水平有限,错误之处在所难免,欢迎交流指正。

本篇还是以飞控与移动机器人中常用的IMU芯片MPU6050为例,详细讲解卡尔曼滤波中那几个关键参数的调整。

源码参考 TKJElectronics/KalmanFilter

Kalman::Kalman() {
    /* We will set the variables like so, these can also be tuned by the user */
    Q_angle = 0.001f;
    Q_bias = 0.003f;
    R_measure = 0.03f;

    angle = 0.0f; // Reset the angle
    bias = 0.0f; // Reset bias

    P[0][0] = 0.0f; // Since we assume that the bias is 0 and we know the starting angle (use setAngle), the error covariance matrix is set like so - see: http://en.wikipedia.org/wiki/Kalman_filter#Example_application.2C_technical
    P[0][1] = 0.0f;
    P[1][0] = 0.0f;
    P[1][1] = 0.0f;
};

// The angle should be in degrees and the rate should be in degrees per second and the delta time in seconds
float Kalman::getAngle(float newAngle, float newRate, float dt) {
    // KasBot V2  -  Kalman filter module - http://www.x-firm.com/?page_id=145
    // Modified by Kristian Lauszus
    // See my blog post for more information: http://blog.tkjelectronics.dk/2012/09/a-practical-approach-to-kalman-filter-and-how-to-implement-it

    // 
  • 1
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值