0
$\begingroup$

I want to fit a model $$\overset{\cdot} x = Ax + v(t)Bx + Cu(t)$$

to data, where $u(t),v(t)$ are known inputs and $A,B,C$ should be fitted. The data are assumed to be drawn from the above model but with an $i.i.d.$ noise, that is for the data $y_t$ we would have $$y_t = x(t) + \eta$$ $$\eta \sim \mathcal{N}(0,\sigma^2)$$

Now I want to use linear regression to fit the model to the above data. Is it an appropiate approach to use $$ \overset{\cdot}{y_t} \approx \frac{y_{t+1}-y_{t}}{\delta t} =: z_t$$

and then use linear regression for $$z_t | y_t = Ay_t + v_tBy_t + Cu_t + \eta_z$$

with $\eta_z \sim \mathcal{N}(0, \frac{2 \sigma^2}{(\delta t)^2})$?

Or should I not make this approximation? (In the simple 1-d case of no input one could e.g. fit an equation of the form $\ln y_t = at + \ln x0$, i.e. using the explicit solution, but I don't see how to generalize this)

Any help would be appreciated, also I would be glad for some link where exactly this special case is treated. (Most ressources I find are rather detailed info on system identification, which I think is too much for this simple case)

$\endgroup$
2
  • $\begingroup$ Please, have a look at math.stackexchange.com/questions/3470910/… $\endgroup$
    – Cesareo
    Commented Apr 12, 2021 at 14:28
  • $\begingroup$ thanks for the link! but that means I have to integrate an ode in any case? implementation-wise, I guess it will then not make too much difference if I just use some optimization method on $||y-x(A,B,C)||$ (where I integrate $x$)? $\endgroup$
    – a_student
    Commented Apr 12, 2021 at 15:04

1 Answer 1

1
$\begingroup$

As

$$ x(t) = C\exp \left(\int _0^t(A+B v(\eta ))d\eta \right)\int _0^t\exp \left(-\int _0^{\mu }(A+B v(\eta ))d\eta \right) u(\mu )d\mu +c_0 \exp \left(\int _0^t(A+B v(\eta ))d\eta \right) $$

given the data points $\{t_k,x_k,k=1,\cdots,n\}$ we can form the error function

$$ \sum_k\|x_k-x(t_k)\|^2 = \mathcal{E}(A,B,C.c_0) $$

and then proceed with a minimization method to find the minimum for $\mathcal{E}(A,B,C.c_0)$.

$\endgroup$
3
  • $\begingroup$ Thanks for the answer, this is also what I thought at first but this seems way slower than the above approach (which is not necessarily an issue). Do you have a particular recommendation for an optimization method to use (ideally one that is already implemented somewhere in python)? $\endgroup$
    – a_student
    Commented Apr 14, 2021 at 9:17
  • $\begingroup$ MATHEMATICA from Wolfram has a handy function called ParametricNDSolve which solves softly this kind of problem. Perhaps you can find something similar with Matlab. Those hints are concerning the integration issues. For minimization you can choose any nonlinear solver steep descent based. $\endgroup$
    – Cesareo
    Commented Apr 14, 2021 at 9:37
  • $\begingroup$ In Python you can find from scipy, optimize. $\endgroup$
    – Cesareo
    Commented Apr 14, 2021 at 9:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .