7 - Analysis Based On State Space
7 - Analysis Based On State Space
• 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 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.
0 1 0
𝑘𝑘1 + 𝑘𝑘2 𝑘𝑘1 0
− 0 1
𝐴𝐴 = 𝑚𝑚 𝑚𝑚 , 𝐵𝐵 =
𝑘𝑘1 𝑘𝑘1 𝑚𝑚
0 − 0
𝑏𝑏 𝑏𝑏
𝐶𝐶 = 0 0 1 , 𝐷𝐷 = 0
Advantages of state-space analysis
3. Analysis of multi-input and multi-output systems is made easy by using the state-space
model.
• 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:
• 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
• 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:
• 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.
• Then the diagonal canonical form state space model can be written as follows:
• Consider the system given by
• 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 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
• Most of the systems that are computer controlled are in general considered to evolve
continuously in time.
• 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:
• 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:
• 𝑢𝑢 𝑡𝑡 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:
• 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.
• which implies:
• we get:
• By letting:
• that give in turn:
• 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
• Before giving the solution of this difference equation, let us show that
• 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:
• It is also important to note that the solution, can be obtained using a recursive approach.
• 𝑘𝑘 = 0,
• 𝑘𝑘 = 1,
• 𝑘𝑘 = 𝑁𝑁 − 1 𝑇𝑇,
• 𝑘𝑘 = 2,
• 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)
• 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.
• where
• 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).
• 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: