I’m about to attempt parameter estimation using DifferentialEquations, and have a couple of questions – I hope someone can share their experience. I’ve read the tutorial, and some previous discussion.

- My problem is a single PDE of how temperature in a tank varies with some boundary inputs (influent temperature, some heating power, some volumetric flow rates, some control inputs). I have discretized the PDE using the finite difference method.
- I have data consisting of 5 inputs (“manipulated variables”) and 2 temperatures outputs sampled every minute.
- One of the sampled output temperatures T_\mathrm{s} is a combination of an influent temperature T_\mathrm{i} and the (unknown) effluent temperature T_\mathrm{e}; T_\mathrm{s} = u_\mathrm{v} T_\mathrm{e} + (1-u_\mathrm{v})T_\mathrm{i} where u_\mathrm{v} is a control input (a split range valve setting).
- Because of the form of measurement/data T_\mathrm{s} is not a state, I assume that it is best to pose the model as a DAE so that I can have T_\mathrm{s} as a solution – ODEs can only have states as a solution, I guess.
- I will probably use 2 hyper parameters in the model fitting: (i) the number n of compartments in the discretized model, and (ii) the weight \lambda of the regularization term.
- I noted Chris’ response to
`alewolf`

on how to choose which variables in the DAE solver are used in the loss function (`save_idxs`

argument).

My **questions** are the following…

- My input data are available at a discrete time interval (1 min). I can handle this in two ways:

a. Set up a`for`

loop, and solve the DAE over 1 minute with constant input, passing the final result as initial time to the next iteration in the for loop, and let the cost function be the sum of each sub sum, or

b. Create an interpolation function for the input data so that the DAE solver knows the value at all times.

Which is recommended, (a) or (b)? - In general, initial states will be unknown, and I assume that I should pose these as unknown parameters in the model fitting? (n compartments…)
- The regularization term – it looks like the standard is to add the squared 2-norm of the parameter vector. If I have some idea of what the parameters should be… which is best?

a. Add bounds for the parameters in the optimization problem, or

b. Formulate the regularization term to be the norm of the deviation of the parameter from some initial guess?

c. Combining the above, i.e., combine (a) and (b)? - If my
*validation*set is not immediately following in time my training set, the initial states of the validation set will be unknown. How to I handle this problem?

- Use state estimation for the validation problem?
- Use state estimation for both the validation problem and the training problem for assessing hyper parameters?

- If I vary my two hyper parameters simultaneously (n and \lambda) and compare the RMSE of both the training set and the validation set to choose the hyper parameters, I get a 2D problem. Should I tackle one at a time?