Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_Scripting: raise max FLTE for yaw to 8 #24933

Merged
merged 1 commit into from
Apr 1, 2024

Conversation

tridge
Copy link
Contributor

@tridge tridge commented Sep 10, 2023

better yaw for many vehicles

@timtuxworth
Copy link
Contributor

timtuxworth commented Sep 10, 2023

better yaw for many vehicles

Perhaps you could also update the .md file. it currently says "the YAW_FLTE filter will be set to a maximum of 2Hz". It seems like it might be actually tuning YAW_FLTE rather than simply setting the value, which is what it seems to say right now.

Copy link
Collaborator

@Hwurzburg Hwurzburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this actually works.....it will always be left at the default of 2.5 ....before it was always set to 2.0 (old FLTE_MAX) because the default exceeded it....now it does nothing

@tridge
Copy link
Contributor Author

tridge commented Sep 10, 2023

I don't think this actually works.....it will always be left at the default of 2.5

this patch is just to stop quicktune from overriding and reducing FLTE so low. It allows the user to set a FLTE before tuning
Separately we could change the default away from 2.5

better yaw for many vehicles
@tridge
Copy link
Contributor Author

tridge commented Sep 10, 2023

Perhaps you could also update the .md file.

thanks! fixed

@Hwurzburg
Copy link
Collaborator

QuikTune does no tuning on Yaw FLTE at this point....it just resets it to FLTE_MAX if the tune starts with it either <=0 or greater than FLTE_MAX....I don't think you want to prevent someone from setting it > FLTE_MAX in some cases.....

having QuikTune either leave it alone totally or set it like you proposed at one time to GYRO_FLT/8 might be better?

@timtuxworth
Copy link
Contributor

I was wondering if QuickTune should not tune yaw on a tilt rotor? From what I think I understand from what others have said (and have seen from my own tuning), it doesn't seem to work on a tilt rotor. Not sure about other frame types.

- if no SMAX is set for a rate controller than the SMAX will be set to 50Hz
- the YAW_FLTE filter will be set to a maximum of 8Hz

Additionally, if no SMAX is set for a rate controller than the SMAX will be set to 50Hz.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then

@Hwurzburg
Copy link
Collaborator

I was wondering if QuickTune should not tune yaw on a tilt rotor? From what I think I understand from what others have said (and have seen from my own tuning), it doesn't seem to work on a tilt rotor. Not sure about other frame types.

Andy Piper and I have had it tune yaw fine in two different vectored yaw QPlanes....just the FLTE was too low after....for me setting it to 10Hz fixed the issue after QuickTune

@andyp1per
Copy link
Collaborator

Andy Piper and I have had it tune yaw fine in two different vectored yaw QPlanes....just the FLTE was too low after....for me setting it to 10Hz fixed the issue after QuickTune

I actually can no longer repeat this using such a high value, I had to use 2.5Hz. @lthall explained the basic problem to me - with vectored yaw and tri-tilts in particular there is a momentum effect from the movement of the motors backwards and forwards and the momentum effect is a physical D term working in the wrong direction. This makes it very hard to tune good values of D - at least for QAutotune - it's possible that QuickTune is doing better here since it is just looking for oscillation, but its also a very complex mechanical system so hard to see what the right approach might be. Using a low FLTE linearizes the effect, but then has other issues.

@timtuxworth
Copy link
Contributor

timtuxworth commented Feb 12, 2024

As discussed in the dev call 2024-02-12, I flew this yesterday with Q_A_RAT_Y_FLTE = 10 and Q_A_ACCEL_Y_MAX = 4000 (reduced from 6000) and still getting a slow Yaw oscillation, although much improved from what I had been seeing.
This is a 2 meter tilt-rotor quadplane with 15 inch props.
Here are 3 logs:
https://www.dropbox.com/scl/fi/vc09k3hfx9n50hvejw2bx/log_85_2024-2-11-16-19-54.bin?rlkey=1vuky6rqprkrd2fghbcr0qshk&dl=0
https://www.dropbox.com/scl/fi/ewmefj662q5cgn789b50n/log_86_2024-2-11-16-40-08.bin?rlkey=3pl16nr8emvyc1d2dfwlgf4ew&dl=0
https://www.dropbox.com/scl/fi/i5uwv7mms8r273v2zeu0k/log_87_2024-2-11-16-58-18.bin?rlkey=eo82mrzopugk3szsefnefsfbj&dl=0

Also want to re-up this video which shows how this seems to be happening, although this was with a lower value for FLTE. You can actually watch the front motors tilting backwards and forwards as they try to stabilize the aircraft. https://youtu.be/pezygLLC45Q

@tridge tridge dismissed Hwurzburg’s stale review April 1, 2024 23:28

discussed on dev call

@tridge tridge merged commit 1794c12 into ArduPilot:master Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants