From matlab: Control of a Single-Input-Single-Output Plant

控制系统 

控制主程序

%% Control of a Single-Input-Single-Output Plant
% This example shows how to control a double integrator plant under input
% saturation in Simulink(R).% Copyright 1990-2014 The MathWorks, Inc.%% Define Plant Model
% The linear open-loop dynamic model is a double integrator.
plant = tf(1,[1 0 0]);%% Design MPC Controller
% Create the controller object with sampling period, prediction and control
% horizons.
Ts = 0.1;
p = 10;
m = 3;
mpcobj = mpc(plant, Ts, p, m);%%
% Specify actuator saturation limits as MV constraints.
mpcobj.MV = struct('Min',-1,'Max',1); %% Simulate Using Simulink
% To run this example, Simulink is required.
if ~mpcchecktoolboxinstalled('simulink')disp('Simulink is required to run this example.')return
end%%
% Simulate closed-loop control of the linear plant model in Simulink. The
% MPC Controller block is configured to use the |mpcobj| object as its
% controller.
mdl = 'mpc_doubleint';
open_system(mdl)
sim(mdl)%%
% The closed-loop response shows good setpoint tracking performance.%%
%bdclose(mdl)

车辆纵向控制可以被简化为一个双积分系统(被控系统),表示为:

                                                                        

v和a分别为车辆速度和加速度,j表示车辆加速度的变化率。

Create the controller object with sampling period Ts, prediction p and control horizons m.

Ts = 0.1
p = 10;
m = 3;
mpcobj = mpc(plant, Ts, p, m);
Specify actuator saturation limits as MV constraints.
mpcobj.MV = struct('Min',-1,'Max',1);

Simulate Using Simulink

To run this example, Simulink is required.

if ~mpcchecktoolboxinstalled('simulink')disp('Simulink is required to run this example.')return
end

Simulate closed-loop control of the linear plant model in Simulink. The MPC Controller block is configured to use the mpcobj object as its controller.

mdl = 'mpc_doubleint';
open_system(mdl)
sim(mdl)

初识MPC Toolbox相关推荐

  1. Orfeo ToolBox初探(一)Windows系统下绑定OTB至python3

    文章目录 一.初识Orfeo ToolBox 二.OTB安装 三.python绑定otb模块 3.1 绑定须知 3.2 创建conda虚拟环境 3.3 py3.7绑定otb模块 3.4 一键启动 四. ...

  2. MIT四足机器人Cheetah 3控制方案理解笔记(2)——Convex Mpc身体姿态控制

    在"MIT四足机器人Cheetah 3控制方案理解笔记(1)"中,主要简单的总结了下一般情况下腿足机器人的摆动腿控制方法以及Cheetah 3的基于集中质量模型的平衡控制器.此外, ...

  3. 模型预测控制在路径规划中的应用

    1.模型预测控制(Model Predictive Control) MPC的作用机理可以表述为:在每一个采样时刻,根据当前的测量信息,在线求解一个有限时间开环优化问题,并将得到的控制序列的第一个元素 ...

  4. 8基于模型预测控制的路径规划

    文章目录 Introduction Model Parameter space Optimization Control Tube based MPC Convenient sources Linea ...

  5. 初识Matlab以及Matlab一般性教程

    一.初识Matlab MATLAB 是 MATrix 和 LABoratory 两个词的组合,意为矩阵工厂(矩阵实验室). 界面 比较熟悉的界面风格~喜欢. 可以把当前文件夹换成工作目录.也就是存放脚 ...

  6. 基于模型预测控制(MPC)的车道保持控制实现方法

    车辆保持的目的是通过检测到车辆与道路中心线的横向偏差和横摆角偏差来控制车辆的方向盘的转角,最终使车辆行驶在道路中心线上. MATLAB 2018b中有一个关于车道保持的案例,本次设计模型控制算法部分与 ...

  7. simulink中mpc模块怎么使用_simulink中mpc工具箱

    未测量扰动 将两个 MPC 系统模型并型 将两个 MPC 系统模型串联 用两个 MPC 系统模型构成增广系统模型 8.2.1 模型转换在 MATLAB 模型预测工具箱中支持多种...... sys=s ...

  8. MPC模型预测控制(二)-MATLAB代码实现

    update:MPC的QQ群 第一个群已经满500人(贫穷使我充不起鹅厂会员),这是第二个群. 群都满了. https://blog.csdn.net/tingfenghanlei/article/d ...

  9. MATLAB与深度学习(一)— Deep Learning Toolbox

    MATLAB与深度学习(一)- Deep Learning Toolbox 最近,我在学习基于matlab的深度学习的内容,并整理出如下学习笔记.本文借鉴和引用了网上许多前辈的经验和代码,如有冒犯,请 ...

最新文章

  1. PC机安装android apk | adb install -r
  2. 洛谷1522牛的旅行
  3. 1.1 基本图像导入、处理和导出
  4. 算法提高课-图论-欧拉回路和欧拉路径-AcWing 1185. 单词游戏:判断有向图是否存在欧拉路径、并查集
  5. mysql binlog 恢复指定表_Mysql用全备恢复指定表mysqlbinlog抽取某个表的信息
  6. 手机上网有几种方式?
  7. Android开发笔记(二十五)assets目录下的文件读取
  8. web自动化测试 Selenium2 Java自动化测试实战9_3
  9. Java 多线程--- 创建线程、Thread类、synchronized
  10. TypeError: cannot unpack non-iterable int object查找指定文件夹下指定文件类型的数量
  11. Nginx-搭建https服务器
  12. 开机一直转圈_天气转凉,电脑早上开机也需要预热了吗?
  13. STM8S——watchdog(IWDG)
  14. linux dev/zero,/dev/zero是什么意思
  15. 台式计算机为什么数字输入不了,计算机键盘无法输入数字,为什么?
  16. Java实现从第三方系统单点登录到致远OA
  17. 学习MIT 6.824 部分笔记
  18. ddl是什么意思mysql_ddl是什么意思(ddl数据库名词解释)
  19. QT6程序全屏和隐藏鼠标指针笔记
  20. 继电器驱动电路使用笔记

热门文章

  1. DSP:达芬奇五年沉浮
  2. pandas读取Excel文档数据
  3. GEEer成长日记一:GEE账号注册详细步骤
  4. echart纵向时间轴_Echart横坐标时间轴滑动
  5. 【刷题日记】笔试经典编程题目(六)
  6. Spring中常用的工具类
  7. arduino用时钟中断方式的4位数码管动态显示
  8. python绘制一个会长玫瑰的爱心
  9. 数字电路之乘法器 (一)
  10. 全排列算法—java详细实例