Ⓜ️Tuning

What is Tuning?

Tuning means to adjust (a motor/axis, for example) for maximum usability or performance. Calibrating something (a musical instrument or electronic circuit) to a standard frequency.

Tuning a machine is very similar to tuning a musical instrument such as a guitar. In order for a guitar to produce the music that it was intended to make, each string must be tuned to the right pitch, otherwise, the overall sound of the guitar will not sound right. In the same way, a machine that is not properly tuned is not optimized and is unable of producing the most efficient motion.

Why use Tuning?

The object of tuning is to tweak the various gains and motion parameters of a machine so that the resulting motion is optimized for production purposes. A machine is considered "tuned" if its servo performance meets its specification requirements.

Generally speaking, here are some common signs that a servo is tuned:

- Visibly smooth motion.

- Little to no audible noise produced during and after a commanded motion.

- Little to zero position error after the completion of a commanded motion.

Types of Tuning?

PID, PIV.. More Coming soon.

Preparing for Tuning

If you are new to tuning a servo motor or you aren’t sure of something, please don’t hesitate to contact RSI for help.

CONFIRM THAT THE CONTROLLER IS GETTING A PROPER FEEDBACK

  1. Click on Axis 0 in the project tree on the left side of RapidSetup.

  2. DO NOT AutoTune the motor.

  3. Click the "Zero Position" button on the bottom left of the Motion and Tuning tab. You should see the Actual and Command positions of the motor go to 0. (They may be jumping around a little depending on how high the resolution of the motor is.)

  4. Next turn the motor shaft by hand roughly one revolution.

  5. If you can’t turn the motor shaft by hand, then you may have a brake on your motor. In this case make sure all your gains in the gain table are 0. Then enable the motor so that the brake is released. If you still can’t turn the motor shaft by hand then check your motor brake wiring.

  6. In RapidSetup, the actual position in the "Axis" page should display a number close to the resolution of the motor.

    If it doesn't you will want to check your settings in the drive GUI and make sure the resolution is set correctly in the drive.

  7. Now turn the shaft backward one revolution to the original spot and the actual position should go back to near 0.

  8. If this test failed, you have probably wired the feedback device incorrectly. Go back and check the feedback wiring.

VERIFY THE MOTOR PHASES ARE WIRED CORRECTLY

  1. Go back to the "Tuning" tab. In the tuning parameters shown below make sure that all of the gains are set to 0 like shown.

  2. In "Tuning" tab shown above there is an offset value. Enter an offset of 1 and press enter. Next, hit "Clear Faults".

  3. The Axis Status should go to an IDLE state. If it is still red after attempting to clear the faults, look at the error that is reported and try to resolve it.

  4. Complete Motor Phase Wiring Test described below to ensure proper motor phase wiring.

DO NOT ENABLE THE MOTOR UNTIL YOU’VE READ THE ENTIRE TEST DESCRIPTION

MOTOR PHASE WIRING TEST DESCRIPTION

When you enable the motor, you should see the actual position move in a positive direction. If it doesn't move at all, increase the offset by small increments until the motor begins to "free spin". Be careful not to add too much offset because you could burn up the motor. Earlier, you set the position error trigger value to 10x the resolution of the motor. This will protect the motor from running away because it will only allow the motor to "free spin" for 10 revolutions. If the motor begins to vibrate or "buzz" as you increase offset yet doesn't spin, the motor phases are probably not wired correctly. If the motor sticks in one spot and won’t move, try to turn it by hand. It will probably jump to another spot and stick again. This is what happens when the phases are wired incorrectly. You should double check your U, V, W and GND wiring. If you achieve a "free spin" make sure you are getting a positive direction for the actual position with a positive offset. If not, you need to check your motor phase and feedback wiring again. Now perform this same test again using a negative offset. Make sure that the actual position goes in the negative direction.

Quick Tuning Procedure

You can open Motion Scope from the “Tools” menu in RapidSetup to help you fine tune the system.

  1. Make sure all gains are set to 0 in RapidSetup as shown below:

  2. Set Kd (derivative gain)

    - Keep in mind that the tuning gains are inversely proportional to the number of Counts/rev. The higher the resolution of the encoder, the smaller the tuning gains will be.

    - Enter a relatively very low Kd (for your resolution). As a rule of thumb, start out with 1000/resolution.

    - Now Enable Amp and increase the Kd (derivative gain) until motor starts making noise. The noise will not damage the motor wither. Keep listening to motor for any instability. Try giving the motor shaft a slight nudge (safety precaution: make sure hand is not in the machine).

    - Once maximum Kd value is determined (when the motor starts making noise), turn Kd down by 2/3. (Note: when a high value of Kd is entered, axis might run away so make sure you have position error limit value and action set using RapidSetup).

    Example: I got audible noise at Kd = 1098, therefore final Kd = 366.

  3. Set Kp (proportional) and Ki (integral) gains

    Kp: Typically set to 1/10th of Kd (derivative gain)

    Ki: Typically set to 1/100th of Kp (proportional gain)

    Ex:

    Kd = 36

    Kp = 3.6

    Ki = 0.036

  4. Set IntMaxMoving and IntMaxRest to 16384

  5. Optional: Set Feedforward gains (Kpff, Kvff, Kaff, Kfff) - Read More

Last updated