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

Dynamic Optimization (Parameter Estimation and Correction over time) #5

Open
lvanfretti opened this issue Oct 21, 2015 · 2 comments
Open

Comments

@lvanfretti
Copy link
Member

We need to figure out how we could support optimization over time, meaning that in the time-horizon during the simulation, we can calibrate the parameters of the model or the control actions.
This is known as dynamic optimization, but control people uses in NMPC.

Some of this work has been done in OpenModelica: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.278.7832&rep=rep1&type=pdf

So I am not sure we need to support this in full or if even possible given that for some methods we would need a linearized model and I think that is supported only partially in FMI 2.

However, I think that for some problems such approach, or similar such as trajectory sensitivities can be useful.

@tinrabuzin
Copy link
Contributor

I'm just going to put this here because I was looking into this when I was doing something with RaPId and I saw that it is relevant now to this issue.

Allegedly, the 2.0 FMUs with a possibility of tuneable parameters can be generated in Dymola and JModelica.

From Dymola document:

If you want to change parameters during simulations, then I will suggest to use FMI 2.0 rather than FMI 1.0 FMUs. This feature is supported in FMI 2.0. Latest version of Dymola for instance are capableof generating such FMUs. I think that PyFMI also supports FMI 2.0."

From a paper "Functional Mockup Interface 2.0: The Standard for Tool independent Exchange of Simulation Models":

The new value “tunable” introduced in FMI 2.0 al- lows a modeling environment to expose independent parameters that can be manually “tuned” during simulation (for example, during simulation a modeler might change the gain of a PID controller, or the load mass of a drive train in order to quickly improve the design).

“Tuning a parameter” during simulation does not mean to “change the parameter online” during simu- lation (since this might introduce Dirac impulses). Instead, this is a short hand notation for:

  1. Stop the simulation at an event instant (usually, a step event, in other words after a successful integration step).
  2. Change the values of the tunable parameters.
  3. Compute all parameters that depend on the tunable parameters.
  4. Resume the simulation using as initial values the current values of all variables and the new values of the parameters.

With this interpretation, changing parameters online is “clean”, as long as these changes appear at an event instant.

@lvanfretti
Copy link
Member Author

Closed by mistake.

@lvanfretti lvanfretti reopened this Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants