Height control loop stability with Lightware Lidar LW20

Hi there,
I put a LW20 on the copter and got it working by serial port. I did it to get more precise height measurements. That seems to work.
But the height control loop is now prone to oszillations after ascending/decending. There aren’t too many parameters around and the only one which could did improve the situation is
RNGFND_FILT 20
I increased it from default and 20 seems to be the maximum as any higher values are reset by the autopilot. Higher filter frequencies should reduce lag…
I also tried
EK3_HGT_DELAY 60 → 250
but the maximum allowed there is 250. Looking at the log and comparing RFND[0].Dist to CTUNE.Alt shows a lag around 600ms. That’s even much slower than GPS[0].Alt.
What could be done to get height control loop working properly?
Disconnecting the lidar could help, then it’s pretty decent, hardly any overschoot :wink:
To me it would be ok to connect the lidar just to get the values in the log.

Thanks Ruediger

So here a graph where one can see what happens after a climb:


The max amplitude of the oscilation is 2.5m! :frowning:

Just to display the lag of the lidar height:


and to measure the delay:

~600ms

Looking at the lightware manual I didn’t find a possibility to speed up the communication. The measurements seem to be fast enough, even with the “slow” speed of 48 measurenents per second.

So what could be done to reduce oscilations?

Thanks Ruediger