13

I have an overdetermined system of $m$ equations ($i = 1, 2, \dots, m$) $$ \sum_{j=1}^n A_{ij} \, x_j = y_i \pmod{2\pi} $$ where the $x$ coefficients are unknown, and $m > n$. This is, essentially, the linear least squares problem but on $\mathbb{R}/\mathbb{Z}$. But I have no idea if there is a good way to solve or work with this kind of problem.


For context, I am trying to solve for phases of some set of $m$ equations involving complex variables,

$$ y_i = \prod_{\{j\}} x_j $$

where $i = 1, 2, \dots, m$, ${j}$ is some subset of $j = {1, 2, \dots, n}$ and $m > n$. If you take the logarithm of this equations,

$$ \ln(y_i) = \sum_{\{j\}} \ln(x_j) $$

which can be written as

$$ \ln(y_i) = \sum_{j=1}^{n} A_{ij} \ln(x_j) $$

where $A_{ij}$ is a term that is either $0$ or $1$ depending on whether the corresponding $x_j$ showed up in the product above.

Taking the imaginary part of this equation, I get a set of linear equations involving just the phases (arguments) of the complex variables but since phases wrap around every $2 \pi$, I don't think I can solve these in the regular linear least squares manner.

XYZT
  • 1,065
  • Shouldn't the $y$'s in the second set of equations be subscripted with $i$? Are the real parts of $\ln(x_i)$ all equal? – T L Davis Apr 14 '17 at 16:18
  • Sorry I should've mentioned, the "context" section variable names aren't consistent with the main problem stated above. I just quickly wrote an example to explain why I was doing this without thinking about matching variables! I've tried to fix this now! – XYZT Apr 14 '17 at 16:20
  • Now I'm wondering why the $A_{ij}$ terms don't show up in the second set of equations. – T L Davis Apr 14 '17 at 16:39
  • @TLDavis: I have tried to fixed the question to be more consistent, does that seem reasonable to you now? – XYZT Apr 14 '17 at 18:38
  • 3
    I'm not sure if I understand: Is it correct that you want to find $ \arg\min_{x \in \mathbb R^n, k \in \mathbb Z^m} \Vert Ax-y + 2\pi k\Vert_2^2$? – flawr Apr 15 '17 at 08:50
  • I think so. Though, I am not familiar with what the subscript $2$ means. – XYZT Apr 15 '17 at 08:55
  • Ah I just mean the usual $2$-norm: $\Vert x \Vert_2 = \sqrt{\sum_i x_i^2}$ – flawr Apr 15 '17 at 08:57
  • 1
    In that case, yes! Exactly! – XYZT Apr 15 '17 at 08:58
  • Is it the same $ k $ for all elements of $ \boldsymbol{y} $ or is it per element? – Royi Dec 27 '20 at 18:28
  • @Royi per element. – XYZT Dec 28 '20 at 02:00

1 Answers1

1

First, from the description of your problem, I don't think it shall be framed as least square under modulo arithmetics. But I think it shall minimize circular distance between phases.

I'm not sure if there is a closed-form solution, but if I were you and I'm dealing with a practical problem, I will try optimization / gradient descent.

In ML setup your question can be framed as predictors $X$ linearly predicts the phase $\hat y$ but the loss / distance between $y$ and $\hat y$ will be 2pi circular distance instead of linear distance. Then you can optimize the loss / maximize log likelihood of data by grad descent your parameters $A$.

Here is a reference for circular distance regression.

https://www.tandfonline.com/doi/abs/10.1080/02664769922160