在好例子网,分享、交流、成长!
您当前所在位置:首页MATLAB 开发实例MATLAB语言基础 → Matlab模型预测控制工具箱官方指导手册.pdf

Matlab模型预测控制工具箱官方指导手册.pdf

MATLAB语言基础

下载此实例
  • 开发语言:MATLAB
  • 实例大小:18.95M
  • 下载次数:26
  • 浏览次数:348
  • 发布时间:2021-04-23
  • 实例类别:MATLAB语言基础
  • 发 布 人:seedscq
  • 文件格式:.pdf
  • 所需积分:2

实例介绍

【实例简介】

本书为MATLAB官方给出的模型预测控制工具箱使用指南,包括代码介绍和模型实例。可供相关研究人员及MPC初学者进行参考。

【实例截图】

from clipboard

from clipboard

【核心代码】

Contents
Control of an Inverted Pendulum on a Cart ...................... 1-117
Thermo-Mechanical Pulping Process with Multiple Control Objectives
........................................................ 1-125
Aircraft with Unstable Poles ................................... 1-133
Model Predictive Control Basics
2
Controller State Estimation ..................................... 2-2
Controller State Variables ..................................... 2-2
State Observer ............................................. 2-3
State Estimation ............................................ 2-3
Built-in Steady-State Kalman Gains Calculation .................... 2-4
Output Variable Prediction .................................... 2-5
Optimization Problem .......................................... 2-7
Overview ................................................. 2-7
Standard Cost Function ...................................... 2-7
Alternative Cost Function ..................................... 2-9
Constraints ............................................... 2-10
QP Matrices .............................................. 2-11
Unconstrained Model Predictive Control ......................... 2-15
QP Solvers .................................................. 2-17
Built-In QP Solvers ......................................... 2-17
Custom QP Solver .......................................... 2-19
Integration with FORCES PRO Solver ........................... 2-22
Controller Refinement
3
Setting Targets for Manipulated Variables ......................... 3-2
Time-Varying Weights and Constraints ............................ 3-5
Time-Varying Weights ........................................ 3-5
Time-Varying Constraints ..................................... 3-6
Constraints on Linear Combinations of Inputs and Outputs ........... 3-7
Use Custom Constraints in Blending Process ...................... 3-11
Terminal Weights and Constraints ............................... 3-20
Provide LQR Performance Using Terminal Penalty Weights .......... 3-22
Adjust Disturbance and Noise Models ............................ 3-27
Overview ................................................ 3-27
vi Contents
Output Disturbance Model ................................... 3-27
Measurement Noise Model ................................... 3-29
Input Disturbance Model .................................... 3-30
Restrictions .............................................. 3-32
Disturbance Rejection Tuning ................................. 3-32
Custom State Estimation ...................................... 3-34
Manipulated Variable Blocking ................................. 3-39
Specify Blocking Interval Lengths .............................. 3-39
Interpolate Block Moves for Nonlinear MPC ...................... 3-41
Specifying Alternative Cost Function with 2ffDLDJonDl Weight Matrices
......................................................... 3-43
Controller Analysis
4
Review Model Predictive Controller for Stability and Robustness Issues
.......................................................... 4-2
Test Controller Robustness ..................................... 4-17
Compute Steady-State Gain .................................... 4-26
Extract Controller ............................................ 4-28
Compare Multiple Controller Responses Using MPC Designer ........ 4-30
Adjust Input and Output Weights Based on Sensitivity Analysis ....... 4-39
Understanding Control Behavior by Examining Optimal Control Sequence
......................................................... 4-44
Controller Simulation
5
Simulate Controller with Nonlinear Plant .......................... 5-2
Nonlinear CSTR Application ................................... 5-2
Example Code for Successive Linearization ........................ 5-2
CSTR Results and Discussion .................................. 5-4
Test an Existing Controller ...................................... 5-7
Generate Simulink Model from MPC Designer ..................... 5-10
Signal Previewing ............................................ 5-12
vii
Improving Control Performance with Look-Ahead (Previewing) ....... 5-13
Simulating Model Predictive Controller with Plant Model Mismatch . . 5-20
Update Constraints at Run Time ................................ 5-23
Update Bounds on Input and Output Signals at Run Time ............ 5-23
Update Mixed Input/Output Constraints at Run Time ............... 5-24
Vary Input and Output Bounds at Run Time ....................... 5-26
Tune Weights at Run Time ..................................... 5-31
Tuning Controller Weights ..................................... 5-32
Adjust Horizons at Run Time ................................... 5-37
Adjust Horizons in MATLAB .................................. 5-37
Adjust Horizons in Simulink .................................. 5-37
Code Generation ........................................... 5-37
Effect on Time-Varying Controller Parameters ..................... 5-38
Evaluate Control Performance Using Run-Time Horizon Adjustment ... 5-40
Switch Controller Online and 2೤Lne with Bumpless Transfer ........ 5-49
Switching Controllers Based on Optimal Costs .................... 5-59
Monitoring Optimization Status to Detect Controller Failures ........ 5-65
Simulate MPC Controller with a Custom QP Solver ................. 5-69
Use Suboptimal Solution in Fast MPC Applications ................. 5-78
Design and Cosimulate Control of High-Fidelity Distillation Tower with
Aspen Plus Dynamics ....................................... 5-85
Adaptive MPC Design
6
Adaptive MPC ................................................. 6-2
When to Use Adaptive MPC ................................... 6-2
Plant Model ............................................... 6-2
Nominal Operating Point ..................................... 6-3
State Estimation ............................................ 6-3
Model Updating Strategy ....................................... 6-5
Overview ................................................. 6-5
Other Considerations ........................................ 6-5
Adaptive MPC Control of Nonlinear Chemical Reactor Using Successive
Linearization ............................................... 6-7
viii Contents
Adaptive MPC Control of Nonlinear Chemical Reactor Using Online
Model Estimation .......................................... 6-17
Adaptive MPC Control of Nonlinear Chemical Reactor Using Linear
Parameter-Varying System ................................... 6-27
Obstacle Avoidance Using Adaptive Model Predictive Control ........ 6-38
Time-Varying MPC ............................................ 6-49
When to Use Time-Varying MPC ............................... 6-49
Time-Varying Prediction Models ............................... 6-49
Time-Varying Nominal Conditions .............................. 6-50
State Estimation ........................................... 6-51
Time-Varying MPC Control of a Time-Varying Plant ................. 6-52
Time-Varying MPC Control of an Inverted Pendulum on a Cart ....... 6-58
Explicit MPC Design
7
Explicit MPC .................................................. 7-2
Design WorkfloZ for Explicit MPC ................................ 7-4
Traditional (Implicit) MPC Design ............................... 7-4
Explicit MPC Generation ..................................... 7-4
Explicit MPC Simplification ................................... 7-5
Implementation ............................................ 7-5
Simulation ................................................ 7-6
Explicit MPC Control of a Single-Input-Single-Output Plant .......... 7-7
Explicit MPC Control of an Aircraft with Unstable Poles ............. 7-17
Explicit MPC Control of DC Servomotor with Constraint on Unmeasured
Output ................................................... 7-24
Explicit MPC Control of an Inverted Pendulum on a Cart ............ 7-33
Gain Scheduling MPC Design
8
Gain-Scheduled MPC ........................................... 8-2
Design Workflow ............................................ 8-2
Schedule Controllers at Multiple Operating Points .................. 8-4
Gain-Scheduled MPC Control of Nonlinear Chemical Reactor ........ 8-22
ix
Gain-Scheduled Implicit and Explicit MPC Control of Mass-Spring System
......................................................... 8-42
Gain-Scheduled MPC Control of an Inverted Pendulum on a Cart ..... 8-58
Code Generation
9
Generate Code and Deploy Controller to Real-Time Targets ........... 9-2
Code Generation in MATLAB .................................. 9-2
Code Generation in Simulink .................................. 9-2
Sampling Rate in Real-Time Environment ......................... 9-3
QP Problem Construction for Generated C Code .................... 9-4
Code Generation for Custom QP Solvers .......................... 9-5
Simulation and Code Generation Using Simulink Coder .............. 9-7
Simulation and Structured Text Generation Using Simulink PLC Coder
......................................................... 9-14
Using MPC Controller Block Inside Function-Call and Triggered
Subsystems ................................................ 9-21
Generate Code to Compute Optimal MPC Moves in MATLAB ......... 9-33
Solve Custom MPC Quadratic Programming Problem and Generate Code
......................................................... 9-39
Simulate and Generate Code for MPC Controller with Custom QP Solver
......................................................... 9-49
Real-Time Control with OPC Toolbox ............................. 9-56
Implement MPC Controllers using Embotech FORCES PRO Solvers ... 9-60
Embotech Quadratic Programming (QP) Solver .................... 9-60
Embotech Nonlinear Programming (NLP) Solver .................. 9-61
Nonlinear MPC
10
Nonlinear MPC .............................................. 10-2
Specify Prediction Model for Nonlinear MPC ...................... 10-4
State Function ............................................ 10-4
Output Function ........................................... 10-7
Specify Optional Model Parameters ............................ 10-9
Augment Prediction Model with Unmeasured Disturbances .......... 10-9
x Contents
Specify Cost Function for Nonlinear MPC ........................ 10-11
Custom Cost Function ..................................... 10-11
Cost Function Jacobian ..................................... 10-15
Specify Constraints for Nonlinear MPC .......................... 10-18
Standard Linear Constraints ................................. 10-18
Custom Constraints ....................................... 10-19
Custom Constraint Jacobians ................................ 10-23
ConfiJure Optimization Solver for Nonlinear MPC ................ 10-26
Solver Decision Variables ................................... 10-26
Specify Initial Guesses ..................................... 10-26
Configure fmincon Options .................................. 10-26
Specify Custom Solver ..................................... 10-27
Trajectory Optimization and Control of Flying Robot Using Nonlinear
MPC .................................................... 10-31
Swing-up Control of a Pendulum Using Nonlinear Model Predictive
Control .................................................. 10-42
Nonlinear Model Predictive Control of an Exothermic Chemical Reactor
........................................................ 10-55
Optimizing Tuberculosis Treatment Using Nonlinear MPC with a Custom
Solver ................................................... 10-62
Nonlinear and Gain-Scheduled MPC Control of an Ethylene Oxidation
Plant .................................................... 10-70
Optimization and Control of a Fed-Batch Reactor Using Nonlinear MPC
........................................................ 10-79
Lane Following Using Nonlinear Model Predictive Control .......... 10-89
Lane Change Assist Using Nonlinear Model Predictive Control ...... 10-96
Control of Quadrotor Using Nonlinear Model Predictive Control .... 10-106
Economic MPC ............................................. 10-112
Economic MPC Control of Ethylene Oxide Production ............. 10-114
Automated Driving Applications
11
Automated Driving Using Model Predictive Control ................ 11-2
Simulation in Simulink ...................................... 11-3
Controller Customization .................................... 11-3
Integration with Automated Driving Toolbox ...................... 11-4
xi
Adaptive Cruise Control System Using Model Predictive Control ...... 11-5
Adaptive Cruise Control with Sensor Fusion ...................... 11-10
Lane Keeping Assist System Using Model Predictive Control ........ 11-28
Lane Keeping Assist with Lane Detection ........................ 11-33
Lane Following Control with Sensor Fusion and Lane Detection ..... 11-47
Highway Lane Following ...................................... 11-57
Highway Lane Change ........................................ 11-72
Automate Testing for Highway Lane Following .................... 11-91
Highway Lane Following with Intelligent Vehicles ................ 11-101
Parking Valet Using Nonlinear Model Predictive Control .......... 11-119
Parallel Parking Using Nonlinear Model Predictive Control ........ 11-128
Parallel Parking Using RRT Planner and MPC Tracking Controller . . 11-141
TrDffLc Light Negotiation .................................... 11-150
TrDffLc Light Negotiation with Unreal Engine Visualization ........ 11-164

实例下载地址

Matlab模型预测控制工具箱官方指导手册.pdf

不能下载?内容有错? 点击这里报错 + 投诉 + 提问

好例子网口号:伸出你的我的手 — 分享

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警