What is the difference between Step size and Sample Time ?

117 ビュー (過去 30 日間)
Anup Patil
Anup Patil 2023 年 3 月 7 日
回答済み: Sarvesh Kale 2023 年 3 月 7 日
I have a basic doubt in simulink solver setting , that What is the difference between Step size and Sample Time ?

採用された回答

Askic V
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.

その他の回答 (1 件)

Sarvesh Kale
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

カテゴリ

Help Center および File ExchangeGeneral Applications についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by