最佳投影方程

最佳投影方程（optimal projection equations）是控制理论中，建構局部最佳降階LQG控制器的充分必要条件。 LQG控制（線性二次高斯控制）問題是最优控制領域中最基礎的問題之一，這問題包括了存在不確定性的線性系統，受到加性高斯白噪声的影響，沒有完整的狀態資訊（無法量測到所有的狀態變數，也無法透過回授得知），對應二次的成本泛函。不過存在唯一解，而且可以建構線性動態回授的控制律，易於計算以及實現。而LQG控制器也是非線性系統中最佳擾動控制的基礎。 LQG控制器的架構會類似要控制的系統，兩者會有相同的維度。因此若系統本身就是高維度，要實現（全階）LQG控制器會很困難。降階LQG問題（固定階LQG問題）事先固定LQG控制器的階數，因此克服了這個困難。不過在全階LQG控制器中適用的分離原理，在降階LQG問題中已無法適用，因此這方面會更困難，而且其解也不唯一。不過可以找到數值分析的演算法來求解對應的最佳投影方程。 降階的LQG控制問題幾乎和全階的LQG控制問題相同。令 x ^ r ( t ) {\displaystyle {\hat {\mathbf {x} }}_{r}(t)} 表示降階LQG控制器的狀態，唯一的差異是LQG控制器的狀態維度 n r = d i m ( x ^ r ( t ) ) {\displaystyle n_{r}=dim({\hat {\mathbf {x} }}_{r}(t))} 是事先定義好的值，比受控系統的狀態維度 n = d i m ( x ( t ) ) {\displaystyle n=dim({\mathbf {x} }(t))} 要少。 降階LQG控制器可以表示為下式： x ^ ˙ r ( t ) = A r ( t ) x ^ r ( t ) + B r ( t ) u ( t ) + K r ( t ) ( y ( t ) − C r ( t ) x ^ r ( t ) ) , x ^ r ( 0 ) = x r ( 0 ) , {\displaystyle {\dot {\hat {\mathbf {x} }}}_{r}(t)=A_{r}(t){\hat {\mathbf {x} }}_{r}(t)+B_{r}(t){\mathbf {u} }(t)+K_{r}(t)\left({\mathbf {y} }(t)-C_{r}(t){\hat {\mathbf {x} }}_{r}(t)\right),{\hat {\mathbf {x} }}_{r}(0)={\mathbf {x} }_{r}(0),} u ( t ) = − L r ( t ) x ^ r ( t ) . {\displaystyle {\mathbf {u} }(t)=-L_{r}(t){\hat {\mathbf {x} }}_{r}(t).} 上述公式刻意寫的類似傳統全階LQG控制器的形式，降階的LQG控制問題也可以改寫為下式： x ^ ˙ r ( t ) = F r ( t ) x ^ r ( t ) + K r ( t ) y ( t ) , x ^ r ( 0 ) = x r ( 0 ) , {\displaystyle {\dot {\hat {\mathbf {x} }}}_{r}(t)=F_{r}(t){\hat {\mathbf {x} }}_{r}(t)+K_{r}(t){\mathbf {y} }(t),{\hat {\mathbf {x} }}_{r}(0)={\mathbf {x} }_{r}(0),} u ( t ) = − L r ( t ) x ^ r ( t ) , {\displaystyle {\mathbf {u} }(t)=-L_{r}(t){\hat {\mathbf {x} }}_{r}(t),} 其中 F r ( t ) = A r ( t ) − B r ( t ) L r ( t ) − K r ( t ) C r ( t ) . {\displaystyle F_{r}(t)=A_{r}(t)-B_{r}(t)L_{r}(t)-K_{r}(t)C_{r}(t).} 降階LQG控制器的矩陣 F r ( t ) , K r ( t ) , L r ( t ) {\displaystyle F_{r}(t),K_{r}(t),L_{r}(t)} 和 x r ( 0 ) {\displaystyle {\mathbf {x} }_{r}(0)} 是由所謂的最佳投影方程（optimal projection equations、OPE）來決定。 n {\displaystyle n} 維的最佳投影方陣 τ ( t ) {\displaystyle \tau (t)} 是OPE的核心。此矩陣的秩在所有狀態下幾乎都等於 n r {\displaystyle n_{r}} 。相關投影為斜投影（oblique projection）： τ 2 ( t ) = τ ( t ) {\displaystyle \tau ^{2}(t)=\tau (t)} 。最佳投影方程包括四個矩陣微分方程。前二個是LQG控制器對應的矩陣Riccati微分方程的擴展。在方程式中 τ ⊥ ( t ) {\displaystyle \tau _{\perp }(t)} 表示 I n − τ ( t ) {\displaystyle I_{n}-\tau (t)} ，而 I n {\displaystyle I_{n}} 為 n {\displaystyle n} 維的單位矩陣 P ˙ ( t ) = A ( t ) P ( t ) + P ( t ) A ′ ( t ) − P ( t ) C ′ ( t ) W − 1 ( t ) C ( t ) P ( t ) + V ( t ) + τ ⊥ ( t ) P ( t ) C ′ ( t ) W − 1 ( t ) C ( t ) P ( t ) τ ⊥ ′ ( t ) , P ( 0 ) = E ( x ( 0 ) x ′ ( 0 ) ) , − S ˙ ( t ) = A ′ ( t ) S ( t ) + S ( t ) A ( t ) − S ( t ) B ( t ) R − 1 ( t ) B ′ ( t ) S ( t ) + Q ( t ) + τ ⊥ ′ ( t ) S ( t ) B ( t ) R − 1 ( t ) B ′ ( t ) S ( t ) τ ⊥ ( t ) , {\displaystyle {\begin{aligned}{\dot {P}}(t)={}&A(t)P(t)+P(t)A'(t)-P(t)C'(t)W^{-1}(t)C(t)P(t)+V(t)\\[6pt]&{}+\tau _{\perp }(t)P(t)C'(t)W^{-1}(t)C(t)P(t)\tau '_{\perp }(t),\\[6pt]P(0)={}&E\left({\mathbf {x} }(0){\mathbf {x} }'(0)\right),\\[6pt]&{}-{\dot {S}}(t)=A'(t)S(t)+S(t)A(t)-S(t)B(t)R^{-1}(t)B'(t)S(t)+Q(t)\\[6pt]&{}+\tau '_{\perp }(t)S(t)B(t)R^{-1}(t)B'(t)S(t)\tau _{\perp }(t),\end{aligned}}} S ( T ) = F . {\displaystyle S(T)=F.} 若LQG的維度沒有減少，也就是 n = n r {\displaystyle n=n_{r}} ，則 τ ( t ) = I n , τ ⊥ ( t ) = 0 {\displaystyle \tau (t)=I_{n},\tau _{\perp }(t)=0} ，上述二個方程就是二個沒有耦合的矩陣Riccati微分方程，對應全階的LQG控制器。若 n r < n {\displaystyle n_{r}<n} ，則兩個方程會有斜投影項 τ ( t ) . {\displaystyle \tau (t).} 。這也是為何降階的LQG控制器無法分離的原因，斜投影 τ ( t ) {\displaystyle \tau (t)} 是由另外二個矩陣微分方程所決定，其中也和秩的條件（rank conditions）有關。這四個矩陣微分方程組成了最佳投影方程。為了要列出另外二個矩陣微分方程，先定義以下二個矩陣： Ψ 1 ( t ) = ( A ( t ) − B ( t ) R − 1 ( t ) B ′ ( t ) S ( t ) ) P ^ ( t ) + P ^ ( t ) ( A ( t ) − B ( t ) R − 1 ( t ) B ′ ( t ) S ( t ) ) ′ {\displaystyle \Psi _{1}(t)=(A(t)-B(t)R^{-1}(t)B'(t)S(t)){\hat {P}}(t)+{\hat {P}}(t)(A(t)-B(t)R^{-1}(t)B'(t)S(t))'} + P ( t ) C ′ ( t ) W − 1 ( t ) C ( t ) P ( t ) , {\displaystyle {}+P(t)C'(t)W^{-1}(t)C(t)P(t),} Ψ 2 ( t ) = ( A ( t ) − P ( t ) C ′ ( t ) W − 1 ( t ) C ( t ) ) ′ S ^ ( t ) + S ^ ( t ) ( A ( t ) − P ( t ) C ′ ( t ) W − 1 ( t ) C ( t ) ) {\displaystyle \Psi _{2}(t)=(A(t)-P(t)C'(t)W^{-1}(t)C(t))'{\hat {S}}(t)+{\hat {S}}(t)(A(t)-P(t)C'(t)W^{-1}(t)C(t))} + S ( t ) B ( t ) R − 1 ( t ) B ′ ( t ) S ( t ) . {\displaystyle {}+S(t)B(t)R^{-1}(t)B'(t)S(t).} 則最後二個矩陣微分方程如下： P ^ ˙ ( t ) = 1 / 2 ( τ ( t ) Ψ 1 ( t ) + Ψ 1 ( t ) τ ′ ( t ) ) , P ^ ( 0 ) = E ( x ( 0 ) ) E ( x ( 0 ) ) ′ , rank ⁡ ( P ^ ( t ) ) = n r {\displaystyle {\dot {\hat {P}}}(t)=1/2\left(\tau (t)\Psi _{1}(t)+\Psi _{1}(t)\tau '(t)\right),{\hat {P}}(0)=E({\mathbf {x} }(0))E({\mathbf {x} }(0))',\operatorname {rank} ({\hat {P}}(t))=n_{r}} almost everywhere, − S ^ ˙ ( t ) = 1 / 2 ( τ ′ ( t ) Ψ 2 ( t ) + Ψ 2 ( t ) τ ( t ) ) , S ^ ( T ) = 0 , rank ⁡ ( S ^ ( t ) ) = n r {\displaystyle -{\dot {\hat {S}}}(t)=1/2\left(\tau '(t)\Psi _{2}(t)+\Psi _{2}(t)\tau (t)\right),{\hat {S}}(T)=0,\operatorname {rank} ({\hat {S}}(t))=n_{r}} almost everywhere, 其中 τ ( t ) = P ^ ( t ) S ^ ( t ) ( P ^ ( t ) S ^ ( t ) ) ∗ . {\displaystyle \tau (t)={\hat {P}}(t){\hat {S}}(t)\left({\hat {P}}(t){\hat {S}}(t)\right)^{*}.} 此處的 * 表示群廣義逆矩陣（group generalized inverse）或Drazin逆矩陣（英语：Drazin inverse），是唯一的，定義如下 A ∗ = A ( A 3 ) + A . {\displaystyle A^{*}=A(A^{3})^{+}A.} 其中 + 是摩尔－彭若斯广义逆. 矩陣 P ( t ) , S ( t ) , P ^ ( t ) , S ^ ( t ) {\displaystyle P(t),S(t),{\hat {P}}(t),{\hat {S}}(t)} 都需要是非負對稱矩陣。可以建構最佳投影方程的解，而此解可以決定降階LQG控制器矩陣 F r ( t ) , K r ( t ) , L r ( t ) {\displaystyle F_{r}(t),K_{r}(t),L_{r}(t)} 和 x r ( 0 ) {\displaystyle {\mathbf {x} }_{r}(0)} ： F r ( t ) = H ( t ) ( A ( t ) − P ( t ) C ′ ( t ) W − 1 ( t ) C ( t ) − B ( t ) R − 1 ( t ) B ′ ( t ) S ( t ) ) G ( t ) + H ˙ ( t ) G ′ ( t ) , {\displaystyle F_{r}(t)=H(t)\left(A(t)-P(t)C'(t)W^{-1}(t)C(t)-B(t)R^{-1}(t)B'(t)S(t)\right)G(t)+{\dot {H}}(t)G'(t),} K r ( t ) = H ( t ) P ( t ) C ′ ( t ) W − 1 ( t ) , {\displaystyle K_{r}(t)=H(t)P(t)C'(t)W^{-1}(t),} L r ( t ) = R − 1 ( t ) B ′ ( t ) S ( t ) G ′ ( t ) , {\displaystyle L_{r}(t)=R^{-1}(t)B'(t)S(t)G'(t),} x r ( 0 ) = H ( 0 ) E ( x ( 0 ) ) . {\displaystyle {\mathbf {x} }_{r}(0)=H(0)E({\mathbf {x} }(0)).} 上式中的矩陣 G ( t ) , H ( t ) {\displaystyle G(t),H(t)} 是符合以下性質的矩陣： G ′ ( t ) H ( t ) = τ ( t ) , G ( t ) H ′ ( t ) = I n r {\displaystyle G'(t)H(t)=\tau (t),G(t)H'(t)=I_{n_{r}}} 幾乎在所有狀態下。 可以由 P ^ ( t ) S ^ ( t ) {\displaystyle {\hat {P}}(t){\hat {S}}(t)} 的投影分解中得到： 若降階LQG問題中的所有矩陣都是非時變的，且最終時間（horizon） T {\displaystyle T} 趨近無限大，則最佳降階LQG控制器和最佳投影方程也都會是非時變的。此情形下，最佳投影方程左側的微分項會為零。 離散時間的情形類似連續時間的例子，要處理的是將 n {\displaystyle n} 階傳統離散時間全階LQG問題轉換為事先已知固定階數的 n r < n {\displaystyle n_{r}<n} 階降階LQG控制器。為了要表示離散時間的OPE，先引入以下二個矩陣： Ψ i 1 = ( A i − B i ( B i ′ S i + 1 B i + R i ) − 1 B i ′ S i + 1 A i ) ) P ^ i ( A i − B i ( B i ′ S i + 1 B i + R i ) − 1 B i ′ S i + 1 A i ) ) ′ {\displaystyle \Psi _{i}^{1}=\left(A_{i}-B_{i}(B'_{i}S_{i+1}B_{i}+R_{i})^{-1}B'_{i}S_{i+1}A_{i})\right){\hat {P}}_{i}\left(A_{i}-B_{i}(B'_{i}S_{i+1}B_{i}+R_{i})^{-1}B'_{i}S_{i+1}A_{i})\right)'} + A i P i C i ′ ( C i P i C i ′ + W i ) − 1 C i P i A i ′ {\displaystyle {}+A_{i}P_{i}C'_{i}(C_{i}P_{i}C'_{i}+W_{i})^{-1}C_{i}P_{i}A'_{i}} Ψ i + 1 2 = ( A i − A i P i C i ′ ( C i P i C i ′ + W i ) − 1 C i ) ′ S ^ i + 1 ( A i − A i P i C i ′ ( C i P i C i ′ + W i ) − 1 C i ) {\displaystyle \Psi _{i+1}^{2}=\left(A_{i}-A_{i}P_{i}C'_{i}(C_{i}P_{i}C'_{i}+W_{i})^{-1}C_{i}\right)'{\hat {S}}_{i+1}\left(A_{i}-A_{i}P_{i}C'_{i}(C_{i}P_{i}C'_{i}+W_{i})^{-1}C_{i}\right)} + A i ′ S i + 1 B i ( B i ′ S i + 1 B i + R i ) − 1 B i ′ S i + 1 A i {\displaystyle {}+A'_{i}S_{i+1}B_{i}(B'_{i}S_{i+1}B_{i}+R_{i})^{-1}B'_{i}S_{i+1}A_{i}} 則離散時間OPE為 P i + 1 = A i ( P i − P i C i ′ ( C i P i C i ′ + W i ) − 1 C i P i ) A i ′ + V i + τ ⊥ i + 1 Ψ i 1 τ ⊥ i + 1 ′ , P 0 = E ( x 0 x ′ 0 ) {\displaystyle P_{i+1}=A_{i}\left(P_{i}-P_{i}C'_{i}\left(C_{i}P_{i}C'_{i}+W_{i}\right)^{-1}C_{i}P_{i}\right)A'_{i}+V_{i}+\tau _{\perp i+1}\Psi _{i}^{1}\tau '_{\perp i+1},P_{0}=E\left({\mathbf {x} }_{0}{\mathbf {x'} }_{0}\right)} . S i = A i ′ ( S i + 1 − S i + 1 B i ( B i ′ S i + 1 B i + R i ) − 1 B i ′ S i + 1 ) A i + Q i + τ ⊥ i ′ Ψ i + 1 2 τ ⊥ i , S N = F {\displaystyle S_{i}=A'_{i}\left(S_{i+1}-S_{i+1}B_{i}\left(B'_{i}S_{i+1}B_{i}+R_{i}\right)^{-1}B'_{i}S_{i+1}\right)A_{i}+Q_{i}+\tau '_{\perp i}\Psi _{i+1}^{2}\tau _{\perp i},S_{N}=F} . P ^ i + 1 = 1 / 2 ( τ i + 1 Ψ i 1 + Ψ i 1 τ i + 1 ′ ) , P ^ 0 = E ( x ( 0 ) ) E ( x ( 0 ) ) ′ , rank ⁡ ( P ^ i ) = n r {\displaystyle {\hat {P}}_{i+1}=1/2(\tau _{i+1}\Psi _{i}^{1}+\Psi _{i}^{1}\tau '_{i+1}),{\hat {P}}_{0}=E({\mathbf {x} }(0))E({\mathbf {x} }(0))',\operatorname {rank} ({\hat {P}}_{i})=n_{r}} almost everywhere, S ^ i = 1 / 2 ( τ i ′ Ψ i + 1 2 + Ψ i + 1 2 τ i ) , S ^ N = 0 , rank ⁡ ( S ^ i ) = n r {\displaystyle {\hat {S}}_{i}=1/2(\tau '_{i}\Psi _{i+1}^{2}+\Psi _{i+1}^{2}\tau _{i}),{\hat {S}}_{N}=0,\operatorname {rank} ({\hat {S}}_{i})=n_{r}} almost everywhere. 斜投影（oblique projection）矩陣為 τ i = P ^ i S ^ i ( P ^ i S ^ i ) ∗ . {\displaystyle \tau _{i}={\hat {P}}_{i}{\hat {S}}_{i}\left({\hat {P}}_{i}{\hat {S}}_{i}\right)^{*}.} 非負對稱矩陣 P i , S i , P ^ i , S ^ i {\displaystyle P_{i},S_{i},{\hat {P}}_{i},{\hat {S}}_{i}} 是離散時間OPE的解，也決定了降階LQG控制器的矩陣 F i r , K i r , L i r {\displaystyle F_{i}^{r},K_{i}^{r},L_{i}^{r}} and x 0 r {\displaystyle {\mathbf {x} }_{0}^{r}} ： F i r = H i + 1 ( A i − P i C i ′ ( C i P i C i ′ + W i ) − 1 C i − B i ( B i ′ S i + 1 B i + R i ) − 1 B i ′ S i + 1 ) G i ′ , {\displaystyle F_{i}^{r}=H_{i+1}\left(A_{i}-P_{i}C'_{i}\left(C_{i}P_{i}C'_{i}+W_{i}\right)^{-1}C_{i}-B_{i}\left(B'_{i}S_{i+1}B_{i}+R_{i}\right)^{-1}B'_{i}S_{i+1}\right)G'_{i},} K i r = H i + 1 P i C i ′ ( C i P i C i ′ + W i ) − 1 , {\displaystyle K_{i}^{r}=H_{i+1}P_{i}C'_{i}\left(C_{i}P_{i}C'_{i}+W_{i}\right)^{-1},} L i r = ( B i ′ S i + 1 B i + R i ) − 1 B i ′ S i + 1 G i ′ , {\displaystyle L_{i}^{r}=\left(B'_{i}S_{i+1}B_{i}+R_{i}\right)^{-1}B'_{i}S_{i+1}G'_{i},} x 0 r = H 0 E ( x 0 ) . {\displaystyle {\mathbf {x} }_{0}^{r}=H_{0}E({\mathbf {x} }_{0}).} 在上述的方程中，矩陣 G i , H i {\displaystyle G_{i},H_{i}} 是有以下性質的矩陣： G i ′ H i = τ i , G i H i ′ = I n r {\displaystyle G'_{i}H_{i}=\tau _{i},G_{i}H'_{i}=I_{n_{r}}} 幾乎在所有狀態下。 這些矩陣可以從 P ^ i S ^ i {\displaystyle {\hat {P}}_{i}{\hat {S}}_{i}} 的投影因式分解中求得。 如同在連續時間中的例子一樣，若問題中所有的矩陣都是非時變，且且最終時間（horizon） T {\displaystyle T} 趨近無限大，降階LQG控制器就會是非時變的。因此離散時間OPE會收斂到穩態解，決定非時變的降階LOG控制器。 離散時間OPE也可以應用在狀態維度，輸入維度或是輸出維度可變的離散時間系統（具有時變維度的離散時間系統）。若在數位控制器中的取樣是不同步的，就可能會出現這類的系統。 Hyland D.C; Bernstein D.S. The optimal projection equations for fixed order dynamic compensation. IEEE Transactions on Automatic Control. 1984, AC–29 (11): 1034–1037. doi:10.1109/TAC.1984.1103418. hdl:2027.42/57875.  Bernstein D.S.; Davis L.D.; Hyland D.C. The optimal projection equations for reduced-order discrete-time modeling estimation and control (PDF). Journal of Guidance Control and Dynamics. 1986, 9 (3): 288–293 [2020-02-04]. Bibcode:1986JGCD....9..288B. doi:10.2514/3.20105. hdl:2027.42/57880. （原始内容 (PDF)存档于2022-01-09）.  Haddad W.M.; Tadmor G. Reduced-order LQG controllers for linear time-varying plants. Systems & Control Letters. 1993, 20 (2): 87–97. doi:10.1016/0167-6911(93)90020-7.  Van Willigenburg L.G.; De Koning W.L. Numerical algorithms and issues concerning the discrete-time optimal projection equations. European Journal of Control. 2000, 6 (1): 93–100. doi:10.1016/s0947-3580(00)70917-4.  Associated software download from Matlab Central （页面存档备份，存于互联网档案馆）. Athans M. The role and use of the stochastic linear-quadratic-Gaussian problem in control system design. IEEE Transactions on Automatic Control. 1971, AC–16 (6): 529–552. doi:10.1109/TAC.1971.1099818.  Van Willigenburg L.G.; De Koning W.L. Optimal reduced-order compensators for time-varying discrete-time systems with deterministic and white parameters. Automatica. 1999, 35: 129–138. doi:10.1016/S0005-1098(98)00138-1.  Associated software download from Matlab Central （页面存档备份，存于互联网档案馆）. Zigic D.; Watson L.T.; Collins E.G.; Haddad W.M.; Ying S. Homotopy methods for solving the optimal projection equations for the H2 reduced order model problem. International Journal of Control. 1996, 56 (1): 173–191. doi:10.1080/00207179208934308.  Collins Jr. E.G; Haddad W.M.; Ying S. A homotopy algorithm for reduced-order dynamic compensation using the Hyland–Bernstein optimal projection equations. Journal of Guidance Control & Dynamics. 1996, 19 (2): 407–417. doi:10.2514/3.21633.