资源简介
平面内的导弹制导律模拟程序,用Matlab写的,方便理解导弹制导的简单概念
代码片段和文件信息
clear;
dt=0.001;% time step
g=9.80665;% acceleration of gravity
n=zeros(3100);% vertical overload
%% method of three-points
% angle between velocity and station-missile-target line
sigma_m=zeros(1100);sigma_m(1)=pi/6;
sigma_t=pi;
% velocity
v_m=1000;
v_t=500;
% distance to station
r_m=zeros(1100);
r_t=zeros(1100);r_t(1)=10000;
% angel between the station-missile-target line and the level
q=zeros(1100);q(1)=pi/6;
coor_m=zeros(2100);% coordinate of missile
coor_m(11)=r_m(1)*cos(q(1));
coor_m(21)=r_m(1)*sin(q(1));
coor_t=zeros(2100);% coordinate of target
coor_t(11)=r_t(1)*cos(q(1));
coor_t(21)=r_t(1)*sin(q(1));
t=1;
while abs(r_m(t)-r_t(t))>1e-1
r_m(t+1)=v_m*cos(sigma_m(t)-q(t))*dt+r_m(t);
r_t(t+1)=v_t*cos(sigma_t-q(t))*dt+r_t(t);
q(t+1)=v_t/r_t(t)*sin(sigma_t-q(t))*dt+q(t);
sigma_m(t+1)=asin((v_t*r_m)/(v_m*r_t)*sin(sigma_t-q(t+1)))+q(t+1);
% calculate the coordinate and vertical overload
n(1t)=v_m*(sigma_m(t+1)-sigma_m(t))/g;
t=t+1;
coor_m(1t)=r_m(t)*cos(q(t));
coor_m(2t)=r_m(t)*sin(q(t));
coor_t(1t)=r_t(t)*cos(q(t));
coor_t(2t)=r_t(t)*sin(q(t));
end
figure(1);
subplot(211);
plot(coor_m(1:)coor_m(2:)...
‘Color‘‘blue‘);%locus of missile
hold on;
plot(coor_t(1:)coor_t(2:)...
‘Color‘‘red‘);% locus of target
title(‘三点法轨迹‘);
subplot(212);
plot(n(1:));
title(‘法向过载‘);
%% tracking method
clear q sigma_m r_m r_t;
% angel between missile-target line and the level
q=zeros(1100);q(1)=pi/6;
sigma_m=zeros(1100);sigma_m(1)=pi/6;
% distance between the target and missile
r=zeros(1100);r(1)=10000;
r_m=zeros(1100);
r_t=zeros(1100);r_t(1)=10000;
% angle between r_m/r_t and the level
q_m=zeros(1100);q_m(1)=pi/6;
q_t=zeros(1100);q_t(1)=pi/6;
clear coor_m;
coor_m=zeros(2100);
coor_m(11)=r_m(1)*cos(q_m(1));
coor_m(21)=r_m(1)*sin(q_m(1));
clear coor_t;
coor_t=zeros(2100);
coor_t(11)=r_t(1)*cos(q_t(1));
coor_t(21)=r_t(1)*sin(q_t(1));
t=1;
while r(t)>1e-1
r(t+1)=(v_t*cos(sigma_t-q(t))-v_m)*dt+r(t);
q(t+1)=v_t/r(t)*sin(sigma_t-q(t))*dt+q(t);
sigma_m(t+1)=q(t+1);
% calculate the coordinate in the station‘s
n(2t)=v_m*(sigma_m(t+1)-sigma_m(t))/g;
r_m(t+1)=v_m*cos(sigma_m(t)-q_m(t))*dt+r_m(t);
r_t(t+1)=v_t*cos(sigma_t-q_t(t))*dt+r_t(t);
q_m(t+1)=v_m/r_m(t+1)*sin(sigma_m(t)-q_m(t))*dt+q_m(t);% care r_m(1)
q_t(t+1)=v_t/r_t(t)*sin(sigma_t-q_t(t))*dt+q_t(t);
t=t+1;
coor_m(1t)=r_m(t)*cos(q_m(t));
coor_m(2t)=r_m(t)*sin(q_m(t));
coor_t(1t)=r_t(t)*cos(q_t(t));
coor_t(2t)=r_t(t)*sin(q_t(t));
end
figure(2);
subplot(211);
plot(coor_m(1:)coor_m(2:)...
‘Color‘‘blue‘);%locus of missile
hold on;
plot(coor_t(1:)coor_t(2:)...
‘Color‘‘red‘);% locus of target
title(‘跟踪法轨迹‘);
subplot(212);
plot(n(2:));
title(‘法向过载‘);
%% proportion method
% the proportion
k=6;
clear q sigma_m r_m r_t;
% angel between missi
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4543 2011-12-25 11:05 control_exp_missile.m
相关资源
- Matlab计算遥感图像熵,清晰度和相关
- MATLAB实现的欧式聚类,多种子点区域
- 英国设菲尔德Sheffield大学的MATLAB遗传
- LDPC的BP译码matlab仿真
- OTSU算法的matlab实现
- 三分之一倍频程matlab
- 龙格库塔法求解延时微分方程matlab
- 曲波去噪matlab代码
- ISAR转台成像matlab程序
- 基于stretch处理的雷达抗距离-速度同步
- 基于Matlab+gui的数字滤波器设计与实现
- Matlab求解动态规划问题
- 利用加法实现图像双曝光效果
- 基于Matlab的QoS组播路由问题的蚁群算
- 人脸分割程序
- 基于LSB水印与DCT水印的比较与实现
- LCMV准则波束形成
- 关于多元统计中有序聚类的matlab编程
- mimo ofdm无线通信技术及matlab实现 源代
- 三相锁相matlab PLL
- 干涉SAR的MATLAB程序.zip
- 改进的区域增长算法matlab实现
- 分数阶傅里叶变换fractional fourier tra
- matlab版的信息增益算法实现
- 数值迭代算法及其Matlab
- sift+ransac图像拼接matlab代码
- matlab下单层感知器实现
- MATLAB进行FM调制与解调
- PCA故障诊断MATLAB实现
- turbo码matlab仿真程序 wuyufei
评论
共有 条评论