NivaarExam PrepOfficial exam papers ↗

22-Mec-B12 Robotics · May 2016

Question 4 of 7: Inverse position kinematics — all closed-form solutions (20 marks)

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

Notes on this paper

Paper format. National Exams, May 2016 — 07-Mec-B12 Robot Mechanics, 3 hours. CLOSED BOOK, with one 8.5″×11″ formula sheet (both sides) and an approved non-programmable calculator permitted. FIVE questions constitute a complete paper and each question is of equal value (20 marks); the first five as they appear in the answer book are marked. All seven questions are worked here.

Reference texts. J. J. Craig, Introduction to Robotics: Mechanics and Control, 4th ed. (the exam's leading-super/subscript notation and the Z–Y–Z Euler convention follow this text directly); M. W. Spong, S. Hutchinson and M. Vidyasagar, Robot Modeling and Control, 2nd ed.; S. B. Niku, Introduction to Robotics: Analysis, Control, Applications, 3rd ed.; K. M. Lynch and F. C. Park, Modern Robotics, 1st ed.

Notation (from the exam's own nomenclature page). A leading superscript names the frame a quantity is referenced to, so $^{A}V$ is the vector $V$ expressed in frame $\{A\}$. A leading subscript together with a leading superscript names a transformation: $^{B}_{A}T$ describes frame $\{A\}$ relative to frame $\{B\}$, and therefore maps coordinates the other way, $^{B}P = {}^{B}_{A}T\,{}^{A}P$. Keeping that direction straight is the single most common source of lost marks on this paper, so every question below states explicitly which way the given transform points.

Check: sign convention for the revolute joint. Figure 1 shows the direction of positive motion with a curved arrow but does not label a sense on the base triad. Throughout Questions 3–6 the base frame is taken as $x_{0}$ along the horizontal arm, $z_{0}$ vertically up and $y_{0}$ completing the right-handed set, with positive $q_{2}$ following the right-hand rule about $+x_{0}$. Every result below is stated in that frame; a candidate who assigns the opposite sense obtains the same magnitudes with $q_{2}\rightarrow-q_{2}$.

Question 4: Inverse position kinematics — all closed-form solutions (20 marks)

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

Given. The forward kinematics established in Question 3, and a desired endpoint position with no joint limits imposed.

Find. Every closed-form solution $(q_{1},q_{2},q_{3})$ that places the end point at $(x_{e},y_{e},z_{e})$.

Projection on the y₀–z₀ plane at the required xₑ (two IK branches)z₀y₀(yₑ, zₑ)branch 1radius > 0branch 2radius < 0q₂radius = 2 + q₃ = ±√(yₑ² + zₑ²)The two branches differ by 180° in q₂ and by the sign of the radius; q₁ is decoupled.
Figure 4.1 — the two inverse-kinematic branches, seen in the y₀–z₀ plane. Reaching the same point with a negative radius costs a 180° change in q₂.

Approach. Take the three position equations from $^{0}_{3}T$, notice that $q_{1}$ decouples, and solve the remaining pair as a polar-coordinate problem in the $y_{0}$–$z_{0}$ plane.

  1. Write the three scalar position equations. The translation column of $^{0}_{3}T$ gives$$x_{e}=2+q_{1},\qquad y_{e}=-(2+q_{3})\sin q_{2},\qquad z_{e}=(2+q_{3})\cos q_{2}.$$Three equations in three unknowns, and the first one contains only $q_{1}$, so the system splits immediately — a direct consequence of the first joint sliding along an axis that no later joint can reorient.
  2. Solve the decoupled prismatic variable. Rearranging the first equation,$$\boxed{q_{1}=x_{e}-2}$$This has exactly one solution for any commanded $x_{e}$, so it multiplies the solution count by one and every branch below shares it.
  3. Eliminate $q_{2}$ by summing squares. Squaring and adding the second and third equations removes the trigonometry entirely, because $\sin^{2}q_{2}+\cos^{2}q_{2}=1$:$$y_{e}^{2}+z_{e}^{2}=(2+q_{3})^{2}\;\Longrightarrow\;2+q_{3}=\pm\sqrt{y_{e}^{2}+z_{e}^{2}}.$$The $\pm$ is the whole source of multiplicity in this arm. Since the question states there is no joint limit, the negative root is admissible: the slider simply passes back through its own origin and extends the other way.
  4. Recover $q_{2}$ with a two-argument arctangent. Dividing the second equation by the third,$$q_{2}=\mathrm{Atan2}\!\left(\frac{-y_{e}}{2+q_{3}},\;\frac{z_{e}}{2+q_{3}}\right),$$where the sign chosen for the radius in the previous step feeds through. Using $\mathrm{Atan2}$ rather than $\arctan(y/z)$ is essential: the single-argument form collapses the four quadrants onto two and would silently discard half the workspace.
  5. Collect the two complete solution branches. Writing $\rho=\sqrt{y_{e}^{2}+z_{e}^{2}}$,$$\boxed{\text{Branch 1:}\quad q_{1}=x_{e}-2,\quad q_{3}=\rho-2,\quad q_{2}=\mathrm{Atan2}(-y_{e},\,z_{e})}$$$$\boxed{\text{Branch 2:}\quad q_{1}=x_{e}-2,\quad q_{3}=-\rho-2,\quad q_{2}=\mathrm{Atan2}(y_{e},\,-z_{e})=\mathrm{Atan2}(-y_{e},\,z_{e})+180^\circ}$$There are exactly two, and no more: the arm has no elbow to flip and no shoulder to swing behind itself, so the sign of the radius is the only discrete choice available.
  6. Work a numerical example to confirm both branches close. Command the tip to $(x_{e},y_{e},z_{e})=(2.6,\,-1.3,\,2.1)$. Then $\rho=\sqrt{1.3^{2}+2.1^{2}}=2.470$ and $q_{1}=0.600$ in both branches, with$$\text{Branch 1: } q_{2}=31.76^\circ,\ q_{3}=0.470;\qquad\text{Branch 2: } q_{2}=211.76^\circ,\ q_{3}=-4.470.$$Substituting either triple back into $^{0}_{3}T$ returns the commanded point to full machine precision, which is the only check that actually tests the algebra end to end. Note that the two branches differ by exactly $180^\circ$ in $q_{2}$ and carry radii equal in magnitude and opposite in sign, as expected.
  7. Identify the degenerate case. If $y_{e}=z_{e}=0$ then $\rho=0$, the two branches merge, $q_{3}=-2$ and $q_{2}$ becomes arbitrary — the tip sits on the joint-3 axis and rotating the revolute joint moves it nowhere. This is a genuine kinematic singularity of the position problem and is worth stating explicitly, because a controller inverting these equations numerically will otherwise divide by zero there.
Question 4 — results
ItemBranch 1Branch 2
$q_{1}$$x_{e}-2$$x_{e}-2$
$q_{3}$$+\sqrt{y_{e}^{2}+z_{e}^{2}}-2$$-\sqrt{y_{e}^{2}+z_{e}^{2}}-2$
$q_{2}$$\mathrm{Atan2}(-y_{e},z_{e})$$\mathrm{Atan2}(-y_{e},z_{e})+180^\circ$
example $(2.6,-1.3,2.1)$$(0.600,\;31.76^\circ,\;0.470)$$(0.600,\;211.76^\circ,\;-4.470)$
number of solutionsexactly 2 (merging to a 1-parameter family when $y_{e}=z_{e}=0$)