PID Tuning
Caution Basic tuning must be completed before the first flight. The shipping version has already been flashed; it is recommended that you use these settings as a reference when…
5 min read · English documentationCaution
Basic tuning must be completed before the first flight. The shipping version has already been flashed; it is recommended that you use these settings as a reference when making adjustments.
Warning
The PID parameters determine how the flight controller responds to attitude and position. During equipment installation and commissioning, you can directly use the officially provided PID tuning parameters that have been tested and validated.
Warning
If the system is migrated to a different new frame, the motor arm length, thrust line, moment of inertia, and center-of-gravity distribution will all change. The PID parameters from the original frame cannot be applied directly and must be retuned. Otherwise, the aircraft may experience anything from oscillation and overshoot to a severe crash.
1 Pre-Tuning Safety Checks
-
Verify that the "Positioning and Performance Review" has been completed and that the sensor data is normal.
-
All propellers must be removed.
-
Verify that the safety switch and failsafe protection in the firmware are functioning.
-
Secure the frame firmly to the ground with straps or weights to prevent it from lifting off accidentally.
2 Basic Procedure: Inner Loop Before Outer Loop, Roll Before Pitch
Unless there are special circumstances, verify that the parameters in Section 3 correspond to the configuration before attempting a flight.
Tuning sequence: rate loop (inner loop) → attitude angle loop (outer loop) → position/velocity loop.
Core parameters to adjust:
| Parameter Type | Example Parameter Name | Meaning | Tuning Objective |
|---|---|---|---|
| Outer-loop P | MC_ROLL_P, etc. | Converts angle error into a target angular rate | Determines how "soft" or "stiff" attitude tracking feels |
| Rate-loop P | MC_ROLLRATE_P, etc. | Immediate response strength to angular-rate error | Increase tracking response until high-frequency oscillation occurs, then reduce the value |
| Rate-loop I | MC_ROLLRATE_I, etc. | Eliminates steady-state error and counters persistent external disturbances | Eliminates small deviations during attitude hold |
| Rate-loop D | MC_ROLLRATE_D, etc. | Suppresses overshoot and oscillation and provides damping | Reduces overshoot and produces a crisp return-to-center response |
3 Reference Parameter Baseline (Original Installation)
| Parameter | Meaning | 320 mm Small Wheelbase |
|---|---|---|
| Outer loop | ||
| MC_ROLL_P | Roll angle P | 7.0 |
| MC_PITCH_P | Pitch angle P | 7.0 |
| MC_YAW_P | Yaw angle P | 2.8 |
| Inner loop (roll) | ||
| MC_ROLLRATE_P | Roll rate P | 0.12 |
| MC_ROLLRATE_I | Roll rate I | 0.115 |
| MC_ROLLRATE_D | Roll rate D | 0.0024 |
| Inner loop (pitch) | ||
| MC_PITCHRATE_P | Pitch rate P | 0.12 |
| MC_PITCHRATE_I | Pitch rate I | 0.115 |
| MC_PITCHRATE_D | Pitch rate D | 0.0024 |
| Inner loop (yaw) | ||
| MC_YAWRATE_P | Yaw rate P | 0.22 |
| MC_YAWRATE_I | Yaw rate I | 0.15 |
| MC_YAWRATE_D | Yaw rate D | 0 |
Tip
Recommendation: If the structure has changed, use the PID parameters provided by the manufacturer for a frame with a similar wheelbase as the tuning starting point.
4 Practical Ground Tuning Procedure (Roll as an Example)
-
Verify that the telemetry link and remote-control signal are normal and that the ground station can monitor the attitude curves in real time.
-
Start with conservative values: Set the roll Rate P, I, and D to the initial values for the corresponding wheelbase in the table.
-
Increase Rate P: In stabilized/altitude-hold mode, quickly apply a small roll stick input and observe the tracking curves for "desired angular rate vs. actual angular rate." Gradually increase Rate P until slight high-frequency oscillation occurs (a buzzing sound or curve spikes), then reduce it by 10–15% to obtain the critical P value.
-
Increase Rate D: After determining P, gradually increase D and observe whether the step-response overshoot decreases. If D is too high, the motors will produce a harsh "clicking" sound and become hot, and the response curve will become sluggish; reduce D if this occurs.
-
Fine-tune Rate I: While hovering, observe whether the attitude drifts slowly. Slight drift is normal and is corrected by the I term. Increase I slightly only if the correction is too slow. An excessively high I value will cause low-frequency oscillation.
-
After tuning roll, tune pitch using the same method.
-
Adjust the attitude angle loop P (outer loop): Once the rate loop has been tuned, moderately increase the outer-loop P until the controls feel responsive without oscillation.
5 Progressive Validation During the First Test Flight
-
Install the propellers: After verifying that the motors are operating normally, install the propellers for fine PID tuning. Protective measures are recommended. Perform tuning indoors in a spacious, protected area, taking into account safety scenarios such as the aircraft suddenly shooting up toward the ceiling.
-
Listen while hovering: During a low hover, listen for periodic "sizzling" sounds or oscillation from the motors. If present, P or D is too high.
-
Step-response test: In a windless environment, quickly apply a small stick input and then return the stick to center. Observe whether the aircraft responds quickly and stabilizes without noticeable rebound.
-
Disturbance-rejection test: While hovering, gently push the aircraft and observe its recovery speed. It should recover quickly without overshoot.
-
Check the temperature after landing: After flying for 3–5 minutes, touch the motors. Overheating indicates that D is too high or P is too aggressive.
Additional Notes on Yaw PID
Yaw inertia is low, so the P value should not be high.
If the nose yaws noticeably when the throttle is increased rapidly, appropriately increase the yaw I gain (for example, from 0.1 to 0.15).
