Is it possible to increase the "Maximum prediction horizon" above 100 in Model Predictive Control (MPC) Toolbox in R2020a?

2 views (last 30 days)

Is it possible to increase the "Maximum prediction horizon" above 100 in Model Predictive Control (MPC) Toolbox in R2020a?

For example:

I have a sample time of 20 ms and I need to predict between 10 and 20 seconds of time, so I need a prediction horizon of around 500-1000. I want to control a vehicle model.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 28 May 2020
The general answer is no, but there is a workaround in the following, which maybe helps:
1) First, do you have to run your MPC at such fast control interval for your application?
Having a fast CPU does not necessarily mean you have to use a fast control interval. The rule of thumb for choosing MPC sample time is that it should be small enough to give you reasonable control bandwidth (based on your control goals and plant dynamics) but not smaller (which reduces performance). Use this example, if you want to predict 10 seconds, We would not choose sample time faster than 100 ms (and your vehicle model should also describe dominant dynamics in that frequency range, i.e. any faster poles are useless for your control goals). For example, if you choose Ts = 0.2 instead of 0.02, your prediction horizon is 50, much more reasonable. Typically if you see prediction horizon > 100, you need to revisit your choice of Ts and prediction time.
*2) The above discussion assume that prediction sample time equals control interval. In practice, they don't have to be the same, which provides a solution to your request here if you insist to use Ts = 20 ms. *
That is: for LTI/Adaptive MPC, if you are willing to use custom state estimation instead of the built-in Kalman filter, you can specify Ts = 0.2 in @mpc for prediction and then use MPC block inside a triggered subsystem where it can run at 0.02 if the triggering signal has sample time of 0.02. As long as the estimated states (provided as external "x[k]" signal to MPC block) is correct, MPC would run properly.
In summary, you should (1) decide whether you really need to run MPV at Ts = 0.02. we don't think choosing Ts = 0.2 in this case would cause significant sub-optimality, considering the long prediction time; (2) if Ts = 0.02 is a must, you can use the workaround described above, i.e. using Ts = 0.2 in @mpc and using Ts = 0.02 for triggering signal.
We don't plan to increase "upper bound of 100" for online prediction horizon because that is a safe guard for optimization performance of any MPC application.

More Answers (0)

Products


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!