Hopsan / hopsan

Hopsan is a free multi-domain system simulation tool developed at the division of Fluid and mechatronic systems at Linköping university.
Apache License 2.0
161 stars 44 forks source link

There is a problem with sensors being initialized before the c or q components #1142

Open hopsan-bot opened 6 years ago

hopsan-bot commented 6 years ago

Author Name: Peter Nordin (@peterNordin) Original Redmine Issue: 1142, https://flumes.iei.liu.se/redmine/issues/1142 Original Date: 2014/04/02


There is a problem with sensors being initialized before the c or q components The sensor will get the start value from the c-component but the when the components are initialized a new "initial value" may be calculated, and this value is not sensed by the sensor until the next time step.

hopsan-bot commented 6 years ago

Original Redmine Comment Author Name: Peter Nordin (@peterNordin) Original Date: 2014/06/13 16:13:24 +0200


One possible improvement to this issue is to divide the signal chains into

  1. Those that originate from a C or Q component (actually a sensor component)
  2. Those that ends into a C or Q component (but are not originating from one)
  3. Those that both originate and ends in a C or Q component.

Group 1 should be initialized LAST after C and Q components Group 2 should be initialized FIRST before C and Q components Group 3 will still be a problem, (it is not clear if they should be initialized first or last) maybe both would work ?

Switching priority to HIGH as this is important. Calculations made from 1. will become incorrect unless startvalues = initial values

hopsan-bot commented 6 years ago

Original Redmine Comment Author Name: Peter Nordin (@peterNordin) Original Date: 2014/12/09 15:02:59 +0100


See appended model, compare plot in scopes to flow and pressure from the 2/2 valve The sensors are initialized before the initial flow and pressure is calculated, and the default startvalues in the sensor are used instead. (Should sensors even have default start values)

hopsan-bot commented 6 years ago

Original Redmine Comment Author Name: Peter Nordin (@peterNordin) Original Date: 2014/12/12 16:43:59 +0100


OK this is a bit more complicated then a simple bug, we need to discuss this in detail (chicken and the egg problem) what is initialized first and why

peterNordin commented 6 years ago

Related to #1162