I measure velocity in two directions, x and y. My measurement ends up in the phase of a complex number and has phase wraps. Due to the nature of my measurement, the two components that I measure are slightly rotated from the actual axes of my coordinate system. I know the rotations that cause this error, which I want to use to correct my measurements.

How do I linearly combine these phases?

Maybe I should just unwrap my data and then use the result as a scalar, but I feel that there is probably a better way keeping the phase in the exponent. Also, unwrapping is not without its problems. My exact problem does not even seem to matter, I`m looking for a way to linearly add (with weights) the phase of two complex numbers. Might be close to the weighted average, which is given by the argument of the sum of two complex numbers.

This question kind of has the same problem, looking for a linear combination of circular data.

First idea

I thought I could use the fact that the argument of the sum of two complex numbers is the vector-averaged argument.

With rotation weights

$\begin{pmatrix} e^{-i \varphi_{x}} \\ 0 \end{pmatrix} R_x = \begin{pmatrix} \rho_{x\rightarrow x} \\ \rho_{x\rightarrow y} \end{pmatrix} e^{-i \varphi_{x}}$, and $\begin{pmatrix} 0 \\ e^{-i \varphi_{y}} \end{pmatrix} R_y = \begin{pmatrix} \rho_{y\rightarrow x} \\ \rho_{y\rightarrow y} \end{pmatrix} e^{-i \varphi_{y}}$

then the complex sum yields vector averaged phase

$S_{x} = \begin{pmatrix} \rho_{x\rightarrow x} \\ \rho_{x\rightarrow y} \end{pmatrix} e^{-i \varphi_{x}} + \begin{pmatrix} 1-\rho_{x\rightarrow x} \\ 1-\rho_{x\rightarrow y} \end{pmatrix} e^{-i 0} \\ S_{y} = \begin{pmatrix} \rho_{y\rightarrow x} \\ \rho_{y\rightarrow y} \end{pmatrix} e^{-i \varphi_{y}} + \begin{pmatrix} 1-\rho_{y\rightarrow x} \\ 1-\rho_{y\rightarrow y} \end{pmatrix} e^{-i 0}$

and pointwise multiplication adds phases

$S_{tot} = S_x \circ S_y$

$\Phi_{tot} = Arg(S_{tot})$

But that seems like I first just average (weighted) with $0$ and then add the results, both without accounting for wraps.

  • $\begingroup$ I keep reading your updates and it's still unclear. Are you just asking how to make sure the phase under addition is modulo $2\pi$? $\endgroup$
    – adfriedman
    Commented Sep 6, 2017 at 19:27
  • $\begingroup$ Also, "the phase of each number represents a dimension" doesn't seem to make any sense, could you explain what you meant by that. Dimension, orthogonal, aligned, etc., are all words with very particular definitions. $\endgroup$
    – adfriedman
    Commented Sep 6, 2017 at 19:28
  • $\begingroup$ I`ll try to make it clearer in the text. I measure a 2D velocity vector, but due to my measurement it ends up in the phase. Also because of my measurement, the two commponents of velocity (x and y) that I measure are slightly unaligned with the actual x and y so I need to rotate them back. Does it make more sense if I say it that way? $\endgroup$
    – Leo
    Commented Sep 6, 2017 at 19:30

1 Answer 1


Since the phase from the question represents a measurement when unwrapped, I think linearly combining them only works if I unwrap the data first. Only subtracting or adding the entire phase would not require unwrapping.

Solution with unwrapping

If my measurements were scalars (no phase wraps) I would just multiply the rotation matrix with a vector that represents my measurement. But in this case that does not work because of the phase wraps, so I think I just need to unwrap my data.

So given

$s_x = e^{-i \varphi_{x}}, s_y = e^{-i \varphi_{y}}, R_x, R_y$

I could do

$\begin{pmatrix} Unwrap(Arg(s_x)) \\ 0 \end{pmatrix} R_x + \begin{pmatrix} 0 \\ Unwrap(Arg(s_y)) \end{pmatrix} R_y = \begin{pmatrix} \varphi_{x\rightarrow x} + \varphi_{y\rightarrow x} \\ \varphi_{y\rightarrow y} + \varphi_{x\rightarrow y} \end{pmatrix} $


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .