Hardware settings?

raemin

Apart from the mandatory hardware settings what are the other "exotic" ones (GyroRange, AccelRange, GyroLPF, AccelLPF ) about?

roteron

I've adjusted GyroLPF and AcelLPF low pass filters to reduce sensitivity to vibrations. Its been very successful for me with my large odd ball creation. I could clearly hear the motors working hard against vibes at hover, and during forward flight it was worse. BLHeli_S is very quiet but still produces a distinct whistle in the motors, which gives audible indication of the underlying motor command activity. I could never seem to get rid of this any other way no matter how how well the props are balanced. I've gone to extreme lengths with other vibration isolation methods in the overall design so I was perplexed. It occurred to me that the standard 55Hz cutoff of the LPF's was very close to the frequency of my slow turning blades hitting the booms, so I would never be able to get rid of this. Lowering the LPF value tamed everything nicely, to the point where I could even see a reduction in hover power. That's my theory for my particular problem, anyway.

raemin

The lowPass filters are specified both in the HwXXXXXX (hardware) and SensorSetting . How are these working together?

mlyle

raemin The filter in the hardware pane is a high-order anti-aliasing filter that is built into the invensense parts. If you sample at 1KHz, you can't have any components higher than 500Hz without ambiguity, so you need a "brick wall" filter to keep those out.

The SensorSetting filter is our own actual filter for flight. The default is a 55Hz, 1st order (very gentle / smooth) filter. An 85Hz 3rd order (a fair bit sharper) would probably be better for most uses, but I've been hesitant to change the defaults. In the end, it doesn't matter that much, because the PIDs themselves are a filter of sorts.

The total frequency response is, well, the mechanical filtering convolved by the sensor response convolved by the sensor lowpass convolved by our lowpass ... convolved by the filter that the PIDs effectively form.

raemin

Assuming the motors and props are balanced and I still record noise on the autotune, would the following approach make sense:

Does it make sense to increase hardware and software filter together?
Once I've found a proper filter level am I supposed to still record some noise in the autotune?

mlyle

Noise on the autotune isn't the end of the world / isn't something to worry about. Only if the noise is nearly as big as the actuation is there a problem.

In general, leave the filters alone.

Especially the "hardware" filters-- I never touch those, they are a sufficient antialiasing filter.

For things with very large props where the prop frequency can get in through the 55Hz filter, it can be worth changing the cutoff order and frequency-- e.g. to a 35Hz 4th order filter if the blade frequency is 55Hz. This is pretty much the only time it's worth tweaking. For smaller things, you're better off with mechanical filtering (damping).

The autotune parameters just control how aggressive of PIDs you get from a measured system, and the defaults are almost always fine.