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

Rate PIDs coefficients usage #2

Open
frontw opened this issue Oct 2, 2019 · 3 comments
Open

Rate PIDs coefficients usage #2

frontw opened this issue Oct 2, 2019 · 3 comments

Comments

@frontw
Copy link

frontw commented Oct 2, 2019

Hi!

I get results like this:

=== ROLL RATE
Cost:  22.285038188900415
Old PID(s): 0.11999999731779099 0.20000000298023224 0.003000000026077032
New PID(s): 0.00889848621753699

So, old PID has 3 coefficients, but new - only one.
Is it correct and how to apply this coefficient with PX4?

Thanks!

@diegoeck
Copy link
Owner

diegoeck commented Oct 2, 2019

This package is still under development, and for now only compute PROPORTIONAL gains. You should use ZERO derivative and ZERO INTEGRAL.

But, it seems your new gain is too small. Can you share a log ( https://review.px4.io/ )?

@frontw
Copy link
Author

frontw commented Oct 2, 2019

Yes, new gain is too small. Maybe data has much noise (but it flies tolerably)?
We just mounted PX4 on S900 and made two flights today: first in stabilized mode and second in position mode.
For first I have following results:

px4att Work/VTOL/S900logs/02Oct/log_0_2019-10-2-11-42-18_stabilised.ulg 
File: Work/VTOL/S900logs/02Oct/log_0_2019-10-2-11-42-18_stabilised.ulg

Sampling rate: 31.56166861295781 Hz

=== ROLL RATE
Cost:  25.1524952020219
Old PID(s): 0.11999999731779099 0.20000000298023224 0.003000000026077032
New PID(s): 0.010652765572169548

=== PITCH RATE
Cost:  34.79163240605941
Old PID(s): 0.11999999731779099 0.20000000298023224 0.003000000026077032
New PID(s): 0.007889993771223552

=== YAW RATE
Cost:  35.93452327039349
Old PID(s): 0.20000000298023224 0.10000000149011612 0.0
New PID(s): 0.06627339695226858

=== ROLL ANGLE
Cost:  2.465679259157928
Old PID(s): 4.0
New PID(s): 3.0161612904110315

=== PITCH ANGLE
Cost:  2.51443634956714
Old PID(s): 4.0
New PID(s): 2.5849261009295996

=== YAW ANGLE
Cost:  11.268914540393455
Old PID(s): 2.799999952316284
New PID(s): 4.535013411335787

For second:

px4att Work/VTOL/S900logs/02Oct/log_1_2019-10-2-11-44-54_position.ulg 
File: Work/VTOL/S900logs/02Oct/log_1_2019-10-2-11-44-54_position.ulg

Sampling rate: 31.610892627277938 Hz

=== ROLL RATE
Cost:  22.126855748091796
Old PID(s): 0.11999999731779099 0.20000000298023224 0.003000000026077032
New PID(s): 0.008234334979971836

=== PITCH RATE
Cost:  27.939191611008884
Old PID(s): 0.11999999731779099 0.20000000298023224 0.003000000026077032
New PID(s): 0.006433036431422798

=== YAW RATE
Cost:  24.867542021050163
Old PID(s): 0.20000000298023224 0.10000000149011612 0.0
New PID(s): 0.018037304082946376

=== ROLL ANGLE
Cost:  1.8391661630549618
Old PID(s): 4.0
New PID(s): 3.3537069056828486

=== PITCH ANGLE
Cost:  1.5961956182369488
Old PID(s): 4.0
New PID(s): 3.1201487598298128

=== YAW ANGLE
Cost:  4.567689698160511
Old PID(s): 2.799999952316284
New PID(s): 4.562398833963127

@diegoeck
Copy link
Owner

diegoeck commented Oct 2, 2019

Yes, the problem is that VRFT doesn't work well with noisy data. With simulation data it is almost perfect...
For some drones we have reduced the passband of the filter, but sometimes the control performance deteriorates.

We are working on implementing other algorithms like CbT, and OCI in this package.
Probably in the next months we will get this working with noisy data, even for PID gains.

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

No branches or pull requests

2 participants