Paden–Kahan subproblems

Paden–Kahan subproblems are a set of solved geometric problems which occur frequently in inverse kinematics of common robotic manipulators. Although the set of problems is not exhaustive, it may be used to simplify inverse kinematic analysis for many industrial robots. Beyond the three classical subproblems several others have been proposed.

Simplification strategies
For a structure equation defined by the product of exponentials method, Paden–Kahan subproblems may be used to simplify and solve the inverse kinematics problem. Notably, the matrix exponentials are non-commutative.

Generally, subproblems are applied to solve for particular points in the inverse kinematics problem (e.g., the intersection of joint axes) in order to solve for joint angles.

Eliminating revolute joints
Simplification is accomplished by the principle that a rotation has no effect on a point lying on its axis. For example, if the point $p$ is on the axis of a revolute twist $\xi$, its position is unaffected by the actuation of the twist. To wit:$$e^{\widehat{\xi}\theta}p=p$$

Thus, for a structure equation$$e^{\widehat{\xi}_1\theta_1}e^{\widehat{\xi}_2\theta_2}e^{\widehat{\xi}_3\theta_3}=g$$where $\xi_1$, $\xi_2$ and $\xi_3$  are all zero-pitch twists, applying both sides of the equation to a point $p$  which is on the axis of $\xi_3$  (but not on the axes of $\xi_1$  or $\xi_2$ ) yields$$e^{\widehat{\xi}_1\theta_1}e^{\widehat{\xi}_2\theta_2}e^{\widehat{\xi}_3\theta_3}p=gp$$By the cancellation of $\xi_3$ , this yields$$e^{\widehat{\xi}_1\theta_1}e^{\widehat{\xi}_2\theta_2}p=gp$$which, if $\xi_1$  and $\xi_2$  intersect, may be solved by Subproblem 2.

Norm
In some cases, the problem may also be simplified by subtracting a point from both sides of the equation and taking the norm of the result.

For example, to solve$$e^{\widehat{\xi}_1\theta_1}e^{\widehat{\xi}_2\theta_2}e^{\widehat{\xi}_3\theta_3}=g$$for $\xi_3$, where $\xi_1$ and $\xi_2$  intersect at the point $q$ , both sides of the equation may be applied to a point $p$  that is not on the axis of $\xi_3$. Subtracting $q$ and taking the norm of both sides yields$$\begin{aligned} \delta_i = \|gp-q\| = \|e^{\widehat{\xi}_1\theta_1}e^{\widehat{\xi}_2\theta_2}e^{\widehat{\xi}_3\theta_3}p-q\| = \|e^{\widehat{\xi}_1\theta_1}e^{\widehat{\xi}_2\theta_2}(e^{\widehat{\xi}_3\theta_3}p-q)\| = \|e^{\widehat{\xi}_3\theta_3}p-q\| \end{aligned}$$ This may be solved using Subproblem 3.

List of subproblems
Each subproblem is presented as an algorithm based on a geometric proof. Code to solve a given subproblem, which should be written to account for cases with multiple solutions or no solution, may be integrated into inverse kinematics algorithms for a wide range of robots.

Subproblem 1: Rotation about a single axis

 * Paden-Kahan Subproblem 1.pngLet $\xi$ be a zero-pitch twist with unit magnitude and $p, q \in \R^3$  be two points. Find $\theta$  such that $$e^{\widehat{\xi}\theta}p=q.$$

In this subproblem, a point $p$ is rotated around a given axis $\xi$  such that it coincides with a second point $q$.

Solution
Let $r$ be a point on the axis of $\xi$. Define the vectors $u=(p-r)$ and $v=(q-r)$. Since $r$ is on the axis of $\xi$, $e^{\widehat{\xi}\theta}r=r.$  Therefore, $e^{\widehat{\omega}\theta}u=v.$

Next, the vectors $u'$ and $v'$  are defined to be the projections of $u$  and $v$  onto the plane perpendicular to the axis of $\xi$. For a vector $\omega \in \R$ in the direction of the axis of $\xi$ ,$$u'=u-\omega\omega^Tu$$and$$v'=v-\omega\omega^Tv.$$In the event that $u'=0$, $p=q$  and both points lie on the axis of rotation. The subproblem therefore yields an infinite number of possible solutions in that case.

In order for the problem to have a solution, it is necessary that the projections of $u$ and $v$  onto the $\omega$  axis and onto the plane perpendicular to $\omega$  have equal lengths. It is necessary to check, to wit, that:$$\omega^Tu=\omega^Tv$$and that$$\|u'\|=\|v'\|$$

If these equations are satisfied, the value of the joint angle $\theta$ may be found using the atan2 function:$$\theta=\mathrm{atan2}(\omega^T(u'\times v'), u'^Tv').$$Provided that $u'\neq 0$, this subproblem should yield one solution for $\theta$.

Subproblem 2: Rotation about two subsequent axes

 * Paden-Kahan Subproblem 2.pngLet $\xi_1$ and $\xi_2$  be two zero-pitch twists with unit magnitude and intersecting axes. Let $p, q \in \R^3$  be two points. Find $\theta_1$  and $\theta_2$  such that $$e^{\widehat{\xi}_1\theta_1}e^{\widehat{\xi}_2\theta_2}p=q.$$

