Seconds, minutes or hours for year-long SIMULINK simulation?

68 ビュー (過去 30 日間)
Ulrik
Ulrik 2022 年 12 月 5 日
コメント済み: Ulrik 2022 年 12 月 7 日
I want to model a physical system, a renewable energy production device (several megawatts) that reacts to environmental forces and I want to understand its behavior over a year or more. I think Simscape is the right tool for this.
I understand SIMULINK/Simscape's time unit is dimensionless. However, there seem to be aspects of SIMULINK/Simscape programming that indicates it is designed for running only in seconds in real time. For example, the 256x max playback increase in the animation, and certain units for certain elements contain seconds (like the damping coefficient of a Revolut Joint being in N*m/(deg/s)).
What is best practice? To keep everything in seconds and just set time steps to be several seconds and stop times to be millions of seconds? Or should I convert everything to e.g. hours (meaning I need to multiply force in Newtons by 13M as it has units kg*m/s^2)?
I am asking now before I get too far along in developing the model at which point it might be very painful to convert (as I will likely miss some time unit in some subsystem of a subsystem and might spend days or weeks debugging during a conversion).

採用された回答

Jim Riggs
Jim Riggs 2022 年 12 月 5 日
編集済み: Jim Riggs 2022 年 12 月 5 日
There is a great risk of somthing going wrong if you use anything other than seconds in a physics model, since, as you pointed out, there are many physical parameters that we use that have implied units.
I have previously built simulations of planetary motion which run for years of simulation time, but the basic calculations were done in seconds. I define variables like minute = 60, hour = 60*minute and day = 24*hour, and then set my simulation time step = k * hour.
  5 件のコメント
Jim Riggs
Jim Riggs 2022 年 12 月 6 日
It's always wise to do tests for accuracy when employing numerical methods. This is how you determine what basic step size is needed for the particular problem you are working. Also, in general, there is a great advantage to using higher-order numerical integration methods interms of accuracy and speed of computation, so these are worth becoming familiar with.
If you find my input helpful, it would be nice if you would "accept" my answer.
Thanks.
Ulrik
Ulrik 2022 年 12 月 7 日
Sorry for not accepting your answer - even gave you a vote in hopes that it further helps your standing in the community!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by