Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
4 views25 pages

State Space

The document provides an introduction to control system analysis and design in state-space, focusing on second-order systems. It discusses the concepts of state variables, state-space representation, and the relationship between external and internal descriptions of dynamical systems. Additionally, it covers the state equations, canonical forms, and the stability of linear time-invariant systems.

Uploaded by

Zaid Hussein
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)
4 views25 pages

State Space

The document provides an introduction to control system analysis and design in state-space, focusing on second-order systems. It discusses the concepts of state variables, state-space representation, and the relationship between external and internal descriptions of dynamical systems. Additionally, it covers the state equations, canonical forms, and the stability of linear time-invariant systems.

Uploaded by

Zaid Hussein
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/ 25

Automatic control

with interactive tools


Supplementary material

Introduction to control system analysis and design in


state-space

Second order systems

José Luis Guzmán


(Professor of Systems Engineering and Automatic Control - UAL)

Ramón Costa-Castelló
(Professor of Systems Engineering and Automatic Control - UPC)

Manuel Berenguel
(Professor of Systems Engineering and Automatic Control - UAL)

Sebastián Dormido
(Professor of Systems Engineering and Automatic Control - UNED)
2 ·
Introduction to control system analysis
and design in state-space

Introduction

In automatic control theory, two descriptions of dynamical systems are commonly used, the external
description and the internal description. The external description establishes an explicit functional rela-
tionship between input and output signals, which in the text has been expressed in the form of a transfer
function. The internal description is based on the concept of the state of a dynamical system:

• The state of a dynamical system is understood as the minimum set of variables such that if their
value is known at an instant t0 as well as the inputs for t ≥ t0 , the behavior of the system is
completely determined for any future time t ≥ t0 (if the system is deterministic1 ).

• That minimum set of variables defining the state of the dynamical system are known as state vari-
ables. If at least n variables x1 (t), x2 (t), ..., xn (t) are required to fully describe the behavior of a
dynamical system, such n variables are a set of state variables. In general, the set of dependent
variables constituting the state can be chosen in different ways. In physical systems, the state is
composed of variables that represent storage of mass, energy and momentum.

• These n variables that configure the state are usually grouped in a vector that is called the state
vector of the dynamical system. Thus, a state vector is one that uniquely determines the state of a
dynamical system x (t) for any time t ≥ t0 , once the state at t = t0 and the input u(t) for t ≥ t0
are known.A dynamical system with one input u(t) and one output y(t) can be represented by an
ordinary differential equation (ODE) of the form:

dx (t)
= ẋ (t) = f ( x (t), u(t)), y(t) = g( x (t), u(t))
dt
where f : IRn × IR → IRn and g : IRn × IR → IR are functions without discontinuities, where n is
the dimension of the state vector (system order). A representation of this type is known as a state
1
A system in which chance is not involved in the future states of the system.
2 · Introduction to control system analysis and design in state-space

space model. When the functions f and g are not explicitly time dependent, it is a time invariant
system. The function f provides the speed of change of the state vector as a function of the state
x (t) and the control signal u(t) and the function g provides the measured values of the output
as a function of the state x (t) and the input u(t) [1]. These functions determine the time response
of the system [4]. (ū,x̄) is said to be an equilibrium state (point) if f (ū, x̄) = 0 (notice that notation
(ue ,xe ) will also be used in this framework to describe the equilibrium state). If that condition is
met, when all the constituents of the transient response have decayed (under the assumption of a
stable system), the system output reaches a steady-state. An equilibrium state is a solution of the
original differential equation in a steady-state characterized by a constant position or oscillation
(in the latter case the system state is called a permanent regime). The equation ẋ = 0 may have
several solutions. Which ones are acceptable depends on their stability, the stable ones are locally
considered [2]. If functions f and g are linear in x and u, the system is linear time invariant (LTI)
and its representation will be given by:

dx (t)
= ẋ (t) = Ax (t) + Bu(t)
dt
y(t) = Cx (t) + Du(t) (0.1)

The first equation is the so-called state equation and the second output equation. In such a repre-
sentation A, B, C and D are matrices of constant coefficients. The matrix A is is called the dynamic
matrix, B is the control matrix, C is the sensor matrix, and D is the direct term, which is usually equal
to zero because otherwise it would provide non strictly causal systems in which a change in the
input would be directly reflected in the output [1].

• As said before, the n-dimensional space whose coordinate axes correspond to the state variables
x1 (t), x2 (t), ..., xn (t) is called state space. Any state is represented by a point in the state space, so
that the dynamic evolution of a system is a trajectory starting from the initial point (determined
by the value of the state vector at t = t0 ) and arriving at the end point, which is usually an equi-
librium state associated with a constant position or oscillation (steady-state or permanent regime).
A trajectory or orbit is the locus of x (t) in the phase portrait passing through x0 . Different initial
states result in different trajectories. The set of of all trajectories forms the phase portrait of a dy-
namical system, though in practice, only representative trajectories are considered. Phase planes
typically arise in the context of two-dimensional autonomous ODEs. The phase plane shows the
vector field of the system, which gives the velocity of the state (represented by an arrow) at each
point in the state-space. A family of evolution trajectories of the system is often referred to as the
phase plane (two-dimensions) or phase portrait in the general case. The phase plane is a state-space
in which the coordinates of a point provide all the information about the state of the system. In the
phase plane the arrows shown above are called isoclines, since they define the curve in the plane
where the trajectories have the same velocity (slope). Indeed, since ẋ (t) = f ( x ) = Ax (t) + Bu(t),
f ( x ) is a tangent vector to the curve x (t) in the phase plane and thus constitutes a vector field
whose isoclines are the points where f ( x ) is constant (Ax (t) + Bu(t) = c). For a generic second
Introduction · 3

order autonomous system2 :

x˙1 = f 1 ( x1 , x2 )
x˙2 = f 2 ( x1 , x2 )

the slope of the trajectory at the point x can be defined as:

f2 (x)
S( x ) =
f1 (x)

Equation S( x ) = c, with constant c, defines the isocline curves for different values of c.

• In this context, the free response of a dynamical system (also called natural response or zero-input
response) is the response generated, in the absence of inputs, by the initial conditions of the system
(non-zero). It is the part of the total response due to the system and the way it acquires or dissipates
energy. It is also considered the part of the response determined by the roots of the characteristic
polynomial. The forced response is that due exclusively to variations in the input signal, assuming
zero initial conditions. The forced response is the solution when the initial conditions are zero and
the system is subjected to an input signal u(t). In LTI systems, the total response of the system is
the superposition of the free response and the forced response.

Logically, there is a relationship between the external description and the internal description. Math-
ematical models of LTI systems are usually represented by linear ODEs of order n. Applying the prop-
erties of the Laplace transform with zero initial conditions, a transfer function can be obtained whose
order coincides with that of the differential equation from which it comes. The internal description starts
from the same differential equation, but transforming it to a system of n first-order differential equations,
where each one describes the dynamic evolution of a state. In a way, through the state variables, all the
dynamic past of the system at the current instant t is being condensed. In the transformation of the linear
differential equation of order n to the system of n first-order equations, there are theoretically infinite
ways of defining the state variables and in fact, sometimes they will have a certain physical meaning,
but most of the time they will be mathematical variables without physical meaning.

2
A system that is not subject to external signal influences.
4 · Introduction to control system analysis and design in state-space

State-space

Interactive tool: state_space

Concepts analyzed in the card and learning outcomes

• Concept of state.

• Internal description.

• Differential equation of state.

• State-space.

• Canonical forms.

• Exponential matrix.

• Convolution equation.

• Linear feedback control law of the complete state.

Theory As discussed in the introduction to this document, the two typical representations of time-
invariant linear system models are the transfer function (external description) and the state space repre-
sentation (internal description). The general realization in state-space is given by:

dx (t)
ẋ (t) = = Ax (t) + Bu(t) (0.2)
dt
y(t) = Cx (t) + Du(t) (0.3)

The first equation is the so-called state equation and the second output equation. In LTI systems, A, B, C
and D are matrices of constant coefficients. In this application we will deal with the case of strictly causal
systems and therefore we will consider D = 0 throughout the development, so that there is no direct
transfer of signals from input to output. The vector x (t) is the state vector and its components are the
state variables; u(t) and y(t) are respectively the input and output of the system3 .
In this document we will deal exclusively with the complete state vector feedback problem by study-
ing the case of systems with one input and one output where n = 2, since it is the simplest case and
richest in visual content. The summary, however, will be done for the generic n-dimensional case for
systems with one input and one output.
3 In general, if the system has n-order with m outputs and p inputs the dimensions of the state-space matrices of the model are:
A = n × n; B = n × p; C = m × n; D = m × p.
State-space · 5

The representations in the state-space are not unique, and there are a number of canonical forms,
among which the following two stand out. If the transfer function of a strictly causal system4 is given
by:
b sn−1 + ... + b1 s + b0
G ( s ) = n n −1 (0.4)
s + an−1 sn−1 + ... + a1 s + a0
the following canonical forms, among others, are obtained:

Controllable Canonical Form (C):


 
..
 
 0 .  0
..
   
 
 0 In − 1   .
;
 
AC = .. BC =  
..
  

 . .

  0 
   
− a0 − a1 ··· − a n −1 1

CC = [b0 b1 · · · bn−1 ] ; D C = [0 ] (0.5)


Observable Canonical Form (O):
   
0 ··· 0 − a0 b0
 
 ..   
 . − a1  
 b1


;
 
AO =  .. BO = 
 ..



 In − 1 . 
 
 . 

..
 
. − a n −1 bn − 1

CO = [0 · · · 0 1] ; DO = [0] (0.6)
where In−1 is the identity matrix of dimension n − 1.
On the other hand, if the Laplace transform is applied to the state-space representation, the relation-
ship linking the matrices of the state-space description with the transfer function is obtained:

G (s) = C (sI − A)−1 B + D (0.7)

The solution of the equations defining the state-space representation of a LTI system is obtained through
the convolution equation5 :
Z t
x (t) = e At x0 + e A(t−ξ ) Bu(ξ )dξ , e At = L−1 {(sI − A)−1 } = Φ(t) (0.8)
| {z } 0
free response
| {z }
forced response
4
The general case is described in [7], pages 649-651. If the system is not strictly causal, the numerator in (0.4) includes a term bn s n
added to the polynomial, so that the order of the numerator is equal to that of the denominator. If bn 6 = 0, C in the Controllable
Canonical Form is given by CC = [( b0 − a0 bn ) ( b1 − a1 bn ) ... ( bn −1 − an −1 bn )] and DC = bn . Notice that in the Observable
Canonical Form BO = CCT , · T meaning transpose, CO = BCT , and DO = DC .
5 Convolution is a complex operation on functions defined by the integral of the two functions multiplied together and shifted

in time.
6 · Introduction to control system analysis and design in state-space

where it has been considered that t0 = 0, Φ(t) is the state transition matrix and x0 = x (t0 ) = x (0). It can
be approximated by the series expansion of the exponential matrix6 :

A2 t2 A3 t3 ∞
Ak tk
Φ(t) = e At = I + At + + + ... = ∑ (0.9)
2! 3! k =0
k!

Differentiating this expression with respect to t gives:

d d A3 t2 ∞
Ak tk
Φ(t) = e At = A + A2 t + + ... = A ∑ = Ae At (0.10)
dt dt 2! k =0
k!

When working with a description of LTI system in state-space, the system is said to be asymptotically
stable if the state x (t) → 0 when t → ∞ with x (0) = x0 . This can be shown to be the case when the
eigenvalues7 of matrix A have negative real part. Moreover, if there are no pole-zero cancelations, it can
be demonstrated that the eigenvalues of matrix A and the poles of the system are equal. The solution of
the autonomous (unforced) system ẋ (t) = Ax (t) for a state is given by xi (t) = xi (0)eλi t , with λi being
the eigenvalues of the system or roots of the characteristic equation J (s) = det (sI − A) = 0. Therefore,
the stability can be easily evaluated by analyzing the sign of the eigenvalues λi , so that the system will
be stable if all eigenvalues have negative real part.
An autonomous linear system given by ẋ(t) = Ax (t) has a phase plane with non-intersecting tra-
jectories describing the evolution of the system for any initial condition. For a generic system ẋ (t) =
f ( x (t)), x̄ = xe is said to be an equilibrium state if f ( xe ) = 0. For the second-order systems discussed
in this card, as long as matrix A is non-singular, six types of responses associated with the equilibrium
states can be obtained, depicted in Figure 0.1. The eigenvalues describe how the solution varies over
time and this solution is often also called the mode of the system, while the eigenvectors provide the
shape of the solution [1]. This concept of stability is part of a more general one, valid also for non-linear
systems. Let x (t, x0a ) be a solution to the differential equation with initial condition x0a . A solution is
stable if other solutions whose initial condition is close to x0a remain close to x (t, x0a ) [1]. Formally, the
solution x (t, x0a ) is said to be stable if for all ǫ > 0, there exists δ > 0 such that:

|| x0b − x0a || < δ → || x (t, x0b ) − x (t, x0a )|| < ǫ, ∀t > 0

This type of stability is often referred to as stability in the Lyapunov sense or Lyapunov stability. When
x (t, x0a ) = xe the equilibrium point is said to be stable. In autonomous linear systems, the origin is
always an equilibrium point. A solution x (t, x0a ) is asymptotically stable if it is stable in the Lyapunov
sense and it satisfies that x (t, x0b ) → x (t, x0a ) when t → ∞ for x0b for x0b is sufficiently close to x0a [1].
6
An excellent summary of definitions and matrix calculus results useful for the study of many questions related to dynamic
and control systems can be found in Appendix of the reference [3].
7 In linear algebra, the eigenvectors of a linear operator are the nonzero υ vectors such that, when transformed by the operator,

they give rise to a scalar multiple of themselves, thus not changing their direction. This scalar λ is called the eigenvalue. There-
fore, v is said to be an eigenvector of A with eigenvalue λ if Aυ = λυ. Often, a transformation is completely determined by its
eigenvectors and eigenvalues. An eigenspace is the set of eigenvectors with a common eigenvalue.
State-space · 7

Figure 0.1 Classification of equilibrium points for second order systems

The introduction of control concepts when working with a state-space representation is usually done
by means of so-called regulators. Regulators tend to keep the system output constant in the presence of
disturbances. For this reason, when designing regulators, transient specifications are taken into account,
which translate into achieving a desired position of the poles of the system using feedback. In state-
space, the most classical way of approaching the control problem is to assume that the system starts
from an initial state x (t0 ) 6= 0 and that through control it has to be brought to the origin of the state-
space (equilibrium state) with dynamic characteristics determined by the assignment or placement of
the poles of the closed-loop system. The control applied is generally based on a linear feedback of the
state vector, where the measurements or estimates of the system states are used to generate the control
signal u(t) = −Kx (t) after multiplication by gains computed to provide the desired behaviour.
A system is said to be controllable if, using an appropriate set of inputs (which in state-space control
consists of a linear feedback of the state vector u(t) = −Kx (t), as said before), states can be moved
in an arbitrary direction in the state space. In other words, a system is fully controllable if there is an
unrestricted control u(t) that can take any initial state x (t0 ) to any other desired state x (t) in a finite time
t0 ≤ t ≤ t f [4]. This concept is equivalent to being able to place the poles of the controlled system at any
location in the complex plane. The pair ( A, B) is controllable if and only if the rank of the controllability
matrix Ω is n (the determinant of Ω is non-zero), where n is the order of the system, that is, the dimension
 
of A. The controllability matrix is given by: Ω = B AB A2 B ... An−1 B .
If the system is linear and completely controllable, there are several formulas to calculate the values
of the feedback gains (elements of the vector K). The characteristic polynomial of the system is given by
the eigenvalues of the dynamic matrix A: J (s) = det (sI − A) = sn + an−1 sn−1 + ... + a1 s + a0 = 0. With
u(t) = −Kx (t), if we consider the case of regulation to the origin (without external reference), we have
that ẋ (t) = ( A − BK ) x (t), so the characteristic polynomial of the closed-loop is given by the eigenvalues
of the matrix Acl = ( A − BK ). The transient regime specifications can be translated into the location of
the dominant poles of the closed-loop system, i.e. the characteristic equation of the closed-loop system:
Jcl (s) = sn + αn−1 sn−1 + · · · + α0 . Therefore, a possible synthesis strategy (called eigenvalue assignment
or pole placement) can be to impose that det (sI − Acl ) = sn + αn−1 sn−1 + · · · + α0 .
The Controllable Canonical Form has the property that the parameters of the system are the coef-
8 · Introduction to control system analysis and design in state-space

ficients of the characteristic polynomial. Therefore, it is natural to work with this representation when
solving the eigenvalue assignment problem, as it produces a vector of feedback gains equal to K =
[(αn−1 − an−1 ) ... (α0 − a0 )].
The Ackermann’s formula [7] allows calculation of the feedback gain matrix of the state vector to place
the closed-loop poles in a desired position:

K = [0 0 · · · 1] Ω−1 Jcl ( A) (0.11)

where Jcl ( A) is the characteristic polynomial of the closed-loop particularized for matrix A (Jcl ( A) =
An + αn−1 An−1 + · · · + α1 A + α0 I).

Figure 0.2 State feedback stabilization: Free response

With this idea as a basis, a series of control schemes can be developed depending on the character-
istics of the disturbances exogenous to the system (existence of reference and input disturbances). The
basic control scheme is the one shown in Figure 0.2, which represents a stabilization (regulation) at the
origin with free response of the system. The dynamics of the closed-loop system is described by:

u(t) = −Kx (t) → ẋ (t) = ( A − BK ) x (t) = Acl x (t) → x (t) = e Acl t x0 , y(t) = Ce Acl t x0 , x0 = x (0) (0.12)

If the control problem is the tracking of a reference r, there are several control structures. The sim-
plest is shown in Figure 0.3, where the system is stabilized by following the input step using a control
structure with only one-degree-of-freedom (the gain K). The equations governing the dynamics of the
closed-loop system are:

u(t) = −Kx (t) + r (t) → ẋ (t) = ( A − BK ) x (t) + Br (t) (0.13)

If the reference is assumed to be constant at steady-state (as is the usual case and the case discussed in
this document), the equilibrium condition x̄ = xe = x (t → ∞), ẋ(t) = 0, is given by:

xe = −( A − BK )−1 Br → ye = Cxe = −C ( A − BK )−1 Br


State-space · 9

Figure 0.3 State feedback stabilization: Step response - system with one-degree-of-freedom (1DoF)

Figure 0.4 State feedback stabilization: Step response - system with two-degree-of-freedom (2DoF)

where in general ye 6= r and the response to a set point step produces a steady-state error.
To solve this problem in the presence of a non-zero reference signal, a scheme with two-degree-of-
freedom is introduced as shown in Figure 0.4. The reference is multiplied by a design constant called
reference gain Kr which aims to eliminate steady-state error:

u(t) = −Kx (t) + Kr r (t) → ẋ (t) = ( A − BK ) x (t) + BKr r (t) (0.14)

In steady-state:
xe = −( A − BK )−1 BKr r → ye = Cxe = −C ( A − BK )−1 BKr r

−1
Kr = → ye = r
(C ( A − BK )−1 B)
As can be seen, an appropriate choice of gain Kr allows the steady-state error to be eliminated, but does
not affect the stability of the system (which is determined by the eigenvalues of ( A − BK )).
This scheme works well when only changes in the reference occur, but causes steady-state error
when a step load disturbance d(t) is introduced at the input of the system (Figure 0.5). The equations
governing the dynamics and steady-state of this system are:

u(t) = −Kx (t) + Kr r (t) + d(t) → ẋ (t) = ( A − BK ) x (t) + B(Kr r (t) + d(t)) (0.15)
10 · Introduction to control system analysis and design in state-space

Figure 0.5 State feedback stabilization: Step response - system with two-degree-of-freedom (2DoF) and introduction of
a load disturbance d( t) at the system input


xe = −( A − BK )−1 ( BKr r + Bd) 
→ ye = r − C ( A − BK )−1 d → ye 6= r
−1
Kr = 
( C( A − BK ) −1B )

Figure 0.6 State feedback stabilization: Step response - system with two-degree-of-freedom (2DoF). Introduction of a
load disturbance d( t) at the system input and compensation by integral action (increasing the order of the system)

Therefore, to compensate for the influence of the load disturbance, it is necessary to introduce inte-
gral effect in the control loop, increasing the dimension of the system by one through the inclusion of an
additional state variable:
    
ẋ(t) Ax (t) + Bu(t) 

 =   xe = −( A − BK )−1 B(Kr r − Ki ze + d)
ż(t) r(t) − y(t) → (0.16)


 r−y = 0 → r = y
u(t) = −Kx (t) − Ki z(t) + Kr r (t) + d(t) 

The response in the phase plane does not follow the isocline map exactly. This is because the system is
of third order and the isocline map only depends on two variables.
Although the tool does not include a state observer analysis (only the description of the system in
Observable Canonical Form), a brief summary of its fundamentals is given below.
One of the main problems with state-space design is that it is usually impractical, either because not
all states are measurable or because it is too expensive to place many sensors. Hence the use of so-called
State-space · 11

observers makes sense, by means of which, from a set of inputs and outputs of the system, it is possible
to estimate the states of the system. If the estimated state is denoted as x̂ (t) , it follows that:

dx
= Ax (t) + Bu(t), x (0) = x0 (0.17)
dt
d x̂(t)
= A x̂ (t) + Bu(t), x̂ (0) = x̂0 (0.18)
dt

If we define x̆ (t) = x (t) − x̂(t), then:

d x̆ (t)
= A x̆ (t), x̆ (0) = x̆0 → x̆ (t) = e At x̆0 (0.19)
dt

Therefore, the observer error x̆ (t) tends to zero if the original system is stable. Since the initial conditions
of the system are not known, they have to be estimated. As formulated, this is an open-loop observer. If
the known output of the system is used and compared to that predicted by the observer, a closed-loop
observer formulation can be obtained:

x̂ (t)
= A x̂ (t) + Bu(t) + L(y(t) − C x̂ (t)); x̂ (0) = x̂0
dt

The dynamics with which the error between observed and real states tends to zero is determined by ( A −
LC ).Therefore, L is chosen so that the dynamics of the evolution of the error given by the eigenvalues
of ( A − LC ) is faster than the evolution of the system. Actually, in order to choose it, it is necessary to
previously analyze the possible noise and disturbances to which the output may be subjected, in order
to avoid the introduction and amplification of signals not modeled in the scheme. If these eigenvalues
can be located at any point in the complex plane, the system is said to be observable. Mathematically, a
system is observable if the rank of the observability matrix is n, where n is the dimension of the system.
 T
The observability matrix is given by: Θ = C T (CA) T (CA2 ) T ... (CAn−1 ) T .
The calculation of the observer gain vector L is done using a formula similar to the calculation of the
feedback gain vector K. If the desired characteristic polynomial for the state observer is denoted by JOcl ,
the vector L can be obtained from:
  −1  
C 0
   
0
   
 CA   
.. ..
   
   
L = JOcl ( A)  .   .
   
   
 CAn−2   0 
   
CAn−1 1

So-called minimum-order observers can also be designed, where it is assumed that only one set of plant
states needs to be estimated since the rest (usually the output) can be directly measured by sensors in
the system. The design of this type of observers is discussed in [7] and [8].
12 · Introduction to control system analysis and design in state-space

The idea behind the development of observers is that the estimated states can be used in the control
law by linear feedback of the state vector as if they were the true states. The question that arises at
this point is whether the stability of the closed-loop system is guaranteed in this way. The answer is
that there is a separation between the control and observation problems, i.e., one can find the controller
gains assuming that the states are accessible and then design an observer to estimate the states and
use them in place of the true states. The poles of the closed-loop system are the union of the controller
and observer poles. This leads to the well-known property or separation principle, which is a crucially
important result in modern control theory. This separation property can be analyzed by combining the
dynamics of the real states and of the estimation errors, obtaining:
     
dx ( t )
dt A − BK BK x (t)
 =    
d x̆( t )
dt 0 A − LC x̆ (t)

Note that from matrix theory, the eigenvalues of a piecewise triangular matrix are the union of the
eigenvalues of the diagonal blocks, from which the above separation theorem is obtained.

References

• [1] Åström, K. J. and R. M. Murray. Feedback systems: An introduction for scientists and engineers. Second
edition. Princeton University Press, ISBN:9780691193984, 2014.

• [3] Bolzern, P., R. Scattolini and N. Schiavoni. Fundamentos de control automático (Fundamentals of auto-
matic control). McGraw-Hill, ISBN: 978-84-481-6640-3, 2009.

• [4] Dorf, R. C. and R. H. Bishop. Modern control systems. Twelfth edition. Prentice Hall, ISBN: 978-0-13-
602458-3, 2011.

• [7] Ogata, K. Modern control engineering. Fifth edition. Prentice Hall, ISBN: 978-0-13-615673-4, 2010.

• [8] Ollero, A. Control por computador: Descripción interna y diseño óptimo (Computer control: Internal
description and optimal design). Marcombo, ISBN:84-267-0813-7, 1991.

• [9] Shahian, B. and M. Hassul. Control system design using Matlab. Prentice Hall, ISBN: 0-13-174061-X, 1993.
State-space · 13

Application

Interactive tool: state_space

State-space control
As indicated in the theory overview, this tool treats multiple concepts in a single application. How-
ever, the way it is structured facilitates the user to learn incrementally the ideas derived from the
use of a state-space representation of the system. The systems treated are second-order systems with
the possibility of incorporating a zero (the degree of the polynomial of the numerator will always be
m ≤ 1). No time delays are considered in this tool so as not to overcomplicate the understanding of
the basic concepts.

The Options menu is first analyzed, which contains two groupings. Through the first of these, an
(exclusive) selection is made of the type of graphic representation to be used in the right-hand area
of the tool:

• Time response: This is the default option when starting the application. The graphs represent
the time evolution of the system states (in the case of Free response) or the output of the system
(if the Forced response is used).
14 · Introduction to control system analysis and design in state-space

Application..

• Phase plane: If selected, this disables the Time response option and changes the graph in the
right-hand area of the tool to a two-dimensional representation of the phase plane where the
abscissa axis contains the coordinates of the first state x1 (t) and the ordinate axis contains the
coordinates of the second state x2 (t).

The other group of items in the Options menu allows the introduction of different plant structures.
In all cases it is restricted to second-order systems, which are the ones supported by the tool (as
visually they are the ones that support a two-dimensional representation in the phase plane). The
first elements of this group are the transfer functions P1 (s) (n = 2), P3 (s) (n = 2), P5 (s), P6 (s), P7 (s),
P7b (s) = P7 (s) with beta = 0, P12 (s) and P12b (s) = P12 (s) with beta = 0, included in the book
[6]. Then follows the option to include transfer functions in (NUM,DEN) or ZPK formats, restricted to
strictly causal second-order structures. This tool has also incorporated the possibility of representing
the system in internal description format (A,B,C), assuming D=0. In the latter case, the matrices and
vectors have to be entered in the following format: A=[a11,a12;a21,a22], B=[b1;b2], C=[c1,c2].

There are other important options that determine the configuration of the tool depending on the type
of cases to be analyzed. To facilitate interactivity, instead of placing these alternatives in the Options
menu, they have been placed over the graphs representing the Time response or the Phase plane and
also on the Pole-zero map. These are mutually exclusive pairs of options (exclusionary selection ):

• Free response - Forced response: These two options allow the tool to be configured so that the
time response or phase plane shown in the graphs (and the associated parameters), consider
only the free response of the system, i.e. the regulation to the origin (null reference) or the forced
response (tracking of a reference starting from null initial conditions).

• 1DoF - 2DoF: These options make sense when the Forced response representation has been se-
lected, as they enable the structure of one-degree-of-freedom (1DoF) in Figure 0.3 or two-degree-
of-freedom (2DoF) in Figure 0.4, where it is taken into account that the reference may be non-
zero. When in the Options menu the Phase plane representation is selected, a scroll bar is added
on the graph to facilitate the adjustment of the size of the isoclines.

In the lower left area of the tool the Pole-zero map is placed, where the poles (eigenvalues of the matrix
A) and zeros of the system under study are located, represented in red colour. Next to the title, there
are two excluding selection buttons called Analysis and Control:

• By selecting the Analysis option, it is possible to study the system response and the location of
the closed-loop poles (represented by the non-interactive symbol △) when the feedback gains
K1 and K2 are modified. The closed-loop zeros coincide with the open-loop zeros.
State-space · 15

Application...

• If the Control option is chosen, it allows the closed-loop analysis of the system to be carried
out when the location of the poles of the system has been fixed through the specifications and,
therefore, the calculation of the feedback gains is carried out automatically through Acker-
mann’s formula. In this case, the desired closed-loop poles are interactive, to allow the user to
position them anywhere in the complex plane so that they define certain performance specifi-
cations. These poles defining the desired closed-loop behaviour are represented by the symbol
✷.

The legends indicating the colour code associated with each dynamic element are visible at all times
in the bottom right-hand corner of the diagram. The coloured black triangle located in the lower area
of the graph can be used to change the background scale by clicking with the mouse to the right or
left of it.

The top left area of the tool defines the static gain of the system and the parameters of the controller
used, based on a linear feedback of the state vector. The Process parameters section includes a text
box and a slider to modify the value of the static gain of the system whose structure has been selected
via the Options menu (Pi (s)). The position of the poles and zero (if any) of that transfer function can be
modified through the Pole-zero map, where they can be placed in an arbitrary position that completely
defines its dynamics.
A symbolic representation of the system is displayed in the right-hand side of the Process param-
eters section in the form of a transfer function G ( s) and also in the form of a state space ẋ = Ax + Bu,
y = Cx + Du, which can be selected in the Controllable Canonical Form (C) or in the Observable Canonical
Form (O) buttons, via exclusionary radio buttons.
Below is the section Specifications and controller. On the left hand side, a series of text boxes and
sliders can be found, corresponding to the feedback gains K1 and K2 and the relative damping factor
ζ and undamped natural frequency ωn which define the position of the closed-loop poles that set the
transient behaviour specifications (or alternatively the time constants τ1 and τ2 when a closed-loop
overdamped system is required). When the tool is set to Analysis mode, only the feedback gains K1
and K2 can be modified, since in this mode these gains can be modified by the user to analyze their
effect on the location of the closed-loop poles and hence on the time response. As the gains K1 and
K2 are modified, the associated values of ζ and ωn also vary, since the position of the closed-loop
poles changes. If the application is configured in Control mode, the values of ζ and ωn can be freely
modified to impose a dynamic determined by the location of the closed-loop poles and the values of
K1 and K2 resulting from the application of Ackermann’s formula will be automatically updated.
16 · Introduction to control system analysis and design in state-space

Application...
To the right of these parameters, a symbolic representation of the internal description of the closed-
loop system is displayed in the form ẋ = Acl x, if the tool is in Free response mode, or in the form
ẋ = Acl x + Bcl r if it is in Forced response mode, corresponding to the schemes represented in Figures
0.3, 0.4 and 0.5. In the Forced response mode, it is possible to include disturbances at the input and
activate the Integral Action (Figure 0.6), via the selection box below the symbolic representation of the
internal dynamics of the closed-loop system. When activated, a slider and a text box become visible
which allows to modify the gain value of the integral term Ki to analyze its effect on the behaviour
of the closed-loop system.

