main content

design and simulate model predictive controllers -凯发k8网页登录

design and simulate model predictive controllers

description

the mpc designer app lets you design and simulate model predictive controllers in matlab® and simulink®.

using this app, you can:

  • interactively design model predictive controllers and validate their performance using simulation scenarios

  • obtain linear plant models by linearizing simulink models (requires simulink control design™)

  • review controller designs for potential run-time stability or numerical issues

  • compare response plots for multiple model predictive controllers

  • generate simulink models with an mpc controller and plant model

  • generate matlab scripts to automate mpc controller design and simulation tasks

limitations

the following advanced mpc features are not available in the mpc designer app.

  • explicit mpc design

  • adaptive mpc design

  • nonlinear mpc design

  • mixed input/output constraints ()

  • terminal weight specification ()

  • custom state estimation ()

  • sensitivity analysis ()

  • alternative cost functions with off-diagonal weights

  • specification of initial plant and controller states for simulation

  • specification of nominal state values using mpcobj.model.nominal.x and mpcobj.model.nominal.dx

  • updating weights, constraints, mv targets, and external mvs online during simulations

if your application requires any of these features, design and simulate your controller at the command line. you can also run simulations in simulink when using these features.

when using mpc designer in matlab online™, the following features are not available.

  • finding an operating point for linearizing a simulink model using trimming or simulation snapshots. instead, you must linearize your model at the model initial conditions.

  • generating simulink models for your controller and plant.

open the mpc designer app

  • matlab toolstrip: on the apps tab, under control system design and analysis, click the app icon.

  • matlab command prompt: enter mpcdesigner.

  • simulink model editor: in the mpc controller block parameters dialog box, click design.

programmatic use

mpcdesigner opens the mpc designer app. you can then import a plant or controller to start the design process, or open a saved design session.

mpcdesigner(plant) opens the app and creates a default mpc controller using plant as the internal prediction model. specify plant as an , , or lti model.

if plant is a stable, continuous-time lti system, mpc designer sets the controller sample time to 0.1 tr, where tr is the average rise time of the plant. if plant is an unstable, continuous-time system, mpc designer sets the controller sample time to 1.

by default, plant input and output signals are treated as manipulated variables and measured outputs respectively. to specify a different input/output channel configuration, use before opening mpc designer.

you can also specify plant as a linear system identification toolbox™ model, such as an (system identification toolbox) or (system identification toolbox) system. the app converts the identified model to a state-space system, discarding any noise channels. to convert noise channels to unmeasured disturbances, convert the identified model to a state-space model using the 'augmented' option. for more information on identifying plant models, see .

mpcdesigner(mpcobj) opens the app and imports the model predictive controller mpcobj from the matlab workspace. to create an mpc controller, use mpc.

mpcdesigner(mpcobjs) opens the app and imports multiple mpc controllers specified in the cell array mpcobjs. all of the controllers in mpcobjs must have the same input/output channel configuration.

mpcdesigner(mpcobjs,names) additionally specifies controller names when opening the app with multiple mpc controllers. specify names as a cell array of character vectors or string array with the same length as mpcobjs. specify a unique name for each controller.

mpcdesigner(sessionfile) opens the app and loads a previously saved session. specify sessionfile as one of the following:

  • the name of a session data file in the current working directory or on the matlab path, specified as a character vector or string. to save session data to disk, in the mpc designer app, on the mpc designer tab, click save session. the saved session data includes all plants, controllers, and scenarios in the data browser, the current mpc structure, and the current plot configuration.

  • a previously loaded sessiondata object in the matlab workspace. to load a sessiondata object from a session data file, at the command line, enter:

    load sessionfile

version history

introduced in r2015b

see also

functions

objects

topics

    网站地图