Lesson3 System State Transfer Function and Frequency Response
Lesson3 System State Transfer Function and Frequency Response
Politecnico di Milano
Website:
http://www.skywarder.eu
E-mail:
cesare.vergori@skywarder.eu matteo.galli@skywarder.eu mattia.giurato@skywarder.eu
Contents
5 Frequency Response 13
5.1 The Concept of Frequency Response . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.2 Analytical Expressions for the Frequency Response. . . . . . . . . . . . . . . . . . . 14
i
Chapter 1
The concept of the state of a dynamic system refers to a minimum set of variables, known as
state variables, that fully describe the system and its response to any given set of inputs. In
particular a state-determined system model has the characteristic that:
<<A mathematical description of the system in terms of minimum set of variable xi (t), i = 1...n together
with knowledge of those variables at an initial time t > t0 are sufficient to predict the future system state
and outputs for all timet > t0 . This definition asserts that the dynamic behavior of state-determined
system is completely characterized by the response of the set of n variables xi (t), where the number n is
defined order of the system.>>
If the system is state-determined, knowledge of its state variables
(x1 (t0 ), x2 (t0 ), ..., xn (t0 )) at some initial time t0 , and the inputs u1 (t) and u2 (t) for t > t0 is
sufficient to determine all future behavior of the system. The state variables are an internal
description of the system which completely characterize the system state at any time t, and
from which any output variables yi (t) may be computed. System models constructed with the
pure and ideal (linear) one-port elements (such as mass, spring and damper elements) are state-
determined system models. For such systems the number of state variables, n, is equal to the
number of independent energy storage elements in the system. The values of the state variables
at any time t specify the energy of each energy storage element within the system and therefore
the total system energy, and the time derivatives of the state variables determine the rate of
change of the system energy. Furthermore, the values of the system state variables at any time t
provide sufficient information to determine the values of all other variables in the system at that
time.
1
Aerospace System Guidance and Control Lesson III
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. 2
Lesson III Aerospace System Guidance and Control
where the state vector x is a column vector of lenght n, the input u is a column vector of lenght
r, A is an n × n square matrix of the constant coefficients aij , and B is an n×r matrix of the
coefficients bij that weight inputs.
where the ci and di are constants. If a total of m system variables are defined as outputs, the m
such equations may be written as:
y1 = c11 x1 + c2 x2 + . . . + c1n xn + d11 u1 + . . . + d1r ur
y2 = c21 x1 + c22 x2 + . . . + c2n xn + d21 u1 + . . . + d2r ur
.. (1.7)
.
ym = cm1 x1 + cm2 x2 + . . . + cnm xn + dm1 u1 + . . . + dmr ur
or in a matrix form:
y1 c11 c12 ... c1n x1 d11 ... d1r
y2 c21 u1
c22 ... c2n x2 d21 d2r
..
.. = .. .. .. + .. (1.8)
.. .
. . . . . .
ur
ym cm1 cm2 ... cmn xn dm1 ... dmr
The output equations, Eqs. (8), are commoly written in the compact form:
y = Cx + Du (1.9)
where y is a column vector of the output variables yi (t), C is an m × n matrix of the costant
coefficients cij that weight the state variables, and D is an m × r matrix of the costant coefficients
dij that weight the system inputs. For many physical system the matrix D is the null matrix, ant
the output equation reduces to a simple weighted combination of the state variables:
y = Cx (1.10)
3 This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Aerospace System Guidance and Control Lesson III
1. determination of the system order n and selection of a set of state variables from the linear
graph system representation;
2. generation of a set of state equations and the system A andBmatrices using a well defined
methodology. This step is also based on the linear system description;
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. 4
Chapter 2
The transfer function and the classical input-output differential equation for any system variable
may be found directly from a state space representation through the Laplace transform.
For example, we can find the transfer function and a single first-order differential equation
relating the output y(t) to the input u(t) for a system described by the first-order linear state
and output equations:
dx
dt = ax(t) + bu(t)
(2.1)
y(t) = cx(t) + du(t)
Thanks to Laplace transform, we can write the following expression:
sX(s) = aX(s) + bU(s) (2.2)
which may be rewritten with the state variable X(s) ont the left-hand side:
(s − a)X(s) = bU(s). (2.3)
Then dividing by (s − a), solve for the state variable:
b
X(s) = U(s) (2.4)
s−a
and substitute into the Laplace transform
of the
output Y(s) = cX(s) + dU(s):
bc ds + (bc − ad)
Y(s) = + d U(s) = (2.5)
s−a (s − a)
The transfer function is:
Y(s) ds + (bc − ad)
H(s) = = (2.6)
U(s) (s − a)
The differential equation is found directly:
(s − a)Y(s) = (ds + (bc − ad))U(s) (2.7)
and rewriting as a differential equation:
dy du
− ay = d + (bc − ad)u(t) (2.8)
dy dt
Classical representation of higher-order system may be derived in the same way using the
Laplace transform and matrix algebra. A set of linear state and output equations written in
standard form:
5
Aerospace System Guidance and Control Lesson III
ẋ = Ax + Bu
(2.9)
y = Cx + Du
may be rewritten in the Laplace domain. The system equations are then:
where the term sI creates an n × n matrix with s on the leading diagonal and zeros elsewhere.
(This step is necessary because matrix addition and substraction is only defined for matrices of
the same dimension.) The matrix [sI − A] which appears frequently throughout linear system
theory it is a square n × n matrix with elements directly related to the A matrix:
(s − a11 ) −a12 ... −a1n
−a21 (s − a22 ) . . . −a2n
[sI − A] = (2.12)
.. .. . . ..
. . . .
−an1 −an2 . . . (s − ann )
The state equations, written in the form of Eq. (22), are a set of n simultaneous operational
expressions. The common methods of solving linear algbric equations, for example Gaussion
elimination, Cramer’s rule, the inverse matrix , elimination and substitution, may be directly
applied to linear operational equations such as Eq. (22).
For low-order single-input single-output systems (SISO) the transformation to a classical formu-
lation may be performed in the following steps:
2. reorganize each state equation so that all terms in the state variables are on the left-hand
side;
3. treat the state equations as a set of simultaneous algebric equations and solve for those
state variables required to generate the ouput variable;
5. write the output equation in operational form and identify the transfer function;
6. use the transfer function to write a single differential equation between the output variable
and the system input.
This method can illustrated with the following example, where we considered the RLC elctric
circuit shown in Fig. 1:
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. 6
Lesson III Aerospace System Guidance and Control
Using Kirchoff’s law, we can choose the capacitor voltage vC (t) and the inductor current iL (t)
as state variable, and generates
the
following
pair of
state
equations:
d vc 0 1/C vc 0
= + V (2.13)
dt iL −1/L −R/L iL 1/L in
The required output equations is:
vc
y(t) = 1 0 + [0]Vin (2.14)
iL
Step 1: in Laplace transform form the state equations are:
sVC (s) = 0VC (s) + 1/CIL (s) + 0Vs (s)
(2.15)
1/LVC (s) = −1/LVC (s) − R/LIL (s) + 1/LVs (s)
Step 2: reorganize the state equations:
sVC − 1/CIL (s) = 0Vs
(2.16)
1/LVC + [s + R/L]IL (s) = 1/LVs
Step 3: in this case we have two simultaneous operational equations in the state variables vC and
iL . The output equation requires only vC . If Eq. (27.1) is multiplied by [s + R/L],and Eq.(27.2) is
multiplied by 1/C, and the equations added, IL (s) is eliminated:
[s(s + R/L) + 1/(LC)]VC (s) = 1/(LC)Vs (s) (2.17)
Step 4: the output equation is y = vc . Operate on both sides of Eq. (28) by [s2 + (R/L)s +
1/LC]−1 and write in quotient form:
1/LC
VC (s) = 2 Vs (s) (2.18)
s + (R/L)s + 1/LC
Step 5: the transfer function H(s) = VC (s)/Vs (s) is :
1/LC
H(s) = 2 (2.19)
s + (R/L)s + 1/LC
Step 6: the differential equation relating vC to Vs is :
d2 vC R dvC 1 1
2
+ + vC = Vs (t) (2.20)
dt L dt LC LC
Cramer’s Rule, for the solution of set of linear algebric equations , is a useful method to apply to
the solution of these equations. In solving for the variable xi in a set of n linear algbric equations,
such as Ax = b the rule states:
7 This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Aerospace System Guidance and Control Lesson III
det[A(i) ]
xi = (2.21)
det[A]
where A(i) is another n × n matrix formed by replacing the ith column of A with the vector b.
If:
[sI − A]X(s) = BU(s) (2.22)
then the relationship between the ith state variable
h and the
i input is:
det [sI − A](i)
Xi (s) = U(s) (2.23)
det[sI − A]
where (sI − A)(i) is defined to be the matrix formed by replacing the ith column of (sI − A)with
the column vector B. The differential equation is:
det[sI − A]xi = det[(sI − A)(i) ]uk (t) (2.24)
Then, riconsidering the previous example, using Cramer’s Rule, we can solve for vL (t) in the
following way. The output equation of state model is:
vL = −vC − RiL + Vs (t) (2.25)
In the Laplace domain the state
equations are:
s −1/C Vc (s) Vc (s)
= V (s) (2.26)
1/L s + R/L IL (s) IL (s) in
The voltage VC (s) is given by:
h i 0 −1/C
det [sI − A](1) det
1/L (s + R/L) 1/LC
VC (s) = Vin (s) = Vin (s) = 2 Vin (s)
det[sI − A] s −1/C s + (R/L)s + (1/LC)
det
1/L s + R/L
(2.27)
The current IL (s) is:
h i s 0
det [sI − A] (2) det
1/L 1/L R/L
IL (s) = Vin (s) = Vin (s) = 2 Vin (s)
det[sI − A] s −1/C s + (R/L)s + (1/LC)
det
1/L s + R/L
(2.28)
The output equation may be written directly from Laplace transform of Eq. (36) and substituting
Eqs.(38-39):
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. 8
Lesson III Aerospace System Guidance and Control
For a single-input single-output (SISO) system the transfer function may be found directly by
evaluating the inverse matrix:
X(s) = (sI − A)−1 BU(s) (2.31)
Using the definition of the matrix inverse:
adj[sI − A]
[sI − A]−1 = , (2.32)
det[sI − A]
adj[sI − A]B
X(s) = U(s). (2.33)
det[sI − A]
and substituting into the output equation gives:
h i
Y(s) = C[sI − A]−1 BU(s) + DU(s) = C[sI − A]−1 + B + D U(s). (2.34)
Expanding the inverse in terms of the determinant and the adjoint matrix yields:
Cadj(sI − A)B + det[sI − A]D
Y(s) = U(s) = H(s)U(s) (2.35)
det[sI − A]
so that the required differential equation may be found by expanding:
det[sI − A]Y(s) = [Cadj(sI − A)B + det[sI − A]D] U(s) (2.36)
and taking the inverse Laplace transform of both sides.
9 This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Chapter 3
The block diagram provides a convenient method for deriving a set of state equations for a
system that is specified in terms of a single input/output differential equation. A set of n state
variables can be identified as the outputs of integrators int the diagram, and state equations
can be written from the conditions at the inputs to the integrator blocks (the derivative of state
variables).
Let the differential equation representing the system be of order n, and without loss of generality
assume that the order of the polunomia operators on both sides is the same:
(an sn + an−1 sn−1 + · · · + a0 )Y(s) = (bn sn + bn−1 sn−1 + · · · + b0 )U(s) (3.1)
We may multiply both sides of the equation by s−n to ensure that all differential operators have
been eliminated:
(an + an−1 s−1 + · · · + a1 s−(n−1) + a0 s−n )Y(s))
(3.2)
= (bn + bn−1 s−1 + · · · + b1 s−(n−1) + · · · + b0 s−n )U(s)
from which the output may be specified in terms of a transfer function. If we define a dummy
variable Z(s), and split Eq. (49) into two parts:
1
Z(s) = U(s) (3.3)
an + an−1 s−1 + · · · + a1 s−(n−1) + a0 s−n
Y(s) = (bn + bn−1 s−1 + · · · + b1 s−(n−1) + b0 s−n )Z(s) (3.4)
Eq. (30) may be solved for U(s),
U(s) = (an + an−1 s−1 + · · · + a1 s−(n−1) + a0 s−n )X(s) (3.5)
and rearranged to generate a feedback structure that can be used as the basis for a block dia-
gramm:
1 a 1 a 1 a 1
Z(s) = U(s) − ( n−1 + · · · + 1 n−1 + 0 −n )Z(s) (3.6)
an an s an s an s
The dummy variable Z(s) is specified in terms of the system input u(t) and a weighted sum of
successive integrations of itself. Equation (51) serves to combine the outputs from the integrators
into output y(t).
A set of state equations may be found from the block diagram by assigning the state variables
xi (t) to the outputs of the n integrators. Because of the direct cascade connection of the integra-
tors, the state equations take a very simple form. By inspection:
10
Lesson III Aerospace System Guidance and Control
x˙1 = x2
x˙2 = x3
.. ..
. . (3.7)
ẋn−1 = xn
a0 a1 an−1 1
ẋn = − an x1 − an x2 −···− an xn + an u(t)
In the
matrix
form
these equations are:
x˙1 0 1 ··· 0 0 x1 0
ẋ2 0
0 · · · 0 0
x2
0
.. .. .. . .. .. .. .. ..
. . . . . . .
= + u(t) (3.8)
ẋn−2 0
0 · · · 1 0 xn−2 0
ẋn−1 0 0 ··· 0 1 xn−1 0
ẋn −a0/an −a1/an · · · −an−2/an −an−2/an xn 1/an
The matrix A has a very distinctive form. Each row, except the bottom one, is filled of zeros
except for one in the position just above the leading diagonal. Equation (35) is a common
form of the state equations, used in control system theory and known as the phase variable or
companion form. This form leads to a set of state variables which may not correspond to any
physical variables within the system.
The corresponding output relationship is specified by Eq.(51) by noting Xi (s) = Z(s)/s(n+1+i) .
y(t) = b0 x1 + b1 x2 + b2 x3 + · · · + bn−1 xn + bn z(t) (3.9)
But z(t) = dxn /dt, which is found from the nth state equation in Eq. (34). When substituted
into Eq.(36) the output equation is:
x1
x
bn a 0 bn a 1 bn an−1 2 bn
Y(s) = b1 − b1 − · · · b1 − .. + u(t) (3.10)
an an an . an
xn
11 This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Chapter 4
For a multiple-input multiple-output system Eq.(22) is written in ters of the r component input
vector U(s):
X(s) = [sI − A]−1 BU(s) (4.1)
generating a set of n simultaneous linear equations, where the matrix is Bis n × r. The m
component system output vector Y(s) may be found by substituting this solution for X(s) into
the output equation as in Eq.(35): h i
Y(s) = C[sI − A]−1 B{U(s)} + D{U(s)} = C[sU − A]−1 B + D {U(s)} (4.2)
and expanding the inverse in terms of the determinant and the adjoint matrix:
Cadj(sI − A)B + det[sI − A]D
Y(s) = U(s) = H(s)U(s) (4.3)
det[sI − A]
where H(s) is defined to be the matrix transfer function realting the output vector Y(s) to the
input vector U(s):
Cadj(sI − A)B + det[sI − A]D
H(s) = (4.4)
det[sI − A]
For a system with r inputs U1 (s), . . . , Ur (s) and m outputs Y1 (s), . . . , Ym (s), H(s) is as m × r
matrix whose elements are indiviudal scalr transfer functions realting a given component of the
output Y(s) to a component
of the
input U(s). Expansion of Eq. (41) generates a set of equations:
Y1 (s) H11 (s) H12 (s) · · · H1r (s) U1 (s)
Y2 (s) H21 (s) H22 (s) · · · H2r (s) U2 (s)
.. = (4.5)
.. .. .. .. ..
. . . . . .
Ym (s) Hm1 (s) Hm2 (s) · · · Hmr (s) Ur (s)
where the ith component of the output vector Y(s) is:
Yi (s) = Hi1 (s)U1 (s) + Hi2 (s)U2 (s) + · · · + Hir (s)Us (s) (4.6)
The elemental transfer function Hij (s) is the scalar transfer function between the ith output
component and the jth input component. Equation (61) shows that all the Hij (s) transfer func-
tions in H(s) have the same denominator factor det[sI − A], giving the important polynomial, or
alternatively have the same coefficients on the left-hand side.
If the system has single-input and single-output, H(s) is a scalr, and the procedure generates the
input/output transfer operator directly.
12
Chapter 5
Frequency Response
Assume that the system is represented by the complex number, M(ω)∠φ(ω). The ouput steady-
state sinusoid is found by multiplying the complex number representation of the input by the
complex number representation of the system. Thus, the steady-state output sinusoid is:
M0 (ω)∠φo = Mi (ω)M(ω)∠[φi (ω) − φ(ω)] (5.1)
and:
φ(ω) = φo (ω) − φi (ω) (5.2)
13
Aerospace System Guidance and Control Lesson III
Equations (65) and (64) form our definition of frequency response. We call M(ω) the magnitude
frequency response and φ(ω) the phase frequency response. The combination of the magnitude and
phase frequency responses is called the frequency response and is M(ω)∠φ.
In other words, we define the magnitude frequency response to be the ratio of the output si-
nusoid’s magnitude to the input sinusoid’s magnitude. We define the phase response to be
the difference in phase angle between the output and the input sinusoids. Both responses are
function of frequency and apply only to the steady-state sinusoidal response of the system.
We now solve for the forced response portion of C(s), from whic we evaluate the frequency
response. Rembering that the Laplace transfor of a sinuoid is:
As + Bω
L[sin(ωt)] = 2 (5.3)
s + ω2
we have:
As + Bω
C(s) = G(s) (5.4)
s2 + ω2
We separate the forced solution from the transient solution by performing a partial fraction on
Eq.(67). Thus,
As + Bω K1 K2
C(s) = G(s) = + +... (5.5)
(s + ω)(s − ω) s + jω s − jω
where:
s−jω G(s) |s−→−jω = 2 (A + jB)G(−jω) = 2 Mi exp(−jφi )M exp(−jφG )
As+Bω 1 1
K1 = =
(5.6)
= M2i M exp(j(φi + φG ))
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. 14
Lesson III Aerospace System Guidance and Control
15 This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.