Solving coefficients for cubic polynormial

I'm not sure if Advanced Algebra is the correct forum for this, but if not maybe it can be moved elsewhere?

Anyways, I am taking this class where we want to solve coefficients for a cubic polynomial. This handout reads:

Suppose we want to find the motion trajectory for a path with only two knot points - the start and goal, which satisfier the time constraint that the tie duration of motion is T, and in addition, satisfier the velocity constraint that the omotion starts from zero velocity and ends with zero velocity. Then, for each variable q_{i}, its trajectory as a function of time *t* should satisfy the following 4 constraints:

- q
_{i}(0) = s_{i} - q
_{i}'(0) = 0 - q
_{i}(T) = g_{i} - q
_{i}(T) = 0

Now the question is if we try to interpolate the trajectory of q_{i}, we should use a cubic polynomial of *t*q_{i}(t) = a_{0} + a_{1}t + a_{2}t^{2} + a_{3}t^{3}

because we can determine the 4 coefficients a_{i}, i=0,1,2,3 from the above 4 constraints. The following values for the coefficients can be easily derived:

- a
_{0} = s_{i} - a
_{1} = 0 - a
_{2} = (3/T^{2}) * (g_{i} - s_{i}) - a
_{3} = (2/T^{3}) * (g_{i} - s_{i})

I don't understand how the a_{0},a_{1},a_{2},a_{3} are being derived. The things I have considered are:

For a_{0}: Are we setting t=0? So then we have: s_{i} = a_{0} + a_{1}(0) + a_{2}(0) + a_{3}(0).

For a_{1}: We have s_{i} = s_{i} + a_{1}t + a_{2}(0) + a_{3}(0) ? I don't think that is right, but it's the only way I see to set it up so that a_{1}=0.

For a_{2}: I'm pretty lost here. I see that q_{i} - s_{i} is the displacement...but how are we getting 3/T^{2}??

For a_{3}: Same problem as with a_{2}

Can anyone help me out here? I tried to summarize the handout text some, but I can try to copy more of it if the information is insufficient. Any help is appreciated.

Re: Solving coefficients for cubic polynormial

To find , simply use the condition . Then . Thus,

To find , we have to calculate the derivative of . Then . Then use the condition . Thus, . Thus, .

Now consider and . We see that

and

This represents a system of two equations. We already know and so let's sub these values into our system. Then

and

Now, we just solve this system of two equations in two unknowns ( and ). Note that

. Note that

Subs this into the other equation

Now use this to find .

Re: Solving coefficients for cubic polynormial

Thanks! That's makes a lot of sense. The only thing I don't see clearly is when solving for a_{1}, why do we we have to calculate the derivative of q_{i}(t)? Is that approach solely determined so that we can use q'_{i}(0)=0? Is there no other way to do it?

Re: Solving coefficients for cubic polynormial

Hmm, well I also don't understand the next part. The problem we are trying to solve is finding motion trajectories of an m-degrees of freedom robot (m joints). I'm not sure how relevant that is, but I thought I would include it in case it helps. The next part says:

We want to pind a path of n(>2) knot points which satisfies the following constraints:

at t=t_{j}, j=1, ..., n, the joint q_{i}, i=1, ..., m, reaches position u_{i,j} with velocity q'_{i}(t_{j}) = u'_{i,j}, such that C_{j} = (u_{1,j}, ..., u_{m,j})

where, normally, t_{1}=0, and q'_{i}(t_{1})=q'_{i}(t_{n})=0. Then, for each path segment (between two adjacent knot points), we can use cubic polynomials to interpolate joint trajectories. Without losing generality, for the path segment between C_{j} and C_{j+1}, let the joint variable q_{i} satisfy the cubic polynomial

q_{i}(t) = a_{0} + a_{1}t + a_{2}t^{2} + a_{3}t^{3},

and let u_{i,j} = s_{i}, u'_{i,j} = s'_{i}, u_{i, j+1}=g_{i}, u'_{i,j+1}=g'_{i}, and T=t_{j+1} - t_{j}. Then the coefficients of the polynomial can be determined as the following:

a_{0} = s_{i}

a_{1} = s'_{i}

a_{2} = (3/T^{2})*(g_{i} - s_{i}) - (2/T)*s'_{i} - (1/T)*g'_{i}

a_{3} = -(2/T^{3})*(g_{i} - s_{i}) + (1/T^{2})*(s'_{i} + g'_{i})

Okay, I understood most of the algebra from before (except that one part I replied about). I think what I am missing is how do these constraints help us setup the equations? I can't seem to see the connection between those constraints I listed and how our coefficients changed from the original post. I get that a_{0} = s_{i} because that is where we start...but other than that easy case I don't really see how we get from our information to the coefficients. Thanks again for the help thus far and I'd be really grateful if you could help me here as well.

P.S. is there a way to make dots above letters? I did s' and g', but is that syntactically correct? I think ' is only for functions and the dots are for variables.

Re: Solving coefficients for cubic polynormial

Yes, you do need to find q'(t) since you have the intial condition q'(0) = 0.