
UAV DevBoard Pilots,
If you are using a version of MatrixNav or AileronAssist on a "redboard" that was released before August 5, 2009, there are a couple of revisions that you can make that will improve overall performance.
First, you should modify the definition of RADPERSEC in the file optionsRmat.h to:
#define RADPERSEC ((long long)5632.0/SCALEGYRO)
Just change the definition of RADPERSEC that is already there.
In the previous releases, SCALEGYRO was not included, so the scaling in the centrifugal acceleration compensation was correct for the green board only. Many thanks to Sid, who was never quite satisfied with the high acceleration behavior of the red board firmware, for motivating me to find out why. If you include SCALEGYRO in the definition of RADPERSEC, you will improve the performance of the red board firmware for high acceleration applications. Green board firmware will not be affected.
Also, you should modify the rmat.c file to use the following values of the drift correction PI gains:
#define KPROLLPITCH 256*10
#define KIROLLPITCH 256*2
#define KPYAW 256*4
#define KIYAW 32
Just edit the definitions that are already in rmat.c to use the above values.
Based on a lot of simulations done by Paul Bizard, and a lot of flight testing by Sid, we have concluded that these values will produce the best performance possible for the red board.
The gains in the first release of the firmware for the green board are very low. Although these values provide great accuracy for the green board, when I designed the red board, I was concerned about the security of locking, particularly with the 4X change in the gyro gains, so I decided to use much larger gains for the red board.
The gains in the released firmware for the red board are very high. Although this provides secure locking, it is not as accurate, leading to pitch and roll errors during rapid turns at high speed.
The latest values provide a much better compromise between accuracy and security.
The changes described in this post have been included in MatrixNav and AileronAssist release 1.5, August 5, 2009.
Thanks again to Paul Bizard and Sid for their hard work.
Best regards,
Bill
You need to be a member of DIY Drones to add comments!
Join DIY Drones