Академический Документы
Профессиональный Документы
Культура Документы
T
x x1 x 2 ... x n y (t ) y (t ) ... y ( n 1) (t )
containing the previously defined states.
which is a vector
d
d
xn y ( n 1) g ( y, y ,..., y ( n 1) , u ) g ( x1 , x2, ..., xn , u )
dt
dt
Because of the way we defined the states, the first equation simply states that the
derivative of x1 is x2. The second equation states that the derivative of x2 is x3. The
only non-trivial differential equation is the derivative of xn which could be a function
of all the other states plus the input u.
x3
2
...
...
xn g ( x1 , x2 ,..., xn , u )
On the left hand side we have the matrix x . On the right hand side we have a matrix
whose components are functions of the state's x and the input u. Consider the MassSpring system we looked at earlier, and governed by the ordinary differential equation
shown:
my(t ) ky(t ) u (t )
The highest derivative that appears in this equation is the second derivative, making
this a second order system. We need to define the states x1=y and x2= y .
Next, we create the state vector x. In this case, x contains only two components, y and
y dot which we have designated as x1 and x2:
T
T
x x1 x 2 y y
We can now define the system of first-order differential equations. The first equation
is trivial and simply states that the derivative of x1 is x2.
d
d
x1 y y x 2
dt
dt
We get the second equation by solving for y using the governing ordinary differential
equation.
d
d
u (t ) ky(t ) u (t ) kx1
x2 y y
dt
dt
m
m
We see that the derivative of x2 is a function of x1 and u.
We can write these two differential equations as a matrix:
x2
x1
u
(
t
)
kx
1
x
2
m
We see that because k and m are constants, the system is actually linear in the states
and input. As a result, we can write the equations in the following manner:
x1 0
x k
2 m
1 x 0
1
u (t )
0 x2 1
m
This equation is in the form x = Ax + Bu, which is the general form for a linear statespace equation. Again the matrix equation is linear in the states, x, and the inputs, u.
We can demonstrate how to extend this procedure to higher-order systems by using
the Planar Quadrotor Model. From the lecture we know the Planar Quadrotor is
governed by the following set of ordinary differential equations which are written in
the terms of the variables y, z and :
my sin( )u1
mz cos( )u1 mg
I xx u2
Here, the highest derivative appearing in any differential equation is the second
derivative, so this is still a second order system.
Next, we essentially must carry out the required steps for each variable. Because n=2,
we to need define states for the position and velocity of y, z, and . This gives us a
system with six states:
x1 y , x2 z, x3 , x4 y , x5 z, x6
We place these six states into one state vector:
x x1
x2
x3
x4
x5
x6 y
T
T
z
We can now define the system of first-order differential equations. Again, the first
three equations simply relate states to each other:
d
d
x1 y y x4
dt
dt
d
d
x2 z z x5
dt
dt
d
d
x3 x6
dt
dt
The last three equations come from rearranging the three governing ordinary
differential equations:
d
d
sin( )u1 sin( x3 )u1
x4 y y
dt
dt
m
m
d
d
x5 z z cos( )u1 mg cos( x3 )u1 mg
dt
dt
d
d
u
x6 2
dt
dt
I xx
We can now place these equations into a single matrix equation:
x4
x1
x5
x
x6
x3 sin( x )u
3 1
m
x4
x5 cos( x3 )u1 mg
u2
x6
I xx
These equations are non-linear because of the functions sine and cosine of the state x3.