Adaptive MPC: Dimension Error of Block Input
Show older comments
I have a problem with the use of adaptive mpc block in matlab. The input dimensions of DX to the adaptive mpc block seem to be wrong and the errors (as can be seen in the picture) occur. The simulation uses a simple 2dof kinematic single track vehicle model; state matrices: A[0 vx; 0 0], B[1 0; 0 1], C[1 0; 0 1], D[0 0; 0 0]; mv=2; mo=2; It works using the standard MPC controller, but I have a problem using it for the Adaptive MPC Block. How can I solve this problem?

3 Comments
Andre Pereira
on 12 Jun 2019
Hello Peter, right now i am trying to implementing a adaptive MPC and i am having the same issues that you had.
I would like to ask you if you found the aswer to fix it. If yes, would you kindly share it ?
Thank you and have a good day
Jakobus Louw
on 9 Apr 2020
I have exactly the same problem. Did any of you find the solution? Please make a public post if you have.
Seyyed Ali Ghorashi Khalil Abadi
on 21 Aug 2020
I have also the same issue, Is there anyone who know what shoud I do?
Answers (1)
Jakobus Louw
on 9 Apr 2020
5 votes
It is a bug in the Adaptive MPC block where it checks for the correct dimentions of the input ports. For some reason it does not accept a vector signal, but checks for a matrix signal.
I added Signal Specification blocks to all the "MPC Matrix Signal Check <>" subsystems to explicitly state the dimentions.
I found this subsystem by following the link in the Diagnostics Panel, and disabling the link so that I could edit the block locally (not the library block).

That cleared up the error.
9 Comments
Seyyed Ali Ghorashi Khalil Abadi
on 21 Aug 2020
I did it but it did not solve the issue. :(
Jakobus Louw
on 25 Aug 2020
Did you do it for each of the input ports? If you fixed one the error may now be on one of the other ports.
Can you send more info or a screenshot or even your simulink file?
mukesh pandey
on 10 Jun 2021
Hi
I have the same issue.if anyone have the solution.please share here
mukesh pandey
on 10 Jun 2021
Can you tell me ,how to put matrix order in signal specification? because,I am not able to do that.If possible,Please send the screenshot of 'Block parameter' of signal specification.
Jakobus Louw
on 10 Jun 2021

Mozhgan Sabz
on 15 Nov 2022
Jakobus, I have the same problem, would you please help me? can you please email me? my email adress is sabz@ualberta.ca
I would be really grateful
Yash Talekar
on 22 May 2023
Hi Jakobus,
We are having the same issue with the DX port in particular. Do you know what a possible fix for this would be? It gives us a similar issue with the dimension check in Version 2023.
Amr Elsherbiny
on 13 Jul 2023
Jakobus Louw, I tried your method and it worked with me. I had the same issue with linear MPC block
Amr Elsherbiny
on 13 Jul 2023

Categories
Find more on Linear Plant Specification in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!