Optical Flow Oscillations


I am tuning a larger 4 arm octocopter. It flies well in manual flight mode, and I can not see anything drastically off with the PIDS,

but once I move to position flight mode I am seeing strong oscillations. (We are using optical flow with the Ark Flow)

Just hoping for a bit more guidance into what I should be looking into for further debug.

  • velocity PID loop
  • optical flow settings
  • etc…

Thank you in advance

I take a look at the velocity setpoints and response, and I can see they are very far apart

but i have never seemed to tune the velocity controller before, so I am hesitant to point towards it

It looks like pixel flow is minimal, might not be but the logging rate is low. The the gyro oscillations are dominating the velocity calculation.

We have a piece of glass that is over the optical flow sensor. we are going to try and remove that to see if it is causing any unintended reflections.

Looks like it might have been the glass



The glass had a smudge on it. After removing the glass entirely our pixel flow rate went up, and the drone is now stable in flight

@AlexKlimaj Thank you for your assistance!

This solution seemed to work to get rid of large oscillations, but we seem to still have a problem with position hold and smaller oscillations. Alex indicated that we should NOT be dampening the arkflow. So we are going to hard mount it to the airframe to see if this resolves our issue.

Alex was able to show us that our compensated flow integral was actual HIGHER than our uncompensated flow integral

This indicates an issue that the gyro is outputting. Probably due to our mounting of it. Thus, we are hard mounting

We got this working. Here are the 3 things that we did

  1. Ensured that there was no glass in front of optical flow sensor (there can be glass, but ours was smudged a bit so we just took it off)
  2. Hard Mounted: we have the flight controller on some heavy vibration dampeners. The theory is that this screwed with the gyro on the ark flow. we hard mounted it to the airframe without the vibration dampeners
  3. Ensured white emitter had hole: In our original case we covered this white emitter that was on the board. We uncovered it

Position hold is working very well


Wanted to show here what a healthy optical flow chart looks like

this was from Alex btw