Solving system of non-linear equations with 2 unknowns.

116 Views Asked by At

I have these system of equations that I'm solving for a 3DoF robotic joint. I've come to the pinnacle of the problem and I'm kinda stuck.

Here $P_x$, $P_y$, $P_z$ and $a_1$, $a_2$, $a_3$ are known constants and $\theta_1$, $\theta_2$ and $\theta_3$ are unknowns to be found.

$\begin{bmatrix}cos(\theta_1).P_x + P_y.sin(\theta_1)\\cos(\theta_1).P_y - P_x.sin(\theta_1)\\P_z \end{bmatrix}$ = $\begin{bmatrix} a_1 + a_2.cos(\theta_2)+a_3(cos(\theta_2).cos(\theta_3) - sin(\theta_2.sin(\theta_3)) \\0 \\a_2.sin(\theta_2) + a_3(cos(\theta_2).sin(\theta_3) + cos(\theta_3).sin(\theta_2))\end{bmatrix}$

Here taking equation 2 from the left matrix we get $\theta_1$ like this.

$$\frac{sin(\theta_1)}{cos(\theta_1)} = \frac{P_y}{P_x}$$ $$ tan\theta_1 = \frac{P_y}{P_x}$$ $$\theta_1 = arctan(\frac{P_y}{P_x})$$

thus giving us a system of 2 nonlinear equations with 2 unknowns.

$$[ cos(\theta_1).P_x + P_y.sin(\theta_1)] = [a_1 + a_2.cos(\theta_2) + a_3(cos(\theta_2).cos(\theta_3)-sin(\theta_2).sin(\theta_3))$$ $$[P_z] = [a_2.sin(\theta_2) + a_3(cos(\theta_2).sin(\theta_3) + cos(\theta_3).sin(\theta_2))]$$

How do I go about solving this? ( I have gone further solving these equations but got to no where ) could anyone please guide me on this?

1

There are 1 best solutions below

0
On

Rewrite the system as

$$\begin{cases}a_3\cos(\theta_2+\theta_3)=P_*-a_2\cos\theta_2,\\ a_3\sin(\theta_2+\theta_3)=P_z-a_2\sin\theta_2\end{cases}$$

and by adding the squares

$$a_3^2=P_*^2+P_z^2-2P_*a_2\cos\theta_2-2a_2P_z\sin\theta_2+a_2^2.$$

This is a classical linear trigonometric equation (see for instance http://www.nabla.hr/FU-TrigFunctEquA3.htm).

Knowing $\theta_2$, you easily get $\tan(\theta_2+\theta_3)$.


As you probably know, your equations describe a two-bars mechanism, which can be solved directly by the triangle formulas. You made them more complicated by expanding the sum of angles.

enter image description here