0% found this document useful (0 votes)
66 views44 pages

7 - Analysis Based On State Space

This document provides an introduction to state space models, including: 1. Defining state space models and their continuous and discrete time representations using state, input, output and system matrices. 2. Examples of deriving state space models from physical systems and representing them in controllable, observable, and diagonal canonical forms. 3. Explaining advantages of state space analysis and computing the time domain solution of models in diagonal form using the state transition matrix.

Uploaded by

Josue
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views44 pages

7 - Analysis Based On State Space

This document provides an introduction to state space models, including: 1. Defining state space models and their continuous and discrete time representations using state, input, output and system matrices. 2. Examples of deriving state space models from physical systems and representing them in controllable, observable, and diagonal canonical forms. 3. Explaining advantages of state space analysis and computing the time domain solution of models in diagonal form using the state transition matrix.

Uploaded by

Josue
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

Diseño Mecatrónico

Analysis Based on State Space


MCTG1013

Marcelo Fajardo-Pruna, PhD Carlos Saldarriaga, PhD


[email protected] [email protected]
ORCID ID: 0000-0002-5348-4032 ORCID ID: 0000-0001-9014-681X
SCOPUS ID: 57195539927 SCOPUS ID: 57222549377
Introduction to State Space Model

• State Space Model is a mathematical model in control engineering.

• It is a state-space representation of a physical system of a set of inputs and outputs along


with some set of state variables related by first-order differential equations.

• State variables in this model are a type of variable whose value changes over time and
depends on the values that have been given for the input variables.

• The value of the output variables depends on the value of the state and input variables.
Putting a model into state-space representation is the basis for many methods in control
analysis and the dynamics process.
Continuos Representation of State Space Model

• The continuous-time form of state-space model of Linear Time-Invariant(LTI) can be


represented as:

𝒙𝒙̇ 𝑡𝑡 = 𝐴𝐴𝐴𝐴 𝑡𝑡 + 𝐵𝐵𝐵𝐵(𝑡𝑡)


𝒚𝒚 𝑡𝑡 = 𝐶𝐶𝐶𝐶 𝑡𝑡 + 𝐷𝐷𝐷𝐷(𝑡𝑡)

• The first equation is the state equation, and the second equation is the output equation
respectively.
• 𝑥𝑥 𝑡𝑡 is the state vector. • A is the system matrix

• 𝑥𝑥̇ 𝑡𝑡 is the differential state vector. • B is the input matrix and C is the output matrix
respectively.
• 𝑢𝑢(𝑡𝑡) is the input vector.
• D is known as the feed-forward matrix.
• 𝑦𝑦 𝑡𝑡 is called the output vector.
Basic Terms related to State-Space Model

• State: It is a group of different variables, which concludes the whole history of the given
system to predict the future values of the variables that are, output variables.

• State Space: State Space is known as the set of all possible and known states of a
system. In state-space, each unique point represents a state of the system.

• State Variable: The state variables are one of the sets of state variables or system
variables that represent the whole system at any given period.

• State Vector: State Vector is a vector in which state variables are represented as
elements.

• Stability: In General, in any state-space model, we can define the stability of the system
using the eigenvalues of the state-space matrix A.
Example of State-Space Model

• Consider the example shown below and derive a state-apace model for the figure. The
input here is 𝑓𝑓𝑎𝑎 and the output is 𝑦𝑦.

• we can derive free body equations at two points from the above-shown figure, x, and y.

𝑚𝑚𝑥𝑥̈ + 𝑘𝑘1 𝑥𝑥 + 𝑘𝑘2 𝑥𝑥 − 𝑘𝑘1 𝑦𝑦 = 𝑓𝑓𝑎𝑎 𝑏𝑏𝑦𝑦̇ + 𝑘𝑘1 𝑦𝑦 − 𝑘𝑘1 𝑥𝑥 = 0


• In the above figure, we have three energy storage elements, so we obtain three state
equations. Here, the energy-storing elements are the spring 𝑘𝑘2 , the spring 𝑘𝑘1 , and mass
m. So, our state variables will be x and y.
𝑞𝑞1 = 𝑥𝑥
𝑞𝑞2 = 𝑥𝑥̇
𝑞𝑞3 = 𝑦𝑦
• Now, we need to find equations for these derivatives. The motion equations from the free
body diagram when input 𝑢𝑢 = 𝑓𝑓𝑎𝑎 are,
𝑞𝑞̇ 1 = 𝑥𝑥̇ = 𝑞𝑞2
1
𝑞𝑞̇ 2 = 𝑥𝑥̈ = (𝑓𝑓𝑎𝑎 − 𝑘𝑘1 𝑞𝑞1 − 𝑘𝑘2 𝑞𝑞1 + 𝑘𝑘1 𝑞𝑞3 )
𝑚𝑚
𝑘𝑘1
𝑞𝑞̇ 3 = 𝑦𝑦̇ = (𝑞𝑞1 − 𝑞𝑞3 )
𝑏𝑏
𝒒𝒒̇ 𝑡𝑡 = 𝐴𝐴𝐴𝐴 𝑡𝑡 + 𝐵𝐵𝐵𝐵(𝑡𝑡)
𝒚𝒚 𝑡𝑡 = 𝐶𝐶𝐶𝐶 𝑡𝑡 + 𝐷𝐷𝐷𝐷(𝑡𝑡)

