You got it.
ndzied1 said:
I didn't do the jerk initial condisions, I has used one of the higher order terms for an initial condition...
I attached a pdf of what I came up with. I believe it matches yours.
Yes, it looks like one of my worksheets right down to the A,B,C,D,E,F,G,H and Coef variable names. Now the whole world knows how to compute 5th, 7th, 9th,..... order polynomials.
You should also notice that you can now generate a motion profile from any current PVAJ ( position, velocity, acceleration and jerk state ) to the next PVAJ in a time period t. If you desire you can use your new 7th order motion profile generator to solve Russmartin's problem of a few days ago. Russ really just needed to move 21.5 in 4.77777 seconds. If you specify the initial PVAJ(0)=(0,0,0,0) and the PVAJ(4.7777)=(21.5,0,0,0) you can calculate one polynomial that will be smooth and yet you didn't have to specify an acceleration or speed. Just the end results, not the means. One could even put this formula in a compute block and generate a smooth profile in PLC. The derivatives can be used to generate velocity, acceleration and jerk feed forward contributions to the control output.
Did you notice the coefficient for the H parameter is not 0? It should be. Mathcad can't be completely trusted. This is a pretty flagrant round of error. I find the symbolic solutions for the polynomials and then use proper numerical method to rearrange the formulas to calculate the coefficients with little or no round of error. The order in which you do your calculations is very important. Mathcad's internal calculations are that smart yet. Scilab will generate the same error.
No one has tackled the 3 segment ramps yet but I think we are getting close to the end here. I bet that no one will look at a thread on ramping quite the same way again.