Skip to content
MathWorks - Mobile View
  • Sign In to Your MathWorks AccountSign In to Your MathWorks Account
  • Access your MathWorks Account
    • My Account
    • My Community Profile
    • Link License
    • Sign Out
  • Products
  • Solutions
  • Academia
  • Support
  • Community
  • Events
  • Get MATLAB
MathWorks
  • Products
  • Solutions
  • Academia
  • Support
  • Community
  • Events
  • Get MATLAB
  • Sign In to Your MathWorks AccountSign In to Your MathWorks Account
  • Access your MathWorks Account
    • My Account
    • My Community Profile
    • Link License
    • Sign Out

Videos and Webinars

  • MathWorks
  • Videos
  • Videos Home
  • Search
  • Videos Home
  • Search
  • Contact sales
  • Trial software
5:59 Video length is 5:59.
  • Description
  • Full Transcript
  • Related Resources

Understanding Model Predictive Control, Part 4: Adaptive, Gain-Scheduled, and Nonlinear MPC

From the series: Understanding Model Predictive Control

Melda Ulusoy, MathWorks

This video explains the type of MPC controller you can use based on your plant model, constraints, and cost function. The available options include the linear time-invariant, adaptive, gain-scheduled, and nonlinear MPC.

If you have a linear plant model and your MPC problem has linear constraints and a linear cost function, then you can use linear time-invariant MPC to control your system. An optimization problem with these properties is a convex one, and you can use many types of there are numerical methods and software to solve it. If your system is nonlinear, but it can be approximated by linear models at operating points of interest, then you can use adaptive or gain-scheduled MPC. In adaptive MPC, a linear model is computed on the fly as the operating conditions change. In gain-scheduled MPC, the linearization is performed offline at the operating points of interest.

If your plant is highly nonlinear, these options probably won’t provide satisfactory performance. In that case, you can use nonlinear MPC. In addition, you can use nonlinear if you have a linear plant model but either the constraints, the cost function, or both are nonlinear.

Linear and Nonlinear Model Predictive Controllers

You want to control your system with an MPC controller, but you’re not sure which methods are available? Then keep watching because I’m going to give you some recipes. I’ll start with some pancake recipes. If you can bear with me, you’ll see the connection to MPC. Here’s the recipe. If you have flour, eggs and milk, you can make pancakes. Many people have tried this recipe before; it’s simple and you can’t go wrong with it. Similarly, if you have a linear system that is represented by a linear plant model, and you have linear constraints and a quadratic cost function, then you can use a linear time-invariant MPC to control your system. An MPC problem that has these nice properties gives rise to a convex optimization problem where the cost function has a single global optimum, and the goal of the optimization is to find this optimum. This is a well-studied problem, and you can use many types of numerical methods and software to solve it.

To get back to our pancakes: What if, instead of flour, you have almond flour. Can you still make pancakes? Yes you can! Similarly, if the system you’re dealing with is not linear but nonlinear, you can use linear MPC and still benefit from the nice properties of the convex optimization problem. The available methods to use in this case are the adaptive and gain-scheduled MPC controllers. The way these controllers deal with a nonlinear system is based on linearization. For example, let’s look at this nonlinear function. We can linearize it at an operating point, and this gives us a linear function that approximates the nonlinear system well near the operating point. However, outside of this region, the linear function that we’ve found won’t work well. So, we’re usually interested in finding multiple linearized models, each representing the nonlinear function well around its operating point. This is the regular MPC control diagram that we discussed previously which uses an internal plant model and an optimizer to compute the control action. In adaptive MPC, a linear model is computed on the fly as the operating conditions change. And at each time step, you update the internal plant model used by the MPC controller with this linear model. Note that in adaptive MPC, the structure of the optimization problem remains the same across different operating points. This means that the number of states, and number of constraints don’t change for different operating conditions over the prediction horizon. However, if they do change, then you should use gain-scheduled MPC. In gain-scheduled MPC, you linearize offline at the operating points of interest and for each operating point, you design a linear MPC controller. Each controller is independent from each other and therefore may have a different number of states, and different number of constraints. Note that in this approach you also need to design an algorithm that will switch between the predefined MPC controllers for different operating conditions. Although having independent controllers is an advantage of gain-scheduled MPC, it uses more memory than adaptive MPC. Therefore, the recommendation is to use adaptive MPC if a linear plant model can be found at run-time and the structure of the optimization problem remains fixed across different operating conditions. And if they change, then you can use gain-scheduled MPC, where you can design independent MPC controllers for the changing operating conditions.

