• 大小: 6.53M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-03-11
  • 语言: Matlab
  • 标签: MPC  MATLAB  无约束MPC  

资源简介

MPC在Matlab上的使用,包括有约束和无约束

资源截图

代码片段和文件信息

load step_model;
load unconstrained_MPC
%--------无噪声情况-----------%
Kmpc=mpccon(modelywuwMP);
[yu]=mpcsim(plantmodelKmpctendr);
%------与噪声相关的参数-------%
usat=[];
tfilter=[];
dplant=model;
dmodel=model;
%----------生成白噪声---------%
n=randn(tend/Ts1);
n=n-mean(n);
n=n/std(n);
a=0; b=sqrt(0.1);
n=a+b*n;%零均值,方差为0.1
dstep=n;
[y1u1]=mpcsim(plantmodelKmpctendrusattfilterdplantdmodeldstep);
%----------生成白噪声---------%
n=randn(tend/Ts1);
n=n-mean(n);
n=n/std(n);
a=0; b=sqrt(10);
n=a+b*n;%零均值,方差为10
dstep=n;
[y2u2]=mpcsim(plantmodelKmpctendrusattfilterdplantdmodeldstep);
subplot(221);
plot(0:Ts:tendy(:1)‘--‘);
hold on;
plot(0:Ts:tendy1(:1)‘r‘);
grid on;
xlabel(‘time(s)‘);
legend(‘未加白噪声输出‘‘加入白噪声输出‘);
title(‘Output 方差0.1‘);
subplot(2

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-03-21 15:22  MPC程序\
     目录           0  2014-03-21 15:20  MPC程序\无约束\
     文件        1416  2014-02-23 14:41  MPC程序\无约束\noise.m
     文件         256  2014-02-23 14:41  MPC程序\无约束\step_model.m
     文件     2403161  2014-02-23 14:42  MPC程序\无约束\step_model.mat
     文件     1169443  2014-02-23 14:42  MPC程序\无约束\unconstrained_MPC.mat
     文件        1912  2014-02-23 14:42  MPC程序\无约束\unconstrained_m.m
     文件        1935  2014-02-23 14:42  MPC程序\无约束\unconstrained_p.m
     文件        1888  2014-02-23 14:42  MPC程序\无约束\unconstrained_uw.m
     文件        1916  2014-02-23 14:42  MPC程序\无约束\unconstrained_yw.m
     目录           0  2014-03-21 15:20  MPC程序\约束\
     文件        1782  2014-02-23 14:42  MPC程序\约束\cmpcQP.m
     文件        1758  2014-02-23 14:42  MPC程序\约束\cmpcQP_m.m
     文件        1735  2014-02-23 14:42  MPC程序\约束\cmpcQP_yw.m
     文件        1910  2014-02-23 14:42  MPC程序\约束\cmpcQPnoise.m
     文件        2393  2014-02-23 14:42  MPC程序\约束\compare.m
     文件     2327554  2014-02-23 14:43  MPC程序\约束\dstatespace.mat
     文件        1410  2014-02-23 14:42  MPC程序\约束\genQP.m
     文件         392  2014-02-23 14:42  MPC程序\约束\get_F.m
     文件         243  2014-02-23 14:42  MPC程序\约束\state_model_c2d.m
     文件      939731  2014-02-23 14:43  MPC程序\约束\step_model.mat

评论

共有 条评论