Derivative of Fourier Transform to phase for Gradient descent

My Problem is the following: I have the complex signal over time $$f(t) = r(t)\cdot exp(i\phi(t)) \in \mathbb{C}$$ with the corresponding discrete Fourier Transform in frequency space $$s(\omega) = DFT(f(t)), \omega = [\omega_0, \omega_N]$$. My goal is now to change the phase $$\phi(t)$$ to maximize the signal $$s(\omega)$$ in a certain region $$[\omega_a, \omega_b]$$. The idea is to use gradient descent technique for that. I thought about a cost-function like: $$c(\omega) = abs \left( \frac{\sum_{i=a}^bs(\omega_i)}{\sum_{i=0}^a s(\omega_i)+\sum_{i=b}^Ns( \omega_i)}\right)$$ that is supposed to calc the ratio of the region that I want to maximize and the sourrounding. Therefore, I need to calculate the derivate $$dc(\omega)/d\phi$$, but i fail to do so. Can anyone help me?

figure showing the real part of the signal f(t) before and after changing the phase

figure showing the magnitude of the spectrum before and after changing the phase of the signal f(t)

• What do you want to maximalize? – Botond Oct 14 '18 at 18:19
• I would like to maximize the spectrum $s(\omega)$ in the region $\omega_a$ to $\omega_b$ by changing the phase $\phi(t)$ of my original signal $f(t)$ – Lusacana Oct 14 '18 at 18:29
• I saw that, but what does it mean to maximalize a function over an intervall? Do you want to maximalize $\int_{\omega_1}^{\omega_2} s$? – Botond Oct 14 '18 at 18:32
• Yes, but since my signal is discrete, it's $\sum_{i=a}^b s(\omega_i)$. Sorry, I just realized that it was very unclear how I described my problem, is it clearer now? – Lusacana Oct 14 '18 at 18:35
• I don't quite get the problem. So you have a function $f$, and you have it's fourier transform $s(\omega)=\int \mathrm{d}t e^{- i \omega t} f(t)$, which is discrete? – Botond Oct 14 '18 at 18:39