Difference between consecutive outputs of Simulink clock block is not the fixed simulation step

조회 수: 2(최근 30일)
Luca Tarasi
Luca Tarasi 2019년 9월 18일
답변: Chaitanya Mallela 2020년 12월 30일
I have a Simulink model that's run by the following instruction:
SO = sim('schema','StartTime','current_tmin','StopTime', 'current_tmax','SaveState','on','SaveOutput','on', 'OutputSaveName','yout','SrcWorkspace', 'current', 'FixedStep','h_step');
where all the passed parameters have been defined before this instrutcion. Inside the Simulink model there is a block that takes the clock block as input. By printing this block's value when using h_step = 0.001, for example, I get an output that starts as follows:
clock =
clock =
clock =
clock =
clock =
My question is: why are the time instants not separated by a quantity equal to h_step?
Thank you,
  댓글 수: 1
Renato SL
Renato SL 2019년 9월 19일
I think the documentation (here) presents a good explanation.
[tl;dr] : "If the model specifies one or more periodic sample times, Simulink chooses a step size equal to the greatest common divisor of the specified sample times. This step size, known as the fundamental sample time of the model, ensures that the solver will take a step at every sample time defined by the model."

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




Community Treasure Hunt

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

Start Hunting!

Translated by