Lecture Notes For A Course On System Identification, v2012: Kristiaan Pelckmans
Lecture Notes For A Course On System Identification, v2012: Kristiaan Pelckmans
Lecture Notes For A Course On System Identification, v2012: Kristiaan Pelckmans
Kristiaan Pelckmans
2
Contents
3
4 CONTENTS
4 Nonparametric Techniques 69
4.1 Transient Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
4.2 Frequency Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
4.3 A Correlation Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4.4 Spectral Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
4.5 Nonparameteric Techniques for Timeseries . . . . . . . . . . . . . . . . . . . . . . . . 75
4.5.1 Yule-Walker Correlation Analysis . . . . . . . . . . . . . . . . . . . . . . . . . 75
4.5.2 Spectral Factorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
5 Stochastic Setup 79
5.1 Getting the Basics Right . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
5.1.1 Events, Random variables and Derived Concepts . . . . . . . . . . . . . . . . 80
5.1.2 Continuous Random Variables . . . . . . . . . . . . . . . . . . . . . . . . . . 82
5.1.3 Normal or Gaussian Distribution . . . . . . . . . . . . . . . . . . . . . . . . . 83
5.1.4 Random Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.1.5 Stochastic Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.1.6 Interpretations of Probabilities . . . . . . . . . . . . . . . . . . . . . . . . . . 88
5.2 Statistical Inference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
5.2.1 In All Likelihood . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
5.2.2 Power and Limitations of ML . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
5.3 Least Squares Revisited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
5.4 Instrumental Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
7
CONTENTS
8
Abstract
9
CONTENTS
10
Part I
11
Chapter 1
Aim
Say we study an unknown dynamic system. How to design, conduct, process and
interpret the results from an experiment applied to this system such that we will get an
accurate model of its internal working?
This question expresses the goal of system identification techniques. The actual answer to this
question lies in how the dierent terms are translated mathematically. This course intends to
illustrate the spectrum of choices one can make here. In order to bootstrap this course, let us give
a working (intuitive) definition of those:
Unknown: Here we assume that a precise description of the system is not available. This might be as
(i) the system is too complex to derive completely from (physical) laws; (ii) the system might
behave dierent from what would be expected from a theoretical description (e.g. due to
aging, unaccounted eects, or conversion from continuous to discrete time); (iii) we only need
to have a good approximation of the system which serves our purpose well.
Dynamic System: The actual behavior relating input signal to output signal, often using a physical process. The
keyword dynamic is understood here as follows: output values depend on present as well as
past inputs given to the system.
Model: A mathematical representation of the studied system. Many dierent flavors of models exists
(see next chapter): this course will study mathematical models relating input and output
signals using equations. (Logic, software, language or intuition can be used alternatively).
Experiment: A datum collected when feeding the system with a predesigned input signal. This book will
often be concerned with signals taking continuous values in R. (Alternatively, values of signals
can be binary, categorical, strictly positive, or taking elements in other structured sets).
Design: How to choose the input signals in order to optimize the result of the overall analysis?
Process: In which shape should the signals be (pre-)processed before submitting to analysis?
Interpret: In what sense is the identified model accurate and reliable, and which results might be due
to unknown disturbances, noisy measurements or artificial model structures?
13
1.1. SYSTEMS & MODELS
In a specific sense, system identification is concerned with coming with an accurate model given
the input-output signals recorded during working of the studied system.
Hence, it becomes plain that system identification is closely related to other fields of math-
ematical modeling. We mention here the various domains concerned with parameter estimation
including statistical inference, adaptive filtering and machine learning. Historically, system identi-
fication originates from an engineering need to form models of dynamical systems: it then comes
as no surprise that traditionally emphasis is laid on numerical issues as well on system-theoretical
concerns.
Progress in the field has much been reinforced by introducing good software to execute the
various algorithms. This makes the methodology semi-automatic: that is a user needs still have
a conceptual overview on what is to be done, but the available software tools take care of most
technical details. In this course, the use of the MATLAB System Identification toolbox is discussed
in some detail.
System Identification as a field came only in existence in the 60s, while its roots can be traced
back to the Least Squares techniques, other techniques of statistical inference. The field however
originated from an engineering need to have good models for use in automatic control. Modern
system identification is often attributed to the work of Astrom and Bohlin [1], while contemporary
system identification is often associated to the work as reviewed in Ljung [4] or Soderstrom and
Stoica [5]. The latter work will be the basis of this course.
Figure 1.1: As a medical doctor you get to study the human body. As a doctor you work with an
internal representation (=model) of how the body (=system) works.
14
1.1. SYSTEMS & MODELS
Definition 1 (System or Model) The overall behaviors you get to study is referred to as the
system. The internal (mental) representation you as an researcher use in order to study the system,
is called the model.
(a) (b)
(c)
Figure 1.2: (a) Schematic representation of a stirred thank process. (b) representation of a speech
apparatus. (c) Example of a generated acoustic signal with two dierent filters shaped by intention
(k versus a)
Let us begin by describing some of the systems which are being studied in the context of this
course.
Stirred Thank: The following is a prototypical example in the context of process control. Consider a bio-
chemical reactor, where two dierent substances go in via respective pipelines. Both inflows
comes at a certain flow-rate and have a certain concentration, either of which can be controlled
by setting valves. Then the substances interacts inside the stirred tank, and the yield is
tapped from the tank. Maybe the aim of such process is to maximize the concentration of
the yield at certain instances. A mathematical approach to such automatic control however
requires a mathematical description of the process of interest. That is, we need to set up
equations relating the setting of the valves and the output. Such model could be identified by
experimenting on the process and compiling the observed results into an appropriate model.
Speech: Consider the apparatus used to generate speech in the human. In an abstract fashion, this
15
1.1. SYSTEMS & MODELS
can be seen as a white noise signal generated by the glottis. Then the mouth are used to filter
this noise into structured signals which are perceived by an audience as meaningful. Hence,
this apparatus can be abstracted into a model with unknown white noise input, a dynamical
system shaped by intention, and an output which can be observed. Identification of the filter
(dynamical system) can for example be used to make a artificial speech.
Lateron in this course, you will be asked to study how techniques of system identification can be
applied in a range of dierent applications.
Industrial: The prototypical example of an engineering system is an industrial plant which is fed by an
inflow of raw material, and some complicated process converts it into the desired yield. Often
the internal mechanism of the studied process can be worked out in some detail. Nevertheless,
it might be more useful to come up with a simlpler model relating input-signals to output-
signals directly, as it is often (i) easier (cheaper) to develop, (ii) is directly tuned to our need,
and (iii) makes abstraction of irrelevant mechanisms in the process, and (iv) might better
handle the unforeseen disturbances.
Figure 1.3: Illustrative examples: (a) A petrochimical plant. (b) An application of a model for
acoustic signals. (c) An example of an econometric system. (d) Signals arising from TV can be
seen as coming from a system.
Acoustic: The processing of acoustical signals can be studied in the present context. Let us for example
study the room which converts an acoustic signal (say a music signal) into an acoustic signal
augmented with echo. It is then often of interest to compensate the signal sent into the room
for this eect, so as to clean the perceived signal by the audience. In this example, the room
is conceived as the dynamical system, and it is of interest to derive a model based on acoustic
signals going into the room, and the consequent signals perceived by an audience.
Econometric: The following example is found in a financial context. Consider the records of the currency
exchange rates. This multivariate time-series is assumed to be driven by political, socio-
economic or cultural eects. A crude way to model such non-measurable eects is as white
noise. Then the interesting bit is how the exchange rates are interrelated: how for example a
injection of resources in one market might alter other markets as well.
Multimedial: Finally, consider the sequence of images used to constitute a cartoon on TV say. Again,
consider the system driven by signals roughly modeling meaning, and outputting the values
projected in the dierent pixels. It is clear that the signals of neighboring pixels are inter-
related, and that the input signal is not as high-dimensional as the signals projected on the
screen.
16
1.2. THE SYSTEM IDENTIFICATION PROCEDURE
17
1.3. A SIMPLE EXAMPLE
impedance of a system by comparing the current measured at input with the corresponding voltage
at the output line of a system. Similarly, system identification tries to figure out the dynamics of a
system by relating input signal to corresponding output, i.e. from observed input-output behavior.
(a) (b)
18
1.3. A SIMPLE EXAMPLE
(c) (d)
(e) (f)
(g) (h)
Figure 1.4:
19
1.4. NOTATION
At first, the structural properties of the system are displayed using nonparametric tools as follows
>> z2 = dtrend(z2);
>> ir = cra(z2);
>> stepr = cumsum(ir);
>> plot(stepr)
Inspection of those properties suggest the following parametric model relating input to output
signals.
y(t) + a1 y(t 1) + a2 y(t 2) = b1 u(t 3) + b2 u(t 4) (1.1)
Here {a1 , a2 , b1 , b2 } are to be estimated based on the collected data as given before.
The dynamics of this estimated model are characterized as the poles and zeros of the system. This
is given as
The transfer function corresponding to the estimated model, and derived from the non-parametric
method is compared as follows
Many open questions on the studied system remain after this simple analysis. For example Is
the estimated model accurate enough (model validation)?, Is the model structure as given in eq.
(1.1) appropriate? If we can freely choose the input signals, what would the optimal inputs be
(experiment design)?, . . . .
1.4 Notation
Hardly any non-mathematician will admit that mathematics has a cultural and aes-
thetic appeal, that it has anything to do with beauty, power or emotion. I categorically
deny such cold and rigid view. [N.Wiener, 1956]
Mathematical manuscripts tend to scare people away because of their intrinsic technical nota-
tion. However, mathematical notation is carefully crafted over the years to express ideas, inventions,
truths, intuitions and reasonings of exact sciences better than any spoken language could do. Sim-
ilar to spoken languages, mathematical notation comes in many dierent dialects, obstructing the
fluent interaction between dierent groups of researchers. Dialects may dier in subtle issues as e.g.
20
1.4. NOTATION
the use of capital symbols for certain quantities or in indexing systems, or in capital dierence as
the use of operators versus explicit representations of transforms. As for any compiler, ideas might
not work out properly if the syntax is not as intended. As such, it really pays o to get familiar
with dierent notational conventions.
In this course we adapt the following notation.
(Constant): A constant quantity will be denoted as a lower-case letter in an equation. For example scalars
(e.g. c, a, b), indices (as e.g. i, j, k, n, . . . ), functions (as e.g. f, g, . . . ) and so on.
(Vector): A vector - an array of scalars taking value in Rd - is denoted as a boldface lowercase letter
(e.g. a, b, c, . . . ).
(Matrix): A matrix - a tableau of scalars taking values in Rnd - is denoted as a boldface capital letters
(e.g. A, B, M,)
(Random variable): Random quantities will be noted as capital letters in equations. Random quantities need a
proper stochastic setting to be well-defined (see chapter 4), in practice they can be recognized
as they can take dierent values (realizations).
(Set): Sets of elements are denoted using curled brackets: e.g. {a, b, c} is a set of three constant
values. Sets are referred to using mathbb letters, e.g. R, N, C, . . . .
(Operator): An operator is a mapping of a function to another. An operator is denoted as a calligraphic
letter, e.g. L : {f } ! {f } is a mapping from the set of functions into the same set.
(Reserved): In order to ease notational load, a number of symbols connect (in this course) to a given
meaning. An overview of those is given in Table (1.1).
21
1.4. NOTATION
22
Bibliography
[1] K.J. Astrom and P. Eykho. System Identification A Survey. Automatica 7(2), pp. 123162,
1971.
[2] B.D.O. Anderson and J.B. Moore. Optimal Filtering. Prentice-Hall, 1979.
[3] G. Box and G. Jenkins. Time Series Analysis: Forecasting and Control . Prentice-Hall, 1987.
[4] L. Ljung. System Identification, Theory for the User. Prentice Hall, 1987.
[5] T. Soderstrom. and P. Stoica. System Identification. Prentice-Hall Englewood Clis, 1989.
23
BIBLIOGRAPHY
24