lane keeping MPC system- Simulink

3 ビュー (過去 30 日間)
Adafner
Adafner 2020 年 7 月 4 日
回答済み: Altaïr 2025 年 2 月 11 日
Hello everyone,
I'm trying to use the "Lane Keeping Assist System" block (https://www.mathworks.com/help/mpc/ug/lane-keeping-assist-system-using-model-predictive-control.html), and having some difficulties with it.
the problem is with the "Curvature Previewer" block. When I open it asks me to enter a "Signal name" and in the link I added above it says to put "md".
md = getCurvature(Vx,time);
but when I try to run it, it pops an error about this line("Underdefines function 'getCurvature'").
when I press the small arrow on this block I get to the next function:
function [seq,first,next_t] = fcn(data,steps,t)
%#codegen
[seq,first,next_t] = mpcblock_preview('md',data,steps,t);
I see here that the function needs three variables and I don't know what is "data".
Did someone ever got to work with this block and can explain to me what I am missing??
Thank you!
  1 件のコメント
Akshaya
Akshaya 2023 年 9 月 15 日
Did anyone solve this issue?
Thanks in advance! :)

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

回答 (1 件)

Altaïr
Altaïr 2025 年 2 月 11 日
The Lane Keeping Assist System Using Model Predictive Control includes several files.
The getCurvature function, which is used within the mpcLKAsystem model, might be missing, leading to the error encountered. To resolve this, consider reinstalling the toolbox or follow these steps to reset the example:
  1. Use the which example_model_name command to locate the example on the system.
  2. Navigate to that location and delete or move the Simulink example to another location as needed.
  3. Reopen the example using the openExample(example_name) command.
For additional guidance, this related MATLAB Answer might be helpful:

カテゴリ

Help Center および File ExchangeController Creation についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by