Now back to pancakes. Say that you don’t have the regular ingredients you usually bake with but very unique ones that you’re not even familiar with. Making pancakes with these ingredients will be really challenging but once you figure out they will be the best tasting pancakes ever. If you have a nonlinear system that can’t be approximated well by linear models, then you can use nonlinear MPC. This method is the most powerful one as it uses the most accurate representation of the plant, namely a nonlinear plant model. Therefore, the predictions made by the controller are more accurate which also lead to better control actions. However, it is also the most challenging one to solve in real-time, because when you have nonlinear constraints and a nonlinear cost function, the optimization problem becomes nonconvex. The cost function may have multiple local optima and finding the global optimum may be hard. The efficiency of solving the nonconvex optimization problem that requires a large number of computations depends on the nonlinear solver you have. 

In summary, if the plant you’re dealing with is nonlinear but can be approximated by linear models, you can use adaptive and gain-scheduled MPC controllers. Use adaptive MPC if the structure of optimization problem doesn’t change across different operating conditions. However, if it does, then you can use gain-scheduled MPC. If none of these work because you have a highly nonlinear system that can’t be approximated well by linearization, then you can use nonlinear MPC. 

In the next video, we’ll talk about implementation tips for running model predictive controllers faster.

Related Products

  • Model Predictive Control Toolbox

Learn More

What Is Model Predictive Control Toolbox? (2:14)
Adaptive MPC Design
Gain-Scheduled MPC Design
How to Design an MPC Controller with Simulink and Model Predictive Control Toolbox (9:52)
Adaptive MPC Design with Simulink and Model Predictive Control Toolbox (8:20)
Optimal Control

3 Ways to Speed Up Model Predictive Controllers

Read white paper

A Practical Guide to Deep Learning: From Data to Deployment

Read ebook

Bridging Wireless Communications Design and Testing with MATLAB

Read white paper

Deep Learning and Traditional Machine Learning: Choosing the Right Approach

Read ebook

Hardware-in-the-Loop Testing for Power Electronics Control Design

Read white paper

Predictive Maintenance with MATLAB

Read ebook

Electric Vehicle Modeling and Simulation - Architecture to Deployment : Webinar Series

Register for Free

How much do you know about power conversion control?

Start quiz

3 Ways to Speed Up Model Predictive Controllers

Read white paper
Related Information

FREE WHITE PAPER

Implementing an Adaptive Cruise Controller with Simulink

Feedback

Featured Product

Model Predictive Control Toolbox

  • Request Trial
  • Get Pricing

Up Next:

Learn which techniques you can use to run MPC faster. The video outlines methods, such as explicit MPC and suboptimal solution, that you can implement for your applications with small sample times.
7:34
Part 5: How To Run MPC Faster
View full series (8 Videos)

Related Videos:

3:59
Getting Started with Model Predictive Control Toolbox
28:18
Model Predictive Control of Diesel Engine Airpath
28:14
Model-Predictive Control of Diesel Engine Airpath
54:09
Introduction to Model Predictive Control Toolbox
7:24
Weight Tuning for Model Predictive Controllers

View more related videos

MathWorks - Domain Selector

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

  • Switzerland (English)
  • Switzerland (Deutsch)
  • Switzerland (Français)
  • 中国 (简体中文)
  • 中国 (English)

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文Chinese
    • English
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

  • Contact sales
  • Trial software

MathWorks

Accelerating the pace of engineering and science

MathWorks is the leading developer of mathematical computing software for engineers and scientists.

Discover…

Explore Products

  • MATLAB
  • Simulink
  • Student Software
  • Hardware Support
  • File Exchange

Try or Buy

  • Downloads
  • Trial Software
  • Contact Sales
  • Pricing and Licensing
  • How to Buy

Learn to Use

  • Documentation
  • Tutorials
  • Examples
  • Videos and Webinars
  • Training

Get Support

  • Installation Help
  • MATLAB Answers
  • Consulting
  • License Center
  • Contact Support

About MathWorks

  • Careers
  • Newsroom
  • Social Mission
  • Customer Stories
  • About MathWorks
  • Select a Web Site United States
  • Trust Center
  • Trademarks
  • Privacy Policy
  • Preventing Piracy
  • Application Status

© 1994-2022 The MathWorks, Inc.

  • Facebook
  • Twitter
  • Instagram
  • YouTube
  • LinkedIn
  • RSS

Join the conversation