无约束条件的最优控制问题
设函数 x ( t ) x(t) x(t) 在 [ t 0 , t f ] [t_0, t_f] [t0,tf] 区间上连续可到,考虑 Lagrange型性能指标函数 J [ x ( t ) ] = ∫ t 0 t f L [ x ( t ) , x ˙ ( t ) , t ] d t J[x(t)]=\displaystyle\int_{t_0}^{t_f}L[x(t), \dot{x}(t), t]dt J[x(t)]=∫t0tfL[x(t),x˙(t),t]dt
性能指标变分
设宗量函数
x
(
t
)
x(t)
x(t),
x
˙
(
t
)
\dot{x}(t)
x˙(t) 在极值曲线
x
∗
(
t
)
x^*(t)
x∗(t),
x
˙
∗
(
t
)
\dot{x}^*(t)
x˙∗(t) 附近发生微小变分
δ
x
(
t
)
\delta x(t)
δx(t),
δ
x
˙
(
t
)
\delta \dot{x}(t)
δx˙(t), 即
x
(
t
)
=
x
∗
(
t
)
+
δ
x
(
t
)
,
(4)
x(t)=x^*(t)+\delta x(t),\tag{4}
x(t)=x∗(t)+δx(t),(4)
x
˙
(
t
)
=
x
˙
∗
(
t
)
+
δ
x
˙
(
t
)
,
(5)
\dot{x}(t)=\dot{x}^*(t)+\delta \dot{x}(t),\tag{5}
x˙(t)=x˙∗(t)+δx˙(t),(5)则泛函
J
[
x
(
t
)
]
J[x(t)]
J[x(t)] 的增量
Δ
J
[
x
(
t
)
]
\Delta J[x(t)]
ΔJ[x(t)] 可表示为
Δ
J
[
x
(
t
)
]
=
∫
t
0
t
f
{
L
[
x
(
t
)
+
δ
x
(
t
)
,
x
˙
(
t
)
+
δ
x
˙
(
t
)
,
t
]
−
L
[
x
(
t
)
,
x
˙
(
t
)
,
t
]
}
d
t
=
∫
t
0
t
f
{
∂
L
∂
x
δ
x
+
∂
L
∂
x
˙
δ
x
˙
+
o
[
(
δ
x
)
2
,
(
δ
x
˙
)
2
]
}
d
t
\begin{aligned} \Delta J[x(t)]&=\displaystyle\int_{t_0}^{t_f}\{L[x(t)+\delta x(t), \dot{x}(t)+\delta \dot{x}(t), t]-L[x(t), \dot{x}(t),t]\}dt\\ &=\displaystyle\int_{t_0}^{t_f}\{\frac{\partial L}{\partial x}\delta x+\frac{\partial L}{\partial \dot{x}}\delta \dot{x}+o[(\delta x)^2, (\delta \dot{x})^2]\}dt \end{aligned}
ΔJ[x(t)]=∫t0tf{L[x(t)+δx(t),x˙(t)+δx˙(t),t]−L[x(t),x˙(t),t]}dt=∫t0tf{∂x∂Lδx+∂x˙∂Lδx˙+o[(δx)2,(δx˙)2]}dt其中
∫
t
0
t
f
∂
L
∂
x
˙
δ
x
˙
d
t
=
∂
L
∂
x
˙
δ
x
∣
t
0
t
f
−
∫
t
0
t
f
d
d
t
(
∂
L
∂
x
˙
)
δ
x
d
t
,
\begin{aligned} \displaystyle\int_{t_0}^{t_f}\frac{\partial L}{\partial \dot{x}}\delta \dot{x}dt=\frac{\partial L}{\partial \dot{x}}\delta x|_{t_0}^{t_f}-\displaystyle\int_{t_0}^{t_f}\frac{d}{dt}(\frac{\partial L}{\partial \dot{x}})\delta xdt \end{aligned},
∫t0tf∂x˙∂Lδx˙dt=∂x˙∂Lδx∣t0tf−∫t0tfdtd(∂x˙∂L)δxdt,所以
δ
J
=
∫
t
0
t
f
(
∂
L
∂
x
−
d
d
t
(
∂
L
∂
x
˙
)
)
δ
x
d
t
+
∂
L
∂
x
˙
δ
x
∣
t
0
t
f
.
(6)
\delta J=\displaystyle\int_{t_0}^{t_f}(\frac{\partial L}{\partial x}-\frac{d}{dt}(\frac{\partial L}{\partial \dot{x}}))\delta xdt+\frac{\partial L}{\partial \dot{x}}\delta x|_{t_0}^{t_f}.\tag{6}
δJ=∫t0tf(∂x∂L−dtd(∂x˙∂L))δxdt+∂x˙∂Lδx∣t0tf.(6)由泛函极值的必要条件可得,若泛函
J
[
x
(
t
)
]
J[x(t)]
J[x(t)] 取得极值,则有
δ
J
=
0
\delta J=0
δJ=0, 根据(6)式,我们分如下两种情况进行分析。
1. 终端状态固定
此时初始状态
x
(
t
0
)
=
x
0
x(t_0)=x_0
x(t0)=x0,
x
(
t
f
)
=
x
f
x(t_f)=x_f
x(tf)=xf。则关于初始条件
x
(
t
0
)
x(t_0)
x(t0),
x
(
t
f
)
x(t_f)
x(tf) 的宗量函数
x
(
t
)
x(t)
x(t) 在初始状态以及终端状态的变分满足
δ
x
(
t
0
)
=
δ
x
(
t
f
)
=
0
\delta x(t_0)=\delta x(t_f)=0
δx(t0)=δx(tf)=0, 所以 (6)式中
∂
L
∂
x
˙
δ
x
∣
t
0
t
f
=
(
∂
L
∂
x
˙
)
t
=
t
f
δ
x
(
t
f
)
−
(
∂
L
∂
x
˙
)
t
=
t
0
δ
x
(
t
0
)
=
0.
(7)
\frac{\partial L}{\partial \dot{x}}\delta x|_{t_0}^{t_f}=(\frac{\partial L}{\partial \dot{x}})_{t=t_f}\delta x(t_f)-(\frac{\partial L}{\partial \dot{x}})_{t=t_0}\delta x(t_0)=0.\tag{7}
∂x˙∂Lδx∣t0tf=(∂x˙∂L)t=tfδx(tf)−(∂x˙∂L)t=t0δx(t0)=0.(7)所以在此情况下若要
δ
J
=
0
\delta J=0
δJ=0,则有
∂
L
∂
x
−
d
d
t
(
∂
L
∂
x
˙
)
=
0
,
(8)
\frac{\partial L}{\partial x}-\frac{d}{dt}(\frac{\partial L}{\partial \dot{x}})=0,\tag{8}
∂x∂L−dtd(∂x˙∂L)=0,(8)上式公式 (8) 称为欧拉-拉格朗日方程。
2. 终端状态不固定
此时初始条件与终端条件可发生变化,则关于初始条件
x
(
t
0
)
x(t_0)
x(t0),
x
(
t
f
)
x(t_f)
x(tf) 的宗量函数
x
(
t
)
x(t)
x(t) 在初始状态以及终端状态的变分不再满足
δ
x
(
t
0
)
=
δ
x
(
t
f
)
=
0
\delta x(t_0)=\delta x(t_f)=0
δx(t0)=δx(tf)=0, 即
δ
x
(
t
0
)
≠
0
,
δ
x
(
t
f
)
≠
0.
\delta x(t_0)\neq0, \delta x(t_f)\neq0.
δx(t0)=0,δx(tf)=0. 此时若要求公式 (6) 等于0,则需要求
(
∂
L
∂
x
˙
)
t
=
t
f
δ
x
(
t
f
)
=
0
,
(9)
(\frac{\partial L}{\partial \dot{x}})_{t=t_f}\delta x(t_f)=0,\tag{9}
(∂x˙∂L)t=tfδx(tf)=0,(9)
(
∂
L
∂
x
˙
)
t
=
t
0
δ
x
(
t
0
)
=
0
,
(10)
(\frac{\partial L}{\partial \dot{x}})_{t=t_0}\delta x(t_0)=0,\tag{10}
(∂x˙∂L)t=t0δx(t0)=0,(10)由
δ
x
\delta x
δx 的任意性,(9), (10) 等价于
(
∂
L
∂
x
˙
)
t
=
t
f
=
0
,
(11)
(\frac{\partial L}{\partial \dot{x}})_{t=t_f}=0,\tag{11}
(∂x˙∂L)t=tf=0,(11)
(
∂
L
∂
x
˙
)
t
=
t
0
=
0.
(12)
(\frac{\partial L}{\partial \dot{x}})_{t=t_0}=0.\tag{12}
(∂x˙∂L)t=t0=0.(12)公式(11), (12)称为横截条件。
总结:求解无约束条件的泛函极值问题时,若给定了边界条件,则直接应用边界条件,若始端或终端状态的条件未给出,则需要使用始端或终端的横截条件进行求解。求解条件如下表所示:
例题
- 初始与终端状态固定
求通过点 ( 0 , 0 ) (0,0) (0,0), ( 1 , 1 ) (1,1) (1,1) 且使 J = ∫ 0 1 ( x 2 + x ˙ 2 ) d t J=\displaystyle \int_0^1(x^2+\dot{x}^2)dt J=∫01(x2+x˙2)dt取极值的最优轨迹。
解:此处 L ( x ( t ) , x ˙ ( t ) , t ) = x 2 + x ˙ 2 L(x(t), \dot{x}(t), t)=x^2+\dot{x}^2 L(x(t),x˙(t),t)=x2+x˙2, 性能指标函数相应的欧拉-拉格朗日方程为 ∂ L ∂ x − d d t ( ∂ L ∂ x ˙ ) = 0. \frac{\partial L}{\partial x}-\frac{d}{dt}(\frac{\partial L}{\partial \dot{x}})=0. ∂x∂L−dtd(∂x˙∂L)=0.则有 2 x − 2 d d t ( x ˙ ) = 0 , 2x-2\frac{d}{dt}(\dot{x})=0, 2x−2dtd(x˙)=0, 即 x − x ¨ = 0. x-\ddot{x}=0. x−x¨=0. 故求得基解为 e t e^t et, e − t e^{-t} e−t, 则最优轨迹的通解可表示为 x ( t ) = c 1 e t + c 2 e − t , (13) x(t)=c_1e^t+c_2e^{-t},\tag{13} x(t)=c1et+c2e−t,(13) 其中 c 1 c_1 c1 和 c 2 c_2 c2 都为常数。
将初始条件 x ( 0 ) = 0 x(0)=0 x(0)=0 与终端条件 x ( 1 ) = 1 x(1)=1 x(1)=1 代入方程 (13) 可得: c 1 = 1 e − e − 1 , c 2 = 1 e − 1 − e , c_1=\frac{1}{e-e^{-1}},c_2=\frac{1}{e^{-1}-e}, c1=e−e−11,c2=e−1−e1, 故而最优轨迹为 x ( t ) = e t − e − t e − e − 1 . x(t)=\frac{e^t-e^{-t}}{e-e^{-1}}. x(t)=e−e−1et−e−t. - 终端状态不固定
求使得性能指标 J = ∫ 0 1 ( x ˙ 2 + x ˙ 3 ) d t J=\displaystyle \int_0^1(\dot{x}^2+\dot{x}^3)dt J=∫01(x˙2+x˙3)dt 取极值的轨迹 x ∗ ( t ) x^*(t) x∗(t), 并要求 x ∗ ( 0 ) = 0 x^*(0)=0 x∗(0)=0, 但对 x ∗ ( 1 ) x^*(1) x∗(1) 没有限制。
解: 此处始端状态给定,终端状态未给定,所以需要用到始端状态相关的边界条件,终端状态相关的横截条件。这里 L ( x ( t ) , x ˙ ( t ) , t ) = x ˙ 2 + x ˙ 3 L(x(t), \dot{x}(t), t)=\dot{x}^2+\dot{x}^3 L(x(t),x˙(t),t)=x˙2+x˙3,该性质指标函数对应的欧拉-拉格朗日函数为 − d d t ( 2 x ˙ + 3 x ˙ 2 ) = 0 , (14) -\frac{d}{dt}(2\dot{x}+3\dot{x}^2)=0,\tag{14} −dtd(2x˙+3x˙2)=0,(14)以及横截条件 ( 2 x ˙ + 3 x ˙ 2 ) t = 1 = 0. (15) (2\dot{x}+3\dot{x}^2)_{t=1}=0.\tag{15} (2x˙+3x˙2)t=1=0.(15)由方程 (14) 可知, 2 x ˙ + 3 x ˙ 2 = 常数 2\dot{x}+3\dot{x}^2=常数 2x˙+3x˙2=常数,则可知 x ∗ ( t ) x^*(t) x∗(t) 为关于 t t t 的一次函数,设 x ∗ ( t ) = a t + b x^*(t)=at+b x∗(t)=at+b, 则由 x ∗ ( 0 ) = 0 x^*(0)=0 x∗(0)=0 可知 b = 0 b=0 b=0。由方程(15)可知 2 a + 3 a 2 = 0 , (16) 2a+3a^2=0,\tag{16} 2a+3a2=0,(16)解得 a = 0 a=0 a=0 或 a = − 2 3 a=-\frac{2}{3} a=−32,所以最优轨迹 x ∗ ( t ) x^*(t) x∗(t) 可表示为:
(i) 若 a = 0 a=0 a=0,则 x ∗ ( t ) = 0 x^*(t)=0 x∗(t)=0;
(ii) 若 a = − 2 3 a=-\frac{2}{3} a=−32,则 x ∗ ( t ) = − 2 3 t x^*(t)=-\frac{2}{3}t x∗(t)=−32t.
终端时刻不确定的性能指标变分
此时性能指标函数
J
[
x
(
t
)
]
=
∫
t
0
t
f
L
[
x
(
t
)
,
x
˙
(
t
)
,
t
]
d
t
J[x(t)]=\displaystyle\int_{t_0}^{t_f}L[x(t), \dot{x}(t), t]dt
J[x(t)]=∫t0tfL[x(t),x˙(t),t]dt 类似于一个变上限的积分函数。
类似于终端时刻确定时,设宗量函数
x
(
t
)
x(t)
x(t),
x
˙
(
t
)
\dot{x}(t)
x˙(t) 在极值曲线
x
∗
(
t
)
x^*(t)
x∗(t),
x
˙
∗
(
t
)
\dot{x}^*(t)
x˙∗(t) 附近发生微小变分
δ
η
(
t
)
\delta \eta(t)
δη(t),
δ
η
˙
(
t
)
\delta \dot{\eta}(t)
δη˙(t), 其中
η
(
t
)
\eta(t)
η(t) 是一个连续可导的任意定义区间内的函数,即
x
(
t
)
=
x
∗
(
t
)
+
δ
η
(
t
)
,
(14)
x(t)=x^*(t)+\delta \eta(t),\tag{14}
x(t)=x∗(t)+δη(t),(14)
x
˙
(
t
)
=
x
˙
∗
(
t
)
+
δ
η
˙
(
t
)
,
(15)
\dot{x}(t)=\dot{x}^*(t)+\delta \dot{\eta}(t),\tag{15}
x˙(t)=x˙∗(t)+δη˙(t),(15)
取得状态
x
∗
x^*
x∗ 的时刻为
t
f
∗
t_f^*
tf∗, 状态
x
(
t
)
x(t)
x(t) 对应 时刻
t
f
t_f
tf, 设
t
f
=
t
f
∗
+
δ
ξ
(
t
f
∗
)
t_f=t_f^*+\delta\xi(t_f^*)
tf=tf∗+δξ(tf∗)
则泛函
J
[
x
(
t
)
]
J[x(t)]
J[x(t)] 的增量
Δ
J
[
x
∗
(
t
)
]
\Delta J[x^*(t)]
ΔJ[x∗(t)] 可表示为
Δ
J
[
x
∗
(
t
)
]
=
∂
J
∂
δ
∣
δ
=
0
=
∫
t
0
t
f
∗
{
L
[
x
(
t
)
,
x
˙
(
t
)
,
t
]
−
L
[
x
∗
(
t
)
,
x
˙
∗
(
t
)
,
t
]
}
d
t
+
L
[
x
∗
(
t
f
∗
)
,
x
˙
∗
(
t
f
∗
)
,
t
f
∗
]
ξ
(
t
f
∗
)
=
∫
t
0
t
f
∗
{
∂
L
∂
x
δ
η
+
∂
L
∂
x
˙
δ
η
˙
+
o
[
(
δ
η
)
2
,
(
δ
η
˙
)
2
]
}
d
t
+
L
[
x
∗
(
t
f
∗
)
,
x
˙
∗
(
t
f
∗
)
,
t
f
∗
]
ξ
(
t
f
∗
)
\begin{aligned} \Delta J[x^*(t)]&=\frac{\partial J}{\partial \delta}|_{\delta=0}\\ &=\displaystyle\int_{t_0}^{t_f^*}\{L[x(t), \dot{x}(t),t]-L[x^*(t), \dot{x}^*(t),t]\}dt+L[x^*(t_f^*), \dot{x}^*(t_f^*),t_f^*]\xi(t_f^*)\\ &=\displaystyle\int_{t_0}^{t_f^*}\{\frac{\partial L}{\partial x}\delta \eta+\frac{\partial L}{\partial \dot{x}}\delta \dot{\eta}+o[(\delta \eta)^2, (\delta \dot{\eta})^2]\}dt+L[x^*(t_f^*), \dot{x}^*(t_f^*),t_f^*]\xi(t_f^*) \end{aligned}
ΔJ[x∗(t)]=∂δ∂J∣δ=0=∫t0tf∗{L[x(t),x˙(t),t]−L[x∗(t),x˙∗(t),t]}dt+L[x∗(tf∗),x˙∗(tf∗),tf∗]ξ(tf∗)=∫t0tf∗{∂x∂Lδη+∂x˙∂Lδη˙+o[(δη)2,(δη˙)2]}dt+L[x∗(tf∗),x˙∗(tf∗),tf∗]ξ(tf∗)
其中
∫
t
0
t
f
∗
∂
L
∂
x
˙
δ
η
˙
d
t
=
∂
L
∂
x
˙
δ
η
∣
t
0
t
f
∗
−
∫
t
0
t
f
∗
d
d
t
(
∂
L
∂
x
˙
)
δ
η
d
t
.
\begin{aligned} \displaystyle\int_{t_0}^{t_f^*}\frac{\partial L}{\partial \dot{x}}\delta \dot{\eta}dt=\frac{\partial L}{\partial \dot{x}}\delta \eta|_{t_0}^{t_f^*}-\displaystyle\int_{t_0}^{t_f^*}\frac{d}{dt}(\frac{\partial L}{\partial \dot{x}})\delta \eta dt \end{aligned}.
∫t0tf∗∂x˙∂Lδη˙dt=∂x˙∂Lδη∣t0tf∗−∫t0tf∗dtd(∂x˙∂L)δηdt.
因此
δ
J
\delta J
δJ 取得极值的必要条件为:
(1)欧拉-拉格朗日方程:
∂
L
∂
x
−
d
d
t
(
∂
L
∂
x
˙
)
=
0
,
\frac{\partial L}{\partial x}-\frac{d}{dt}(\frac{\partial L}{\partial \dot{x}})=0,
∂x∂L−dtd(∂x˙∂L)=0,
(2) 横截条件:
η
(
t
)
∂
L
∂
x
˙
∣
t
0
t
f
∗
+
L
[
x
∗
(
t
f
∗
)
,
x
˙
∗
(
t
f
∗
)
,
t
f
∗
]
ξ
(
t
f
∗
)
=
0.
\eta(t)\frac{\partial L}{\partial \dot{x}}|_{t_0}^{t_f^*}+L[x^*(t_f^*), \dot{x}^*(t_f^*),t_f^*]\xi(t_f^*)=0.
η(t)∂x˙∂L∣t0tf∗+L[x∗(tf∗),x˙∗(tf∗),tf∗]ξ(tf∗)=0. 通常,无论边界情况如何,泛函极值都必须满足欧拉-拉格朗日方程,只是在不同的情况下会出现不同的边界情况,以下我们分情况进行讨论。
- 给定始端状态与终端状态
此时 x ( t 0 ) = x 0 x(t_0)=x_0 x(t0)=x0, η ( t 0 ) = 0 \eta(t_0)=0 η(t0)=0, η ( t f ∗ ) = 0 \eta(t_f^*)=0 η(tf∗)=0, x ( t f ) = x f x(t_f)=x_f x(tf)=xf, 则可得边界条件与横截条件为
x ( t 0 ) = x 0 , x ( t f ) = x f , L [ x ( t f ∗ ) , x ˙ ( t f ∗ ) , t f ∗ ] = 0. x(t_0)=x_0, x(t_f)=x_f, L[x(t_f^*), \dot{x}(t_f^*), t_f^*]=0. x(t0)=x0,x(tf)=xf,L[x(tf∗),x˙(tf∗),tf∗]=0. - 始端状态给定,终端状态自由
此时 x ( t 0 ) = x 0 x(t_0)=x_0 x(t0)=x0, η ( t 0 ) = 0 \eta(t_0)=0 η(t0)=0, η ( t f ∗ ) ≠ 0 \eta(t_f^*)\neq0 η(tf∗)=0, 则可得边界条件与横截条件为
x ( t 0 ) = x 0 , ∂ L ∂ x ˙ ∣ t f ∗ = 0 , L [ x ( t f ∗ ) , x ˙ ( t f ∗ ) , t f ∗ ] = 0. x(t_0)=x_0, \frac{\partial L}{\partial \dot{x}}|_{t_f^*}=0, L[x(t_f^*), \dot{x}(t_f^*), t_f^*]=0. x(t0)=x0,∂x˙∂L∣tf∗=0,L[x(tf∗),x˙(tf∗),tf∗]=0. - 始端状态给定,终端状态有约束(要求
x
(
t
f
)
=
C
(
t
f
)
x(t_f)=C(t_f)
x(tf)=C(tf))
x ( t ) = x ∗ ( t ) + ε η ( t ) x(t)=x^*(t)+\varepsilon\eta(t) x(t)=x∗(t)+εη(t), t f = t f ∗ + ε ξ ( t f ∗ ) t_f=t_f^*+\varepsilon\xi(t_f^*) tf=tf∗+εξ(tf∗)则有
C ( t f ) = x ( t f ) = x ∗ ( t f ) + ε η ( t f ) = x ( t f ∗ + ε ξ ( t f ∗ ) ) = x ∗ ( t f ∗ + ε ξ ( t f ∗ ) ) + ε η ( t f ∗ + ε ξ ( t f ∗ ) ) = C ( t f ∗ + ε ξ ( t f ∗ ) ) \begin{aligned} C(t_f)&=x(t_f)\\ &=x^*(t_f)+\varepsilon\eta(t_f)\\ &=x(t_f^*+\varepsilon\xi(t_f^*))\\ &=x^*(t_f^*+\varepsilon\xi(t_f^*))+\varepsilon\eta(t_f^*+\varepsilon\xi(t_f^*))\\ &=C(t_f^*+\varepsilon\xi(t_f^*))\\ \end{aligned} C(tf)=x(tf)=x∗(tf)+εη(tf)=x(tf∗+εξ(tf∗))=x∗(tf∗+εξ(tf∗))+εη(tf∗+εξ(tf∗))=C(tf∗+εξ(tf∗))
上式在 ε = 0 \varepsilon=0 ε=0 处取求导可得
η ( t f ∗ + ε ξ ( t f ∗ ) ) ∣ ε = 0 = C ( t f ∗ + ε ξ ( t f ∗ ) ) − x ∗ ( t f ∗ + ε ξ ( t f ∗ ) ) ε ∣ ε = 0 = ( C ˙ ( t f ∗ ) − x ˙ ∗ ( t f ∗ ) ) ξ ( t f ∗ ) = η ( t f ∗ ) \begin{aligned} &\eta(t_f^*+\varepsilon\xi(t_f^*))|_{\varepsilon=0}\\ &=\frac{C(t_f^*+\varepsilon\xi(t_f^*))-x^*(t_f^*+\varepsilon\xi(t_f^*))}{\varepsilon}|_{\varepsilon=0}\\ &=(\dot{C}(t_f^*)-\dot{x}^*(t_f^*))\xi(t_f^*)\\ &=\eta(t_f^*) \end{aligned} η(tf∗+εξ(tf∗))∣ε=0=εC(tf∗+εξ(tf∗))−x∗(tf∗+εξ(tf∗))∣ε=0=(C˙(tf∗)−x˙∗(tf∗))ξ(tf∗)=η(tf∗)则可得边界条件与横截条件为
{ x ( t 0 ) = x 0 , x ( t f ) = C ( t f ) , ( C ˙ ( t f ∗ ) − x ˙ ∗ ( t f ∗ ) ) ∂ L ∂ x ˙ ∣ t f ∗ + L [ x ∗ ( t f ∗ ) , x ˙ ∗ ( t f ∗ ) , t f ∗ ] = 0. \begin{cases} x(t_0)=x_0,\\ x(t_f)=C(t_f),\\ (\dot{C}(t_f^*)-\dot{x}^*(t_f^*))\frac{\partial L}{\partial \dot{x}}|_{t_f^*}+L[x^*(t_f^*), \dot{x}^*(t_f^*),t_f^*]=0.\\ \end{cases} ⎩ ⎨ ⎧x(t0)=x0,x(tf)=C(tf),(C˙(tf∗)−x˙∗(tf∗))∂x˙∂L∣tf∗+L[x∗(tf∗),x˙∗(tf∗),tf∗]=0. - 始端状态有约束(要求
x
(
t
0
)
=
Φ
(
t
0
)
x(t_0)=\Phi(t_0)
x(t0)=Φ(t0)),终端状态固定
x
(
t
)
=
x
∗
(
t
)
+
ε
η
(
t
)
x(t)=x^*(t)+\varepsilon\eta(t)
x(t)=x∗(t)+εη(t),
t
0
=
t
0
∗
+
ε
ξ
(
t
0
∗
)
t_0=t_0^*+\varepsilon\xi(t_0^*)
t0=t0∗+εξ(t0∗)则有
Φ
(
t
0
)
=
x
(
t
0
)
=
x
∗
(
t
0
)
+
ε
η
(
t
0
)
=
x
(
t
0
∗
+
ε
ξ
(
t
0
∗
)
)
=
x
∗
(
t
0
∗
+
ε
ξ
(
t
0
∗
)
)
+
ε
η
(
t
0
∗
+
ε
ξ
(
t
0
∗
)
)
=
C
(
t
0
∗
+
ε
ξ
(
t
0
∗
)
)
\begin{aligned} \Phi(t_0)&=x(t_0)\\ &=x^*(t_0)+\varepsilon\eta(t_0)\\ &=x(t_0^*+\varepsilon\xi(t_0^*))\\ &=x^*(t_0^*+\varepsilon\xi(t_0^*))+\varepsilon\eta(t_0^*+\varepsilon\xi(t_0^*))\\ &=C(t_0^*+\varepsilon\xi(t_0^*))\\ \end{aligned}
Φ(t0)=x(t0)=x∗(t0)+εη(t0)=x(t0∗+εξ(t0∗))=x∗(t0∗+εξ(t0∗))+εη(t0∗+εξ(t0∗))=C(t0∗+εξ(t0∗))
上式在
ε
=
0
\varepsilon=0
ε=0 处取求导可得
η
(
t
0
∗
+
ε
ξ
(
t
0
∗
)
)
∣
ε
=
0
=
C
(
t
0
∗
+
ε
ξ
(
t
0
∗
)
)
−
x
∗
(
t
0
∗
+
ε
ξ
(
t
0
∗
)
)
ε
∣
ε
=
0
=
(
C
˙
(
t
0
∗
)
−
x
˙
∗
(
t
0
∗
)
)
ξ
(
t
0
∗
)
=
η
(
t
0
∗
)
\begin{aligned} &\eta(t_0^*+\varepsilon\xi(t_0^*))|_{\varepsilon=0}\\ &=\frac{C(t_0^*+\varepsilon\xi(t_0^*))-x^*(t_0^*+\varepsilon\xi(t_0^*))}{\varepsilon}|_{\varepsilon=0}\\ &=(\dot{C}(t_0^*)-\dot{x}^*(t_0^*))\xi(t_0^*)\\ &=\eta(t_0^*) \end{aligned}
η(t0∗+εξ(t0∗))∣ε=0=εC(t0∗+εξ(t0∗))−x∗(t0∗+εξ(t0∗))∣ε=0=(C˙(t0∗)−x˙∗(t0∗))ξ(t0∗)=η(t0∗)则可得边界条件与横截条件为
{
x
(
t
f
)
=
x
f
,
x
(
t
0
)
=
Φ
(
t
f
)
,
(
Φ
˙
(
t
0
∗
)
−
x
˙
∗
(
t
0
∗
)
)
∂
L
∂
x
˙
∣
t
0
∗
+
L
[
x
∗
(
t
0
∗
)
,
x
˙
∗
(
t
0
∗
)
,
t
0
∗
]
=
0.
\begin{cases} x(t_f)=x_f,\\ x(t_0)=\Phi(t_f),\\ (\dot{\Phi}(t_0^*)-\dot{x}^*(t_0^*))\frac{\partial L}{\partial \dot{x}}|_{t_0^*}+L[x^*(t_0^*), \dot{x}^*(t_0^*),t_0^*]=0.\\ \end{cases}
⎩
⎨
⎧x(tf)=xf,x(t0)=Φ(tf),(Φ˙(t0∗)−x˙∗(t0∗))∂x˙∂L∣t0∗+L[x∗(t0∗),x˙∗(t0∗),t0∗]=0.
总结:在终端时刻不确定的条件下,求解无约束条件的泛函极值问题时,若给定了边界条件,则直接应用边界条件,若始端或终端状态的条件未给出,则需要使用始端或终端的横截条件进行求解。求解条件如下表所示:
例题
求使性能指标
J
=
∫
t
0
t
f
(
1
+
x
˙
2
)
1
2
d
t
J=\displaystyle \int_{t_0}^{t_f}(1+\dot{x}^2)^{\frac{1}{2}}dt
J=∫t0tf(1+x˙2)21dt 为极小时的最优轨线
x
∗
(
t
)
x^*(t)
x∗(t)。设
x
(
0
)
=
1
,
x
(
t
f
)
=
C
(
t
f
)
,
C
(
t
f
)
=
2
−
t
x(0)=1, x(t_f)=C(t_f), C(t_f)=2-t
x(0)=1,x(tf)=C(tf),C(tf)=2−t,
t
f
t_f
tf 未给定。
解题思路 本题为无约束条件,始端状态时刻给定,终端状态有约束,终端时刻自由的泛函极值问题。
令
L
(
x
,
x
˙
,
t
)
=
(
1
+
x
˙
2
)
1
2
L(x,\dot{x},t)=(1+\dot{x}^2)^{\frac{1}{2}}
L(x,x˙,t)=(1+x˙2)21。则可得欧拉-拉格朗日方程为
∂
L
∂
x
−
d
d
t
∂
L
∂
x
˙
=
0
,
(e1)
\frac{\partial L}{\partial x}-\frac{d}{dt}\frac{\partial L}{\partial \dot{x}}=0,\tag{e1}
∂x∂L−dtd∂x˙∂L=0,(e1)可得
−
d
d
t
(
x
˙
(
1
+
x
˙
2
)
1
2
)
=
0
,
(e2)
-\frac{d}{dt}(\frac{\dot{x}}{(1+\dot{x}^2)^{\frac{1}{2}}})=0,\tag{e2}
−dtd((1+x˙2)21x˙)=0,(e2)则有
x
˙
(
1
+
x
˙
2
)
1
2
=
c
,
(e3)
\frac{\dot{x}}{(1+\dot{x}^2)^{\frac{1}{2}}}=c,\tag{e3}
(1+x˙2)21x˙=c,(e3)得
x
˙
2
=
c
2
1
−
c
2
,
c
2
≠
1.
(e4)
\dot{x}^2=\frac{c^2}{1-c^2}, c^2\neq1.\tag{e4}
x˙2=1−c2c2,c2=1.(e4)即
x
˙
\dot{x}
x˙ 为常数,进而可知
x
(
t
)
x(t)
x(t) 为一次函数形式,设
x
(
t
)
=
a
t
+
b
,
(e5)
x(t)=at+b, \tag{e5}
x(t)=at+b,(e5)代入初始条件
x
(
0
)
=
1
x(0)=1
x(0)=1 可得
b
=
1
b=1
b=1。由横截条件
(
c
˙
(
t
f
)
−
x
˙
(
t
f
)
)
∂
L
∂
x
˙
∣
t
f
=
t
f
∗
+
L
(
x
(
t
f
)
,
x
˙
(
t
f
)
,
t
f
)
=
0
,
(\dot{c}(t_f)-\dot{x}(t_f))\frac{\partial L}{\partial \dot{x}}|t_f=t_f^*+L(x(t_f),\dot{x}(t_f),t_f)=0,
(c˙(tf)−x˙(tf))∂x˙∂L∣tf=tf∗+L(x(tf),x˙(tf),tf)=0,可得
(
−
1
−
a
)
[
a
(
1
+
a
2
)
1
2
]
+
(
1
+
a
2
)
1
2
=
0
,
(-1-a)[\frac{a}{(1+a^2)^{\frac{1}{2}}}]+(1+a^2)^{\frac{1}{2}}=0,
(−1−a)[(1+a2)21a]+(1+a2)21=0,整理可得
a
(
a
−
1
)
(
a
+
2
)
=
0
,
(e6)
a(a-1)(a+2)=0,\tag{e6}
a(a−1)(a+2)=0,(e6)由(e6)可知
a
=
0
a=0
a=0, 或
a
=
1
a=1
a=1 或
a
=
−
1
a=-1
a=−1. 经验算可知
a
=
−
1
a=-1
a=−1 时,不满足终端约束
x
(
t
f
)
=
c
(
t
f
)
x(t_f)=c(t_f)
x(tf)=c(tf),即会有
−
t
f
+
1
=
2
−
t
f
-t_f+1=2-t_f
−tf+1=2−tf。所以
a
=
0
a=0
a=0, 或
a
=
1
a=1
a=1。
(1)当
a
=
0
a=0
a=0 时,最优轨迹为
x
(
t
)
=
1
x(t)=1
x(t)=1, 代入条件
x
(
t
f
)
=
c
(
t
f
)
x(t_f)=c(t_f)
x(tf)=c(tf),得最优时刻为
t
f
∗
=
1
t_f^*=1
tf∗=1。
(2)当
a
=
1
a=1
a=1 时,最优轨迹为
x
(
t
)
=
t
+
1
x(t)=t+1
x(t)=t+1, 代入条件
x
(
t
f
)
=
c
(
t
f
)
x(t_f)=c(t_f)
x(tf)=c(tf),得最优时刻为
t
f
∗
=
1
2
t_f^*=\frac{1}{2}
tf∗=21。