Optimal static feedback gain matrix for stabilization Consider a system
$$
\dot{x}(t) = (A+KC)x(t) + K w(t)
$$
where $w(t)\in\mathbb{R}^m$ is an unknown disturbance; $A\in\mathbb{R}^{n\times n}$ and $C\in\mathbb{R}^{m\times n}$ are known matrices with $(A,C)$ being a detectable pair; and $K\in\mathbb{R}^{n\times m}$ is a design matrix that must minimize $\mathcal{H}_2$-norm of transfer matrix
$$
T_K(s) = [sI - (A+KC)]^{-1} K.
$$
That is,
$$\boxed{\begin{array}{cl}
\displaystyle \min_{K\in\mathbb{R}^{n\times m}} & \mbox{trace}(W_K) \\
\mbox{subject to} & A+KC ~\mbox{is Hurwitz}
\end{array}}$$
where $\|T_K\|_{\mathcal{H}_2}=\sqrt{\mbox{trace}(W_K)}$ and
$$
W_K = \int_0^\infty \exp((A+KC) t) KK^T \exp((A+KC)^T t) dt
$$
is the controllability gramian of $(A+KC,K)$.
I discussed with some researchers who told me that this problem can be solvable using LMIs, however, they don't know how and they didn't give me any reference. I checked several books on robust control and I see that this problem is related to (1) disturbance attenuation problem and (2) optimal static feedback design under noise. However, the problem setups in (1) and (2) are different and I cannot figure out how to solve this problem. Any help will be appreciated. The solution regarding $\mathcal{H}_\infty$ is also welcomed. Thank you.
 A: Because $A + K\,C$ is Hurwitz it can be shown that the Gramian can also be calculated by solving
$$
(A + K\,C)\,W + W\,(A + K\,C)^\top = -K\,K^\top. \tag{1}
$$
Furthermore, it can also be shown that the optimal solution has to satisfy
$$
K = -W\,C^\top. \tag{2}
$$
Substituting $(2)$ in $(1)$ yields the following algebraic Riccati equation
$$
A\,W + W\,A^\top - W\,C^\top C\,W = 0, \tag{3}
$$
which has a positive definite solution for $W$ if $A$ is not singular. This is also the algebraic Riccati equation associated with the stationary continuous time Kalman filter with the covariance of the process noise being zero.

It can be noted that the associated Hamiltonian matrix, which can be used to obtain the solution to $(3)$ such that $A + K\,C$ is Hurwitz, is given by
$$
H = 
\begin{bmatrix}
A^\top & -C^\top C \\
0 & -A
\end{bmatrix},
$$
which due to its upper block triangular structure implies that $H$ has the same eigenvalues as $A$ and $-A$. The resulting Hurwitz $A + K\,C$ has the same eigenvalues as the negative eigenvalues of $H$. Therefore, for each eigenvalue $\lambda$ of $A$ the matrix $A + K\,C$ has the eigenvalue $-|\lambda|$. Thus if $A$ is already Hurwitz means that $A + K\,C$ has the same eigenvalues and thus $K=0$.
