helping with plowing Kalman filter
1 view (last 30 days)
Show older comments
For a Kalman filter, i am examining how maneuvering parameters affect tuning a filter.
a target can maneuver with as much as 30 m/s2 acceleration and we have a sensor measurement rate of 2 seconds and a measurement variance sigma^2_v of 1,600 m^2 for a nearly constant velocity (NCV) filter with discrete white noise acceleration (DWNA).
I want to plot the min and max values of measuerment variance sigma^2_v for 2 second update rate, a measurement variance of 1,600 m^2, versus the maximum maneuver accelerations. Plot for accelerations of 5,6,…,70 m/s^2.
this is my matlab code and I think the problem with the vectors becuse when I run the plot I have either no curves or vector diminssion problems
clear all
%
% Write a Matlab script that plots the min and max values of σ_v^2 for 2 second update rate,
% a measurement variance of 1,600 m^2, versus the maximum maneuver accelerations. Plot for accelerations
% of 5,6,…,70 m/s2. Label axes. Be sure to give figure a label and reference the label in the report.
% Parameters:
% sigma_v_min= 26.1776 sigma_v_max= 41.2835 sigma_v^2_min= 685.2667 sigma_v^2_max = 1704.3274
A_max= 70; % the maximum acceleration of the target.
A_min= 5; % the min acceleration of the target.
L= A_max-A_min ;
A_plot= A_min:A_max;
T=2; % time in seconds
T_plot=0:2
sigma_w= 40 % measurement variance, noise error standard deviation
sigma_w2= (sigma_w)^2; % measurement variance sqrt, , noise error standard deviation
% sigma_v_max=41.2835; % max system process error standard deviation
% sigma_v2_min= (sigma_v_min)^2; % sqrt min system process error standard deviation
% sigma_v2_max= (sigma_v_max)^2; % sqrt max system process error standard deviation
%
% calculate % system process error standard deviation Gamma_D=(A_max T^2)/sigma_w
% The design and performance of the filter is characterized
% by the maneuver index or random tracking index
Gamma_D=(A_max*T^2)/sigma_w; % Calculate the maneuver index or random tracking index
Gamma_D_plot= ((A_plot)*(T^2))/sigma_w; % estimate the maneuver index or random tracking index
%
% for sigma_v
% κ_1 (Γ_D )=1.67-0.74 log(Γ_D )+0.26[log(Γ_D ) ]^2, 0.01≤Γ≤10
Gamma_D==0.01:10;
k1_GammaD_max= 1.67-0.7*log(Gamma_D)+0.26*(log(Gamma_D))^2; % max
%
%κ_1^min (Γ_D )=0.87-0.09 log(Γ_D )+0.2[log(Γ_D ) ]^2
k1_GammaD_min= 0.87-0.09*log(Gamma_D)+0.02*(log(Gamma_D))^2 % min
%
% Calculate the sigma_v
%
sigma_v_maxCal= (k1_GammaD_max)*(A_max); % calc sigma_v max
sigma_v_minCal= (k1_GammaD_min)*(A_min); % calc sigma_v min
sigma_v2_maxCal= (sigma_v_maxCal)^2;
sigma_v2_minCal= (sigma_v_minCal)^2;
% calc plot A_max and A_min
A_maxPlot= (sigma_v_maxCal)/(k1_GammaD_max);
A_min_Plot= (sigma_v_minCal)/(k1_GammaD_min);
% plots the min and max values of σ_v^2 for 2 second update rate, a measurement variance of 1,600 m2,
% versus the maximum maneuver accelerations. Plot for accelerations of 5,6,…,70 m/s2.
sigma_v2_min
x_val= [A_min_Plot A_maxPlot sigma_w2];
y_val= A_plot;
plot(x_val,y_val);
0 Comments
Answers (0)
See Also
Categories
Find more on Online Estimation 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!