Escolar Documentos
Profissional Documentos
Cultura Documentos
Stephen Boyd
Lecture 1
Overview
course mechanics
outline & topics
what is a linear dynamical system?
why study linear systems?
some examples
11
Course mechanics
course requirements:
weekly homework
takehome midterm exam (date TBD)
takehome final exam (date TBD)
Overview
12
Prerequisites
Overview
13
Overview
14
where:
t R denotes time
x(t) Rn is the state (vector)
u(t) Rm is the input or control
y(t) Rp is the output
Overview
15
y = Cx + Du
Overview
16
Overview
17
where
t Z = {0, 1, 2, . . .}
(vector) signals x, u, y are sequences
Overview
18
Overview
19
Usefulness of LDS
Overview
110
Overview
111
Overview
112
y = Cx
Overview
113
typical output:
3
2
1
0
1
2
3
0
50
100
150
200
250
300
350
3
2
1
0
1
2
3
0
100
200
300
400
500
600
700
800
900
1000
t
output waveform is very complicated; looks almost random and
unpredictable
well see that such a solution can be decomposed into much simpler
(modal) components
Overview
114
0.2
0
0.2
0
1
50
100
150
200
250
300
350
50
100
150
200
250
300
350
50
100
150
200
250
300
350
50
100
150
200
250
300
350
50
100
150
200
250
300
350
50
100
150
200
250
300
350
50
100
150
200
250
300
350
50
100
150
200
250
300
350
0
1
0
0.5
0
0.5
0
2
0
2
0
1
0
1
0
2
0
2
0
5
0
5
0
0.2
0
0.2
0
Overview
115
Input design
add two inputs, two outputs to system:
x = Ax + Bu,
y = Cx,
x(0) = 0
y = ydes = Cx
ustatic = CA
Overview
"1
ydes =
0.63
0.36
116
0
0.2
0.4
0.6
0.8
1
200
200
400
600
800
200
400
600
800
200
400
600
800
200
400
600
800
1000
1200
1400
1600
1800
1000
1200
1400
1600
1800
1000
1200
1400
1600
1800
1000
1200
1400
1600
1800
u2
0.4
0.3
0.2
0.1
0
0.1
200
2
y1
1.5
1
0.5
0
200
y2
0
1
2
3
4
200
117
using very clever input waveforms (EE263) we can do much better, e.g.
u1
0.2
0
0.2
0.4
0.6
0
10
20
10
20
10
20
10
20
30
40
50
60
30
40
50
60
30
40
50
60
30
40
50
60
u2
0.4
0.2
0
0.2
y1
1
0.5
0
0.5
y2
0
0.5
1
1.5
2
2.5
118
5
5
10
15
20
25
10
15
20
25
10
15
20
25
10
15
20
25
u2
0.5
0
0.5
1
1.5
5
2
y1
1
0
1
5
y2
0.5
1
1.5
2
5
119
Overview
120
Estimation / filtering
H(s)
A/D
Overview
121
u(t)
1
0
1
10
10
10
10
s(t)
1.5
1
0.5
0
w(t)
1
0
1
y(t)
1
0
1
t
problem: estimate original signal u, given quantized, filtered signal y
Overview
122
simple approach:
ignore quantization
design equalizer G(s) for H(s) (i.e., GH 1)
approximate u as G(s)y
. . . yields terrible results
Overview
123
0.8
0.6
0.4
0.2
0.2
0.4
0.6
0.8
10
t
RMS error 0.03, well below quantization error (!)
Overview
124
Stephen Boyd
Lecture 2
Linear functions and examples
21
Linear equations
consider system of linear equations
y1
y2
ym
y1
y2
y=
..
ym
..
am1 am2 amn
x1
x2
x=
..
xn
22
Linear functions
a function f : Rn Rm is linear if
f (x + y) = f (x) + f (y), x, y Rn
f (x) = f (x), x Rn R
i.e., superposition holds
x+y
f (y)
y
x
f (x + y)
f (x)
23
24
Interpretations of y = Ax
25
Interpretation of aij
yi =
n
'
aij xj
j=1
aij is gain factor from jth input (xj ) to ith output (yi)
thus, e.g.,
ith row of A concerns ith output
jth column of A concerns jth input
a27 = 0 means 2nd output (y2) doesnt depend on 7th input (x7)
|a31| % |a3j | for j &= 1 means y3 depends mainly on x1
Linear functions and examples
26
27
x1
x2
x3
x4
(provided x, y are small) we have y Ax
A is called the compliance matrix
aij gives deflection i per unit force at j (in m/N)
Linear functions and examples
28
CG
x2
29
ib
y1
x1
ib
y2
210
211
Gravimeter prospecting
gi
gavg
212
213
Thermal system
location 4
heating element 5
x1
x2
x3
x4
x5
xj is power of jth heating element or heat source
yi is change in steady-state temperature at location i
thermal transport via conduction
y = Ax
Linear functions and examples
214
215
216
Gii i = j
0
i=
& j
bij =
0
Gij
i=j
i &= j
217
Cost of production
production inputs (materials, parts, labor, . . . ) are combined to make a
number of products
xj is price per unit of production input j
aij is units of production input j required to manufacture one unit of
product i
yi is production cost per unit of product i
we have y = Ax
ith row of A is bill of materials for unit of product i
218
219
n flows with rates f1, . . . , fn pass from their source nodes to their
destination nodes over fixed routes in a network
ti, traffic on link i, is sum of rates of flows passing through it
flow routes given by flow-link incidence matrix
Aij =
220
221
Linearization
if f : Rn Rm is differentiable at x0 Rn, then
x near x0 = f (x) very near f (x0) + Df (x0)(x x0)
where
)
fi ))
Df (x0)ij =
xj )x0
is derivative (Jacobian) matrix
222
(p4, q4)
4
(x, y)
(p2, q2)
unknown position
3
(p3, q3)
Linear functions and examples
223
(x0 pi)
(x0 pi)2 + (y0 qi)2
x
y
, where
ai2 = *
(y0 qi)
(x0 pi)2 + (y0 qi)2
224
estimation or inversion
control or design
mapping or transformation
225
Estimation or inversion
y = Ax
226
Control or design
y = Ax
227
Mapping or transformation
sample problems:
determine if there is an x that maps to a given y
(if possible) find an x that maps to y
find all xs that map to a given y
if there is only one x that maps to y, find it (i.e., decode or undo the
mapping)
228
a1 a2 an
where aj Rm
then y = Ax can be written as
y = x1 a 1 + x2 a 2 + + xn a n
(xj s are scalars, aj s are m-vectors)
y is a (linear) combination or mixture of the columns of A
coefficients of x give coefficients of mixture
Linear functions and examples
229
1
0
e1 =
.. ,
0
0
1
e2 =
.. ,
0
...
0
0
en =
..
1
230
a
T1
a
T2
A=
..
a
Tn
where a
i Rn
then y = Ax can be written as
a
T1 x
a
T2 x
y=
..
a
Tmx
thus yi = *
ai, x+, i.e., yi is inner product of ith row of A with x
Linear functions and examples
231
geometric interpretation:
yi = a
Ti x = is a hyperplane in Rn (normal to a
i )
yi = *
ai, x+ = 0
yi = *
ai, x+ = 3
a
i
yi = *
ai, x+ = 2
yi = *
ai, x+ = 1
232
y1
a11
a21
a12
a22
x2
y2
aij is the gain along the path from jth input to ith output
(by not drawing paths with zero gain) shows sparsity structure of A
(e.g., diagonal, block upper triangular, arrow . . . )
Linear functions and examples
233
A11 A12
0 A22
x1
x2
y=
y1
y2
y2 = A22x2,
234
block diagram:
x1
y1
A11
A12
x2
y2
A22
235
n
'
aik bkj
k=1
x
n
AB
236
c1 cp
= AB =
Ab1 Abp
T
cT1
a
1 B
.
C = . = AB = ..
cTm
a
TmB
237
238
b11
z1
y1
a22
y2
path gain= a22b21
a21
b21
b12
x2
a11
b22
z2
a12
239
Stephen Boyd
Lecture 3
Linear algebra review
vector space, subspaces
independence, basis, dimension
range, nullspace, rank
change of coordinates
norm, angle, inner product
31
Vector spaces
32
x + y = y + x,
x, y V
(+ is commutative)
(x + y) + z = x + (y + z),
0 + x = x, x V
x, y, z V
(+ is associative)
(0 is additive identity)
()x = (x),
, R
x V
(x + y) = x + y,
R x, y V
( + )x = x + x,
, R
1x = x,
x V
x V
33
Examples
34
Subspaces
35
36
37
38
Nullspace of a matrix
the nullspace of A Rmn is defined as
N (A) = { x Rn | Ax = 0 }
39
Zero nullspace
A is called one-to-one if 0 is the only element of its nullspace:
N (A) = {0}
x can always be uniquely determined from y = Ax
(i.e., the linear transformation y = Ax doesnt lose information)
mapping from x to Ax is one-to-one: different xs map to different ys
columns of A are independent (hence, a basis for their span)
A has a left inverse, i.e., there is a matrix B Rnm s.t. BA = I
det(AT A) *= 0
(well establish these later)
Linear algebra review
310
Interpretations of nullspace
suppose z N (A)
y = Ax represents measurement of x
z is undetectable from sensors get zero sensor readings
x and x + z are indistinguishable from sensors: Ax = A(x + z)
N (A) characterizes ambiguity in x from measurement y = Ax
y = Ax represents output resulting from input x
z is an input with no result
x and x + z have same result
N (A) characterizes freedom of input choice for given result
Linear algebra review
311
Range of a matrix
the range of A Rmn is defined as
R(A) = {Ax | x Rn} Rm
312
Onto matrices
A is called onto if R(A) = Rm
Ax = y can be solved in x for any y
columns of A span Rm
A has a right inverse, i.e., there is a matrix B Rnm s.t. AB = I
rows of A are independent
N (AT ) = {0}
det(AAT ) *= 0
(some of these are not obvious; well establish them later)
Linear algebra review
313
Interpretations of range
suppose v R(A), w * R(A)
y = Ax represents measurement of x
y = v is a possible or consistent sensor signal
y = w is impossible or inconsistent; sensors have failed or model is
wrong
y = Ax represents output resulting from input x
v is a possible result or output
w cannot be a result or output
R(A) characterizes the possible results or achievable outputs
Linear algebra review
314
Inverse
A Rnn is invertible or nonsingular if det A *= 0
equivalent conditions:
columns of A are a basis for Rn
rows of A are a basis for Rn
y = Ax has a unique solution x for every y Rn
A has a (left and right) inverse denoted A1 Rnn, with
AA1 = A1A = I
N (A) = {0}
R(A) = Rn
det AT A = det AAT *= 0
Linear algebra review
315
Interpretations of inverse
suppose A Rnn has inverse B = A1
mapping associated with B undoes mapping associated with A (applied
either before or after!)
x = By is a perfect (pre- or post-) equalizer for the channel y = Ax
x = By is unique solution of Ax = y
316
n
!
(bTi y)ai
i=1
thus, inner product with rows of inverse matrix gives the coefficients in
the expansion of a vector in the columns of the matrix
b1, . . . , bn and a1, . . . , an are called dual bases
317
Rank of a matrix
we define the rank of A Rmn as
rank(A) = dim R(A)
(nontrivial) facts:
rank(A) = rank(AT )
rank(A) is maximum number of independent columns (or rows) of A
hence rank(A) min(m, n)
rank(A) + dim N (A) = n
318
Conservation of dimension
interpretation of rank(A) + dim N (A) = n:
rank(A) is dimension of set hit by the mapping y = Ax
dim N (A) is dimension of set of x crushed to zero by y = Ax
conservation of dimension: each dimension of input is either crushed
to zero or ends up in output
roughly speaking:
n is number of degrees of freedom in input x
dim N (A) is number of degrees of freedom lost in the mapping from
x to y = Ax
rank(A) is number of degrees of freedom in output y
319
320
321
322
Change of coordinates
standard basis vectors in Rn: (e1, e2, . . . , en) where
ei =
0
..
1
..
0
(1 in ith component)
obviously we have
x = x1 e 1 + x2 e 2 + + xn e n
xi are called the coordinates of x (in the standard basis)
Linear algebra review
323
define T =
t1 t2 t n
so x = T x
, hence
x
= T 1x
324
y = T y
so
y = (T 1AT )
x
325
(Euclidean) norm
for x Rn we define the (Euclidean) norm as
/x/ =
xT x
326
n
1!
i=1
x2i
,1/2
/x/
=
n
327
Inner product
328
xT y
/x//y/
xT y
$y$2
329
special cases:
x and y are aligned: = 0; xT y = /x//y/;
(if x *= 0) y = x for some 0
x and y are opposed: = ; xT y = /x//y/
(if x *= 0) y = x for some 0
x and y are orthogonal: = /2 or /2; xT y = 0
denoted x y
330
xT y > 0
xT y < 0
{x | xT y 0}
y
331
Stephen Boyd
Lecture 4
Orthonormal sets of vectors and QR
factorization
41
42
43
Geometric properties
suppose columns of U = [u1 uk ] are orthonormal
44
45
uiuTi = I
i=1
46
n
!
(uTi x)ui
i=1
n
!
i=1
the identity I = U U T =
47
"n
T
i=1 ui ui
I=
n
!
|ui&%ui|
i=1
since
x=
n
!
|ui&%ui|x&
i=1
48
Geometric interpretation
if U is orthogonal, then transformation w = U z
preserves norm of vectors, i.e., "U z" = "z"
preserves angles between vectors, i.e., ! (U z, U z) = ! (z, z)
examples:
rotations (about some axis)
reflections (through some plane)
49
U =
cos sin
sin
cos
R =
cos
sin
sin cos
410
x2
x2
rotation
e2
reflection
e2
e1
x1
e1
x1
411
Gram-Schmidt procedure
for
rk
412
Gram-Schmidt procedure
step 1a. q1 := a1
step 1b. q1 := q1/"
q1" (normalize)
step 2a. q2 := a2 (q1T a2)q1 (remove q1 component from a2)
step 2b. q2 := q2/"
q2" (normalize)
step 3a. q3 := a3 (q1T a3)q1 (q2T a3)q2 (remove q1, q2 components)
step 3b. q3 := q3/"
q3" (normalize)
etc.
413
a2
q2 = a2 (q1T a2)q1
q2
q1
q1 = a1
for i = 1, 2, . . . , k we have
T
ai = (q1T ai)q1 + (q2T ai)q2 + + (qi1
ai)qi1 + "
qi"qi
414
QR decomposition
written in matrix form: A = QR, where A Rnk , Q Rnk , R Rkk :
& %
%
a 1 a 2 a k = q1
()
* '
'
A
415
416
on exit,
q1, . . . , qr is an orthonormal basis for R(A) (hence r = Rank(A))
each ai is linear combination of previously generated qj s
in matrix notation we have A = QR with QT Q = Ir and R Rrk in
upper staircase form:
zero entries
417
418
Applications
directly yields orthonormal basis for R(A)
yields factorization A = BC with B Rnr , C Rrk , r = Rank(A)
to check if b span(a1, . . . , ak ): apply Gram-Schmidt to [a1 ak b]
staircase pattern in R shows which columns of A are dependent on
previous ones
works incrementally: one G-S procedure yields QR factorizations of
[a1 ap] for p = 1, . . . , k:
[a1 ap] = [q1 qs]Rp
where s = Rank([a1 ap]) and Rp is leading s p submatrix of R
Orthonormal sets of vectors and QR factorization
419
Full QR factorization
with A = Q1R1 the QR factorization as above, write
A=
Q1 Q2
&
R1
0
420
R(Q1) + R(Q2) = Rn
R(Q2) = R(Q1) (and R(Q1) = R(Q2))
(each subspace is the orthogonal complement of the other)
we know R(Q1) = R(A); but what is its orthogonal complement R(Q2)?
Orthonormal sets of vectors and QR factorization
421
from A =
R1T
&
QT1
QT2
we see that
AT z = 0 QT1 z = 0 z R(Q2)
so R(Q2) = N (AT )
(in fact the columns of Q2 are an orthonormal basis for N (AT ))
we conclude: R(A) and N (AT ) are complementary subspaces:
422
N (A) + R(AT ) = Rk
423
Stephen Boyd
Lecture 5
Least-squares
51
Least-squares
52
Geometric interpretation
y r
Axls
R(A)
Least-squares
53
54
Least-squares
55
Projection on R(A)
Axls is (by definition) the point in R(A) that is closest to y, i.e., it is the
projection of y onto R(A)
Axls = PR(A)(y)
the projection function PR(A) is linear, and given by
PR(A)(y) = Axls = A(AT A)1AT y
A(AT A)1AT is called the projection matrix (associated with R(A))
Least-squares
56
Orthogonality principle
optimal residual
r = Axls y = (A(AT A)1AT I)y
is orthogonal to R(A):
%r, Az& = y T (A(AT A)1AT I)T Az = 0
for all z Rn
y r
Axls
R(A)
Least-squares
57
Completion of squares
Least-squares
58
Least-squares
59
R1
0
"
Least-squares
#
#2
!
"
#
#
R
1
#
= #
[Q
Q
]
x
y
1
2
#
#
0
#
#2
!
"
#
#
R
1
T
T #
= #
[Q
Q
]
[Q
Q
]
x
[Q
Q
]
y
1
2
1
2
# 1 2
#
0
510
#!
"#
# R1x QT1 y #2
#
= #
#
#
QT2 y
Least-squares
511
Least-squares estimation
y = Ax + v
x is what we want to estimate or reconstruct
y is our sensor measurement(s)
v is an unknown noise or measurement error (assumed small)
ith row of A characterizes ith sensor
Least-squares
512
Least-squares
513
BLUE property
linear measurement with noise:
y = Ax + v
with A full rank, skinny
Least-squares
514
2
Bij
A2
ij
i,j
Least-squares
515
k1
k4
x
unknown position
k2
k3
516
k1T
k2T
y =
k3T x + v
k4T
517
compute estimate x
by inverting top (2 2) half of A:
x
= Bjey =
0 1.0 0 0
1.12
0.5 0 0
"
y=
2.84
11.9
"
Least-squares
518
Least-squares method
compute estimate x
by least-squares:
x
=A y=
"
0.23 0.48
0.04
0.44
0.47 0.02 0.51 0.18
y=
4.95
10.26
"
Least-squares
519
H(s)
A/D
j 1 t < j,
j = 1, . . . , 10
t
0
h(t )u( ) d
520
3-bit quantization: yi = Q(
yi), i = 1, . . . , 100, where Q is 3-bit
quantizer characteristic
Q(a) = (1/4) (round(4a + 1/2) 1/2)
problem: estimate x R10 given y R100
example:
u(t)
1
0
1
10
10
10
10
s(t)
1.5
1
0.5
y(t) w(t)
0
1
0
1
1
0
1
t
Least-squares
521
we have y = Ax + v, where
AR
10010
is given by Aij =
j
j1
h(0.1i ) d
Least-squares
0.8
0.6
0.4
0.2
0.2
0.4
0.6
0.8
10
t
522
RMS error is
#x xls#
= 0.03
10
Least-squares
523
row 2
row 5
0.05
10
10
10
0.1
0.05
0
0.05
row 8
0.15
0.15
0.1
0.05
0
0.05
524
Stephen Boyd
Lecture 6
Least-squares applications
61
i = 1, . . . , m
i=1
Least-squares applications
62
using matrix notation, total square fitting error is &Ax g&2, where
Aij = fj (si)
hence, least-squares fit is given by
x = (AT A)1AT g
(assuming A is skinny, full rank)
corresponding function is
flsfit(s) = x1f1(s) + + xnfn(s)
applications:
interpolation, extrapolation, smoothing of data
developing simple, approximate model of data
Least-squares applications
63
1 t1 t21 tn1
1
1 t2 t2 tn1
2
2
A=
..
.
1 tm t2m tn1
m
64
Least-squares applications
65
Example
Least-squares applications
66
p1(t)
0.5
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
p2(t)
0.5
p3(t)
0.5
p4(t)
0.5
t
Least-squares applications
67
(p
i=1 xi ai
y&
68
Least-squares applications
69
minx1,...,x7 &
Least-squares applications
(7
i=1 xi ai
y&
p
0
610
u(t)
unknown system
y(t)
611
y(n)
u(n)
u(n 1)
u(0)
y(n + 1) u(n + 1)
u(n)
u(1)
=
..
..
..
.
y(N )
u(N )
u(N 1) u(N n)
h0
h1
.
.
hn
612
Example
4
u(t)
2
0
2
4
0
10
20
30
10
20
30
40
50
60
70
y(t)
5
0
40
50
60
70
613
4
3
2
1
0
1
2
3
4
0
Least-squares applications
10
20
30
40
50
60
70
614
obviously the larger n, the smaller the prediction error on the data used
to form the model
suggests using largest possible model order for smallest prediction error
Least-squares applications
615
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0
10
15
20
25
30
35
40
45
50
difficulty: for n too large the predictive ability of the model on other I/O
data (from the same system) becomes worse
Least-squares applications
616
Cross-validation
evaluate model predictive performance on another I/O data set not used to
develop model
u
(t)
2
0
2
4
0
10
20
30
10
20
30
40
50
60
70
y(t)
5
0
40
50
60
70
Least-squares applications
617
0.8
0.6
0.4
validation data
0.2
modeling data
0
0
10
15
20
25
30
35
40
45
50
618
solid: y(t)
dashed: predicted y(t)
0
5
0
10
20
30
40
50
60
70
solid: y(t)
dashed: predicted y(t)
0
5
0
10
20
30
40
50
60
70
619
&Ax y& =
m
!
(
aTi x yi)2
i=1
where a
Ti are the rows of A (
ai R n )
x Rn is some vector to be estimated
each pair a
i, yi corresponds to one measurement
solution is
xls =
m
!
i=1
a
i a
Ti
*1
m
!
yi a
i
i=1
suppose that a
i and yi become available sequentially, i.e., m increases
with time
Least-squares applications
620
Recursive least-squares
we can compute xls(m) =
m
!
a
i a
Ti
i=1
*1
m
!
yi a
i recursively
i=1
Least-squares applications
621
P +a
a
T
,1
= P 1
1
(P 1a
)(P 1a
)T
T
1
1+a
P a
Least-squares applications
622
.
1
(P 1a
)(P 1a
)T
(P + a
a
T ) P 1
1+a
T P 1a
1
P (P 1a
)(P 1a
)T
= I +a
a
T P 1
T
1
1+a
P a
a
a
T (P 1a
)(P 1a
)T
T
1
1+a
P a
1
a
T P 1a
T 1
T 1
= I +a
a
P
a
a
a
T P 1
T
1
T
1
1+a
P a
1+a
P a
= I
-
Least-squares applications
623
Stephen Boyd
Lecture 7
Regularized least-squares and Gauss-Newton
method
multi-objective least-squares
regularized least-squares
nonlinear least-squares
Gauss-Newton method
71
Multi-objective least-squares
in many problems we have two (or more) objectives
we want J1 = !Ax y!2 small
and also J2 = !F x g!2 small
(x Rn is the variable)
usually the objectives are competing
we can make one smaller, at the expense of making the other larger
common example: F = I, g = 0; we want !Ax y! small, with small x
Regularized least-squares and Gauss-Newton method
72
J1
x(1)
x(2)
x(3)
J2
note
that x Rn, "but this plot is in R2; point labeled x(1) is really
!
J2(x(1)), J1(x(1))
Regularized least-squares and Gauss-Newton method
73
74
Weighted-sum objective
75
J1
x(1)
x(3)
x(2)
J1 + J2 =
J2
76
!Ax y! + !F x g!
where
A =
#$
%
$
% #2
#
#
y
A
#
= #
#
F
g #
#
#2
#
#
= #Ax y#
y =
&
'1
AT A
AT y
AT A + F T F
"1 !
AT y + F T g
"
77
Example
f
78
0.9
0.8
J1 = (y 1)2
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.5
1.5
2.5
J2 = !x!
3.5
3
x 10
79
Regularized least-squares
when F = I, g = 0 the objectives are
J1 = !Ax y!2,
J2 = !x!2
710
estimation/inversion application:
Ax y is sensor residual
prior information: x small
or, model only accurate for x small
regularized solution trades off sensor fit, size of x
711
Nonlinear least-squares
!r(x)! =
m
(
ri(x)2,
i=1
where r : Rn Rm
r(x) is a vector of residuals
reduces to (linear) least-squares if r(x) = Ax y
712
we measure i = !x bi! + vi
(vi is range error, unknown but assumed small)
NLLS estimate: choose x
to minimize
m
(
ri(x) =
i=1
m
(
i=1
(i !x bi!)
713
m
(
ri(x)2, where
i=1
714
715
(k+1)
&
= A
(k)T
(k)
'1
A(k)T b(k)
716
Gauss-Newton example
10 beacons
+ true position (3.6, 3.2); initial guess (1.2, 1.2)
range estimates accurate to 0.5
5
5
5
717
14
12
10
0
5
5
0
0
718
10
!r(x)!2
10
iteration
x(k) converges to (in this case, global) minimum of !r(x)!2
convergence takes only five or so steps
Regularized least-squares and Gauss-Newton method
719
final estimate is x
= (3.3, 3.3)
estimation error is !
x x! = 0.31
(substantially smaller than range accuracy!)
720
4
56
3
2
2
5
5
721
722
Stephen Boyd
Lecture 8
Least-norm solutions of undetermined
equations
least-norm solution of underdetermined equations
minimum norm solutions via QR factorization
derivation via Lagrange multipliers
relation to regularized least-squares
general norm minimization with equality constraints
81
mn
82
83
Least-norm solution
one particular solution is
xln = AT (AAT )1y
(AAT is invertible since A full rank)
in fact, xln is the solution of y = Ax that minimizes #x#
i.e., xln is solution of optimization problem
minimize #x#
subject to Ax = y
(with variable x Rn)
Least-norm solutions of undetermined equations
84
85
{ x | Ax = y }
N (A) = { x | Ax = 0 }
xln
86
87
then
xln = AT (AAT )1y = QRT y
#xln# = #RT y#
88
L = Ax y = 0
89
810
0.06
xln
0.04
0.02
0
0.02
0.04
0.06
0
position
10
12
10
12
10
12
0.8
0.6
0.4
0.2
0
0
0.2
velocity
0.15
0.1
0.05
0
0
811
AT A + I
"1
!
"1
AT AT AAT
812
813
L = Cx d = 0
AT A C T
C
0
$#
AT b
d
AT A C T
C
0
$1 #
AT b
d
814
"1 !
"
!
= C(AT A)1C T
C(AT A)1AT b d
x = (A A)
A bC
C(A A)
" !
T 1
C(A A)
A bd
"&
815
Stephen Boyd
Lecture 9
Autonomous linear dynamical systems
autonomous linear dynamical systems
examples
higher order systems
linearization near equilibrium point
linearization along trajectory
91
92
= Ax(t)
x(t)
x1
example 1: x =
1 0
2 1
93
"
1.5
0.5
0.5
1.5
2
2
1.5
0.5
0.5
1.5
94
example 2: x =
0.5 1
1 0.5
"
1.5
0.5
0.5
1.5
2
2
1.5
0.5
0.5
1.5
95
Block diagram
1/s
x(t)
n
x(t)
96
1/s
x1
A11
A12
x2
1/s
A22
here x1 doesnt affect x2 at all
Autonomous linear dynamical systems
97
Linear circuit
il1
ic1
vc1
C1
icp
vcp
L1
linear static circuit
vl1
ilr
Cp
Lr
vlr
"
dil
L
= vl ,
dt
C = diag(C1, . . . , Cp),
Autonomous linear dynamical systems
ic
vl
=F
vc
il
"
L = diag(L1, . . . , Lr )
98
with state x =
vc
il
"
, we have
x =
C 1
0
0
L1
"
Fx
99
Chemical reactions
910
1
2
Example: series reaction A
B
C with linear dynamics
k1
0
0
x = k1 k2 0 x
0
k2 0
plot for k1 = k2 = 1, initial x(0) = (1, 0, 0)
1
0.9
0.8
x3
x1
0.7
x(t)
0.6
0.5
0.4
0.3
x2
0.2
0.1
10
t
Autonomous linear dynamical systems
911
Prob(z(t) = 1)
..
p(t) =
Prob(z(t) = n)
(so, e.g., Prob(z(t) = 1, 2, or 3) = [1 1 1 0 0]p(t))
then we have p(t + 1) = P p(t)
Autonomous linear dynamical systems
912
913
example:
0.9
1.0
3
0.1
0.7
0.2
0.1
state 1 is system OK
state 2 is system down
state 3 is system being repaired
914
= (I + hA)x(t)
915
x(t) Rn
x
x(1)
Rnk , so
define new variable z =
..
x(k1)
x(1)
.
z = . =
x(k)
0
I
0
0
0
I
..
0
0
0
A0 A1 A2
0
0
..
I
Ak1
916
block diagram:
x(k)
(k1)
1/s x
(k2)
1/s x
Ak1
1/s
Ak2
x
A0
917
Mechanical systems
mechanical system with k degrees of freedom undergoing small motions:
M q + Dq + Kq = 0
q(t) Rk is the vector of generalized displacements
M is the mass matrix
K is the stiffness matrix
D is the damping matrix
with state x =
q
q
"
x =
we have
!
q
q
"
0
M 1K
I
M 1D
"
918
919
x(t)
Df (xe)x(t)
920
example: pendulum
mg
x =
x2
(g/l) sin x1
"
921
0
1
g/l 0
"
922
)
*1/2
for z(0) > 0 solutions have form z(t) = z(0)2 2t
923
0.5
0.45
z(t)
0.4
0.35
0.3
0.25
0.2
0.15
x(t) = z(t)
x(t)
0.1
0.05
0
0
10
20
30
40
50
60
70
80
90
100
t
systems with very different behavior have same linearized system
linearized systems do not predict qualitative behavior of either system
924
925
linearized system is
xtraj(t + T ) = xtraj(t)
= A(t)x
x
926
Stephen Boyd
Lecture 10
Solution via Laplace transform and matrix
exponential
Laplace transform
solving x = Ax via Laplace transform
state transition matrix
matrix exponential
qualitative behavior and stability
101
estz(t) dt
0
102
Derivative property
L(z)
= sZ(s) z(0)
=
=
!
e
estz(t)
dt
0
st
"t
+s
z(t)"
t=0
estz(t) dt
0
= sZ(s) z(0)
103
104
105
x =
0 1
1 0
&
1.5
0.5
0.5
1.5
2
2
1.5
0.5
0.5
1.5
106
sI A =
s 1
1 s
&
, so resolvent is
(sI A)
s
s2 +1
1
s2 +1
1
s2 +1
s
s2 +1
&(
&
(eigenvalues are j)
state transition matrix is
(t) = L
'%
s2 +1
s2 +1
s
s2 +1
1
s2 +1
cos t sin t
sin t cos t
&
cos t sin t
sin t cos t
&
x(0)
107
x =
0 1
0 0
&
1.5
0.5
0.5
1.5
2
2
1.5
0.5
0.5
1.5
108
sI A =
s 1
0 s
&
, so resolvent is
(sI A)1 =
1
s
1
s2
1
s
&
(eigenvalues are 0, 0)
state transition matrix is
(t) = L
so we have x(t) =
1 t
0 1
&
'%
1
s
1
s2
1
s
&(
1 t
0 1
&
x(0)
109
Characteristic polynomial
1010
det ij
det(sI A)
1011
Matrix exponential
= (1/s)(I A/s)
I A A2
= + 2 + 3 +
s s
s
1012
(ta)2
+
2!
M2
+
=I +M +
2!
1013
1014
A=
&
0 1
1 0
B=
0 1
0 0
&
&
%
&
0.54 0.84
1 1
B
e =
,
e =
0.84 0.54
0 1
%
&
%
&
0.16 1.40
0.54
1.38
=
(= eAeB =
0.70 0.16
0.84 0.30
A
eA+B
1015
with s = t we get
etAetA = etAtA = e0 = I
so etA is nonsingular, with inverse
#
etA
$1
= etA
1016
0 1
0 0
&
we already found
e
tA
=L
1 1
0 1
&
(sI A)
1 t
0 1
&
A2
+ = I + A
2!
since A2 = A3 = = 0
1017
1018
recall first order (forward Euler) approximate state update, for small t:
x( + t) x( ) + tx(
) = (I + tA)x( )
exact solution is
x( + t) = etAx( ) = (I + tA + (tA)2/2! + )x( )
forward Euler is just first two terms in series
1019
suppose x = Ax
sample x at times t1 t2 : define z(k) = x(tk )
then z(k + 1) = e(tk+1tk )Az(k)
for uniform sampling tk+1 tk = h, so
z(k + 1) = ehAz(k),
a discrete-time LDS (called discretized version of continuous-time system)
1020
A0 0 t < t1
A1 t 1 t < t 2
A(t) =
.
.
where 0 < t1 < t2 < (sometimes called jump linear system)
for t [ti, ti+1] we have
x(t) = e(tti)Ai e(t3t2)A2 e(t2t1)A1 et1A0 x(0)
(matrix on righthand side is called state transition matrix for system, and
denoted (t))
Solution via Laplace transform and matrix exponential
1021
ai(s)
X (s)
1022
n
,
ij ej t
j=1
1023
#j gives exponential growth rate (if > 0), or exponential decay rate (if
< 0) of term
*j gives frequency of oscillatory term (if (= 0)
eigenvalues
*s
#s
1024
r
,
pij (t)ej t
j=1
where pij (t) is a polynomial of degree < nj (that depends linearly on x(0))
1025
Stability
meaning:
state x(t) converges to 0, as t , no matter what x(0) is
all trajectories of x = Ax converge to 0 as t
fact: x = Ax is stable if and only if all eigenvalues of A have negative real
part:
#i < 0, i = 1, . . . , n
1026
1027
Stephen Boyd
Lecture 11
Eigenvectors and diagonalization
eigenvectors
dynamic interpretation: invariant sets
complex eigenvectors & invariant planes
left eigenvectors
diagonalization
modal form
discrete-time stability
111
112
113
Scaling interpretation
(assume R for now; well consider C later)
if v is an eigenvector, effect of A on v is very simple: scaling by
Ax
v
x
Av
(what is here?)
Eigenvectors and diagonalization
114
115
Dynamic interpretation
suppose Av = v, v #= 0
if x = Ax and x(0) = v, then x(t) = etv
several ways to see this, e.g.,
tA
x(t) = e v
"
(tA)2
+ v
I + tA +
2!
= v + tv +
(t)2
v +
2!
= etv
(since (tA)k v = (t)k v)
Eigenvectors and diagonalization
116
117
Invariant sets
118
suppose Av = v, v #= 0, R
line { tv | t R } is invariant
119
Complex eigenvectors
suppose Av = v, v #= 0, is complex
for a C, (complex) trajectory aetv satisfies x = Ax
hence so does (real) trajectory
#
$
x(t) = $ aetv
= e
vre vim
&
'
cos t sin t
sin t cos t
('
where
v = vre + jvim,
= + j,
a = + j
1110
d T
(w x) = wT x = wT Ax = (wT x)
dt
T
i.e., w x satisfies the DE d(wT x)/dt = (wT x)
1111
Summary
right eigenvectors are initial conditions from which resulting motion is
simple (i.e., remains on line or in plane)
left eigenvectors give linear functions of state that are simple, for any
initial condition
1112
1 10 10
0
0 x
example 1: x = 1
0
1
0
block diagram:
x1
1/s
x2
1/s
x3
1/s
10
10
eigenvalues are 1, j 10
Eigenvectors and diagonalization
1113
x1
2
1
0
1
0
0.5
1.5
2.5
3.5
4.5
0.5
1.5
2.5
3.5
4.5
0.5
1.5
2.5
3.5
4.5
x2
0.5
0
0.5
1
0
x3
1
0.5
0
0.5
0
1114
0.1
g= 0
1
lets check g T x(t) when x(0) = (0, 1, 1) (as above):
1
0.9
0.8
0.7
gT x
0.6
0.5
0.4
0.3
0.2
0.1
0
0
0.5
1.5
2.5
3.5
4.5
t
Eigenvectors and diagonalization
1115
0.554 + j0.771
v = 0.244 + j0.175
0.055 j0.077
so an invariant plane is spanned by
0.554
vre = 0.244 ,
0.055
vim
0.771
= 0.175
0.077
1116
x1
1
0
0.5
1.5
2.5
3.5
4.5
0.5
1.5
2.5
3.5
4.5
0.5
1.5
2.5
3.5
4.5
x2
0.5
0.5
0
x3
0.1
0.1
0
1117
1118
Diagonalization
suppose v1, . . . , vn is a linearly independent set of eigenvectors of
A Rnn:
Avi = ivi, i = 1, . . . , n
express as
define T =
&
...
v1 vn
&
v1 vn
&
v1 vn
AT = T
and finally
T 1AT =
Eigenvectors and diagonalization
1119
T 1AT = = diag(1, . . . , n)
then AT = T , i.e.,
Avi = ivi,
i = 1, . . . , n
1120
'
0 1
0 0
0 1
0 0
('
'
v1
0
v1
v2
where v1 #= 0
=0
1121
Distinct eigenvalues
fact: if A has distinct eigenvalues, i.e., i #= j for i #= j, then A is
diagonalizable
1122
T
w1T
w1
.
. A = ..
wnT
wnT
1123
Modal form
suppose A is diagonalizable by T
x
= T 1AT x
x
=
x
1124
x
1
1/s
x
n
n
trajectories consist of n independent modes, i.e.,
x
i(t) = eitx
i(0)
hence the name modal form
Eigenvectors and diagonalization
1125
when eigenvalues (hence T ) are complex, system can be put in real modal
form:
'
i i
i i
i = i + ji,
i = r + 1, r + 3, . . . , n
where i are the complex eigenvalues (one from each conjugate pair)
1126
1/s
1/s
1127
= T (sI )1T 1
"
!
1
1
,...,
T 1
= T diag
s 1
s n
= T diag(k1 , . . . , kn)T 1
(for k < 0 only if A invertible, i.e., all i #= 0)
Eigenvectors and diagonalization
1128
= T eT 1
= T diag(e1 , . . . , en )T 1
1129
= 0T T 1 + 1T T 1 + 2(T T 1)2 +
#
$
= T 0I + 1 + 22 + T 1
1130
1131
interpretation:
(left eigenvectors) decompose initial state x(0) into modal components
wiT x(0)
eit term propagates ith mode forward t seconds
reconstruct state as linear combination of (right) eigenvectors
1132
n
.
eit(wiT x(0))vi
i=1
i = s + 1, . . . , n
1133
x(t) = A x(0) =
n
.
i=1
ti(wiT x(0))vi 0
as t
i = 1, . . . , n.
we will see later that this is true even when A is not diagonalizable, so we
have
fact: x(t + 1) = Ax(t) is stable if and only if all eigenvalues of A have
magnitude less than one
Eigenvectors and diagonalization
1134
Stephen Boyd
Lecture 12
Jordan canonical form
121
T 1AT = J =
where
Ji =
1
i
...
...
J1
...
Jq
Cnini
1
i
'q
i=1 ni )
122
J is upper bidiagonal
J diagonal is the special case of n Jordan blocks of size ni = 1
Jordan form is unique (up to permutations of the blocks)
can have multiple blocks with same eigenvalue
123
more generally,
dim N (I A)k =
min{k, ni}
i =
124
0 1
0
0 1
iIJi = 0
0
0
0
0 0 1
(iIJi)2 = 0 0 0
0 0 0
(iIJi)3 = 0
(i j )k
0
(iIJj )k =
0
(j i)k
k(j i)k1
k
0
(j i)
125
Generalized eigenvectors
suppose T 1AT = J = diag(J1, . . . , Jq )
express T as
nni
where Ti C
T = [T1 T2 Tq ]
are the columns of T associated with ith Jordan block Ji
126
1/s
x
ni
1/s
x
ni1
1/s
x
1
127
(sI J)1 =
1
s
...
...
1
s
(s )1 (s )2 (s )k
(s )1 (s )k+1
=
..
...
(s )1
128
*
)
= et I + tF1 + + (tk1/(k 1)!)Fk1
1 t tk1/(k 1)!
1 tk2/(k 2)!
= et
..
...
129
Generalized modes
1210
tJ
x(t) = e x(0) = T e T
x(0) =
q
(
i=1
where
T 1
S1T
= ..
SqT
1211
Cayley-Hamilton theorem
if p(s) = a0 + a1s + + ak sk is a polynomial and A Rnn, we define
p(A) = a0I + a1A + + ak Ak
Cayley-Hamilton theorem: for any A Rnn we have X (A) = 0, where
X (s) = det(sI A)
+
,
1 2
example: with A =
we have X (s) = s2 5s 2, so
3 4
X (A) = A2 5A 2I
+
,
+
,
7 10
1 2
=
5
2I
15 22
3 4
= 0
1212
I, A, A2, . . . , An1
1213
)
*
I = A (a1/a0)I (a2/a0)A (1/a0)An1
(A is invertible a0 '= 0) so
1214
X (s) = (s 1) (s n)
since
X (A) = X (T T 1) = T X ()T 1
it suffices to show X () = 0
X () = ( 1I) ( nI)
= diag(0, 2 1, . . . , n 1) diag(1 n, . . . , n1 n, 0)
= 0
1215
ni
0 1 0
X (Ji) = (Ji 1I)n1 0 0 1 (Ji q I)nq = 0
...
01
2
/
(Ji i I)ni
1216
Stephen Boyd
Lecture 13
Linear dynamical systems with inputs &
outputs
inputs & outputs: interpretations
transfer matrix
impulse and step matrices
examples
131
y = Cx + Du
(with u(t) = 1)
x(t)
x(t)
132
Interpretations
write x = Ax + b1u1 + + bmum, where B = [b1 bm]
state derivative is sum of autonomous term (Ax) and one term per
input (biui)
each input ui gives another degree of freedom for x (assuming columns
of B independent)
write x = Ax + Bu as x i = a
Ti x + bTi u, where a
Ti , bTi are the rows of A, B
ith state derivative is linear function of state x and input u
133
Block diagram
D
u(t)
x(t)
1/s
x(t)
y(t)
134
1/s
B1
x 1 C1
A11
A12
x2
1/s
C2
A22
135
Transfer matrix
take Laplace transform of x = Ax + Bu:
sX(s) x(0) = AX(s) + BU (s)
hence
X(s) = (sI A)1x(0) + (sI A)1BU (s)
so
tA
x(t) = e x(0) +
e(t )ABu( ) d
0
136
with y = Cx + Du we have:
Y (s) = C(sI A)1x(0) + (C(sI A)1B + D)U (s)
so
tA
y(t) = Ce x(0) +
137
y =hu
intepretation:
Hij is transfer function from input uj to output yi
138
Impulse matrix
impulse matrix h(t) = CetAB + D(t)
with x(0) = 0, y = h u, i.e.,
yi(t) =
m %
&
j=1
hij (t )uj ( ) d
0
interpretations:
hij (t) is impulse response from jth input to ith output
hij (t) gives yi when u(t) = ej
hij ( ) shows how dependent output i is, on what input j was,
seconds ago
i indexes output; j indexes input; indexes time lag
Linear dynamical systems with inputs & outputs
139
Step matrix
the step matrix or step response matrix is given by
s(t) =
h( ) d
0
interpretations:
sij (t) is step response from jth input to ith output
sij (t) gives yi when u = ej for t 0
for invertible A, we have
'
(
s(t) = CA1 etA I B + D
Linear dynamical systems with inputs & outputs
1310
Example 1
u1
u1
u2
u2
y
y
"
1311
system is:
x =
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
1
2
1
0 2
1
0
1 2
1
1 2
1
0
1 2
0
1 2
x +
0
0
0
0
0
0
1
0
1
1
0 1
!
"
u1
u2
eigenvalues of A are
1.71 j0.71,
1.00 j1.00,
0.29 j0.71
1312
impulse matrix:
impulse response from u1
0.2
h11
0.1
0
0.1
0.2
h31
h21
0.2
0.1
0
0.1
10
15
10
15
t
impulse response from u2
h22
h12
h32
0.2
0
roughly speaking:
impulse at u1 affects third mass less than other two
impulse at u2 affects first mass later than other two
Linear dynamical systems with inputs & outputs
1313
Example 2
interconnect circuit:
C3
C4
u
C1
C2
1314
system is
3
1
1
0
1 1
0
0
x +
x =
1
0 2
1
0
0
1 1
1
0
u,
0
0
y=x
eigenvalues of A are
0.17,
0.66,
2.21,
3.96
1315
0.9
0.8
0.7
s1
s2
s3
0.6
0.5
0.4
s4
0.3
0.2
0.1
10
15
1316
(recall: H(s) =
st
0
m
h( ) d )
0
p
1317
1/4
1/4
1/2
H(0) = 1/2
1/4 1/4
DC gain matrix for example 2 (RC circuit):
1
1
H(0) =
1
1
(do these make sense?)
1318
define sequences
xd(k) = x(kh),
yd(k) = y(kh),
k = 0, 1, . . .
h > 0 is called the sample interval (for x and y) or update interval (for
u)
u is piecewise constant (called zero-order-hold)
xd, yd are sampled versions of x, y
Linear dynamical systems with inputs & outputs
1319
e ABu((k + 1)h ) d
0
/%
0
h
= ehAxd(k) +
e A d B ud(k)
= e
hA
x(kh) +
where
Ad = ehA,
Bd =
/%
e A d
0
B,
Cd = C,
Dd = D
1320
h
0
'
(
e A d = A1 ehA I
1 h 1
1e i 1 < 1
1321
extensions/variations:
offsets: updates for u and sampling of x, y are offset in time
multirate: ui updated, yi sampled at different intervals
(usually integer multiples of a common interval h)
both very common in practice
1322
Dual system
the dual system associated with system
x = Ax + Bu,
y = Cx + Du
is given by
z = AT z + C T v,
w = B T z + DT v
1323
1324
1325
original system:
D
u(t)
1/s
x(t)
y(t)
CT
v(t)
dual system:
DT
w(t)
BT
z(t)
1/s
AT
1326
Causality
interpretation of
tA
x(t) = e x(0) +
tA
e(t )ABu( ) d
0
y(t) = Ce x(0) +
for t 0:
current state (x(t)) and output (y(t)) depend on past input (u( ) for
t)
i.e., mapping from input to state and output is causal (with fixed initial
state)
Linear dynamical systems with inputs & outputs
1327
(tT )A
x(T ) +
e(t )ABu( ) d,
T
1328
Idea of state
1329
Change of coordinates
start with LDS x = Ax + Bu, y = Cx + Du
change coordinates in Rn to x
, with x = T x
then
x
= T 1x = T 1(Ax + Bu) = T 1AT x
+ T 1Bu
x
= A
y = C x
+ Du
where
A = T 1AT,
= T 1B,
B
C = CT,
=D
D
1B
+D
= C(sI A)1B + D
C(sI
A)
Linear dynamical systems with inputs & outputs
1330
bT
1
T 1B = .. ,
bT
n
so
CT =
x
i = ix
i + bTi u,
y=
c1 cn
n
&
cix
i
i=1
bT
1
1331
1/s
x
1
c1
bT
n
1/s
x
n
cn
n
(here we assume D = 0)
1332
Discrete-time systems
discrete-time LDS:
x(t + 1) = Ax(t) + Bu(t),
D
u(t)
x(t + 1)
1/z
B
x(t)
y(t)
A
only difference w/cts-time: z instead of s
interpretation of z 1 block:
unit delayor (shifts sequence back in time one epoch)
latch (plus small delay to avoid race condition)
Linear dynamical systems with inputs & outputs
1333
we have:
x(1) = Ax(0) + Bu(0),
x(t) = A x(0) +
t1
&
A(t1 )Bu( )
=0
hence
y(t) = CAtx(0) + h u
Linear dynamical systems with inputs & outputs
1334
D,
t=0
t1
CA B, t > 0
1335
Z-transform
suppose w Rpq is a sequence (discrete-time signal), i.e.,
w : Z+ Rpq
&
z tw(t)
t=0
t = 0, 1, . . .
1336
&
z tw(t + 1)
t=0
&
= z
z tw(t)
t=1
= zW (z) zw(0)
1337
yields
zX(z) zx(0) = AX(z) + BU (z),
1338
hence
Y (z) = H(z)U (z) + C(zI A)1zx(0)
where H(z) = C(zI A)1B + D is the discrete-time transfer function
note power series expansion of resolvent:
(zI A)1 = z 1I + z 2A + z 3A2 +
1339
Stephen Boyd
Lecture 14
Example: Aircraft dynamics
longitudinal aircraft dynamics
wind gust & control inputs
linearized dynamics
steady-state analysis
eigenvalues & modes
impulse matrices
141
body axis
horizontal
142
Inputs
disturbance inputs:
uw : velocity of wind along body axis
vw : velocity of wind perpendicular to body axis
control or actuator inputs:
e: elevator angle (e > 0 is down)
t: thrust
143
Linearized dynamics
for 747, level flight, 40000 ft, 774 ft/sec,
u
u uw
.003 .039
0
.322
v
.065 .319 7.74
v vw
q = .020 .101 .429
0
q
0
0
1
0
.01
1
'
(
.18 .04 e
+
1.16 .598 t
0
0
144
outputs of interest:
aircraft speed u (deviation from trim)
climb rate h = v + 7.74
145
Steady-state analysis
'
1 0
27.2 15.0
0 1 1.34 24.9
gives steady-state change in speed & climb rate due to wind, elevator &
thrust changes
solve for control variables in terms of wind velocities, desired speed &
climb rate
'
e
t
'
.0379 .0229
.0020 .0413
('
u uw
h + vw
146
147
eigenvalues are
0.3750 0.8818j,
0.0005 0.0674j
148
eigenvectors are
xshort
xphug
0.0005
0.0135
0.5433
j 0.8235 ,
=
0.0899
0.0677
0.0283
0.1140
0.7510
0.6130
0.0962
j 0.0941
=
0.0111
0.0082
0.1225
0.1637
149
Short-period mode
y(t) = CetA(#xshort) (pure short-period mode motion)
1
u(t)
0.5
0.5
10
12
14
16
18
20
10
12
14
16
18
20
h(t)
0.5
0.5
1410
Phugoid mode
y(t) = CetA(#xphug ) (pure phugoid mode motion)
2
u(t)
200
400
600
800
1000
1200
1400
1600
1800
2000
200
400
600
800
1000
1200
1400
1600
1800
2000
h(t)
1411
h12
h11
0.1
0.1
10
15
0.1
20
10
15
20
10
15
20
0.5
h22
h21
0.5
0.5
10
15
20
0.5
1412
h12
h11
0.1
0.1
200
400
0.1
600
200
400
600
200
400
600
0.5
h22
h21
0.5
0.5
200
400
0.5
600
1413
h12
h11
10
15
20
10
15
20
10
15
20
3
2.5
h22
h21
2
0
1.5
1
0.5
10
15
20
1414
h12
h11
200
400
600
2
0
200
400
600
200
400
600
200
400
600
h22
h21
1415
Stephen Boyd
Lecture 15
Symmetric matrices, quadratic forms, matrix
norm, and SVD
eigenvectors of symmetric matrices
quadratic forms
inequalities for quadratic forms
positive semidefinite matrices
norm of a matrix
singular value decomposition
151
v Av = v (Av) = v v =
n
!
i=1
but also
T
v Av = (Av) v = (v) v =
|vi|2
n
!
i=1
|vi|2
152
A = QQ =
n
!
iqiqiT
i=1
153
Interpretations
ac
A = QQT
x
QT x
QT x
Ax
154
or, geometrically,
rotate by QT
diagonal real scale (dilation) by
rotate back by Q
decomposition
A=
n
!
iqiqiT
i=1
155
example:
"
#
1/2
3/2
A =
3/2 1/2
$
"
#% "
#$
"
#%T
1
1
1
1
1
0
1
1
=
0 2
2 1 1
2 1 1
q2q2T x
x
q1
q1q1T x
1q1q1T x
q2
2q2q2T x
Ax
156
157
Example: RC circuit
i1
v1
c1
in
vn
resistive circuit
cn
ck v k = ik ,
i = Gv
158
use state xi =
civi, so
x = C 1/2v = C 1/2GC 1/2x
C 1Gsi = isi,
159
Quadratic forms
a function f : Rn R of the form
T
f (x) = x Ax =
n
!
Aij xixj
i,j=1
1510
Examples
%Bx%2 = xT B T Bx
&n1
i=1
(xi+1 xi)2
%F x%2 %Gx%2
sets defined by quadratic forms:
{ x | f (x) = a } is called a quadratic surface
{ x | f (x) a } is called a quadratic region
1511
xT Ax = xT QQT x
= (QT x)T (QT x)
n
!
i(qiT x)2
=
i=1
n
!
(qiT x)2
i=1
= 1%x%2
i.e., we have xT Ax 1xT x
Symmetric matrices, quadratic forms, matrix norm, and SVD
1512
1513
1514
Matrix inequalities
we say A is negative semidefinite if A 0
we say A is negative definite if A > 0
otherwise, we say A is indefinite
matrix inequality: if B = B T Rn we say A B if A B 0, A < B
if B A > 0, etc.
for example:
A 0 means A is positive semidefinite
A > B means xT Ax > xT Bx for all x "= 0
Symmetric matrices, quadratic forms, matrix norm, and SVD
1515
A2 0
B " A
1516
Ellipsoids
s1
s2
1/2
1517
qi, i.e.:
'
1518
1519
Matrix norm
the maximum gain
%Ax%
x!=0 %x%
is called the matrix norm or spectral norm of A and is denoted %A%
max
%Ax%2
xT AT Ax
max
= max
= max(AT A)
2
2
x!=0 %x%
x!=0
%x%
so we have %A% =
'
max(AT A)
min(AT A)
1520
note that
AT A Rnn is symmetric and AT A 0 so min, max 0
max gain input direction is x = q1, eigenvector of AT A associated
with max
min gain input direction is x = qn, eigenvector of AT A associated with
min
1521
1 2
example: A = 3 4
5 6
A A =
"
35 44
44 56
"
0.620
0.785
0.785 0.620
then %A% =
'
#
#"
90.7
0
0 0.265
#"
0.620
0.785
0.785 0.620
#T
max(AT A) = 9.53:
-"
#- 0.620 - 0.785 - = 1,
-
- "
#- - 2.18 - -A 0.620 - = - 4.99 - = 9.53
0.785 - - 7.78 -
1522
min gain is
'
min(AT A) = 0.514:
-
- "
#- 0.46
- 0.785
-A
- = - 0.14 - = 0.514
0.620 - - 0.18 -
-"
#0.785
- 0.620 - = 1,
0.514
%Ax%
9.53
%x%
1523
consistent
with vector
norm: matrix norm of a Rn1 is
'
max(aT a) = aT a
for any x, %Ax% %A%%x%
scaling: %aA% = |a|%A%
triangle inequality: %A + B% %A% + %B%
definiteness: %A% = 0 A = 0
norm of product: %AB% %A%%B%
1524
1525
r
!
iuiviT
i=1
1526
AT A = (U V T )T (U V T ) = V 2V T
hence:
vi are eigenvectors of AT A (corresponding to nonzero eigenvalues)
i =
'
%A% = 1
1527
similarly,
AAT = (U V T )(U V T )T = U 2U T
hence:
ui are eigenvectors of AAT (corresponding to nonzero eigenvalues)
i =
'
1528
Interpretations
A = U V
r
!
iuiviT
i=1
VT
V Tx
V T x
Ax
1529
1530
1531
v1
Ax
u2
1532
Stephen Boyd
Lecture 16
SVD Applications
general pseudo-inverse
full SVD
image of unit ball under linear transformation
SVD in estimation/inversion
sensitivity of linear equations to data error
low rank approximation via SVD
161
General pseudo-inverse
if A != 0 has SVD A = U V T ,
A = V 1U T
is the pseudo-inverse or Moore-Penrose inverse of A
if A is skinny and full rank,
A = (AT A)1AT
gives the least-squares approximate solution xls = Ay
if A is fat and full rank,
A = AT (AAT )1
gives the least-norm solution xln = Ay
SVD Applications
162
in general case:
Xls = { z | "Az y" = min "Aw y" }
w
SVD Applications
163
!
"1 T
x = AT A + I
A y
!
"1 T
in fact, we have lim AT A + I
A = A
0
(check this!)
SVD Applications
164
Full SVD
SVD of A Rmn with Rank(A) = r:
A = U11V1T =
u1 ur
...
v1T
..
r
vrT
0r(n r)
0(m r)r
0(m r)(n r)
SVD Applications
165
then we have
A=
U11V1T
U1 U2
0r(n r)
0(m r)r
0(m r)(n r)
*+
V1T
V2T
i.e.:
A = U V T
SVD Applications
166
SVD Applications
167
1
1 rotate by V T
u1
rotate by U
0.5
2
SVD Applications
168
SVD in estimation/inversion
suppose y = Ax + v, where
y Rm is measurement
x Rn is vector to be estimated
v is a measurement noise or error
SVD Applications
169
consider estimator x
= By, with BA = I (i.e., unbiased)
estimation or inversion error is x
=x
x = Bv
set of possible estimation errors is ellipsoid
x
Eunc = { Bv | "v" }
x=x
x
x
Eunc = x
+ Eunc, i.e.:
true x lies in uncertainty ellipsoid Eunc, centered at estimate x
SVD Applications
1610
1611
k1T
k2T
y =
k3T x
k4T
where ki R2
+ +
k1T
k2T
,1
022
SVD Applications
1612
x2
15
10
0
10
10
x1
10
x1
uncertainty region for x using least-squares
20
x2
15
10
0
10
SVD Applications
1613
1614
1615
1616
we say
A is well conditioned if is small
A is poorly conditioned if is large
(definition of small and large depend on application)
SVD Applications
1617
mn
r
/
iuiviT
i=1
Rank(A)
p < r, s.t. A A in the sense that
we seek matrix A,
is minimized
"A A"
solution: optimal rank p approximator is
A =
p
/
iuiviT
i=1
01
0
r
T0
=0
hence "A A"
u
v
0 i=p+1 i i i 0 = p+1
1618
Bz = 0,
(A B)z = Az =
p+1
/
iuiviT z
i=1
"(A B)z" =
p+1
/
2
i2(viT z)2 p+1
"z"2
i=1
1619
Distance to singularity
another interpretation of i:
i = min{ "A B" | Rank(B) i 1 }
i.e., the distance (measured by matrix norm) to the nearest rank i 1
matrix
for example, if A Rnn, n = min is distance to nearest singular matrix
hence, small min means A is near to a singular matrix
SVD Applications
1620
4
/
iuiviT x + v
i=1
SVD Applications
1621
Stephen Boyd
Lecture 17
Example: Quantum mechanics
wave function and Schrodinger equation
discretization
preservation of probability
eigenvalues & eigenstates
example
171
Quantum mechanics
single particle in interval [0, 1], mass m
potential V : [0, 1] R
: [0, 1] R+ C is (complex-valued) wave function
interpretation: |(x, t)|2 is probability density of particle at position x,
time t
! 1
(so
|(x, t)|2 dx = 1 for all t)
0
= V
2x = H
i
h
2m
where H is Hamiltonian operator, i =
Example: Quantum mechanics
1
172
Discretization
lets discretize position x into N discrete points, k/N , k = 1, . . . , N
wave function is approximated as vector (t) CN
2x operator is approximated as matrix
2
1
1 2
1
2
2
1 2
=N
...
1
...
...
1 2
so w = 2v means
wk =
173
h/2m)2) = (i/
h)H
where V is a diagonal matrix with Vkk = V (k/N )
hence we analyze using linear dynamical system theory (with complex
vectors & matrices):
= (i/
h)H
solution of Shrodinger equation: (t) = e(i/h)tH (0)
matrix e(i/h)tH propogates wave function forward in time t seconds
(backward if t < 0)
174
Preservation of probability
d
d
''2 =
dt
dt
+
=
= ((i/
h)H) + ((i/
h)H)
= (i/
h)H + (i/
h)H
= 0
(using H = H T RN N )
hence, '(t)'2 is constant; our discretization preserves probability exactly
Example: Quantum mechanics
175
176
from Hv = v (i/
h)Hv = (i/
h)v we see:
eigenvectors of (i/
h)H are same as eigenvectors of H, i.e., v1, . . . , vN
eigenvalues of (i/
h)H are (i/
h)1, . . . , (i/
h)N (which are pure
imaginary)
177
178
Example
Potential Function V (x)
1000
900
800
700
600
500
400
300
200
100
0
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
x
potential bump in middle of infinite potential well
(for this example, we set h = 1, m = 1 . . . )
Example: Quantum mechanics
179
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.2
0
0.2
0
0.2
0
0.2
0
0.2
0
0.2
0
x
potential V shown as dotted line (scaled to fit plot)
four eigenstates with lowest energy shown (i.e., v1, v2, v3, v4)
1710
1711
0.08
0.06
0.04
0.02
0
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
10
20
30
40
50
60
70
80
90
100
0.15
0.1
0.05
0
0
eigenstate
top plot shows initial probability density |(0)|2
1712
1713
1714
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0
0.2
0.4
0.6
0.8
1.2
1.4
1.6
1.8
2
4
x 10
N/2
k=1
|k (t)|2,
1715
Stephen Boyd
Lecture 18
Controllability and state transfer
state transfer
reachable set, controllability matrix
minimum norm inputs
infinite-horizon minimum norm transfer
181
State transfer
consider x = Ax + Bu (or x(t + 1) = Ax(t) + Bu(t)) over time interval
[ti, tf ]
we say input u : [ti, tf ] Rm steers or transfers state from x(ti) to x(tf )
(over time interval [ti, tf ])
(subscripts stand for initial and final)
questions:
where can x(ti) be transfered to at t = tf ?
how quickly can x(ti) be transfered to some xtarget?
how do we find a u that transfers x(ti) to x(tf )?
how do we find a small or efficient u that transfers x(ti) to x(tf )?
Controllability and state transfer
182
Reachability
consider state transfer from x(0) = 0 to x(t)
we say x(t) is reachable (in t seconds or epochs)
we define Rt Rn as the set of points reachable in t seconds or epochs
for CT system x = Ax + Bu,
Rt =
! "
(t )A
#
$
#
m
Bu( ) d ## u : [0, t] R
Rt =
t1
&
=0
#
'
#
#
At1 Bu( ) # u(t) Rm
#
183
Rt is a subspace of Rn
Rt Rs if t s
(i.e., can reach more points given more time)
we define the reachable set R as the set of points reachable for some t:
R=
Rt
t0
184
u(t 1)
..
x(t) = Ct
u(0)
where Ct =
AB
At1B
185
thus we have
range(Ct) t < n
range(C) t n
where C = Cn is called the controllability matrix
Rt =
186
Controllable system
system is called reachable or controllable if all states are reachable (i.e.,
R = Rn )
system is reachable if and only if Rank(C) = n
example: x(t + 1) =
0 1
1 0
controllability matrix is C =
x(t) +
1 1
1 1
1
1
u(t)
187
u(tf 1)
..
188
xdes
u(t 1)
..
= Ct
u(0)
among all u that steer x(0) = 0 to x(t) = xdes, the one that minimizes
t1
&
(u( )(2
=0
Controllability and state transfer
is given by
189
uln(t 1)
..
= CtT (CtCtT )1xdes
uln(0)
uln is called least-norm or minimum energy input that effects state transfer
can express as
1 t1
&
s=0
AsBB T (AT )s
21
xdes,
for = 0, . . . , t 1
1810
t1
&
=0
Emin =
t1
&
(uln( )(2
=0
4T
= xTdes(CtCtT )1xdes
1 t1
21
&
= xTdes
A BB T (AT )
xdes
=0
1811
1812
Emin as function of t:
if t s then
t1
&
A BB (A )
=0
hence
1 t1
&
s1
&
A BB T (AT )
=0
A BB T (AT )
=0
21
1 s1
&
A BB T (AT )
=0
21
so Emin(xdes, t) Emin(xdes, s)
i.e.: takes less energy to get somewhere more leisurely
1813
example: x(t + 1) =
1.75 0.8
0.95 0
x(t) +
1
0
u(t)
Emin
10
15
20
25
30
35
1814
10
x2
10
10
x10
10
10
Emin(x, 10) 1
10
x2
10
10
x10
1815
1 t1
&
=0
A BB T (AT )
21
always exists, and gives the minimum energy required to reach a point xdes
(with no limit on t):
min
t1
&
=0
#
'
#
#
(u( )(2 # x(0) = 0, x(t) = xdes = xTdesP xdes
#
1816
1817
Continuous-time reachability
consider now x = Ax + Bu with x(t) Rn
reachable set at time t is
! " t
Rt =
e(t )ABu( ) d
0
#
$
#
m
# u : [0, t] R
#
1818
first lets show for any u (and x(0) = 0) we have x(t) range(C)
write etA as power series:
e
tA
t2 2
t
= I + A + A +
1!
2!
by C-H, express An, An+1, . . . in terms of A0, . . . , An1 and collect powers
of A:
etA = 0(t)I + 1(t)A + + n1(t)An1
therefore
x(t) =
=
"
e ABu(t ) d
0
" t 1n1
&
0
i( )Ai Bu(t ) d
i=0
1819
n1
&
AB
i=0
"
i( )u(t ) d
0
= Cz
where zi =
"
i( )u(t ) d
0
1820
Impulsive inputs
suppose x(0) = 0 and we apply input u(t) = (k)(t)f , where (k) denotes
kth derivative of and f Rm
then U (s) = sk f , so
X(s) = (sI A)1Bsk f
3
4
= s1I + s2A + Bsk f
= ( 5sk1 + + 67
sAk2 + Ak18 +s1Ak + )Bf
impulsive terms
hence
k
k+1
t2
t
k+2
Bf + A Bf +
1!
2!
in particular, x(0+) = Ak Bf
Controllability and state transfer
1821
f0
..
fn1
1822
can also be shown that any point in range(C) can be reached for any t > 0
using nonimpulsive inputs
fact: if x(0) R, then x(t) R for all t (no matter what u is)
to show this, need to show etAx(0) R if x(0) R . . .
1823
Example
unit masses at y1, y2, connected by unit springs, dampers
input is tension between masses
state is x = [y T y T ]T
u(t) u(t)
system is
0
0
1
0
0
0
0
0
1
x + 0
x =
1
1
1 1
1
1 1
1 1
1
1824
controllability matrix is
C=
AB
0
1 2
2
. 0 1
2 2
A3 B =
1 2
2
0
1
2 2
0
A2 B
1 , 0
R = span
0 1
0
1
1825
(u( )(2 d
0
k = 0, . . . , N 1
1826
so
u
(N
1)
d
.
1
..
x(t) = Bd AdBd AN
B
d
d
ud(0)
where
Ad = e
hA
Bd =
"
e A d B
0
1N 1
&
AidBdBdT (ATd )i
i=0
21
xdes
1827
similarly
N
1
&
AidBdBdT (ATd )i
i=0
N
1
&
i=0
(t/N )
"
etABB T etA dt
0
for large N
Controllability and state transfer
1828
B"
tA
T tAT
e BB e
0
C1
xdes,
dt
0 t
for large N
min energy is
where
1829
"
t
0
"
e ABB T e A d
0
can show
(A, B) controllable Q(t) > 0 for all t > 0
Q(s) > 0 for some s > 0
1830
B"
T AT
BB e
C1
always exists, and gives minimum energy required to reach a point xdes
(with no limit on t):
min
! "
t
0
#
$
#
(u( )(2 d ## x(0) = 0, x(t) = xdes = xTdesP xdes
1831
(tf ti )A
x(ti) +
"
tf
e(tf )ABu( ) d
ti
1832
Example
u1
u1
u2
u2
y
y
1833
system is:
x =
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
1
2
1
0 2
1
0
1 2
1
1 2
1
0
1 2
0
1 2
x +
0
0
0
0
0
0
1
0
1
1
0 1
/
0
u1
u2
1834
50
45
40
35
Emin
30
25
20
15
10
5
0
0
10
12
tf
1835
u1(t)
5
0
0.5
1.5
2.5
3.5
4.5
2.5
3.5
4.5
u2(t)
5
0
0.5
1.5
1836
and for tf = 4:
u1(t)
5
0
0.5
1.5
2.5
3.5
4.5
2.5
3.5
4.5
u2(t)
5
0
0.5
1.5
1837
output y1 for u = 0:
1
0.8
y1(t)
0.6
0.4
0.2
0.2
0.4
0
10
12
14
1838
0.8
y1(t)
0.6
0.4
0.2
0.2
0.4
0
0.5
1.5
2.5
3.5
4.5
1839
0.8
y1(t)
0.6
0.4
0.2
0.2
0.4
0
0.5
1.5
2.5
3.5
4.5
1840
Stephen Boyd
Lecture 19
Observability and state estimation
state estimation
discrete-time observability
continuous-time observability
least-squares observers
example
191
192
193
Noiseless case
then we have
y(0)
u(0)
..
..
= Otx(0) + Tt
y(t 1)
u(t 1)
Observability and state estimation
194
where
C
CA
,
Ot =
..
t1
CA
CB
Tt =
..
CAt2B
0
D
CAt3B
CB
y(0)
u(0)
..
..
Tt
Otx(0) =
y(t 1)
u(t 1)
RHS is known, x(0) is to be determined
Observability and state estimation
195
hence:
can uniquely determine x(0) if and only if N (Ot) = {0}
N (Ot) gives ambiguity in determining x(0)
if x(0) N (Ot) and u = 0, output is zero over interval [0, t 1]
input u does not affect ability to determine x(0);
its effect can be subtracted out
196
Observability matrix
by C-H theorem, each Ak is linear combination of A0, . . . , An1
hence for t n, N (Ot) = N (O) where
C
CA
O = On =
..
CAn1
197
= CT ,
B
C = B T ,
= DT
D
C = [B
= [C T AT C T (AT )n1C T ]
= OT ,
198
in fact,
199
u(0)
y(0)
..
..
Tt
x(0) = F
u(t 1)
y(t 1)
y( t + 1)
u( t + 1)
..
..
Tt
x( t + 1) = F
y( )
u( )
Observability and state estimation
1910
i.e., our observer estimates what state was t 1 epochs ago, given past
t 1 inputs & outputs
1911
n1
(Az) = CA z =
n1
+
iCAiz = 0
i=0
1912
Continuous-time observability
continuous-time system with no sensor or state noise:
x = Ax + Bu,
y = Cx + Du
= Cx + Du
= C x + Du = CAx + CBu + Du
y = CA2x + CABu + CB u + D
u
and so on
Observability and state estimation
hence we have
1913
y
y
..
= Ox + T
y (n1)
where O is the observability matrix and
CB
T =
..
CAn2B
0
D
CAn3B
u
u
..
u(n1)
CB
1914
rewrite as
Ox =
y
y
..
y (n1)
u
u
..
u(n1)
hence if N (O) = {0} we can deduce x(t) from derivatives of u(t), y(t) up
to order n 1
in this case we say system is observable
can construct an observer using any left inverse F of O:
x=F
y
y
..
y (n1)
u
u
..
u(n1)
1915
1916
A converse
suppose z N (O) (the unobservable subspace), and u is any input, with
x, y the corresponding state and output, i.e.,
x = Ax + Bu,
y = Cx + Du
y = Cx
+ Du
1917
Least-squares observers
discrete-time system, with sensor noise:
x(t + 1) = Ax(t) + Bu(t),
y(0)
u(0)
..
..
Tt
x
(0) = Ot
y(t 1)
u(t 1)
/1 T
.
where Ot = OtT Ot
Ot
Observability and state estimation
1918
interpretation: x
ls(0) minimizes discrepancy between
output y that would be observed, with input u and initial state x(0)
(and no sensor noise), and
output y that was observed,
measured as
t1
+
=0
$
y ( ) y( )$2
x
ls(0) =
0 t1
+
(AT ) C T CA
=0
11 t1
+
(AT ) C T y( )
=0
1919
v(0)
..
x
(0) = x
ls(0) x(0) = Ot
v(t 1)
where x
(0) is the estimation error of the initial state
in particular, x
ls(0) = x(0) if sensor noise is zero
(i.e., observer recovers exact state in noiseless case)
now assume sensor noise is unknown, but has RMS value ,
t1
1+
$v( )$2 2
t =0
Observability and state estimation
1920
x
(0) Eunc
5
5 t1
v(0)
+
5 1
2
2
.
5
.
$v( )$
=
O
5 t
t
=0
v(t 1)
OtT Ot
/1
0 t1
+
(AT ) C T CA
=0
11
$
xls(0) x(0)$ t$Ot$
Observability and state estimation
1921
0 t1
+
(AT ) C T CA
=0
11
always exists, and gives the limiting uncertainty in estimating x(0) from u,
y over longer and longer periods:
if A is stable, P > 0
i.e., cant estimate initial state perfectly even with infinite number of
measurements u(t), y(t), t = 0, . . . (since memory of x(0) fades . . . )
if A is not stable, then P can have nonzero nullspace
i.e., initial state estimation error gets arbitrarily small (at least in some
directions) as more and more of signals u and y are observed
1922
Example
particle in R2 moves with uniform velocity
range noises IID N (0, 1); can assume RMS value of v is not much more
than 2
no assumptions about initial position & velocity
particle
range sensors
1923
1
0
x(t + 1) =
0
0
0
1
0
0
1
0
1
0
0
1
x(t),
0
1
k1T
y(t) = .. x(t) + v(t)
k4T
1924
range
20
40
60
80
100
120
1925
x2(0|t) x2(0))2
(
x1(0|t) x1(0))2 + (
1926
1.5
0.5
10
20
30
40
50
60
70
80
90
100
110
120
10
20
30
40
50
60
70
80
90
100
110
120
1
0.8
0.6
0.4
0.2
0
1927
t;
;
;y( ) Ce Ax(0);2 d
AT
C Ce
d,
s=
r=
e A C T y( ) d,
0
y( )T y( ) d
0
1928
r=
<:
AT
C Ce
=1 :
eA C T y( ) d
0
estimation error is
x
(0) = x
ls(0) x(0) =
<:
C Ce
=1 :
e A C T v( ) d
0
therefore if v = 0 then x
ls(0) = x(0)
1929
Stephen Boyd
Lecture 20
Some parting thoughts . . .
linear algebra
levels of understanding
whats next?
201
Linear algebra
comes up in many practical contexts (EE, ME, CE, AA, OR, Econ, . . . )
nowadays is readily done
cf. 10 yrs ago (when it was mostly talked about)
202
Levels of understanding
Simple, intuitive view:
17 vbles, 17 eqns: usually has unique solution
80 vbles, 60 eqns: 20 extra degrees of freedom
Platonic view:
singular, rank, range, nullspace, Jordan form, controllability
everything is precise & unambiguous
gives insight & deeper understanding
sometimes misleading in practice
Some parting thoughts . . .
203
Quantitative view:
based on ideas like least-squares, SVD
gives numerical measures for ideas like singularity, rank, etc.
interpretation depends on (practical) context
very useful in practice
204
205
Whats next?
206