Tuning for Position Servos
In this section, we will tune the position servos that control your Roll and Pitch.
Position servos rely on the Scaling Factor and Acceleration Rate Gain (ARG) settings for tuning.
There are two concepts that we need to understand in order to properly set the gains: 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 Scaling Factor 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 Acceleration Rate Gain value will increase the settling speed, decreasing the amount of overshoot and generally decreasing oscillations - to a point. Entering an ARG value which is too large in relation to the Scaling Factor 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."
You will make a series of changes to the Scaling Factor and ARG 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. (Ideally, you will want to place a small bubble level on the camera tray to observe this movement.) The goal is to see it remain as level as possible without any oscillations.
+ Start by increasing the Scaling Factor by about 5 - 10 at a time. Stop when the servo oscillates noticeably after returning to the center point.
+ Increase the Acceleration Rate Gain 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 Scaling Factor by about 10 and try again. Continue this process until you find the maximum value for Scaling Factor at which ARG 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 occur after a servo movement.
Many thanks to our VP of R&D Dan Burroughs for contributing the bulk of information in this article.