You just bought one of our iFlight Nazgul XL5 HD BNFs and wanna know why it flies so good?

Well, let's dig into some details how it has been tuned and what you can try to fine tune it even further!

First things you might wanna know:

- Betaflight 4.2.0 was used to tune, and then further updated to 4.2.1 at this point in time.

- The Betaflight Devs prepared some tuning presets if you wanna check it out.

- The whole tune is based on the preset "HD" which should feel smooth to most pilots, but was further customized to get some tighter PID loop following your setpoint.

Quote BF Tuing Notes on Github (please check the link above):

"HD (smoothed FF for HD cameras, strong low turn rate smoothness, low iterm relax to minimise bounce back)"

set iterm_relax_cutoff = 10

set rc_smoothing_auto_smoothness = 20

set ff_interpolate_sp = AVERAGED_3

set ff_smooth_factor = 40

set ff_spike_limit = 55

set ff_boost = 0

set feedforward_transition = 40

set yaw_lowpass_hz = 70

set throttle_boost = 5

set throttle_boost_cutoff = 10

set dyn_lpf_dterm_curve_expo = 7

set gyro_rpm_notch_q = 800

Return to default Betaflight 4.2.x values:

set iterm_relax_cutoff = 15

set rc_smoothing_auto_smoothness = 10

set ff_interpolate_sp = AVERAGED_2

set ff_smooth_factor = 37    

set ff_spike_limit = 60

set ff_boost = 15

set feedforward_transition = 0

set yaw_lowpass_hz = 0

set throttle_boost = 5

set throttle_boost_cutoff = 15

set dyn_lpf_dterm_curve_expo = 5

set gyro_rpm_notch_q = 500

set iterm_windup = 100

Other recommended features:

set dyn_lpf_dterm_curve_expo = 6

set vbat_sag_compensation = 100

set vbat_pid_gain = OFF

set rc_smoothing_type = FILTER

set rc_smoothing_input_hz = 0

set rc_smoothing_derivative_hz = 0

set rc_smoothing_input_type = BIQUAD

set rc_smoothing_derivative_type = PT1

set rc_smoothing_auto_smoothness = 10

Dynamic Battery Sag Compensation:

set vbat_sag_compensation = 100

set vbat_pid_gain = OFF

- If you wanna try other Betaflight Devs preset of the 4.2 Tuning Notes above, please make sure you save your factory diff (Open the CLI in your Betaflight Configurator and type in "diff" and copy/paste the whole output into a txt file to backup) and copy/paste the Betaflight Devs preset to compare how it feels for you. 

- "Feel" has become a big word with the release of 4.2.0 (in my opinion). Twisting around some FF values and some other PID loop improving tweaks makes a big difference if you are really looking for a certain stick feel.

So what did I do with the tune?

- First thing was trying to find a good PD Balance, related to weight, geometry and thrust of this aircraft.

- Second was trying to get the PD Gain right, before it starts to overshoot or results in twitchy rolls and flips.

- Due to the fact that this might vary depending on what props, batteries or flying with a GoPro - you could even try to raise PD Gain up one or two notches if you want better Propwash handling. The factory tune is a good tune for ALL pilots, but not a tune for everybody's purpose, never forget that!

- FF_Boost by default was set to 15, the HD preset is 0. Turned it back to 15 to get tighter setpoint following.

- RC_smoothing_auto_smoothness default was set to 10, the HD preset is 20. Turned it back to 10 for less RC delay.

- Dynamic Battery Sag Compensation is on. Consistent responsive throttle and PID 'feel' through the entire flight.

- Raised motor idle to 7.5% to get rid of low thrust (low authority) wobbles at low throttle.

- and probably some other little value changes to make it feel like I want it to feel.

Filter tuning:

- We use a customized JazzMaverick firmware on our BLHeliS ESCs to enable RPM filtering!

Please checkout the github resource if you wanna stay updated:

- Betaflight recommends turning down the dynamic notch filters when using RPM filters, that's what I did.

With rpm filtering:

set dyn_notch_width_percent = 0

set dyn_notch_q = 250

Without rpm filtering:

set dyn_notch_width_percent = 8

set dyn_notch_q = 120

- Checking the noise chart and PID loop behaviour after some hard flights and I turned the Gyro and P term filter up to a slider value of 2.0 which results in less filter delay (lag of your input "setpoint" to the actual PID loop "tracking" of your drone)

- Dynamic Notch filter values were adapted to the noise profile of the aircraft to optimize delay and efficient noise cancellation at the frequency it's needed.

- If you want to get even lower delay, try to completely get rid of your Dynamic Notch filters, but make sure you got an eye on your motor temperature and don't fly to messed up motors or props! Be Cautious!