As indicated at the beginning of the section, the right area of the tool is dedicated to the graphical
representations of the evolution of the system. When through the Options menu the Time response is
activated, the upper graph represents the evolution in time of the states x1 (t) and x2 (t) if the tool is
in Free response mode and the output y(t) if it is in Forced response mode. When the states are plotted,
a legend at the bottom right of the graph includes the colour code used for each state.
When using the Forced response, the graph shows a dashed horizontal line in green colour that
represents a constant reference. Both the circle above it and the dashed line are interactive elements
that facilitate the change of the step amplitude. Similarly, in the middle area of the graph, two other
circles (which by default are usually overlapping and located on the time axis) have been included
that can be used to impose the amplitude of a step-shaped load disturbance d(t) at the input of the
system and to change the instant at which the disturbance is introduced.
Both in the case of free response and forced response, the lower graph represents the evolution of
the control signal uc (t) = −Kx (t) + Kr r (t) (in free response r (t) = 0).

When the Phase plane option is chosen in the Options menu, the whole graphic area on the right is
occupied by this representation, including the isoclines whose density can be modulated by means
of the slider that becomes visible on the figure. Next to the slider there is also a text box (tmax) which
allows the simulation time to be changed (it has the same effect as a change in the background scale
in the Time response graphs using the △ symbol).
When working in Free response mode, there is always a regulation of the system to the origin of
the phase plane. In the lower left corner of the graph, the eigenvectors of the system are shown (the
eigenvalues are given by the position of the poles in the Pole-zero map). The initial conditions can
be modified interactively by clicking and dragging the magenta square (✷) to the desired position.
When the closed-loop poles are real, the associated eigenvectors are drawn in the phase plane. The
point representing the steady-state condition is represented by a cyan square (✷), which in the case
of the Free Response will always be located at the origin of the phase plane.
State-space · 17

Application...
If the Forced response mode is selected, the box that is fixed is the magenta one (✷), as the initial
conditions will always be at the origin and the one that can be moved will be a green box (✷), which
is linked to the amplitude of the reference that has been determined in the Time response mode.
The displacement of that box is equivalent to the change of the reference. As the tool is configured
for second order systems using the Controllable (C) or Observable (O) canonical forms, that box will
always be linked to one of the axes, which facilitates the analysis. When there is no steady-state error,
the green square (✷) will coincide with the cyan square (✷) that determines the steady-state. In this
mode the eigenvectors of the system are not represented.
The black squares (✷) located in the lower right and upper left corner of the graph, allow the
user to change the state variable that is represented on that axis when clicking on them. The black
triangle centred at the bottom of the graph makes it easy to change the background scale when the
mouse is clicked to the right or left of it.
18 · Introduction to control system analysis and design in state-space

Exercises

1. A second-order linear system can be written in general state space as:


   
dx (t) a11 a12 b1
ẋ (t) = =   x (t) +   u( t)
dt a21 a22 b2
y(t) = [ c1 c2 ] x ( t )
 
x1
x (t) =  
x2

Determine a linear feedback controller of the state vector of the form:

u(t) = −Kx (t) = −K1 x1 (t) − K2 x2 (t)

Such that the closed-loop characteristic equation is:

J (s) = s2 + 2ζωn s + ωn2 = 0

2. Particularize the above exercise to the case of a double integrator:

1
G ( s) =
s2

For the Free response and Analysis configuration, justify the effect on the system response of varying
the K1 parameter of the controller. Also that of parameter K2 .
Using the Free response and Control modes, design a controller that produces a closed-loop dynamic
with:

(a) ζ = 0.5 y ωn = 2 rad/s.


(b) ζ = 1.25 y ωn = 2 rad/s.

Calculate the eigenvalues and eigenvectors in both cases. Also obtain the trajectory in the phase
plane for generic initial conditions x1 (0) and x2 (0).

3. A plant is described by the following transfer function:

1
G ( s) =
s2 + µ2

Using the Free response and Control configuration, design a controller with specification ζ = 1 and
ωn = nµ, n = 2, 3, ... What effect does increasing the value of n have on the response of the system?
Calculate the eigenvalues and eigenvectors and the trajectory in the phase plane for generic initial
conditions x1 (0) and x2 (0).
State-space · 19

4. A plant is described by the following transfer function:


s+1
G ( s) =
s2 + 5s + 6
With the Free response and Control modes:

(a) Find the vector of feedback gains K that places the poles of this system at the roots of the
following equation s2 + 2ζωn s + ωn2 .
(b) Particularize the result for ζ = 0.5 and ωn = 2 rad/s.
(c) Analyze the effect of increasing ωn on the feedback gain vector K.

5. For the plant in exercise 2, choose the Forced response setting and activate the 1DoF (it is active by
default). A steady-state error is observed in the response. Calculate this error. Obtain the gain Kr of
a two-degree-of-freedom controller that eliminates this steady-state error. Then activate the 2DoF
option and verify that you get a response to a setpoint change that has zero error. Apply a constant
disturbance d(t) of amplitude 1 to the system input. Analyze the system response and calculate
the steady-state error. To eliminate this error due to the load disturbance, activate the Integral action
button and analyze the effect of the integral action gain Ki on the system response.
6. Carry out exercise 5 using the plant from exercise 3.
7. Carry out exercise 5 using the plant from exercise 4.
8. For a second order system in normalized form:

