yes, so far that is clear to me.
But the problem is:
- I want full power for the medium part ( in case the run is long enough so that will be reached)
- I want a ramp up/down for start and end.
- In the moment I start the motor to the new position I do not know by design but just during runtime, how long to run the motor.
imagine I have to run 1000 degrees to the absolute target, then the ramp up/down control has to watch and calculate the ramp up time, the start of the intermediate part, the start of the the ramp down part, and finally the end; in the middle the full power probably will be reached.
but e.g., having to rotate just 10 degrees to the absolue target, the regulation must never reach full power but just start smoothly 5 degrees by max 250°/s² (no jerking) and then for the last 5° smoothly ramp down by 500°/s² (no blocking and slipping).
During ramp up and down the regulation has to face everything: the setpoint (target), the speed, the acceleration, and the max acceleration, not to overshoot during ramp up or during ramp down, and to leave enough room for all 3 parts (actually at least 2, i.e. ramp up+down).
when setting a speed limit (set_DPS) during ramp-up, that will have to be increased step by step in a loop from 0 perhaps up to max speed, monitoring the acceleration, nevertheless the target must not be overshooted during this part (also monitoring set_motor_position) and still letting enough time and space for ramp-down though, and I can't see how to control both dps, dps/s, set_motor_position, and calculated TOA for starting then ramp_down in the correct moment,
and finally still reach the target without overshooting and without prematurely die a wretched death due to too low dps settings.
That's why I actually think by user control it's almost impossible to achieve that, better to integrate both ramp parts into the PID regulation.