ENEE 660 HW Sol #3

13
Electrical and Computer Engineering Department University of Maryland, College Park ENEE 660 System Theory Fall 2008 Professor John S. Baras Solution to Homework Set #3 Problem 1 Given n × n matrix A and n × m matrix B controllability fails to hold when rank[B | AB | A 2 B |··· A n1 B] < n This implies that all n × n submatrices of this n × nm matrix also have rank < n. That is they are all singular. There are nm n = (nm)! n!(nmn)! such n × n submatrices of the controllability matrix. Then det(M k ) = 0, k = 1, ··· , nm n for all such submatrices. But these are polynomi al equations in the parameters, which here are the elements of the matrices A and B. The ref ore the set of all mat ric es (A, B) in IR n 2 × I R nm which fail to form a controllable pair lie on a variety, dened by these polynomial equations from the determinants of all n × n submatrices of the controllability matrix. Hence controllability is generic. Observability of (A, C ) is the same as controllability of ( A T ,C T ). So by the sa me argume nt observability is gener ic also. Minima lity of (A,B,C  ) is equivalent to controllability of (A, B) and observability of (A, C ). So ( A,B,C  ) fails to be minimal on the subset of the parameter space IR n 2 × I R nm × I R np dened as the simultaneous solution set of the polynomial equations obtained by asking that the determinants of all n × n submatrices of the controllability or of observability matrices vanish. So minimality property of (A,B,C  ) is also generic. Problem 2 Since the pair [A(·), B(·)] is controllable, there exists for any t f a control u t f (·) such that the solution of ˙ x(t) = A(t)x(t) + B(t)u(t) x(t o ) = x o satises x(t f ) = 0. Then consider the control ˆ u(t) = u t f (t), t o t t f 0, t f < t 1

Transcript of ENEE 660 HW Sol #3

Page 1: ENEE 660 HW Sol #3

8/3/2019 ENEE 660 HW Sol #3

http://slidepdf.com/reader/full/enee-660-hw-sol-3 1/13

Electrical and Computer Engineering Department

University of Maryland, College Park

ENEE 660

System Theory

Fall 2008

Professor John S. Baras

Solution to Homework Set #3

Problem 1

Given n × n matrix A and n × m matrix B controllability fails to hold when

rank[B | AB | A2B | · · · An−1B] < n

This implies that all n × n submatrices of this n × nm matrix also have rank < n. That is theyare all singular. There are

nmn

= (nm)!

n!(nm−n)! such n × n submatrices of the controllability matrix.Then

det(M k) = 0, k = 1, · · · ,

nm

n

for all such submatrices. But these are polynomial equations in the parameters, which here are theelements of the matrices A and B. Therefore the set of all matrices (A, B) in IRn2 × IRnm which

fail to form a controllable pair lie on a variety, defined by these polynomial equations from thedeterminants of all n × n submatrices of the controllability matrix. Hence controllability is generic.Observability of (A, C ) is the same as controllability of (AT , C T ). So by the same argumentobservability is generic also. Minimality of (A ,B,C  ) is equivalent to controllability of (A, B) andobservability of (A, C ). So (A ,B,C  ) fails to be minimal on the subset of the parameter space

IRn2 × IRnm × IRnp defined as the simultaneous solution set of the polynomial equations obtainedby asking that the determinants of all n × n submatrices of the controllability or of observabilitymatrices vanish. So minimality property of (A ,B,C  ) is also generic.

Problem 2

Since the pair [A(·), B(·)] is controllable, there exists for any tf  a control utf (·) such that thesolution of 

x(t) = A(t)x(t) + B(t)u(t)x(to) = xo

satisfies x(tf ) = 0.Then consider the control

u(t) =

utf (t), to ≤ t ≤ tf 0, tf  < t

1

Page 2: ENEE 660 HW Sol #3

8/3/2019 ENEE 660 HW Sol #3

http://slidepdf.com/reader/full/enee-660-hw-sol-3 2/13

The corresponding cost is

J (u) =  tf to

[xT (t)Q(t)x(t) + uT 

tf R(t)u

tf (t)]dt

which is finite since all functions are bounded functions of  t. Clearly the optimal cost satisfies

J opt = minu

J (u) ≤ J (u)

Note also that for any control u(·), J (u) is a nonnegative number since it is the integral of anonnegative function, due to the assumptions on Q(·), R(·).Next observe that from the general solution of a linear system x(·) is continuously dependent onu(·). J (u) depends continuously on x(·) and u(·) (in fact it is quadratic in x(·) and u(·)). So J (u)depends continuously on u(·). Since 0 ≤ J (u) ≤ J (u) these considerations imply that there existsan optimal control.

Problem 3

Let A =

0 −11 0

, b =

10

, c =

01

. Let C be the controllability matrix for (A, b + kc), for

k a constant in [0, 1].

C = [b + kc,A(b + kc), · · · , An−1(b + kc)] =

1 −kk 1

.

detC = 1 + k2 = 0 for 0 ≤ k ≤ 1.

So controllability of  {A, b + kc} holds for each constant k in [0, 1].

Now let 0 ≤ k(t) ≤ 1.

Then,

W (0, t) =

 t0

cos σ sin σ

− sin σ cos σ

1

k(σ)

1 k(σ)

cos σ − sin σsin σ cos σ

=

 t0

cos σ + k(σ)sin σ

− sin σ + k(σ)cos σ

cos σ + k(σ)sin σ − sin σ + k(σ)cos σ

= t0

(cos σ + k(σ)sin σ)

2

(cos σ + k(σ)sin σ)(− sin σ + k(σ)cos σ)(cos σ + k(σ)sin σ)(− sin σ + k(σ)cos σ) (− sin σ + k(σ)cos σ)2

Select k(σ) = tan σ, σ ∈ [0, π4 ].

Then 0 ≤ k(σ) ≤ 1, and

W (0, t) =

 t0

1

cos2 σ 00 0

dσ,

2

Page 3: ENEE 660 HW Sol #3

8/3/2019 ENEE 660 HW Sol #3

http://slidepdf.com/reader/full/enee-660-hw-sol-3 3/13

which for 0 ≤ t ≤ π4 is clearly not of full rank.

This is a COUNTEREXAMPLE to the statement in the problem.So, the fact that {A, b + kc} is a controllable pair for all constant k ∈ [0, 1] does not imply that

{A, b + k(t)c} is controllable for any function k with values in [0, 1]. You cannot determine thecontrollability of a time variant system by looking at the controllability of sampled versions of thepair (A(·), B(·)).

Problem 4

(a) The state vector is

x(·) =

r(·)r(·)θ(·)

θ(·)φ(·)

φ(·)

and the control vector is

u(·) =

ur(·)

uθ(·)uφ(·)

For the given f (x, u) we have

∂f 1∂x = 0, 1, 0, 0, 0, 0

∂f 2∂x = θ

2

cos2

φ + φ2

+2kr3 , 0, 0, 2rθ cos

2

φ, −2rθ2

cos φ sin φ + 2rφ, 0

∂f 3∂x = 0, 0, 0, 1, 0, 0

∂f 4∂x = 2r θ

r2− uθ

mr2 cosφ , −2 θr , 0, −2r/r + 2φ sinφ

cosφ , 2θφ sec2 φ − uθmr sinφ

(mr cosφ)2 , 2θ tan φ

∂f 5∂x = 0, 0, 0, 0, 0, 1

∂f 6∂x = 2rφ

r2 −uφmr2 , 0, 0, −2θ cos φ sin φ, −θ2 cos φ, −2r/r

A(t) =∂f (x, u)

∂x|xo(t),uo(t) =

0 1 0 0 0 03ω2

o 0 0 2roωo 0 00 0 0 1 0 00 −2ωo/ro 0 0 0 00 0 0 0 0 10 0 0 0 −ω2

o 0

where r3oω2o = k and therefore ω2

o + 2k/r3o = 3ω2

o .

3

Page 4: ENEE 660 HW Sol #3

8/3/2019 ENEE 660 HW Sol #3

http://slidepdf.com/reader/full/enee-660-hw-sol-3 4/13

Similarly,

B(t) =∂f (x, u)

∂u|xo(t),uo(t) =

0 0 01m 0 0

0 0 00 1

mro0

0 0 00 0 1

mro

(b) The reduced system (r − θ plane) is

d

dt

rrθ

θ

=

0 1 0 03ω2

o 0 0 2ωoro0 0 0 10 −2ωo/ro 0 0

rrθ

θ

+

0 01m 00 00 1

mro

ur

For radial thrust only uθ = 0, ur = 0.

So, b =

01m00

.

Then,

[b,Ab,A2b, A3b] =

0 1m 0 −ω2o

m1m 0 −ω2o

m 00 0 −2ωo

mro0

0 − 2ωomro

0 2ω3omro

It is easy to see that this matrix is singular. Therefore the system is not controllable when there is

only radial thrust.In the case of tangential thrust only, ur = 0 and uθ = 0.

Now, b =

0001

mro

.

The matrix

[b,Ab,A2bA3b] =

0 0 2ωom 0

0 2ωom 0 −2ω3o

m

0 1mro

0 −4ω2omro

1mro

0 −4ω2oro

0

It is easy to see that this matrix has full rank. So system is controllable using the tangential thrustonly.

Problem 5

There was an error in the statement of the problem. I should have written reachability instead of controllabiGrammian. Then for

W (to, t1) =

 t1to

Φ(t1, σ)B(σ)BT (σ)ΦT (t1, σ)dσ

4

Page 5: ENEE 660 HW Sol #3

8/3/2019 ENEE 660 HW Sol #3

http://slidepdf.com/reader/full/enee-660-hw-sol-3 5/13

If we make a coordinate change x(t) = P (t)z(t) then we know that the transition matrix for thez(t) evolution is given by

P −1(t)Φ(t, to)P (to),

while the corresponding B(·) matrix is

P −1(t)B(t),

while the corresponding C (·) matrix isC (t)P (t).

Therefore the corresponding reachability Grammian is

W z(to, t1) =

 t1to

P −1(t1)Φ(t1, σ)P (σ)P −1(σ)B(σ)BT (σ)P −T (σ)P T (σ)ΦT (t1, σ)P −T (t1) =

= P −1

(t1)W (to, t1)P −T 

(t1) (1)Similarly for the observability Grammian

M (to, t1) =

 t1to

ΦT (σ, to)C T (σ)C (σ)Φ(σ, to)dσ

we get

M z(to, t1) =

 t1to

P T (to)ΦT (σ, to)P −T (σ)P T (σ)C T (σ)C (σ)P (σ)P −1(σ)Φ(σ, to)P (to)dσ =

= P T (to)M (to, t1)P (to) (2)

Set to = t − δ, t1 = t in (1) and to = t, t1 = t + δ in (2).We get,

W z(t − δ, t)M z(t, t + δ) = P −1(t)W (t − δ, t)P −T (t)P T (t)M (t, t + δ)P (t) =

= P −1(t)W (t − δ, t)M (t, t + δ)P (t) (3)

But then if  xλ is an eigenvector of 

W (t − δ, t)M (t, t + δ)

with eigenvalue λ, we considerzλ = P −1(t)xλ.

Then,

W z(t − δ, t)M z(t, t + δ)zλ = P −1(t)W (t − δ, t)M (t, t + δ)P (t)P −1(t)xλ = P −1(t)λxλ = λzλ

So zλ is an eigenvector of  W z(t − δ, t)M z(t, t + δ) with eigenvalue λ. Thus the eigenvalues of W (t − δ, t)M (t, t + δ) remain invariant under similarity transformations.(b) Both W  and M  are nonnegative definite. Let

(W (t − δ, t))1/2

5

Page 6: ENEE 660 HW Sol #3

8/3/2019 ENEE 660 HW Sol #3

http://slidepdf.com/reader/full/enee-660-hw-sol-3 6/13

be a symmetric square root of  W (t − δ, t). Then W (t − δ, t)M (t, t + δ) and

W (t − δ, t)1/2M (t, t + δ)W (t − δ, t)1/2 (4)

have the same eigenvalues except 0.Since M (t, t + δ) is symmetric and nonnegative, and W (t − δ, t)1/2 is the symmetric square root,it follows that the matrix in (4) is also symmetric and nonnegative definite. Hence its eigenvaluesare nonnegative.(c) Let us assume that W (t − δ, t) is nonsingular. Then

W (t − δ, t) = W (t − δ, t)1/2W (t − δ, t)1/2.

Let, T (t) = W (t − δ, t)−1/2. Then in the new coordinates W 1(t − δ, t) = I n and

M 1(t, t + δ) = W 1/2(t − δ, t)M (t, t + δ)W 1/2(t − δ, t)

Let us assume M (t, t + δ) is nonsingular. Then we can write

M 1(t, t + δ) = S ΛS T 

where S  is orthogonal and Λ is diagonal. Let R(t) = S Λ−1/2.In the new coordinates defined by R(t),

W 2(t − δ, t) = R−1(t)I nR−T (t) = Λ1/2S T S Λ1/2 = Λ

andM 2(t, t + δ) = Λ−1/2S T S Λ2S T S Λ−1/2 = Λ

We can also treat the more general case when W (t − δ, t) or M (t, t + δ) or both are singular.

Problem 6 (Optional, Extra Credit)

Let

x1 = x

x2 = x

Then the corresponding state model is

ddt

x1(t)x2(t)

=

0 1

−1 0

x1(t)x2(t)

+

01

u(t)

The transition matrix for this system is

eAt =

cos t sin t

− sin t cos t

6

Page 7: ENEE 660 HW Sol #3

8/3/2019 ENEE 660 HW Sol #3

http://slidepdf.com/reader/full/enee-660-hw-sol-3 7/13

So, the trajectory starting at

00

is given by

x1(t)x2(t)

=

 t0

cos(t − σ) sin(t − σ)

− sin(t − σ) cos(t − σ)

01

u(σ)dσ =

 t0 sin(t − σ)u(σ)dσ t0 cos(t − σ)u(σ)dσ

(5)

We want to analyze and compare the reachable set of the above system, in one unit of time, withcontrols

• (a) 0 ≤ u(t) ≤ 1 and piecewise continuous.

• (b) u(t) = 1 or 0 and piecewise constant (on–off type control).Let us describe in detail the reachable set Rb, using controls (b). For this we need to know thetrajectory of the system for u(t) = 1 and for u(t) = 0.For u(t) = 0

x1(t)x2(t)

=

cos(t − to) sin(t − to)

− sin(t − to) cos(t − to)

x1(to)x2(to)

(6)

which are obviously circles, with center 0

0 and passing through x1(to)

x2(to) in a clockwise direc-

tion with angular velocity 1 rad/sec.

(x (t), x (t))1 2

1  (x (t ), x (t ))o 2 o

x1

x2

t t-t

u(t)=0

(0,0)

oo

For u(t) = 1

x1(t)x2(t)

=

cos(t − to) sin(t − to)

− sin(t − to) cos(t − to)

x1(to)x2(to)

+

1 − cos(t − to)

sin(t − to)

(7)

7

Page 8: ENEE 660 HW Sol #3

8/3/2019 ENEE 660 HW Sol #3

http://slidepdf.com/reader/full/enee-660-hw-sol-3 8/13

or

x1(t) − 1

x2(t)

=

cos(t − to) sin(t − to)

− sin(t − to) cos(t − to)

x1(to) − 1

x2(to)

(8)

which is clearly a circle with center (1,0) passing through x1(to),x2(to),

8

Page 9: ENEE 660 HW Sol #3

8/3/2019 ENEE 660 HW Sol #3

http://slidepdf.com/reader/full/enee-660-hw-sol-3 9/13

t-t o

(x (t), x (t))1 2

1  (x (t ), x (t ))o 2 o

x1

x2

u(t)=1

1

in the clockwise direction with angular velocity 1 rad/sec. It is clear that in order to move awayfrom the origin we have to start with u(t) = 1 and keep it there for a while and then we can startswitching to 0 and back to 1 for one unit of time = 1sec. We apply first controls of the type shownbelow

u(t)

0

1

1

We get the following reachable set R

x2

x1

A

CFsin1

-cos1

E1-cos1 1

B

R

D

The curve ABC  is part of the circle with center (1,0) and passing through the origin. It goes upto the point (1 − cos1, sin 1). All points on ABC  are reachable by keeping the control u(t) = 1. Atany time, 0 ≤ δ ≤ 1 we can switch to u(t) = 0 for the remaining time. The trajectory will be asdescribed by (6) and the end point will be

9

Page 10: ENEE 660 HW Sol #3

8/3/2019 ENEE 660 HW Sol #3

http://slidepdf.com/reader/full/enee-660-hw-sol-3 10/13

x1(1)

x2(1) = cos(1 − δ) sin(1 − δ)

− sin(1 − δ) cos(1 − δ) 1 − cos δ

sin δ = cos(1 − δ) − cos1

− sin(1 − δ) + sin 1 (9)

which shows that ADC  is the arc of a circle with center (− cos1, sin 1) which passes through theorigin. From simple geometrical considerations, notice that the line (− cos1, sin 1)(1, 0) is perpen-dicular to the line AC . And therefore, since both circles have radius 1, the set R is symmetricwith respect to the line AC .From the definition of a convex set, a set is convex if and only if every point of a straight linesegment joining two points of the set is also a part of the set. Clearly, the set R is convex.Obviously

Rb ⊇ R (10)

Let us know discuss Ra also.We also obviously have

Ra ⊇ Rb (11)

Since 1 < π , from (5) it follows that

Ra =

x =

x1

x2

=

 t0 sin(t − σ)u(σ)dσ t0 cos(t − σ)u(σ)dσ

,

for some 0 ≤ t ≤ 1and some u(t)s.t.0 ≤ u(t) ≤ 1

(12)

So, for x ∈ Ra clearly x1 ≥ 0, x2 ≥ 0.Therefore, for x ∈ Ra,

x1 ≤ 1 − cos tx2 ≤ sin t

for 0 ≤ t ≤ 1 (13)

So, Rα ⊆ in the orthogonal polygon (0, 0)(1 − cos1, 0)(1 − cos1, sin 1)(0, sin 1) i.e.,

Rα ⊆ AECF  (14)

(in our figure above).Observe now that the set of control functions U  which are piecewise continuous and 0 ≤ u(t) ≤ 1is convex. Indeed, if  u1(·) ∈ U , u2(·) ∈ U  then, αu1(·) + (1 − a)u2(·) = u3(·) belong to U  for0 < α < 1. This is clear since u3(·) is obviously piecewise continuous if  u1(·) and u2(·) are. And

10

Page 11: ENEE 660 HW Sol #3

8/3/2019 ENEE 660 HW Sol #3

http://slidepdf.com/reader/full/enee-660-hw-sol-3 11/13

0 ≤ u3(t) ≤ α + (1 − α) = 1.

So, if  x1, x2 belong to Rα, we must have t1, t2 and u1, u2 ∈ U  s.t.

x1 = t10 eA(t1−σ)

01

u1(σ) dσ

x2 = t20 eA(t2−σ)

01

u2(σ) dσ

without loss of generality, assume t2 ≥ t1. Now, observe that I can rewrite x1 as (just setσ = τ  − (t2 − t1))

x1 = t2t2−t1

eA(t2−τ )

01

u1(τ  − (t2 − t1)) dτ 

= t20 eA(t2−τ )

01

u3(τ ) dτ 

where

u3(t) = 0, 0 ≤ τ < t2 − t1

= u1(τ  − (t2 − t1)), t2 − t1 ≤ τ  ≤ 1.

So, for 0 < β < 1

βx1 + (1 − β )x2 = t20 eA(t2−σ)

01

(βu3(σ) + (1 − β )u2(σ))dσ

= t20 e

A(t2−σ) 0

1

u4

(σ)dσ

and certainly

u4(σ) = βu3(σ) + (1 − β )u2(σ)

is admissible since U  is convex.

Therefore, Rα is also convex. (15)

11

Page 12: ENEE 660 HW Sol #3

8/3/2019 ENEE 660 HW Sol #3

http://slidepdf.com/reader/full/enee-660-hw-sol-3 12/13

Let now x(t) be a trajectory in Rα emanating from (0,0). Now observe from (12) that for any timet ∈ [0, 1]

x2(t)sin t − x1(t)cos t + cos t − 1 = t0 cos(σ − t)sin tu(σ)dσ

+ t0 sin(σ − t)cos tu(σ)dσ + cos t − 1 =

 t0 sin(σ)u(σ)dσ

+cos t − 1 ≤ t0 sin σdσ + cos t − 1 = 0

or

x2(t)sin t − x1(t)cos t + cos t − 1 ≤ 0, 0 ≤ t ≤ 1

or (x2(t) − sin t)sin t − (x1(t) + cos t)cos t + cos t ≤ 0, 0 ≤ t ≤ 1

or (x2(t) − sin t)sin t − (x1(t) − (1 − cos t))cos t ≤ 0, 0 ≤ t ≤ 1

(16)

Now, (sin t, cos t) is a tangent unit vector to the curve ABC  at the point (1 − cos t, sin t) (see figure just below)

(x (t), x (t))1 2010 0 0 00 0 0 00 0 0 00 0 0 01 1 1 11 1 1 11 1 1 11 1 1 1

x1

x2

A

C

B

unit tangent vector with

components (sint,cost)

(1-cost,sint)

outwards

unit normal

vector with

components

(-cost,sint)

= a generic trajectorypoint

So, (− cos t, sin t) is a normal unit vector pointing outwards. So (16) says: if at any time t ∈ [0, 1]you draw the vector from the corresponding point (1 − cos t, sin t) of the curve ABC  to the trajec-tory point (x

1(t), x

2(t)) it should point inwards!

Conclusion:

Rα ⊆ ABCE  (17)

Similarly, (sin(1 − t), cos(1 − t)) is a unit target vector to the curve ADC  at the point (cos(1 − t) −cos1, − sin(1 − t) + sin 1) and, therefore,

(cos(1 − t), − sin(1 − t))

12

Page 13: ENEE 660 HW Sol #3

8/3/2019 ENEE 660 HW Sol #3

http://slidepdf.com/reader/full/enee-660-hw-sol-3 13/13

is a unit vector normal to ADC  at the same point and pointing in the exterior of  ABCDA, as inthe figure just below.

(x (t) , x (t) )1 201

x1

x2

A

C

unit normal vector (cos(1-t),-sin(1-t))

(cos(1-t)-cos1,-sin(1-t)+sin1)

unit tangent vector (sin(1-t),cos(1-t))

So, again using (16),

(x1(t) + cos 1 − cos(1 − t)) cos(1 − t) − sin(1 − t)(x2(t) − sin 1 + sin(1 − t))

= x1(t)cos(1 − t) − sin(1 − t)x2(t) + cos 1 cos(1 − t) − cos2(1 − t) + sin(1 − t)sin1 − sin2(1 − t)

= t0 [sin(t − σ) cos(1 − t) − sin(1 − t) cos(t − σ)]u(σ)dσ − 1 + cos t

= t0 sin(2t − σ − 1)u(σ)dσ − 1 + cos t ≤ cos(t − 1) − cos(2t − 1) − 1 + cos t

= cos(t − 1) − cos t cos(t − 1) + sin t sin(t − 1) − 1 + cos t

= −(1 − cos t)(1 − cos(1 − t)) − sin t sin(1 − t) ≤ 0, for 0 ≤ t ≤ 1So, again: if at any time t ∈ (0, 1) you draw the vector from the corresponding point (cos(1 − t) −cos1, − sin(1 − t) + sin 1) of the curve ADC  to the trajectory point (x1(t), x2(t)) it should pointinwards!Conclusion:

Rα ⊆ ABCDA = R (18)

Now, from (10),(11),(18) we have

R

= Rα = Rb

What we have proved is a special case of the famous “Bang-Bang” theorem of control theory thatstates that for general classes of dynamical systems the reachable sets with controls with values ina convex compact set U  is exactly the same as the reachable set with controls with values in theextreme points of the set U .

13