Numerical integration of function where the input data is not sampled uniformly in time

131 Views Asked by At

My goal is to integrate a function $\dot{x}=f(x,u)$ (a known function) forward in time, but the inputs are not evenly spaced.

The ad-hoc solution is to just resample the input so that it is uniformly spaced, which is what I have done in Matlab's ODE45 function for some time. However, I am curious if there are methods out there that take this explicitly into account.

I have Googled for these methods, but putting in the word variable/non-uniform is usually interpreted as the step size that the method itself chooses for accuracy, which is not what I want.

1

There are 1 best solutions below

0
On BEST ANSWER

Suppose you know $x(t-a)$, and $x(t+b)$. Using Taylor expansions, you have $$ x(t-a) = x(t) - ax'(t) + \frac{a^2}{2} x''(t) + O(a^3) $$ and $$ x(t+b) = x(t) + bx'(t) + \frac{b^2}{2} x''(t) + O(b^3). $$ Recall $x'(t)=f(x,u)$. So,

$$ x(t-a) \approx x(t) - af(x(t),u) $$ $$ x(t+b) \approx x(t) + bf(x(t),u) $$

You have 2 equations and two unknowns. ($x(t)$ and $f(x(t),u)$. In other words, you can always derive some sort of relation for the value of the function with non-uniform spacing via a Taylor series. The catch here is that, unlike evenly-spaced samples, the we don't get an extra order of magnitude for free (via exact cancellation).

Another perfectly fine technique is to simply run a sufficiently good interpolating polynomial (purposefully vague here!) and take exact derivatives of that wherever necessary.