Notas Control Óptimo 3
Notas Control Óptimo 3
Tarea 3a
1 Formulción del problema
1.1 Control plant
Sea el modelo
ẋt = f(t, xt , ut )
(1)
x0 es dado,t ∈ [0, T ] , T es el horizonte, puede ser finito o infinito
donde
xt = (x1,t , ..., xn,t )⊤ ∈ Rn ,
ut = (u1,t , ..., ur,t )⊤ ∈ U ⊆ Rr ,
1
• El funcional de Lagrange si h0 (xT ) = 0, es decir, que solo tiene parte
integral,
• El funcional de Mayer si h(t, xt , ut ) = 0,es decir, que solo tiene estado
terminal.
y el par (x∗ (·), u∗ (·)) , donde x∗ (·) es la solución de (1). Si ut = u∗t ,es
llamado un par optimal.
2
Lemma 1 Cualquier problema de control óptimo en forma de Bolza puede ser
representado como un problema de control óptimo en forma de Mayer. Las 3
formulaciones anteriores son equivalente.
Proof. Se define un nuevo estado auxiliar (último componente en tiempo t)
t
xn+1,t := h(τ , xτ , uτ )dτ
τ =0
donde
xt = (x1,t , ..., xn+1,t )⊤ ∈ Rn+1 ,
ut = (u1,t , ..., ur,t )⊤ ∈ U ⊆ Rr .
Entonces, la funcional original de Bolza se puede representar como
T
J (u(·)) = h0 (xT ) + h(t, xt , ut )dt = h0 (xT ) + xn+1,T := h0 (xT )
0
xn+1,T
3
donde ψ es un multiplicado dinámico de Lagrange.
2. Transversality condition (condiciones terminales para ψT ): Siempre
se presenta en fronteras variantes.
L
∂
ψT = − h0 (x∗T ) − ν l gl (x∗T )
∂x
l=1
Proof. Sea u∗t un control optimal (función fija), se calculan las derivadas re-
specto al tiempo.
d ∂ ∂ ⊤ ∂ ⊤
H(ψt , xt , u∗t , t) = H(ψt , xt , u∗t , t) + H (ψt , xt , u∗t , t) ẋt + H (ψt , xt , u∗t , t) ψ̇t =
dt ∂t ∂x ∂ψ
0 ∂ ∂
H − H
∂ψ ∂x
∂ ⊤ ∂ ∂ T ∂
H H− H H = 0.
∂x ∂ψ ∂x ∂ψ
4
2.2 Horizonte no fijo y propiedad cero (Nonfixed horizon
and zero property)
Condificiones donde no se conoce exatamente el tiempo fijado. Sea la funcional,
que depende del tiempo final
5
Theorem 4 Si la tercia (x∗ (·), u∗ (·), α∗ ) es optimal, entonces se cumplen las
4 condiciones estandar obligatoriamente y además se cumple la siguiente
5a condición extremal
T ∂
t=0 H(ψt , xt , u∗t , t; α)dt = 0
∂α
(k)
1. • se obtiene xT.
6
• A partir de la condición de tranversalidad, se define en fin de proceso
L
(k) ∂ (k) (k)
ψT = − h0 (xT ) − ν l gl (xT ) (3)
∂x
l=1
7
Suponemos que el precio del trigo qt se conoce para todo el período
comercial 0 ≤ t ≤ T (aunque esto probablemente sea poco realista en la práctica).
Suponemos también que la tasa de compra y venta está restringida:
|αt | ≤ M,
ẋ1,t = −λx2,t − qt αt
ẋ2,t = αt
H(ψt , xt , αt , t) := ψ⊤
t f (t, xt , αt ) − h (t, xt , αt )
0
T
ψ1,t −λx2,t − qt αt (5)
= −0
ψ2,t αt
= ψ1,t (−λx2,t − qt αt ) + ψ2,t αt
8
1. Condición de Maximalidad:
u∗t = α∗t = arg max H(ψ, x∗ , α, t) =
α:|α|≤M
arg max ψ1,t −λx2,t − qt αt + ψ2,t αt =
α:|α|≤M
0, no dep de αt
arg max αt ψ2,t − ψ 1,t qt ,
α:|α|≤M
lo que implica
M si ψ2,t − ψ1,t qt > 0
α∗t = −M si ψ2,t − ψ1,t qt < 0 := M sign ψ 2,t − ψ1,t qt (7)
0 si ψ2,t − ψ1,t qt = 0
por lo tanto
α∗t = Msign ψ2,t − ψ1,t qt
2. Condición de Transversalidad:
L
∂
ψ T = − h0 (x∗T ) − ν l gl (x∗T )
∂x
l=1
(8)
0
−(x1,T + qT x2,T ) := h0 (xT )
ψ1,T = 1, ψ2,T = qT
por lo tanto
α∗t = M sign ψ2,t − ψ1,t qt =
(9)
1
Msign [λ (t − T ) + qT − qt ]
9
equivalentemente
T =1
Hint (ayuda):
ẋ1,t = x2,t
ẋ2,t = ut
09/03/2022*************
10
Theorem 6 (Condición Suficiente de BP). Se separa el intervalo [0, T ] en
dos partes
[0, T ] = [0, t′ )∪[t′ , T ]
[0, t′ ) para incio de proceso
[t′ , T ] para fin de proceso
Se definen también dos acciones de control:
donde u1 (t) y u2 (t) son llamados estrategias de control inicial y final, re-
spectivamente.
Si
Proof. Sea
J∗ = inf J(u(·)) = inf inf J1 (u1 (·), J2 (u2 (·))
u(·)∈ Uadm u1 (·)∈ Uadm u2 (·)∈ Uadm (11)
≤ J1 (u1 (·), J2 (u2 (·)))
11
empleando la propiedad de monótonamente decreciente con respecto al
segundo argumento se obtiene
J∗ = inf inf J1 (u1 (·), J2 (u2 (·))) = inf J1 u1 (·), inf J2 (u2 (·))
u1 (·)∈ Uadm u2 (·)∈ Uadm u1 (·)∈ Uadm u2 (·)∈ Uadm
Remark 1 La funcional
T
12
⊤
donde s representa un tiempo intermedio, xt = (x1,t , ..., xn,t ) ∈ Rn , ut =
(u1,t , ..., un,t )⊤ ∈ U ⊆ Rr . Ahora defina
T
13
iente ecuación diferencial parcial (PDE) (sin condición terminal: M = Rn ).
∂ ∂
− V (t, x) + sup H − V (t, x), x, u, t = 0
∂t u∈U ∂x
(12)
V (T, x) = h0 (x),
H(ψ, x, u, t) = ψ⊤ f (t, x, u) − h(t, xt , ut )
∂ ∂
u∗t = arg sup H − V (t, x), x, u, t = u∗t t, x, V (t, x) (13)
u∈U ∂x ∂x
∂ ∂ ∂
− V (t, x) + H − V (t, x), x, u∗t t, x, V (t, x) =0
∂t ∂x ∂x (14)
V (T, x) = h0 (x)
como V (t, x). es la solución. Entonces se garantiza que el control u∗t en (13)
es optimal.
Prueba pag. 725 (en libro). Para aplicar esté metodo es necesario que
V (t, x) exista y sea suficientemente suave.
y la funcional de costo
14
1. Sea la ecuación de HJB
∂ ∂
−
V (x) + sup H(− V (x), x, u) = 0 ⇔
∂t u∈U ∂x
0
' (
⊤
∂
maxH(ψ, x, u) = maxr − V (x) [f0 (xt ) + f1 (xt )u] − x⊤ Qx + u⊤ Ru
u∈Rr u∈R ∂x
) *
⊤
∗ ∂ ⊤
ut = arg max − V (x) f1 (xt )u − u Ru ⇒
u∈Rr ∂x
) *
⊤
∂ ∂ ∂
− f1 (xt ) V (x) u − u⊤ Ru = −f1 (xt ) V (x) − 2Ru = 0
∂u ∂x ∂x
1 ∂
u∗t = − R−1 f1 (xt ) V (x)
2 ∂x
∂ ∂
0 = sup H − V (x), x, u ⇒ H − V (x), x, u∗ = 0
u∈U ∂x ∂x
sustituyendo u∗
⊤
∂ 1 ∂
− V (x) f0 (xt ) − f1 (xt )R−1 f1 (xt ) V (x) − x⊤ Qx−
∂x 2 ∂x
⊤
1 ∂ ∂
f1 (xt ) V (x) R−1 f1 (xt ) V (x) ⇒
4 ∂x ∂x
⊤ ⊤
1 ∂ ∂ ∂
f1 (xt ) V (x) R−1 f1 (xt ) V (x) − V (x) f0 (xt ) − x⊤ Qx
4 ∂x ∂x ∂x
⊤ ⊤
1 ∂ ∂ ∂
f1 (xt ) V (x) R−1 f1 (xt ) V (x) − V (x) f0 (xt ) − x⊤ Qx = 0
4 ∂x ∂x ∂x
(16)
Esta nueva ecuación que no depende de u, es una ecuación cuadrática
∂
con respecto a V (t, x) que se denominada ec. de Hamilton Jacobi
∂x
∂
(HJ). Tal que, V (x) es la solución de la ec. de HJ, para el control
∂x
1 ∂
u∗t = − R−1 f1 (xt ) V (x) (17)
2 ∂x
∂
3. Se aplica regla de verificación, tal que V (x) es solución de HJ=0. De-
∂x
bido a que se tiene una ec. cuadrática, se debe elegir la solución que haga
al sistema estable.
14/03/2022***********
15
⊤ ⊤
1 ∂ ∂ ∂
Sea la ecuación de HJ f1 (xt ) V (x) R−1 f1 (xt ) V (x) − V (x) f0 (xt ) − x⊤ Qx = 0
4 ∂x ∂x ∂x
(16), la cual puede ser reescrita a partir de normas, como
+ +2
∂ 1 + −1 ⊺ ∂
+
− V (x)⊺ f0 (x) − x 2Q + + +R f1 (x) V (x)+ =0
+ (18)
∂x 4 ∂x R
donde, los subíndices Q y R indican que esas matrices existen entre dos vec-
2
tores, por ejemplo, x Q = x⊤ Qx. Supongamos también, por simplicidad, que
tratamos con la subclase especial de los sistemas afines, para los cuales la matriz
f1 (x)R−1 f1 (x)⊺ es invertible para cualquier x ∈ Rn , es decir,
la cual es, por (19), es estrictamente positivo y, por lo tanto,Rf−1 (x) existe.
Entonces la ecuación (18) puede ser reescrita como
+ +2
∂ 1 + −1 ⊺ ∂
+
− V (x)⊺ f0 (x) − x 2Q + + +R f1 (x) V (x)+ =0
+
∂x 4 ∂x R
que es equivalente a
+ +2 ++ 1/2 ∂
+2
+
2 + −1/2 + + −1/2
x Q + +Rf (x) f0 (x)+ = +Rf (x) V (x) − 2Rf (x) f0 (x)+
+
∂x
escalar escalar variable
(21)
Proof. A continuación se demuestra la equivalencia anterior.
+ + + +2
2+ −1/2 + + 1/2 ∂ −1/2 +
x + +Rf
Q (x) f0 (x)+ = +R
+ f (x) V (x) − 2R f (x) f0 (x)+
+
+ + ∂x
+ +2 1 + ∂ +2
∂ +
+ −1/2 + 1/2 1/2 −1/2 + −1/2
x 2Q + +Rf (x) f0 (x)+ = + + Rf (x) V (x)+
+ − Rf (x) V (x) Rf (x) f0 (x) + +Rf (x) f
4 ∂x ∂x
+ +2 + +2 1 + + 1/2 ∂
+2
+ ∂
+ −1/2 + + −1/2 + 1/2 −1/2
x 2Q + +Rf (x) f0 (x)+ − +Rf (x) f0 (x)+ = + +Rf (x) V (x)+
+ − Rf (x) V (x) Rf (x) f
4 ∂x ∂x
0 + +2
1+ +
+R1/2 (x) ∂ V (x)+ − ∂ V (x)⊺ f0 (x) − x 2
0= + f + Q
4 ∂x ∂x
1/2
sustituyendo Rf (x) := f1 (x)R−1 f1 (x)⊺
+ +2
1++ −1 ⊺ ∂
+ ∂ ⊺ 2
0 = +R f1 (x) V (x)+
+ − ∂x V (x) f0 (x) − x Q
4 ∂x
16
Note que (21) nos permite agrupar términos constantes por la izquierda y la
variable desconocida por la derecha, que implica la siguiente representación:
1 1/2 ∂ −1/2
Rf (x) V (x) − Rf (x) f0 (x) = ē (x) r (x)
2 ∂x
escalar
, donde
+ +2
2 + −1/2 +
r (x) := x Q + +Rf (x) f0 (x)+
ē (x) un vector unitario ( ē (x) = 1)
Note que existen muchas soluciones para el vector unitario ē (x) .Despejando
∂
V (x) de la ec. anterior, se obtiene
∂x
1 ∂ −1/2
V (x) = R−1
f (x) f0 (x) + Rf (x) ē (x) r (x)
2 ∂x
−1 −1/2
= f1 (x)R−1 f1 (x)⊺ f0 (x) + Rf (x) ē (x) r (x)
1 ∂
u∗ (x) = −R−1 f1 (x)⊺ V (x) =
2 ∂x
−1
r (x) f1 (x)R−1 f1 (x)⊺ ē (x)
Existen muchas manera para seleccionar ē (x). Sustituyendo (22) dentro de (??)
conduce a la expresión final para la trayectoria óptima:
17
se obtiene
r (x)
Ẇ (x (t)) = − √ x⊺ (t) SIGN(x (t)) =
n
n
r (x) - r (x) .
−√ |xi (t)| ≤ − √ 2W (x (t)) < 0
n i=1 n
para x (t) = 0. Si, aditionalmente, r (x) ≥ c > 0, esto implica
,
2 .
Ẇ (x (t)) ≤ − c W (x (t))
n
, ,
dW (x (t)) 2 . . 2
. ≤− c dt ⇔ 2 W (x (t)) − W (x (0)) ≤ − ct
W (x (t)) n n
. . c
0≤ W (x (t)) ≤ W (x (0)) − √ t
2n
y, como resultado, W (x (t)) → 0 en tiempo finito
.
treach = 2nW (x (0))/c,
−1
u∗ (x) = −R−1 f1 (x)⊺ f1 (x)R−1 f1 (x)⊺ [f0 (x) + r (x) SIGN(x)] (23)
18
3.3.3 Time-Average Cost Stationary Optimal Control
Sea el sistema
1 T
J(u(·)) = lim sup h (xt , ut ) dt → inf
T →∞ T t=0 u(·)∈Uadm
Theorem 11 Si el control
∂
u∗t = u∗t x, V (x)
∂x
∂
H − V (xt ) , xt , u∗t = 0,
∂x
∂ ∂
H − V (x∗t ) , x∗t , u∗t =0≥H − V (xt ) , xt , ut
∂x ∂x
1 T ∂ 1 T ∂
− V ⊺ (x∗t ) f (x∗t , u∗t ) − h (x∗t , u∗t ) dt ≥ − V ⊺ (xt ) f (xt , ut ) − h (xt , ut ) dt
T t=0 ∂x T t=0 ∂x
1 T 1 T 1 T ∂ ⊺ ∂ ⊺ ∗
h (x∗t , u∗t ) dt ≤ h (xt , ut ) dt + V (xt ) f (xt , ut ) − V (xt ) f (x∗t , u∗t ) dt =
T t=0 T t=0 T t=0 ∂x ∂x
d(V (xt ))=V ⊺ (xt )·ẋ d(V (x∗ ∗
t ))=V (xt )·ẋ
⊺ ∗
1 T 1 T
h (xt , ut ) dt + d (V (xt ) − V ∗ (xt )) =
T t=0 T t=0
1 T 1
h (xt , ut ) dt + ([V (xT ) − V (x∗T )] − [V (x0 ) − V (x∗0 )])
T t=0 T
V (xT ) − V (x∗T ) están acotados, ⇔ sistema BIBO estable
19
Por lo tanto, tenemos la menor pérdida promedio
T T
1 1
lim sup h (x∗t , u∗t ) dt ≤ lim sup h (xt , ut ) dt.
T →∞ T T
t=0 t=0
T →∞ T →∞
1 T
f (t) → f ∗ ⇒ lim f (t) dt = f ∗ (24)
t→∞ T →∞ T t=0
dWt 2
≤ − dt
√ √ 1 t
Wt Wt − √ ε
2
20
Aplicando fracciones parciales
1 a b
=√ + =
√ √ 1 Wt √ 1
Wt Wt − √ ε Wt − √ ε
2 2
√ 1 √ √ a
a Wt − √ ε + b Wt (a + b) Wt − √ ε
2 2
=
√ √ 1 √ √ 1
Wt Wt − √ ε Wt Wt − √ ε
2 2
√ √
a 2 2
a + b = 0, − √ ε = 1 ⇐⇒ a = − , b=
2 ε ε
√ 1
y := x − c, dy = √ dx
2 x
se tiene
√
2
1 1 2
−√ dWt ≤ − dt
ε √ 1 Wt t
Wt − √ ε
2
t t
dWτ dW ε t
+ √ τ ≤ − √ ln
√ 1 Wτ 2 t0 (ε)
t=t0 (ε) Wτ − √ ε t=t0 (ε)
2
1 √
t− √ ε
√ . 1 2 √ . ε t
2 t − t0 (ε) + √ ε ln . + 2 Wt − Wt0 (ε) ≤ − √ ln
2 1 2 t0 (ε)
t0 (ε) − √ ε
2
√
1
t − √ ε 2 √ √
√ . t 2 .
2 Wt − Wt0 (ε) ≤ − ln
t0 (ε) .
− 2 t − t0 (ε)
1 ε
t0 (ε) − √ ε
2
21
Tomando en cuanta que para t > t0 (ε)
√
1
t t − √ ε
2
ln
t0 (ε) .
> 0
1
t0 (ε) − √ ε
2
se obtiene
√ .
2 Wt − W t0 (ε) ≤
√ 1
t t − √ ε √ √ .
− ln 2 − 2 2 t − t0 (ε) ≤
t0 (ε) . 1 ε
t0 (ε) − √ ε
2
2√ √ .
− 2 t − t0 (ε)
ε
y √
. 1 2 √ .
Wt ≤ Wt0 (ε) − t − t0 (ε) . (25)
ε
Teniendo en cuenta que t → ∞ podemos concluir que el lado derecho en (25) se
convierte en cero en un tiempo finito, obteniendo (24) teniendo en cuenta que
ε es arbitrariamente pequeña.
∂ ∂
ε∆V (t, x) − V (t, x) + sup H − V (t, x) , x, u, t = 0
∂t u∈U ∂x
V (T, x) = h0 (x) , 0 < ε → 0 (26)
n
- ∂2
∆V (t, x) := V (t, x) - Operatodor de Laplace.
i=1 ∂xi ∂xi
22
Definition 6 Define la solución de(26) como Vε t, x∗ε,t . Si satisface el límite
L2
l.i.m.Vε (t, x∗ε ) = Ṽ (t, x∗t )
ε→0
∞ 2 32
l.i.m.Vε (t, x∗ε ) =: lim Vε t, x∗ε,t − Ṽ (t, x∗t ) dt = 0,
ε→0 ε→0 t=0
23