minimize the following function:

$$\sum^n_{v=1}\left(S_{1v} - t \frac{(1-p_v)\sin r_v }{1-p_v\cos r_v }\right)^2 + \left(S_{2v} - t \frac{(1-p_v)\sin (6r_v) }{1-p_v\cos (6r_v) }\right)^2$$

subject to inequality constraints:

$$\begin{bmatrix}-t \\ p_v -1 \\ -p_v \\ r_v - \pi/12 \\ -r_v\end{bmatrix} \le 0$$

where $S_1, S_2, p, r$ are vectors with $n$ elements, $t$ is a scalar, and $v=1,..., n$

$S_1$ and $S_2$ are the observations. $t$, $r$ and $p$ are the unknowns. I have very good initial values for $r$ and $p$. My question is: how to estimate $t$, $r$ and $p$?

  • 1
    $\begingroup$ You are minimizing over unknown real scalar $t$ and functions $p, r$? In what function space? $\endgroup$ – user7530 Sep 13 '13 at 13:13
  • $\begingroup$ First of all, please typeset the formula here using LaTeX between to $'s for future searchability, and give the question a less ambiguous title. Second, are your $r(v)$ actually supposed to be vector components $r_v$? $\endgroup$ – Tobias Kienzler Sep 13 '13 at 13:18
  • $\begingroup$ Sorry, I was not clear. p=[p(1), p(2), ..., p(n)] and r=[r(1), r(2), ..., r(n)]. p(v) and r(v) are the elements in vector p and r. S1 and S2 are defined in the same way. $\endgroup$ – user94677 Sep 13 '13 at 13:18
  • 1
    $\begingroup$ So the notation is awful, you should use indices instead of parentheses. Anyway, you could start with substitutions like $t =: \tau^2$ to make some of these requirements unnecessary (assuming everything is real-valued) $\endgroup$ – Tobias Kienzler Sep 13 '13 at 13:21
  • $\begingroup$ Thanks for the edit, I pimped the LaTeX a bit to make it look more similar to the images. Also, welcome to math.SE! Take a minute to read the about page to learn about how StackExchange differs from a usual forum (also, you get a shiny badge ;) $\endgroup$ – Tobias Kienzler Sep 13 '13 at 13:35

First note how your constraints can be fulfilled by the following substitutions:

$$\begin{align} t\ge 0 &\Rightarrow t =: \tau^2, \\ 0\le p_v\le 1 &\Rightarrow p_v =: \frac{1+\tanh\alpha_v}2, \\ 0\le r_v\le \frac\pi{12} &\Rightarrow r_v =: \frac\pi{12}\frac{1+\tanh\beta_v}2 \end{align}$$

That transforms the constraints into $\tau, \alpha_v, \beta_v\in\mathbb R$. Now do the usual, i.e. build the derivatives of your expression with respect to all these unknowns, set them all equal to zero and solve the resulting system of equations, discarding any non-real $\tau,\alpha_v,\beta_v$ and reverse the substitution.

(The choice of $(1+\tanh\alpha)/2$ was arbitrary, you could use any other function that maps to $[0,1]$, e.g. $\sin^2\alpha$, though that would yield too many solutions)

edit As for minimizing this, note that you're summing squares, so the minimum must be $\ge0$, and it is exactly zero iff each term vanishes individually. Shouldn't that actually be solvable analytically?

  • $\begingroup$ Thank you very much for the help. Then how to solve the equations quickly? I have a large $n$: $n>500000$ $\endgroup$ – user94677 Sep 13 '13 at 14:05
  • $\begingroup$ You are right. It will be great if I can minimize each tern individually. The problem is $t$ is a kind of global variable. I don't know how to deal with $t$ in this case. $\endgroup$ – user94677 Sep 13 '13 at 14:09
  • $\begingroup$ Well $t>0$ basically rescales your $S_{kv}$'s to $S_{kv}/t$ $(k=1,2)$, so you could pull that out of the system $\endgroup$ – Tobias Kienzler Sep 13 '13 at 14:16
  • $\begingroup$ Do you mean to do it iteratively? First to pull $t$ out of the system, estimate $p$ and $r$, then update $t$ and get new $S_{kv}/t$, then re-calculate $p$ and $r$ ... $\endgroup$ – user94677 Sep 13 '13 at 14:22
  • $\begingroup$ Can't you set each parentheses equal to zero individually and solve for the occuring $p_v,r_v,t$? Or are the solutions outside the allowed domain? $\endgroup$ – Tobias Kienzler Sep 13 '13 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.