So, the dreaded convexity proof.
Let us assume that the variable that I need to retrieve has size (2,1). (can be envisaged as x = [x1 x2])
Let K be a constant vector of size (3,1). [K1 K2 K3]
Let G be a constant vector of size (3,1). [G1 G2 G3]
In this case, my quantity of interest is a vector X which represents the following quantity:
X = [G1exp(K1*x1)+G2exp(K2*x1)+G3exp(K3*x1) G1exp(K1*x2)+G2exp(K2*x2)+G3exp(K3*x2)]
exp(ax) is a convex function and so the sum of exp(ax) should be a convex function too. So, I concluded that the vector X contains convex terms.
Next step is to minimize the error between these terms and the observed value. Let the observed value be represented by
Meas too has two elements. Each element correspond to the respective elements of X. In other words, I want to minimise the difference between X and M, i.e:
The obvious way to minimise this was to take the norm. Since, X was a convex entity, it seemed okay to me until this requirement for the argument of norm to be affine popped up. I know this is not expected at this forum to ask this, but I am really not able to figure out why this is not affine (PS: I did go through the CVX manual).
Anyways, your idea of declaring exp_xdottimesK does seem plausible. Its just that it increases the number of variables. So just to confirm I think you mean I define something like
y = A(i).*((exp(x(i).*K))) as my declared variable. I did a mini test like this:
for i = 1:50
E = y(:,i);
E_final = [zeros(3,1);E];
X(i,1) = sum(G.*E_final);
The idea is once I get y as a 40 x 50 matrix, I need to recover the (50,1) vector, by using the (40,1) K values. More specifically, each column represents the dot product corresponding to the one of the 50 elements of x.
So, when I run this, it doesn’t show any DCP error. The code runs with status as primal and dual feasible. I can’t say if the solution is good or not because I didn’t do the ‘post processing’ of evaluating the values of x from the solution y given by CVX.
So another question (last I promise)
What if instead of the above expression of
y = A(i).*((exp(x(i).*K))) , I had
y = (A./x).*((exp((1/x).*K)))
This is convex only for x>0 and I understand not acceptable as per DCP rules… But I wonder if a similar substitution with another variable y could be used in this approach where I add a constraint of