1. 程式人生 > >利用矩陣的跡巧妙解決矩陣的求導問題

利用矩陣的跡巧妙解決矩陣的求導問題

題目引入:

在維納濾波的過程中需要利用以前的資訊的線性組合來預測當前值,同時要滿足最小均方誤差準則。另外,線上性MIMO接收機的設計過程中,有以下通道模型:

$$y=Hx+n$$

為了根據接收到的訊號y,恢復出發送的訊號x,需要對傳送向量做一個估計,假設採用最小均方誤差準則(MMSE),存在係數矩陣A使得:

$$\hat{x}_{MMSE}=Ay$$

均方誤差為:

$$e = E||\hat{x}_{MMSE}-x||^2=E(Ay-x)^T(Ay-x)$$

現在的問題是如何得到矩陣A,使得上述均方誤差達到最小?

很多教材上對此大都未曾提及,這裡介紹了已知巧妙簡單易懂的方法來解決上述問題。首先介紹一些關於矩陣跡的先驗知識。

矩陣的跡就是矩陣對角元素之和。有以下性質:

$$tr(AB)=tr(BA)$$

$$\frac{{\partial tr\left( {AB} \right)}}{{\partial A}} = {B^T}$$

根據以上兩個性質基本上就可以進行接下來的操作。首先利用上述性質計算如下導數:

$$\frac{{\partial tr\left( {AB{A^T}C} \right)}}{{\partial A}}$$


對於不同位置含有兩個矩陣A,該如何操作呢?這裡先引入微積分中對$x^2$的分步求導過程:

$$\frac{{d{x^2}}}{{dx}} = \frac{{dxx}}{{dx}} = x\frac{{dx}}{{dx}} + x\frac{{dx}}{{dx}} = 2x$$


同樣地,

\[\begin{array}{l}
\frac{{\partial tr\left( {AB{A^T}C} \right)}}{{\partial A}} = \frac{{\partial tr\left( {{A^T}CAB} \right)}}{{\partial A}}\\
 = {\left( {B{A^T}C} \right)^T} + CAB\\
 = {C^T}A{B^T} + CAB
\end{array}\]


接下來,我們來解決前面提出的問題。

\[e = E\left[ {{{\left( {Ay - x} \right)}^T}\left( {Ay - x} \right)} \right]\]


上式對A求導:

\[\begin{array}{l}
\frac{{de}}{{dA}} = \frac{d}{{dA}}E\left[ {{{\left( {Ay - x} \right)}^T}\left( {Ay - x} \right)} \right]\\
 = E\left[ {\frac{d}{{dA}}{{\left( {Ay - x} \right)}^T}\left( {Ay - x} \right)} \right]
\end{array}\]


待求期望的部分是

\[\begin{array}{l}
\frac{d}{{dA}}{\left( {Ay - x} \right)^T}\left( {Ay - x} \right) = \frac{d}{{dA}}tr\left( {{{\left( {Ay - x} \right)}^T}\left( {Ay - x} \right)} \right)\\
 = \frac{d}{{dA}}tr\left( {{y^T}{A^T}Ay - {y^T}{A^T}x - {x^T}Ay + {x^T}x} \right)\\
 = \frac{d}{{dA}}tr\left( {{y^T}{A^T}Ay - {y^T}{A^T}x - {x^T}Ay} \right) + \frac{d}{{dA}}tr\left( {{x^T}x} \right)\\
 = \frac{d}{{dA}}tr\left( {{y^T}{A^T}Ay - {y^T}{A^T}x - {x^T}Ay} \right)\\
 = \frac{d}{{dA}}tr\left( {Ay{y^T}{A^T} - {A^T}x{y^T} - Ay{x^T}} \right)\\
 = {\left( {y{y^T}{A^T}} \right)^T} + Ay{y^T} - x{y^T} - {\left( {y{x^T}} \right)^T}\\
 = 2Ay{y^T} - 2x{y^T}
\end{array}\]


令上式為零就可得到MMSE下的解。

\[\begin{array}{l}
\frac{{de}}{{dA}} = E\left[ {\frac{d}{{dA}}{{\left( {Ay - x} \right)}^T}\left( {Ay - x} \right)} \right]\\
 = E\left( {2Ay{y^T} - 2x{y^T}} \right) = 0
\end{array}\]


假設

\begin{array}{l}
E\left[ {x{x^T}} \right] = I\\
E\left[ {n{x^T}} \right] = 0\\
E\left[ {n{n^T}} \right] = {\sigma ^2}I
\end{array}


\[\begin{array}{l}
\frac{{de}}{{dA}}{\rm{ = }}E\left( {2Ay{y^T} - 2x{y^T}} \right){\rm{ = }}0\\
AE\left( {y{y^T}} \right) - E\left( {x{y^T}} \right) = 0\\
E\left( {y{y^T}} \right) = E\left( {\left( {Hx + n} \right){{\left( {Hx + n} \right)}^T}} \right)\\
 = E\left( {Hx{x^T}{H^T} + Hx{n^T} + n{x^T}{H^T} + n{n^T}} \right)\\
 = HE\left( {x{x^T}} \right){H^T} + E\left( {n{n^T}} \right)\\
 = HI{H^T} + {\sigma ^2}I\\
 = H{H^T} + {\sigma ^2}I
\end{array}\]


從而有

\[\begin{array}{l}
AE\left( {y{y^T}} \right) = E\left( {x{y^T}} \right) = E\left( {x{{\left( {Hx + n} \right)}^T}} \right) = {H^T}\\
A\left( {H{H^T} + {\sigma ^2}I} \right) = {H^T}\\
A = {H^T}{\left( {H{H^T} + {\sigma ^2}I} \right)^{ - 1}}
\end{array}\]


至此就求得了矩陣A,從而得到了MIMO接收機的傳送訊號估計公式:

\[\begin{array}{l}
{{\hat x}_{MMSE}} = Ay\\
 = {H^T}{\left( {H{H^T} + {\sigma ^2}I} \right)^{ - 1}}y
\end{array}\]


利用上述方法簡介明瞭地推出了MMSE下MIMO接收機發送訊號估計公式。利用矩陣的跡的性質還可以簡便地推出最小二乘法的表示式。讀者可以嘗試。這在部落格http://blog.csdn.net/acdreamers/article/details/44662633得到了實現。