matlab导弹运动仿真教程,
1导言
对于大气层内飞行的导弹来说,要使其准确飞行,首要任务是保持姿态稳定。导弹姿态控制系统是导弹飞行成败的关键系统之一。姿态控制过程和方法一直备受关注,在导弹设计、使用和储存的整个生命周期中具有重要意义。在此背景下,本文研究了大气层内导弹的姿态控制方法。
首先建立一系列描述导弹在大气中飞行特性的坐标系,包括弹体坐标系、地面惯性坐标系、速度坐标系和弹道坐标系,然后推导出这些坐标系之间的变量转换关系。然后推导了导弹在大气层中的动力学方程、运动学方程、攻角和侧滑角计算模型、弹道倾角和弹道偏角计算模型、气动力模型、气动力力矩模型和重力模型,由上述模型得到导弹姿态控制系统的数学模型。由于大气层内导弹姿态控制的数学模型是强耦合、非线性的,所以首先对其进行解耦线性化,然后设计控制器。本文在小扰动假设下,利用线性化方法建立了各通道的传递函数。然后,采用PD控制方法设计三个通道的控制律,使导弹在要求的时间内到达目标姿态。最后,设计了MATLAB仿真程序对控制律进行了验证,并对仿真结果进行了分析。
仿真结果表明,在对导弹大气姿态控制模型进行线性化和各通道解耦后,应用PD控制方法设计控制律,可以使系统快速稳定地达到目标姿态。
第二部分代码clc清晰;
% -
Jx=2.95Jy=168.2Jz=168.2
m=300S=0.0616L=0.3
=1.2;g=9.8
i=10000
ii=I/10;
t=零(1,ii-1);dt=0.001
h=pi/180;k=180/;
%-初始位置参数的定义- %。
x=零(1,I);y=零(1,I);z=零(1,I);
y(1)=30000;
% -
v=零(1,I);Vx=零(1,I);Vy=zeros(1,I);Vz=零(1,I);
v(1)=2275;VX(1)=2275;
%-初始弹道参数的定义- %。
=零(1,I);psiv=零(1,I);gammav=zeros(1,I);
(1)=(40 * pi)/180;
% -
htheta=zeros(1,I);psi=零(1,I);伽马=零(1,I);
H theta(1)=40 * H;psi(1)=0 * H;伽马(1)=5 * H;
htheta0=50 * Hpsi0=10 * H;0=0 * H;
% -
deltax=零(1,I);deltay=零(1,I);deltaz=零(1,I);
% -
omegax=zeros(1,I);omegay=zeros(1,I);omegaz=zeros(1,I);
% -定义迎角/侧滑角。
alpha=零(1,I);=零(1,I);dal PHA=0;dbeta=0;
%-定义空气动力和空气动力力矩- %
x=零(1,I);y=零(1,I);z=零(1,I);
Mx=零(1,I);My=zeros(1,I);Mz=零(1,I);
% -
kpx=-1.5;kdx=-0.018;
kpy=-1.5;kdy=-0.05;
kpz=-1.8;kdz=-0.05;
%-定义绘图数组-
hthetat=zeros(1,ii-1);psit=零(1,ii-1);gammat=零(1,ii-1);
omegaxt=zeros(1,ii-1);omegayt=zeros(1,ii-1);omegazt=zeros(1,ii-1);
xt=零(1,ii-1);yt=零(1,ii-1);zt=零(1,ii-1);
Mxt=零(1,ii-1);Myt=zeros(1,ii-1);Mzt=零(1,ii-1);
deltaxt=零(1,ii-1);deltayt=zeros(1,ii-1);deltazt=零(1,ii-1);
% -
B=[-6,-4,-2,0,2,4,6];
a=[-6;-4;-2;0;2;3;4;6;8;10];
CX=[0.926,0.750,0.636,0.583,0.614,0.722,0.888;0.758,0.596,0.511,0.468,0.489,0.570,0.726;
0.644,0.504,0.426,0.398,0.411,0.487,0.614;0.602,0.477,0.399,0.367,0.390,0.458,0.574;
0.650,0.508,0.428,0.410,0.415,0.502,0.627;0.699,0.547,0.463,0.434,0.449,0.533,0.674;
0.762,0.601,0.512,0.471,0.497,0.585,0.739;0.921,0.749,0.628,0.578,0.613,0.735,0.902;
1.136,0.949,0.817,0.763,0.800,0.934,1.115;1.405,1.212,1.080,1.029,1.067,1.200,1.388];
CY=[-2.694,-2.563,-2.426,-2.351,-2.427,-2.605,-2.686;-1.854,-1.710,-1.642,-1.593,-1.618,-1.711,-1.800;
-0.920,-0.818,-0.802,-0.794,-0.797,-0.798,-0.873;0.034,0.036,0.015,0.033,0.009,0.004,0.031;
0.930,0.894,0.868,0.808,0.802,0.836,0.928;1.373,1.331,1.275,1.190,1.233,1.257,1.340;
1.825,1.751,1.685,1.566,1.633,1.715,1.787;2.704,2.647,2.460,2.344,2.428,2.583,2.677;
3.411,3.458,3.365,3.276,3.312,3.397,3.392;4.175,4.292,4.283,4.241,4.218,4.263,4.181];
CZ=[2.703,1.833,0.932,0,-0.932,-1.833,-2.703;2.619,1.753,0.880,0,-0.880,-1.753,-2.619;
2.479,1.634,0.846,0,-0.846,-1.634,-2.479;2.447,1.620,0.806,0,-0.806,-1.620,-2.447;
2.513,1.670,0.816,0,-0.816,-1.670,-2.513;2.582,1.693,0.829,0,-0.829,-1.693,-2.582;
2.637,1.719,0.845,0,-0.845,-1.719,-2.637;2.717,1.823,0.931,0,-0.931,-1.823,-2.717;
2.700,1.930,1.000,0,-1.000,-1.930,-2.700;2.775,1.999,1.027,0,-1.027,-1.999,-2.775];
MX=[-0.035,-0.008,0.030,0,-0.030,0.008,0.035;0.027,0.006,0.020,0,-0.020,-0.006,-0.027;
0.021,0.060,0.008,0,-0.008,-0.060,-0.021;0.000,0.000,0.000,0,0.000,0.000,0.000;
-0.017,-0.034,-0.002,0,0.002,0.034,0.017;-0.032,-0.047,0.001,0,-0.001,0.047,0.032;
-0.034,-0.012,0.037,0,-0.037,0.012,0.034;0.014,0.028,0.038,0,-0.038,-0.028,-0.014;
0.022,0.095,0.025,0,-0.025,-0.095,-0.022;0.007,0.195,0.098,0,-0.098,-0.195,-0.007];
MY=[2.096,1.498,0.750,0,-0.750,-1.498,-2.096;1.893,1.314,0.671,0,-0.671,-1.314,-1.893;
1.658,1.126,0.612,0,-0.612,-1.126,-1.658;1.612,1.138,0.530,0,-0.530,-1.138,-1.612;
1.763,1.224,0.564,0,-0.564,-1.224,-1.763;1.873,1.223,0.545,0,-0.545,-1.223,-1.873;
2.010,1.291,0.612,0,-0.612,-1.291,-2.010;2.257,1.549,0.810,0,-0.810,-1.549,-2.257;
2.398,1.838,0.988,0,-0.988,-1.838,-2.398;2.729,2.137,1.126,0,-1.126,-2.137,-2.729];
MZ=[2.320,2.042,1.857,1.738,1.848,2.083,2.243;1.617,1.287,1.216,1.243,1.192,1.260,1.456;
0.732,0.501,0.527,0.566,0.519,0.455,0.616;-0.164,-0.181,-0.141,-0.147,-0.132,-0.130,-0.182;
-0.964,-0.898,-0.840,-0.751,-0.729,-0.787,-0.956;-1.366,-1.303,-1.186,-1.050,-1.094,-1.166,-1.322;
-1.763,-1.647,-1.525,-1.334,-1.422,-1.579,-1.713;-2.525,-2.469,-2.077,-1.881,-2.011,-2.349,-2.498;
-3.078,-3.052,-2.793,-2.608,-2.734,-2.994,-3.040;-3.690,-3.709,-3.563,-3.438,-3.493,-3.692,-3.699];
% - 循环计算- %
目标
% - 绘图- %
图(1)
图(t/100,hthetat*K)
标题(俯仰角变化曲线)
xlabel(时间)
ylabel(俯仰角)
网格打开
图(二)
图(t/100,psit*K)
标题(偏航角变化曲线)
xlabel(时间)
ylabel(偏航角)
网格打开
图(三)
图(t/100,伽马*K)
标题(滚转角变化曲线)
xlabel(时间)
ylabel(滚转角)
网格打开
图(4)
图(t/100,* K)
标题(角速度变化曲线)
xlabel(时间)
ylabel(滚转角速度)
网格打开
图(五)
图(t/100,* K)
标题(角速度变化曲线)
xlabel(时间)
ylabel(偏航角速度)
网格打开
图(6)
绘图(t/100,omegazt*K)
标题(角速度变化曲线)
xlabel(时间)
ylabel(俯仰角速度)
网格打开
图(7)
图3(zt,xt,yt)
标题(导弹运动轨迹)
xlabel(Z )
zlabel(Y )
ylabel(X )
网格打开
图(8)
绘图(t/100,Mxt)
标题(力矩变化曲线)
xlabel(时间)
ylabel(滚转力矩)
网格打开
图(九)
绘图(t/100,Myt)
标题(力矩变化曲线)
xlabel(时间)
ylabel(偏航力矩)
网格打开
图(10)
绘图(t/100,Mzt)
标题(力矩变化曲线)
xlabel(时间)
ylabel(俯仰力矩)
网格打开
图(11)
绘图(t/100,deltazt)
标题(舵偏角变化曲线)
xlabel(时间)
ylabel(俯仰通道舵偏角)
网格打开
图(12)
绘图(吨/100,增量yt)
标题(舵偏角变化曲线)
xlabel(时间)
ylabel(偏航通道舵偏角)
网格打开
图(13)
绘图(t/100,deltaxt)
标题(“舵角变化曲线”)
Xlabel(时间)
Ylabel(“滚道方向舵偏转角”)
网格3模拟结果
编辑
编辑
编辑
编辑
4参考文献[1]姚宏、周、基于Matlab的弹道导弹姿态控制系统设计与仿真软件研究[J].系统仿真学报,2004,16(11):3。
博主:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等领域的Matlab仿真。相关的matlab代码问题可以私信交流。有些理论引用自网络文献。如有侵权,联系博主删除。
原创作品来自matlab研究助手,
郑重声明:本文由网友发布,不代表盛行IT的观点,版权归原作者所有,仅为传播更多信息之目的,如有侵权请联系,我们将第一时间修改或删除,多谢。