Very agressive oscillation in Position mode


I’m new to PX4. I have a quad with a 800mm V frame. 6S 15x5 carbon prop on 4014 400kv motors.
It fly well with Arducopter with default PID of V frame.
In QGC I choose “Steadydrone QU4D” as it is what is the nearest configuration.

In Stabilize and Altitude it fly quite well but in Position it goes crazy and make really big and fast oscillation, almost 45°, while keeping position, really impressive to see. The oscillation is on an axis from back left motor to front right motor.
Sometimes it keep calm but if there are wind or move command it goes it oscillation.

Maybe that choosing “Steadydrone QU4D” is the mistake. I see in 10017_steadidrone_qu4d in ROMFS/px4fmu_common/init.d that it set these parameters:

     param set MC_ROLL_P 7.0 (default : 6.5)
    param set MC_ROLLRATE_P 0.13 (default : 0.15)
    param set MC_ROLLRATE_I 0.05 (default : same)
    param set MC_ROLLRATE_D 0.004 (default : 0.003)
    param set MC_PITCH_P 7.0 (default : 6.5)
    param set MC_PITCHRATE_P 0.19 (default : 0.150)
    param set MC_PITCHRATE_I 0.05 (default : same)
    param set MC_PITCHRATE_D 0.004 (default : 0.003)
    param set MC_YAW_P 4.0 (default : 2.8)
    param set MC_YAWRATE_P 0.2 (default : same)
    param set MC_YAWRATE_I 0.1 (default : same)
    param set MC_YAWRATE_D 0.0 (default : same)
    param set MC_YAW_FF 0.5 (default : same)

I don’t see many difference. Any advice on how I could correct this behavior ?

Can you flash beta, which had the latest release candidate, and retry? Can you share a log file on

OK, I will upgrade to 1.4.1RC3, but it is raining here :frowning:
Here is the log :
In this flight I have take off in Position and experience the problem at take off.
I give try to Position two other time and only one experience the problem.

Same as here?

Yes, you both have a setup where the default position control gains are too high. @JulianOes Could you look again into the logs and see if we can make some good tuning recommendations?

I don’t have video but when I say aggressive it really was, not like Sn0west where is copter is a bit nervous and don’t keep position.
In my case I have to switch back to Altitude to avoid the quad destroy himself as it goes from 45° to -45 in less than a second (from my point of view, I didn’t know if the log show that ?). But even with that it was keeping position well, it was really impressive.

@Benoit_C Can you share a flight log on Without it its virtually impossible to say why this happens.

Please also make sure to flash the latest beta branch, as we’ve improved some of this recently.

@LorenzMeier : My log was in a previous post :
I have updated to 1.4.1 but not been able to fly yet.

@Benoit_C Unless you’re flying a Steadidrone Q4D you have the wrong frame config. Try the generic quadrotor X config instead. Your attitude gains are likely not a match to your system nor is the mixer.

Alternatively if you prefer to stick with your mixer (if the geometry matches) try reducing the gains a bit (MC_PITCHRATE_P, MC_ROLLRATE_P).

I have reset all the config and switch to Quad X and will try to fly like that.
It is just that it is a quad in W configuration. The space between back motors is 3 centimeters less than between front motor.

@LorenzMeier Same problem after switching to default quad X (after putting Arducopter, then back PX4 to be sure everything was clean), do all the calibration and fly.
I take off in Stabilize, switch to Altitude, then to Position : it was not perfect but goes fine, I fly around and after one minute it goes mad.
Here is the log :
You can see that the controller put motors at full trust alternatively at 21h24.
It is a quad with a 800mm V frame. 6S 15x5 carbon props on 4014 400kv motors.
It fly well with Arducopter with default PID of V frame.

v1.4.1 has been officially released, but I’m a little bit skeptical after all the issues @Benoit_C and others have reported. LPE indoor seems to be pretty stable in v1.3.4 already so it might be better to wait until the dust settle.

I have the same problem with 1.3 and I think that I was using another estimator.

I have agressive pitch/roll oscillation in Position hold mode at the moment when I change RC TX stick position.
No oscillations in Alt Hold or Stabilized modes. In “Alt Hold” stick control is smooth and proportional.
No oscillations in Pos Hold mode if I don’t touch the sticks. If I move pitch/roll stick a little (about 5%), the quad tilts agressively to about 30 degrees and oscillates a couple of times. Then it stabilizes at small angle corresponding to stick position and flies smoothly in the given direction if I keep holding the stick at 5%. If I change the stick input, the quad oscillates a couple of times again.
I have tried significantly decreasing all attitude PI gains (and rates). It reduces the response in Stabilized mode as expected, but oscillations in Pos Hold (on stick movement) are the same or almost the same.
What can I do? Tweak some Position Hold gains?
It feels like Position controller is fighting to correct the attitude change caused by stick input and wins at the beginning.

1 Like

I will reply to my own question and ask a couple more :slight_smile:

Reptile 500 quad with Pixracer + PX4 stable.
I was able to reduce oscillations on stick input in Pos Hold mode to some degree by changing Position Control PID gains.
MPC_XY_VEL_P has a huge effect. At default 0.09, oscillations on stick input are concerning. At 0.12 they are huge and scary. At 0.06 they are small, but still present.
Increasing MPC_XY_VEL_D from default 0.01 to 0.02 results in different fast oscillations that are always present (not just on stick input). Position control signal is probably not very friendly for derivative calculation. i.e. D-term cannot do a miracle here.
Changing MPC_XY_VEL_I from default 0.02 to 0.03 or 0.01 did not visibly affect the oscillations. I-term is probably slower than oscillations.
Changing MPC_XY_P from 0.95 to 0.5 did not have a visible effect on oscillations.Not sure what this parameter does.

Question 1:
What do I loose by reducing MPC_XY_VEL_P to the min value of 0.06 ? Reaction time to a new waypoint and new stick position in Pos Hold? Does it effectively change max speed (tilt angle)? i.e. I might have a problem fliying in strong wind in Pos Hold mode if position PI are too low?

Question 2:
I am guessing that oscillations are caused by the large stick deadband in Position Hold mode. Maybe something can be done to reduce the effect in the future? Maybe something like subtracting the deadband value from RC input signal in Pos Hold mode to prevent jumping from 0 to 10% ? Obviously, I don’t know much about position controller yet and this is just a guess.

I will get to reading position controller code eventually and it will probably provide answers for most of my questions :slight_smile:


i have the same issue with pixracer on a 550 quar frame in pos control mode. were you able to get your problem corrected?

Hey there!
I found your Question and so such my Answer:) Does U solve the issue?

I had the same problem with my Pixhawk Mini quad. Here is the log from the wobble: . It would get so bad that the vehicle would invert. In this log you notice the MC_PITCH_P and MC_ROLL_P are 7.0, the default is 6.5. 6.5 still didn’t help. I set both values to 5.0 and the position control works nicely. I ran a short mission and it still flew nicely. Hope it helps.

have you solved your problem? I have the same problem, thanks