Sie sind auf Seite 1von 36

Exercises Chapter 2

System Identification
The solutions presented here are for the exercises:
2G.2
2G.4
2E.2
2E.4
2E.6

Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

2G.2 Let s () be the (power ) spectrum of a scalar signal defined as in


(2.63). Show that
i s () is real
ii s () 0
iii s () = s ()

(2.63)
s () =

Rs ( )ei

Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

2G.2 Solution
The expression (2.63) represents the Fourier transform of the Autocorrelation
function. This Expression can be divided as:
s () =

0
X

Rs ( )ei +

=0

Rs ( )ei Rs (0)

rewriting this expression we get


s () =

=0

Rs ( )ei +

=0

Rs ( )ei Rs (0)

According to the properties of the Autocorrelation Function we know that it


is an even function which tell us:
Rs ( ) = Rs ( )

Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

We can rewrite the expression in the next form


s () =
=

=0

Rs ( )ei +

=0
i

Rs ( ) e

=0

by definition
i

cos() =

+e

Rs ( )ei Rs (0)

+e

Rs (0)

Constructing this expression in our function we get:




i
i
X
e
+e
) Rs (0)
s () = 2
Rs ( )
2
=0
s () = 2

=0

Pedro Xavier Miranda La Hera.

Rs ( )cos( ) Rs (0)

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

which can be also written as


s () = Rs (0) + 2

Rs ( )cos( )

=1

By definition Rs ( ) and cos( ) are real functions, therefore using this


expression we can conclude that:
s () is real
ii. By theory any matrix M is said to be positive-semidefinite if it has the
following equivalent property:
M = LL
s LL s 0

(L s) (L s) = ||L s||2 0

Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

The expression for the spectral density is defined as


s () =

Rs ( )ei

where
Rs ( ) = Es(t)s(t ) =

t=

s(t)s (t )

Replacing in the expression for the spectral density


s () =

Es(t)s(t )ei

= t=

= t=

Pedro Xavier Miranda La Hera.

s(t)s (t )ei
s(t)s (t )eit ei(t )

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

if we make t
= then we can rewrite the last expression as
s () =

s(t)eit

t=

"

sT ()ei

t=

s(t)eit

{z
L

}|

s()ei
{z

if we apply the positive semi-definite theorem to this expression


"
#"
#
X
X

it
z ()z = z
s(t)e
s(t)eit z
t=

Pedro Xavier Miranda La Hera.

t=

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

z ()z =

"

t=

s(t)eit

# !
z

"

s(t)eit

t=

"
# 2

X



=
s(t)eit z 0

# !
z

t=

this last term tell us that the expression for will be always larger or equal
than zero due to the square exponent in the final expression
s () 0

Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

iii. If we use the relation


s () = 2

=0

Rs ( )cos( ) Rs (0)

instead of (2.63), we see that only affects the term cos( ). By definition
of the cosine function we know that:
cos() = cos()
This relations implies that
s () = s ()

Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

2G.4. Let a continuous time system representation be given by


y(t) = Gc (p)u(t)
The input is constant over the sampling interval T . Show that the sampled
input-output data are related by
y(t) = GT (q)u(t)
where
GT (q) =

1
2i

s=i

Gc (s)

esT 1
s

1
q

esT

ds

note: correction for the exercise can be found at:


http://www.control.isy.liu.se/ ljung/sysid/errata/

Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

10

2G.4. Solution
If we express the system in terms of the Laplace transform we have
Y (s) = G(s)U (s)
where U(s) will be the Laplace transform of the constant step signal over the
period T
Z T
U (s) =
u(t)est dt
0

which will lead to the solution


1 st
|(0,T )
U (s) = e
s
1 esT
=
s
rewriting the expression for Y (s) we will have
Y (s) = Gc (s)
Pedro Xavier Miranda La Hera.

1 esT
s

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

11

To be able to use the discrete transform GT (q) it is needed first to take this
expression back into time domain
Z i
1
Y (s)est ds
y(t) =
2i s=i
Z i
1
1 esT st
y(t) =
e ds
Gc (s)
2i s=i
s
From this expression we can calculate GT (q) applying the definition of the
discrete transform
GT (q) =

T
X

gT (k)q k

k=1

Z
T
X
1

k=1

Pedro Xavier Miranda La Hera.

2i

s=i

Gc (s)

1 esT
s

eskT q k ds

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

12

The expression only affects the last exponential term


GT (q) =

1
2i

Gc (s)

s=i

T
1 esT X

eskT q k ds

k=1

Analyzing the sumatory


T
X

skT

T
X

sT

k=1

k=1


1 k

If we apply the known expression


T
X

aq

k=0


1 k

q
qa

in the equation above


T
X

k=0

sT


1 k

Pedro Xavier Miranda La Hera.

=1+

T
X

k=1

sT


1 k

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

13

As a result we will have that


T
X

k=1

sT


1 k

T
X

sT

esT

k=0

=
=


1 k

q
esT

q esT

Plugging the last expression in the general formula


Z i
1
1 esT esT
ds
GT (q) =
Gc (s)
sT
2i s=i
s
qe

Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

14

GT (q) =
GT (q) =

1
2i
1
2i

Gc (s)

s=i

s=i

Gc (s)

esT 1
esT

esT

esT

q esT
esT
q

esT

ds

ds

which finally leads to the expression


Z i
1
esT 1
1
ds
Gc (s)
GT (q) =
sT
2i s=i
s
qe

Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

15

2E.2. Suppose that {(t)} and {(t)} are two mutually independent
sequences of independent random variables with
E(t) = E(t) = 0,

E 2 (t) = ,

E 2 (t) =

Consider
(t) = (t) + (t) + (t 1)
Determine a MA(1) process
v(t) = e(t) + ce(t 1)
where {e(t)} is white noise with
Ee(t) = 0,

Ee2 (t) = e

such that {(t)} and {v(t)} have the same spectra; that is, find c and e so
that v () ()
Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

16

2E.2. Solution
If we want to achieve
v () ()
then the Fourier transform of both autocorrelation functions should be the
same

X
X
R ( )ei
Rv ( )ei =
=

this reasoning leads to the fact that both autocorrelation functions should be
the same
Rv ( ) R ( )

or
Ev(t)v(t ) E(t)(t )

Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

17

Separating the problem in two parts


Ev(t)v(t ) = E {(e(t) + ce(t 1)) (e(t ) + ce(t 1 ))}
n
= E e(t)e(t ) + ce(t)e(t 1 ) + ...
... + ce(t 1)e(t ) + c2 e(t 1)e(t 1 )}

= Ee(t)e(t ) + 2cEe(t)e(t 1 ) + ...


o
... + c2 Ee(t 1)e(t 1 )

As we can see the expressions above represent only the Autocorrelation


functions of the white noise e(t) shifted or multiplied by a scalar
Ev(t)v(t ) = Re ( ) + 2cRe ( ) + c2 Re ( )
= Re ( )(1 + c)2

Under certain conditions we could conclude that


Re ( ) = Ee2 (t) = e
Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

18

Then the final expression for Rv ( ) will be


Rv ( ) = Ev(t)v(t ) = e (1 + c)2
to obtain a expression for R ( ) we follow the same procedure
E(t)(t ) = E{((t) + (t) + (t 1))((t ) + ...
... + (t ) + (t 1 ))}
n
= E (t)(t ) + (t)(t ) + ...

... + (t)(t 1 ) + (t)(t ) + ...


... + (t)(t ) + (t)(t 1 ) + ...
... + (t 1)(t ) + (t 1)(t ) + ...
o
2
... + (t 1)(t 1 ))

Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

19

Separating the function we will get


E(t)(t ) = E(t)(t ) + E(t)(t ) + ...
... + E(t)(t 1 ) + E(t)(t ) + ...
... + E(t)(t ) + E(t)(t 1 ) + ...
... + E(t 1)(t ) + E(t 1)(t ) + ...

... + 2 E(t 1)(t 1 )


applying the data given we can reduce the system to

E(t)(t ) = E(t)(t ) + E(t)(t ) + ...


... + E(t)(t 1 ) + E(t 1)(t ) + ...
... + 2 E(t 1)(t 1 )

Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

20

Applying the same reasoning as before, the terms in the last expression
represent only the Autocorrelation functions of R ( ) and R ( ), therefore
we can rewrite as
E(t)(t ) = R ( ) + R ( ) + 2R ( ) + 2 R ( )
= R ( ) + R ( )(1 + )2

Under certain conditions we could conclude that


R ( ) =
R ( ) =
Then the final expression for R ( ) will be
R ( ) = E(t)(t ) = + (1 + )2

Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

21

By the equivalence
Rv ( ) R ( )
we obtain
e (1 + c)2 = + (1 + )2
e + 2ce + c2e = + + 2 + 2
we can form the equalities
e = +
ce =
And finally we can conclude that
e = +
c=

Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

22

2E.4. Consider the state space description


x(t + 1) = f x(t) + (t)
y(t) = hx(t) + v(t)
where x, f , h, and v are scalars. {(t)} and {v(t)} are mutually
independent white Gaussian noises with variances R1 and R2 , respectively.
Show that y(t) can be represented as an ARMA process:
y(t)+a1 y(t1)+ +an y(tn) = e(t)+c1 e(t1)+ +cn e(tn)
Determine n, ai , ci and the variance of e(t) in terms of f , h, R1 and R2 .
What is the relationship between e(t), (t) and v(t)?

Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

23

Taking the discrete transform of the state space model:


qX(q) = f X(q) + (q)
Y (q) = hX(q) + v(q)

X(q) =
Y (q) =

(q)
qf
h(q)
qf

+ v(q)

Y (q)(q f ) = h(q) + (q f )v(q)


yk+1 f yk = hk + vk+1 f vk
what we want to do now is to make valid the next equivalence
hk + vk+1 f vk
= ek+1 + ek

Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

24

as we see in the ARMA process, we are missing the values of and , but
one fact that we have is that the ARMA process is monic, which means that
the term for = 1, thus
yk+1 f yk
= ek+1 + ek
if we name the expression as follow:
k = hk + vk+1 f vk
= ek+1 + ek
To fulfill the equivalence of the process we will find the next equivalences:
Ek = Ek = 0
Ek k = Ek k
Ek k1 = Ek k1

Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

25

replacing the expression


E{hk + vk+1 f vk }{hk + vk+1 f vk } =
= E{ek+1 + ek }{ek+1 + ek }
E{hk + vk+1 f vk }{hk1 + vk f vk1 } =
= E{ek+1 + ek }{ek + ek1 }
making the internal operations for Ek k = Ek k we end up in
2
h2 Ek2 + Evk+1
+ f 2 Evk2 = Ee2k+1 + 2 Ee2k

h2 R1 + R2 + f 2 R2 = Re + 2 Re
the expression for Ek k1 = Ek k1
f Evk2 = Ee2k
f R2 = Re

Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

26

We need to solve the next system of equations for and Re


h2 R1 + R2 + f 2 R2 = Re (1 + 2 )
f R2 = Re
getting Re from the second equation
Re =

f R2

Replacing into the first equation


1 + 2

h2 R1 + R2 + f 2 R2
f R2

as we see the numerator of the right hand side will be always positive and
equal to some constant value, for simplicity we can rewrite the expression like:
1 + 2

= 2C

Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

27

where
2C =

h2 R1 + R2 + f 2 R2
f R2

the solution for will be then


p
= C C2 1

So finally we can write the ARMA process in the form


p
yk+1 f yk = ek+1 + (C C 2 1)ek

now we need to check the stability of the ARMA process, to do that we


analyze first the square root in the expression for :
C2 1 > 0

Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

28

which tell us that C has to be always 1 < C < 1 in order to avoid complex
values. As we see in the expression for 2C this requirement is going to be
fulfilled whit a good choice of the value f . Another requisite will be
p
|C C 2 1| < 1

and again this decision can be taken with a good choice of the parameter f .
Clearly it can be seen in the process transfer function:
Y (q)
E(q)

q+
qf

if the parameter f in the denominator is chosen in a way that |f | > 1 then


we will have an unstable system. This means that nothing can be said about
the sign that we must choose for the expression in order to make the system
stable. The value for the variance of e(t) will be
f R2
Re =

C C2 1
Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

29

2E.6. Consider the system


d
dt

y(t) + ay(t) = u(t)

Suppose that the input u(t) is piecewise constant over the sampling interval
u(t) = uk , kT t < (k + 1)T
(a) Derive a sample data system description for uk , y(kT ).
(b) Assume that there is a time delay of T seconds so that u(t) in the
expression is replaced by u(t T ). Derive a sample data system
description for this case.
(c) Assume that the time delay is 1.5T so that u(t) is replaced by
u(t 1.5T ). Then give the sampled data description.

Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

30

2E.6. Solution
a). The solution to the differential equation which includes the effects of the
input and initial conditions is given by:
Z t
y(t) = ea(tt0 ) y(t0 ) +
ea(t ) u( )d
t0

where y(t0 ) is the initial condition on the state variables. Based on this
solution the sampled state response is given by
Z T
y[(k + 1)T ] = eaT y[kT ] +
ea(T ) u( + kT )d
=0

we can write
y[(k + 1)T ] = Ay[kT ] + Bu[kT ]
where
A=e

aT

B=

=0

Pedro Xavier Miranda La Hera.

a(T )

d =

1 eaT
a

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

31

if we use Z transform
z(Y (z) y[0]) = AY (z) + BU (z)
Y (z)(z A) = BU (z) + zy[0]
Y (z) =

B
zA

U (z) +

z
zA

y[0]

or expressed in geometric series


y(t) =

B X

k=0

Pedro Xavier Miranda La Hera.

Ak+1 u(t k) +

Ak q k y[0]

k=0

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

32

(b). Introducing the time delay into the system


d
dt

y(t) + ay(t) = u(t T )

The solution to the differential equation after applying the delay in the
equation including the effects of the input and the initial conditions is given
by:
Z t
ea(t ) u( T )d
y(t) = ea(tt0 ) y(t0 ) +
t0

where y(t0 ) is the initial condition on the state variables. Based on this
solution the sampled state response is given by
Z T
y[(k + 1)T ] = eaT y[kT ] +
ea(T ) u( + kT T )d
=0

we can write
y[(k + 1)T ] = Ay[kT ] + Bu[kT T ]
Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

33

where
A = eaT

B=

ea(T ) d =

=0

1 eaT
a

if we use the Z transform


z(Y (z) y[0]) = AY (z) + Bz 1 U (z) + Bu[1]
Y (z)(z A) = Bz 1 U (z) + Bu[1] + zy[0]
Bz 1

u[1] +
y[0]
zA
zA
B
z
U (z) +
u[1] +
y[0]
Y (z) =
z(z A)
zA
zA
Y (z) =

Pedro Xavier Miranda La Hera.

zA
B

U (z) +

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

34

(c). Introducing the time delay into the system


d
dt

y(t) + ay(t) = u(t 1.5T )

The solution to the differential equation after applying the delay in the
equation including the effects of the input and the initial conditions is given
by:
Z t
ea(t ) u( 1.5T )d
y(t) = ea(tt0 ) y(t0 ) +
t0

where y(t0 ) is the initial condition on the state variables. Based on this
solution the sampled state response is given by
y[(k + 1)T ] = eaT y[kT ] +

=0

ea(T ) u( + kT T )d

where
T = 1.5T
Pedro Xavier Miranda La Hera.

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

35

The sampled state response will be given by:


y[(k + 1)T ] = Ay[kT ] + Bu[kT T ]
where the parameters A and B will be:
A = e1.5aT
Z 1.5T
1.5aT
1

e
B=
ea(1.5T ) d =
a
=0
if we use the Z transform
z(Y (z) y[0]) = AY (z) + Bz 1 U (z) Bu[1]
Y (z)(z A) = U (z)(Bz 1 ) + zy[0] Bu[1]
Y (z) =

Bz 1

y[0]

u[1]

zA
zA
z
B
Y (z) =
U (z) +
y[0]
u[1]
z(z A)
zA
zA
Pedro Xavier Miranda La Hera.

zA
B

U (z) +

Solutions. Chapter 2 Book: System Identification (Ume


a, January, 2005)

36

Das könnte Ihnen auch gefallen