PID control is an extremely useful tool to fine tune the motion behavior of your DYNAMIXEL System, and the following video provides a good introduction to the basics of PID control.
Although that video provides a strong starting point for understanding the parameters used in PID Control, I wanted to share some more information about PID control that I couldn’t fit in the video itself.
There are a few behaviors that occur in every PID control system under different circumstances. Understanding and managing these behaviors is critical to achieving the best performance possible from your DYNAMIXEL system. This article will provide an overview of some of the behaviors you can expect to see in your system, as well as how to adjust them to best fit your application.
The first behavior example is a steady state error produced by a P controller.
The circled sections of the graph show periods where the controller has settled into a stable state without actually reaching the desired setpoint. This is a common result when utilizing a proportional controller without any additional I or D parameters. In order for a proportional controller to make adjustments to it’s controlled output it must be able to detect a difference between the current output and the setpoint. When this difference becomes too small the controller stops making adjustments to the process variable, resulting in this behavior of stopping short of the goal.
Eliminating this steady state error is often as simple as enabling the integral gain to allow for adjustments to the output based not only on the magnitude of the error, but also on the total time in an error state.
Raising the proportional gain will also resolve this behavior, but setting your P gain too high can produce an alternative problematic behavior.
When P gains have been set too high it can cause the servos to attempt to maintain the setpoint too aggressively.
This presents itself on graphs with these patterns of sudden spikes around the setpoint, and on the physical servos with a “rattling” noise and lots of micro adjustments to the servo’s position. This occurs because the actuator is attempting to overcorrect for the tiny differences between it’s current position and the desired setpoint. The servo detects it is slightly off from it’s goal and tries to quickly adjust to the setpoint, but overshoots since it was already very close. Then, now that it is actually out of position, it quickly snaps back to the goal and stays there until it detects another tiny difference from the setpoint.
Jittering can be fixed by lowering the P gain, and adjusting I gains in order to reduce any resulting steady state errors.
Overshooting the desired setpoint is another common behavior exhibited by PID control systems.
This most often occurs in system with higher I gains, especially when approaching the setpoint from further away. While the actuator is approaching it’s setpoint, the I gain continues to increase it’s influence in adjusting the output. By the time the actuator reaches the setpoint, the I gain has increased the output enough to move past the goal. Then, once the accumulated I gain adjustments have been reset by passing through the setpoint, the PID controller is quickly able to stabilize at the goal position.
Overshooting can be reduced by decreasing the I gains, or by adjusting the D gains to moderate the effect of higher I gains.
The most common symptom of a incorrectly tuned PID control system is a pattern of oscillation around the setpoint.
Incorrect PID tuning often results in an unstable equilibrium as the controller constantly overshoots and corrects itself while never arriving at the desired setpoint.
The simplest way to eliminate this behavior is to reduce your I gains, and increase your P gains. The specific adjustments required depend on your particular system and implementation. The specifics of PID tuning will be discussed in an upcoming ROBOTIS CS YouTube video, but for now hopefully this supplemental information is enough to help you get started tuning your DYNAMIXEL System’s PID settings.