Predict block did not update

2 ビュー (過去 30 日間)
Saskia Putri
Saskia Putri 2024 年 9 月 17 日
回答済み: Gayathri 2024 年 9 月 23 日
Hi!
I am learning thi Imitate MPC example https://www.mathworks.com/help/reinforcement-learning/ug/imitate-mpc-controller-for-lane-keeping-assist.html and apply it in Simulink. I am using Predict block to run the trained dlNetwork in Simulink. However, the output of the Predict block is not updated for every time step. The output stays constant throughout simulation. Can someone help me with this?
Thank you!
  2 件のコメント
Gayathri
Gayathri 2024 年 9 月 18 日
Hello, Can you please share your simulink model.
Saskia Putri
Saskia Putri 2024 年 9 月 19 日

サインインしてコメントする。

採用された回答

Gayathri
Gayathri 2024 年 9 月 23 日
I understand that you are trying to model the “MPC” example in Simulink and the output of “predict” block in the model is not updating. I also faced a similar issue.
The output of “state space” block in Simulink does not produce the desired result as required in the example, which is to calculate “A*xk + B*[uk; Vx*rho]”.
Instead, it is better to model this equation manually using “matrix multiplication” and “adder”. You can model the same as shown below.
You can find more information about “state-space” block in the following link,
Also, in the “AI control” part of the model, I think the constant which goes as input to the “predict” block must be “rho” instead of “Vx”.
For more information about the example, please refer to the below link.
Hope you find this information helpful.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear Plant Specification についてさらに検索

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by