MPC Controller の時間計測について

SimulinksでMPC Controllerを使用しているのですが、MPC Controller内部の計算時間を計測する方法はありますか?

Answers (1)

Toshinobu Shintai
Toshinobu Shintai on 21 May 2020

0 votes

PC上のMATLAB, Simulinkでモデルを実行した際の計算時間を測りたいということでしょうか。
その場合、以下のリンク先にあるtic、tocというコマンドを駆使することで測定できますが、0.1秒より短い計算時間を測定する場合には不正確です。その場合は推奨されません。
OSなし、またはリアルタイムOSを持つマイコンに実装した際の計算時間を測りたい場合は、Embedded CoderでモデルをPIL実行し、以下のリンク先に説明されている実行時間の可視化によって知ることができます。

1 Comment

Endo Nobuaki
Endo Nobuaki on 23 May 2020
ありがとうございます。無事時間計測を行うことができました。

Sign in to comment.

Categories

Find more on Model Predictive Control Toolbox in Help Center and File Exchange

Asked:

on 21 May 2020

Commented:

on 23 May 2020

Community Treasure Hunt

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

Start Hunting!