Skip to content

Input-output differential equation

Common form of analytical form:

a0yn1+a1yn2+···+anyn=b0xn1+b1xn2+···+bnxn
  • an and bn are parameters that decided by the corresponded variable.
  • the order of the variable is not necessary to be continuous, it depends on the effect of each physical factor in the system
  • for the right side(input), coefficient and the type of the physical input do are not required to be corresponded with the output side. But it is IMPORTANT to keep the dimension of each part of the equation the same (since we need to use "+" to link them in one equation)
Then we introduce p as an operator which denote the order of the model:

pi means that the model is in order i

For example: In a=vt=xtt=dxdtdt, dxdt=px(t),

so, we have $\displaystyle a = p(px(t)) = p^2x(t)$.

And we can use a(p)y(t)=b(p)u(t) to simplify the equation. Notice that for the specific formula, we still need to note the variables and coefficients like: a(p)=mpi+np+k This expansion of a(p) let us know the order and coefficient of each item.


Transfer function

Laplace transform

We introduce this method to simplify the calculation of differential equation.
After been Laplace transformed, differential equation becomes to simple algebra equation.

Here we introduce s as an operator corresponded to operator p we have mentioned above.

The operator s indicates that the item was differentiated in the differential equation, and the order of the operator s is corresponded to the order of p in the differential equation.

Then it is important to notice that the note of each variable should be Upscaled after been Laplace transformed.

At last we take RL-circuit as case for example:

First of all, we establish a mathematic model:

LdI(t)dt+RI(t)=V(t)

Then we make it easier to read using operator p:

(Lp+R)I(t)=V(t)

so we transform it into Transfer function:

W(s)=1Ls+R, //we can also replace s with p, they represent the same thing.


State-Space model

Why we need it?

While the Transfer function cannot handle with multiple input/output, we introduce this tool to:

  • represent a complicated system with matrix
  • make the differential equation easier to sole
  • analyze the stability of the system(using poles and zeroes)

How to establish the model?

From the output side(left), we can get a formula that represent the system itself:

a0yn1+a1yn2+···+anyn=b0u

In this formula, u is the input variable, and yn are the system variables.

We introduce xn as the state variable to replace yn, making the formula easier to solve for us, and for computer(all items are in the first order after we introduce the state variable):

xn=yn1

And we get equations about formula:

x1=yx1=x2=yx2=x3=yxn=yn1=a0x1a1x2anxn1+b0u

Put x1 to xn together into a state vector

Since we establish the state-space model to describe the change of the system, we need the derivative of the state variable which implicates how the change happen while the time change.

So we can change these equations into a matrix:

x=[A][x1x2xn]+[B]u,

In this model, matrix A are the coefficients represent the relationship between input(variables) and output(system variables).

Matrix A multiplied by state vector equals to makes the items in new matrix to the first order, which means they are differentiated by time.


From Transfer Function to State-Space model

Coefficients in matrix B are corresponded to the coefficients of the numerator of W(s)

So we can easily establish the connection between State-Space model and Transfer function:

We firstly have a input-output differential equation: y+a2y+a1y+a0y=bu+u

then we change it to the Transfer function form through multiply with operator s: s3Y(s)+a2s2Y(s)+a1sY(s)+a0Y=bsU(s)+U(s)

So the Transfer function is: W(s)=bs+1s3+a2s2+a1s+a0

AND we can get the coefficients of matrix A from the Transfer function easily and do not need to think a lot:

A=[010001a0a1a2]

B=[001], matrix B here must be transferred from the Transfer function, or it will be in multiple order and do not meet the requirement.


From State-Space Model to Transfer Function

It will be a bit more complicated to do this.

First of all, we have a known State-Space model:

{x=Ax+Buy=CTx

Apply Laplace Transform to each equation and we can get:

{sX(s)=AX(s)+BU(s)Y(s)=CX(s)

Tidy the formula, and reduce X(s), so it comes to: (sIA)X(s)=BU(s) then X(s)=C(sIA)1BU(s) so Y(s)=C(sIA)1BU(s) then Ws=C(sIA)1B

Inverse Matrix will needed here