Hover mode | accelerometer?
Posted: Tue Nov 29, 2016 5:35 pm
Hi guys.
I'm working on making the drone flying really steady in hover mode without the human need to change something.
So far I managed to tune the PID for an almost perfect hover in the XY plane. The things get complicated which I go in hover mode because, from what I understood, it starts using different PIDs and, because of the noise in the barometer's data, it starts oscillating in the Z axis. Unfortunately, this oscillation on the Z axis influence the XY plane movements and the drone starts to have little shift.
Do you guys ever faced this sort of problem?
I have already done a characterization of the barometer's raw data and found out that a "moving average" algorithm helps to reduce the oscillations but the drifts of the barometer cannot be solved easily.
I was thinking this is, maybe, because the Z accelerations are not considered in hover mode? I mean the acceleration from the accerometer.
Finally, I cannot really understand the following:
What are those estAlpha, velocityFactor, vAccDeadband, velZAlpha? I don't want to change before understanding what are those. Maybe some sort of low-pass filter?
In the meantime I will try to tune the hovering PID in order to see if something gets better. I will update you.
Thank you for you time.
Best regards,
Jassy
I'm working on making the drone flying really steady in hover mode without the human need to change something.
So far I managed to tune the PID for an almost perfect hover in the XY plane. The things get complicated which I go in hover mode because, from what I understood, it starts using different PIDs and, because of the noise in the barometer's data, it starts oscillating in the Z axis. Unfortunately, this oscillation on the Z axis influence the XY plane movements and the drone starts to have little shift.
Do you guys ever faced this sort of problem?
I have already done a characterization of the barometer's raw data and found out that a "moving average" algorithm helps to reduce the oscillations but the drifts of the barometer cannot be solved easily.
I was thinking this is, maybe, because the Z accelerations are not considered in hover mode? I mean the acceleration from the accerometer.
Finally, I cannot really understand the following:
Code: Select all
struct selfState_s {
float estimatedZ; // The current Z estimate, has same offset as asl
float velocityZ; // Vertical speed (world frame) integrated from vertical acceleration (m/s)
float estAlpha;
float velocityFactor;
float vAccDeadband; // Vertical acceleration deadband
float velZAlpha; // Blending factor to avoid vertical speed to accumulate error
float estimatedVZ;
};
In the meantime I will try to tune the hovering PID in order to see if something gets better. I will update you.
Thank you for you time.
Best regards,
Jassy