24.09.2014 Views

Trajectory Generation via Spline Cubic Polynomial

Trajectory Generation via Spline Cubic Polynomial

Trajectory Generation via Spline Cubic Polynomial

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Trajectory</strong> <strong>Generation</strong> <strong>via</strong> <strong>Spline</strong> <strong>Cubic</strong> <strong>Polynomial</strong><br />

A cubic polynomial is in the form<br />

March 26, 2013<br />

q(t) = a 0 + a 1 t + a 2 t 2 + a 3 t 3<br />

The velocity and acceleration functions are thus<br />

<strong>Trajectory</strong> without obstacles<br />

˙q(t) = a 1 + 2a 2 t + 3a 3 t 2<br />

¨q(t) = 2a 2 + 6a 3 t<br />

⎧<br />

q(t s ) = A<br />

⎪⎨<br />

˙q(t s ) = B<br />

To solve for the unknown coefficients, we need to have the boundary condition<br />

q(t s ) = C<br />

⎪⎩<br />

˙q(t f ) = D<br />

These are the user required performance of the movement of the robotic arm<br />

⎧<br />

⎪⎨<br />

⎪⎩<br />

a 0 + a 1 t s + a 2 t 2 s + a 3 t 3 s = A<br />

a 1 + 2a 2 t s + 3a 3 t 2 s = B<br />

a 0 + a 1 t f + a 2 t 2 f + a 3t 3 f = C<br />

a 1 + 2a 2 t f + 3a 3 t 2 f = D<br />

Usually the start time t s is zero<br />

⎧<br />

⎪⎨<br />

⎪⎩<br />

a 0 = A<br />

a 1 = B<br />

a 0 + a 1 t f + a 2 t 2 f + a 3t 3 f = C<br />

a 1 + 2a 2 t f + 3a 3 t 2 f = D<br />

⇐⇒<br />

⇐⇒<br />

⎡<br />

⎢<br />

⎣<br />

⎡<br />

⎢<br />

⎣<br />

1 t s t 2 s t 3 s<br />

0 1 2t s 3t 2 s<br />

1 t f t 2 f t 3 f<br />

0 1 2t f 3t 2 f<br />

1 0 0 0<br />

0 1 0 0<br />

1 t f t 2 f t 3 f<br />

0 1 2t f 3t 2 f<br />

⎤ ⎡ ⎤ ⎡<br />

a 0<br />

⎥ ⎢ a 1<br />

⎥<br />

⎦ ⎣ a 2<br />

⎦ = ⎢<br />

⎣<br />

a 3<br />

⎤ ⎡ ⎤ ⎡<br />

a 0<br />

⎥ ⎢ a 1<br />

⎥<br />

⎦ ⎣ a 2<br />

⎦ = ⎢<br />

⎣<br />

a 3<br />

A<br />

B<br />

C<br />

D<br />

A<br />

B<br />

C<br />

D<br />

⎤<br />

⎥<br />

⎦<br />

⎤<br />

⎥<br />

⎦<br />

The matrix is not singular<br />

⎡<br />

1<br />

det ⎢ 0 1<br />

⎣ 1 t f t 2 f t 3 f<br />

0 1 2t f 3t 2 f<br />

⎤<br />

⎡<br />

⎥<br />

⎦ = 1 · det ⎣<br />

1 0 0<br />

t f t 2 f t 3 f<br />

1 2t f 3t 2 f<br />

⎤<br />

⎦ = 1 · det<br />

[ t<br />

2<br />

f t 3 f<br />

2t f 3t 2 f<br />

]<br />

= t 4 f ≠ 0<br />

After solving<br />

⎧<br />

⎪⎨<br />

⎪⎩<br />

a 0 = A<br />

a 1 = B<br />

a 2 = 3 (C − A) − t f (2B + D)<br />

t 2 f<br />

a 3 = 2 (A − C) + t f (B + D)<br />

t 3 f<br />

1


And thus the equation ( displacement, velocity and acceleration ) are<br />

⎧<br />

⎪⎨<br />

⎪⎩<br />

q(t) = A + Bt + 3 (C − A) − t f (2B + D)<br />

t 2 f<br />

˙q(t) = B + 6 (C − A) − 2t f (2B + D)<br />

t 2 f<br />

¨q(t) = 6 (C − A) − 2t f (2B + D)<br />

t 2 f<br />

t 2 + 2 (A − C) + t f (B + D)<br />

t 3<br />

t 3 f<br />

t + 6 (A − C) + 3t f (B + D)<br />

t 2<br />

t 3 f<br />

+ 12 (A − C) + 6t f (B + D)<br />

t<br />

t 3 f<br />

Since usually the initial and final velocity is zero ( stop at both end ), thus in these cases B = D = 0<br />

, and the eqaution reduce to<br />

⎧<br />

⎪⎨<br />

⎪⎩<br />

<strong>Trajectory</strong> with obstacles<br />

3 (C − A)<br />

q(t) = A + t 2 2 (A − C)<br />

+<br />

˙q(t) =<br />

¨q(t) =<br />

t 2 f<br />

t 3 f<br />

6 (C − A) 6 (A − C)<br />

t +<br />

t 2 f<br />

6 (C − A)<br />

t 2 f<br />

+<br />

t 3 f<br />

t 2<br />

12 (A − C)<br />

t<br />

t 3 f<br />

When the trajectory need to avoid some obstacles, that means the trajectory should not pass through<br />

some points.<br />

To make it simple, that means the trajectory should pass through some points that can avoid hitting<br />

the obstacles.<br />

t 3<br />

Suppose in addition to the upper part, now the trajectory has to pass throguh points p 1 at time t p<br />

How to determine the unknown velocity ?<br />

starting point p s p 1 end point p e<br />

displacement known given known<br />

velocity zero ? zero<br />

The most simple idea is to choose the velocity ( they are free variable ) that the acceleration is<br />

continuous in these point.<br />

As acceleration means force, and a drag force that suddenly appear is not good for robotic arm.<br />

Thus first , split the path from one to 2 path<br />

Original path is p s → p e , now p s → p 1 → p e<br />

{<br />

a 0 + a 1 t + a 2 t 2 + a 3 t 3 t ∈ [t s , t p ]<br />

Since there are 2 path, that means there is 2 displacement equations<br />

b 0 + b 1 t + b 2 t 2 + b 3 t 3 t ∈ [t p , t e ]<br />

Let the velocity at time t p be v<br />

Solve the 2 equations, and equal the acceleration equations to solve for the unknowns.<br />

−END−<br />

2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!