d2 y ( t ) dy(t)
+ 2ζωn + ωn2 y(t) = kωn2 u(t)
dt2 dt
Calculate a state space description and analyze the phase plane for different values of ζ, ωn and k.
9. For the spring-mass-damper system shown in the figure, obtain the transfer function and a state-
variable model of it (reference [4], pages 163-164), where k m is the spring constant, bm is the friction
with the wall and m is the supported mass. Consider y(t) to be the position of the mass and choose
as state variables the position y(t) and the velocity ẏ(t). Particularize the internal description for
m = 1 kg, bm = 20 N/m/s and k m = 100 N/m. Calculate the roots of the characteristic equation.
Perform a system analysis using the interactive tool and a position control using linear feedback
of the state vector.
20 · Introduction to control system analysis and design in state-space

10. For the RLC circuit shown in the figure, obtain the transfer function and a state-variable model
of the circuit (reference [4], pages 165-166), where R is the resistance, C is the capacitance and L
is the inductance. Consider y(t) to be the voltage across the resistor. Select as state variables the
capacitor voltage vc (t) and the inductor current i L (t). Particularize the internal description for
R = 3 Ω, L = 1 H and C = 0.5 F. Calculate the roots of the characteristic equation. Perform a
system analysis using the tool and a voltage control using linear feedback of the state vector.

11. Consider the internal description of a pendulum (reference [5], page 466), whose characteristic
frequency is ω0 :
   
0 1 0
A= , B= , C = [1 0 ], D=0
−ω02 0 1

Find the control law that places the poles of the closed-loop system at s = −2ω0. In other words,
the aim is to double the natural frequency and increase the relative damping factor of the system
from 0 to 1. Demonstrate that the vector of linear gains is K = [3ω02 4ω0 ]. For a value of ω0 = 1
rad/s and starting from initial conditions x1 (0) = 1 and x2 (0) = 0, simulate the behaviour using
the interactive tool.

12. Let the transfer function modelling the angular position of a DC motor be ([8], page 39):

k
G ( s) =
s(τs + 1)

The input is the armature voltage u(t) and the output is the angular position. Choosing as state
variables the angular position (x1 (t)) and the angular velocity (x2 (t)), find the state-space de-
scription, as well as the Controllable and Observable Canonical Forms. Integrate the state-space
equations and obtain its solution. Particularize for τ = 0.25 s and k = 1 rad/V and simulate the
behaviour in the interactive tool.

13. Consider the linearized and normalized steering dynamics of a vehicle given by:
   
0 1 γ
A= , B= , C = [1 0 ], D=0
0 0 1

The full description of the states and equations can be found in [1] (page 6-11). Obtain the control-
lability matrix. Design a controller that stabilizes the lateral dynamics (y) and follows a reference
of value r (the control signal is the steering angle). Calculate the characteristic polynomial of the
State-space · 21

closed-loop system and impose that the dynamics is second order with a damping factor ζ and a
natural frequency ωn . Particularize for γ = 1 (although it is actually variable) and different values
of ζ and ωn and simulate the behaviour in the interactive tool.

14. In [1] (page 6-30) the cruise control problem is dealt with in state-space. The linearized dynam-
ics about an equilibrium state (ve , ue ), where v(t) is the vehicle velocity and u(t) is the throttle
position, is given by:

ẋ (t) = ax (t) − bg γ(t) + b̟ (t), y(t) = v(t) = x (t) + ve

where x (t) = v(t) − ve , ̟ (t) = u(t) − ue , a, b and bg are constants that depend on vehicle and
road characteristics and γ(t) is the curvature of the road (disturbance). We want to control the
vehicle speed without error in steady-state, so we need to augment the system dynamics with an
integrator. Calculate the gains K, Ki and Kr required to stabilize the system and provide the correct
input to achieve the speed reference (assuming γ = 0). Impose a closed-loop behaviour described
by the parameters ζ and ωn . Particularize in the tool the linearized dynamics for values of γe = 0
rad, a = −0.0101, b = 1.32, bg = g cos (γe ), ζ = 0.7, ωn = 0.5 rad/s. The velocity reference will
be vr = 2 m/s. Enter different values of the perturbation γ(t) and analyze the deviation from the
equilibrium state.
22 · Introduction to control system analysis and design in state-space
References

[1] K. J. Åström and R. M. Murray. Feedback systems: An introduction for scientists and engineers, Second
edition. Princeton University Press, 2014.

[2] Y. Bavafa-Toosi. Introduction to linear control systems. Academic Press-Elsevier, 2017.

[3] P. Bolzern, R. Scattolini, and N. Schiavoni. Fundamentos de control automático (Fundamentals of


automatic control). McGraw-Hill, 2009.

[4] R. C. Dorf and R. H. Bishop. Modern control systems. Twelfth edition. Prentice Hall, 2011.

[5] G. F. Franklin, J. D. Powell, and A. Emani-Naeni. Feedback control of dynamic systems. Seventh edition.
Pearson, 2015.

[6] J. L. Guzmán, R. Costa-Castelló, M. Berenguel, and S. Dormido. Automatic control with interactive
tools. Springer, 2021.

[7] K. Ogata. Modern control engineering. Fifth edition. Prentice Hall, 2010.

[8] A. Ollero. Control por computador : Descripción interna y diseño óptimo (Computer controlled systems:
internal description and optimal design). Marcombo, 1991.

[9] B. Shahian and M. Hassul. Control system design using MATLAB. Prentice Hall, 1993.

You might also like