Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
Optimal Control
Prof. Daniela Iacoviello
Lecture
Double integrator (from Bruni et al.1993)
1)(
0)(,)()()(
)()(
2
21
===
=
tu
txxtxtutx
txtx
fii
=
=
1
0
00
10BA
0;0Eigenvalues:
The couple verifies the condition of controllability:)( BA
0101
10det)det( −=
=ABB
( )of
oo tux ,
Unique, non singular and
the optimal control is bang-bang
with a number of discontinuity points
11=− no
Goal: Minimizeif
t
t
ttdtJ
f
i
−==
(1)
Prof.Daniela Iacoviello- Optimal Control 16/11/2018
Description of the trajectories when 1=u
From system (1), it results:
( )
( ) ( )2211
22
2
1)(
)(
iiii
ii
ttttxxtx
xtttx
−−+=
+−=
( ) ii xtxtt 22 )( −=−
22
22
2222
22222
2
2222211
)(2
1
)()(2
1
2
1)(
2
1)(
)(2
1)()(
i
ii
iii
iiii
xtx
xtxxtx
xtxxxtx
xtxxtxxxtx
−=
+−=
−+−=
−−=−
Prof.Daniela Iacoviello- Optimal Control Pagina 3
Description of the trajectories when 1=u
From system (1), it results:
( )
( ) ( )2211
22
2
1)(
)(
iiii
ii
ttttxxtx
xtttx
−−+=
+−=
( ) ii xtxtt 22 )( −=−
22
22
2222
22222
2
2222211
)(2
1
)()(2
1
2
1)(
2
1)(
)(2
1)()(
i
ii
iii
iiii
xtx
xtxxtx
xtxxxtx
xtxxtxxxtx
−=
+−=
−+−=
−−=−
Prof.Daniela Iacoviello- Optimal Control Pagina 4
The optimal trajectory is described by parabolic arcs with equation:
22
2211 )(
2
1)( ii xtxxtx −=−
x1
x2 u=+1u=-1
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 5
Given the initial point xi the problem is to bring that point to the
origin along a trajectory constituted by parabolic arcs
with 1 or 0 switching points
-100 -80 -60 -40 -20 0 20 40 60 80 100-10
-8
-6
-4
-2
0
2
4
6
8
10
x1
x2
-
+
+
-
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 6
Let’s define:
==+ 0,2
1: 2
221
2 xxxRx
−==− 0,2
1: 2
221
2 xxxRx
−=== −+ 0,2
1: 2221
2 xxxxRx
−=+221
2
2
1: xxxRx
−=−221
2
2
1: xxxRx
0\2R= −+−+
xi belongs to one
of these regions
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 7
Let’s define:
==+ 0,2
1: 2
221
2 xxxRx
−==− 0,2
1: 2
221
2 xxxRx
−=== −+ 0,2
1: 2221
2 xxxxRx
−=+221
2
2
1: xxxRx
−=−221
2
2
1: xxxRx
0\2R= −+−+
xi belongs to one
of these regions
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 8
Given the initial point xi the problem is to bring that point to the
origin along a trajectory constituted by parabolic arcs
with 1 or 0 switching points
-100 -80 -60 -40 -20 0 20 40 60 80 100-10
-8
-6
-4
-2
0
2
4
6
8
10
x1
x2
-
+
+
-
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 9
Let’s define:
==+ 0,2
1: 2
221
2 xxxRx
−==− 0,2
1: 2
221
2 xxxRx
−=== −+ 0,2
1: 2221
2 xxxxRx
−=+221
2
2
1: xxxRx
−=−221
2
2
1: xxxRx
0\2R= −+−+
xi belongs to one
of these regions
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 10
Given the initial point xi the problem is to bring that point to the
origin along a trajectory constituted by parabolic arcs
with 1 or 0 switching points
-100 -80 -60 -40 -20 0 20 40 60 80 100-10
-8
-6
-4
-2
0
2
4
6
8
10
x1
x2
-
+
+
-
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 11
Four cases:
== + 0,2
1: 2
221
2 xxxRxxi 1)
with a control u=1 and without
switching you reach the origin
0 10 20 30 40 50 60 70 80 90 100-10
-5
0
5
x1
x 2
+
xi
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 12
-100 -80 -60 -40 -20 0 20 40 60 80 100-10
-8
-6
-4
-2
0
2
4
6
8
10
x1
x2
-
+
+
-
−== − 0,2
1: 2
221
2 xxxRxxi 2)
with a control u= -1 and
without switching you
reach the origin
-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0-5
0
5
10
x1
x 2
-
xi
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 13
-100 -80 -60 -40 -20 0 20 40 60 80 100-10
-8
-6
-4
-2
0
2
4
6
8
10
x1
x2
-
+
+
-
3)
First use a control with u= +1
and you get curve γ-
then you switch to control u=- 1
and you get to the origin
−= +221
2
2
1: xxxRxxi
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 14
-100 -80 -60 -40 -20 0 20 40 60 80 100-10
-8
-6
-4
-2
0
2
4
6
8
10
x1
x2
-
+
+
-
3)
First use a control with u= +1
and you get curve γ-
then you switch to control u=- 1
and you get to the origin
−= +221
2
2
1: xxxRxxi
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 15
-100 -80 -60 -40 -20 0 20 40 60 80 100-10
-8
-6
-4
-2
0
2
4
6
8
10
x1
x2
-
+
+
-
3)
First use a control with u= +1
and you get curve γ-
then you switch to control u=- 1
and you get to the origin
−= +221
2
2
1: xxxRxxi
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 16
-100 -80 -60 -40 -20 0 20 40 60 80 100-10
-8
-6
-4
-2
0
2
4
6
8
10
x1
x2
-
+
+
-
3)
First use a control with u= +1
and you get curve γ-
then you switch to control u=- 1
and you get to the origin
−= +221
2
2
1: xxxRxxi
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 17
-100 -80 -60 -40 -20 0 20 40 60 80 100-10
-8
-6
-4
-2
0
2
4
6
8
10
x1
x2
-
+
+
-
Prof.Daniela Iacoviello- Optimal Control
4)
First use a control with u= -1
and you get curve γ+
then you switch to control u=+ 1
and you get to the origin
−= −221
2
2
1: xxxRxxi
Prof.Daniela Iacoviello- Optimal Control Pagina 18
-100 -80 -60 -40 -20 0 20 40 60 80 100-10
-8
-6
-4
-2
0
2
4
6
8
10
x1
x2
-
+
+
-
Prof.Daniela Iacoviello- Optimal Control
4)
First use a control with u= -1
and you get curve γ+
then you switch to control u=+ 1
and you get to the origin
−= −221
2
2
1: xxxRxxi
Prof.Daniela Iacoviello- Optimal Control Pagina 19
-100 -80 -60 -40 -20 0 20 40 60 80 100-10
-8
-6
-4
-2
0
2
4
6
8
10
x1
x2
-
+
+
-
Prof.Daniela Iacoviello- Optimal Control
4)
First use a control with u= -1
and you get curve γ+
then you switch to control u=+ 1
and you get to the origin
−= −221
2
2
1: xxxRxxi
Prof.Daniela Iacoviello- Optimal Control Pagina 20
-100 -80 -60 -40 -20 0 20 40 60 80 100-10
-8
-6
-4
-2
0
2
4
6
8
10
x1
x2
-
+
+
-
Prof.Daniela Iacoviello- Optimal Control
4)
First use a control with u= -1
and you get curve γ+
then you switch to control u=+ 1
and you get to the origin
−= −221
2
2
1: xxxRxxi
Prof.Daniela Iacoviello- Optimal Control Pagina 21
-100 -80 -60 -40 -20 0 20 40 60 80 100-10
-8
-6
-4
-2
0
2
4
6
8
10
x1
x2
-
+
+
-
( )
−
=
−−
++
)(1
)(1)(
txf
txiftxu
o
ooo
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 22
Calculus of the minimum time:
it depends on the location of the initial point xi
( )
−
=
−−
++
)(1
)(1)(
txf
txiftxu
o
ooo
A)+− = ix
The control doesn’t switch; from ( ) ii xtxtt 22 )( −=−
( ) iiii
of xxxtt 2220 ==−=−
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 23
B) +ix The control switches at an instant at the position t
( ) ( )ifif tttttt −+−=−
Time with
u=-1
Time with
u=+1
Time with
u=-1
Time with
u=+1
( ) ii xtxtt 22 )( −=−
From
iof xtt 2=−
ix2
iii xxtt 22 −=−
iii
of xxtt 222 −=−
16/11/2018 Pagina 24
B) +ix The control switches at an instant at the position t
( ) ( )ifif tttttt −+−=−
Time with
u=-1
Time with
u=+1
Time with
u=-1
Time with
u=+1
( ) ii xtxtt 22 )( −=−
From
iof xtt 2=−
ix2
iii xxtt 22 −=−
iii
of xxtt 222 −=−
16/11/2018 Pagina 25
The position must belong to the two parabolic arcs
Time with
u=-1
Time with
u=+1
ix2
22
2211 )(
2
1)( ii xtxxtx −=−
22
2211
2
1
2
1 ii xxxx −+=
221
2
1xx −=
22
22
221
2
1
2
1
2
1 ii xxxx +−=+
0,2
12
221
22 +−= xxxx ii
2212
2
1 ii xxx +−=
iii
of xxtt 222 −=−
By substituting in
iiii
of xxxtt 2
221 24 −+−=−Prof.Daniela Iacoviello- Optimal Control
C) −ix The same calculations yield:
iiii
of xxxtt 2
221 24 ++=−
The commutation curve is the γ-curve
2212
1)( xxxx +=
+−=−= 2212
1)()( xxxsignxsigntuo
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 27
Harmonic oscillator (from Bruni et al.1993)
0)()()(
)()(
12
21
+−=
=
tutxtx
txtx
−=
0
0
A
=
1
0b
jEigenvalues:
When u=0
0)()(
0)()(
22
2
12
1
=+
=+
txtx
txtx
The natural modes are oscillatory
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 28
Problem
1)(
0)()(
==
tu
txxtx fiiDetermine a control such that
That minimizes the cost index:
( ) singularnot01
0
=
Abb
There exists a unique, non singular solution
and the control is bang-bang for any initial condition
iff tttJ −=)(
Eigenvalues of A: j
( )of
oo tux ,,
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 29
)()()()()()(1 21221 tuttxttxtH +−+=
BUTSince the eigenvalues are complex we can’t apply the theorem about
the maximum number of commutation points
Alternative procedure:
Necessary conditions:
Introduce the Hamiltonian:
)()( tAt oTo −=
1)(:
,)()()()()()(1
)()()()()()(1
2122
2122
1
1
+−+
+−+
t
tttxttxt
tuttxttxt
ooooo
oooooo
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 30
)()(
)()(
1
1
2
2
tt
tt
oo
oo
−=
=
1)(:,)()()()(22
ttttut ooo
( )
+−−=
−=−=
)(sin
)()()(2
i
ooo
ttKsign
tsignbtsigntu
( ) +−=−= )(sin)()()( 22
2 2 iooo ttKttt
All the switching subintervals have length equal to
with the exception of the first and the last whose length is less or
equal than
16/11/2018 Pagina 31
)()( tAt oTo −=
1)(:
,)()()()()()(1
)()()()()()(1
2122
2122
1
1
+−+
+−+
t
tttxttxt
tuttxttxt
ooooo
oooooo
)()(
)()(
1
1
2
2
tt
tt
oo
oo
−=
=
1)(:,)()()()(22
ttttut ooo
( )
+−−=
−=−=
)(sin
)()()(2
i
ooo
ttKsign
tsignbtsigntu
( ) +−=−= )(sin)()()( 22
2 2 iooo ttKttt
All the switching subintervals have length equal to
with the exception of the first and the last whose length is less or
equal than
16/11/2018 Pagina 32
)()( tAt oTo −=
1)(:
,)()()()()()(1
)()()()()()(1
2122
2122
1
1
+−+
+−+
t
tttxttxt
tuttxttxt
ooooo
oooooo
All the switching subintervals have length equal to
With the exception of the first and the last
whose length is less or equal than
Figura 1 (Bruni et al.1993)Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 33
All the switching subintervals have length equal to
With the exception of the first and the last
whose length is less or equal than
Figura 1 (Bruni et al.1993)Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 34
All the switching subintervals have length equal to
With the exception of the first and the last
whose length is less or equal than
Prof.Daniela Iacoviello- Optimal ControlFigura 1 (Bruni et al.1993)
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 35
All the switching subintervals have length equal to
With the exception of the first and the last
whose length is less or equal than
Prof.Daniela Iacoviello- Optimal ControlFigura 1 (Bruni et al.1993)
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 36
All the switching subintervals have length equal to
With the exception of the first and the last
whose length is less or equal than
Figura 1 (Bruni et al.1993)Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 37
All the switching subintervals have length equal to
With the exception of the first and the last
whose length is less or equal than
Figura 1 (Bruni et al.1993)Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 38
All the switching subintervals have length equal to
With the exception of the first and the last
whose length is less or equal than
Let’s assume
And integrate the system:
1)( =tu
0)()()(
)()(
12
21
+−=
=
tutxtx
txtx
1)(sin)(cos
1)( 211 −+−
= i
ii
i ttxttxtx
)(cos)(sin1
)( 212 ii
ii ttxttxtx −+−
=
( )22
2
12
2
1
1)(
1)(
2
ii xxtxtx +
=+
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 39
Figura 2. (Bruni et al.1993)
( )22
2
12
2
1
1)(
1)(
2
ii xxtxtx +
=+
The trajectories with control are circumferences with center
passing through the initial condition
The direction is clockwise.
1)( =tu
0,
1
ix
16/11/2018 Pagina 40
16/11/2018Prof.Daniela Iacoviello- Optimal Control Pagina 41
From Bruni et al. 2003
Only one trajectory for each of these families passes through the origin
1)(
1)( 2
2
1 2=+
txtx
Figura 3. (Bruni et al.1993)Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 42
For a generic instant t:
= −
1
)(
)()(
1
1 2
tx
txtgt
2
1
1212
2
1
21
)(
)()(1
)()(
1)(
)(1
1)(
2
−
+
=
tx
txtxtxtx
tx
txt
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 43
For a generic instant t:
= −
1
)(
)()(
1
1 2
tx
txtgt
2
1
1212
2
1
21
)(
)()(1
)()(
1)(
)(1
1)(
2
−
+
=
tx
txtxtxtx
tx
txt
−== )(t
0
)()()(
)()(
12
21
+−=
=
tutxtx
txtx
The trajectories are traversed
with constant angular velocity
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 44
The trajectories are traversed with constant angular velocity
=t
1)( =tu
The trajectories are traversed with constant angular velocity
We must reach the origin along arcs with amplitude
There exists a unique way to do it!
16/11/2018
Definitions:
,....2,1,0,0,112
: 22
22
2
12 =
=+
+−=+ kxx
kxRxk
,...2,1,0,0,112
: 22
22
2
12 =
=+
++=− kxx
kxRxk
Figura 4. (from Bruni et al. 1993):
+k
−k
+k
−k
16/11/2018 Pagina 46
Let and , k=1,2,…., be the sets in Figure,
obtained rotating
and around
,
respectively
Define:
+k−k
=
++ =0k
k
=
−− =0k
k
=
++ =0k
k
=
−− =0k
k
−+ = Figura 5. (from Bruni et al. 1993)
16/11/2018 Pagina 47
+k
−k
0,
1
The initial states and may be moved to the origin with a
constant control equal to +1 and -1 respectively and the corresponding arc
is less or equal than π.
The points belonging to are the only ones that can be transfered to the
origin with a constant control, without switching
+ 0ix − 0ix
−+ 00
1a 1b
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 48
Figure from Bruni et al. 1993
Let’s consider initial states
They may be moved to the origin with the following path:
- First a constant control +1 up to the arc for an interval time
- Switching to control -1 to reach the origin.
1 switching instant
( )−++ 001 \ ix
−0
2a
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 49
Let’s consider initial states
They may be moved to the origin with the following path:
- First a constant control +1 up to the arc for an interval time
- Switching to control -1 to reach the origin.
1 switching instant
( )−++ 001 \ ix
−0
2a
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 50
1
Let’s consider initial states
They may be moved to the origin with the following path:
- First a constant control +1 up to the arc for an interval time
- Switching to control -1 to reach the origin.
1 switching instant
( )−++ 001 \ ix
−0
2a
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 51
1
2
Let’s consider initial states
They may be moved to the origin with the following path:
- First a constant control -1 up to the arc for an interval time
- Switching to control +1 to reach the origin.
1 switching instant
+0
( )−+− 001 \ ix 2b
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 52
Let’s consider initial states
They may be moved to the origin with the following path:
- First a constant control -1 up to the arc for an interval time
- Switching to control +1 to reach the origin.
1 switching instant
+0
( )−+− 001 \ ix 2b
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 53
1
Let’s consider initial states
They may be moved to the origin with the following path:
- First a constant control -1 up to the arc for an interval time
- Switching to control +1 to reach the origin.
1 switching instant
+0
( )−+− 001 \ ix 2b
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 54
1
2
Let’s consider initial states
They may be moved to the origin with the following path:
- First a constant control +1 up to the arc for an interval time
- Note that: apply strategy 2b
- Switch to control -1 to reach and then switch to control +1 to reach the
origin two switching instants
−+ 12 \ ix
−1
Let’s consider initial states
They may be moved to the origin with the following path:
- First a constant control -1 up to the arc for an interval time
- Note that apply strategy 2a
- Switch to control +1 to reach and then switch to control -1 to reach the
origin: two switching instants
+
1
+− 12 \ ix
−− 11
+0
3a
3b
++ 11
−0
Figura 8. (from Bruni et al. 1993)Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 56
3
1
2
Figura 8. (from Bruni et al. 1993)Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 57
1
2
Figura 6. (from Bruni et al. 1993)Prof.Daniela Iacoviello- Optimal Control 16/11/2018
Figura 7. (from Bruni et al. 1993)Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 59
The same happens for any intial condition: −−
+ 1\ kkix +−
− 1\ kkix
−+ \ixAt the generic state you must associate u=+1
At the generic state you must associate u=-1 +− \ix
( )
−
=
+−
−+
\)(1
\)(1)(
tx
txtxu
o
ooo
The number of switching points is given by the minimum index k among the ones
characterizing the sets and
Example: Consider the point
Then there is only one switching instant.
−k+k
+++ 321P
Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 60
\ix + −
Time necessary to get to the origin
If is the number of switching instants:
( )
foii
of
o ttif +−+=− 11
If
where:
if
if
−= −
i
i
ix
xtg
1
21
1
o
Rotation of the optimal trajectory
to go from the initial point to the
first point of commutation
Rotation of the optimal trajectory
to go from the final point to the
origin
0=o
ii
of tt =−
+= −
i
i
ix
xtg
1
21
1
+ oix
− oix Pagina 61
Figura 9. (from Bruni et al. 1993)Prof.Daniela Iacoviello- Optimal Control 16/11/2018 Pagina 62