0 1 0
𝑘𝑘1 + 𝑘𝑘2 𝑘𝑘1 0
− 0 1
𝐴𝐴 = 𝑚𝑚 𝑚𝑚 , 𝐵𝐵 =
𝑘𝑘1 𝑘𝑘1 𝑚𝑚
0 − 0
𝑏𝑏 𝑏𝑏

𝐶𝐶 = 0 0 1 , 𝐷𝐷 = 0
Advantages of state-space analysis

1. The analysis is done based on the initial condition.

2. More accurate than transfer function techniques.

3. Analysis of multi-input and multi-output systems is made easy by using the state-space
model.

4. Gives information about controllability.

5. The state-space analysis applies to all dynamic systems


Canonical State-Space Realizations

• For any given system, there are essentially an infinite number of possible state space
models that will give the identical input/output dynamics. Thus, it is desirable to have
certain standardized state space model structures: these are the so-called canonical
forms.

• For any given system, there are essentially an infinite number of possible state space
models that will give the identical input/output dynamics.

• Thus, it is desirable to have certain standardized state space model structures: these are
the so-called canonical forms.
• Consider the system defined by

• where 𝑢𝑢 is the input, 𝑦𝑦 is the output and represents the 𝑛𝑛𝑡𝑡𝑡 derivative of 𝑦𝑦 with respect
to time. Taking the Laplace transform of both sides we get:

• which yields the transfer function:

• Given the a system having transfer function as defined above, we will define the
controllable canonical and observable canonical forms.
Controllable Canonical Form

• The controllable canonical form arranges the coefficients of the transfer function
denominator across one row of the A matrix:

• The controllable canonical from is useful for the pole placement controller design
technique.
• Consider the system given by

• Obtain a state space representation in controllable canonical form.

• By inspection, 𝑛𝑛 = 2 (the highest exponent of s), therefore 𝑎𝑎1 = 3, 𝑎𝑎2 = 2, 𝑏𝑏0 = 0, 𝑏𝑏1 = 1
and 𝑏𝑏2 = 3. Therefore, we can simply write the state space model as follows:
Observable Canonical Form

• The observable canonical form is defined in terms of the transfer function coefficients of
as follows:

• Note the relationship between the observable and controllable forms:


• Consider the system given by

• Obtain the observable canonical form state space model.

• By inspection, 𝑛𝑛 = 2 (the highest exponent of s), therefore 𝑎𝑎1 = 3, 𝑎𝑎2 = 2, 𝑏𝑏0 = 0, 𝑏𝑏1 = 1
and 𝑏𝑏2 = 3. Therefore, we can simply write the observable canonical form model as
follows:
Diagonal Canonical Form

• The diagonal canonical form is a state space model in which the poles of the transfer
function are arranged diagonally in the A matrix.

• The denominator polynomial can be rewritten by partial fraction expansion as follows:

• Then the diagonal canonical form state space model can be written as follows:
• Consider the system given by

• Find the diagonal canonical form state space model.

• The transfer function of the system can be re-written with the denominator factored as
follows:

• therefore, 𝑝𝑝1 = 1 and 𝑝𝑝2 = 2. Trivially, the partial fraction expansion of the denominator
gives 𝑐𝑐1 = 2 and 𝑐𝑐2 = 1 and the diagonal from model can be written as:
Time Domain Solution of Diagonal Form

• A useful result of the diagonal form model is that the state transition matrix Φ 𝑡𝑡 = 𝑒𝑒 𝐴𝐴𝐴𝐴 is
easily evaluated without resorting to involved calculations:

• This greatly simplifies the task of computing the analytical solution to the response to
initial conditions.
Jordan Form

• The Jordan form is a type of diagonal form canonical model in which the poles of the
transfer function are arranged diagonally in the A matrix. Consider the case in which the
denominator polynomial of the transfer function involves multiple repeated roots:

• The denominator polynomial can be rewritten by partial fraction expansion as follows:


