ハミルトン-ヤコビ-ベルマン方程式

ハミルトン-ヤコビ-ベルマン(HJB)方程式(ハミルトン–ヤコビ–ベルマンほうていしき、: Hamilton–Jacobi–Bellman equation)は、最適制御理論の根幹をなす偏微分方程式である。

その解を「価値関数(value function)」と呼び、対象の動的システムとそれに関するコスト関数(cost function)の最小値を与える。

HJB方程式の局所解は最適性の必要条件を与えるが、全状態空間で解けば必要十分条件を与える。解は開ループ制御則となるが、閉ループ解も導ける。以上の手法は確率システムへも拡張することができるほか、古典的変分問題、例えば最速降下線問題も解くことができる。

HJB方程式は1950年代のリチャード・ベルマンとその共同研究者を先駆とする「動的計画法(Dynamic programming)」理論の成果として得られた[1]。その離散時間形式は通常「ベルマン方程式」と呼称される。

連続時間においては、古典物理学におけるハミルトン-ヤコビ方程式 (ウィリアム・ローワン・ハミルトン (William Rowan Hamilton) および、カール・グスタフ・ヤコブ・ヤコビ (Carl Gustav Jacob Jacobi)による) の拡張形とみなせる。

最適制御問題

時間範囲  [ 0 , T ] {\displaystyle [0,T]} における次式の最適制御問題について考える。

V ( x ( 0 ) , 0 ) = min u { 0 T C [ x ( t ) , u ( t ) ] d t + D [ x ( T ) ] } {\displaystyle V(x(0),0)=\min _{u}\left\{\int _{0}^{T}\!\!\!C[x(t),u(t)]\,dt\;+\;D[x(T)]\right\}}

ここで、 C [   ] {\displaystyle C[~]} は、スカラーの微分コスト関数(cost rate function)、 D [   ] {\displaystyle D[~]} は終端状態の望ましさ、ないし経済価値を与える関数、 x ( t ) {\displaystyle x(t)} はシステムの状態ベクトル、 x ( 0 ) {\displaystyle x(0)} はその初期値、 u ( t ) {\displaystyle u(t)} は我々が求めたいと考えている時間 0 t T {\displaystyle 0\leq t\leq T} の制御入力ベクトルである。

対象とするシステムは以下のダイナミクスに従うとする。

x ˙ ( t ) = F [ x ( t ) , u ( t ) ] {\displaystyle {\dot {x}}(t)=F[x(t),u(t)]\,}

ここで、  F [   ] {\displaystyle F[~]} はシステムの状態の時間発展を与える関数ベクトルである。

HJB方程式

このシステムに関するハミルトン-ヤコビ-ベルマン(HJB)方程式は次の偏微分方程式で表される。

V ˙ ( x , t ) + min u { V ( x , t ) F ( x , u ) + C ( x , u ) } = 0 {\displaystyle {\dot {V}}(x,t)+\min _{u}\left\{\nabla V(x,t)\cdot F(x,u)+C(x,u)\right\}=0}

その終端条件は以下の通り。

V ( x , T ) = D ( x ) , {\displaystyle V(x,T)=D(x),\,}

ここで、  a b {\displaystyle a\cdot b}  はベクトル a {\displaystyle a} b {\displaystyle b} 内積、  {\displaystyle \nabla } は 勾配 オペレーター。

上述の方程式に現れる未知のスカラー関数  V ( x , t ) {\displaystyle V(x,t)} をベルマンの「価値関数」と呼ぶ。 V ( x , t ) {\displaystyle V(x,t)} は初期状態 x {\displaystyle x} と時刻 t {\displaystyle t} から、時刻 T {\displaystyle T} までシステムを最適に制御した場合に得られる最小コストを表している。

HJB方程式の導出

