compensate for any high-frequency oscillations (vibrations) that may occur, as the Impedance
controller works at 40kHz (much faster than <100 Hz).
●
Raw torque controller
- when kP and kD are set to zero, the torque_ff command is equal to the
output controller torque.
The impedance controller is quite simple and works according to the schematic below:
2.4. Controller tuning
TL;DR: The best way to get started with tuning is to copy the
and tweak them. You can
treat this section as our recommendation for tuning the controllers, but online articles can be useful as
well (
The first step to correctly set up the gains is to start with our
. There are three sets of default
gains that are set on each motor power up and thus they allow for restoring the actuator to a default state in
case some gains were set incorrectly by the user. These gains are also a great starting point for user
modifications when the actuator has to be used in a specific application requiring high positioning accuracy
or very dynamic movements.
Note: Default gains are set to work with CANdle examples. This way they can be assumed to be
universal but it does not have to always be the case.
Note: When something does go wrong during the tuning process just power-cycle the actuator - the
default gains will be restored.
Warning: Always keep your safety limits low when experimenting with gains. Gains not suitable for
your system may cause oscillations and unstable operation of the MD80-based actuators.
Velocity PID
The velocity PID controller can be used to command different velocity profiles to the motor. This mode uses
a regular PID controller architecture and has four user-defined parameters: kP, kI, kD, and windup. Since
velocity readout is somewhat noisy, it is recommended to keep the kP value as low as possible and play with
kI gain. It is necessary to find the sweet spot that makes the actuator response resistant to disturbances, but
also not too noisy (too high kP gain may introduce oscillations). Usually, the kI gain is set to a higher value,
however, do not treat it as a rule of thumb. Setting the kI gain to a too high value can cause an overshoot
when the target velocity is changed rapidly. The kD gain may be used to partially overcome this issue. The
windup parameter is used to limit the integral action which could potentially rise to high values when
velocity error is present for longer periods.
www.mabrobotics.pl