BAMresearch / probeye

A general framework for setting up parameter estimation problems.
MIT License
5 stars 5 forks source link

Is time a sensor parameter or a static input #15

Closed joergfunger closed 2 years ago

joergfunger commented 3 years ago

I'm currently looking at a time dependent problem with a fixed time discretization, where for each time step the PositionSensors are supposed to return a value. When thinking about how to implement this, there are actually several options.

  1. The time steps are fixed and given to the constructor. In addition, there is a TimePosition sensor that has a location and a time step (or a multidimensional TimePosition sensor with time steps and locations). Those time steps could be a subset of the given time steps or even totally different. In this case, after each solution step in time the sensors are checked, and of the time instance matches, the values are stored - or interpolated.
  2. The time steps are solely determined by the individual sensors, so the union of all sensor times determines the time steps in the solution procedure. This seems to be computationally very demanding (e.g. when modelling the tensile test with thousands of data points, but we know that the model in between is actually linear and interpolation (linear or higher order) is really not a problem.

For the first option with the interpolation (my favorite), we could define this also independent of the experiment (so directly passing to the constructor), or as an input_sensor (so different for each experiment). I guess all of the options are valid, but when writing a TimePositionSensor (I already did that in my local file), we are somehow fixing that. What is your opinion on that?

aklawonn commented 3 years ago

For me, the time would be in input_sensor to the forward model as in the multiple_sensors example. But it would be interesting to see some code for your example.

joergfunger commented 3 years ago

The problem with that is that this does not allow to have multiple sensors with different times being used. E.g. for the current Hannover demonstrator, we had two measurement recording systems (one for laser and forces) and the other one for the stereo data with different sampling frequencies. If this is an input to the forward model (and thus the same for all sensors), the returned outputs do not have the same length as the experimental values. In addition, even if we have only a single dataset, but large measurement data (in the elastic test they use at least 10Hz, or even more), thus we would need for 90s 900 forward model evaluations, even though an approximation with just one (for the elastic case) and interpolating would be totally sufficient (this is the extreme case, but usually an adative time integration scheme is really beneficial and the error when interpolating can be adjusted and reduced to small values depending on what is needed.