Find function subject to constraints using Fast Fourier Transform (FFT)

138 Views Asked by At

I have two known functions $I(x)$ and $d(x)$ and I seek to find $W(x)$. In particular:

\begin{equation} \begin{split} I(x) = \int_{-\infty}^{\infty} W(x_0) d(x-x_0) dx_0 \\ \end{split} \end{equation}

This problem is simple since resembles a convolution. I can Fourier Transform both sides $F()$, rearrange algebraicly, and then inverse Fourier Transform $F^{-1}()$ to find $W(x)$: \begin{equation} F(I) = F(W)F(d) \end{equation} \begin{equation} W(x) = F^{-1}\left(\frac{F(I)}{F(d)}\right) \end{equation}

However, in practice, I seek to find the "best" $W(x)$ subject to the constraints that $0 \leq N(\Psi) \leq 1$. Where $N$ is a known function of $W$. Specifically, $N=G(W)=\int_{-\infty}^{\infty}W(x_0)e^{-kg(x_0,\Psi)^2} dx_0$. Where $k$ is a 'large' constant and $g(x_0,\Psi)$ is a known function. As a bit of extra information, I know that $0\leq I\leq1$ and $0<d\leq 1$ for all $x$. How can I find $W(x)$?

First (unsuccessful) attempt:
Write the problem as a nonlinear least squares minimization problem with inequality constraints.

\begin{equation} \textrm{min} \int_{-\infty}^{\infty} \left(I(x) - \int_{-\infty}^{\infty} W(x_0) d(x-x_0) dx_0\right)^2 dx \end{equation} \begin{equation} \textrm{subject to}\\ -N\leq 0 \\N-1 \leq 0 \end{equation}

For simplicity, define the term $\Delta$ as: \begin{equation} \Delta(x,W(x)) = I(x) - \int_{-\infty}^{\infty} W(x_0) d(x-x_0) dx_0 \end{equation}

Now apply try and write the Lagrangian to write this as a modified unconstrained minimization problem. $\mu_1$ and $\mu_2$ are constants. \begin{equation} \textrm{min} \int_{-\infty}^{\infty} \Delta^2 dx + \mu_1(-N) + \mu_2(N-1) \\ = \textrm{min} \int_{-\infty}^{\infty} \Delta^2 dx + \mu_1(-G(W)) + \mu_2(G(W)-1) \end{equation}

And this is where I'm stuck. I'd like to invoke the Euler Lagrange Equation. But to do that I'll need to somehow get this in the form of $\int_{-\infty}^{\infty} L(x,W,W') dx$. Then I can use the formula:

\begin{equation} \frac{\partial L}{\partial W} - \frac{d}{dx}(\frac{\partial L}{\partial W'})=0 \end{equation}

However in my case, $L$ does not contain $W'$ so this would simplify to: \begin{equation} \frac{\partial L}{\partial W}=0 \end{equation}

Second (unsuccessful) attempt:
This time do a least squares minimization for each $x$. In this sense $x$ is a constant. \begin{equation} \textrm{min} \left(I(x) - \int_{-\infty}^{\infty} W(x_0) d(x-x_0) dx_0\right)^2 dx \end{equation} \begin{equation} \textrm{subject to}\\ -N\leq 0 \\N-1 \leq 0 \end{equation} Define the Lagrangian to be \begin{equation} L(W,\mu_1,\mu_2) = \Delta(W)^2+\mu_1(-G(W)) + \mu_2(G(W)-1) \end{equation}

The dual problem is then \begin{equation} \textrm{max } h(\mu_1,\mu_2) \end{equation} \begin{equation} \textrm{subject to} \end{equation} \begin{equation} \mu_1>0, \mu_2>0 \end{equation} Where \begin{equation} h(\mu_1,\mu_2) = \textrm{min } L(W,\mu_1,\mu_2) \end{equation} To find $h$, I need to solve for $\frac{\partial L}{\partial W}=0$.

\begin{equation} \frac{\partial L}{\partial W} = 2\Delta \frac{\partial \Delta}{\partial W} + \frac{\partial G}{\partial W} (\mu_2 - \mu_1) - \mu_2 = 0 \end{equation}

And this is where I'm stuck because I have no idea how to evaluate $\frac{\partial \Delta}{\partial W}$ or $\frac{\partial G}{\partial W}$.

Third (unsuccessful) attempt:
Try and use discrete optimization. Represent the functions $I(x)$, $W(x)$, with vectors $I$ (not identity!), $W$. The matrix $D$ is circulant. In this case, the minimization can be written as a 2-norm minimization with constraints:

\begin{equation} \textrm{min }||I-DW||^2 + \mu_1(-N) + \mu_2(N-1) \end{equation}

Let $\mu = \begin{bmatrix} \mu_1 \\ \mu_2 \end{bmatrix}$, and let $C = \begin{bmatrix} -N \\ N-1 \end{bmatrix} = \begin{bmatrix} -G(W) \\ G(W)-1 \end{bmatrix}$, and so this minimization turns into

\begin{equation} \textrm{min }||I-DW||^2 + \mu^T C \end{equation}

My idea is to turn this constrained minimization into an unconstrained minimization with a modified vector $\tilde I$.

\begin{equation} \label{modified min} \textrm{min }||\tilde I-DW||^2 \end{equation}

The unmodified minimization terms expand into:

\begin{equation} (DW-I)^T(DW-I) + \mu^TC \\ W^TD^TDW + (\mu^TC-2I^TD)W+I^TI \end{equation}

The modified minimization terms expand into:

\begin{equation} (DW-\tilde I)^T(DW-\tilde I)\\ W^TD^TDW + (-2\tilde I^TD)W+\tilde I^T \tilde I \end{equation}

For both of these minimums to be the same, the 2nd order and 1st order terms must be the same. The constants will have no effect. Equating the 1st order coefficients yields:

\begin{equation} \mu^TC-2I^TD = -2\tilde I^TD \\ \tilde I = I - \frac{1}{2} (D^T)^{-1}C^T\mu \end{equation}

This is a useful result because once I find this modified vector $\tilde I$ then I no longer need to worry about the constraints anymore. Hence $W$ is given by:

\begin{equation} W = (D^TD)^{-1}D^T \tilde I \end{equation}

But I'm still stuck because I don't know the best way to find $\mu$.