1
$\begingroup$

Equation 1
$X$ = $a_1\sin(\theta_1) + a_2\cos(\theta_2)$

Equation 2
$Y$ = $a_1\cos(\theta_1) + a_2\sin(\theta_2)$

where $X, Y, a_1,a_2$ are known.

WHAT I HAVE DONE SO FAR

Let
$sin(\theta_1) = u_1$
$cos(\theta_1) = v_1$
$sin(\theta_2) = u_2$
$cos(\theta_2) = v_2$

And hence according to trig identities,
$u_1^2 + v_1^2 = 1$ (3)

$u_2^2 + v_2^2 = 1$ (4)


substituting (3) and (4) in the original equations, I obtained,
$a_2^2v_2^2 + a_1^2v_1^2 - 2Xa_2v_2 = a_1^2 - X^2$ (Equation 5)

$a_1^2v_1^2 + a_2^2v_2^2 - 2Ya_1v_1 = a_2^2 - Y^2$ (Equation 6)

$a_1^2u_1^2 + a_2^2u_2^2 - 2Xa_1u_1 = a_2^2 - X^2$ (Equation 7)

$a_1^2u_1^2 + a_2^2u_2^2 - 2Ya_2u_2 = a_2^2 - Y^2$ (Equation 8)

How do I proceed from here? These systems of 4 non-linear equation. Is developing an analytical solution possible? Or should try to find a numerical solution using some libraries?

Thanks,
Vino

  • 1
    You have a better shot at getting a thorough answer if you add a few details about what you have tried so far2017-02-04
  • 1
    Are the thetas known?2017-02-04
  • 0
    @Student sorry, solving for $\theta_1, \theta_2$. And $a_1$ and $a_2$ are known.2017-02-04
  • 0
    @polfosol I have added my workings. Please have a look.2017-02-04
  • 0
    I gave this some thought and couldn't find a nice closed form. btw, I tried solving this using Mathematica, which resulted in some highly complex and ugly expressions. I can post it if you are interested2017-02-05
  • 0
    @polfosol Pls do post if you can. I would really appreciate it. Because I need a analytical solution for this set of equations to program my robotic manipulator. I could directly use those expressions in my program and plug in the know variables. Sorry I don not have Mathematica, and also Matlab symbolic toolbox, returns an error. Thanks again :)2017-02-05

2 Answers 2

0

As I said in the comments, it looks like there is no nice closed-form solution for this. So I plugged your set of equations into Mathematica. The result is: $$\begin{align} \sin\theta_1=\frac{({a_1}^3-a_1{a_2}^2)X-\sqrt{-{a_1}^2 Y^2 \left({a_1}^4-2 {a_1}^2 \left({a_2}^2+X^2+Y^2\right)+\left(-{a_2}^2+X^2+Y^2\right)^2\right)}}{2 {a_1}^2 \left(X^2+Y^2\right)}+\frac X{2a_1}\\ \cos\theta_2=\frac{(a_1{a_2}^2-{a_1}^3)X+\sqrt{-{a_1}^2 Y^2 \left({a_1}^4-2 {a_1}^2 \left({a_2}^2+X^2+Y^2\right)+\left(-{a_2}^2+X^2+Y^2\right)^2\right)}}{2 {a_1} {a_2} \left(X^2+Y^2\right)}+\frac X{2a_2} \end{align}$$ To simplify it more, let $$\Delta=2 {a_1}^2\left(X^2+Y^2+{a_2}^2\right)-\left(X^2+Y^2-{a_2}^2\right)^2-{a_1}^4$$ then $$\begin{align} \sin\theta_1&=X\left(\frac{a_1^2-a_2^2}{2a_1(X^2+Y^2)}+\frac{1}{2a_1}\right)-Y\frac{\sqrt{\Delta}}{2a_1(X^2+Y^2)}\\ \cos\theta_2&=X\left(\frac{a_2^2-a_1^2}{2a_2(X^2+Y^2)}+\frac{1}{2a_2}\right) +Y\frac{\sqrt{\Delta}}{2a_2(X^2+Y^2)} \end{align}$$ I hope this helps.

  • 0
    Thank you so much mate :) Really appreciate it.2017-02-05
1

If you rename the trigonometric expressions wth something like $\sin(\theta_1)=u_1$, $\sin(\theta_2)=u_2$, $\cos(\theta_1)=v_1$, $\cos(\theta_2)=v_2$, and impose the additional identities $u_1^2+v_1^2=1$, $u_2^2+v_2^2=1$, then you have a system of 4 equations and 4 unknowns that you can solve.

  • 0
    Yes, substitution it is :) thank you2017-02-04
  • 0
    After substitution, its a system 4 non-linear equations. How do I go about this?2017-02-05