Initial Condition (IC) block does not output initial state

조회 수: 4 (최근 30일)
LucaDL
LucaDL 2016년 6월 10일
댓글: UDIT SARASWAT 2018년 4월 4일
I'm trying to start the simulation of my model containing an algebraic loop. In order to start it I use an Initial Condition block to assign a start value to a parameter. When running the simulation it stops immediately. It cannot solve the algebraic loop as the parameter I used the IC block for is somehow not defined. Indeed, the IC block seems not to output its initial condition at the start of the simulation. I checked this by outputting the signal values just after the IC block to the workspace. The first and only value logged is not the same as the initial condition set in the IC block.
Why is that? It seems to me that an IC block should first output its initial condition and that this value should thus be found in the signal log at t=0s
Could someone clarify what I'm doing wrong? Or could this be a bug in Simulink?

채택된 답변

Titus Edelhofer
Titus Edelhofer 2016년 6월 10일
Hi Luca,
the algebraic loop needs to be solved by Simulink in each time step, including the very first step. The output of the IC block is used as starting point for the nonlinear solver for solving the loop. At the end of the timestep (i.e., after solving the algebraic equation), the output is usually not the value of the IC block (only in those cases, where the IC gives the correct value already, i.e., the IC block gives the result of the algebraic equation).
Hope this helps,
Titus
  댓글 수: 2
LucaDL
LucaDL 2016년 6월 10일
Thank you very much for this clarification!
UDIT SARASWAT
UDIT SARASWAT 2018년 4월 4일
Hi Titus,
Does this mean that the initial value set in the IC block would always be exhausted for running the loop for the first time and the results obtained at time, t=0, would actually correspond to input signal value after first iteration ?
Regards
Udit

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

추가 답변 (0개)

카테고리

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