Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: removed references to 16.09RC and cloning

...

Warning
titleNo AutoTune for STM32F1 based hardware

AutoTune is currently not built into CC3D/Atom firmware, due to small CPU and lack of memory.


Both next and LibrePilot version 16.09 (RC's) have and later has AutoTune.  Here is the simplest version of how to use AutoTune for those that don't want details.  If you don't read the details (problems to avoid and useful features you didn't know existed) and ask questions that are answered farther down in the details, be prepared for a bit of derision.  (smile)

...

For the slightly less impatient, skip down to the section titled "Cloning Instructions " or "Flight Mode Switch setup".

Background and Details"
LibrePilot has ported Tau Labs / dRonin "Autotune" into 'next' and the coming 16.09 release (including RC#'s).

...

AutoTune is not currently supported on CC3D, although it is hoped that a CC3D firmware can be made that removes other features to add AutoTune.  This would be flashed temporarily just to run AutoTune and then normal firmware would be reflashed.  Also, there will be a GCS GUI for all this at some time, but it was designed to make it possible to set it up at home and run it at the flying field without requiring use of the GCS at the flying field.

AutoTune is merged into both 'next' and 'rel-16.09' branches and is available in 16.09 RC#'s.

Before you uninstall or overwrite your old software / firmware you should run the old GCS, plug the FC (flight controller) into USB, and do a "File → Export UAV Settings" to save your old settings in case you want to know how it was set up.  You should also do screen captures (print screen) on all the setup pages you have used (and thus have non-default values).  These could be valuable later on.

Cloning Instructions (tested on Linux):
Cloning and building is no longer required.  Release 16.09 and later have AutoTune built in.
It is assumed that you have a working development environment:
git  clone  https://bitbucket.org/librepilot/librepilot.git
cd  librepilot
git  checkout  rel-16.09
make  build_sdk_install   (I avoid this by sym linking my global downloads and tools directories into this directory, so whatever you need to do for downloads and tools)
nice  -n15  make  -j4  gcs  revolution  revonano    sparky2   (the 4 is however many real CPU cores you have to keep all of them busy, it still works even if it is wrong)  (gcs might take 30 minutes to build)  (or remove 'nice -n15' which says to run it at low priority in case you want to do something else with the computer while it is making the software)
./build/librepilot-gcs_release/bin/librepilot-gcs   (runs the GCS that you just built) (in Linux that is ./b <tab> l (lower case L) <tab> b <tab> <tab>)

The instructions above are written with several spaces between each word for clarity.  They work just as well with only one space.

Updating an old clone:
Cloning and building is no longer required.  Release 16.09 and later have AutoTune built in.
The old branch has been rebased onto next (and rel-16.09) and uploaded with push -f.  That means you will have problems if you originally started from the version before the rebase.  AutoTune has been merged into rel-16.09, so the best way now is to delete the old directory and clone rel-16.09.
With GCS running and firmware built, go to the Firmware page, press Halt.  Wait about 15 seconds for the Flash button to appear.  Also, it should automatically select firmware that matches your flight controller.  Press Flash.  You will also have to erase settings and run the setup wizard again.  With that complete, you need to do your calibrations before anything else.firmware would be reflashed.  Also, there will be a GCS GUI for all this at some time, but it was designed to make it possible to set it up at home and run it at the flying field without requiring use of the GCS at the flying field.

Flight Mode Switch setup:
Note that when AutoTune is complete, it writes the calculated PIDs into the destination stabilization (PID) bank which by default is configured to be bank 3.  The standard AutoTune procedure has you flying the AutoTune mode on bank 1 and writing the new PIDs to bank 3 (default destination PID bank was changed from 2 to 3).

...

DataObjects.SystemIdentState
- Is not stored permanently (Goes away when power is removed)
- Is logged
- HoverThrottle is the average throttle used during tuning.  It is a reasonable value to use in Settings.AltitudeHoldSettings.ThrustLimits.Neutral although it is usually a little smaller than it should be due to throttle bloom during shaking.
- The 3 values in Noise tell you how much vibration you have on the 3 axes.  Normal values range from about 100 to about 1000.  For high values, or jittery response to the PIDs created, balance your props and if that doesn't help, you may want to increase Settings.StabilizationSettings.GyroTau (found in the GCS GUI at Configuration -> Stabilization -> Expert -> GyroNoiseFiltering) and retune (you must actually fly the tuning flight again).  Now you know how much vibration you actually have.
- Contains fields that may be useful if debugging problems with AutoTune
- Contains copies (for logging purposes) of some fields from System.SystemIdentSettings

GyroReadTimeAverage