ACC_Vehicle_MPC-20191104.zip


车辆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-20191104ECE.726.-.Project.Report.-.Redacted.pdf
     文件       11357  2016-02-22 06:47  ACC_Vehicle_MPC-20191104LICENSE
     文件        1637  2016-02-22 06:47  ACC_Vehicle_MPC-20191104checkInputs.m
     文件         523  2016-02-22 06:47  ACC_Vehicle_MPC-20191104genCompMat.m
     文件        1419  2016-02-22 06:47  ACC_Vehicle_MPC-20191104genConstraints.m
     文件        3220  2016-02-22 06:47  ACC_Vehicle_MPC-20191104genPlots.m
     文件         956  2016-02-22 06:47  ACC_Vehicle_MPC-20191104getXref.m
     文件         431  2016-02-22 06:47  ACC_Vehicle_MPC-20191104getsivd.m
     文件        1397  2016-02-22 06:47  ACC_Vehicle_MPC-20191104main.m
     文件        2812  2016-02-22 06:47  ACC_Vehicle_MPC-20191104mpcSim.m
     文件           0  2019-11-05 06:56  ACC_Vehicle_MPC-20191104
ew.txt
     文件        3136  2016-02-22 06:47  ACC_Vehicle_MPC-20191104plotAbsolute.m
     文件        1902  2016-02-22 06:47  ACC_Vehicle_MPC-20191104plotCost.m
     文件        2898  2016-02-22 06:47  ACC_Vehicle_MPC-20191104
eadme.md
     文件        4121  2016-02-22 06:47  ACC_Vehicle_MPC-20191104setup.m
     文件        1696  2016-02-22 06:47  ACC_Vehicle_MPC-20191104wrapper.m

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)