필터 지우기
필터 지우기

Convert m-code into state space block

조회 수: 3 (최근 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 CenterFile Exchange에서 Classical Control Design에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by