Skip to content
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

Reference data should be properly sampled to avoid aliasing issues #4017

Open
casella opened this issue Oct 7, 2024 · 0 comments
Open

Reference data should be properly sampled to avoid aliasing issues #4017

casella opened this issue Oct 7, 2024 · 0 comments

Comments

@casella
Copy link
Contributor

casella commented Oct 7, 2024

Consider the negative regression report of OMC on the Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayVariableReturn.diff.con.T2Sup.T variable.

immagine

The transient lasts one day and is sampled every 200 s, which in general seems a reasonable value to avoid generating too large simulation result files. However, around time = 60000, the temperature undergoes a relatively fast and poorly damped oscillation

immagine

which causes the verification test to fail because the results computed by OMC get (slighty) out of the tolerance tubes.

Result checkers such as CSV-compare usually have some tolerance both on the time and y axes, to accommodate for small mismatches in delays. This could be enough to accommodate the result of OMC's simulation if the reference tube was properly computed, i.e. as a damped sinusoidal oscillation. It is clear that a sampling interval of 200 s is too crude for this purpose, so the edgy tubes computed as a result are unnecessarily causing the verification to fail.

This test case may actually motivate the need for a different Interval for regular simulations and for testing simulations. In the first case, the 3-minutes interval is probably good enough for practical purposes, at the end of the day nobody cares about seeing those oscillations in great detail. However, for comparison purposes, one should probably take something like 20-40 s. Of course we could just set Interval = 40 in the experiment annotation, but this would unnecessarily cause much larger simulation results. If we had a custom annotation for verification tests only, that would be the right place to put this. BTW, reference simulations do not save all the variables, but typically only a few selected ones, so even if Interval is much shorter, that won't be a problem.

See discussion in modelica/ModelicaSpecification#3473

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant