dymola - How to determine value from previous time step during simulation in Modelica? -
how can determine value previous time step during simulation in modelica? have equation q=m*c*(ts2-ts1-tr)
need extract value of ts2
, ts1
it.
ts2
- value time step 2ts1
- value previous time stepts
input signal , has variations during time. each step has different value. in case time step 1s. other values fixed.
can set in equation variable time
? example:
ts2 (start=time); ts (start=time-1);
or should input inside model?
regards tymofii
this addressed in a similar question already.
the key point equations describing physical behavior cannot refer time steps. because there no "timestep" in nature or laws of physics , response of system cannot depend on it.
you don't explain why need doing. trying extract simulation results? trying correlate experimental data? or, trying solve differential equation?
it isn't clear want do. please elaborate , can give guidance on how proceed in modelica.
update
using values "previous interval" fine. example, if wanted sample solution @ regular intervals, express "z transform" or implement kalman filter in modelica, each of (for example, see 'sample' keyword here). in other words, possible store many previous values like.
what cannot use timestep of continuous solver in expressing how system behaves. intervals reference must independent intervals solver using.
Comments
Post a Comment