PID Tuning Caipi / Oscillations in pitch

Hi everyone!

After spending some time on figuring out that my PWM Out 5&6 were mixed up(…), I finally got my tailsitter - quite similar to the original Caipiroshka design - to hover.

However, with the standard parameters, I get quite a strong oscillation in pitch(see picture and flight log).

https://review.px4.io/plot_app?log=2a576e97-6873-47bd-9c1a-5649b4f67f14

There is also quite a strong drift that I have to compensate with the RC sticks; probably because I´m currently testing indoors without GPS fix…?

Any help is appreciated :slight_smile:

Gps is not required in this mode.

I suspect the problem is the control parameters, you can try changing the pid parameter. It would be helpful if you could provide videos and corresponding logs during the flight.
(Note: You should adjust the control parameters under FW_pitch / yaw_pid instead of mc, for pitch and yaw for tailsitter)

From the log, it seems that there was about 70hz vibration during the flight.

I had the same issue with the mixed-up MAIN5 & MAIN6 and I corrected it a few minutes ago in the documentation

Try to increase MC_PITCHRATE_P in steps of 20%. If that doesn’t help or if it makes it worse, reduce MC_PITCH_P in steps of 20%.

Not true, For tailsitter, mc_pitch_p/i/d no use

As stated here (see section VTOL):
https://docs.px4.io/v1.10/en/flight_modes/
VTOL vehicles support both modes (MC and FW). As Tim is hovering indoors, the vehicle must be in MC mode, NOT FW mode. So the relevant parameters are MC_xxx.

For avoiding drift during hover when not using GPS (e.g. STABILIZE mode, ALTITUDE mode,…) make sure that:

  • the COG of your vehicle is located inside or very close to the plane that is defined by your motor-rotation axes
  • your sensor calibration is correct (level horizon) an that your pitch/roll angles are zero when the plane is in vertical position.

I said it is not an old version, please look at the code of v1.10 or master branch
EDIT: I tried various adjustments to the mc_pid parameter on my plane, in the pitch direction. I found almost no change, and finally I found the problem … this is a painful process for me

https://github.com/PX4/Firmware/blob/master/src/modules/vtol_att_control/tailsitter.cpp#L306-L310 Looking at the code here, only the output of the FW attitude controller can act on the servo

This is not the case in version 1.8, in older versions the output of the mc attitude controller can control the servo

This is the improved PR I proposed https://github.com/PX4/Firmware/pull/13917
The latest documentation is incorrect for tailsitter vtol