PSCD target and actual velocity is oscillating

I have given velocity in Z direction only from low velocity to 5 m/s as step input. I have done set PSC_ACCZ_P=Hover thrust value and PSC_ACCZ_I=2Hover thrust value.
I see oscillations in velocity z direction.
Can someone please help in correcting this. I have followed methodic configurator instructions?
Tuning guide tells to make PSC_POSZ_P and PSC_VELZ_P to 50% if oscillations are found. I did not try that yet.
Also please do give a look at RATE.
parameters in log and comment.
Log

We need a .zip file with the configuration files

@dkemxr can you also give your suggestions please

I see what you are reporting. I think I would leave PSC_POSZ_P where it’s at and try lowering _VELZ_P a bit. Perhaps not 50%. There is overshoot as well as oscillation so lowering it too much may not help both. If this does nothing set it back and I might suggest a bit of PSC_VELZ_D. Not a common parameter to change from default but I have played around with it before.

It’s too bad we don’t have the PSC_VELZ parameters available for in-flight tuning, it could potentially ID the fix in short order.

Thanks @dkemxr for your suggestions.
Do you suggest adding PSC_VELZ_FF parameter because there is lot of I term oscillation. Also can you please give a starting point for PSC_VELZ_D.

Good question but I don’t have any experience with that parameter. For PSC_VELZ_D try 0.1 and see if it does anything at all.

1 Like

@dkemxr I tried with following settings.
PSC_POSZ_P=1
PSC_VELZ_P=5
PSC_VELZ_D=0.1
PSC_VELZ_FF=0.1


My response is oscillating a lot still.
Log

Similar response I am getting with
PSC_POSZ_P=1
PSC_VELZ_P=3.75
PSC_VELZ_D=0
PSC_VELZ_FF=0.1

Also I am observing huge Spikes in Vibe during descend. Is it frame resonance. What is work around here? Is it affecting the PSC?
I have set harmonic notch filter from 100hz.

Also in one of flight following were the parameters and response.
PSC_POSZ_P=0.5
PSC_VELZ_P=2.5
PSC_VELZ_D=0
PSC_VELZ_FF=0


But still needs to be improved.

This is another one
PSC_POSZ_P=0.5
PSC_VELZ_P=5
PSC_VELZ_D=0.1
PSC_VELZ_FF=0.1

@dkemxr @amilcarlucas can you please go through my logs and images and comment
PSC_POSZ_P=0.5
PSC_VELZ_P=5
PSC_VELZ_D=0.4
PSC_VELZ_FF=0.1


Log

Is there any ratio that has to be maintained between D and P term of velocity in PSC?
All suggestions and reference material are welcomed!

Disable EnableOnAllIMUs on INS_HNTCH_OPTS

And you can lower the harmonic notch filter to 85 Hz to cope with lower RPMs during descents.

How sure are you that the baro is not picking up prop wash?

Thanks @amilcarlucas. I will try with that option but it wont affect the oscillations right. I checked the CPU load it is around 65% maximum only. Can you please comment on the PID values of PSC?

First you need to make sure that the baro sensor signal has good SNR. Otherwise the PIDs will never do a good job.

I edited my post above, please read it again.

I am using GPS with RTK for vertical height. I will do these settings and fly.

If you are doing that you should take a look at 21_ekf_config.param and play with the two parameters

1 Like


This is from one of hover flight.
@amilcarlucas
In terms of dBm also everything is below 40dBm.
I see that my motor rpm falls to around 1400 rpm which corresponds to 23Hz frequency during steep descend. How low can i set harmonic notch frequency? And if the harmonic frequency is really low should the bandwidth be half or quarter of that?

Given the 0.7 Kg of your vehicle I would say never go bellow 65Hz

You are using one notch per motor. DO NOT CHANGE the NOTCH BW your current value is fine.

1 Like

@amilcarlucas One doubt i had about RATE message. It is below 0.1 when I do hover but in the above log you can see it has gone over 0.1 for quite a few moments. Can you please comment on it

That is not that bad.

1 Like