Convert m-code into state space block

1 回表示 (過去 30 日間)
JGP
JGP 2023 年 8 月 10 日
コメント済み: JGP 2023 年 8 月 10 日
I'm trying to convert a feedback control system that I've implemented in M-code into a Simulink model.
In the code, I used the 'ss' function and 'lsim' to obtain results.
However, even though I input the same state equations and control inputs, the results diverged when using a state-space block in the Simulink model.
I'm wondering if anyone has experienced a similar issue and if I could get some assistance with this. Have you ever encountered a situation like this?
  2 件のコメント
Sam Chak
Sam Chak 2023 年 8 月 10 日
Could you please attach the m-file by clicking on the paperclip icon ?
Alternatively, you can copy and paste the MATLAB code. Click on this icon to enable the Code mode (grey field).
paste the code
JGP
JGP 2023 年 8 月 10 日
Actually, I resolved the issue by reconfiguring the sampling time.
Thank you so much.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeClassical Control Design についてさらに検索

製品


リリース

R2023a

Translated by