Model Predictive Control Toolbox

Published on May 2016 | Categories: Documents | Downloads: 47 | Comments: 0 | Views: 335
of 11
Download PDF   Embed   Report

Comments

Content

Model Predictive Control Toolbox
Design and simulate model predictive controllers
Model Predictive Control Toolbox™ provides tools for systematically analyzing, designing, and tuning model predictive controllers. You can design and simulate model predictive controllers using functions in MATLAB® or blocks in Simulink®. You can set and modify the predictive model, control and prediction horizons, input and output constraints, and weights. The toolbox enables you to diagnose issues that could lead to run-time failures and provides advice on changing weights and constraints to improve performance and robustness. By running different scenarios in linear and nonlinear simulations, you can evaluate controller performance. You can adjust controller performance as it runs by tuning weights and varying constraints. For rapid prototyping and embedded system design, the toolbox supports C-code generation. Key Features ▪ Design and simulation of model predictive controllers in MATLAB and Simulink ▪ Customization of constraints and weights with advisory tools for improved performance and robustness ▪ Control of plants over a range of operating conditions using multiple model predictive controllers with bumpless control transfer ▪ Run-time adjustment of controller performance through constraint and weight changes ▪ Specialized model predictive control quadratic programming (QP) solver optimized for speed, efficiency, and robustness ▪ Support for C-code generation with Simulink Coder™

1

MPC Controller block (red) for designing and simulating model predictive controllers directly in Simulink.

Designing and Simulating Model Predictive Controllers Model predictive controllers can be used to optimize closed-loop system performance of MIMO plants subject to input and output constraints. Because they base their actions on an internal plant model, model predictive controllers can forecast future process behavior and adjust control actions accordingly. The ability to model process interactions often enables model predictive controllers to outperform multiple PID control loops, which require individual tuning and other techniques to reduce loop coupling. Model Predictive Control Toolbox provides functions, Simulink blocks, and a graphical tool for designing and simulating model predictive controllers in MATLAB and Simulink. You can iteratively improve your controller design by defining an internal plant model, adjusting controller parameters such as weights and constraints, and simulating closed-loop system response to evaluate controller performance.
Getting Started with Model Predictive Control Toolbox 10:07 Use Model Predictive Control Toolbox™ to design and simulate model predictive controllers.

2

Defining Internal Plant Models When designing a model predictive controller in Simulink, you can use Simulink Control Design™ to extract a linearized form of the Simulink model and automatically import it into the controller as the internal plant model. Alternatively, you can use linear time-invariant (LTI) systems from Control System Toolbox™, such as a transfer function or a state-space model, to specify the internal plant model. You can import LTI models from the MATLAB workspace or from MAT-files into the toolbox. The toolbox also lets you directly import models created from measured input-output data using System Identification Toolbox™. Designing Controllers Once you have defined the internal plant model you can complete the design of your model predictive controller by specifying the following controller parameters: ▪ Prediction and control horizons ▪ Hard and soft constraints on manipulated variables and output variables ▪ Weights on manipulated variables and output variables ▪ Models for measurement noise and for unmeasured input and output disturbances

Dialog box for selecting a plant model and specifying the control interval, prediction horizon, and control horizon in Model Predictive Control Toolbox.

3

Dialog box for setting constraints on manipulated variables and output variables in Model Predictive Control Toolbox.

In addition to constant constraints and weights, the toolbox supports time-varying constraints and weights, constraints on linear combinations of manipulated variables and output variables, terminal constraints and weights, and constraints in the form of linear off-diagonal weights. The toolbox also supports constraint softening. Running Closed-Loop Simulations You can use MATLAB functions or a graphical tool to run closed-loop simulations of your model predictive controller against linear plant models. The graphical tool lets you set up multiple simulation scenarios. For each scenario you can specify controller set points and disturbances by choosing from common signal profiles, such as step, ramp, sine wave, or random signal.

4

Graphical tool for configuring and running a simulation to test a controller against a linear plant model.

To assess the effects of model mismatch, you can simulate a controller against a linear plant model that is different from the internal plant model used by the controller. You can also simulate multiple controller designs against the same plant model to see how different weight and constraint settings affect controller performance. The toolbox lets you disable constraints to evaluate characteristics of the closed-loop dynamics, such as stability and damping. Using Simulink blocks provided with Model Predictive Control Toolbox, you can run closed-loop simulations of your model predictive controller against a nonlinear Simulink model. You can configure the blocks to accept time-varying constraint signals that are generated by other Simulink blocks.

5

Simulink model for running closed-loop simulations of a model predictive controller and a nonlinear plant model, with controller constraints calculated by other Simulink blocks.

