NivaarExam PrepOfficial exam papers ↗

22-Mec-B12 Robotics · December 2018

Question 7 of 7: Two-segment cubic spline through a via point with continuous acceleration (20 marks)

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

Notes on this paper

Paper format. National Exams, December 2018 — 16-Mec-B12 Robotics. Closed book, three hours, one 8.5″×11″ two-sided formula sheet and an approved Casio or Sharp calculator permitted. Seven questions, each of equal value (20 marks); the rubric states that five questions constitute a complete paper and that only the first five in the answer book are marked. As a study resource all seven are solved here. Marks shown in parentheses are the printed sub-part values.

Notation. The paper's own nomenclature is used throughout: $\hat{X}_A,\hat{Y}_A,\hat{Z}_A$ are the unit vectors of frame $\{A\}$; a leading superscript as in ${}^{A}V$ names the frame the vector is referenced to; and ${}^{B}_{A}T$ is the transform of frame $\{A\}$ expressed relative to $\{B\}$. This is Craig's convention, so Craig's modified (distal) Denavit–Hartenberg parameters are used for the link tables.

Reference texts.

Question 7: Two-segment cubic spline through a via point with continuous acceleration (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. Three path angles and two segment durations, each segment parameterised by its own local time starting at zero.

Given data
QuantitySymbolValue
Start angle$\theta_0$$-20^\circ$
Via angle$\theta_v$$45^\circ$
Goal angle$\theta_g$$25^\circ$
Segment 1 duration$t_{f1}$$4$ s
Segment 2 duration$t_{f2}$$4$ s

Find. The eight coefficients $a_{10}\ldots a_{13}$ and $a_{20}\ldots a_{23}$.

Approach. Count constraints against unknowns, write the four that fall out immediately, and solve the remaining $4\times 4$ system built from the endpoint conditions and the two continuity conditions at the via point.

  1. Count and list the constraints. Two cubics carry eight unknown coefficients, so eight conditions are required: $$ \theta_1(0) = \theta_0,\quad \theta_1(t_{f1}) = \theta_v,\quad \theta_2(0) = \theta_v,\quad \theta_2(t_{f2}) = \theta_g, $$$$ \dot\theta_1(0) = 0,\quad \dot\theta_2(t_{f2}) = 0,\quad \dot\theta_1(t_{f1}) = \dot\theta_2(0),\quad \ddot\theta_1(t_{f1}) = \ddot\theta_2(0). $$ The first four place the path through the three specified angles, the next two start and finish at rest, and the last two are the smoothness requirements the question asks for — matching acceleration as well as velocity is what distinguishes this from two independently blended cubics.
  2. Take the four free coefficients directly. Since each segment uses local time starting at zero, the constant and linear terms of the segments are read off at once: $$ a_{10} = \theta_0 = -20^\circ, \qquad a_{11} = \dot\theta_1(0) = 0, \qquad a_{20} = \theta_v = 45^\circ. $$ That leaves five unknowns — $a_{12}, a_{13}, a_{21}, a_{22}, a_{23}$ — and five unused conditions.
  3. Solve the remaining system. Writing $t_f = t_{f1} = t_{f2} = 4$ s and eliminating, the standard closed form for equal segment durations is $$ a_{12} = \frac{12\theta_v-3\theta_g-9\theta_0}{4t_f^{2}},\qquad a_{13} = \frac{-8\theta_v+3\theta_g+5\theta_0}{4t_f^{3}},\qquad a_{21} = \frac{3\theta_g-3\theta_0}{4t_f}, $$$$ a_{22} = \frac{-12\theta_v+6\theta_g+6\theta_0}{4t_f^{2}},\qquad a_{23} = \frac{8\theta_v-5\theta_g-3\theta_0}{4t_f^{3}}. $$
  4. Substitute the data. With $\theta_0 = -20$, $\theta_v = 45$, $\theta_g = 25$ degrees and $t_f = 4$ s, $$ a_{12} = \frac{540+(-75)+180}{64} = \frac{645}{64} = 10.0781, \qquad a_{13} = \frac{-360+75-100}{256} = -\frac{385}{256} = -1.5039, $$$$ a_{21} = \frac{75+60}{16} = \frac{135}{16} = 8.4375, \qquad a_{22} = -\frac{510}{64} = -7.9688, \qquad a_{23} = \frac{295}{256} = 1.1523. $$ Collecting everything, $$ \boxed{\theta_1(t) = -20 + 10.0781\,t^{2} - 1.5039\,t^{3}} $$$$ \boxed{\theta_2(t) = 45 + 8.4375\,t - 7.9688\,t^{2} + 1.1523\,t^{3}} $$ with $t$ in seconds and $\theta$ in degrees, each measured from the start of its own segment.
  5. time t (s)joint angle (degrees)012345678−20−1001020304050startvia pointgoalcubic 1cubic 2slope and curvature match here
    Figure 7.1 — the resulting trajectory. The path leaves rest at $-20^\circ$, passes through the via point at $45^\circ$ without stopping, overshoots slightly to about $47.4^\circ$, and settles at rest on the goal $25^\circ$ after 8 s.
  6. Verify every condition. Substituting back: $\theta_1(0) = -20^\circ$ and $\theta_1(4) = -20+161.25-96.25 = 45^\circ$; $\theta_2(0) = 45^\circ$ and $\theta_2(4) = 45+33.75-127.50+73.75 = 25^\circ$; $\dot\theta_1(0) = 0$ and $\dot\theta_2(4) = 8.4375-63.75+55.3125 = 0$. The two smoothness conditions give the shared via-point values $$ \dot\theta_1(4) = 2(10.0781)(4)-3(1.5039)(16) = 8.4375 = a_{21} = \dot\theta_2(0), $$$$ \ddot\theta_1(4) = 2(10.0781)-6(1.5039)(4) = -15.9375 = 2a_{22} = \ddot\theta_2(0). $$ All eight constraints are satisfied.
  7. Read the motion. The manipulator sweeps through the via point at $8.4375^\circ$/s while already decelerating at $-15.9375^\circ/\text{s}^{2}$: the spline deliberately does not stop at the via point, which is the whole purpose of blending. Segment 1 peaks at $22.5^\circ$/s at $t = 2.234$ s, and segment 2 overshoots to $47.4^\circ$ before turning back — the price of demanding continuous acceleration through a via point that lies beyond the goal.
Question 7 — spline coefficients (degrees, seconds)
CoefficientValueCoefficientValue
$a_{10}$$-20.0000$$a_{20}$$45.0000$
$a_{11}$$0$$a_{21}$$8.4375$
$a_{12}$$10.0781$$a_{22}$$-7.9688$
$a_{13}$$-1.5039$$a_{23}$$1.1523$
Via-point velocity$8.4375^\circ$/sVia-point acceleration$-15.9375^\circ/\text{s}^{2}$
Back to the paper →