• 大小: 16KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-01-07
  • 语言: Matlab
  • 标签: MPC  Carsim  

资源简介

本资源是关于用MPC算法来搭建Carsim/Simulink模型进行仿真,其中包含重要的MPC算法的m文件,内有对相关重要代码有具体的说明,适合初学者。

资源截图

代码片段和文件信息

function [sysx0strts] = MyMPC_v1(txuflag)
%   该函数是写的第3个S函数控制器(MATLAB版本:R2011a)
%   限定于车辆运动学模型,控制量为速度和前轮偏角,使用的QP为新版本的QP解法
%   [sysx0strts] = MY_MPCController3(txuflag)
%
% is an S-function implementing the MPC controller intended for use
% with Simulink. The argument md which is the only user supplied
% argument contains the data structures needed by the controller. The
% input to the S-function block is a vector signal consisting of the
% measured outputs and the reference values for the controlled
% outputs. The output of the S-function block is a vector signal
% consisting of the control variables and the estimated state vector
% potentially including estimated disturbance states.

switch flag
 case 0
  [sysx0strts] = mdlInitializeSizes; % Initialization

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件       47490  2020-05-02 15:17  LKA_MPC_v1.mdl
     文件        7762  2020-05-08 20:06  MyMPC_v1.m

评论

共有 条评论