필터 지우기
필터 지우기

Transfer function and lsim

조회 수: 1 (최근 30일)
Ehsan Khorsandnejad
Ehsan Khorsandnejad 2019년 2월 11일
편집: Ehsan Khorsandnejad 2019년 2월 14일
I know that the time response of an arbitrary input can be obtained using the lsim function. However, is there a continuous form of this function? Normally, we have to introduce a time vector with constant time steps to lsim so that it can calculate the time response. However, it seems it is different in SIMULINK, where the time response is calculated continuously. Does anyone know how SIMULINK does that and if it can be used in MATLAB as well or not?

답변 (1개)

Mark Sherstan
Mark Sherstan 2019년 2월 11일
lsim has the option for both contionous and discrete. When defining your input time vector decrease the time step to mimick a "continous" signal if you are experiancing discontinuties or other unwanted results. The difference compared to SIMULINK is that it is uses some ODE solver which deals with these time steps "behind the scenes" depending on which solver you are using.
  댓글 수: 1
Ehsan Khorsandnejad
Ehsan Khorsandnejad 2019년 2월 11일
편집: Ehsan Khorsandnejad 2019년 2월 14일
Well, I am not experiencing discontinuities but due to some issues I need to have a continuous time respone as in Simulink. As you said SIMULINK is using some ODE solvers. But how does Simulink apply these solvers to transfer functions? What is going on behind the scenes?
The main question is that in SIMULINK transfer functions which are in the "s" domain are treated easily as if they are in the time domain. It seems in SIMULINK transfer functions are initially converted to an ODE and then solved by ODE solvers. But how? Isn't the same thing possible in MATLAB itslef?
By the way my code involves a continuous-time transfer function.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Model Predictive Control Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by