PID tuning FF2 not working

More
26 Feb 2025 04:57 #322647 by vre
Replied by vre on topic PID tuning FF2 not working
I have also speed mode servos tuned
with p and ff1 so cruise ferror is 0
but at the start - stop i have ferror spikes.
How to guess initial ff2 value?
What else can i do for start-stop ferror?

Please Log in or Create an account to join the conversation.

More
01 Oct 2026 05:07 #350030 by Coyote
Replied by Coyote on topic PID tuning FF2 not working
In my opinion FF1 and FF2 should be delayed. If the PID output is the velocity setpoint, then FF2 is not used, FF1 should be equal 1.0, but it would produce spikes at acceleration change. It could be improved by adding a 1st order delay to the setpoint value, before it gets compared to the actual value.

Please Log in or Create an account to join the conversation.

More
01 Oct 2026 15:22 - 01 Oct 2026 16:35 #350049 by PCW
Replied by PCW on topic PID tuning FF2 not working
Delaying FF1 will make the initial error spike worse.

You need to distinguish between 2 types of error spikes:

A: Errors during constant acceleration (that can be reduced with FF2)
These are relatively constant during the entire ramp up/ramp down
parts of a motion profile.

On a velocity mode servo systems these errors are for 2 reasons:

1. Finite servo drive velocity loop gain
2. Time delay between reading position and drives response to command

#1 can  likely just be guessed at, #2 needs setting FF2 to the time (in seconds) between
position read and drive response.

B: Errors just at the beginning and end of motion.

These are due to the step in acceleration (infinite jerk)  at the beginning and end of motion
and are unavoidable with 2nd order trajectory planners. This is because a step in acceleration
requires the force/torque to change instantly and this is not physically possible in servo systems.

The error can be minimized with better drive tuning or lowering the acceleration but the real solution
is to use a higher order trajectory planner. You might want to try LinuxCNC master's relatively  new
jerk limited trajectory planner, it could use more testers...
Last edit: 01 Oct 2026 16:35 by PCW.
The following user(s) said Thank You: tommylight, besriworld

Please Log in or Create an account to join the conversation.

Time to create page: 0.155 seconds
Powered by Kunena Forum