While in Loiter Mode: loss of altitude when executing a Yaw

The mistake is switching flight mode at all after Autotune finishes.
Autotune is a flightmode like any other, and it could just as easily be on a 3 position switch with Stabilize and Loiter. Once you change a flight mode anywhere on any switch the Autotune mode is changed/cancelled.
Best and easiest to just stay totally in Autotune, land and disarm.
The parameters you’ll see change will be ATC_ Those gyro ones get recalibrated on every boot.
If you have the .bin log file it might be useful. The tlogs have limited value.

Shawn, my confusion is when in AT (no matter what mode was active when I selected AT i.e. Loiter or AltHld) will AT let me have full Throttle control of the Quad once AT is finished? What I see is that after completing AT the Quad looks to still be in Loiter mode i.e. parked in the sky, thus TX throttle control (altitude control) is not via the TX but is instead via the Pixhawk Loiter mode (and since in Loiter/AT neither mode would be expecting the throttle to be reduced to land). If that makes sense.

I was thinking that since I transitioned from Loiter to AT that AT is basically a hybrid Loiter/AT and that altitude control is governed by this Loiter/AT mode. Thus, any change of my TX Throttle stick would be overridden by the Loiter/AT to maintain altitude?

Shawn, redid AT Yaw only: Here is the dif. file:
The table below is a diff. file of the params: Post AutoTune (left col.) and Pre AutoTune (right col.)
So the lower value for ATC_ACCEL_Y_MAX means the Yaw is now less aggressive? What about ATC_ANG_YAW_P, ATC_RAT_YAW_FLTE, ATC_RAT_YAW_I and ATC_RAT_YAW_P?
image

.bin file: https://drive.google.com/drive/u/0/folders/1oJu4VgNgmyL_zD6jq1j20pBN_rVmGqK6

Yes, Autotune behaves a bit like Loiter, and yes Autotune is over-riden by any stick inputs, so you can move the aircraft around during Autotune. Autotune pauses then resumes for stick inputs.

Those new values look good. The only thing to change with Yaw is the ATC_ACCEL_Y_MAX if yaw is not snappy enough. Add a couple of thousand if yaw is overshooting and undershooting, until it’s just right. Reduce it by a couple of thousand if you’re adding a significant payload.

You can set this now too:
ATC_THR_MIX_MAN,0.5

Personally I’d try a Autotune on pitch or roll axis next. Once it completes you can manually put the same values into the other axis and it should be near enough to correct all round. Then run Autotune on pitch and roll together, or even all three axis, and it wont take very long.

Shawn, Here is the Roll AT dif.:

The table below is a diff. file of the params: Post AutoTune Roll Axis only (left col.) and Pre AutoTune (right col.)

I was surprised to see Yaw values being changed in AT (Roll axis only)?

Conducted a very quick flttst (post AT Roll Axis only) flight, all seemed good, no hint of oscillation!

Pitch axis tomorrow or the next day, and then all axis the following day.

.bin https://drive.google.com/drive/u/0/folders/1oJu4VgNgmyL_zD6jq1j20pBN_rVmGqK6

You are comparing old Yaw values from before the yaw Autotune. No yaw values were changed in that Roll Autotune.

  • See how high that ATC_ANG_RLL_P can go? :slight_smile: With manual tuning most people would never try values that high, they would probably make more changes to the ATC_RAT values.
  • See how little the ATC_RAT_RLL values changed? Except D term came up to be only a tenth of P and I - we nearly had those correct!

You will be able to set all these before the next Autotune and it will go quickly. I haven’t asked for them to be exactly the same as RLL values, but they will be close enough to ensure safe flight AND a quick Autotune.

ATC_RAT_PIT_D,0.01
ATC_ANG_PIT_P,16
ATC_ACCEL_P_MAX,95000

A log of the test flights would be good instead of the Autotune log, when you get a chance.

Shawn, sorry I did do the diff. on the wrong file. So here is the correct diff.

You did nail the ATC_RAT_RLL_I/P!

Also, .bin from the Post AT Roll flight: https://drive.google.com/drive/u/0/folders/1oJu4VgNgmyL_zD6jq1j20pBN_rVmGqK6

OK, I will set the you suggested (below) before the next AT Pitch only flight, then follow up with a all three axis AT:
ATC_RAT_PIT_D,0.01
ATC_ANG_PIT_P,16
ATC_ACCEL_P_MAX,95000

Roll attitude is definitely working well in that log - now to get Pitch the same.
Yaw is pretty good too, but you might still want to bump up ATC_ACCEL_Y_MAX a couple of thousand or so.

Oh and I meant to say: with those D term values relatively high keep checking motor temperatures for the first couple of flights - they should be warm to the touch at most, or preferably cool. Never hot!

And dont forget ATC_THR_MIX_MAN,0.5 - it just gives you more manual throttle control after initial testing phases. It’s the default value, and we lower it for safety during set up.

Hey Shawn, I conducted the AT Pitch only, and then the AT All Axis (only required about 5 min. for the full AT All Axis). Looks like the AT went well. Unfortunately, on landing after the All Axis AT the Quad pitched backwards (landing on small dia. gravel) and chipped the #2 and #4 props. I replaced the props prior to the Post AT All Axis test flight, and now I have a Z axis prob. that I need to resolve.

Also, Motors seem to be warm, but not hot.

Post AT All Axis Test Flight, seems to be flying really nice (except I have the Z axis vibe. issue to resolve.
here is the .bin:https://drive.google.com/drive/u/0/folders/1oJu4VgNgmyL_zD6jq1j20pBN_rVmGqK6

Yes apart from the suspect Z vibrations everything else is really good. I would leave the tuning, see what you can do about the Z vibes and then just get up a bunch of flight time.

Hey Shawn, checking in: The 1st Auto flight went well, I can see / hear the difference in the Quad (Pixhawk 3DR ver Pixhawk Clone).

Still fighting the Z Vib. I should have been able to replace the #2 and #4 props (props. pre-balanced before installing on the motors) with the mark on the motor aligned with the mark on the prop and get about the same low Z vib I previously had. But that is not the case. So, I went back through the vibration measurement setup. Put a vib. monitors on the #2 and #4 Quad arms and a vib. monitor on the Pixhawk. Got about the same readings as when I previously setup (and significantly reduced) Z Vib. But it is not working this time!!?? I will have to try something else.

Do you think I am reasonably safe to be flying Auto missions with the Z Vibs as high as they are (no clipping)?

Here is a Bin file if you are interested: https://drive.google.com/drive/u/0/folders/1oJu4VgNgmyL_zD6jq1j20pBN_rVmGqK6

More Questions: I flew 2 consecutive Auto flights this morning. What is odd is the .bin file does not show the Auto Mode, yet the Quad flew the waypoints without issue? Here is the NKQ1 and as you can see know Auto mode??

Also, I saw an orange EKF in the HUD (Compass). Never seen this before??

.bin: https://drive.google.com/drive/u/0/folders/1oJu4VgNgmyL_zD6jq1j20pBN_rVmGqK6

If you zoom in a bit you see the Auto mode, it’s the whole light blue section.

There’s a fair bit of interference with Compass 2 (the onboard one) with throttle. Set this parameter to ignore it: COMPASS_USE2,0
You can see in this graph Compass 1 (Red line) hardly deviates with throttle (Blue line), but Compass 2 (Green line) is all over the place - not the worst we’ve seen though :slight_smile:

EDIT: Z vibrations are definitely getting into that grey area of not being sure if there could be adverse affects. You’ll have to try your motor and prop balancing tricks again, or check the flight controller mount and wiring.

Hey Shawn, well conducted a few Auto flights after disabling COMPASS_USE2,0 (the Orange HUD EFK annunciation issue) and I have not seen any Orange EKF in the HUD. The Auto flight this morning I did see Orange EKF in the HUD once again (about 60% of the flight when the Orange EFK showed up) 7:54:31 was the time tick when the Orange EKF annunciation showed up.
image

.bin and Tlog: https://drive.google.com/drive/u/0/folders/1oJu4VgNgmyL_zD6jq1j20pBN_rVmGqK6

Strangely the only thing that seemed to change at exactly that time was GPS horiz and vert accuracy, both degraded slightly and sharply, then gradually recovered. Although compass innovations did also change a little.
This setting might improve GPS consistency
GPS_GNSS_MODE,65
by limiting the constellations to GPS and GLONASS. Most GPS receivers get overwhelmed by more than 2 constellations and update rate goes down.
Then take the quad outside and wait for a good GPS 3D fix, HDOP less that 1.0, usually down around 0.7 - then run the Compass calibration procedure again.

Otherwise the next step is to try the Compass/motor calibration which involves removing and refitting your props (twice) and a bit of high throttle which can be scary, not to mention dangerous if done wrong. I haven’t suggested it before because the external compass shows little to no interference from the motors and associated magnetic fields, and so you’d expect not to need that procedure.
https://ardupilot.org/copter/docs/common-compass-setup-advanced.html#common-compass-setup-advanced-compassmot-compensation-for-interference-from-the-power-wires-escs-and-motors

You can safely set this for improved manual throttle control
ATC_THR_MIX_MAN you can set to 0.5

It’s not a big deal, but there’s still a very small oscillation happening in pitch and roll. To me it shows the signs of a D term being too high, which yours do seem to be…
You could try these to smooth out the pitch and roll a tiny bit, it should be totally safe because this is a very tiny change to D terms
ATC_RAT_PIT_D 0.009
ATC_RAT_RLL_D 0.0078
I’d be interested to see a .bin log after changing those.

Hey Shawn, well post recal. of the external compass (and possibly the GPS change: GPS_GNSS_MODE,65?? the compass interference issue seems to have gone away?!
image

One thought, I only noticed the compass interference while in Auto mode, and in Auto mode the external speaker (Pizeo device) is active annunciating each WP crossing. Do you think this may be the cause of the compass interference?

Flight was Stab. followed by long loiter (apprx. 7 min flight), flight begins around 7:01:19 and ends around 7:07:19.
1 - No hint of HUD Red EKF issue!
2 - The change to the ATC_THR_MIX_MAX,0.5 seems to provide a much smoother with more precise control of the Quad’s altitude. Great suggestion (I realize you suggested this several days ago but I prefer to do things piecewise so that I can more easily identify an induced problem).
3 - I did see a small amount of oscillation on descent (could have been the Quad flying through its own prop. wash).

Questions:
1 - Since the compass interference seems to be gone should I try re-enabling the internal compass and recal both compasses?
2 - When you analyzed the .bin and spotted some oscillation what param were you looking at?
3 - I am wondering how the compass interference has just vanished. Any thoughts on that?

.bin and Tlog: https://drive.google.com/drive/u/0/folders/1oJu4VgNgmyL_zD6jq1j20pBN_rVmGqK6

Hey Shawn, in addition to yesterdays flight (no signs of the HUD EKF Orange), even when I activate the Piezo device during flight!

1st Flt (Auto) ARM 7:36:57 – 7:39:05; no HUD Orange EKF (EKF running at or below .25); 2nd Flt (Circle Mode then Auto) ARM 7:39:42-7:40:26 Circle, no Orange EKF (EKF running at .15). Continuation of 2nd Flt (Auto after completing Circle, did not land, in air Auto) 7:40:31 – 7:42:17 no Orange EKF, EKF running around .1 to .15. .bin and Tlog: https://drive.google.com/drive/u/0/folders/1oJu4VgNgmyL_zD6jq1j20pBN_rVmGqK6

Another question, in the HUD, while in AUTO Mode, the HUD shows (lower right corner “Auto” ) the altitudes shown here are significantly different than the actual altitudes. Why is that?

Hi Greg, I meant to get back to you sooner
There is often some wobbling while descending through your own prop wash. The only things to do are descend slower or descend at an angle. The wobbles are worse when tuning is bad - one of the signs to look out for!

  1. don’t enable the onboard compass, it’s not needed when you have a working external compass and will only make things go bad again
  2. I was probably looking at the pitch and roll attitude - see how big movements are nice and smooth and follow Desired very well (P terms are correct) and yet there’s all these little wobbles when there should be almost no change (D terms too high) - this is my interpretation
  3. the interference wont really have gone away - Mag1 is calibrated better and we’re ignoring Mag2

Changing one thing at a time is a good habit to get into. You don’t need to change the D terms as I suggested since your quad is doing very well. It’d just be nice to see what effect it has on those tiny rogue movements.

Thanks Shawn,

Do you have any thoughts on why the ext. compass has suddenly gotten better i.e. no more HUD Orange EKF, compass well below 0.5 orange warning level? Only change were those few params you suggested and recal. of ext. compass.

Also, in the HUD, while in AUTO Mode, the HUD shows (lower right corner “Auto” ) the altitudes shown there are significantly different than the actual altitudes. Why is that?