2
$\begingroup$

I'm trying to calculate a 2x2 covariance matrix in Cartesian coordinates that represents the amount of uncertainty when rotating and translating a point in 2D space,

$\Sigma = \begin{pmatrix} \sigma_{xx}&\sigma_{xy}\\ \sigma_{yx}&\sigma_{yy} \end{pmatrix}$

The position of a point in 2D space is represented by a vector,

$p= \begin{pmatrix} x\\y \end{pmatrix}$

I then rotate and translate this point to a new position as follows,

$p'=Rp + t$

where $R$ is a 2D rotation matrix given by,

$R= \begin{pmatrix} \cos\theta & -\sin\theta\\ \sin\theta & \cos\theta \end{pmatrix}$

and t is a translation vector given by,

$t= \begin{pmatrix} t_x\\t_y \end{pmatrix}$

If I assume independent Gaussian noise on the translations $(t_x, t_y)$ and the rotation angle $\theta$, then I can perform a simple Monte Carlo simulation to see what the true uncertainty should look like, by passing many sampled points through the rotation and translation function.

enter image description here

In the above image, the blue point is the original 2D point, the green point is the rotated and translated 2D point, and the small red dots are the samples with random noise applied to $t_x, t_y$ and $\theta$.

As such, I know that my covariance matrix is a function of the amount of uncertainty in rotation and translation. However, I'm struggling to produce an analytical expression for this covariance matrix (the true distribution is nonlinear due to rotation, but I'm content with a linear representation of the covariance matrix that assumes small amounts of rotation)

So my question is, given that I know the equations to move a point to a new position using rotation and translation, how do I use these equations to derive an analytical expression for the amount of uncertainty in this rotation and translation represented by a 2x2 covariance matrix in 2D Cartesian coordinates?

$\endgroup$
2
  • 1
    $\begingroup$ Gaussian noise for an angle is a strange model. What is the conceptual basis for that choice? $\endgroup$
    – whuber
    Commented Mar 31, 2023 at 19:10
  • $\begingroup$ The von Mises distribution for the angle would do the trick. $\endgroup$
    – krkeane
    Commented Apr 28, 2023 at 18:56

1 Answer 1

2
+25
$\begingroup$

If you are content with linear small rotation angle approximation, then you have

$$ R \approx \mathbb{I} + d\theta \begin{pmatrix} 0 & -1 \\ 1 &0 \end{pmatrix}$$

so

$$ Rp \approx p + d\theta \begin{pmatrix} -y \\ x \end{pmatrix} .$$

Assuming that $d\theta$ has a normal distribution with variance $\sigma_\theta^2$, then the covariance matrix of $Rp$ is given by

$$ Cov(Rp) = \begin{pmatrix} -y \\ x \end{pmatrix} \sigma_\theta^2 \begin{pmatrix} -y & x \end{pmatrix} = \sigma_\theta^2 \begin{pmatrix} y^2 & -xy \\ -xy & x^2 \end{pmatrix}.$$

If you further assume that $t_x$ and $t_y$ are independent, having normal distribution with variance $\sigma_t^2$, then the covariance matrix of $t$ is $\sigma_t^2$ times the unit matrix. The covariance matrix of the sum is just the sum of covariance matrices:

$$Cov(p')=Cov(Rp)+Cov(t)= \sigma_\theta^2 \begin{pmatrix} y^2 & -xy \\ -xy & x^2 \end{pmatrix} + \sigma_t^2 \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}.$$

$\endgroup$
2
  • $\begingroup$ I think this approach would work in general (not just small $\theta$) with two rotations: the intended rotation $R_\theta$ followed by the "noise" rotation $R_{d \theta}$ (for small noise): $p^\prime = R_{d \theta} R_\theta p + t + \epsilon$ where $\epsilon = [ \epsilon_x,~\epsilon_y]^\textrm{T}$. $\endgroup$
    – krkeane
    Commented Apr 28, 2023 at 19:05
  • 1
    $\begingroup$ Right, adding a rotation by a fixed angle just changes what we consider to be the starting point for this calculation $\endgroup$
    – J. Delaney
    Commented Apr 30, 2023 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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