EE263: Introduction To Linear Dynamical Systems Review Session 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

EE263: Introduction to Linear Dynamical Systems

Review Session 1

Outline
administrative information
examples

EE263 RS1

Administrative information
website: http://ee263.stanford.edu/
forum: https://piazza.com/stanford/autumn2014/ee263
email: ee263-aut1415-staff@lists.stanford.edu

EE263 RS1

Teaching assistants
Aditya Timmaraju
Reza Takapoui
Bobbie Chern
TA office hours:
Wednesdays 10am - 1pm Packard 104 (Aditya)
Thursdays

1pm - 4pm

Packard 104 (Reza)

Fridays

2pm - 5pm

Packard 106 (Bobbie)

EE263 RS1

Sections
Fridays 9-9:50am, Nvidia Auditorium
attendance optional
all notes posted
sessions are recorded

EE263 RS1

Homeworks
Policy
due Fridays 5 pm (EE263 bin, 2nd floor Packard)
no late hws accepted
graded roughly on a course scale 110

EE263 RS1

Matlab basics
http://www.mathworks.com/moler/intro.pdf
>> a = 1
a =
1
>> b = 1;
>> c = [1 2 3]
c =
1
2
3
>> c+2
ans =
3
EE263 RS1

5
6

Matlab basics (contd...)


>> c
c =
1

>> d = [4;5;6]
d =
4
5
6
>> c*d
ans =
32
>> e = d.
e =
4
5
EE263 RS1

6
7

Matlab basics (contd...)


>> c+e
ans =
5

>> c.*e
ans =
4

10

18

>> A = [1 2; 3 4]
A =
1
2
3
4
>> A*[1;1]
ans =
3
7
EE263 RS1

Matlab basics (contd...)


>> A(2,1)
ans =
3
>> A(:,1)
ans =
1
3
>> A(2,:)
ans =
3

>> t = 0:2:10
t =
0
2
EE263 RS1

10
9

Table as a matrix
nutrition chart

Nutrient

y1
..
ym

x1
0.50
..
2.05

Vegetable
x2

0.75
..
..
0.01

xn
0.9
..
0.45

vector x Rn is the vegetable diet; xj is amount of vegetable j


vector y Rm is the nutrients; yi is the amount of nutrient i
y = Ax gives the nutrients as a function of the vegetable diet
Aij = amount of nutrient i in 1 unit of vegetable j
EE263 RS1

10

Examples
x Rn
find A for which y = Ax is the running average of x, i.e.,
i

1X
xj ,
yi =
i j=1

i = 1, . . . , n

Solution.

y1

y2
. =
.

yn

EE263 RS1

1
0
0
0
1/2 1/2
0
0
1/3 1/3 1/3
0
..
..
..
..
1/n 1/n 1/n 1/n

0
..
...
1/n

x1
x2
..

xn

11

Examples
Creating A in Matlab
n=5;
A = zeros(n,n);
for i=1:n
A(i,1:i) = 1/i;
end
A
A =
1.0000
0.5000
0.3333
0.2500
0.2000

EE263 RS1

0
0.5000
0.3333
0.2500
0.2000

0
0
0.3333
0.2500
0.2000

0
0
0
0.2500
0.2000

0
0
0
0
0.2000

12

Examples (contd...)
what is y = Ax, with A = (1/n)11T ?
Solution.
1T x = x1 + + xn, the sum of the xi
(1/n)1T x is the average of the xi
y = (1/n)11T x is a vector of size n, with each component equal to the
average of the xi

EE263 RS1

13

Linear mechanical system

M q + D q + Kq = f
q(t) Rk is the vector of deflections
f (t) Rk is the vector of externally applied forces
M, D, K Rkk are the mass, damping, and stiffness matrices,
respectively

EE263 RS1

14

Linear system equations


assume M Rkk full rank
let state x = (q, q)
= [q T qT ]T
let action u = f
let output y = q
write x = Ax + Bu, y = Cx + Du
solution


q
q

0
M 1K
q=

EE263 RS1

I
M 1D



q
q

q
q

0
M 1


15

Polynomial evaluation
polynomial p(t) = a0 + a1t + a2t2 + + an1 tn1
points t1, . . . , tm R
yi = p(ti), i.e., p evaluated at points t1, . . . , tm
can write as y = T a:

y1
1 t1
y2 1 t2
. = . .
. . .
ym
1 tm

t1n1
tn1
2

a0
a1

.
.

. .
n1
an1
tm

so y depends linearly on a, can do parameter estimation etc.

EE263 RS1

16

Node adjacency matrix

graph with n nodes and (undirected) edges


node adjacency matrix A Rnn is given by
Aij =

1 there is an edge connecting node i and node j


0 otherwise

what is meaning of (i, j)th entry of Ak ?

EE263 RS1

17

Node adjacency matrix (cont...)


Solution.
lets start with k = 2
Aik Akj = 1 only if there is an edge from node i to node k, and an edge
from node k to node j, i.e., there is a path of length 2 between i and j,
passing through node k
2

(A )ij =
i and j

Pn

k=1 Aik Akj

in general case, A
i and j

EE263 RS1

ij

which is the number of paths of length 2 between

is the number of paths of length k between nodes

18

Node incidence matrix


graph with n nodes and m directed edges
node incidence matrix A Rnm is defined as

1 edge j enters (points into) node i


1 edge j leaves (points out of) node i
Aij =

0 otherwise.
what does y = Ax mean?
what does z = AT w mean?
what is AAT ?

EE263 RS1

19

Node incidence matrix (contd...)


Solution.
defining xj to be flow rate on edge j, yi is the total flow into node i
(out of, if negative)
for wj {0, 1}, zi is the sum rate on edge i
(AAT )ii = number of edges connected to the ith node
for i 6= j, (AAT )ij = 1, only if there is an edge from node i to node j

EE263 RS1

20

You might also like