Solving 4 unknown angles in a Quadrilateral given 4 sides and a constraint

361 Views Asked by At

I am trying to calculate the interior angles of a Quadrilateral when given the lengths of the sides and an equal angle constraint. Here is the diagram: Quadrilateral Diagram

The Equations I have so far as follows (mostly the cosine rule, but also the constraint that I want to use): $$ \theta_a + \theta_b + \theta_c +\theta_d = 2\pi \\ e^2 = a^2 + b^2 - 2 a\times b\times \cos\theta_b \\ e^2 = c^2 + d^2 - 2 c\times d\times \cos\theta_d \\ f^2 = b^2 + c^2 - 2 b\times c\times \cos\theta_c \\ f^2 = a^2 + d^2 - 2 a\times d\times \cos\theta_a \\ \theta_b = \theta_c $$ I have 6 equations and 6 unknowns so I think it is possible but I am struggling to re-arrange them to calculate the thetas.

I have to admit its been a while since I have done any trigonometry. This is for a 4DOF robot leg that I am trying to work out the inverse kinematics for.

3

There are 3 best solutions below

1
On

It is virtually certain that all those simultaneous quadratics will give a multitude of answers, most of which will be physically impossible.

Perhaps you could provide a set of initial conditions and use a perturbation approach to continuously solve a set of linearised equations as the leg moves.

0
On

I'm assuming lengths $a$, $b$, $c$ and $d$ are known. amd the lenghts $e$ and $f$ of the diagonals are unknown (?). The OP is unsure of that because he/she is talking about 6 unknowns but seems to say that the lengths are ``given''. Presumably the 6 unknowns are the four $\theta$-angles plus the two lengths $e$ and $f$ of the diagonals. We solve this in a Cartesian coordinate system where B is at the origin $(0,0)$ and C at the known coordinate $(b,0)$. The requirement is
$$\theta_b=\theta_c=\theta.$$ Then the coordinates of D are given by moving from C by distance $c$ along direction $\theta$: $$ d_x=b+c\cos(\pi-\theta), d_y=-c\sin(\pi-\theta); $$ $$ d_x=b-c\cos\theta, d_y=-c\sin\theta . $$ The coordinates of A are given by moving from B by distance $a$ along direction $\theta$: $$a_x=-a\cos(\pi-\theta), a_y=-a\sin(\pi-\theta); $$ $$ a_x=a\cos\theta, a_y=-a\sin\theta. $$ [The clumsy formulas with the complementary $\pi-\theta$ originate from the fact that in the figure the sides $a$ and $c$ are hanging down from B and C.] Furthermore the Euclidean distance from A to D is $d$. The squared Euclidean distance is the sum of the squares of the differences in the $x$ and $y$-coordinates (Pythagoras): $$ d^2=[d_x-a_x]^2+[d_y-a_y]^2 $$ $$ =[b-c\cos\theta-a\cos\theta]^2+[-c\sin\theta +a\sin\theta]^2 $$ $$ =4ac\cos^2 \theta -2(a+c)b\cos\theta+b^2+(a-c)^2. $$ This is a quadratic equation for $\cos\theta$ which can be solved by middle school algebra: $$ \cos^2 \theta -\frac{(a+c)b}{2ac}\cos\theta+\frac{b^2+(a-c)^2-d^2}{4ac}=0. $$ $$ \cos\theta = \frac{(a+c)b}{4ac}\pm \frac{1}{4ac}\sqrt{b^2(a-c)^2-4ac(a-d-c)(a+d-c)}. $$ This will give two values for $\cos\theta$ (if the determinant is non-negative), but the one outside the range [-1,1] can be discarded, and 4 values for $\theta$ by taking the two branches of the $\arccos$ (equivalent to flipping the entire figure).

The easiest way to get the other angles is then to compute $$ e^2=(a_x-c_x)^2+(a_y-c_y)^2 = a^2+b^2-2ab\cos\theta $$ and $$ f^2=d_x^2+d_y^2 = c^2+b^2-2bc\cos\theta $$ and to get the other two angles with the (corrected) cosine rules.

0
On

Just use each of the cosine rules to find each included angle. If the given values are physically consistent, then the angle constraints should be automatically satisfied.

For example

$$ \cos \theta_a = \frac{a^2+d^2-f^2}{2 a d} $$

The system is over-specified when given both $e$ and $f$, so you can go by only using one of the two lengths and the angle constraints to find the other length.