直感的には、HJB方程式は以下のように導出できる。 V ( x ( t ) , t ) {\displaystyle V(x(t),t)}  が上述の価値関数(すなわち最小コスト)であったとすれば、Richard-Bellmanの「最適性の原理」から、 時間 t {\displaystyle t}  から  t + d t {\displaystyle t+dt} までの変化は次式で表現できる。

V ( x ( t ) , t ) = min u { t t + d t C ( x ( s ) , u ( s ) ) d s + V ( x ( t + d t ) , t + d t ) } . {\displaystyle V(x(t),t)=\min _{u}\left\{\int _{t}^{t+dt}\!\!\!\!\!\!\!\!C(x(s),u(s))\,ds\;\;+\;\;V(x(t\!+\!dt),t\!+\!dt)\right\}.}

右辺の第二項が次のように テイラー展開 できることに注目しよう。

V ( x ( t + d t ) , t + d t ) = V ( x ( t ) , t ) + V ˙ ( x ( t ) , t ) d t + V ( x ( t ) , t ) x ˙ ( t ) d t + o ( d t ) , {\displaystyle V(x(t\!+\!dt),t\!+\!dt)\;=\;V(x(t),t)+{\dot {V}}(x(t),t)\,dt+\nabla V(x(t),t)\cdot {\dot {x}}(t)\,dt\;+\;o(dt),}

o ( d t ) {\displaystyle o(dt)} はテイラー展開の2次以上の高次項をランダウ記法で表現したものなので無視することにする。価値関数の式にこれを代入した後、 両辺の  V ( x ( t ) , t ) {\displaystyle V(x(t),t)} を相殺し、 d t {\displaystyle dt} で割ってゼロに漸近させれば、上述のHJB方程式が導出できる。

HJB方程式の解法

HJB方程式は通常、 t = T {\displaystyle t=T}  から  t = 0 {\displaystyle t=0} へ向かって時間を遡る方向で解かれる。

全状態空間で解かれた場合、HJB方程式は最適性の必要十分条件を与える[2] V {\displaystyle V} に関して解ければ、そこからコスト関数を最小化する制御入力  u {\displaystyle u} が得られる。

u ( t ) = arg min u { V ( x , t ) F ( x , u ) + C ( x , u ) } {\displaystyle u(t)=\arg \min _{u}\left\{\nabla V(x,t)\cdot F(x,u)+C(x,u)\right\}}

一般的にHJB方程式は古典的な(なめらかな)解をもたない。 そのような場合の解法として、粘性解 (Pierre-Louis Lions と Michael Crandall)、ミニマックス解 (Andrei Izmailovich Subbotin 露) などが存在する。 

確率システムへの拡張

システムの制御問題にベルマンの最適性原理を適用し、最適制御戦略を時間を遡る形で解く手法は、確率微分方程式で表現されるシステムの制御問題へ拡張することができる。上述の問題に良く似た次の問題を考えよう。

min E { 0 T C ( t , X t , u t ) d t + D ( X T ) } {\displaystyle \min \operatorname {E} \left\{\int _{0}^{T}C(t,X_{t},u_{t})\,dt+D(X_{T})\right\}}

ここでは、最適化したい(1次元)確率過程 ( X t ) t [ 0 , T ] {\displaystyle (X_{t})_{t\in [0,T]}\,\!} とその入力 ( u t ) t [ 0 , T ] {\displaystyle (u_{t})_{t\in [0,T]}\,\!} を考える。確率過程 ( X t ) t [ 0 , T ] {\displaystyle (X_{t})_{t\in [0,T]}\,\!} は次の確率微分方程式に従う拡散過程(英語版)であるとする。

d X t = μ ( t , X t , u t ) d t + σ ( t , X t , u t ) d w t , {\displaystyle dX_{t}=\mu (t,X_{t},u_{t})dt+\sigma (t,X_{t},u_{t})dw_{t},}

