資源簡介
一個非線性模型預測控制程序,初學者入門的好資料,值得下載參考
代碼片段和文件信息
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%?This?program?implements?a?controller?that?uses?a?planning
%?strategy?for?the?surge?tank?example.
%
%?Kevin?Passino
%?Version:?4/19/01
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%?Initialize?variables
clear
%?Set?the?length?of?the?simulation
Nnc=300;
T=0.1;??????%?Sampling?rate
%?As?a?reference?input?we?use?a?square?wave?(define?one?extra?
%?point?since?at?the?last?time?we?need?the?reference?value?at
%?the?last?time?plus?one)
timeref=1:Nnc;
r(timeref)=3.25-3*square((2*pi/150)*timeref);?%?A?square?wave?input
%r(timeref)=3.25*ones(1Nnc+1)-3*(2*rand(1Nnc+1)-ones(1Nnc+1));?%?A?noise?input
ref=r(1:Nnc);??%?Then?use?this?one?for?plotting
time=1:Nnc;
time=T*time;?%?Next?ma
- 上一篇:道路中心線檢測
- 下一篇:matlab橋式逆變
評論
共有 條評論