[GNSS] Robust estimation (robust estimation) principle and program realization

Robust estimation

Principles of robust estimation

Robust estimation is a category of modern measurement adjustment, also known as robust estimation. According to Academician Yang, the Chinese Academy of Sciences likes to call it robust estimation, and Wuhan University likes to call it robust estimation. Our measured value is a random variable and conforms to a normal distribution. If there is a gross error, when we apply the least squares or Kalman filter, the result will deviate from the true value (filter divergence). When we solve gross error or systematic error, we can understand from two aspects, mean shift or variance expansion, robust estimation belongs to the variance expansion model, that is, the phenomenon that the mean does not change and the variance changes. We can reduce the weight of observations with gross errors.
I’m lazy and don’t want to formulate a formula. Everyone should have seen similar derivations. In fact, the formula is the same as the least squares. The place of change is the weight matrix. When it is replaced with the equivalent weight, then the equivalent weight is also affected. Weight function, common huber, IGG III, etc., I recommend IGG III, the code is easy to implement.
This weight matrix is ​​very important when we implement it. The weight matrix is ​​the inverse of what we call the variance matrix. It is divided into independent and non-independent, that is, whether the observations are related or not, and whether they are related also affects the form of the equivalent weight function. . Give an example of the simplest independent observation distance

Examples of robust estimation

We assume that 10 independent observations are made for a distance, and the 10 observations are: 5.09, 5.10, 5.13, 5.09, 5.12, 5.08, 5.46, 7.81, 5.10, 5.11 (in m), the data is randomly compiled by me.
From the above description, we can know that the number of measurements is n=10, the necessary observation m=1, and the redundant observation is nm=9. For independent observation, the weight matrix is ​​the diagonal, and the prior weight matrix is ​​the unit diagonal. What is visible to the naked eye is that the observation value of 7.81 is gross error, but 5.46 is not sure if it is.

Robust program implementation

realized by matlab

%% 功能3-抗差估计
% % 假设对一段长度进行观测,5.09 5.10 5.13 5.09 5.12 5.08 5.46 7.81 5.10 5.11
close all
clear all
clc
k0=1.0;k1=2.5;k=1.0;
B=ones(10,1);% 设计矩阵
l=[5.09 5.10 5.13 5.09 5.12 5.08 6.46 7.81 5.10 5.11]';
% P=diag(ones(10,1));% 先验权矩阵1,等价权
P=diag(1./l);% 先验权矩阵2,根据长度倒数定权
x_prev=0;
x0=5.10;% 赋初值
l=l-x0;

while(1)

    W=B'*P*l;
    N=B'*P*B;
    x=inv(N)*W;% 待估参数向量
    v=B*x-l;% 残差向量
    sigma0=sqrt(v'*P*v/(10-1));% 单位权中误差
    disp(['待估参数向量:',num2str(x),' 单位权中误差:',num2str(sigma0)]);
    Q=inv(P);
    Qvv=Q-B*inv(N)*B';

    for i=1:10
        v_=v(i)/(sigma0*sqrt(Qvv(i,i)));
        if abs(v_)<=k0
            k=1.0;
        elseif  abs(v_)>k1
            k=1e-8;
        else
            k=(k0/abs(v_))*((k1-abs(v_))/(k1-k0))^2;
        end
        P(i,i)=P(i,i)*k;
    end

    if x_prev==0
        x_prev=x;
        continue;
    elseif abs(x_prev-x)<0.01
        break;
    end
    x_prev=x;
end
x=x0+x_prev;%求出的最后长度 初值+改正数
disp(['length is ',num2str(x)])

The print result is as follows: The result of
using the equivalent weight is:

待估参数向量:0.309 单位权中误差:0.8512
待估参数向量:0.042222 单位权中误差:0.11331
待估参数向量:0.0025 单位权中误差:0.01472
待估参数向量:-0.00031553 单位权中误差:0.0084525
length is 5.1025

The result of using the reciprocal length to determine the weight is:

待估参数向量:0.2218 单位权中误差:0.31128
待估参数向量:0.03985 单位权中误差:0.048702
待估参数向量:0.0024523 单位权中误差:0.0065128
待估参数向量:-0.0003396 单位权中误差:0.0037381
length is 5.1025

The first line in the figure is the result of our least squares. Only one of the 10 results is close to the value obtained by the least squares. It is obviously inconsistent with the result of our measurement, so if there is a gross error, it will The result of least squares is devastating. Then if we apply robust estimation, after another 3 iterations, the final result and the unit weight error are obtained.
If I modify the seventh value, it changes from 5.46 to 6.46. The result is as follows: the
result of using unit rights is:

待估参数向量:0.409 单位权中误差:0.91426
待估参数向量:0.1257 单位权中误差:0.38585
待估参数向量:0.0025 单位权中误差:0.01472
待估参数向量:-0.00031551 单位权中误差:0.0084526
length is 5.1025

The result of using the reciprocal length to determine the weight is:

待估参数向量:0.2218 单位权中误差:0.31128
待估参数向量:0.03985 单位权中误差:0.048702
待估参数向量:0.0024523 单位权中误差:0.0065128
待估参数向量:-0.0003396 单位权中误差:0.0037381
length is 5.1025

Conclusion The
use of robust estimation to determine improves the accuracy of parameter estimation. In addition, the results of different prior weight matrices are inconsistent in the iterative process. For this example, the reciprocal length is used to determine the weight, regardless of whether the least squares is applied or not, the result is Both are close to the true value, and the error in the unit weight is also small.

Robust estimation related to observations

This is mainly the three-step iteration:
1. Standardized residual error, unit weight error
2. Variance amplification factor
3, equivalent variance

Welcome to communicate~

Updated on 2020/11/10 14:20:00.
In the above example, you want to use standardized residuals. Thank you Xiao from the China Testing Institute for reminding me that I haven’t read the classic adjustment for a long time, and the covariance matrix propagation formula is really forgotten. Yes, hahaha.
Expansion: Actually, in gnss spp, the observations are not related, so get it, just find the corresponding parameters and apply them directly.

Guess you like

Origin blog.csdn.net/weixin_43074576/article/details/109312117