What should I use for ATC_RAT_PIT_FLT* values?

Are you sure of this? Is the first time that I read to set FLTD for YAW instead of FLTE.

1 Like

@Taipan Sorry I made a mistake and corrected it above.

@anbello Thanks for correcting my mistake!!!

1 Like

Would be good to add that in the tuning guide.

Thanks

Harald

1 Like

Yes, that will all be done as part of the 4.0 release.

As always we would appreciate any help we can get to update the wiki faster or with better presentation.

I can see the logic for these new parameters but am unsure how to correctly use them. Was updated documentation for this released with 4.0? I am struggling to find any mention of these new parameters. All the docs I have relate to the older parameter. I am setting up a large x8 and need to be sure the values are correct.

We are going to add this:

3.6:
ATC_RAT_PIT_FILT - INS_GYRO_FILTER / 2
ATC_RAT_RLL_FILT - INS_GYRO_FILTER / 2
ATC_RAT_YAW_FILT - 2

4.0:
ATC_RAT_RLL_FLTD - INS_GYRO_FILTER / 2
ATC_RAT_RLL_FLTE - 0.0
ATC_RAT_RLL_FLTT - INS_GYRO_FILTER / 2
ATC_RAT_PIT_FLTD - INS_GYRO_FILTER / 2
ATC_RAT_PIT_FLTE - 0.0
ATC_RAT_PIT_FLTT - INS_GYRO_FILTER / 2
ATC_RAT_YAW_FLTD - 0.0
ATC_RAT_YAW_FLTE - 2
ATC_RAT_YAW_FLTT - INS_GYRO_FILTER / 2

2 Likes

@Leonardthall Thank you for the clarification. Most appreciated.

What process or procedure should people then use to determine the best value for INS_GYRO_FILTER ?

I think there are two questions here:

  • how high does it need to be to be flyable. I think the wiki suggestions here are correct
  • how much higher could it be to achieve greater control. I think this is going to be based on more than just the prop size, motor size, vehicle mass and others will all make a difference, but similary too high on a poorly constructed craft and you are going to get a lot of motor heat. So probably not a question with a single answer.

I’m using 30inch propeller with arducopter 4.0.0 HEXA configuration. What is the suggested INS_GYRO FILTER value?

Default value is 20hz now and ATC PIT & RLL _FLLT & FLLD value also 20hz.

That’s probably fine

Then it’s not necessary to have the value like this
ATC _PIT&RLL FLLT FLLD= INS GYRO FILTER /2

IF this the atc value from my case is 10hz right.

Are there use cases these parameters needed to be customized in a different way?
I mean, why not just to set INS_GYRO_FILTER, and all other _FLTT & _FLTD will be calculated automatically :slight_smile:

Yes, there are cases when they should be customized.
You can increase them for better performance, up to a point.
On my small copters my gyro is 100, and filtd, filtt are 90.

As a developer it is easy to make the mistake of thinking you know better than the users. The problem is that as soon as I make a decision to hard code a relationship like this it ensures the users can’t show me that I don’t know what I am talking about. :slight_smile:

There are always exceptions to the rule, even if it is a good starting point. Keep in mind that these PID object are used to fly a huge range of aircraft.

Keep in mind the reason for the FLTT filter is to reduce the noise from the lower update rate of the RC input and the EKF bias corrections at 100 Hz. That is why I try not to increase the FLTT filter above 20 Hz. Depending on the aircraft this may not be practical but it is something to keep in mind.

1 Like

Thanks for the information. I was not clear on what each new filter does.
One of the two was at zero after I updated and I had some trouble, so I made it the same as the other. I will try some lower values.

Is there more detailed information about these new filters somewhere, or can you briefly explain FILTE?

Indeed!

There are really about 6 filters that can be used to optimise performance.

The Gyro Filter is a 2 pole low pass filter that operates at the full data rate of the IMU and is used to remove the majority of the high frequency noise. It is particularly important because it must remove the majority of noise above half the PID loop rate (400 Hz by default).

The Dynamic Harmonic Notch. This is a series or notch filters that move up and down with the throttle setting or rpm sensor and in the future a real time FFT. We use this to further filter the propeller noise.

The Fixed Notch. This is a notch filter that is used to filter vibration mount, frame, or payload resonances.

Now we drop down to the PID update rate (400 Hz by default)

The FLTT filter. This is a single pole low pass filter. This filters the target rate coming into the PID object from the attitude controller. Its primary role is to filter the noise created by the lower update rates of the RC input and EKF bias corrections.

The FLTE filter. This is a single pole low pass filter. This filters the error term after the measured rate is subtracted from the target rate. I sometimes use this filter in roll and pitch if I have very large amounts of high frequency noise. In Yaw this is the primary filter and is used to replace the D term.

The FLTD filter. This is a single pole low pass filter. This is the filter used to prevent the D term amplifying high frequencies.

That is my go at an explanation of the relevant filters. I am not sure how I have done but I hope it helps. It might be worth going onto the Wiki somewhere if I get some feedback to refine it a little.

14 Likes

I think that’s a great explanation.
It has helped fill in the blanks for me, and I’m going to make a few adjustments to a copter I’ve been working on.

1 Like

With input from Leonard I’ve updated the tuning process wiki page to mention the new filters.

Hope that helps

4 Likes

Just a small clarification here. The gyro filter operates at the IMU backend rate which in general is 1Khz. The backend rate is a multiple of the IMU sensor sample rate which for fast sampling is typically 8Khz and for regular sampling is also 1Khz

D-term amplification is where smoking motors come from. Basically if too much gyro noise (controlled by the other filters but also the physical properties of your build) gets into the D-term filter and the D-term filter is set too high you will get noise feedback into the motors which they will not like very much. This effect can happen in a matter of seconds so when increasing gyro and D-term filters always check your motor temperature.

5 Likes