What is the difference between Step size and Sample Time ?
78 次查看(过去 30 天)
显示 更早的评论
I have a basic doubt in simulink solver setting , that What is the difference between Step size and Sample Time ?
0 个评论
采纳的回答
Askic V
2023-3-7
According to Matlab's documentation,
The sample time of a block is a parameter that indicates when, during simulation, the block produces outputs and if appropriate, updates its internal state.
This is not the same as step size that is used in numerical calculations (for example when specifying solver). 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.
0 个评论
更多回答(1 个)
Sarvesh Kale
2023-3-7
What is Step size ?
This option specifies the time increments at which the model will be simulated, generally solvers are kept variable step so that simulink chooses the step size automatically which is gcd of all sample times in Simulink model, doing this will ensure that sample time of each blocks in the model is hit, more information is found in the following link fixed step size.
What is Sample time ?
This is the time during the simulation at which the internal states of the block and output are updated and not before that , a model can have blocks with different sample times, if the model has two blocks with 0.4 and 0.5 as sample time and variable step solver then the time steps would be 0, 0.4, 0.5, 0.8, 1.0, 1.2,.. and so on. More information can be found in the following links Sample times in system, What is sample time ? .
I hope this information helps.
Thank you
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 General Applications 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!