Servers by jDrones

Tuning the Harmonic Notch

Set INS_LOG_BAT_OPT = 2 it shows the gyro values after the filter stage

Also in the wiki :wink:

it is set. i see it in the settings. ok, it is not set. :slight_smile: i was looking at the old file. will correct it now.
ok, will go outside to try again.

Those graphs are for post-filter? Ok so I suspect you are just missing the peak a little. Try 90.

You can see why the dynamic FFT is a good option - it figures this all out automatically.

You could also set ATT to 40

ok, new FFT is here, with a proper 5mah battery on - previous one was a light one.

it looks like spike is at 100hz and filter worked. so i see i need to set freq to 100hz, and att to 40.

Yes, looks right. Good stuff!

is that now a default that should be set to any configuration, ESC based or throttle based?
in all other models i have it set to 30 - is the advice now to set it to 40 everywhere?

@Leonardthall and I have agreed this should be the default. Increasing it will not cause any harm and will help on copters with more extreme noise. I set it to 100 on some of my copters :slight_smile:

With the filtering enabled and configured as described in my prior reply, I was able bring the PID tuning up significantly higher than I have ever been able to do in the past. I was never able to get rid of overshooting at high speed high acceleration before. Bring the PIDs up that high started stuttering and fluttering and bad things. Now I’m able to bring it up and tune that overshooting right out. The pitch P alone went up 67% and D almost 40% higher. It can descend through it’s own wake a lot faster and more stable now too.

3 Likes

Hi Andy, I tested your FW with safety cable (1 meter). With the default parameters I had only one ceiling rocket (with the safety cable stretched and zero gas did not drop in altitude). However, for the first time, autotune started on the roll axis (unfinished for low battery). If setting the parameters as indicated in this guide (using parameters for quads less than 5 ")

http://ardupilot.org/copter/docs/tuning-process-instructions.html!

I had several uncontrollable rockets, so I put it back to default.
I set the filter notches as you indicated.

I have this FFT setting:

FFT_ENABLE,1
FFT_FREQ_HOVER,80
FFT_MAXHZ,350
FFT_MINHZ,100
FFT_SAMPLE_MODE,0
FFT_SNR_REF,25
FFT_THR_REF,0.35
FFT_WINDOW_OLAP,0.5
FFT_WINDOW_SIZE,32

INS_HNTCH_ATT,15
INS_HNTCH_BW,20
INS_HNTCH_ENABLE,1
INS_HNTCH_FREQ,80
INS_HNTCH_HMNCS,3
INS_HNTCH_MODE,4
INS_HNTCH_REF,0.14
INS_LOG_BAT_CNT,1024
INS_LOG_BAT_LGCT,32
INS_LOG_BAT_LGIN,20
INS_LOG_BAT_MASK,0
INS_LOG_BAT_OPT,0
INS_NOTCH_ENABLE,0

Andy, why 4?

Thanks :slight_smile:

If you use the firmware from @andyp1per INS_HNTCH_MODE=4 means that frequency tracking mode use dynamic FFT from his PR:

Ok :slight_smile:
on the wiki I read this:
Values ​​Range
0 - 3
Value Meaning
0 Disabled
1 Throttle
2 RPM Sensor
3 ESC Telemetry

It is a PR (Pull Request), until it get merged you will not see new value for parameter in the wiki.

Ah ok good, thanks!!

It looks ok, you could set INS_HNTCH_BW to 50 say I think.

When you get a rocket, what mode are you in? Is it AltHold? If so do you have foam over your baro?

can we discuss in a bit more details the factual differences between “3 ESC Telemetry” and “4” modes values for INS_HNTCH_MODE?
is there any benefit at all to use 4 instead of 3? i would presume 4 instead of 1 - throttle driven - is probably a valid idea, but, why would it (i mean mode 4) be better than an RPM driven model?
after that effort done yesterday, i could see in the end the complete absence of gyro vibrations in both 4" and 3" models, with 3" going automatically to 200hz area and 4" in 130hz area, using mode 3. it seemed to work very well.
took some time to find - here is the 3" FFT after filter.

the PSC_ filters - what do you have them on? try that - set them to 80 as below.

PSC_ACC_XY_FILT,2 PSC_ACCZ_D,0 PSC_ACCZ_FF,0 PSC_ACCZ_FLTD,0 PSC_ACCZ_FLTE,80 PSC_ACCZ_FLTT,0 PSC_ACCZ_I,1 PSC_ACCZ_IMAX,800 PSC_ACCZ_P,0.5 PSC_ANGLE_MAX,0 PSC_POSXY_P,0.25 PSC_POSZ_P,1 PSC_VELXY_D,0.5 PSC_VELXY_D_FILT,80 PSC_VELXY_FILT,80 PSC_VELXY_I,1 PSC_VELXY_IMAX,3000 PSC_VELXY_P,2 PSC_VELZ_P,5

If you have ESC telemetry then you definitely want to use mode 3 - it will give you the best result by far. Mode 4 is only for when you don’t have ESC telemetry, which is quite common in older ESC’s and larger copters. Mode 4 is CPU intensive however, so mode 1 is better if you don’t care so much about the accuracy and CPU is a concern (but it is significantly more complicated to set up and needs setting up all over again if you change any of the thrust control parameters). On smaller copters I have also seen mode 1 diverge significantly at high throttle, you can reduce this by changing the thrust linearization but that can also lead to control problems at higher throttle. Finally mode 1 is immediate, there is no latency in the calculation whereas mode 4 has delay which gets more significant the longer the FFT you run, mode 3 also has some delay but is probably not that significant.

i presumed the same. i would only suggest adding that as a general comment to wiki, so it would be clear for users - but, i think, in the current reality total majority of ESCs are blheli32 with support for telemetry, so, it should be easy enough to follow with mode 3 as a generic rule of thumb.
all in all it seems to work pretty darn well.

Servers by jDrones