ALSETLab / RaPId

RaPId (a recursive acronym for "Rapid Parameter Identification") utilizes different optimization and simulation technologies to provide a framework for model validation and calibration of any kind of dynamical systems, but specifically catered to power systems.
GNU Lesser General Public License v3.0
40 stars 12 forks source link

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

Open lvanfretti opened 8 years ago

lvanfretti commented 8 years ago

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 commented 8 years ago

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 commented 3 years ago

Closed by mistake.