Filtering and Identification
Lecture 1:
Introduction and refreshment LA
Michel Verhaegen and Jan-Willem van Wingerden
1/39
Delft Center for Systems and Control
Delft University of Technology
Introduction to the course
• A Challenging/Motivating Application
Adaptive Optics
2/39
Delft Center for Systems and Control
Introduction to the course
• A Challenging/Motivating Application
Adaptive Optics
• Key problems
2/39
Delft Center for Systems and Control
Introduction to the course
• A Challenging/Motivating Application
Adaptive Optics
• Key problems
• Goal of the Course:
To DERIVE Numerical solutions to the
problems to meet the challenges!
2/39
Delft Center for Systems and Control
Introduction to the course
• A Challenging/Motivating Application
Adaptive Optics
• Key problems
• Goal of the Course:
To DERIVE Numerical solutions to the
problems to meet the challenges!
• Outline and Organization of the Course
2/39
Delft Center for Systems and Control
Introduction to the course
• A Challenging/Motivating Application
Adaptive Optics
• Key problems
• Goal of the Course:
To DERIVE Numerical solutions to the
problems to meet the challenges!
• Outline and Organization of the Course
• Refreshement
2/39
Delft Center for Systems and Control
Smart Optics Systems
Star
Telescope / Plane wavefront
Collimator Turbulent Atmosphere
Disturbed wavefront
Deformable
mirror
Controller
Tip−tilt mirror
Beam splitter
Wavefront
sensor
Camera
Adaptive Optics Active correction of wavefront aberrations by a
deformable mirror. What is needed from a control engineer?
3/39
Delft Center for Systems and Control
Smart Optics Systems
Star
Telescope / Plane wavefront
Collimator Turbulent Atmosphere
Disturbed wavefront
Deformable
mirror
Controller
Tip−tilt mirror
Beam splitter
Wavefront
sensor
Camera
Adaptive Optics Active correction of wavefront aberrations by a
deformable mirror. What is needed from a control engineer?
3/39
Delft Center for Systems and Control
Smart Optics Systems
Star
Telescope / Plane wavefront
Collimator Turbulent Atmosphere
Disturbed wavefront
Deformable
mirror
Controller
Tip−tilt mirror
Beam splitter
Wavefront
sensor
Camera
Adaptive Optics Active correction of wavefront aberrations by a
deformable mirror. What is needed from a control engineer?
3/39
Delft Center for Systems and Control
I. Domain Knowledge
Optical Field (spatial do-
main):
Ψ(r) = a(r)ejφ(r)
→ W (r, t) = Re Ψ(r)ejωt
wavenumber
(
ω
c for c (speed of light)
k = 2π
λ for λ (wavelength)
4/39
Delft Center for Systems and Control
I. Domain Knowledge
Optical Field (spatial do- φ(x, y, t)
main):
Ψ(r) = a(r)ejφ(r)
→ W (r, t) = Re Ψ(r)ejωt
y x
wavenumber Video Demo: Gemini Telescope (1:25)
( P
ω
for c (speed of light)
y x
c
k = 2π
λ for λ (wavelength)
4/39
Delft Center for Systems and Control
The Essential Role of the Wavefront (Phase) in Imaging
5/39
Delft Center for Systems and Control
II. Sensor
Schematic Shack-Hartmann Keck Measurements
Sensor
0.5
s(1)
φ(x, y) 0
-0.5
0 50 100 150
s(xi , yi )
s(N )
0.5
0
[From M. Konnik, 2010]
-0.5
0 50 100 150
with s(xi , yi ) an approximation
∂φ
of the slope ∂x → φ̂? • — current time index t = 150.
∂φ
∂y
6/39
Delft Center for Systems and Control
III. Actuator
Let Φa = vec φa (xi , yi ) ,
then in the low-bandwith
regime, the relation between
the actuator inputs and the
wavefront induced by the
mirror is:
Φa = M u
Taking time into consideration
[Ph.D thesis Roger Hamerlinck
we denote this as:
and Rogier Ellenbroek, (TuE - TUD)]
Φdm (t) = M udm (t)
7/39
Delft Center for Systems and Control
udm
b
Φ(t) η(t)
VI. Control
Φdm (t)
udm (t) DM − WFS + s(t)
M (z −1 ) SH-sensor
Controller
With t = 150(e.g.) the current time instance, we want to influence
Φ(t + 1). How to determine udm (t + 1)?
8/39
Delft Center for Systems and Control
udm
b
Φ(t) η(t)
VI. Control
Φdm (t)
udm (t) DM − WFS + s(t)
M (z −1 ) SH-sensor
Controller
With t = 150(e.g.) the current time instance, we want to influence
Φ(t + 1). How to determine udm (t + 1)?
b̂
• Criterium: Cov(Φdm (t + 1) − Φ(t + 1)). With the DM model
this is equal to:
b̂
Cov(M udm (t + 1) − Φ(t + 1))
8/39
Delft Center for Systems and Control
udm
b
Φ(t) η(t)
VI. Control
Φdm (t)
udm (t) DM − WFS + s(t)
M (z −1 ) SH-sensor
Controller
With t = 150(e.g.) the current time instance, we want to influence
Φ(t + 1). How to determine udm (t + 1)?
b̂
• Criterium: Cov(Φdm (t + 1) − Φ(t + 1)). With the DM model
this is equal to:
b̂
Cov(M udm (t + 1) − Φ(t + 1))
• What is in the end needed to minimize this cost function?
8/39
Delft Center for Systems and Control
Wide scale Applicability?
Photonics: Driving Economic Growth in Europe
Microscopy
Lithography
Astronomy
Opthalmology
9/39
Delft Center for Systems and Control
Introduction to the course
• A Challenging/Motivating Application
Adaptive Optics
• Key problems
• Goal of the Course:
To DERIVE Numerical solutions to the
problems to meet the challenges!
• Outline and Organization of the Course
• Refreshement
10/39
Delft Center for Systems and Control
Teaching Staff (DCSC)
Lecturers
Prof.dr.ir. Michel Verhaegen | [email protected]
Dr.ir. Jan-Willem van Wingerden | [email protected]
Teaching Assistants (TA’s):
Baptiste Sinquin (MSc) | [email protected]
Pieter Piscaer | [email protected]
Student Assistant (SA):
Peter Várnai | [email protected]
11/39
Delft Center for Systems and Control
Objectives of the course
After studying this course you should
be able to derive estimation, filtering and identifica-
a
tion algorithms based on the the linear least
squares method
a
And control (H2 , etc.)
12/39
Delft Center for Systems and Control
Objectives of the course
After studying this course you should
be able to derive estimation, filtering and identifica-
tion algorithms based on the the linear least
squares method
And control (H2 , etc.)
1. Deriving a Mathematical Model (linear State Space Model)
from Data = Identification.
2. Determining the optimal (state) estimate given the (State
Space) Model = Filtering.
3. The Fundamental Basics is Linear Least squares =
Estimation.
12/39
Delft Center for Systems and Control
Course material
• Book:
Filtering and System Identification: An
Introduction, by Michel Verhaegen and
Vincent Verdult, Cambridge University Press,
2007.
13/39
Delft Center for Systems and Control
Course material
• Book:
Filtering and System Identification: An
Introduction, by Michel Verhaegen and
Vincent Verdult, Cambridge University Press,
2007.
• Student Guide: Rules, Grading, Schedule,
office-hours, · · · , and hand-outs, home works,
matlab exercises, Practical Exercise
13/39
Delft Center for Systems and Control
Course material
• Book:
Filtering and System Identification: An
Introduction, by Michel Verhaegen and
Vincent Verdult, Cambridge University Press,
2007.
• Student Guide: Rules, Grading, Schedule,
office-hours, · · · , and hand-outs, home works,
matlab exercises, Practical Exercise
• Register on Piazza - the tool we will use for
communication between students and
teaching staff! All on blackboard!
13/39
Delft Center for Systems and Control
Outline of the course
• Nine lectures
See Course schedule on the website
14/39
Delft Center for Systems and Control
Outline of the course
• Nine lectures
See Course schedule on the website
• Four instruction lectures/Four home-works
See Course schedule on the website
14/39
Delft Center for Systems and Control
Outline of the course
• Nine lectures
See Course schedule on the website
• Four instruction lectures/Four home-works
See Course schedule on the website
• Two matlab hands-on sessions
See Course schedule on the website
14/39
Delft Center for Systems and Control
Outline of the course
• Nine lectures
See Course schedule on the website
• Four instruction lectures/Four home-works
See Course schedule on the website
• Two matlab hands-on sessions
See Course schedule on the website
• Practical exercise
Handed-out (see course schedule) —
Register in groups of 2 (TA)!
14/39
Delft Center for Systems and Control
Exam
• Four sets of homework exercises: 6%
Deadline Hand-in sets see
“Guidelines/Rules/Schedule sc4040:
2016-2017” [1]
15/39
Delft Center for Systems and Control
Exam
• Four sets of homework exercises: 6%
Deadline Hand-in sets see
“Guidelines/Rules/Schedule sc4040:
2016-2017” [1]
• Two sets of matlab exercises: 4%
Hand-in sets see [1]
15/39
Delft Center for Systems and Control
Exam
• Four sets of homework exercises: 6%
Deadline Hand-in sets see
“Guidelines/Rules/Schedule sc4040:
2016-2017” [1]
• Two sets of matlab exercises: 4%
Hand-in sets see [1]
• ···
15/39
Delft Center for Systems and Control
Recommendation and Rules [1]
• Lectures: Highly recommended!
a
[1] “Guidelines/Rules/Schedule sc4040: 2016-2017”
16/39
Delft Center for Systems and Control
Recommendation and Rules [1]
• Lectures: Highly recommended!
• Homework/matlab/Practical exercises:
Exercises available and handed-in as outlined
on blackboard [1]!
[1] “Guidelines/Rules/Schedule sc4040: 2016-2017”
16/39
Delft Center for Systems and Control
Recommendation and Rules [1]
• Lectures: Highly recommended!
• Homework/matlab/Practical exercises:
Exercises available and handed-in as outlined
on blackboard [1]!
• During the help-session for finalizing the
homework - sit on oneven rows only.
Advise: Come prepared!
[1] “Guidelines/Rules/Schedule sc4040: 2016-2017”
16/39
Delft Center for Systems and Control
Recommendation and Rules [1]
• Lectures: Highly recommended!
• Homework/matlab/Practical exercises:
Exercises available and handed-in as outlined
on blackboard [1]!
• During the help-session for finalizing the
homework - sit on oneven rows only.
Advise: Come prepared!
• ...
[1] “Guidelines/Rules/Schedule sc4040: 2016-2017”
16/39
Delft Center for Systems and Control
Filtering and identification
Let’s start!
17/39
Delft Center for Systems and Control
Mathematical ingredients?
(Linear) Least Squares
min ǫT ǫ y = Fx + ǫ
x
y
f2
• Matrix Theory
F f1
• Probability Theory
• Signal/System Theory
• Domain Knowledge
18/39
Delft Center for Systems and Control
Overview Linear Algebra (LA)
• The matrix concept!
• The Usefull matrix factorization: The SVD
• A Quick view on its potential!
• “Matrix-crimes”
• The Useful matrix Lemma
19/39
Delft Center for Systems and Control
Definition of a matrix
A matrix A ∈ Rm×n is a
two-dimensional table of numbers:
a11 a12 · · · a1n
a a a h i
21 22 2n
A= . .. = a1 a2 · · · an
am1 am2 · · · amn
with aij ∈ R, ai ∈ Rm .
20/39
Delft Center for Systems and Control
A matrix represents a (linear) mapping
A matrix is (also) a mapping between two
Euclidean vector spaces:
A : Rn → Rm : ∀x ∈ Rn , ∃y ∈ Rm : Ax = y
n
R m
R
"A"
0 0
21/39
Delft Center for Systems and Control
The “Four” key spaces of a linear mapping
R
n
R
m The linear mapping: A : Rn
(“domain”) → Rm (“Image or
"A"
0 0
Range space”) is character-
ized by four subspaces:
• range(A) = {y ∈ Rm : y = Ax for some x ∈ Rn }
• range(AT ) = {x ∈ Rn : x = AT y for some y ∈ Rm }
• ker(A) = {x ∈ Rn : Ax = 0}
• ker(AT ) = {y ∈ Rm : AT y = 0}
The rank of A equals the dimension of range(A).
22/39
Delft Center for Systems and Control
Special class of matrices
A “square” matrix Q ∈ Rn×n is
Definition:
orthogonal if
QT Q = QQT = In
This means:
1. Each column vector of an orthogonal matrix has length · · · ?
2. Two different column (row) vectors of an orthogonal matrix
satisfy?
3. What is the inverse of an orthogonal matrix?
4. And many more useful (numerical) advantages ...
23/39
Delft Center for Systems and Control
Overview Linear Algebra (LA)
• The matrix concept!
• The Usefull matrix factorization: The SVD
• A Quick view on its potential!
• “Matrix-crimes”
• The Useful matrix Lemma
24/39
Delft Center for Systems and Control
The Singular value decomposition (SVD)
The SVD-Theorem: Let A ∈ Rm×n , then there exists
a pair of orthogonal matrices:
h i
U = u1 · · · um ∈ Rm×m : U U T = U T U = Im
h i
V = v1 · · · vn ∈ Rn×n : V V T = V T V = In
such that,
" #
Σ 0
A=U V T ∈ Rm×n , Σ = diag(σ1 , · · · , σp )
0 0
with σ1 ≥ σ2 ≥ · · · ≥ σp ≥ 0 and p = min(m, n).
25/39
Delft Center for Systems and Control
Example SVD 1 0 1
(CondA.m)
1 1
A = 2 2 1
⇒
0 1 1
√ √ √ √ √ √ √ T
3 2 6 3 2 6 2 3
− 0 0 − −
√3 2
√
6 2 √6 2
√
3
6 √
A= − 33 0
3 0 1 0 − 66 − 2
2
− 33
√ √ √ √ √
− 33 − 22 6
6
0 0 0 − 36 0 3
3
| {z }| {z }| {z }
U Σ VT
[U,Sigma,V]=svd(A);
• Column vectors of the matrix U : left singular vectors
• Column vectors of the matrix V : right singular vectors
• Diagonal elements of Σ: the singular values
26/39
Delft Center for Systems and Control
RangeDemo.m
27/39
Delft Center for Systems and Control
Observations from RangeDemo.m
• columns of A lie in a plane ⊂ R3 ⇔ dim spancol (A) = 2 ⇔
# non-zero singular values (sv’s) = 2
• the left singular vectors u1 , u2 corresponding to the non-zero
singular values:
2
X
A= σi ui viT
i=1
form an orthogonal basis for spancol (A).
• the left singular vector u3 corresponding to the zero singular
value (i = 3) is a basis for ker(AT ).
• the left (and right) singular vectors are orthogonal and are of
unit length.
28/39
Delft Center for Systems and Control
The four key subspaces
Let the SVD of the matrix A be given as,
h i Σ1 | 0 V1T
A = U1 | U2 with Σ1 > 0
0 |0 V2T
then, since Ax = U1 Σ1 (V1T x) ,
range(A) = {y ∈ Rm : y = Ax for some x ∈ Rn } = span(U1 )
n
Further, since for x = V2 α : R
R
m
"A"
Ax = U1 Σ1 V1T V2 α = 0, V1
U1
V
2
U2
n 0 0
ker(A) = {x ∈ R : Ax = 0} = span(V2 )
29/39
Delft Center for Systems and Control
Overview Linear Algebra (LA)
• The matrix concept!
• The Usefull matrix factorization: The SVD
• A Quick view on its potential
• “Matrix-crimes”
• The Useful matrix Lemma
30/39
Delft Center for Systems and Control
“Optimal” low rank approximation
Theorem: Let the SVD in the SVD-theorem be
given and let k < rank(A) and let the following
approximation Ak of A be given:
k
X
Ak = σi ui viT
i=1
then,
min kA − Bk2 = kA − Ak k2 = σk+1
rank(B)=k
31/39
Delft Center for Systems and Control
Spiegelman.m
32/39
Delft Center for Systems and Control
Overview Linear Algebra (LA)
• The matrix concept!
• The Usefull matrix factorization: The SVD
• A Quick view on its potential
• ‘‘Matrix-crimes”
• The Useful matrix Lemma
33/39
Delft Center for Systems and Control
Matrix-crimes: Syntax crimes
1. Non-compatibility of dimensions: A + B when
A ∈ R2×3 and B ∈ R3×3 and the same for
AT B.
2. Matrix products do (in general) not commute:
AB 6= BA.
3. Matrix inverse of the product of matrices:
(AB)−1 6= A−1 B −1 in stead of
(AB)−1 = B −1 A−1 - provided inverses exist!
4. (A + B)2 6= A2 + 2AB + B 2 !
Typical violations of Stanford students [S. Boyd - EE 263], our TUD students
“too often” join the club ... 34/39
Delft Center for Systems and Control
Matrix-crimes: Semantic crimes
Matrix expressions that simply do not make
sense. Examples:
1. Let x ∈ Rn , then xxT exists but (xxT )−1 not,
why?
2. If the matrix Q ∈ Rm×n for m > n, then
QQT
can never be the identity matrix.
35/39
Delft Center for Systems and Control
Overview Linear Algebra (LA)
• The matrix concept!
• The Usefull matrix factorization: The SVD
• A Quick view on its potential
• “Matrix-crimes”
• The Useful matrix Lemma
36/39
Delft Center for Systems and Control
Lemma 2.3 p. 19
Schur Complements: Block Triangular Factorizations
Let the block matrix A ∈ Rn×n (symmetric) be invertible, then a
very useful matrix factorization of matrix consisting of different
blocks is the following (C ∈ Rm×m ):
A B I 0 A 0 I A−1 B
=
BT C B T A−1 I 0 C − B T A−1 B 0 I
Therefore the following holds,
A B
≥ 0 ⇔ A > 0 and C − B T A−1 B ≥ 0
BT C
37/39
Delft Center for Systems and Control
Lemma 2.3 p. 19
Schur Complements: Block Triangular Factorizations
When C is invertible, then we have:
A B I BC −1 A − BC −1 B T 0 I 0
=
BT C 0 I 0 C C −1 B T I
Therefore the following holds,
A B
≥ 0 ⇔ C > 0 and A − BC −1 B T ≥ 0
BT C
The condition M atrix ≥ 0 among others means that a square
root of the matrix exists: M atrix = M atrix1/2 M atrixT /2
38/39
Delft Center for Systems and Control
Summary of Lecture 1
To start the discovery tour for retrieving system information from
measured data records:
What we just have done is a brief review of linear algebra. Next
we briefly review probability theory and filtering of stochastic
processes! We will also start with analysing the derterministic
least squares problem !
Reading of the course book of first Day Lecture:
Study Chapters 1, 2(2.1-2.5), 3, 4(4.1-4.3)
39/39
Delft Center for Systems and Control