Advanced "PID" math

Hi guys,
I have a servo that i want to rotate to a certain angle, in a controlled manner.
while moving to the setpoint, i want to update the setpoint to a new one.
when i update the setpoint, i want to calculate a new movement function.
the new function has to take into consideration the speed and acceleration of the current state of the motor.

So, in my drawing, the initial function is the green one.
the new setpoint happens at t1. and at this point i want to create a new function (blue) that starts with the same speed (acceleration also?).
I would also like to set the parameters for the pivot points of the function. (drawn in red)
Is there something like that, that people use ? or do i need to create it myself ?
Thank you


I just leaISA, 2006, 461 pp., US$96
ISBN 1-55617-942-1

Racer 2..
Since time and speed are involved, I recommend "Advanced PID Control" by Karl J. Åstrom and Tore Hagghlund.
Available in IEEE Book Store!
Regards, Phil Corso
This is not a PID problem. It is a target generator or motion profile generator problem.

The calculations are too difficult to do by hand or calculator. A computer is necessary and software that can do symbolic math.
Basically it involves solving a system of N equations for N unknowns. N is dependent on the order of the motion profile and how many line segments there will be.