Student number: 20021110373t
from:/gangdanerya/article/details/ 105 1056 1 1。
The detailed derivation, limitation and MATLAB simulation of extended Kalman filter (EKF) algorithm are introduced.
Extended Kalman filter (EKF) embedded in bovine nose
Mosaic ox script
Extended Kalman filter algorithm is the most direct method to solve the nonlinear state estimation problem. Although EKF filter is not the most accurate "optimal" filter, it has been successfully applied to many nonlinear systems in the past decades. Therefore, learning nonlinear filtering problems should start with EKF.
EKF algorithm linearizes the nonlinear function by Taylor expansion of the nonlinear function, and then omits the high-order term and retains the first-order term of the expansion term. Finally, the state estimation and variance estimation of the system are approximately calculated by Kalman filter algorithm.
Detailed derivation of 1.EKF algorithm.
Note: The derivation of EKF refers to Dr. Huang Wei's thesis "Research on the Application of CKF and Robust Filtering in Aircraft Attitude Estimation". The EKF, UKF and CKF algorithms in this paper are all explained in detail, which is worth seeing.
We compared KF and e KF algorithms and found that:
Second, the limitations of EKF algorithm:
The linearization of this algorithm will introduce stage error, which will lead to the decline of filtering accuracy. At the same time, when the initial state error is large or the system model is nonlinear, the filtering accuracy will be seriously affected or even divergent.
Jacobian matrix needs to be calculated, which is complicated and requires a large amount of calculation, which affects the real-time performance of the system and leads to poor numerical stability of EKF algorithm.
When the system has complex conditions such as model mismatch, measurement interference, measurement loss, measurement delay or state mutation, the EKF algorithm has poor robustness.
Third, Matlab simulation:
Clear all; clc? All closed;
tf = 50?
q = 10; w=sqrt(Q)*randn( 1,TF); ?
r = 1; v=sqrt(R)*randn( 1,TF);
P = eye (1);
X = zero (1, tf);
Xnew=zeros( 1,TF);
x( 1, 1)= 0. 1; ?
Xnew( 1, 1)=x( 1, 1);
Z = zero (1, tf);
z( 1)=x( 1, 1)^2/20+v( 1);
zjian=zeros( 1,TF);
zjian( 1, 1)= z( 1);
For k = 2: tf
%%%%%%% Simulation system%%%%
x(:,k) = 0.5 * x(:,k- 1) + (2.5 * x(:,k- 1) / ( 1 + x(:,k- 1)。 ^2))+8 * cos( 1.2 *(k- 1))+w(k- 1); ?
z(k) = x(:,k)。 ^2/20+v(k);
%%%%%%% EKF start%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Xpre = 0.5*Xnew(:,k- 1)+ 2.5*Xnew(:,k- 1)/( 1+Xnew(:,k- 1)。 ^2)+8 * cos( 1.2 *(k- 1));
zjian =Xpre。 ^2/20;
F = 0.5 + 2.5 * ( 1-Xnew。 ^2)/(( 1+Xnew.^2).^2);
h = Xpre/ 10; ?
PP = F * P * F '+Q; ?
kk = PP * H ' * inv(H * PP * H '+R);
xnew(k)= Xpre+Kk *(z(k)-zjian);
p = PP-Kk * H * PP;
end
? t = 2:TF;
? Figure; plot(t,x( 1,t),' b ',t,Xnew( 1,t),' r * '); ? Legend ('true value',' EKF estimated value');
Simulation results:
With the development of education, the number of business administration graduates in China is also increasing, but the quality