資源簡介
模型預(yù)測控制(MPC)是一類特殊的控制。它的當(dāng)前控制動作是在每一個(gè)采樣瞬間通過求解一個(gè)有限時(shí)域開環(huán)最優(yōu)控制問題而獲得。過程的當(dāng)前狀態(tài)作為最優(yōu)控制問題的初始狀態(tài),解得的最優(yōu)控制序列只實(shí)施第一個(gè)控制作用。這是它與那些使用預(yù)先計(jì)算控制律的算法的最大不同。本質(zhì)上模型預(yù)測控制求解一個(gè)開環(huán)最優(yōu)控制問題。它的思想與具體的模型無關(guān),但是實(shí)現(xiàn)則與模型有關(guān)

代碼片段和文件信息
load?step_model;
load?unconstrained_MPC
%--------無噪聲情況-----------%
Kmpc=mpccon(modelywuwMP);
[yu]=mpcsim(plantmodelKmpctendr);
%------與噪聲相關(guān)的參數(shù)-------%
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(222);
plot(0:Ts:tendy(:1)‘--‘);
hold?on;
plot(0:Ts:tendy2(:1)‘r‘);
grid?on;
xlabel(‘time(s)‘);
legend(‘未加白噪聲‘‘加入白噪聲‘);
title(‘Output?方差10‘);
subplot(223);
plot(0:Ts:tendu‘--‘);
hold?on;
plot(0:Ts:tendu1‘r‘);
grid?on;
legend(‘未加白噪聲控制量‘‘加入白噪聲控制量‘);
xlabel(‘time(s)‘);
title(‘Manipulated?Variables?方差0.1‘);?
subplot(224);
plot(0:Ts:tendu‘--‘);
hold?on;
plot(0:Ts:tendu2‘r‘);
grid?on;
legend(‘未加白噪聲控制量‘‘加入白噪聲控制量‘);
xlabel(‘time(s)‘);
title(‘Manipulated?Variables?方差10‘);?
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2014-03-21?15:22??MPC程序\
?????目錄???????????0??2014-03-21?15:20??MPC程序\無約束1\
?????文件????????1416??2014-02-23?14:41??MPC程序\無約束1\noise.m
?????文件?????????256??2014-02-23?14:41??MPC程序\無約束1\step_model.m
?????文件?????2403161??2014-02-23?14:42??MPC程序\無約束1\step_model.mat
?????文件?????1169443??2014-02-23?14:42??MPC程序\無約束1\unconstrained_MPC.mat
?????文件????????1912??2014-02-23?14:42??MPC程序\無約束1\unconstrained_m.m
?????文件????????1935??2014-02-23?14:42??MPC程序\無約束1\unconstrained_p.m
?????文件????????1888??2014-02-23?14:42??MPC程序\無約束1\unconstrained_uw.m
?????文件????????1916??2014-02-23?14:42??MPC程序\無約束1\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
評論
共有 條評論