Drift in PID controller I am using MATLAB Simulink's toolbox for Parrot Minidrones, which have an ultrasound an optical flow sensor built-in. Whenever I am trying to let the drone hover in position, it drifts into one direction (always the same direction). The strange thing is that the drone knows it is drifting, but nothing is happening to correct it:

The drift only seems to occur horizontally, vertically the drone is not drifting. An overview of the relevant part of the PID implementation can be found here. I have tried tweaking some values, but it does not seem to improve. Does anyone have any tips for what the issue might be?
Edit: graph of roll, pitch &amp; yaw
Your controller controls pitch and roll. However, in the graph you showed us we only see x,y and z.
Could you add the plot for pitch and roll? I'm not an expert in aircraft control, but I think you can have a constant pitch and roll and still move in the x,y,z plane.
I'll edit my answer as soon as you give more info.
Edit : You roll seems stable, you could try adding an integral component to your pitch roll controller.