Adaptive MPC output variable constraint changes over prediction horizon

1 回表示 (過去 30 日間)
dekun wang
dekun wang 2021 年 5 月 18 日
回答済み: dekun wang 2021 年 5 月 24 日
Hello friends,
I am using adaptive MPC controller block in simulink. According to (https://se.mathworks.com/help/mpc/ref/adaptivempccontroller.html?s_tid=srchtitle), if we want the output variable constraint (i.e. ymin) to change over the prediction horizon, we need to connect ymin port to a matrix signal with Ny columns and p rows (Ny is the number of output, p the prediction horizon).
In a matlab example (https://se.mathworks.com/matlabcentral/fileexchange/68992-designing-an-mpc-controller-with-simulink?s_eid=PSM_15028), I added a matlab function into the MPC controller which generates a constraint matrix[10,2]. But it is not working. I have looked through the whole Internet but never found out how to work it out.
So I kindly ask for help here. I would really appreciate if anyone can give any help.
In attachment there are files that you can have a look if need.

採用された回答

dekun wang
dekun wang 2021 年 5 月 24 日
Hello,
I just found out what the problem is...
I was always using matlab 2020a version on my PC at school. In 2020a, adaptive MPC controller block has bugs in 'ymax' and 'ymin' which haven't been fixed.
But in newer version, either 2020b or 2021a the bugs are fixed and everything is working fine.
So, if you encounter the same problem as I do, just check your matlab's version and try the newest version.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeModel Predictive Control Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by