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

66 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Troubleshooting 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by