This problem corresponds to rotating $p$ around the axis of $\xi_2$  by $\theta_2$, then rotating it around the axis of $\xi_1$  by $\theta_1$ , so that the final location of $p$  is coincident with $q$. (If the axes of $\xi_1$ and $\xi_2$  are coincident, then this problem reduces to Subproblem 1, admitting all solutions such that $\theta_1+\theta_2=\theta$ .)

Solution
Provided that the two axes are not parallel (i.e., $\omega_1 \neq \omega_2$ ), let $c$ be a point such that $$e^{\widehat{\xi}_2\theta_2} p=c=e^{-\widehat{\xi}_1\theta_1}q.$$ In other words, $c$  represents the point to which $p$  is rotated around one axis before it is rotated around the other axis to be coincident with $q$. Each individual rotation is equivalent to Subproblem 1, but it's necessary to identify one or more valid solutions for $c$ in order to solve for the rotations.

Let $r$ be the point of intersection of the two axes:$$e^{\widehat{\xi}_2\theta_2}(p-r)=c-r=e^{-\widehat{\xi}_1\theta_1}(q-r).$$Define the vectors $u=(p-r)$, $v=(q-r)$  and $z=(c-r)$. Therefore,$$e^{\widehat{\xi}_2\theta_2}u=z=e^{-\widehat{\xi}_1\theta_1}v.$$

This implies that $\omega^T_2u=\omega^T_2z$, $\omega^T_1 v=\omega^T_1z$ , and $\|u\|^2=\|z\|^2=\|v\|^2$. Since $\omega_1$, $\omega_2$ and $\omega_1 \times \omega_2$  are linearly independent, $z$  can be written as$$z=\alpha \omega_1 + \beta\omega_2 + \gamma(\omega_1 \times \omega_2).$$

The values of the coefficients may be solved thus:$$\alpha = \frac{(\omega^T_1 \omega_2)\omega^T_2u-\omega^T_1v}{(\omega^T_1\omega_2)^2 - 1}$$$$\beta = \frac{(\omega^T_1 \omega_2)\omega^T_1v-\omega^T_2u}{(\omega^T_1\omega_2)^2 - 1}$$, and$$\gamma^2=\frac{\|u\|^2-\alpha^2-\beta^2-2\alpha\beta\omega^T_1 \omega_2}{\|\omega_1 \times \omega_2\|^2.}$$The subproblem yields two solutions in the event that the circles intersect at two points; one solution if the circles are tangential; and no solution if the circles fail to intersect.

Subproblem 3: Rotation to a given distance

 * Let $\xi$ be a zero-pitch twist with unit magnitude; let $p, q \in \R^3$  be two points; and let $\delta$  be a real number greater than 0. Find $\theta$  such that $$\|q-e^{\widehat{\xi} \theta}p\| = \delta.$$

In this problem, a point $p$ is rotated about an axis $\xi$  until the point is a distance $\delta$  from a point $q$. In order for a solution to exist, the circle defined by rotating $p$ around $\xi$  must intersect a sphere of radius $\delta$  centered at $q$.

Solution
Let $r$ be a point on the axis of $\xi$. The vectors $u=(p-r)$ and $v=(q-r)$  are defined so that$$\|v-e^{\widehat{\xi}\theta}u\|^2=\delta^2.$$

The projections of $u$ and $v$  are $u'=u-\omega\omega^Tu$  and $v'=v-\omega\omega^Tv.$  The “projection” of the line segment defined by $\delta$  is found by subtracting the component of $p-q$  in the $\omega$  direction:$$\delta'^2 = \delta^2 - |\omega^T(p-q)|^2.$$The angle $\theta_0$  between the vectors $u'$  and $v'$  is found using the atan2 function:$$\theta_0 = atan2(\omega^T(u'\times v'), u'^Tv').$$The joint angle $\theta$  is found by the formula$$\theta=\theta_0 \pm \cos^{-1} \left( \frac{\|u'\|^2 + \|v'\|^2 - \delta'^2}{2\|u'\| \|v'\|} \right).$$This subproblem may yield zero, one, or two solutions, depending on the number of points at which the circle of radius $\|u'\|$  intersects the circle of radius $\delta'$.

Subproblem 4: Rotation about two axes to a given distance

 * Let $\xi_1$ and $\xi_2$  be two zero-pitch twists with unit magnitude and intersecting axes. Let $p, q_1, q_2 \in \R^3$  be points. Find $\theta_1$  and $\theta_2$  such that $$\|e^{\widehat{\xi}_1\theta_1}e^{\widehat{\xi}_2\theta_2}p-q_1\|=\delta_1$$ and $$\|e^{\widehat{\xi}_1\theta_1}e^{\widehat{\xi}_2\theta_2}p-q_2\|=\delta_2.$$'''

This problem is analogous to Subproblem 2, except that the final point is constrained by distances to two known points.

Subproblem 5: Translation to a given distance

 * Let $\xi$ be an infinite-pitch unit magnitude twist; $p, q \in \R^3$  two points; and $\delta$  a real number greater than 0. Find $\theta$  such that $$\|q-e^{\widehat{\xi}\theta}p\|=\delta.$$