资源简介
基于卡尔曼滤波的轨迹跟踪算法,结合攻击决策算法
代码片段和文件信息
%% fight.m
%% Copyright 2013-04-29 LIU Xiaojian
%% preparation for figure
clc; % clear Command Window
close all; % close all figures
clear all; % clear all members and variables
%% specify weighting factors k
k1 = 0.4;
k2 = 0.3;
k3 = 0.2;
k4 = 0.1;
%% specify mine number Nm
Nm = 17;
%% specify the maxmum of target detection
% Tn = 10;
%% specify the length and width of mine fileds
Lm = 200;
Wm = 200;
%% mine points random
% x = Lm * rand(1 Nm);
% y = Wm * rand(1 Nm);
% x = x + 1500;
% y = y - 8000;
x = zeros(1 Nm);
y = zeros(1 Nm);
mineAngle = 0 : pi/4 : pi*7/4;
xCenter = 100;
yCenter = 100;
x(1) = xCenter;
y(1) = yCenter;
r1 = 50;
r2 = 75;
x(1 2 : 9) = xCenter + r1 * cos(mineAngle);
y(1 2 : 9) = yCenter + r1 * sin(mineAngle);
x(1 10 : end) = xCenter + r2 * cos(mineAngle);
y(1 10 : end) = yCenter + r2 * sin(mineAngle);
figure(1);
hp1 = plot(x y ‘b*‘);
axis equal;
axis([0 Lm 0 Wm]);
%grid on;
xlabel(‘Mine Fields Length‘);
ylabel(‘Mine Fields Width‘);
title(‘Fight‘);
for i = 1 : Nm
text(x(i) - 5 y(i) [‘M‘ num2str(i)] ‘Color‘ ‘b‘);
end
%% for f1
% specify the power of each mine
e = rand(1 Nm);
% specify the lowset power A
A = 0.3;
% compute argument f1
f1 = zeros(1 Nm); % initialization of f1 all elements are specified as 0
for i = 1 : Nm
if e(i) < A
f1(i) = 1;
elseif (e(i) >= A) && (e(i) < 1)
f1(i) = (1 - e(i))/(1 - A);
else
f1(i) = 0;
end
end
%% for f2
% specify Part Failure Rate 10%
PFR = 0.10;
%
R = rand(1 Nm);
f2 = zeros(1 Nm);% initialization of f2
for i = 1 : Nm
if R(i) > PFR
f2(i) = 0;
else
f2(i) = 1;
end
end
%% for f3
f3 = ones(1 Nm);% I don‘t know how to specify this arg...
%% for f4
% specify the maxmum of attack distance
Dm = 10; % maybe some target escape....because of mine net is random...need optimization
% specify target points random
% Tx = Lm * rand(Tn 1);
% Ty = Wm * rand(Tn 1);
% specify speed of Target real trace
% vx = 10; % x direction speed 10m/s
% vy = 10; % y direction speed 10/s
% % v = sqrt(vx^2 + vy^2);
% T = 0.5; % Radar scanning period in second
% Tx_1 = 1; % first scanned location of target x
% Ty_1 = 1; % first scanned location of target y
% % because (0 0) is used....for indicating escape
% Tx = Tx_1 : vx*T : Lm; % trace x
% Ty = Ty_1 : vy*T : Wm; % trace y
% Note that mine fields is square other shapes will be not compatible
% Tn = length(Tx);
T = 50;
mont = 5;
d = 50;
totalTime = 800;
[x1y1zxzyXXEYYEXERBYERBXSTDYSTD]=IMM(TmontdtotalTime);
x1 = (x1/35 - 1500/35)*2;
y1 = (y1/180 + 8000/180)*2;
zx = (zx/35 - 1500/35)*2;
zy = (zy/180 + 8000/180)*2;
XXE = (XXE/35 - 1500/35)*2;
YYE = (YYE/180 + 8000/180)*2;
Tn = totalTime/T;
Tx = zx;
Ty = zy;
% compute the range of target and each mine
D = zeros(Tn Nm);
for j = 1 : Tn
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3378 2013-11-08 18:27 immkf.m
文件 1181 2013-11-08 18:27 realTrack.m
文件 6554 2013-11-11 10:58 fight_v20130512_2.m
文件 1399 2013-11-08 18:27 IMM.m
文件 771 2013-11-13 11:19 IMM.rar
----------- --------- ---------- ----- ----
13283 5
评论
共有 条评论