Mod3Lesson2_StateSpace_Representation(3)(4)(2)(2) (1)
Mod3Lesson2_StateSpace_Representation(3)(4)(2)(2) (1)
3.2.1 Introduction
Two approaches are available for the analysis and design of feedback control
systems. The first, is known as the classical, or frequency-domain, technique.
This approach is based on converting a system’s differential equation to a
transfer function, thus generating a mathematical model of the system that
algebraically relates a representation of the output to a representation of the
input. Replacing a differential equation with an algebraic equation not only
simplifies the representation of individual subsystems but also simplifies
modeling interconnected subsystems.
With the arrival of space exploration, requirements for control systems increased
in scope. Modeling systems by using linear, time-invariant differential equations
and subsequent transfer functions became inadequate. The state-space
approach (also referred to as the modern, or time-domain, approach) is a unified
method for modeling, analyzing, and designing a wide range of systems. For
example, the state-space approach can be used to represent nonlinear systems
that have backlash, saturation, and dead zone. Also, it can handle, conveniently,
systems with nonzero initial conditions. Time-varying systems, (for example,
missiles with varying fuel levels or lift in an aircraft flying through a wide range
of altitudes) can be represented in state space. Many systems do not have just a
single input and a single output. Multiple-input, multiple-output systems (such
as a vehicle with input direction and input velocity yielding an output direction
and an output velocity) can be compactly represented in state space with a model
similar in form and complexity to that used for single-input, single-output
systems. The time-domain approach can be used to represent systems with a
digital computer in the loop or to model systems for digital simulation. With a
simulated system, system response can be obtained for changes in system
parameters—an important design tool. The state-space approach is also
attractive because of the availability of numerous state-space software packages
for the personal computer.
The time-domain approach can also be used for the same class of systems
modeled by the classical approach. This alternate model gives the control
systems designer another perspective from which to create a design. While the
state-space approach can be applied to a wide range of systems, it is not as
intuitive as the classical approach. The designer has to engage in several
calculations before the physical interpretation of the model is apparent, whereas
in classical control a few quick calculations or a graphic presentation of data
rapidly yields the physical interpretation.
Let us now follow these steps through an example. Consider the RL network
shown in Figure 3.2.1 with an initial current of i(0).
1. We select the current, i(t) for which we will write and solve a differential
equation using Laplace transforms.
2. We write the loop equation,
𝑑𝑖
𝐿 𝑅𝑖 𝑣 𝑡 3.2.1
𝑑𝑡
𝐿 𝑠𝐼 𝑠 𝑖 0 𝑅𝐼 𝑠 𝑉 𝑠
Assuming the input to be a unit step, we solve for I(s) and get
1 1 1 𝑖 0
𝐼 𝑠
𝑅 𝑠 𝑅 𝑅
𝑠 𝑠
𝐿 𝐿
from which
1
𝑖 𝑡 1 𝑒 𝑖 0 𝑒 3.2.2
𝑅
The function i(t) is a subset of all possible network variables that we are
able to find from (3.2.2) if we know its initial condition and the input. Thus
i(t) is a state variable, and the differential equation (3.2.1) is a state
equation.
4. We can now solve for all of the other network variables algebraically in
terms of i(t) and the applied voltage, v(t). For example, the voltage across
the resistor is
𝑣 𝑡 𝑅𝑖 𝑡 3.2.3
Thus, knowing the state variable, i(t), and the input, v(t), we can find the
value or state, of any network variable at any given time. Hence, the
algebraic equations (3.2.3 to 3.2.5) are output equations.
which can be solved knowing that the initial condition vR(0) = Ri(0) and
knowing v(t). In this case, the state variable is vR(t). Similarly, all other
network variables can now be written in terms of the state variable, vR(t),
and the input, v(t).
𝑑𝑖 1
𝐿 𝑅𝑖 𝑖𝑑𝑡 𝑣 𝑡 3.2.7
𝑑𝑡 𝐶
𝑑 𝑞 𝑑𝑞 1
𝐿 𝑅 𝑞 𝑣 𝑡 3.2.8
𝑑𝑡 𝑑𝑡 𝐶
𝑑𝑥
𝑎 𝑥 𝑎 𝑥 ... 𝑎 𝑥 𝑏𝑓 𝑡 3.2.9
𝑑𝑡
where each xi is a state variable, and aij’s and bi are constants for linear,
time-invariant systems. We say that the right-hand side of Eq. (3.2.9) is a
linear combination of the state variable and the input, f(t).
We can convert Eq. (3.2.8) into two simultaneous, first-order differential
equations in terms of i(t) and q(t). The first equation can be dq/dt=i. The
second equation can be formed by substituting 𝑖𝑑𝑡 𝑞 into Eq. (3.2.7)
and solving for di/dt. Summarizing the two resulting equations, we get
𝑑𝑞
𝑖 3.2.10
𝑑𝑡
𝑑𝑖 1 𝑅 1
𝑞 𝑖 𝑣 𝑡 3.2.11
𝑑𝑡 𝐿𝐶 𝐿 𝐿
3. These equations are the state equations and can be solved simultaneously
for the state variables, q(t) and i(t), using the Laplace transform and the
methods of Module 2. In addition, we must also know the input, v(t), and
the initial conditions for q(t) and i(t).
4. From these two state variables, we can solve for all other network
variables. For example, the voltage across the inductor can be written in
terms of the solved state variables and the input as
1
𝑣 𝑡 𝑞 𝑡 𝑅𝑖 𝑡 𝑣 𝑡 3.2.12
𝐶
5. The combined state equations (3.2.10, 3.2.11) and the output equation
(3.2.12) form a viable representation of the network, which we call a state-
space representation.
Another choice of two state variables can be made, for example, vR(t) and
vC(t), the resistor and capacitor voltage, respectively. The resulting set of
simultaneous, first-order differential equations follows:
𝑑𝑣 𝑅 𝑅 𝑅
𝑣 𝑣 𝑣 𝑡 3.2.13
𝑑𝑡 𝐿 𝐿 𝐿
𝑑𝑣 1
𝑣 3.2.14
𝑑𝑡 𝑅𝐶
Again, these differential equations can be solved for the state variables if
we know the initial conditions along with v(t). Further, all other network
variables can be found as a linear combination of these state variables.
Is there a restriction on the choice of state variables? Yes! Typically, the
minimum number of state variables required to describe a system equals the
order of the differential equation. Thus, a second-order system requires a
minimum of two state variables to describe it.
We can define more state variables than the minimal set; however, within this
minimal set the state variables must be linearly independent. For example, if
vR(t) is chosen as a state variable, then i(t) cannot be chosen, because vR(t) can
be written as a linear combination of i(t), namely vR(t) = Ri(t). Under these
circumstances we say that the state variables are linearly dependent. State
variables must be linearly independent; that is, no state variable can be written
as a linear combination of the other state variables, or else we would not have
enough information to solve for all other system variables, and we could even
have trouble writing the simultaneous equations themselves.
The state and output equations can be written in vector-matrix form if the system
is linear. Thus, Eq. (3.2.10 and 3.2.11), the state equations, can be written as
𝑥 𝐴𝑥 𝐵𝑢 3.2.15
𝑦 𝐶𝑥 𝐷𝑢 3.2.16
dq dt 0 1
x ; A
di dt 1/ LC R / L
q 0
x ; B ; u v(t )
i 1/ L
q
x ; D 1; u v(t )
y vL (t ); C 1/ C R; i
Thus, the state-space representation of the system in Figure 3.2.2 can be written
as:
dq
i
dt
di 1 R 1
q i v(t )
dt LC L L
1
vL (t ) q(t ) Ri(t ) v(t )
C
3.2.2 The General State-Space Representation
Now that we have represented a physical network in state space and have a good
idea of the terminology and the concept, let us summarize and generalize the
representation for linear differential equations. First, we formalize some of the
definitions that we came across in the last section.
State variables. The smallest set of linearly independent system variables such
that the values of the members of the set at time t0 along with known forcing
functions completely determine the value of all system variables for all t ≥ t0.
State space. The n-dimensional space whose axes are the state variables. This is
a new term and is illustrated in Figure 3.2. 3, where the state variables are
assumed to be a resistor voltage, vR, and a capacitor voltage, vC. These variables
form the axes of the state space. A trajectory can be thought of as being mapped
out by the state vector, x(t), for a range of t. Also shown is the state vector at the
particular time t = 4.
Figure 3.2.3 Graphic representation of state space and a state vector
Output equation. The algebraic equation that expresses the output variables of a
system as linear combinations of the state variables and the inputs.
Now that the definitions have been formally stated, we define the state-space
representation of a system. A system is represented in state space by the
following equations:
𝑥 𝐴𝑥 𝐵𝑢 3.2.18
𝑦 𝐶𝑥 𝐷𝑢 3.2.19
Equation (3.2. 18) is called the state equation, and the vector x, the state vector,
contains the state variables. Equation (3.2.18) can be solved for the state
variables. Equation (3.2.19) is called the output equation. This equation is used
to calculate any other system variables. This representation of a system provides
complete knowledge of all variables of the system at any t ≥ t0.
3.1.3 Applying the State-Space Representation
The first step in representing a system is to select the state vector, which must
be chosen according to the following considerations:
1. A minimum number of state variables must be selected as components of
the state vector. This minimum number of state variables is sufficient to
describe completely the state of the system.
2. The components of the state vector (that is, this minimum number of state
variables) must be linearly independent.
The components of the state vector must be linearly independent. For example,
following the definition of linear independence, if x1, x2, and x3 are chosen as
state variables, but x3 = 5x1 + 4x2, then x3 is not linearly independent of x1 and
x2, since knowledge of the values of x1 and x2 will yield the value of x3. Variables
and their successive derivatives are linearly independent. For example, the
voltage across an inductor, vL, is linearly independent of the current through the
inductor, iL, since vL = LdiL/dt. Thus, vL cannot be evaluated as a linear
combination of the current, iL.
How do we know the minimum number of state variables to select? Typically, the
minimum number required equals the order of the differential equation
describing the system. For example, if a third-order differential equation
describes the system, then three simultaneous, first-order differential equations
are required along with three state variables. From the perspective of the transfer
function, the order of the differential equation is the order of the denominator of
the transfer function after canceling common factors in the numerator and
denominator.
In most cases, another way to determine the number of state variables is to count
the number of independent energy-storage elements in the system. The number
of these energy-storage elements equals the order of the differential equation and
the number of state variables. In Figure 3.2.1 there are two energy-storage
elements, the capacitor, and the inductor. Hence, two state variables and two
state equations are required for the system.
If too few state variables are selected, it may be impossible to write particular
output equations, since some system variables cannot be written as a linear
combination of the reduced number of state variables. In many cases, it may be
impossible even to complete the writing of the state equations, since the
derivatives of the state variables cannot be expressed as linear combinations of
the reduced number of state variables.
If you select the minimum number of state variables but they are not linearly
independent, at best you may not be able to solve for all other system variables.
At worst you may not be able to complete the writing of the state equations.
Often the state vector includes more than the minimum number of state
variables required. Two possible cases exist. Often state variables are chosen to
be physical variables of a system, such as position and velocity in a mechanical
system. Cases arise where these variables, although linearly independent, are
also decoupled. That is, some linearly independent variables are not required in
order to solve for any of the other linearly independent variables or any other
dependent system variable. Consider the case of a mass and viscous damper
whose differential equation is M dv/dt + Dv = f(t), where v is the velocity of the
mass. Since this is a first-order equation, one state equation is all that is required
to define this system in state space with velocity as the state variable. Also, since
there is only one energy-storage element, mass, only one state variable is
required to represent this system in state space. However, the mass also has an
associated position, which is linearly independent of velocity. If we want to
include position in the state vector along with velocity, then we add position as
a state variable that is linearly independent of the other state variable, velocity.
Figure 3.2.4 illustrates what is happening. The first block is the transfer function
equivalent to M dv/dt + Dv(t) = f(t). The second block shows that we integrate the
output velocity to yield output displacement. Thus, if we want displacement as
an output, the denominator, or characteristic equation, has increased in order
to 2, the product of the two transfer functions. Many times, the writing of the
state equations is simplified by including additional state variables.
Another case that increases the size of the state vector arises when the added
variable is not linearly independent of the other members of the state vector. This
usually occurs when a variable is selected as a state variable but its dependence
on the other state variables is not immediately apparent. For example, energy-
storage elements may be used to select the state variables, and the dependence
of the variable associated with one energy-storage element on the variables of
other energy-storage elements may not be recognized. Thus, the dimension of
the system matrix is increased unnecessarily, and the solution for the state
vector is more difficult. Also, adding dependent state variables affects the
designer’s ability to use state-space methods for design.
Example 3.2.1
Solution 3.2.1
The following steps will yield a viable representation of the network in state
space.
1. Label all of the branch currents in the network.
2. Select the state variables by writing the derivative equation for all energy-
storage elements.
𝑑𝑣
𝐶 𝑖 3.2.20
𝑑𝑡
𝑑𝑖
𝐿 𝑣 3.2.21
𝑑𝑡
From Eqs. (3.20) and (3.21), choose the state variables as the quantities
that are differentiated, namely vC and iL. We see that the state-space
representation is complete if the right-hand sides of Eqs. (3.20) and (3.21)
can be written as linear combinations of the state variables and the input.
Since iC and vL are not state variables, our next step is to express iC and
vL as linear combinations of the state variables, vC and iL, and the input,
v(t).
3. Apply network theory, such as Kirchhoff’s voltage and current laws, to
obtain iC and vL in terms of the state variables, vC and iL. At Node 1,
𝑖 𝑖 𝑖
1
𝑣 𝑖 3.2.22
𝑅
which yields vL in terms of the state variable, vC, and the source, v(t).
4. Substitute the results of Eqs. (3.22) and (3.23) into Eqs. (3.20) and (3.21)
to obtain the following state equations:
𝑑𝑣 1
𝐶 𝑣 𝑖 3.2.24
𝑑𝑡 𝑅
𝑑𝑖
𝐿 𝑣 𝑣 𝑡 3.2.25
𝑑𝑡
𝑑𝑣 1 1
𝑣 𝑖 3.2.26
𝑑𝑡 𝑅𝐶 𝐶
𝑑𝑖 1 1
𝑣 𝑣 𝑡 3.2.27
𝑑𝑡 𝐿 𝐿
𝑣 1/𝑅𝐶 1/𝐶 𝑣 0
𝑖 𝑣 𝑡
𝚤 1/𝐿 0 1/𝐿
𝑣
𝑖 1/𝑅 0 𝑖
Represent the electrical network shown in the figure in state space, where vo(t)is
the output.
Solution 3.2.2
𝐿 𝑣 𝐿 𝑣 𝐶 𝑖
3. Obtain VL1, VL2 and iR3 in terms of the state variables. First, find iR1 in
terms of the state variables.
𝑣 𝑡 𝑣 𝑣 𝑣 𝑣 0
𝑣 𝑡 𝑖 1𝛺 𝑖 1𝛺 𝑖 1𝛺 𝑣 0
𝑣 𝑡 𝑖 𝑖 𝑖 𝑣 0
𝐵𝑢𝑡 𝑖 𝑖 𝑖 𝑎𝑛𝑑 𝑖 𝑖 𝑖 𝑇ℎ𝑢𝑠,
𝑣 𝑡 𝑖 𝑖 𝑖 𝑖 𝑖 𝑣 0
𝑣 𝑡 𝑖 𝑖 𝑖 𝑖 𝑖 𝑖 𝑣 0
3𝑖 2𝑖 𝑖 𝑣 𝑣 𝑡
2 1 1 1
𝑖 𝑖 𝑖 𝑣 𝑣 𝑡 𝑇ℎ𝑢𝑠, 𝑣 𝑣 𝑡 𝑖
3 3 3 3
2 1 1 1
𝑣 𝑣 𝑡 𝑖 𝑖 𝑣 𝑣 𝑡
3 3 3 3
𝑑𝑖 2 1 1 2
𝑖 𝑖 𝑣 𝑣 𝑡
𝑑𝑡 3 3 3 3
And
2 1 1 1
𝑖 𝑖 𝑖 𝑖 𝑖 𝑣 𝑣 𝑡 𝑖
3 3 3 3
1 1 1 1
𝑖 𝑖 𝑖 𝑣 𝑣 𝑡 𝑎𝑛𝑑
3 3 3 3
1 1 1 1
𝑖 𝑖 𝑖 𝑖 𝑖 𝑣 𝑣 𝑡 𝑖
3 3 3 3
𝑑𝑣 1 2 1 1
𝑖 𝑖 𝑣 𝑣 𝑡
𝑑𝑡 3 3 3 3
Finally,
1 2 1 1
𝑣 𝑖 𝑣 𝑖 𝑖 𝑣 𝑣 𝑡 𝑣
3 3 3 3
𝑑𝑖 1 2 2 1
𝑖 𝑖 𝑣 𝑣 𝑡
𝑑𝑡 3 3 3 3
𝑑𝑖 2 1 1 2
𝑖 𝑖 𝑣 𝑣 𝑡
𝑑𝑡 3 3 3 3
𝑑𝑖 1 2 2 1
𝑖 𝑖 𝑣 𝑣 𝑡
𝑑𝑡 3 3 3 3
𝑑𝑣 1 2 1 1
𝑖 𝑖 𝑣 𝑣 𝑡
𝑑𝑡 3 3 3 3
𝑣 𝑡 𝑣
In vector matrix form:
𝑑𝑖 2 1 1 2
⎡ ⎤ ⎡ ⎤ ⎡ ⎤
⎢ 𝑑𝑡 ⎥ ⎢ 3 3 3 ⎥ 𝑖 ⎢3 ⎥
⎢𝑑𝑖 ⎥ ⎢ 1 2 2 ⎥ ⎢1 ⎥ 𝑣 𝑡
𝑖
⎢ 𝑑𝑡 ⎥ ⎢ 3 3 3 ⎥ 𝑣 ⎢3 ⎥
⎢ 𝑑𝑣 ⎥ ⎢ 1 2 1⎥ ⎢1 ⎥
⎣ 𝑑𝑡 ⎦ ⎣ 3 3 3⎦ ⎣3 ⎦
𝑖
𝑣 𝑡 0 0 1 𝑖
𝑣
Example 3.2.3
Find the state and output equations for the electrical network if the output vector
is y = [vR2 iR2]T, where T means transpose. Let R1 = R2 = 1 Ω, L = 1H, and C =
1F.
Solution 3.2.6
Example 3.2.7
Find the state equations for the translational mechanical system where x1(t) is
the output.
Solution 3.2.7
Since x1 and x2 are the displacements, the derivative is the velocity, and the
second derivative is the acceleration. Thus,
We can select x1, x2, v1, and v2 as the state variables. To complete the set of state
equations we have,