PSC_ACCZ_FLTD Function

Hi, does anyone know what PSC_ACCZ_FLTD + FLTE and FLTT are supposed to do ?
[11:23 AM]
Sorting out a little Sub250g Quad which is out of bounds on many params

@Redshifft,

Those three parameters are used by the vertical acceleration controller:

  • PSC_ACCZ_FLTT: filters the target acceleration before it’s passed into the PID (and Feed Forward)
  • PSC_ACCZ_FLTE : filters the error (difference between desired and actual acceleration) before it is fed into the PID controller
  • PSC_ACCZ_FLTD: filters the error again before it is passed into the D component of the PID. There’s an extra filter on the D because its input (the change in error since the last iteration) tends to be noisier than the Target or Error

Our Tuning Process Instructions don’t have any advice on changing these parameters so I think they can normally be left at their defaults but I’ll leave it to @Leonardthall to confirm and/or correct me if I’ve got anything wrong.

This is a picture from the yaw controller but it is using the same PID object:

image

Generally the Alt Hold PID is very forgiving as you don’t need very fast response from the Alt_Hold controllers. I generally reduce my filter parameters even on small quads.

INS_GYRO_FILTER,10
PSC_ACCZ_FLTD,10
PSC_ACCZ_FLTE,0
PSC_ACCZ_FLTT,10

Then start with:
https://ardupilot.org/copter/docs/tuning-process-instructions.html#test-althold

That will generally sort you out. However, if you can’t get nice stable Alt_Hold then you should check your VIBE messages and noise levels on your RATE out messages for all your axis as it is probably a sign you have something else going on.

1 Like

Thank you guys :slightly_smiling_face:
I realize I’m well out of the pid controllers optimum range with it requiring PSC_ACC_P and I needing to be down below 0.2 & 0.4 to stop bad motor oscillation in ALT Hold.
( My vibes are way down below 5 )
With those filters being say adjustable 0~50hz and some defaulted to 0 makes little sense to me that they seem to do nothing as a bypass or filter.
I have this Little thing flying quite well but it’s a little softer on Altitude control to the Throttle stick than I would like in ALT Hold.

I realize I’m well out of the pid controllers optimum range with it requiring PSC_ACC_P and I needing to be down below 0.2 & 0.4 to stop bad motor oscillation in ALT Hold.

PSC_ACC_P and I of 0.2 & 0.4 is normal, even high for a high power to weight aircraft. To put it in perspective I use 0.25 & 0.5 on my 50 kg aircraft :slight_smile:
I would expect you to get similar results based on the instructions I linked to.

With those filters being say adjustable 0~50hz and some defaulted to 0 makes little sense to me that they seem to do nothing as a bypass or filter.

Filters are turned off when set to zero.

I have this Little thing flying quite well but it’s a little softer on Altitude control to the Throttle stick than I would like in ALT Hold.

This is not a tuning problem. The feel of Alt Hold lacks some customisation. I hope to fix add some flexibility by the full release of 4.1.

1 Like

Think that was the key bit of information I needed :wink:

Nice :+1:

Again, Thanks for your help

2 Likes

@Leonardthall
Just a little (direct) feedback for you, I got this little 250g Quad reasonable in alt hold, It drifts up and down more than larger Arducopter Quads I’ve had and I suspect as i’m running some pretty low values many of the PSC settings do nothing, strangely even Baro weight (BARO_FLTR_RNG) I won’t go as far as saying the controller does not work properly but the ACC alone in Stabilize mode holds ALT almost as well.
I can find nothing out there about anyone else playing with all these setting on little Copters (or Big come to that) and I suspect it’s too much for most users anyway + basically the main PSC_ACC_p&I get you in the PH ballpark and the Autotune is very good for the rest.
I look forward to your ALT Hold customisations :slightly_smiling_face:
And thanks for your help

I have 5 small copters all perfectly tuned :wink:

One thing that makes a big difference is INS_GYRO_FILT - too low and you will also see this up/down behaviour

I’m running that at 60hz . Do you mean INS_ACCEL_FILTER ? _ I’ve no need to close down any of those filters as you see above I have next to no vibration, but I did not see that’s down at 20hz ( big Quad territory) - way too many params in Arducopter, about 20 for position hold :rofl:

I mean INS_GYRO_FILT. Try at 80Hz - see if it makes any difference, but monitor the temp of your motors (literally check after a few seconds hover) - you can let a lot more noise through if you are not careful. Also my parameters are set to

PSC_ACCZ_FLTD,40
PSC_ACCZ_FLTE,20
PSC_ACCZ_FLTT,0

So you say it’s using the Gyro in Position hold then?

The Gyro’s are used in every mode.

Ah I see. You mean the Position Controller not Position Hold…

Yeah, tried all those ranges and no change was noticeable.

Only fault I can really see is baro drifts pretty bad in the hud, but I locked that down to even accept only 1% reading deviation from average, also turned weighting for baro right down. Quad is super responsive in other flight modes and motors are cold with any of the settings so far - but I’m up to try opening up that Gyro cutoff .

Baro drift would do it. These small copters are super susceptible to it because of the proximity of the props to the FC - use lots of foam.

@andyp1per
Well I set INS_GYRO_FILT to 100Hz and INS_ACC_FILT to 80Hz for good measure - Zero difference !!! Also motors are cold. I can’t really do much more !!

The Quad holds Alt for say maybe 1 min then drifts down to the ground, sometimes it might go back up or drift up - Does this in ALT Hold or GPS hold (ok I have crap GPS signal in the Garden 7 sats and 1.1hdop + GPS does not do Altitude well as you would know.
Bottom line as I reported the Position controller does not work very well, at least with the low Param values small Quads need.

Thoughts?

Ah ok interesting - I thought you were seeing up/down jerking which is what this helps with. Slow drift to the ground is definitely a problem - I have this on my toothpick, somewhat assumed that its related to having propguards and the position of the Baro, but I am not conivinced. I also think its possible its a bug. This copter has a DPS310 which is the only difference I can see with another copter that works really well. Its also possible that its EKF related. It migt be worth producing a log of the issue with LOG_DISARMED and LOG_REPLAY on and see if anyone can diagnose what is going on.

Would be worth trying EK2 to see if the problem persists.

I’m Running EK2 :wink: :rofl:…EK3 is broken, at least was on dev release few weeks back (EKF Failsafes etc…)

The majority of settings doing nothing I would say is not good either Like virtually turning off Baro weight and raw sample averaging down to 1% doing nothing !!

As I say, normal Angle (ACC) flight mode holds ALT about as well as Alt Hold.