@bresch I’m having vibrations near between 50Hz to 60Hz.
Now in such case should I set the notch Filter frequency and bandwidth only as a first step or better set the low pass filters GYRO CUTOFF & DGYRO CUTOFF?
what’s best practice & when to use Notch & when to use low pass or we should set both?
Hi, the static notch filter should be used when there is a structural resonance as this occurs at a fixed frequency. The gyro and DGyro lowpass filters are used to remove the high frequency noise in general.
If you have ESC telemetry, the best thing to do is to use RPM-driven notch filters. If you don’t have ESC telemetry, you can also set a notch that follows an FFT.
In your case -from what I can see from the screenshot you shared- the noise doesn’t seem to be an issue for the control loops (the actuator outputs signals are quite clean). So unless you have RPM feedback from the ESCs, I don’t think you need to change much.
Hard to tell if the control loops are well tuned when the drone is hovering in place.
What’s the approximate size/weight? And the other rate gains (K, P, I)?
You could try the dynamic notch (FFT based), but if you say that you see “low frequency vibrations”, you might need to iterate on the tuning gains a bit.
If you have a log to share, it might be easier for me to help you.
@bresch the Quadcopter size is 85cm width & 65cm long. The weight is 9kg.
Pitch rate P: 0.15, Pitch rate I: 0.20
Roll rate P: 0.08, Roll Rate I:0.20
Yaw rate P: 0.20
Not sure, should I set lowpass filters to high frequency or lower it down. specially DGYRO CUTOFF, as I remember You suggested for heavy UAV to drop DGYRO to 20Hz or so.
I’m planing to set notch filter to 48Hz with a bandwidth of 10.
What do you think @bresch in my case is it better to try notch filter or low pass filters? And what frequency should GYRO CUTOFF & DGYRO should be set too? My drone is as I said 9kg weight & has folding arm joints and it’s 75cm x 85cm L X W.
Btw @Romain_Chiappinelli in my FW (1.12.3) there is no second NOTCH filter showing only one and I don’t want to update since new FW versions caused me issues in Log analysis and other stuff and I’m sticking to the current FW. So what suggestions for the notch filter you advise me & also for the GYRO & DGYRO filters values please.
@Romain_Chiappinelli Note that the peaks at 50 and 60Hz are most likely the bladepass frequencies. Then fixed notchs will help to reduce vibrations while hovering (and that might be enough depending on the application) but not while moving.
@Falcon D value of the PIDs. Large quads already have quite some angular rate damping due to their large propellers so the D term is not as important. Maybe try to lower it step by step to see if you observe an improvement of if it gets worse.
@Falcon Could you please provide more details on this? We really want to make the upgrades as simple as possible, so we much appreciate feedback if there are things that are preventing users from upgrading. Also, by sticking to an old version, you’ll miss a ton of new features and bug fixes.
Regarding the notch filter I only have one in my current FW so what should I do? Shall I increase the bandwidth?
Regarding GYROCUTOFF & DGYRO what do you suggest I set them to?
Regarding frame update I noticed vibrations are amplified in new FW versions and there are changes in how filtering is done which will require complete retuning if I change! There is a long thread post about that if you remember.
yes, you can increase the bandwidth to 25 Hz maybe
I would suggest GYROCUTOFF=20Hz and if you set the PID D gains to 0, then
DGYRO become irrelevant (otherwise set it to 20Hz).
I saw that you also have a noisy attitude setpoint in position mode. In that case I would recommend setting the MPC_XY_VEL_D parameters to 0. You can try decreasing them bit by bit till you reach zero.
Please post your questions here rather than private message so other community members can benefit from the answer.
In the logs you sent me the roll and pitch vibrations look much better with the wider notch filter.
Your high acceleration noise on the Z axis is probably due to the roll and pitch vibrations. Not the yawrate.
I think you pitch axis is a bit too aggressive (if you look at the PID analysis you’ll see your pitch step response is overshooting). You can try to reduce MC_PITCH_P to 6. And potentially the MC_PITCHRATE_* gains.
Otherwise there is not much more you can do to reduce these vibrations on the Z axis. The EKF was significantly improved on v1.15, so your vehicle might behave better. And yes, you’ll probably need to re-tune your vehicle.
To reduce the acceleration you can set the ACCEL_CUTOFF to 20 Hz.