Constant Linearization of differential equations
Show older comments
I currently try to build an extended kalman filter. For this i need to linearize the non linear equations around an updated working point so i can use it for the filter. I thought this should give me better results. However, the simulations show that only one linearization at one working point give me better results than the one where i constantly linearize the system. Im 99% sure the equations are correct. I substitute the values in the matrices every time step with the last estimated values to linearize at the current working point.
Picture 1 linearization with each time step [blue is the ideal graph, green is mine]

Picture 2 One linearization

variables_vehicle = [v b psiS sigma Fuv Fuh cv ch m lv lh J p_Luft A_surface cW i_S];
x_vehicle = x(t_start,:)';
for k=tf;
%__________________________________________________________________________
%Constant Linearization
disp(k)
variables_values_vehicle = [x_vehicle(1,1) x_vehicle(2,1) x_vehicle(3,1) u_vehicle(k,1) u_vehicle(k,2) u_vehicle(k,3) 28650 28650 258 0.765 0.765 100 1.2 1.4 1.2 4.1]; %Einsetzen der aktuellen Werte
A_vehicle=subs(A_v, variables_vehicle, variables_values_vehicle);
B_vehicle=subs(B_v, variables_vehicle, variables_values_vehicle);
C_vehicle=subs(C_v, variables_vehicle, variables_values_vehicle);
D_vehicle=subs(D_v, variables_vehicle, variables_values_vehicle);
ss_vehicle = ss(double(A_vehicle),double(B_vehicle),double(C_vehicle),double(D_vehicle));
ss_d_vehicle = c2d (ss_vehicle,Ts);
[A_d_vehicle,B_d_vehicle,C_d_vehicle,D_d_vehicle] = ssdata(ss_d_vehicle);
x_vehicle = A_d_vehicle*x_vehicle+B_d_vehicle*u_vehicle(k,:)' ;
end
Answers (1)
Lukas Niederstein
on 10 Jan 2021
Edited: Lukas Niederstein
on 10 Jan 2021
0 votes
Categories
Find more on Object Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!