Follow

Part 4B: Tuning for Continuous Rotation Servos

Tuning for Continuous Rotation Servos

In this section, we will tune the continuous rotation servos that control your Roll and Pitch.

Continuous rotation servos rely on PID gains for tuning. To begin, let us explain exactly what PID gains are.

There are two concepts that are being adjusted in PID control systems: how quickly the target position is reached and how quickly the target position is settled at. It is important to understand that reaching the target destination does not mean that you have stopped at that location. Settling is the act of actually coming to rest at the target location, and this speed is calculated separately.

- Increasing the P value will move the servo to the target position more quickly, but it will tend to overshoot and cause oscillations as the servo attempts to settle there.
- Increasing the I value will have a similar effect to increasing the P value, but with more pronounced oscillations.  This value is normally used to eliminate steady-state error, which is generally not a concern with the type of camera mounts used with the HoverflyGIMBAL. We can safely ignore this number for now.
- Increasing the D value will increase the settling speed, decreasing the amount of overshoot and generally decreasing oscillations - to a point. Entering a value for D which is too large in relation to the P value can actually cause an increase in oscillations, causing the servo to become very jittery.

To use this information in tuning your HoverflyGIMBAL, start by connecting the HoverflyGIMBAL to the HoverflyGIMBAL Setup Client on your computer.

Go to Configuration & Calibration > Servo Configuration.

Choose either "Channel 1: Roll" or "Channel 2: Pitch" from the dropdown menu to tune that servo.

Check the boxes for "Auto-Compensation Enabled" and "Enable Servo."

Click "PID Gain" to open the PID Settings screen. Here you will see a real-time graph of the PID output being sent to the servo, as well as three fields for adjusting the P, I, and D values. Never set any of these values to 0 - doing so will cause the program to crash.

You will make a series of changes to the P and D values as described below. After each change, test the servo by tipping the gimbal and observing how the servo reacts when it compensates for the movement.

+ Start by increasing the P value by about 200 - 500 at a time. Stop when the servo oscillates noticeably after returning to the center point.  
+ Increase the D value by 50 - 100 at a time. When the servo no longer oscillates, you have reached a near-optimal value for both gain settings.
+ If the oscillations do not go away, reduce the P value by about 100 and try again. Continue this process until you find the maximum value for P at which D can eliminate the oscillations. This will result in reaching and settling at the target destination at maximum speed.

You can refine the gains further by extrapolating from the above process, but for most setups, the servo can be considered ready when no oscillations after a servo movement.

Many thanks to our VP of R&D Dan Burroughs for contributing the bulk of information in this article.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk