I need to program a 3rd degree velocity profile so i can move a DC motor,
That sounds very specific, is it an assignment question?
A lot depends on the step response of the motor. Then you need to integrate that into the control you can generate.
In effect you produce a profile which applies power to the motor in a step wise manner. This is either in terms of supplying it with a varying voltage or a varying PWM signal and changing that signal over the time of the profile. The more parts you split up this profile into the closer will be your control.
It is a long time since I did servo control and it wasn't called a 3rd degree velocity profile in my day but I suspect that this is the critical damped state.