Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Simulink start from a nonzero value?

I'm doing some simulations for control systems. I've noticed that the start time is not zero, even though in the parameters of simulation, the start time is set to zero. For example, in the following diagram,

enter image description here

enter image description here

The output of the signal is

enter image description here

with the following settings

enter image description here

I've imported data and the start values are

a =
    1.0010    1.0010
    1.0020    1.0020
    1.0030    1.0030
    1.0040    1.0040

How to reset the start time so that the simulation should start from zero not one?

like image 959
CroCo Avatar asked Apr 25 '26 06:04

CroCo


1 Answers

This answer applies for Matlab R2015a and below. For newer versions refer to the answer of NKN.


Simulink tricks you! The answer is quite simple:

Your output as well as simulation time actually starts from 0! Just the scope doesn't.

The reason is the default scope property "Limit data points to last 5000 ", which is always checked for new scopes (except in the newest Matlab versions). So uncheck that box, and everything will be fine.

enter image description here

like image 134
Robert Seifert Avatar answered Apr 28 '26 02:04

Robert Seifert



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!