0
$\begingroup$

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)$ ?

$\endgroup$
10
  • $\begingroup$ 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$. $\endgroup$
    – Ian
    Dec 19, 2018 at 1:35
  • $\begingroup$ 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. $\endgroup$
    – euraad
    Dec 19, 2018 at 1:43
  • $\begingroup$ But you cannot compute higher derivatives of $y$? $\endgroup$
    – Ian
    Dec 19, 2018 at 3:07
  • $\begingroup$ I'm a bit confused by your question. Are you trying to find $c,d$ given $a,b,y(t),u(t)$, or what? $\endgroup$
    – Dylan
    Dec 19, 2018 at 7:13
  • $\begingroup$ 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. $\endgroup$
    – euraad
    Dec 19, 2018 at 9:25

1 Answer 1

0
$\begingroup$

I found the answer!

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 = glpk([1 1 1 1 1 1 1 1], A, b)

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

$\endgroup$

You must log in to answer this question.

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