You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
initial equation
if initType == Init.SteadyState then
der(x) = 0;
elseif initType == Init.InitialState then
x = x_start;
elseif initType == Init.InitialOutput then
y = y_start;
end if;
Variables in clocked partitions cannot be used in initial equation or initial algorithm sections.
I know that the specification is considered more or less flawed when it comes to achieving the goal of being able to "sample any continuous-time model",
The goal is that every continuous-time Modelica model can be utilized in a sampled data control system. This is achieved by solving the continuous-time equations with a defined integration method between clock ticks. With this feature, it is for example possible to invert the nonlinear dynamic model of a plant, see Thümmel et al. (2005), and use it in a feedforward path of an advanced control system that is associated with a clock.
but while waiting for the specification to achieve this goal, the ClockedWithDiscretizedContinuousController should use a control block without initial equations.
The text was updated successfully, but these errors were encountered:
henrikt-ma
changed the title
ClockedWithDiscretizedContinuousController uses clocked PI block with initial equation
ClockedWithDiscretizedContinuousController has clocked variable in initial equation
Sep 3, 2024
The
ClockedWithDiscretizedContinuousController
contains a clocked instance ofModelica.Blocks.Continuous.PI
:ModelicaStandardLibrary/Modelica/Clocked/Examples/SimpleControlledDrive/ClockedWithDiscretizedContinuousController.mo
Line 30 in 35ad28d
However, this block contains an initial equation:
This means that the clocked variable
y
violates one of the two very basic rules about synchronous variable initialization in https://specification.modelica.org/master/synchronous-language-elements.html#initialization-of-clocked-partitions:I know that the specification is considered more or less flawed when it comes to achieving the goal of being able to "sample any continuous-time model",
but while waiting for the specification to achieve this goal, the
ClockedWithDiscretizedContinuousController
should use a control block without initial equations.The text was updated successfully, but these errors were encountered: