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

[Fixed-Wing] PIDFF Attenuation using the AirSpeed #7206

Closed
wants to merge 7 commits into from
Closed

[Fixed-Wing] PIDFF Attenuation using the AirSpeed #7206

wants to merge 7 commits into from

Conversation

JulioCesarMatias
Copy link
Collaborator

@JulioCesarMatias JulioCesarMatias commented Jun 28, 2021

If someone can test it, I appreciate it. The math seems correct to me. Use set tpa_airspeed_attenuation = 1500 in CLI to enable. The .HEX file for your FC can be downloaded here >> https://github.com/iNavFlight/inav/actions/runs/1641734916

Key parameters are:

tpa_airspeed_attenuation : Calculate PIDFF Attenuation based on AirSpeed (0 is disabled) ~ 1500 is a recommended value (Using the defaults values in "tpa_airspeed_min" and "tpa_airspeed_max" ). Range : 0 ~ 3000 cm/s.

tpa_airspeed_min : Should be set to 20% higher than level flight stall speed to calculate the PIDFF Attenuation based on AirSpeed. Range : 500 ~ 10000 cm/s.

tpa_airspeed_max : Maximum airspeed demanded to calculate the PIDFF Attenuation based on AirSpeed. Range : 500 ~ 10000 cm/s.

@JulioCesarMatias JulioCesarMatias changed the title PID Attenuation using the AirSpeed [Fixed-Wing] PID Attenuation using the AirSpeed Jun 28, 2021
@SkyglideFPV
Copy link

Awesome news! please keep going implementing Airspeed support!

@StuweFPV
Copy link

StuweFPV commented Sep 9, 2021

I'm really in need of PIFF working airspeed based and not throttle setting like anyone doing mountain dives with power off but wants stabilization in horizontal flight. please keep working on this! happy to test if you need one. thanks

@JulioCesarMatias
Copy link
Collaborator Author

I'm really in need of PIFF working airspeed based and not throttle setting like anyone doing mountain dives with power off but wants stabilization in horizontal flight. please keep working on this! happy to test if you need one. thanks

This algorithm does not control the aircraft acceleration, but the PIDFF attenuation. PIDFF will be slackened based on fuselage speed. The faster, the looser the PIDFF gains

@StuweFPV
Copy link

Thanks Julio,
I still think that your fix might solve my problem. I fly with a very high P and I for stiffness like an UMX plane. cruising with about 70kmh but when i dive down a mountain with 0 throttle then i reach 140kmh. Ideally the stabilization is the same. Today I have to tune the plane for 140kmh zero throttle just before oscillation starts. But when i then cruise with 70kmh i feel almost nothing of the stabilization effect. Played around with TPA settings but that does not works since before the breakpoint the stabb increases. Do you think your fix could be the solution i'm looking for? the faster the fuselage travels (gps speed) the lower the stabb effect? thanks!

@JulioCesarMatias
Copy link
Collaborator Author

Thanks Julio,
I still think that your fix might solve my problem. I fly with a very high P and I for stiffness like an UMX plane. cruising with about 70kmh but when i dive down a mountain with 0 throttle then i reach 140kmh. Ideally the stabilization is the same. Today I have to tune the plane for 140kmh zero throttle just before oscillation starts. But when i then cruise with 70kmh i feel almost nothing of the stabilization effect. Played around with TPA settings but that does not works since before the breakpoint the stabb increases. Do you think your fix could be the solution i'm looking for? the faster the fuselage travels (gps speed) the lower the stabb effect? thanks!

For high speeds, I don't know if it will work well. This algorithm is limited to speeds of 79.2km/h. I believe if I raise it maybe it won't look good

@StuweFPV
Copy link

Thanks for the clarification. In that case it will not work. why the limitation?

@JulioCesarMatias
Copy link
Collaborator Author

Thanks for the clarification. In that case it will not work. why the limitation?

If you're interested, you can test it at high speeds, I don't guarantee anything. By increasing the maximum supported speed, you will have to recalculate the PIDF Attenuation Scale.

@JulioCesarMatias JulioCesarMatias changed the title [Fixed-Wing] PID Attenuation using the AirSpeed [Fixed-Wing] PIDFF Attenuation using the AirSpeed Sep 11, 2021
@stale
Copy link

stale bot commented Apr 18, 2022

This issue / pull request has been automatically marked as stale because it has not had any activity in 60 days. The resources of the INAV team are limited, and so we are asking for your help.
This issue / pull request will be closed if no further activity occurs within two weeks.

@b14ckyy
Copy link
Collaborator

b14ckyy commented Oct 16, 2022

@JulioCesarMatias Shouldn't we reconsider this now? Even if your new AHRS does not make it into 6.0, we still have now a working wind speed estimator and a good virtual pitot tube. So shouldn't this now be applicable?

@trailx
Copy link
Contributor

trailx commented Sep 20, 2024

@JulioCesarMatias , I know this is a bit old at this point, but is there any reason to believe it wouldn't work now? Is there a way to rebuild a .HEX file for testing again? I'm willing to do testing on this.

@JulioCesarMatias
Copy link
Collaborator Author

@JulioCesarMatias , I know this is a bit old at this point, but is there any reason to believe it wouldn't work now? Is there a way to rebuild a .HEX file for testing again? I'm willing to do testing on this.

Hi, I believe some developer can help you with this feature. Unfortunately I won't be able to help you, I'm no longer part of the development team.

@JulioCesarMatias
Copy link
Collaborator Author

JulioCesarMatias commented Sep 22, 2024

@JulioCesarMatias , I know this is a bit old at this point, but is there any reason to believe it wouldn't work now? Is there a way to rebuild a .HEX file for testing again? I'm willing to do testing on this.

Or maybe you can consider going to BetaFlight. They are trying to do something similar there.

BetaFlight PR >> betaflight/betaflight#13895

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants