PosCtl Tuning Question

After changing ESCs to new ones with BLHeli, I have a Problem with PosCTL behaviour. Stabilize is currently smooth, but in PosCTL when accelerating it works perfectly but during deceleration I got one very strong oscilation. Can somebody give me a hint as to which Controller may fix this?

This is the RC Stick Input for deceleration on Pitch:

Resulting AngularRate and Angle

And corresponding Gyro Angular Speed Spike

Take a look at what the multicopter position controller is doing (MPC_* params).
Start by comparing velocity and position with vehicle_local_position and vehicle_local_position_setpoint.
vx, vy, vz
x, y, z

I don’k know the exact cause but I have a comment.

It is strange that the green line ‘Pitch Setpoint’ in the second plot increases after near the time 6:37.500 although the green line ‘X / Pitch’ in the first plot almost hold the current value horizontally.

What I did is decelerate Pitch, so Pitch was almost at middle at the end. So the Vehicle tried to brake, just the reaction is probably too aggressive, so the Controller tries to compensate which ends up in this Spike.

I tried the suggested PID Tuning from the User Guide - although this is a bit scary with a 70cm Hexa with Carbon Props when you know it may unfold about 3kW of Power, which is about 4 Times the Power of my Drillingmachine :scream:)

However I ended up having a MC_PITCH_P / MC_ROLL_P of about 3 (default was 6.5, which I reduced to 5 in the above flight). I’ll try to perform a test flight with these settings and report here. Also I updated to current master (as of 7.11.17).

A quick Testflight showed still a similar behaviour but as the PITCH & ROLL Gains are now way down the Aircraft did not expose the Hickup as drastically as it did before. Still the effect shows in the log. With the lower Values the Aircraft flies like a wet cleaning Mop.

And here the Gyro:

So my Results of PID Tuning by “Hand” are the following (as I have a Hexa I assume identical Parameters for Pitch and Roll Params as this should be symmetrical):

MC_*RATE_P = 0.2
MC_*RATE_D = 0.001
MC_*RATE_I = 0.07


Are the higher RATE Values causing the high Oscillations? If so I would try to lower RATE_P to default or even lower. Any suggestions? I’m really bad at Tuning…

During the Brake there are also stronger Oscillations

@dagar any hint for me?

Oh, and a link to the Log: https://logs.px4.io/plot_app?log=97104bff-c74d-4baf-b82f-1ce99c520b43

Hi, Andreas. Are you flying well these days?
As reviewed your flight log graphs (but it’s too late), it seems there’s no strange oscillation or special problem in you flight log.
The pitch graph is normal in decelerating. Such amount of overshoot can be possible, if you don’t want such ± 40 deg tilt angle reduce the position controller gains or limit the maximum XY velocity or maximum tilt angle.
But a little oscillation in pitch rate seems due to the too much P or the ratio between P and D gains of attitude rate controller. So you’d rather change them until it disappears.

1 Like