Reputation: 167
in the modelica language I found the time derivative of x used in this equation:
der(x) = 1 - x
as always the x is set to 0 by default, what I don't understand is how this equation drives the value of x towards 1.0.
reached the 2 seconds mark, shouldn't it go to negative instead of stabilizing to 1.0?
source: https://mbe.modelica.university/behavior/equations/first_order/
Thank you
Upvotes: 1
Views: 256
Reputation: 578
From Calculus, time derivative of x (i.e. dx/dt (t0) ) represents the amount of increase or decrease of a variable as simulation proceeds at time point t0. Remember Taylor series expansion:
x(t0 + dt) = x(t0) + dx/dt(t0) . dt + O(dt^2)
So from this Calculus-based observation it is straightforward to see that:
der(x) > 0
, then x
will increase as the simulation runs and vise versa.x
will increase as time increases but der(x)
would decrease as x increases.der(x)
approaches 0, then the increase of x
will slow down and x tends to 1.x
is equal to 2, then der(x) = -1
at the start of the simulation and it approaches 0 as time increases and meanwhile x
approaches 1.x = 1
, then der(x) = 0
and x
would neither increase nor decrease. The value of x = 1
is the steady-state of the given ODE system that makes der(x) = 0
Upvotes: 4