ただし、 ( w t ) t [ 0 , T ] {\displaystyle (w_{t})_{t\in [0,T]}\,\!} は標準ブラウン運動ウィーナー過程)であり、 μ , σ {\displaystyle \mu ,\;\sigma } は標準的な仮定を満たす可測関数であるとする。直観的に解釈すれば、状態変数 X {\displaystyle X} は瞬間的に μ d t {\displaystyle \mu dt} だけ増減するが、同時に正規ノイズ σ d w t {\displaystyle \sigma dw_{t}} の影響も受けている。この時、ベルマンの最適性原理を用い、次に価値関数 V ( X t , t ) {\displaystyle V(X_{t},t)} 伊藤のルールを使って展開することにより、価値関数についてのHJB方程式が得られる。

V ( x , t ) t min u { A u V ( x , t ) + C ( t , x , u ) } = 0 , {\displaystyle -{\frac {\partial V(x,t)}{\partial t}}-\min _{u}\left\{{\mathcal {A}}^{u}V(x,t)+C(t,x,u)\right\}=0,}

ここで、 A u {\displaystyle {\mathcal {A}}^{u}} 無限小生成作用素(英語版)と呼ばれる関数作用素で以下のように表される。

A u V ( x , t ) := μ ( t , x , u ) V ( x , t ) x + 1 2 ( σ ( t , x , u ) ) 2 2 V ( x , t ) x 2 {\displaystyle {\mathcal {A}}^{u}V(x,t):=\mu (t,x,u){\frac {\partial V(x,t)}{\partial x}}+{\frac {1}{2}}{\Big (}\sigma (t,x,u){\Big )}^{2}{\frac {\partial ^{2}V(x,t)}{\partial x^{2}}}}

非確率的な設定の下では存在しなかった σ 2 / 2 {\displaystyle \sigma ^{2}/2} に価値関数 V ( x , t ) {\displaystyle V(x,t)} x {\displaystyle x} についての2回微分を掛けた項が足されているが、この項は伊藤の公式により生じている。終端条件は次式である。

V ( x , T ) = D ( x ) . {\displaystyle V(x,T)=D(x)\,\!.}

ランダム性が消えたことに注意しよう。 この場合、 V {\displaystyle V\,\!} の解は元の問題の最適解の候補であるにすぎず、さらなる検証が必要である[注釈 1]。 この技術は金融工学において、市場における最適投資戦略を定めるため広く用いられている (例: マートンのポートフォリオ問題)。

ハミルトン–ヤコビ–ベルマン–アイザックス方程式

プレイヤー1と2の二人からなる非協力ゼロサムゲームを考える[3]ミニマックス原理はこの設定でも成立し、プレイヤー1の最適制御問題はプレイヤー1の制御変数を u {\displaystyle u} として以下のように表される。

max u min v E { 0 T C ( t , X t , u t , v t ) d t + D ( X T ) } {\displaystyle \max _{u}\min _{v}\operatorname {E} \left\{\int _{0}^{T}C(t,X_{t},u_{t},v_{t})\,dt+D(X_{T})\right\}}

ただし、状態変数 ( X t ) t [ 0 , T ] {\displaystyle (X_{t})_{t\in [0,T]}\,\!} は次の確率微分方程式に従うとする。

d X t = μ ( t , X t , u t , v t ) d t + σ ( t , X t , u t , v t ) d w t {\displaystyle dX_{t}=\mu (t,X_{t},u_{t},v_{t})dt+\sigma (t,X_{t},u_{t},v_{t})dw_{t}}

