How do I change the initial condition at time t=0 of an IC block to an external value ?

조회 수: 1 (최근 30일)
I have a similiar Simulink system as in the example shown below. However, I would like the initial velocity at time t=0 to be an external value (not 15 as shown in the example). Is there a way to give the IC block an external value, which is then the initial condition at time t=0?

채택된 답변

Nikolas Haimerl
Nikolas Haimerl 2019년 9월 2일
hi,
Thank you for your answer. Do you also have a suggestion how to circumvent the issue with the time system ? You were right in the assumption, that my system uses a continous time system.
  댓글 수: 1
Jonas
Jonas 2019년 9월 3일
I have very little experience with Continuous time modes, I always use discrete so I cannot help you with this I believe.

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

추가 답변 (1개)

Jonas
Jonas 2019년 9월 2일
Hi
You should try the implementation below:
IC_int.png
The IC block with initial condition [0] will make sure your model runs with an initial condition. However, the Add block behind it allows you to give an offset to this initial condition with any value you want. By using the unit delay block with input 0, you remove this offset after the first simulation sample.
The only problem I see is that I think you are using a continuous integrator block, my suggestion was only tested in a discrete time system.

카테고리

Help CenterFile Exchange에서 General Applications에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by