3
$\begingroup$

How to evaluate gradient of this function ?

$$\displaystyle f(\mathbf{x}) = \sum_{l=1}^{N-1} \left(|\sum_{k=1}^Nx_k^2e^{-j\frac{2\pi}Nkl}| - A\sum_{k=1}^Nx_k^2\right)^2 $$

$\mathbf{x}$ is a real vector.

Even knowing how to evaluate gradient of $\displaystyle \left|\sum_{k=1}^Nx_k^2e^{-j\frac{2\pi}Nkl}\right|$ is so useful for me.

The most difficult part for me is the $|h(x)|$ function! what is its derivative? If $h(x)$ was a real function its derivative would be $h'(x) sgn (h(x))$! But here it is not!

$\endgroup$
6
  • $\begingroup$ Where did you get this problem? very complicated $\endgroup$
    – Chris kim
    Jul 27, 2013 at 9:01
  • $\begingroup$ @Chriskim It is not complicated for those who are in this field! $\endgroup$
    – user87882
    Jul 27, 2013 at 9:15
  • $\begingroup$ Why is there the absolute value at all? It seems to me that the value under the abs is always positive (sum of squares multiplied by positive coefficients)... $\endgroup$ Jul 27, 2013 at 9:24
  • $\begingroup$ Here it is magnitude, value under it is a complex value! $\endgroup$
    – user87882
    Jul 27, 2013 at 9:25
  • $\begingroup$ So, $i$ in the exponential is $\sqrt{-1}$? You know, it's also a summation index in you formula, which might cause some confusion. $\endgroup$ Jul 27, 2013 at 9:27

1 Answer 1

2
$\begingroup$

As a preliminary, let us begin with the following computation. Let $h : \mathbb{R} \to \mathbb{C}$ be the (differentiable) function $a x^2 + b$, $a,b \in \mathbb{C}$, and $g(x) = |h(x)|$; we will compute $g'(x)$. First, note that: $$ (g^2)'(x) = (h \cdot \bar{h})'(x) = h(x) \cdot \bar{h}'(x) + \bar{h}(x) \cdot h'(x) \\ = 2 ax (\bar{a}x^2 + \bar{b}) + 2 \bar{a}x (x^2 + b) = 4 \bar{a}a x^3 + 4 \Re \bar{a}b x = 4x \bar{a} \Re h(x)$$ So, we have $$g'(x) = \frac{(g^2)'(x)}{2g(x)} = \frac{2x \bar{a} \Re h(x)}{g(x)} $$

It follows that in your problem, if you put $h(\mathbf{x}) := \sum_k x^2_k e^{j \alpha_k}$ (with $\alpha_k = \frac{2 \pi kl}{N}$, dependent implicitly on $l$) you get:

$$ \frac{\partial |h(\mathbf{x})|}{\partial x_m} = \frac{2x_m e^{j \alpha_m} \Re h(\mathbf{x})}{|h(\mathbf{x})|} = \frac{2x_m e^{j \alpha_m} \sum_k x_k^2 \cos \alpha_k }{\sqrt{ \left(\sum_k x_k^2 \cos \alpha_k\right)^2+\left(\sum_k x_k^2 \sin \alpha_k\right)^2}} $$

I hope you can use this to compute $\frac{\partial f(\mathbf{x}|}{\partial x_m}$, and hence the gradient. My impression is that it should be doable, but terribly messy.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .