I "think" my tune is close

Anything not implemented or enabled won’t impact the arming check. If you leave it at 1 it only checks the things enabled on the list and this way you don’t miss anything if you add it later on.

1 Like

Guys, it’s been windy here this week and I couldn’t wait any longer. I ran out to the field and ran autotune on pitch and roll.

I then swapped packs and flew around in both Loiter and AltHold to generate some solid log data.

Desired appears to be slightly underperforming actual with respect to pitch/roll. I’ve seen this when tuning on windier days. May manually increase those by .02.

Please review and advise.

https://drive.google.com/drive/folders/1Ut8w-GUSIPOLLaMoQATe8VllbuzrOhHi?usp=share_link

I would say the MOT_THST_EXPO does seem quite good at 0.2 since stability during ascent and descent is good. It would be nice to try at least 0.4 if not up around 0.6 or 0.7. I wonder about the resulting Autotune with the different values, since the result now still has less-than-ideal attitude control.
As mentioned previously changing that also affects the hover value and more, so allow plenty of time in AltHold and Loiter.

This has gathered good data for the HNOTCH, adjust these:
INS_HNTCH_FREQ,48
INS_HNTCH_BW,24
INS_HNTCH_REF,0.20

I would still change to these
BATT_FS_CRT_ACT,1
BATT_FS_LOW_ACT,3
Seen various bad battery issues lately where people alter the calculated voltage levels, or compromise those failsafe actions.

Leaving the MOT_THST_EXPO how it is now, I would be interested to see what stability is like after the aforementioned HNOTCH changes and these:
ATC_RAT_RLL_P,0.1
ATC_RAT_RLL_I,0.1
ATC_RAT_RLL_D,0.0045
ATC_RAT_PIT_P,0.1
ATC_RAT_PIT_I,0.1
ATC_RAT_PIT_D,0.0045

1 Like

Reading this now. The expo was at .4 for this.

Townsend X4 Parameters-011323.param (17.5 KB)

Yes so it was
MOT_THST_EXPO 0.4
my mistake.
I was looking at your previous log too for comparison, so I must have read it from those params.
This actually makes more sense now:

Still proceed with the HNOTCH changes since that data became clearer. It’s optional to try those PID changes but I would.

Also, thanks for persisting with testing and providing logs. This helps us all.

Thanks Shawn. I’ve made the changes and will test again tomorrow.

I do not have a clear understanding of how D-term works for pitch and roll.

Can you explain why the switch from:

ATC_RAT_PIT_D,0.00204
ATC_RAT_RLL_D,0.0026

…to:

ATC_RAT_PIT_D,0.0045
ATC_RAT_RLL_D,0.0045

Thanks!

It flies so much better! Here’s a video:

https://vimeo.com/789276394/75256150f7

Log: 4-1/14/23 (General Fly Around) - Google Drive

Nice dashcam footage :laughing:
That looks good in logs too - even I wouldnt run Autotune on that!
It’s hard to get those big motors and props to behave any better than you have them now.

You mentioned something in Loiter, and I can see some slight position control oscillations or overshoots at times. Try these to see if it tames that effect, they’ve worked well in other cases:
PSC_POSXY_P,0.5
PSC_VELXY_D,0.25
PSC_VELXY_I,0.5
PSC_VELXY_P,1.0
These are half their default values, so it’s easy to put them back if you need to.
It means the copter wont be trying to hold position (or follow a wandering GPS position) as strictly. Some GPS tweaks could help this too.

Also you GPS blending gets a bit “fuzzy” in places, particularly at acute changes of direction or stationary. I think you could change from “blending” to “use primary unless…” .
GPS_AUTO_SWITCH,4
I wouldnt suggest “Use best” since it might switch from one to the other and back again too often during flight and cause large unexpected position changes.
Also set
GPS_GNSS_MODE,7
GPS_GNSS_MODE2,7
just to select only the best constellations for your region.
If you do have 3 GPS units, choose the best two (2 and 3?) and remove the remaining one. Only 2 are ever used even though 3 can be detected.

Your previous question about D terms…
Since Angle P terms largely affect big visible changes in attitude, I was thinking of changing the Rate PIDs to correct the small unwanted movements, and it seems to have worked. I asked for raised PIDs but bringing up D term slightly more compared to existing proportions, or ratio P:D
It’s typical for Rate P:D ratio to be somewhere between 16:1 to 20:1, sometimes as much as 40:1 for smaller quads - this just a finding not necessarily a rule.
If D term is too high, motors will get hot, and probably ESCs too but usually we cant tell. It can even cause failure. You can even hear this as a mechanical sounding noise.

1 Like

I did another flight this evening with your recommended PSC and GPS_Auto_Switch settings:

https://drive.google.com/drive/folders/1KIiJliCyhuj2jUdIa7YWpRTWUJBSJ-1E?usp=share_link

That looks good too. I think those PSC params settled down the position controller. What did you observe?

Take a look at the last two logs in MissionPlanner and select map - see the GPS tracks and EKF/calculated track (red)
In the latest log the EKF track and GPS1 track are superimposed, which is good. See the 2nd GPS track is often some distance away, and you could expect this much of a shift (a couple of meters or so) if anything happened to the primary GPS. This is normal, not necessarily bad.
In the earlier log the EKF track is divided between the two GPS tracks, blending, and sometimes this doesnt give an ideal result. There are times when the position is jumping around a bit trying to find the average between the two GPO positions. You would still get a noticeable shift if something happened to either of the GPS units.

Thanks Shawn! All of this has been done with a 4lb brick.

Am I ready for my payload based on what you’ve seen?

Yes I would say so.
That might be why Autotune produced a bit of a strange result - always autotune with no payload at all if possible.
You could probably test in some gusty wind to be sure.

1 Like

Guys, I was able to fly this machine with it’s intended payload today (Gremsy T3V3/Sony A7RIV). Everything seemed to perform well.

Can someone review to help me tighten things up if needed?:

Log: 7-012323 (A7RIV Test Flight) - Google Drive

There’s oscillations on both pitch and roll, but roll seems to be the worse of the two.


The Z vibrations are also higher than desired. Make sure all the props are tracking well, and that none of the arms are loose. Check that no wires are bouncing on the flight controller.