Simple steady state initialization of a PI controller as FMU
leading to a linear system of equations over FMUs during
initialization
With this test model it is tested how the initialization of an
FMU can be changed in the environment where this FMU is used. The
FMU is a PI controller that is initialized in steady state which in
turn leads to a constraint on the inputs. However, this cannot be
directly formulated as FMU. The implementation is performed in the
following way:
- In order that the causality of the FMU of the input signals
does not change during initialization, a dependent parameter
"residue" with initialization fixed = false is introduced. In case
the inputs follow the constraint of the PI initialization, residue
is computed to zero (as it should be).
- The FMU initialization is not yet complete, since the PI state
is not defined during initialization. Therefore, the PI state is
initialized.
- When used in the environment without special handling, the
PI-controller is initialized so that PI.x has the given start value
and the parameter residue = u1 - u2. To formulate the desired
steady-state condition, the initial value of the PI state is
associated with n parameter x0 with fixed = false (so this
parameter is computed). Now, one initial condition is missing and
it is introduced by adding the initial equation "residue = 0".
Note, when generating the FMU, parameter PI.residue should have
"causality = output" and "variability = fixed" (since public,
dependent parameter).
Contents
| Name |
Description |
WithFMUsReference |
Reference solution in pure Modelica using exactly the same
structuring as in Model WithFMUs |
WithFMUs |
Solution with FMUs |
FMUModels |
For all models in this package an FMU must be generated |
Generated at 2026-04-04T18:18:28Z by OpenModelicaOpenModelica 1.26.3 using
GenerateDoc.mos