✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。
🍎个人主页:Matlab科研工作室
🍊个人信条:格物致知。
更多Matlab仿真内容点击👇
⛄ 内容介绍
为了在Matlab下实现小型无人机沿预设航路飞行的过程仿真,本文根据无人机飞行的控制回路和制导回路,利用M语言编写函数,设计了模块化,易维护的仿真软件,完成了Matlab下的航线飞行仿真.利用仿真软件对无人机的控制规律和制导规律进行了仿真验证,结果表明了所设计的控制规律和制导规律的合理性和正确性,以及航线仿真软件的实用性.
⛄ 部分代码
% test fuel consumption
clc, clear all; close all;
%% Load Files
load_unit_conversion
load_requirements
uav_params
load_enviro_parameters
%% Initial guess of take-off weight
% W_TO = 48.5; %initial weight guess of a/c (lbs)
W_TO = 65.2; %initial weight guess of a/c (lbs)
%% Drag Calculation
% INPUT PARAMETERS for cacl_drag.m
M = 0.0595760168; %Mach number
S_ref = wing.S;
% rho = rho_avg;
% calc_drag % calculate drag
%% Power Calculation
% calc_engn
engn.HP = 5.2; %engine horse power (selected from engine)
%% Propeller Sizing
calc_propeller
P_avail = engn.HP*prop.eta_p; % Power available
%% Fuel Calculation
W_i = W_TO;
E = [5*60 1*3600 2*3600]; %[sec]
fuel.cp = 4.2929e-07; %[1/ft] specific fuel consumption
% climb
rho = rho_avg;
v_drag = sqrt((76^2+132^2)/2);
calc_drag
[W_final(1) W_fuel(1)] = endu2W_fuel(W_i, prop.eta_p, E(1), fuel.cp, DRAG.C_L, DRAG.C_Dt, rho, S_ref);
% high alt scan
rho = rho_high;
v_drag = 132;
calc_drag
[W_final(2) W_fuel(2)] = endu2W_fuel(W_final(1), prop.eta_p, E(2), fuel.cp, DRAG.C_L, DRAG.C_Dt, rho, S_ref);
% low alt loiter
rho = rho_low;
v_drag = 76;
calc_drag
[W_final(3) W_fuel(3)] = endu2W_fuel(W_final(2), prop.eta_p, E(3), fuel.cp, DRAG.C_L, DRAG.C_Dt, rho, S_ref);
%sum of predicted fuel use
W_fuel_total = sum(W_fuel);
⛄ 运行结果
编辑
编辑
⛄ 参考文献
[1]刘婕, 易生勇. 基于Matlab/Simulink的无人机飞行仿真研究[J]. 自动化信息, 2012(8):2.
[2]马博, 代丹丹, 潘江如. 基于MATLAB的无人机飞行稳定性影响因素回归分析与研究[J]. 精密制造与自动化, 2017(2):4.
⛳️ 完整代码
❤️部分理论引用网络文献,若有侵权联系博主删除
❤️ 关注我领取海量matlab电子书和数学建模资料