Reference preview/look-ahead in Simulink
9 次查看(过去 30 天)
显示 更早的评论
Hi all,
I'm doing simulation on model predictive control (MPC) with my own designed solver (so no use of MPC toolbox) in Simulink. I'm wondering how I can implement reference preview/look-ahead in Simulink without using the MPC toolbox, like this example https://nl.mathworks.com/help/mpc/ug/improve-control-performance-with-look-ahead.html.
I'm aware that in Simulink I can use Unit-Delay and Memory to access data in the past, but I don't know how to access data in the future.
Any help is appreciated!
0 个评论
回答(3 个)
Johannes Lips
2022-11-29
I believe the question is on how to implement the Future Sample Extractor used in the example to enable reference preview.
In the mpcmove documentation (https://de.mathworks.com/help/mpc/ref/mpc.mpcmove.html) it is written clearly that the input for the reference can be a p x Ny matrix and in case it is smaller than p rows, the last row is duplicated for the remains of the prediction horizon.
That means the "Future Sample Extractor" would need to output a p x 1 matrix. Since the Memory blocks (or Unit Delay blocks) have only access to past time, the input for the Future Sample Extractor should be the reference signal at the end of the prediction horizon (so shifted forward opposed to what you would normally have!), so that using the delays, it is possible to access earlier points.
A working solution is to use the Tapped Delay block (which can be combined with the Matrix Concatenate block if there are multiple MOs).
0 个评论
Rhea Chandy
2021-3-31
As I understand it, you want to use implement a look-ahead in simulink without using MPC toolbox because you have already designed your own solver.
In the example you shared as , Improving Control Performance with Look-Ahead (Previewing), there is an example of a Simulink implementation of a Future Sample Extractor with Memory blocks. That may give you some insight on how to procede.
However your best bet would be to use the MPC toolbox itself.
0 个评论
MARTIN MA
2023-6-27
For the people who wonder why a reference preview is needed, the below picture (from professor Alberto Bemporad and his course ppts: http://cse.lab.imtlucca.it/~bemporad/mpc_course.html)may give you a hand.
By the way, the FIFO Buffer block mentioned in the video https://www.mathworks.com/videos/matlab-and-simulink-robotics-arena-walking-robots-pattern-generation-1546434170253.html looks like doing the reference previewing job. However, how to build the FIFO Buffer really confused me after reading its code, appreciate it if anyone can give some insights.
Regards.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1420508/image.jpeg)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Controller Creation 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!