# How can I estimate an first ODE with first order data, with the third order ODE form?

Let's assume that we have the data $$y(t), u(t)$$ and it's from a first order ODE:

$$\dot y(t) + a y(t) = b u(t)$$

But we have a ODE form at third order: $$\dddot y(t) + a \ddot y(t) + b \dot y(t) + cy(t) = d u(t) + d \dot u(t)$$

To estimate, I like to do that in this way:

$$\dddot y(t) = -a \ddot y(t) - b \dot y(t) - cy(t) + d u(t) + d \dot u(t)$$

Then I set this on the form:

$$b = Ax$$

Where I solve $$x$$ with pseudo inverse:

$$x = A ^ {\dagger} b$$

Or I can set the equation like this:

$$0 = -a \dddot y(t) -b \ddot y(t) - c \dot y(t) - dy(t) + e u(t) + f \dot u(t)$$

And find the null space parameters.

The problem is that I try to curve fit first order ODE on a third order ODE form. Is there any way or algoritm to avoid this problem, because I don't know if my data is first order, second order or third order or higher.

How do I know if I should use first order, second order or third order ODE if I got input and output data $$u(t), y(t)$$ ?

• Your question makes no sense to me, can you rephrase it? What exactly is given and what is not? Are you given $y,u$ and want to find corresponding coefficients? This is not at all uniquely determined, especially if you're not also given suitable initial data for derivatives of $y$.
– Ian
Dec 19, 2018 at 1:35
• Yes. I was given y and u and want to find the corresponding coefficients. But I don't know if I should use an third order ODE, second order ODE or first order ODE to fit on. I can compute the derivative of y. Dec 19, 2018 at 1:43
• But you cannot compute higher derivatives of $y$?
– Ian
Dec 19, 2018 at 3:07
• I'm a bit confused by your question. Are you trying to find $c,d$ given $a,b,y(t),u(t)$, or what? Dec 19, 2018 at 7:13
• I'm going to find the parameters of an ODE and I got the input and output data. But I don't know if I should use first order ODE or second order ODE because the dynamisc of the data is unknow. Dec 19, 2018 at 9:25

I try to minimize $$min _x ||Ax - b||$$ where $$A$$ is my candidate functions of the derivatives and input $$u$$. The function glpk is a GNU Octave function for linear programming. Very fast!
A = [-dx, -dx.^2, -sin(dx), -ddx, -ddx.^2, -sin(ddx), u, sin(u)];

$$x$$ will be for example $$[3.1, 0, 0, 0, 0, 0, 2.3, 0]$$ for a first order data.