Open frontw opened 5 years ago
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/ )?
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
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.
Hi!
I get results like this:
So, old PID has 3 coefficients, but new - only one. Is it correct and how to apply this coefficient with PX4?
Thanks!