Tuning the Harmonic Notch

Hi anyone here have tested pid gains for M690A T-Drone Quadcopter. The default gains shows bit oscillation on roll and pitch axis. Please share.

Please open a new thread about that specific issue.

If I’m not wrong, I’ve seen you post about this issue in three other posts where none of the posts where created by you for your specific issue.

It’s going to be very hard to help you if you scatter your issue over several posts. I would strongly suggest you create a separate new post of your own for your specific issue.

You will probably get better help if you do.

1 Like

I am task to prempt and work on another drone.

  1. Hover thrust value will change for different weight and [it is supported ( ATC_ACCEL_P_MAX x (min_TOW / max_TOW)](Setting the input shaping parameters — Copter documentation).
    So which hover thrust value should I use.
  2. From where I can get the min_freq and hover_freq?

The updated formula is actually:

  • INS_HNTCH_REF = hover_thrust * (min_freq / hover_freq)^2

That is “sqaured” not “square root”
which works out very roughly as
INS_HNTCH_REF = hover_thrust * 0.6
when using the throttle based HNOTCH filter.

You can collect the data for determining the filter settings with
INS_LOG_BAT_MASK,7
INS_LOG_BAT_OPT,0
and you’ll be able to see on the FFT graphs and estimate the minimum frequency, or use motor RPM and
Freq = RPM / 60
which is easy if you have BLHELI RPM data.

Hover thrust values WILL change with payloads, as you say. The trick is checking different flights to see what’s changed and if you need adjust any HNOTCH settings. You might be able to come up with HNOTCH settings that work well across multiple payloads.
Or:

  • use RPM based HNOTCH
  • ensure you have a good flight controller and use FFT based HNOTCH

And same for Accel values and payload changes, you might be able to come up with values that work well across multiple payloads. Or just have a tiny .param file for each different payload , or no payload.
The param file could include the appropriate HNTOCH and ACCEL values for each payload.

  • new ATC_ACCEL_P_MAX = ATC_ACCEL_P_MAX x (min_TOW / max_TOW)
  • new ATC_ACCEL_R_MAX = ATC_ACCEL_R_MAX x (min_TOW / max_TOW)
  • new ATC_ACCEL_Y_MAX = ATC_ACCEL_Y_MAX x (min_TOW / max_TOW)

You may want to check the small Magnitude box.

1 Like

Yes, post in the right thread. This is an old one for Copter 4.0.

After this value imu batch sample not showing
LOG_BITMASK=178175

Default this value imu batch sample work
LOG_BITMASK=176126
Why ?

Does that make any difference for imu sample ?

LOG_BITMASK=178175 = B0010 1011 0111 1111 1111
LOG_BITMASK=176126 = B0010 1010 1111 1111 1110
Not sure you have the same encounter as me last time.
could be due to Fast Attitude.

I think fast and raw are conflicting with the IMU batch sampling

No dont change that log bitmask, leave it at 176126

For Harmonic Notch Filter work set these:

INS_LOG_BAT_MASK,1
INS_LOG_BAT_OPT,0 ← see below

0 for pre-filter data
2 for post-filter data
4 for both pre- and post-filter data, this is best.

When everything is confirmed working correctly with HNTOCH
INS_LOG_BAT_MASK,0
INS_LOG_BAT_OPT,0

1 Like

Indoor flights shouldn’t have a GPS signal, right

I do not see the flight modes logged in with gps .bin.

3Rx3x4.5" propeller, high rpm, motor hot high chance.

you are flying stabilizes flight mode, I think very good result.

you should further try Alt-hold flight mode with MOT_HOVER_LEARN = 2, followed by outdoor for loiter flight mode with a calibrated GPS.

MOT_THST_HOVER is unlikely to be less than 0.25, a sign of the motor is under power, maybe. CTUN.Th0 ave 0.32.

My guess is you are using a digital ESC DShot600.
any reason why you limit MOT_SPIN_MAX to 0.65?
which flight controller board are you using, a digital motor signal for example cubeOrange is
SERVO9_FUNCTION,33
SERVO10_FUNCTION,34
SERVO11_FUNCTION,35
SERVO12_FUNCTION,36
I hope this is correct for a different type of flight controller

any reason why you still stick to EKF2 and not migrate to EKF3?

I think you need to start your own discussion for all this, rather than put it all in the Harmonic Notch general discussion.

1 Like

Start your own discussion since this is not related to the harmonic notch filter

check my notch setting comment any suggest
frame : own made 450mm
fc : pixhawk 1
esc : 35A 2-6S Blheli_S DSHOT600
motor : ready to sky 2212 920kv
https://drive.google.com/file/d/19Z0N6dL-oLxSIkU5rJy2vSz_BAdPkykZ/view?usp=sharing

For DSHOT to be effective you need to use the AUX outputs for motors, not the Main outputs.
I would advise to use the bi-directional DSHOT firmware, then set the HNOTCH to use ESC RPM data:
INS_HNTCH_MODE,3
The params I recommend below can still be used if you get DSHOT working.
Look for a message in MissionPlanner Messages like:
RCOut: PWM:1-8 DS600:9-14

With the existing config, set these:
INS_HNTCH_REF,0.16
INS_HNTCH_FREQ,77
INS_HNTCH_BW,38
IINS_HNTCH_OPTS,0
INS_HNTCH_HMNCS,7
INS_LOG_BAT_MASK,1
INS_LOG_BAT_OPT,4

Please also set
BATT_FS_CRT_ACT,1
BATT_FS_LOW_ACT,2 or 3

EDIT:
INS_HNTCH_FM_RAT,0.7

1 Like



2

4
5

JazzMaverick BLHeli_S firmware flashing old ver J-H-30, 16.7
motor pin move to main pwm to aux just setting changes servo output 9,10,11,12 motor selection
BRD_PWM_COUNT not showing SERVO_GPIO_MASK = 0 motor aux work

after weekly holiday test fly

Don’t use the double-notch

INS_HNTCH_HMNCS 3 ok ?

after all setting change esc rpm showing in log ?

Depends on what your FFT shows. 3 ok for two-blade props

1 Like

today flying

after switch poshold hold,loiter,land mode quadcopter climbing high
compass/motor calibration Done interference 30
frame 450 fc pixhawk 1 gps m8n
error
ekf variance
vibration compensation on/off
gps glitch or compass error

mission planner screen recorder and bin file attach
https://drive.google.com/file/d/1sy6TCHgjc63EE0EwYFB64iSFTrc4l5ub/view?usp=sharing
https://drive.google.com/file/d/1nvwrHUTgTzsKM0FKyy4SCajnriYH5nwZ/view?usp=sharing