PSC_ACCZ_FLTD Function

Little more feedback. I would say flying around in POS HOLD is not a good experience (wishy washy) with PSC_ACC_P & I down at 0.1~0.3 range - suggests I may have been correct about the controller not happy with values below it’s hard 1.0 lower limit.

Thoughts?

This are my settings, flying great:

PSC_ACCZ_D,0
PSC_ACCZ_FF,0
PSC_ACCZ_FLTD,40
PSC_ACCZ_FLTE,20
PSC_ACCZ_FLTT,0
PSC_ACCZ_I,0.37
PSC_ACCZ_IMAX,800
PSC_ACCZ_P,0.185
PSC_ACCZ_SMAX,0

Yeah, I’ve had another go at it and pushed PSC_ACCZ_P as hard as possible and the thing is definitely better. I can only get up to 0.30 but it’s so much better than 0.185 I ended up with before. (added some D also , but I don’t think it does much)
I think someone needs to take a look at that controller as my conclusion is as before - It’s just not happy with low values.
Quad does sink occasionally in ALT Hold but has not hit the ground and goes back up again now :slightly_smiling_face:

@Redshifft,

I’m afraid we can’t let comments like, “EK3 is broken” just slide by without some better description and analysis. Have you got an onboard log?

I fear what is happening is various parameters are being changed at the same time without much understanding of what they do. I really think to get the best outcome a more methodical approach is required involving:

  1. clearly stating the issue & providing a log demonstrating the issue
  2. analysis and suggested param changes (by the likes of @andyp1per and I)
  3. implementation of those changes and re-testing

… and then we repeat this iteratively until we get it flying better or we come up with code issues that need fixes or enhancements and/or improved documentation.

Thanks again for testing 4.1.

2 Likes

Randy, That’s off topic and emotional - You have no idea how much you have pissed me off!! and certainly not half a clue to the amount of time and effort I have put in to giving you some accurate quality feedback.

@Redshifft

Sorry, I’m not trying to upset you or anybody else of course. I do appreciate the feedback and testing.

Are there logs somewhere we can look at? Maybe they are in some other discussion that I haven’t been part of?

Thanks to @rmackay9 and @Leonardthall for explaining the PSC_ACCZ_FLT* params.

Anyway it seems strange to me that the default for PSC_ACCZ_FLTD, FLTE, FLTT are 0, 20, 0 when @Leonardthall recommend 10, 0, 10.

One question: what is the use of setting the PSC_ACCZ_FLTD != 0 when PSC_ACCZ_D = 0?
I see also @andyp1per recomends PSC_ACCZ_FLTD = 40.

This has a lot to do with the size of the aircraft. Andy uses very small aircraft where I spend most of my time with medium sized aircraft. We attempted to drop the default filter setting to 10 Hz but too many people needed to adjust their Alt_Hold tunes. I run with 10 on all aircraft because I don’t need the responsiveness and expect alt hold to be accurate and smooth to minimise interference with the quality of the attitude hold. But this does require slightly lower pid values on PSCZ.

@Leonardthall,

Maybe we should add propeller specific advice to the Tuning Process Instructions wiki page? Perhaps down in the “Test Alt Hold” section?

Yes. I think craft with very high thrust/weight could benefit from some advise with these params.

I find the instructions on the tuning page work very well for all aircraft. Andy does not need his filters set this high. He has a tendency to take all his filters as high as he can but this is not necessarily the best thing to do for overall performance. This is why I said I run 10 Hz on all aircraft.

1 Like

Thrust to weight does not impact the filter settings. It is the response time so it is more torque to propeller inertia.

In general the PSC controller tune is pretty straight forward after the attitude controller is tuned well.

OK. This for example. The craft flies well generally but the commanded motor output at forward speed is oscillating and bouncing off of Motor Min. Is this a attitude control issue, a PSC Control issue or is it simply high thrust to weight and hard to tune? There has been quite a bit of forum activity around this recently.

ahhhh, no this is terrible.

It looks like the attitude controller is oscillating. If it wasn’t for the protectins in the attitude controller and motor mixers this aircraft would simply crash on take off.

Thanks for the explanation, I understand, use higher or lower frequencies depending on the desired result and change the PSCZ values accordingly.

What I didn’t understand is how to use the PSC_ACCZ_FLTD, FLTE, FLTT parameters, which is the most important in AltHold tuning?

You recommend using FLTE = 0 and FLTD, FLTT != 0 while the default values are complementary to these with FLTE != 0 and the other two zero.

Perhaps it would be useful to add the explanation of these parameters to the “Test Alt Hold” section of the “Tuning Process Instructions” wiki page.

Yea, I have found it a pesky problem to solve with this craft but I’ll go back tuning Attitude.

1 Like

The reason for the difference in defaults to what I recommend is because if we set my recommended parameters as defaults anybody who has not changed the defaults already will find their parameters change.

So when you upgrade if you have not changed a default value and that default value changes then you get the change. So in order to not risk messing up peoples tune I have to suggest people change the defaults.

For example, when we reduced the default IMU ACCEL FILT default to 10 a bunch of people started see oscillation in Alt Hold. So we had to move it back to 20 Hz. But this didn’t change my recommendation to set it to 10 Hz.

1 Like

That is exactly what we need - I don’t want to say most of the settings do nothing but that is what I found, certainly with PSC_ACC_P &I down to 0.1/0.3 range the controller does not seem too.
With more interest in smaller craft maybe a look into how this controller scales is needed.
At least then anyone putting the time and effort in tuning would be able to feedback which settings do little.

1 Like

The problem here is that most users do not understand this image:
image

So if people don’t understand the impact of filters on a PID loop, and they do not need to be changed from the defaults, then it does not make sense to talk about them in a tuning guide. It would serve as a distraction to more important parameters.

I am building up diagrams of the control loops in the 4.1 release that we will make available on the wiki for people that do have an understanding of guidance and control. So I hope that will fill that small gap.

In this case I think your comment is what I expect most users to experience:

The PSC_ACC P and I term ARE the most important parameters to tune for the alt hold controller with the biggest impact. So I stand by the process set out here:
https://ardupilot.org/copter/docs/tuning-process-instructions.html#test-althold

Reading through this I think the working at the end could be improved:
“AltHold starts to move up and down the position and velocity controllers may need to be reduced by 50%.”

This could be interpreted as gentle slow movement when it is referring to vertical oscillation or maybe fast bouncing. People may be interpreting poor alt hold performance as “movement up and down” and then reduce these parameters making the problem worse. So I will fix this.

2 Likes

@Leonardthall
Well all I can add is the Alt and Position controller do not work properly for me then.
I understand what filters do and I’ve opened them up and closed them down, Think I also mentioned I have to push PSC_ACC_P&I close to Oscillation to get anything better than Altitude hold not even using ALT or POS Hold controller !!
The Only thing I did not do was try the filters with PSC_ACC_P&I in what I feel is a range the controller starts to work properly.
I think we are not going to get anywhere with this until You or a Dev has a little Copter to try yourself.