How can I hold yaw rotation?

I use Lumenier QAV550 quadrotor, 13inch rotor.

But , when I rotate yaw rotation, it drifts over 15cm.

Even pixhawk knows drift, it doesn’t converge during rotation.

How can I solve this?? It’s related to PID gain tune??

To summarize,

  1. Yaw rotation drift
  2. Error doesn’t converge during rotation even pixhawk knows the drift.

@jongbeom.her

I have a few question to understand what is going on:

  • Could you explain more on the sensor and estimator configuration?
  • Is the position drift you are observing the local position estimation drifting?
  • How high was the yaw speed when making the rotation

A log showing what is going on will further clarify the problem

Thank you Mr. Lim

This is my plight log
https://logs.px4.io/plot_app?log=6dfa2227-22fd-423d-8d99-6c5f7c6c40e5

We use EKF2 + EV platform system and April Tag for Ground Truth.
Yaw speed is not fast, it’s about 3~4 deg/sec.

The one thing I didn’t mention about our UAV.

It is a little rectangular configuration.

PItch axis is 397mm, Roll axis is 374mm, and we didn’t modify mixer file.

It’s effected for Yaw rotation drift??

Are you using an external magnetometer that is far away from power electronics and ESCs? It looks like you have a electromagnetic interference on the magnetometer and therefore your yaw estimate might be off.

Check this plot: https://logs.px4.io/plot_app?log=6dfa2227-22fd-423d-8d99-6c5f7c6c40e5#Nav-Thrust-and-Magnetic-Field

The magnetic field shifts big time as soon as the motors start spinning.

Try using an external mag (the ones that come with GPS) on a pole and twist all DC high power cabling.

@jongbeom.her

Also, from the logs I can see a lot of oscillations around the pitch, roll and yaw axis. It seems like the attitude controller is over tuned or there is vibration in the airframe. This can have a huge impact on the EKF estimation.

Yaw estimate off as soon as motors start spinning is for our April Tag.
At the start point, our tag is tilted.

@jongbeom.her It is not related to the EV input. Looking at the magnetic field - thrust graph as @JulianOes has linked, the thrust / magnetic field interference seems to be quite significant.

Mr. Lim
Attitude controller is over tuned? not Rate controller??

And if there is vibration in the airframe, which point should I check?

I already have checked IMU damper, fastening of the parts.

@jongbeom.her

a. Sorry about the confusion. What I meant was the rate controller, as your estimated rates are oscillating quite high around the rate setpoints.

b. To check vibrations, you can check this graph: https://logs.px4.io/plot_app?log=6dfa2227-22fd-423d-8d99-6c5f7c6c40e5#Nav-Acceleration-Power-Spectral-Density

It is not too significant, but you seem to have something vibrating at 40Hz. You can also look at this document to see how you can mitigate this problem

Finally I have solved this issue.

After I modify mixer file, yaw rotation is perfect.!!

Thank for everyone

@jongbeom.her

Hi, could you please explain here how did you modified your mixel file? I am facing the same issue and have not been able to resolve it.

Thanks!

Hi @Fernando_Medrano You can follow this guide to modify the mixer file https://dev.px4.io/v1.9.0/en/concept/mixing.html

I´m having the same issue. What did you modify in the mixer file, the geometry? Or did you change some offset value? It would be really helpfull for me.
Thanks!