-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to pass exogenous input signals to components? #123
Comments
Unfortunately there is no component to do this at the moment but there should be. Or at least a tutorial to demonstrate a solution to this not uncommon task. You have two options:
|
Thanks a lot for these very helpful suggestions. I will take a look soon. |
The easiest way to incorporate data like this is probably to create an interpolation function using any of the interpolators from Have a look at how some of the sources in the standard librsry are implemented, like the sine source
Then change the equation to use the interpolator |
If this is implemented without a discrete update operator or callback, your data has to be somewhat smooth in oder to get correct results. Although, in the library are step sources that seem to work just fine without, so the solvers are already quite good at handling this. |
For most systems, there will be exogenous input signals as control inputs/disturbances, such as the outdoor air temperature.
Say I have a zone temperature file saved as a csv, and the temperature is sampled every hour. But I have a system, which runs at a time step of 5 min. How can I connect this exogenous temperature to
Thermal.PrescribedTemperature
, and solve the resulting ODE on a 5-minute basis?In Modelica, there is a block called
TimeTable
, which performs auto interpolation between time indexes. Is there any similar block inModelingToolkitStandardLibrary
for this purpose?The text was updated successfully, but these errors were encountered: