# 哈密頓量 (最佳控制)

## 問題的敘述

${\displaystyle J(u)=\Psi (x(T))+\int _{0}^{T}L(x,u,t)dt}$

${\displaystyle {\dot {x}}=f(x,u,t)\qquad x(0)=x_{0}\quad t\in [0,T]}$

${\displaystyle a\leq u(t)\leq b\quad t\in [0,T]}$

## 哈密頓量的定義

${\displaystyle H(x,\lambda ,u,t)=\lambda ^{T}(t)f(x,u,t)+L(x,u,t)\,}$

## 離散時間下的哈密頓量

${\displaystyle H(x,\lambda ,u,t)=\lambda ^{T}(t+1)f(x,u,t)+L(x,u,t)\,}$

${\displaystyle \lambda (t+1)=-{\frac {\partial H}{\partial x}}+\lambda (t)}$

（注意此處提到，離散哈密頓量在時間${\displaystyle t}$ 的值和協態變數在時間${\displaystyle t+1}$ 的值有關[2]。這個小差異很重要，在對${\displaystyle x}$ 微分後，可以在協態方程右邊得到和${\displaystyle \lambda (t+1)}$ 有關的算式。若寫法有誤，所得的協態方程不是後向的差分方程，會帶來錯誤的結果。）

## 控制哈密頓量和力學哈密頓量的比較

${\displaystyle {\mathcal {H}}={\mathcal {H}}(p,q,t)=\langle p,{\dot {q}}\rangle -L(q,{\dot {q}},t)}$

${\displaystyle p={\frac {\partial L}{\partial {\dot {q}}}}}$

${\displaystyle {\frac {d}{dt}}p(t)=-{\frac {\partial }{\partial q}}{\mathcal {H}}}$
${\displaystyle {\frac {d}{dt}}q(t)=~~{\frac {\partial }{\partial p}}{\mathcal {H}}}$

${\displaystyle H(q,u,p,t)=\langle p,{\dot {q}}\rangle -L(q,u,t)}$

${\displaystyle {\frac {dp}{dt}}=-{\frac {\partial H}{\partial q}}}$
${\displaystyle {\frac {dq}{dt}}=~~{\frac {\partial H}{\partial p}}}$
${\displaystyle {\frac {\partial H}{\partial u}}=0}$

## 參考資料

1. ^ Dixit, Avinash K. Optimization in Economic Theory. New York: Oxford University Press. 1990: 145–161. ISBN 0-19-877210-6.
2. ^ Varaiya, Chapter 6
3. ^ Sussmann; Willems. 300 Years of Optimal Control (PDF). IEEE Control Systems. June 1997 [2017-12-15]. （原始内容存档 (PDF)于2010-07-30）.
4. ^ See Pesch, H. J.; Bulirsch, R. The maximum principle, Bellman's equation, and Carathéodory's work. Journal of Optimization Theory and Applications. 1994, 80 (2): 199–225. doi:10.1007/BF02192933.