近期对卡尔曼滤波器很感兴趣,想趁着假期的时候好好学习一下。选择的教材是《Fundamentals of Kalman Filtering A Practical Approach, Third Edition》。本系列按照数据的章节顺序安排内容,本文的内容是书籍的第二章,最小二乘法。
最小二乘法
综述
我们的目标是尽可能的逼近真实信号,通过处理采集来的被噪声污染的信号。主要分为两步:
1. 使用一个多项式模型用于模拟真实信号。可用如下公式来描述模型:
anxn+an−1xn−1+...+a1x1+a0x0
2. 根据最小二乘法的准则,估计模型中的参数
零阶滤波器
假设有一组测量数据描述一个固定值,如何通过最小二乘法获得该固定值的最优估计。从多项式模型而言,即根据现实情况确定的模型是 a0x0 = a0 ,需要根据最小二乘法估计参数 a0 的值。
假设有 n 个测量数据
R=∑k=1n(a0−x∗k)2
R为估计值与测量值差值平方的求和,如果使 R 取到最小值,则认为估计值
R=∑k=1n(a0−x∗k)2=(a0−x∗1)2+(a0−x∗2)2+...+(a0−x∗n)2
对 R 求一阶导:
令 R 的一阶导数为零,则
求二阶导:
∂2R∂a02=2