Euler-Lagrange方程与Hamilton方程组
Euler-Lagrange方程与Hamilton方程组

Euler-Lagrange方程与Hamilton方程组

内容纲要

引子

在之前的三种特殊情况下, EL方程都可化为一阶常微分方程, 但对有n维状态变量的n个EL方程组, 在特殊情况下我们会得到n个一阶方程.

Hamilton方程组

Hamilton考察更一般的情况, 将二阶的EL方程转化为一阶的力学Hamilton方程组:

\begin{aligned}
\dot x = +\frac{\partial{H}}{\partial{p}}\\
\dot p = -\frac{\partial{H}}{\partial{p}}
\end{aligned}

此时, 方程的数量增加为2n.

区别

考虑到最优控制问题和变分问题的区别在于是否有控制变量和状态方程,只需在最简变分问题上引入连续可微的控制变量u(t):[t_0,t_f]\rightarrow \mathbb{R}^n, 令:

u(t)=\dot x(t)

就可以将一个最简变分问题转化为最优控制问题,此时控制变量就是状态变量的变化率。
EL方程即可转化为:

\left\{\begin{array}{l}
\frac{\partial g}{\partial x}(x(t), u(t), t)-\frac{\mathrm{d}}{\mathrm{d} t}\left[\frac{\partial g}{\partial u}(x(t), u(t), t)\right]=0 \\
u(t)=\dot{x}(t)
\end{array}\right.

Hamiltonian函数

考察最优控制问题解的必要条件, 引入取值于实数\mathbb{R}的控制Hamiltonian函数:

\mathcal{H}(x, u, p, t)=g(x, u, t)+p \cdot f(x, u, t)

其中p\in\mathbb{R}^n,\space f(x,u,t)=u
随即可得:

\begin{aligned}
\frac{\partial \mathcal{H}}{\partial p}(x(t), u(t), p(t), t) =u(t) \\
\frac{\partial \mathcal{H}}{\partial x}(x(t), u(t), p(t), t) =\frac{\partial g}{\partial x}(x(t), u(t), t) \\
\frac{\partial \mathcal{H}}{\partial u}(x(t), u(t), p(t), t) =p(t)+\frac{\partial g}{\partial u}(x(t), u(t), t)
\end{aligned}

x(t),u(t)维常微分方程组的解, 而我们需要构造协态变量p(t).
观察EL方程可知协态变量应为:

p(t) \stackrel{\text { def }}{=}-\frac{\partial g}{\partial u}(x(t), u(t), t)

于是:

\begin{array}{l}
\dot{x}(t)=u(t)=\frac{\partial \mathcal{H}}{\partial p}(x(t), \dot{x}(t), p(t), t) \\
\dot{p}(t)=\frac{\mathrm{d}}{\mathrm{d} t}\left[-\frac{\partial g}{\partial u}(x(t), u(t), t)\right] \\
\frac{\partial \mathcal{H}}{\partial u}(x(t), u(t), t)=p(t)+\frac{\partial g}{\partial u}(x(t), u(t), t)=0
\end{array}

化简后为:

\dot{p}(t)=-\frac{\partial g}{\partial x}(x(t), u(t), t)=-\frac{\partial \mathcal{H}}{\partial x}(x(t), u(t), t)

最终我们会得到:

\begin{aligned}
0 =\frac{\partial \mathcal{H}}{\partial u}(x(t), u(t), p(t), t) \\
\dot{x}(t) =+\frac{\partial \mathcal{H}}{\partial p}(x(t), u(t), p(t), t) \\
\dot{p}(t) =-\frac{\partial \mathcal{H}}{\partial x}(x(t), u(t), p(t), t)
\end{aligned}

发表评论

您的电子邮箱地址不会被公开。