Oscillations in estimated measurements

Hi, I would like to get an opinion about what im seeing with my data. I can see small fluctuations in AHR2 estimated attitudes and EKF. Despite the vibrations show way below what is recommended and no clipping. Ill be sharing pictures below so that I wont bother you from checking logs.

I have also did some filter analysis through the webtool and with current config the filters are attenuating the vibrations but i have some latency.
Any ideas?

Hardware setup: H-frame, VTOL (but im only hovering at the moment), 12S batteries (2 - 2 in parallel), and 300Kv motors with 12’’ props.


Zoomed

It is the samething in EKF and AHR2 data

Gyro Filter:



There is no need for 3 Harmonics, the first one is enough

True, Thanks for the point. Any ideas about the root cause of the oscillations i see in the data?

One thing at a time.

The notch filters are not tracking all noise. Are you sure the number of motor magnetic poles parameter is correctly set?

For a multisource that BW is way too high.

Any clue why you have two noise spikes at very low frequencies?

The number of poles at the moment are 14. I am using Vertiq motors 300 Kv and honestly they dont have in their documentations the number of poles.

In my first image i selected flight time span that had some maneuvers but in the image below i selected a steady flight.

There are still some spikes at the beginning but I am not quite sure why.

For a multisource that BW is way too high.

Did you mean INS_HNTCH_BW=10 is high?

One point that it might cause this is that i have 8 motors and two of them at the front from each side are tilted inward around 3 degrees just to give better yaw authority. Do you think this is what causing the peaks?

I dont think i have propeller imbalance as the motors rpm are behaving approximately the same

No, but 8 motors with 2 harmonics each = 16 notch filters = high processor load.

INS_HNTCH_BW must be smaller than INS_HNTCH_FREQ / NUM_MOTORS

10 < 40 / 8 This is not an hard rule, but is probably a good idea.

Either reduce INS_HNTCH_BW or increase INS_HNTCH_FREQ.

And disable that second harmonic

Without accessing the log, this is guesswork, but I think the correct nr of poles is 12.


I have 50 to 65% of CPU load, i think this is high but i am not sure what is the acceptable margin?

Here is one log


zoomed

This is the best that i could reach. Does these values make sense?!

Nope

INS_HNTCH_FREQ = 1
INS_HNTCH_BW = 0.112

Are NOT correct:

Try:

INS_HNTCH_FREQ = 80
INS_HNTCH_BW = 10

And post a dB graph, your attenuation is probably too high.

The peak just before the multisource notching reachs got dropped from X-axis (-21.34db to -24.15db - at 44.80Hz)

zoomed

I could achieve the following by setting notch freq to 40 Hz

40 is irrelevant your motors will not go there according with the ESC telemetry data you provided, so using 40 makes no sense.

Use the values I told you to and post a zoomed dB graph of the 100Hz-200Hz region.

The notch is triggering at 156 - 158 Hz region
More zoomed:

Increase ATT to 30 and do another flight to confirm that all is fine.

You started out with the GYRO filter at 40 Hz.
Why did you changed it to 50?

That was a mistake. I returned it back to 40.

Okay, changing the number of poles to 12 and setting the new params of filtering, you think it would remove these oscillations?

Any progress on this?

I will do a flight test on Wednesday. I will keep you posted.
But as a small update that I have found out from VERTIQ the number of poles are 14 for 300KV motors which is already have been setup SERVO_BLH_POLES=14

Would this still take effect if i am using DroneCAN?

Yes it will, use the configurator to set it. DroneCAN uses another parameter, but the AMC will set all three.

1 Like

I removed the content of my latest post as no one is interested in sharing knowledge.