You are on page 1of 6

UNIVERSITY OF CALIFORNIA, SANTA CRUZ

BOARD OF STUDIES IN COMPUTER ENGINEERING


CMPE 240: INTRODUCTION TO LINEAR DYNAMICAL SYSTEMS
Supplemental Problems

Lecture 2

1. Some standard time-series models. A time series is just a discrete-time signal, i.e., a
function from Z+ into R. We think of u(k) as the value of the signal or quantity u at
time (or epoch) k. The study of time series predates the extensive study of state-space
linear systems, and is used in many fields (e.g., econometrics).
Let u and y be two time series (input and output, respectively). The relation (or time
series model )
y(k) = a0 u(k) + a1 u(k 1) + + ar u(k r)
is called a moving average (MA) model, since the output at time k is a weighted average
of the previous r inputs, and the set of variables over which we average slides along
with time.
Another model is given by
y(k) = u(k) + b1 y(k 1) + + bp y(k p).
This model is called an autoregressive (AR) model, since the current output is a linear
combination of (i.e., regression on) the current input and some previous values of the
output.
Another widely used model is the autoregressive moving average (ARMA) model, which
combines the MA and AR models:
y(k) = b1 y(k 1) + + bp y(k p) + a0 u(k) + + ar u(k r).
Finally, the problem: Express each of these models as a linear dynamical system with
input u and output y. For the MA model, use state

u(k 1)

..
,

x(k) =
.

u(k r)

and for the AR model, use state

y(k 1)

..
.
x(k) =
.

y(k p)
1

You decide on an appropriate state vector for the ARMA model. (There are many
possible choices for the state here, even with different dimensions. We recommend you
choose a state for the ARMA model that makes it easy for you to derive the state
equations.)
Remark: multi-input, multi-output time-series models (i.e., u(k) Rm , y(k) Rp )
are readily handled by allowing the coefficients ai , bi to be matrices.
Solution:
In this problem we should find matrices A, B, C and D such that
x(k + 1) = Ax(k) + Bu(k)
y(k) = Cx(k) + Du(k).
Moving average model. We need to express x(k + 1) linearly in terms of x(k) and
u(k). We have

u(k 1)

u(k 2)

x(k) =
..

.
u(k r)

and therefore

x(k + 1) =

Note that

x(k + 1) =

but

0
u(k 1)
..
.
u(k + 1 r)

so

x(k + 1) =

u(k + 1 r)

0
u(k 1)
..
.
u(k + 1 r)

0 0 0
1 0 0
0 1 0
..
..
.
.
0 0

0 0 0
1 0 0
0 1 0
..
..
.
.

..
.

0
0
0
..
.

0 0

{z
A

u(k)
u(k 1)
..
.

..
.

0
0
0
..
.

u(k)
0
..
.
0

u(k 1)
u(k 2)
..
.
u(k r)

x(k) +
..

0
| {z
}
B

{z

x(k)

u(k).

y(k) should be expressed in terms of x(k) and u(k). This is easy from the relation
y(k) = a0 u(k) + a1 u(k 1) + + ar u(k r) and we get
y(k) =

a1 a2 ar
{z

x(k) + a0 u(k).
|{z}

(Note: the matrix A with ones on its subdiagonal is called a shift matrix because
it shifts down the elements of the input vector.)
Autoregressive model. In this case

x(k) =

so
x(k + 1) =

Now

and

y(k + 1 p)

0
y(k 1)
..
.
y(k + 1 p)

y(k)
0
..
.
0

y(k)
y(k 1)
..
.

x(k + 1) =

0 0 0
1 0 0
0 1 0
..
..
.
.
0 0

y(k p)

y(k + 1 p)

..
.

0
0
0
..
.

0 0

y(k 1)
b1 b2 bp

0 0 0
y(k
2)

..
.

..

.
0 0 0
y(k p)
|

..
.

0
0
0
..
.

x(k) +

0
y(k 1)
..
.

0 0 0
1 0 0
0 1 0
..
..
.
.

Thus

y(k 1)
y(k 2)
..
.

{z

x(k)

y(k)
0
..
.

y(k 1)
y(k 2)
..
.
y(k p)

{z

x(k)



+


}

u(k)
0
..
.
0

b1 b2 bp

0 0 0

..
x(k) +

.
0

0 0

1
0
..
.
0

u(k)

or

x(k + 1) =

and

b1 b2 b3
1 0 0
0 1 0
..
..
.
.
0 0

{z

y(k) =

bp
1

0
x(k) +
.

..
..
..

. .
0
1 0
| {z

b1 b2 bp

{z

i
}

u(k)

x(k) + |{z}
1 u(k).
D

Autoregressive moving average model. One simple choice for x(k) is

x(k) =

u(k 1)
u(k 2)
..
.
u(k r)
y(k 1)
y(k 2)
..
.
y(k p)

and therefore

x(k + 1) =

0
u(k 1)
..
.
u(k + 1 r)
0
0
..
.
0

u(k)
0
..
.
0
0
0
..
.
0

0
0
..
.
0
y(k)
y(k 1)
..
.
y(k + 1 p)

For similar reasons to the previous parts

0
u(k 1)
u(k 2)
..
.
u(k + 1 r)
0
..
.
0

0 0
1 0
0 1
..
.
0 0
0 0
..
.
0 0
4

0 0 0 0 0
.
..
0 0 ..
.

..
..
0 0 .
.

. . . . .. ..
.. ..
.
. . .
.
. 0
x(k)

1 0 0 0 0 0

0 0 0 0 0 0

..
.. ..

. .
.
0 0 0 0 0 0

and

0
..
.
0
y(k)
y(k 1)
y(k 2)
..
.
y(k + 1 p)

Thus

x(k + 1) =

0
..
.

and
y(k) =

0
0 0 0
a r b1 b2 b3
0 1 0 0
0 0 1 0
.
.. ..
..
.
.
. ..
0 0 0 0

0
..
.

0
0
a1 a2 a3
0
0
..
..
.
.

0 0
a1 a2
0
0
..
.

0
..
.
..
.
..
.

a 1 a 2 a r b1 b2 bp

..
.

0
bp
0
0

0
..
.
..
.
.
.. ..
.
. ..
0
0
b2 b3 bp
0 0 0
1 0 0
.
.. ..
.
. ..
0 1 0

0 0
.
.. ..
.
. ..
1 0 0
a 3 a r b1
0 1
0 0
.
.. ..
.
. ..
0 0 0

{z

i
}

0
..
.

x(k)+

x(k) +

0
.
.
.

1
0
0
..
.
0
a0
0
0
..
.
0

0
a0
0
0
..
.
0

u(k).

u(k)

x(k) + |{z}
a0 u(k).
D

(Note: it is possible to give state-space models with a fewer number of states but
this is not our concern here. A state-space model for the system with the fewest
number of states is called a minimal realization for the system. This topic will be
covered later in the course.)
2. Consider the (discrete-time) linear dynamical system
x(t + 1) = A(t)x(t) + B(t)u(t),

y(t) = C(t)x(t) + D(t)u(t).

Find a matrix G such that

y(0)
y(1)
..
.
y(N )

x(0)
u(0)
..
.
u(N )

The matrix G shows how the output at t = 0, . . . , N depends on the initial state x(0)
and the sequence of inputs u(0), . . . , u(N ).
5

Solution:
For t = 0, x(t + 1) = A(t)x(t) + B(t)u(t) becomes
x(1) = A(0)x(0) + B(0)u(0).
For t = 1

x(2) = A(1)x(1) + B(1)u(1)


= A(1) [A(0)x(0) + B(0)u(0)] + B(1)u(1)
= A(1)A(0)x(0) + A(1)B(0)u(0) + B(1)u(1).

For t = 2
x(3) = A(2)x(2) + B(2)u(2)
= A(2) [A(1)A(0)x(0) + A(1)B(0)u(0) + B(1)u(1)] + B(2)u(2)
= A(2)A(1)A(0)x(0) + A(2)A(1)B(0)u(0) + A(2)B(1)u(1) + B(2)u(2).
Now it is easy to guess the general expression for x(i) in terms of x(0), u(0), . . . , u(i1)
(which can be later proved inductively) as follows
x(i) =
+
+
+
..
.

A(i 1)A(i 2) A(0)x(0)


A(i 1)A(i 2) A(1)B(0)u(0)
A(i 1)A(i 2) A(2)B(1)u(1)
A(i 1)A(i 2) A(3)B(2)u(2)

+ A(i 1)B(i 2)u(i 2)


+ B(i 1)u(i 1).
Given x(i) as above, y(i) is simply found from y(i) = C(i)x(i) + D(i)u(i) in terms of
x(0), u(0), . . . , u(i) as
y(i) =
+
+
+
..
.

C(i)A(i 1)A(i 2) A(0)x(0)


C(i)A(i 1)A(i 2) A(1)B(0)u(0)
C(i)A(i 1)A(i 2) A(2)B(1)u(1)
C(i)A(i 1)A(i 2) A(3)B(2)u(2)

+ C(i)A(i 1)B(i 2)u(i 2)


+ C(i)B(i 1)u(i 1)
+ D(i)u(i).
Therefore
Gi1 =

C(0)
; i=1
C(i 1)A(i 2) A(0) ; 2 i N + 1

and for i = 1, 2, . . . , N + 1

0
D(i 1)
Gij =
C(i 1)B(i 2)

C(i 1)A(i 2) A(j 1)B(j 2)


6

;
;
;
;

N +2j >i+1
j =i+1
j=i
2 j < i.

You might also like