linear least squares -- complex observations, real estimate constraint Consider the following least squares optimization problem:
$$
\hat{x} = \arg\min_x \| y - A x\|^2
$$
where the observations are complex $y\in{\cal C}^{N\times 1}$, and the complex design matrix $A\in {\cal C}^{N\times K}$ is full rank ($K$).  Is there a simple closed-form solution if $x$ is constrained to be real (i.e., $x\in{\cal R}^{K \times 1}$)?

Let
\begin{align}
f(x) := \|y - Ax\|_2^2 := \left( y - Ax \right)^*: \left( y - Ax \right),
\end{align}
where $()^*$ is complex conjugate. 
Now, let us compute the gradient of $f(x)$ (by computing the differential first), i.e.,
\begin{align}
df(x) 
&= \left[ -A^*dx: \left( y - Ax \right) \right] + \left[ \left( y - Ax \right)^*: -A dx \right] \\
&= \left[ \left( y - Ax \right): -A^*dx \right] + \left[ -A^T\left( y - Ax \right)^*: dx \right] \\
&= \left[  -A^H\left( y - Ax \right):dx \right] + \left[ -A^T\left( y - Ax \right)^*: dx \right] \\
&= \left[\left(  -A^H\left( y - Ax \right) \right) + \left( -A^T\left( y - Ax \right)^*\right) \right]: dx
\end{align}
The gradient is set to zero, such that
\begin{align}
\frac{\partial f(x)}{dx} &=  A^H\left( y - Ax \right)+ A^T\left( y - Ax \right)^* = 0 \\
&\Rightarrow x = \left( A^HA + A^TA^*\right)^{-1} \left(A^Hy + A^Ty^* \right).
\end{align}
