NivaarExam PrepOfficial exam papers ↗

22-Mec-B12 Robotics · December 2019

Question 3 of 7: Cubic joint trajectory for a rest-to-rest move

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

Notes on this paper

Paper format. National Exams, December 2019 — 16-Mec-B12 Robot Mechanics. Three hours; CLOSED BOOK with one 8.5″×11″ two-sided formula sheet and an approved Casio or Sharp calculator. Five questions constitute a complete paper: Section 1 holds five questions of which the candidate answers any three, and Section 2 holds two questions which are both compulsory. Each question is worth 20 marks. All seven questions are solved here.

Reference texts.

Note. Where the printed paper rounds a value (for example the target height 1.707), the solution says so explicitly.

Question 3: Cubic joint trajectory for a rest-to-rest move (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. A single revolute joint that starts and finishes at rest, with the start angle, goal angle and travel time all specified.

Given data
QuantitySymbolValue
Initial joint angle$\theta_{0}$$-5^\circ$
Final joint angle$\theta_{f}$$80^\circ$
Travel time$t_{f}$$4\ \text{s}$
Initial joint rate$\dot\theta_{0}$$0$ (motionless)
Final joint rate$\dot\theta_{f}$$0$ (at rest at the goal)

Find. The four cubic coefficients, and the position, velocity and acceleration profiles they produce.

Approach. Four boundary conditions determine the four coefficients uniquely; impose them in the order $\theta(0),\dot\theta(0),\theta(t_{f}),\dot\theta(t_{f})$ so that the first two fall out immediately and only a 2×2 system remains.

  1. Write the derivatives. From $\theta(t)=a_{0}+a_{1}t+a_{2}t^{2}+a_{3}t^{3}$, $$\dot\theta(t)=a_{1}+2a_{2}t+3a_{3}t^{2},\qquad \ddot\theta(t)=2a_{2}+6a_{3}t.$$
  2. Apply the two initial conditions. $\theta(0)=\theta_{0}$ gives $a_{0}=\theta_{0}=-5^\circ$ at once, and $\dot\theta(0)=0$ gives $a_{1}=0$. The cubic therefore has no linear term, which is the signature of a start from rest.
  3. Apply the two final conditions. With $a_{0}$ and $a_{1}$ known, $$\theta(t_{f})=\theta_{0}+a_{2}t_{f}^{2}+a_{3}t_{f}^{3}=\theta_{f},\qquad \dot\theta(t_{f})=2a_{2}t_{f}+3a_{3}t_{f}^{2}=0.$$ Solving the pair gives the standard rest-to-rest result $$a_{2}=\frac{3(\theta_{f}-\theta_{0})}{t_{f}^{2}},\qquad a_{3}=-\frac{2(\theta_{f}-\theta_{0})}{t_{f}^{3}}.$$
  4. Substitute the numbers. The travel is $\theta_{f}-\theta_{0}=80-(-5)=85^\circ$ over $t_{f}=4\ \text{s}$, so $$a_{2}=\frac{3(85)}{16}=15.9375\ \text{deg/s}^{2},\qquad a_{3}=-\frac{2(85)}{64}=-2.65625\ \text{deg/s}^{3}.$$ Collecting all four, $$\boxed{\theta(t)=-5+15.9375\,t^{2}-2.65625\,t^{3}\ \ [\text{deg}]}$$
  5. Verify the endpoints. $\theta(4)=-5+15.9375(16)-2.65625(64)=-5+255-170=80^\circ$ and $\dot\theta(4)=2(15.9375)(4)+3(-2.65625)(16)=127.5-127.5=0$, so both goal conditions are met exactly.
  6. Extract the profile features that the plot must show. The velocity $\dot\theta=31.875\,t-7.96875\,t^{2}$ is a downward parabola peaking at $t=t_{f}/2=2\ \text{s}$, where $$\dot\theta_{\max}=\frac{3(\theta_{f}-\theta_{0})}{2t_{f}}=31.875\ \text{deg/s},$$ and the acceleration $\ddot\theta=31.875-15.9375\,t$ is a straight line running from $+31.875\ \text{deg/s}^{2}$ at $t=0$ to $-31.875\ \text{deg/s}^{2}$ at $t=4\ \text{s}$, crossing zero at the mid-point. At $t=2\ \text{s}$ the position is $37.5^\circ$, the exact average of the two endpoints — a cubic rest-to-rest profile is antisymmetric about its mid-point.
  7. Convert to radians for a controller. Multiplying by $\pi/180$, $a_{0}=-0.08727\ \text{rad}$, $a_{1}=0$, $a_{2}=0.27816\ \text{rad/s}^{2}$ and $a_{3}=-0.04636\ \text{rad/s}^{3}$; the peak rate is $0.5564\ \text{rad/s}$.
position θ(t) [deg]80-5midpoint 37.501234time t [s]angular velocity dθ/dt [deg/s]31.880peak 31.875 deg/s01234time t [s]0angular acceleration d²θ/dt² [deg/s²]31.87-31.87+31.875−31.87501234time t [s]
Position, velocity and acceleration for the cubic. Note the parabolic velocity peaking at mid-travel and the linear acceleration that steps discontinuously at both ends — the price of a cubic rather than a quintic.

The profile is smooth in position and velocity but its acceleration jumps discontinuously at $t=0$ and $t=t_{f}$, which excites structural modes on a real arm. Where that matters the same boundary-value method is applied to a quintic with two extra conditions $\ddot\theta(0)=\ddot\theta(t_{f})=0$.

Final results
QuantitySymbolValue
Constant term$a_{0}$$-5^\circ$ ($-0.08727\ \text{rad}$)
Linear term$a_{1}$$0$
Quadratic term$a_{2}$$15.9375\ \text{deg/s}^{2}$ ($0.27816\ \text{rad/s}^{2}$)
Cubic term$a_{3}$$-2.65625\ \text{deg/s}^{3}$ ($-0.04636\ \text{rad/s}^{3}$)
Peak joint rate (at $t=2\ \text{s}$)$\dot\theta_{\max}$$31.875\ \text{deg/s}$
Acceleration at $t=0$ and $t=t_{f}$$\ddot\theta$$\pm31.875\ \text{deg/s}^{2}$
Position at mid-travel$\theta(2)$$37.5^\circ$