• Then the Jordan canonical form state space model can be written as follows:
Discrete State Space Representation

• The state space representation is one of the ways to model dynamical systems

• The model of the behavior of the position of a mechanical system driven by a dc motor
can be described by the following state space representation:

• Where 𝑥𝑥 𝑡𝑡 and 𝑢𝑢 𝑡𝑡 are the state vector and the control input
• The control input 𝑢𝑢 𝑡𝑡 is the voltage that we send to the DC motor

• The state vector 𝑥𝑥 𝑡𝑡 is composed of:

• the current of the armature, 𝑖𝑖 𝑡𝑡

• the speed of the mechanical part, 𝑤𝑤 𝑡𝑡

• the position of the part, 𝜃𝜃 𝑡𝑡


State Space Concept

• Most of the systems that are computer controlled are in general considered to evolve
continuously in time.

• Let us consider a system described by the following state space equations:

• where 𝑥𝑥 𝑡𝑡 , 𝑢𝑢 𝑡𝑡 and 𝑣𝑣 𝑡𝑡 represent respectively the state, the control input and the
disturbance of the system

• This dynamics can be rewritten as the one in previous slide by redefining the control as

𝑢𝑢 𝑡𝑡
and the control matrix as 𝐵𝐵 𝐵𝐵1
𝑣𝑣 𝑡𝑡
• The solution of the state space equation is given by:

• where 𝑡𝑡0 is the initial time and Φ 𝑡𝑡 is the transition matrix Φ(𝑡𝑡) = ℒ −1 𝑠𝑠Ι − 𝐴𝐴 −1 .

• Let 𝑡𝑡0 = 𝑘𝑘𝑘𝑘 and 𝑡𝑡 = 𝑘𝑘 + 1 𝑇𝑇, where 𝑇𝑇 is the sampling period of the system. With a zero-
order-hold the control 𝑢𝑢 𝜎𝜎 is supposed to be constant and equal to the value taken at
period 𝑘𝑘𝑘𝑘, i.e. 𝑢𝑢 𝜎𝜎 = 𝑢𝑢 𝑘𝑘𝑘𝑘 , for 𝑘𝑘𝑘𝑘 < 𝜎𝜎 < 𝑘𝑘 + 1 𝑇𝑇. Defining Ψ 𝑇𝑇 and 𝑊𝑊 𝑘𝑘𝑘𝑘 as:
• we obtain the following state space representation in the discrete-time domain:

• It is customary to use the representation 𝑥𝑥 𝑘𝑘 in place of 𝑥𝑥 𝑘𝑘𝑘𝑘 . Therefore, 𝑥𝑥 𝑘𝑘 means


the vector 𝑥𝑥 𝑡𝑡 at time 𝑡𝑡 = 𝑘𝑘𝑘𝑘.

• The state space representation of a linear time invariant discrete system when the
external disturbance is equal to zero for all 𝑘𝑘 ≥ 0 is given by:
Time Response and Its Computation

• The more general form of the discrete-time state space representation is given by:

• where 𝐺𝐺 = Φ, 𝐻𝐻 = Ψ, 𝐶𝐶 and 𝐷𝐷 are constant matrices with appropriate dimensions.

Block diagram of discrete-time linear system


Example
• Consider a system with the following dynamics for the output 𝑦𝑦 𝑡𝑡 :

• 𝑢𝑢 𝑡𝑡 Reference Input
• 𝑣𝑣 𝑡𝑡 a unit-step disturbance
• The difference equation of this system:
10𝑦𝑦̈ 𝑡𝑡 + 𝑦𝑦̇ 𝑡𝑡 = 10𝑢𝑢 𝑡𝑡 + 𝑣𝑣 𝑡𝑡

• By choosing
𝑦𝑦 𝑡𝑡 = 𝑥𝑥1 𝑡𝑡
𝑦𝑦̇ 𝑡𝑡 = 𝑥𝑥̇ 1 𝑡𝑡 = 𝑥𝑥2 𝑡𝑡
𝑦𝑦̈ 𝑡𝑡 = 𝑥𝑥2̇ 𝑡𝑡 = −0.1𝑥𝑥2 𝑡𝑡 + 𝑢𝑢 𝑡𝑡 + 0.1𝑣𝑣 𝑡𝑡
• The state space equations are:

𝑥𝑥̇ 1 𝑡𝑡 0 1 𝑥𝑥1 𝑡𝑡 0 0
= + 𝑢𝑢 𝑡𝑡 + 𝑣𝑣 𝑡𝑡
𝑥𝑥̇ 2 𝑡𝑡 0 −0.1 𝑥𝑥2 𝑡𝑡 1 0.1

𝑥𝑥1 𝑡𝑡
𝑦𝑦 𝑡𝑡 = 1 0
𝑥𝑥2 𝑡𝑡

• First of all notice that the fast dynamics in this system is linked to the pole −0.1, which
corresponds to a constant time τ = 10s. Therefore an appropriate choice of the sampling period
T is equal 1s.

1 s + 0.1 1
Φ 𝑡𝑡 = ℒ −1 𝑠𝑠𝑠𝑠 − 𝐴𝐴 = ℒ −1
𝑠𝑠 𝑠𝑠 + 0.1 0 𝑠𝑠

1/s + 0.1 1
Φ 𝑡𝑡 = ℒ −1
0 𝑠𝑠
• We also have:

• Therefore:

• Since 𝑣𝑣 𝑡𝑡 = 1 for 𝑡𝑡 ≥ 0, then we have:

• If 𝑇𝑇 = 1 second, then we obtain:


Canonical forms

• It is well known that a physical system may have many state space representations. Most
of the cases, we consider the canonical forms (controllable from, observable form and the
Jordan form). The one, we just presented, is the controllable form. The other forms will be
developed here.

• For the Jordan form, remark that:

• which implies that:


• Letting now:

• which implies:

• From this we get the following state space representation:


• For the observable canonical form notice that from:

• we get:

• From this we obtain:

• By letting:
• that give in turn:

• Finally we get the following description for our system:

• where
• Another description can be obtained by letting:

• The computations of all the matrices for the discrete-time description can be done in a
similar way as we did for the controllable form.
Time Response and Its Computation

• Consider the state difference equation:

• Before giving the solution of this difference equation, let us show that

• In fact, the z-transform of the transition matrix, 𝜙𝜙 𝑘𝑘 = 𝜙𝜙 𝑘𝑘𝑘𝑘 , is given by:


• Pre-multiplying both side of this relation by𝜙𝜙 𝑇𝑇 𝑧𝑧 𝐺𝐺 = 𝜙𝜙 𝑇𝑇 and subtracting the result
from this relation, we get:

• which can be rewritten as:

• Taking now the inverse z-transform on both sides of this relation, we get:
• Another approach can be used to show this. In fact, the Z-transform of the previous state
description gives:

• Multiplying by 𝑧𝑧𝑧𝑧 − 𝐺𝐺 −1 , we get:

• Taking now the Z-inverse transform, we obtain:

• Notice that 𝐺𝐺 𝑘𝑘 = 𝒵𝒵 −1 [ 𝑧𝑧𝑧𝑧 − 𝐺𝐺 −1 𝑧𝑧] is the transition matrix.


• Finally, we get the following expression for the solution of the difference equation:

• It is also important to note that the solution, can be obtained using a recursive approach.
• 𝑘𝑘 = 0,

• 𝑘𝑘 = 1,

• 𝑘𝑘 = 𝑁𝑁 − 1 𝑇𝑇,

• 𝑘𝑘 = 2,

• Substituting the (𝑁𝑁 − 1) equations for 𝑥𝑥 𝑁𝑁 − 1 𝑇𝑇 , 𝑥𝑥 𝑁𝑁 − 2 𝑇𝑇 ···, 𝑥𝑥 𝑇𝑇 , we get:


• For 𝑁𝑁 = 𝑘𝑘 we get:

• The characteristic equation is:

• Recall that a discrete system is stable if and only if the roots of the characteristic equation
lie inside the unit circle centered at the origin.
Stability (eigenvalues)

• Given a state space description

• for a system, the transfer function is given by:

• Therefore, the poles of H(s) are uncancelled eigenvalues of A.

• Note that the eigenvalues of A appear as exponents in the solution of state x(t) (although
some of them may not appear at the output due to pole-zero cancellations).
• As a result for a given (A, B, C, D) to be stable (internal stability), all eigenvalues of A
should be stable.

• Consider the example

• where

• Eigenvalues of A are −2(stable) and 3(unstable).

• Output is equal to the first state, which is decoupled from the second state: 𝑦𝑦(𝑡𝑡) =
𝑥𝑥1 (𝑡𝑡).
• The transfer function of this system:

• The transfer function has only a stable pole (-2) (after the pole-zero cancellation).

• Now let's look at the states


• So the first state and output are fine, however, 𝑥𝑥2 (𝑡𝑡) will grow unbounded. As a result,
1
• The transfer function 𝐻𝐻(𝑠𝑠) = is input/output stable.
𝑠𝑠+2

• Its state space realization given above is unstable (internally unstable realization of a
stable transfer function).
• We can actually provide many stable state-space descriptions for the same system, one
of which is:

You might also like