資源簡介
車輛ACC巡航的模型預測控制實現方法,matlab語言,mpc應用

代碼片段和文件信息
%?checkInputs
%???This?script?checks?all?input?parameters?to?make?sure?they?satisfy?all
%???implicit?constraints?and?are?diensionally?accurate.
%
%?Author?:?Ajinkya?Khade?askhade@ncsu.edu
%%?Constraint?Size?Check
%?This?check?has?been?built?in?to?ensure?the?code?is?scalable?for?different
%?input?sizes.?Currently?it?doesn‘t?have?much?utility?since?input?size?is?1
if?(size(umin)?~=?[nu?1])?|?(size(umax)?~=?[nu?1])
????error(‘checkInputs:InputConstraintSizeChk‘?‘Umax?and?Umin?must?have?same?size?as?input?vector.‘);
end
%%?Horizon?Values?Check
%?Control?Horizon?must?be?shorter?than?or?equal?to?Prediction?Horizon
if?Nc?>?Np
????error(‘checkInputs:HorizonValChk‘?‘Nc?can?not?be?smaller?than?Np‘);
end
%?Total?duration?of?prediction?horizon?should?not?be?greater?than?the?total
%?simulation?duration.
if?Np*ts?>?tsim
????error(‘checkInputs:HorizonValChk‘?‘Prediction?horizon?must?be?shorter?than?simulation?duration.‘);
end
%%?Weights?Size?Check
if?(size(Q)?~=?size(phi))?|?(size(S)?~=?size(phi))
????error(‘checkInputs:WeightSizeChk‘?‘Q?and?S?matrices?must?have?same?size?as?state?matrix?phi‘);
end
if?(size(R)?~=?[nu?nu])
????error(‘checkInputs:WeightSizeChk‘?‘R?matrix?must?have?same?size?as?number?of?inputs.‘);
end
%%?Parameter?Value?Check
if?~ismember(sivdMode?[01])
????error(‘checkInputs:sivdModeValChk‘?‘sivdMode?value?must?be?0?or?1.‘);
end
if?~ismember(ineqMode?[012])
????error(‘checkInputs:ineqModeValChk‘?‘ineqMode?value?must?be?0?1?or?2.‘);
end
if?~ismember(eqMode?[01])
????error(‘checkInputs:eqModeValChk‘?‘eqMode?value?must?be?0?or?1.‘);
end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-11-05?06:56??ACC_Vehicle_MPC-20191104\
?????文件?????1350051??2016-02-22?06:47??ACC_Vehicle_MPC-20191104\ECE.726.-.Project.Report.-.Redacted.pdf
?????文件???????11357??2016-02-22?06:47??ACC_Vehicle_MPC-20191104\LICENSE
?????文件????????1637??2016-02-22?06:47??ACC_Vehicle_MPC-20191104\checkInputs.m
?????文件?????????523??2016-02-22?06:47??ACC_Vehicle_MPC-20191104\genCompMat.m
?????文件????????1419??2016-02-22?06:47??ACC_Vehicle_MPC-20191104\genConstraints.m
?????文件????????3220??2016-02-22?06:47??ACC_Vehicle_MPC-20191104\genPlots.m
?????文件?????????956??2016-02-22?06:47??ACC_Vehicle_MPC-20191104\getXref.m
?????文件?????????431??2016-02-22?06:47??ACC_Vehicle_MPC-20191104\getsivd.m
?????文件????????1397??2016-02-22?06:47??ACC_Vehicle_MPC-20191104\main.m
?????文件????????2812??2016-02-22?06:47??ACC_Vehicle_MPC-20191104\mpcSim.m
?????文件???????????0??2019-11-05?06:56??ACC_Vehicle_MPC-20191104\new.txt
?????文件????????3136??2016-02-22?06:47??ACC_Vehicle_MPC-20191104\plotAbsolute.m
?????文件????????1902??2016-02-22?06:47??ACC_Vehicle_MPC-20191104\plotCost.m
?????文件????????2898??2016-02-22?06:47??ACC_Vehicle_MPC-20191104\readme.md
?????文件????????4121??2016-02-22?06:47??ACC_Vehicle_MPC-20191104\setup.m
?????文件????????1696??2016-02-22?06:47??ACC_Vehicle_MPC-20191104\wrapper.m
評論
共有 條評論