Strange behavior in position mode

Good morning to everybody,

This is my first post on the PX4 forum and English is not my native language. So please don’t judge me to hard. I am in to RC flying for over 20 years, fixed wing and I have only recently (2 years ago) bought a drone as I would like to learn about autonomous flight. My dream is to do some RC glider towing/ huckepack where the towing/ carrying plane is controlled by a flight controller.

I found a thread on the PX4 forum -> Very agressive oscillation in Position mode which describes a similar problem but was not really closed. After a warning from the forum that this thread was over a year old, I decided to start a new one.

My hex copter is a foldable Tarot 680 clone with fixed landing gear and an attached tarot 2 axle gimbal which is currently turned off.
Setup details:

  • Controller -> Pixhawk 2.4.8 with release V1.11.1
  • GPS -> UBLOX 7M with compass
  • Motors -> Brushless MC 3508 with 700kv
  • ESC -> HAKRC 35A with BLHELI_32 with latest firmware
  • Propellers -> 12x4.5
  • Batterie -> 4S Lipo with 5000mAh
  • Telemetry -> Sikradio version 1
  • RC -> either Multiplex M-Link connected via PPM encoder or Spektrum satellite
  • Take-off weight -> around 1900 gram with an additional payload of 1500 gram tested with Naza V1

It flew previously with an upgraded Naza V1- lite and it was flying decently well, but it lacked quit a lot of functions compared to PX4 so I decided to go for an upgrade.

My first flight with the Pixhawk and PX4 flight stack was not really successful as the drone is very unstable if you roll or pitch with the RC controls in Position mode. Yaw just looks fine and positions hold is good.
Link to the log: https://review.px4.io/plot_app?log=a6e5f9a1-6452-45cc-aa83-36832b7e0819

After reading quit a lot of stuff about PID tuning I started to decrease both MC_PITCHRATE_K and MC_ROLLRATE_K from 1 to 0.5. These new settings did not resolve or even reduce my problem.
Link to the log: https://review.px4.io/plot_app?log=d94671a5-f831-4018-b325-c6285d1577b3

So, my next test were two complete autonomous flights including a take-off, three waypoints and a return to home with landing.
Here it looks as if the drone is flying fine with still some PID’s to be tuned.
Link to the 1. log: https://review.px4.io/plot_app?log=94979dad-3a88-451c-9eb9-26088c5494b8
Link to the 2. log: https://review.px4.io/plot_app?log=9d39fe0d-4543-46f4-bb4d-920a63f29f48

At this point in time I was ready to believe that my problems where caused by the PPM encoder as also take-off and landing were not going sweet in position mode. Decent was way to slow and land detector not working reliable as it was in autonomous mode or when landing via the land function in Qgroundcontrol.

Link to the log: https://review.px4.io/plot_app?log=4c656f07-bea9-40f4-a329-393e7d2d5ce1

For the next step, I borrowed as Spektrum rc set to test this. But unfortunately I did not see a difference in reaction of the drone in position mode.
Link to the log: https://review.px4.io/plot_app?log=a092047f-9037-4766-8c1a-c62552d7b518

As I was now almost ready to try everything, I switch to Altitude mode and all looks different. Both roll and pitch commands from the RC are followed by the drone as expected.
Link to the log: https://review.px4.io/plot_app?log=6203e444-8f0c-48a4-8011-aa1032dd4d60
P.S. Yaw was a little bit trimmed out of centre in the beginning of the flight which I corrected with the trims on the transmitter.

I have tried to upload the current settings of my drone. But I did not find a way to do this in the thread. In general the are the standard setting from the hexacopter provided by PX4 except for the above described parameters. If needed anyway, please let me know.

As for now I really hope that someone out there can help / guide me in the correct direction to tackle this problem. So at least I can start with PID tuning and do some nice camera flights. Any help would be appreciated.

I have tried to describe and document my problem as clear as possible, but as a newbie in PX4 I am not sure that I wrote down everything. So please, if you have any questions, feel free to ask.

Best regards, enjoy your weekend and stay save/ healthy in these strange times,

Maarten from Bavaria

Yeah, your angular rate tracking on all three axes is terrible, and there’s a lot of z vibration. That might just be from rapid rate commands if the thrust is oscillating like crazy. I would check that frame joints are tight and that the flight controller is mounted properly just to be safe.

I would then check that the ESCs are properly controlling the motors by tying the vehicle down and doing some motor tests either through the CLI or the GUI in QGC. If the response to different step inputs is stable then I would follow the guide below. I’ve wasted a decent amount of time trying to PID tune when the problem was with ESC settings.

If you can, test by just barely lifting off in acro mode (you can tie some tethers so make sure it stays close to the ground. Set all rate I parameters (MC_PITCHRATE_I, etc) to 0 and decrease the P and D ones until it can barely lift off without vibrating, then for one axis at a time slowly increase D until it barely starts vibrating and reduce to 80% of that value. Repeat for P values and then set I to P and adjust from there. You can start by assuming the pitch and roll values will be the same since your frame is fairly symmetric.

You can then set the attitude and position controllers to taste, but the rate controller is the most critical low-level control loop and flying in higher level modes can hide the problems.

Hi Ben,
Tomorrow I do have a day off. Hope the wetter will permit some test flights.
Will keep you updated on any progress.
Regards
Maarten

Hi Ben and of course all others forum users,

I did some tests with reduced PID settings, increased the TOW by 500 grams but not really helpfull. The Z axis vibrations are still very high.
As I am not sure that I can fly the vehicle in Acro mode and we had some snowfall throughout the day. I did a bench test both in Stabilized and Acro mode.
In Acro mode the Z axis vibrations are a lot less as in stabilized mode.

Link to bench test in stabilized mode:


Link to bench test in acro mode:

I hope this information helps in pointing me in the correct direction to solve my problem.

best regards,

Maarten

Good morning,

As part of my testing, I have switched over to arducopter Software. Following their guidelines, which is much more time consuming, I have managed to het rid of my problems. So for the time being I will leave it as it is.
Thanks for all the support.

Regards,
Maarten