Customizing Constraints and Weights Model Predictive Control Toolbox provides several tools to help you optimize controller performance by customizing controller constraints and weights. Adjusting Weights with the Tuning Advisor The toolbox provides the Tuning Advisor, which guides you in setting weights to improve controller performance. You can use the Tuning Advisor to: ▪ Select a cost function that measures the difference between a reference signal and measured plant output, and compute the cost function value for the baseline design ▪ Compute sensitivities of the cost function to individual weights ▪ Determine whether individual weights should be increased or decreased to improve controller performance ▪ Adjust the weights and recompute the cost function value By repeating this interactive process, you can systematically adjust controller weights to optimize controller performance.

6

Weight Tuning for Model Predictive Controllers 7:24 Use Tuning Adviser to adjust model predictive controller weights to improve controller performance.

Analyzing Constraints and Weights for Potential Run-Time Failures The product provides a diagnostic function to detect potential stability and robustness issues with your model predictive controller, such as: ▪ The model predictive controller or the closed-loop system is unstable. ▪ The quadratic programming (QP) optimization problem is ill-defined with an invalid Hessian matrix. ▪ Zero steady-state offset cannot be achieved. ▪ Hard and soft constraint settings may lead to infeasible optimization problems at run-time. You can use this diagnostic tool to adjust controller weights and constraints during controller design to avoid run-time failures.

Results of diagnostic tests for potential model predictive controller run-time failures.

Controlling Plants Over a Range of Operating Conditions You can use the Multiple MPC Controllers block for controlling a nonlinear Simulink plant model over a wide range of operating conditions. With this block you can design a model predictive controller for each operating point and switch between model predictive controllers at run time. The Multiple MPC Controllers block ensures bumpless control transfer from one model predictive controller to another. You can create linear plant models for controller design at each operating point either by linearizing a Simulink model with Simulink Control Design or by specifying the plant model directly.

7

Multiple MPC Controllers block (red) for controlling nonlinear models over a wide operating range using multiple model predictive controllers with bumpless control transfer. With this block you can design a model predictive controller for each operating point and switch between model predictive controllers at run time.

Adjusting Run-Time Controller Performance Model Predictive Control Toolbox supports monitoring run-time controller performance and adjusting run-time tuning parameters. Monitoring Run-Time Controller Performance Model predictive controllers formulate and solve a QP optimization problem at each computation step. The QP solver supplied with the toolbox is optimized for performance and robustness. It achieves convergence even when the optimization problem is ill-conditioned. For rare occasions when the optimization may fail to converge due to process abnormalities, the MPC Controller block lets you monitor optimization status at run time. You can access the optimization status signal to detect when an optimization fails to converge, and decide if a backup control strategy should be used. The MPC Controller block also lets you access the optimal cost and optimal control sequence at each computation step. You can use these signals to analyze controller performance and to develop custom control strategies. For example, you may use optimal cost information for switching between two model predictive controllers whose outputs are restricted to discrete values.

8

Simulink model that uses the optimal cost signal to switch between two model predictive controllers whose outputs are restricted to discrete values. You can compare the reference signal (top right, red) and plant output (top right, blue) to evaluate controller performance, and you can plot the manipulated variable (controller output) to see when the control strategy switches between controllers.

Adjusting Run-Time Tuning Parameters The toolbox lets you adjust the run-time tuning parameters of your model predictive controller to optimize its performance at run time without redesigning or reimplementing it. To perform run-time controller tuning in Simulink, you configure the MPC Controller block to accept the appropriate run-time tuning parameters. You can also perform run-time controller tuning in MATLAB. Model Predictive Control Toolbox provides access to the following run-time tuning parameters: ▪ Weights on plant outputs ▪ Weights on manipulated variables ▪ Weight on overall constraint softening

9

Simulink model for run-time tuning of model predictive controller parameters. Model Predictive Control Toolbox enables run-time tuning by changing weights on plant outputs, weights on manipulated variables, and the weight on overall constraint softening.

Deploying Model Predictive Controllers The toolbox provides two ways to deploy a controller in an application. You can use Simulink Coder to generate C code from Simulink blocks provided with Model Predictive Control Toolbox and deploy the code to a supported target system for implementation or rapid prototyping.

10

Hardware setup for rapid prototyping of a model predictive controller on PC-compatible hardware using Simulink Coder and xPC Target™.

You can also use OPC Toolbox™ to connect a controller operating in MATLAB directly to an OPC-compliant system.
System Identification and Control Using OPC Data 17:58 Improve process performance by designing and implementing a model predictive controller. Use OPC Toolbox™ and System Identification Toolbox™ to collect the input-output data and create a plant model.

Resources
Product Details, Examples, and System Requirements www.mathworks.com/products/mpc Trial Software www.mathworks.com/trialrequest Sales www.mathworks.com/contactsales Technical Support www.mathworks.com/support Online User Community www.mathworks.com/matlabcentral Training Services www.mathworks.com/training Third-Party Products and Services www.mathworks.com/connections Worldwide Contacts www.mathworks.com/contact

© 2012 The MathWorks, Inc. MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.

11

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close