From: Ahmad on
Hi,
I have calculated the Kalman Gain using the two matlab functions
1 - kalman
2 - dlqe
but the result are different, can any point out the reason. Here is the code

A = [0 0 -10 0;0 0 0 10;3.315 -3.315 -.5882 -.5882;3.315 -3.315 -.5882 -.5882];
B = [0 0;0 0;8.533 0;0 8.533];
C = [.5 .5 0 0;-2.113 2.113 .375 .375];
D = zeros(2,2);
Ts = 5e-2;
Qn = [0.1 0;0 0.1];
Rn = [0.04 0;0 0.01];
sysC = ss(A,B,C,D);
sysD = c2d(sysC,Ts,'zoh');
sysE = ss(sysD.a,[sysD.b sysD.b],sysD.c,[sysD.d sysD.d],Ts);
[Estim L] = kalman(sysE,Qn,Rn,'delayed');L
[L P Z estpolesZ] = dlqe(sysD.a,sysD.b,sysD.c,Qn,Rn);L

Regards