What is the relationship between the simulation time tf in simulink and the actual running time of the system? If my system needs to run 800s before it can be stable, then tf

11 ビュー (過去 30 日間)
嘻嘻
嘻嘻 2023 年 11 月 13 日
回答済み: Shlok 2025 年 3 月 4 日 10:49
What is the relationship between the simulation time tf in simulink and the actual running time of the system? If my system needs to run 800s before it can be stable, then tf in simulink must also be 800s, or I just need 800 steps, then the simulation time tf can be 80s, and the sampling time ts can be 0.1s, is that right? I don't understand, because if I set the simulation time tf to 800s, it will take me a very long time to train with reinforcement learning.

回答 (1 件)

Shlok
Shlok 2025 年 3 月 4 日 10:49
Hi,
Simulation time (“tf”) and the actual running time of the system are different. In Simulink, simulation time represents the total duration over which the simulation is executed, while the actual running time is how long the simulation takes to compute on your machine, which depends on factors like model complexity and computational resources.
In the above-mentioned case, if your system requires 800 seconds to reach stability, then “tf” should be set to 800 seconds if you're modeling in real-time seconds. Alternatively, you can set “tf” to 80 seconds with a sampling time (“ts”) of 0.1 seconds to simulate 800 steps, provided your model's logic supports this scaling without compromising accuracy.
To know more about the difference between simulation time and sampling time, refer to the following MATLAB Answer:

カテゴリ

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

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by