当前位置:网站首页>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
边栏推荐
- TiDB 中的SQL 基本操作
- 乐观事务和悲观事务
- thrift
- [QT dot] realize the watchdog function to detect whether the external program is running
- 飞行器翼尖加速度和控制面的MPC控制
- 爬虫学习5---反反爬之识别图片验证码(ddddocr和pytesseract实测效果)
- 记一次Spark报错:Failed to allocate a page (67108864 bytes), try again.
- Gaussian distribution, linear regression, logistic regression
- 0.0.0.0:x的含义
- 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
猜你喜欢

The fourth question of the 299th weekly match 6103 Minimum fraction of edges removed from the tree

Yaml file encryption

Convolution neural network -- Application of CNN model (ore prospecting prediction)

Run opcua protocol demo on raspberry pie 4B to access kubeedge

Centos7.9安装mysql 5.7,并设置开机启动

0.0.0.0:x的含义

快速实现蓝牙iBeacn功能详解

观测电机转速转矩

427-二叉树(617.合并二叉树、700.二叉搜索树中的搜索、98. 验证二叉搜索树、530.二叉搜索树的最小绝对差)

matlab GUI界面仿真直流电机和交流电机转速仿真
随机推荐
乐观事务和悲观事务
Instance tunnel use
Run opcua protocol demo on raspberry pie 4B to access kubeedge
日期 数据库日期 字符串 之间互相转换
Redis 缓存穿透、缓存击穿、缓存雪崩
TiDB与 MySQL 兼容性对比
块级元素&行内元素
Sqlsever 字段相乘后保留2位小数
Inter thread wait and wake-up mechanism, singleton mode, blocking queue, timer
The SCP command is used in the expect script. The perfect solution to the problem that the SCP command in the expect script cannot obtain the value
JS to implement bidirectional data binding
0.0.0.0:x的含义
Scala advanced_ Member access modifier
JVM常用指令
Gaussian distribution, linear regression, logistic regression
写一个 goroutine 实例, 同时练习一下 chan
路由器和交换机的区别
[QT notes] basic use of qregularexpression in QT
Caldera安装及简单使用
【QT小记】QT元对象系统简单认识