当前位置:网站首页>MPC control of aircraft wingtip acceleration and control surface
MPC control of aircraft wingtip acceleration and control surface
2022-06-27 06:34:00 【studyer_ domi】
1、 Content abstract
A little
372- Can communicate 、 consulting 、 Answering question
2、 Content description
clc
close all
clear
% Open file
path = pwd;
pathFull = strcat(path,'\ System state space ');
addpath(pathFull);
fid = fopen('180.DAT');
disp(['Read file ' '180.DAT'])
% Read and display the header
head=fgetl(fid); disp(head)
V=str2num(head(36:46)); ro=str2num(head(56:66));
% Read dimensions
tmp=fgetl(fid); tmp=sscanf(tmp,'%i');
if length(tmp)==1
n=tmp(1); m=0; l=0;
elseif length(tmp)==3
n=tmp(1); m=tmp(2); l=tmp(3);
else
disp(['FATAL ERROR: File ' filename ' corupt.']); return
end
% Read state-space matrices
ABCD = zeros(n+l,n+m);
ABCD = fscanf(fid,'%g',[n+l,n+m]);
A=ABCD(1:n,1:n);
B=ABCD(1:n,n+1:n+m);
C=ABCD(n+1:n+l,1:n);
D=ABCD(n+1:n+l,n+1:n+m);
% Read gain matrix
if head(74:80)=='VEHICLE'
fgetl(fid);line = fgetl(fid);
G = fscanf(fid,'%g',[m,l]);
else
G = [];
end
% Read gust state-space matrices
%
fgetl(fid);line = fgetl(fid);
if ~isstr(line)
Bw=[]; CG=[]; return
else
nG2= fscanf(fid,'%g',1);
Bw = fscanf(fid,'%g',[n,nG2]);
end
fgetl(fid);line = fgetl(fid);
if ~isstr(line), CG=[]; return,
else CG = fscanf(fid,'%g',[l,nG2]);
end
% %% establish MPC Model
% sys = ss(A,B,C,D);
% Ts=0.05; % Sampling time
% p=15; % Predicted time domain length
% m=2; % Control the time domain length
% MPC1=mpc(sys,Ts,p,m); % Definition M1 and M2 The separation of MPC Model
% % Set limits ,F The size of cannot be 0,F The absolute value of slope is the maximum 1000
% MPC1.MV=struct('Min',-1,'Max',1,'RateMin',-1e2,'RateMax',1e2);
% MPC1.OV=struct('Min',-1000,'Max',1000);
% MPC1.OV.MaxECR=1;
%% establish MPC Model
close all
clc
% sys = ss(A,B,C,D);
% Ts=0.05; % Sampling time
% p=15; % Predicted time domain length
% m=5; % Control the time domain length
% MPC1=mpc(sys,Ts,p,m); % Definition M1 and M2 The separation of MPC Model
% % Set limits ,F The size of cannot be 0,F The absolute value of slope is the maximum 1000
% MPC1.MV=struct('Min',-1,'Max',1,'RateMin',-1e1,'RateMax',1e1);
% MPC1.OV=struct('Min',-1000,'Max',1000);
% MPC1.OV.MaxECR=1;
sys = ss(A,B,C,D);
Ts=0.05; % Sampling time
p=15; % Predicted time domain length
m=5; % Control the time domain length
MPC1=mpc(sys,Ts,p,m); % Definition M1 and M2 The separation of MPC Model
% Set limits ,F The size of cannot be 0,F The absolute value of slope is the maximum 1000
MPC1.MV=struct('Min',-1,'Max',1,'RateMin',-1e1,'RateMax',1e1);
MPC1.OV=struct('Min',-10,'Max',10);
MPC1.OV.MaxECR=1;
in = 10;
sim('model_mpc1.slx')
figure
plot(tout,yout(:,1))
xlabel Time /s
ylabel Wingtip acceleration sensor
figure
plot(tout,yout(:,2),tout,yout(:,3))
xlabel Time /s
ylabel Control the deflection angle of the face
3、 Simulation analysis

4、 Reference paper
A little
边栏推荐
猜你喜欢

飞行器翼尖加速度和控制面的MPC控制

0.0.0.0:x的含义

yaml文件加密

426 binary tree (513. find the value in the lower left corner of the tree, 112. sum of paths, 106. construct a binary tree from the middle order and post order traversal sequence, 654. maximum binary

块级元素&行内元素

Crawler learning 5--- anti crawling identification picture verification code (ddddocr and pyteseract measured effect)

Dev++ environment setting C language keyword display color

JVM class loading mechanism

多线程带来的的风险——线程安全

快速实现单片机和手机蓝牙通信
随机推荐
JVM的垃圾回收机制
Assembly language - Wang Shuang Chapter 13 int instruction - Notes
Code is data
[QT dot] realize the watchdog function to detect whether the external program is running
POI 替换docx中的文字和图片
Functional continuous
Force buckle 179, max
JVM整体结构解析
Multithreading basic Part3
Thesis reading skills
AHB2APB桥接器设计(2)——同步桥设计的介绍
高斯分布Gaussian distribution、线性回归、逻辑回归logistics regression
JVM tuning ideas
Assembly language - Wang Shuang Chapter 8 two basic problems in data processing - Notes
多线程带来的的风险——线程安全
One year's experience of technical personnel in Entrepreneurship
IDEA一键生成Log日志
技术人员创业一年心得
vscode korofileheader 的配置
研究生数学建模竞赛-无人机在抢险救灾中的优化应用