この問題においてはプレイヤー2の制御変数 v {\displaystyle v} が問題に導入されている。プレイヤー1の問題の価値関数は以下のハミルトン–ヤコビ–ベルマン–アイザックス方程式(HJBI方程式、: Hamilton–Jacobi–Bellman–Isaacs equation (HJBI equation)[注釈 2]の粘性解となる。

V ( x , t ) t max u min u { A u , v V ( x , t ) + C ( t , x , u , v ) } = 0 , {\displaystyle -{\frac {\partial V(x,t)}{\partial t}}-\max _{u}\min _{u}\left\{{\mathcal {A}}^{u,v}V(x,t)+C(t,x,u,v)\right\}=0,}

ここで、 A u , v {\displaystyle {\mathcal {A}}^{u,v}} は無限小生成作用素で以下のように表される。

A u , v V ( x , t ) := μ ( t , x , u , v ) V ( x , t ) x + 1 2 ( σ ( t , x , u , v ) ) 2 2 V ( x , t ) x 2 {\displaystyle {\mathcal {A}}^{u,v}V(x,t):=\mu (t,x,u,v){\frac {\partial V(x,t)}{\partial x}}+{\frac {1}{2}}{\Big (}\sigma (t,x,u,v){\Big )}^{2}{\frac {\partial ^{2}V(x,t)}{\partial x^{2}}}}

終端条件は次式である。

V ( x , T ) = D ( x ) . {\displaystyle V(x,T)=D(x)\,\!.}

HJBI方程式に含まれる u , v {\displaystyle u,v} についての最大化問題と最小化問題の解がこのゲームの(マルコフ)ナッシュ均衡となる。

最適停止問題

次の最適停止問題を考える[4]

max τ E { 0 τ C ( t , X t ) d t + D ( X T ) 1 { τ = T } + F ( τ , X τ ) 1 { τ < T } } {\displaystyle \max _{\tau }\operatorname {E} \left\{\int _{0}^{\tau }C(t,X_{t})\,dt+D(X_{T})\mathbf {1} \{\tau =T\}+F(\tau ,X_{\tau })\mathbf {1} \{\tau <T\}\right\}}

ここで 1 { } {\displaystyle \mathbf {1} \{\;\cdot \;\}} は特性関数で { } {\displaystyle \{\;\cdot \;\}} 内の事象が起きれば1、そうでなければ0を返す関数である。状態変数 ( X t ) t [ 0 , T ] {\displaystyle (X_{t})_{t\in [0,T]}\,\!} は次の確率微分方程式に従うとする。

d X t = μ ( t , X t ) d t + σ ( t , X t ) d w t {\displaystyle dX_{t}=\mu (t,X_{t})dt+\sigma (t,X_{t})dw_{t}}

すると、価値関数 V ( x , t ) {\displaystyle V(x,t)} は次のHJB方程式の粘性解となる。

min { V ( x , t ) t A V ( x , t ) C ( t , x ) , V ( x , t ) F ( t , x ) } = 0 , {\displaystyle \min \left\{-{\frac {\partial V(x,t)}{\partial t}}-{\mathcal {A}}V(x,t)-C(t,x),\quad V(x,t)-F(t,x)\right\}=0,}

ただし、無限小生成作用素 A {\displaystyle {\mathcal {A}}} は次のように表される。

A V ( x , t ) := μ ( t , x ) V ( x , t ) x + 1 2 ( σ ( t , x ) ) 2 2 V ( x , t ) x 2 {\displaystyle {\mathcal {A}}V(x,t):=\mu (t,x){\frac {\partial V(x,t)}{\partial x}}+{\frac {1}{2}}{\Big (}\sigma (t,x){\Big )}^{2}{\frac {\partial ^{2}V(x,t)}{\partial x^{2}}}}

終端条件は次式である。

V ( x , T ) = D ( x ) . {\displaystyle V(x,T)=D(x)\,\!.}

最適制御となる停止時刻(英語版)は次で与えられる。

τ := min { inf { t [ 0 , T ] : V ( X t , t ) = F ( t , X t ) } , T } {\displaystyle \tau ^{*}:=\min\{\inf\{t\in [0,T]\;:\;V(X_{t},t)=F(t,X_{t})\},\;T\}}

最適停止問題はアメリカンオプションの価格付け問題などで現れる。

Linear Quadratic Gaussian (LQG)制御への応用

一例として、二次形式のコスト関数を持つ線形確率システムの問題を扱ってみよう。 以下のダイナミクスを持つシステムを考える。

d x t = ( a x t + b u t ) d t + σ d w t , {\displaystyle dx_{t}=(ax_{t}+bu_{t})dt+\sigma dw_{t},}

微分コスト関数が、 C ( x t , u t ) = r ( t ) u t 2 / 2 + q ( t ) x t 2 / 2 {\displaystyle C(x_{t},u_{t})=r(t)u_{t}^{2}/2+q(t)x_{t}^{2}/2} で与えられるとすれば、HJB方程式は以下のように与えられる。

V ( x , t ) t = 1 2 q ( t ) x 2 + V ( x , t ) x a x b 2 2 r ( t ) ( V ( x , t ) x ) 2 + 1 2 σ 2 2 V ( x , t ) x 2 . {\displaystyle -{\frac {\partial V(x,t)}{\partial t}}={\frac {1}{2}}q(t)x^{2}+{\frac {\partial V(x,t)}{\partial x}}ax-{\frac {b^{2}}{2r(t)}}\left({\frac {\partial V(x,t)}{\partial x}}\right)^{2}+{\frac {1}{2}}\sigma ^{2}{\frac {\partial ^{2}V(x,t)}{\partial x^{2}}}.}

二次形式の価値関数を仮定する事により、通常のLQG制御と同様に、価値関数のヘシアンに関する一般的な リカッチ方程式を得ることが出来る。

HJB方程式の応用

HJB方程式は連続時間の最適制御において基本となる方程式であり、様々な分野で応用されている。例えば、

などが挙げられる。

関連項目

  • ベルマン方程式 - ハミルトン-ヤコビ-ベルマン方程式の離散時間形式
  • ポントリャーギンの最小原理(最大原理)(英語版) - ハミルトニアンを最小化することにより最適性に関する必要条件を与えているが、十分条件ではない。ただし、HJB方程式による最適化と比較して、注目する単一の軌道上で満たされるだけで良いという長所を持つ。
  • 微分動的計画法 - DDP。効率的な最適軌道計算法の一つ

脚注

[脚注の使い方]

注釈

  1. ^ この検証のことを一般に verification と呼ぶ。
  2. ^ アイザックスは微分ゲーム理論に貢献したルーファス・アイザックス(英語版) (Rufus Isaacs) に由来する。

出典

  1. ^ Bellman, R. E. (1957). Dynamic Programming. Princeton, NJ 
  2. ^ Bertsekas, Dimitri P. (2005). Dynamic Programming and Optimal Control. Athena Scientific 
  3. ^ Fleming, W.; Souganidis, P. (1989), “On the Existence of Value Functions of Two-Player, Zero-Sum Stochastic Differential Games”, Indiana Univ. Math. J. 38 (2): 293–314, http://www.iumj.indiana.edu/docs/38015/38015.asp 2016年9月24日閲覧。 
  4. ^ Pham, Huyên (2009), Continuous-Time Stochastic Control and Optimization with Financial Applications, Springer, ISBN 3540894993 

参考文献

  • Bellman, R. E. (1954). “Dynamic Programming and a new formalism in the calculus of variations”. Proceedings of the National Academy of Sciences of the United States of America 40 (4): 231-235. PMC 527981. PMID 16589462. https://doi.org/10.1073/pnas.40.4.231. 
  • Bellman, R. E. (1957). Dynamic Programming. Princeton  - 邦訳なし。
  • Bellman, R. (1959). “An Application of Dynamic Programming to the Determination of Optimal Satellite Trajectories”. J. Brit.Interplanet. Soc. 17: 78-83. 

関連文献

  • Dimitri P. Bertsekas(英語版) (2005). Dynamic programming and optimal control. Athena Scientific. http://www.athenasc.com/dpbook.html 
  • 川合敏雄「自然法則と最適制御」『日本物理学会誌』第41巻第3号、1986年3月、227-235頁。  - ポントリャーギンの最大原理(英語版)ハミルトニアンについて平易に解説したエッセイ。