Results 1 to 5 of 5
Like Tree1Thanks
  • 1 Post By mathguy25

Math Help - Solving coefficients for cubic polynormial

  1. #1
    Junior Member
    Joined
    Feb 2010
    Posts
    30

    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 qi, its trajectory as a function of time t should satisfy the following 4 constraints:

    • qi(0) = si
    • qi'(0) = 0
    • qi(T) = gi
    • qi(T) = 0


    Now the question is if we try to interpolate the trajectory of qi, we should use a cubic polynomial of t
    qi(t) = a0 + a1t + a2t2 + a3t3
    because we can determine the 4 coefficients ai, i=0,1,2,3 from the above 4 constraints. The following values for the coefficients can be easily derived:


    • a0 = si
    • a1 = 0
    • a2 = (3/T2) * (gi - si)
    • a3 = (2/T3) * (gi - si)



    I don't understand how the a0,a1,a2,a3 are being derived. The things I have considered are:

    For a0: Are we setting t=0? So then we have: si = a0 + a1(0) + a2(0) + a3(0).
    For a1: We have si = si + a1t + a2(0) + a3(0) ? I don't think that is right, but it's the only way I see to set it up so that a1=0.
    For a2: I'm pretty lost here. I see that qi - si is the displacement...but how are we getting 3/T2??
    For a3: Same problem as with a2

    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.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Junior Member
    Joined
    Apr 2013
    From
    Green Bay
    Posts
    68
    Thanks
    16

    Re: Solving coefficients for cubic polynormial

    To find  a_0 , simply use the condition  q_i(0) = s_i . Then  s_i = q_i(0) = a_0 + a_1*0 + a_2*0^2 + a_3*0^3 = a_0 . Thus,  a_0 = s_i

    To find  a_1 , we have to calculate the derivative of q_i(t). Then q_i'(t) = a_1 + 2a_2t + 3a_3t^2. Then use the condition  q_i'(0) = 0 . Thus,  0 = q_i'(0) = a_1 + 2a_2*0 + 3a_3*0^2 = a_1 . Thus,  a_1 = 0 .

    Now consider  q_i(T) and  q_i'(T) . We see that

     g_i = q_i(T) = a_0 + a_1*T + a_2*T^2 + a_3*T^3 and  0 = q_i'(T) = a_1 + 2a_2*T + 3a_3*T^2

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

     g_i = q_i(T) = s_i + a_2*T^2 + a_3*T^3 and  0 = q_i'(T) = 2a_2*T + 3a_3*T^2

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

     0 = 2a_2*T + 3a_3*T^2
     0 = 2a_2*T + 3a_3*T^2
     2a_2*T = -3a_3*T^2
     a_2 =\frac{-3}{2}a_3*T . Note that  T \ne 0

    Subs this into the other equation

     g_i = s_i + a_2*T^2 + a_3*T^3
     g_i = s_i + (\frac{-3}{2} a_3 * T *T^2) + a_3*T^3
     g_i = s_i + \frac{-3}{2} a_3 * T^3 + a_3*T^3
     g_i - s_i = \frac{-1}{2} a_3*T^3
     \frac{-2}{T^3} (g_i - s_i) = a_3

    Now use this to find  a_2 .

     0 = 2a_2*T + 3a_3*T^2
     0 = 2a_2*T + 3(\frac{-2}{T^3} (g_i - s_i)*T^2
     0 = 2a_2*T + \frac{-6}{T} (g_i - s_i)
     2a_2*T = \frac{6}{T} (g_i - s_i)
     a_2 = \frac{3}{T^2} (g_i - s_i)
    Last edited by mathguy25; May 1st 2013 at 10:35 AM.
    Thanks from SterlingM
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Junior Member
    Joined
    Feb 2010
    Posts
    30

    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 a1, why do we we have to calculate the derivative of qi(t)? Is that approach solely determined so that we can use q'i(0)=0? Is there no other way to do it?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Junior Member
    Joined
    Feb 2010
    Posts
    30

    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=tj, j=1, ..., n, the joint qi, i=1, ..., m, reaches position ui,j with velocity q'i(tj) = u'i,j, such that Cj = (u1,j, ..., um,j)

    where, normally, t1=0, and q'i(t1)=q'i(tn)=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 Cj and Cj+1, let the joint variable qi satisfy the cubic polynomial

    qi(t) = a0 + a1t + a2t2 + a3t3,

    and let ui,j = si, u'i,j = s'i, ui, j+1=gi, u'i,j+1=g'i, and T=tj+1 - tj. Then the coefficients of the polynomial can be determined as the following:

    a0 = si
    a1 = s'i
    a2 = (3/T2)*(gi - si) - (2/T)*s'i - (1/T)*g'i
    a3 = -(2/T3)*(gi - si) + (1/T2)*(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 a0 = si 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.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Junior Member
    Joined
    Apr 2013
    From
    Green Bay
    Posts
    68
    Thanks
    16

    Re: Solving coefficients for cubic polynormial

    Yes, you do need to find q'(t) since you have the intial condition q'(0) = 0.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Cubic polynomial - complex coefficients HELP ME PLEASE
    Posted in the Advanced Algebra Forum
    Replies: 2
    Last Post: January 10th 2013, 04:40 PM
  2. solving D.E by undetermined coefficients.
    Posted in the Differential Equations Forum
    Replies: 1
    Last Post: March 29th 2011, 08:59 PM
  3. Solving cubic polynomials
    Posted in the Algebra Forum
    Replies: 9
    Last Post: October 27th 2009, 12:55 AM
  4. Solving coefficients
    Posted in the Algebra Forum
    Replies: 2
    Last Post: May 13th 2008, 06:18 AM
  5. Cubic function with integral coefficients.
    Posted in the Pre-Calculus Forum
    Replies: 2
    Last Post: November 19th 2007, 05:34 PM

Search Tags


/mathhelpforum @mathhelpforum