Skip to content

Commit e525299

Browse files
EvansCesilThomasEvansCesilThomas
authored andcommitted
docs(tuning): add doc on D_FF and additional notches
Signed-off-by: EvansCesilThomas <evancesil@gmail.com> docs: fix typos
1 parent f5bac27 commit e525299

3 files changed

Lines changed: 48 additions & 1 deletion

File tree

TUNING_GUIDE_ArduCopter.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ When asked *Update file with values from FC?* select `Close` to close the applic
918918
# 7. Assemble propellers and perform the first flight
919919

920920
Assemble the propellers in the vehicle ensuring that they are [balanced in order to reduce vibrations](https://www.youtube.com/watch?v=zTDkCZ698uA).
921-
High vibrations will cause your vehicle to behave eradicaly endangering people and property.
921+
High vibrations will cause your vehicle to behave erratically endangering people and property.
922922

923923
Now that all mandatory configuration steps are done and the props are on you can perform the first flight.
924924

@@ -1422,6 +1422,53 @@ Take a look at the `RATE.*out` values in the `.bin` log file, they all should be
14221422

14231423
Now the standard tuning is complete you can skip to [Section 13 Productive Configuration](#13-productive-configuration)
14241424

1425+
## 9.7 Suppress frame resonance with PID notch filters (advanced/optional)
1426+
1427+
Frame resonance occurs when the frequency components in the vibration caused by the motors/propellers excite the frame causing a highly amplified oscillation around the natural frequency of the frame. It can remain visible in the rate-controller logs even after the normal `INS_HNTCH_` / `INS_HNTC2_` harmonic notch filters have removed motor and propeller gyro noise.
1428+
PID notch filters suppress this kind of resonance by filtering the rate controller's target or error signal so the controller stops exciting the frame at that frequency. Remember, garbage-in, garbage-out. We are removing the garbage (the frame resonance) feeding into the PIDs and further exciting the frame.
1429+
1430+
> [!IMPORTANT]
1431+
> Use PID notch filters only after the standard harmonic notch setup is correct, vibration levels are acceptable, CPU load is healthy, and output oscillation has been ruled out.
1432+
> These parameters are available in ArduCopter 4.5 and newer.
1433+
> If they are not visible in your firmware, do not add them manually.
1434+
1435+
First, set `FILTn_TYPE` to '1' to enable these filters. Set to `0` to disable the filter. Reboot after changing the filter type if the parameter documentation requires it.
1436+
| Parameter | How to set it |
1437+
| :--- | :--- |
1438+
| `FILTn_NOTCH_FREQ` | Set to the measured frame-resonance frequency in Hz. |
1439+
| `FILTn_NOTCH_Q` | Q-factor which is given by given by the notch centre frequency divided by its bandwidth. Start around `5`. Use a lower value for a wider notch if the resonance moves, or a higher value for a narrower notch if the peak is stable. |
1440+
| `FILTn_NOTCH_ATT` | Sets attenuation in dB. Start around `10` to `20` dB and increase only if the follow-up log still shows the resonance. Higher Attenuation add phase lag.|
1441+
1442+
The PID notch index parameters select one of the global `FILT1_` to `FILT8_` notch definitions.
1443+
Use `0` to disable a PID notch on an axis.
1444+
Set value from `1` to `8` to select the matching `FILTn_` filter number so that the characteristics of the notch as defined above will be applied.
1445+
1446+
| Purpose | Roll | Pitch | Yaw |
1447+
| :--- | :--- | :--- | :--- |
1448+
| Target notch index | `ATC_RAT_RLL_NTF` | `ATC_RAT_PIT_NTF` | `ATC_RAT_YAW_NTF` |
1449+
| Error notch index | `ATC_RAT_RLL_NEF` | `ATC_RAT_PIT_NEF` | `ATC_RAT_YAW_NEF` |
1450+
| Derivative feed-forward | `ATC_RAT_RLL_D_FF` | `ATC_RAT_PIT_D_FF` | `ATC_RAT_YAW_D_FF` |
1451+
1452+
Do not use `ATC_RAT_*_D_FF` to suppress frame resonance.
1453+
Keep `D_FF` at `0` while tuning PID notch filters. This term is for improving the "locked-in" feel of the drone so that the drone reacts with minimal latency.
1454+
After the resonance is under control, `D_FF` can be tuned separately in very small increments to improve aggressive rate tracking, but each change must be validated with logs because it changes actuator demand and pilot feel. Check the Des.ATT* and ATT* plots in the log. The below images show how the tune can be made tighter during aggressive maneuvers:
1455+
1456+
| | |
1457+
| :---: | :---: |
1458+
| ![Without D_FF](images/Without_D_FF.png) | ![With D_FF](images/With_D_FF.png) |
1459+
| Without D_FF | With D_FF |
1460+
1461+
ArduPilot actually has 10 notch filters!
1462+
For the selected filter number `n`, configure the matching global notch filter:
1463+
1464+
1. Finish the normal harmonic notch calibration and run a short test flight. Follow the same procedure as given in [Section 9.6] but with isolated inputs along roll, pitch and yaw axes, *one axis per log file*. Inspect these .bin log files in the PID Review Tool and check for peaks in the spectrum.
1465+
1. Choose an unused `FILTn_` slot. If the frame resonance is at 46 Hz on roll, for example, configure `FILT1_TYPE = 1`, `FILT1_NOTCH_FREQ = 46`, `FILT1_NOTCH_Q = 5`, and `FILT1_NOTCH_ATT = 25`.
1466+
1. Apply the filter to the affected axis. For a roll resonance, start with `ATC_RAT_RLL_NEF = 1` and leave `ATC_RAT_RLL_NTF = 0`.
1467+
1. Use a target notch only if the command target is exciting the resonance. For example, set `ATC_RAT_RLL_NTF = 1` only when the roll target signal needs filtering.
1468+
1. If the same resonance affects roll and pitch, the same filter can be assigned to both axes. If the axes resonate at different frequencies, use separate `FILTn_` slots.
1469+
1. Fly a short test flight again and inspect the logs in the Filter Review Tool before making a change if necessary.
1470+
1. Disable the PID notch by setting the relevant `ATC_RAT_*_NEF` or `ATC_RAT_*_NTF` parameter back to `0` if the follow-up log does not show a clear improvement.
1471+
14251472
# 10. Improve altitude under windy conditions (optional)
14261473

14271474
## 10.1 [Windspeed Estimation flight(s)](https://ardupilot.org/copter/docs/airspeed-estimation.html)

images/With_D_FF.png

45.6 KB
Loading

images/Without_D_FF.png

43.4 KB
Loading

0 commit comments

Comments
 (0)