Page tree
Skip to end of metadata
Go to start of metadata

How to determine working controller constans

The first thing you need to understand to determine these constants is to learn which part of the controller will give what bahavior to the copter.
In the flight-control of this quadrocopter a pid-controller is used for each axis.
This controller is seperated in three parts:

  1. the p-part (proportional): the current error is multiplied with the p constant to calculate a direct force against that error. The p- part should always be the strongest component of such a controller. It reacts to the current error. A too low choosen p-constant will result in a too weak force against the error, so the copter wont be able to stabilize itself. A too strong choosen p-constant will result into overshooting, which leads into an oscillating copter. This oscillating will increase by time which results into a crash.
  2. the d-part (derivative): the difference between the current error is devided by the time between these errors to calculate a force against this change. This part of the controller reacts to a change of the position of the copter. It is needed to provide a stable position. A too high d-constant will result in overshooting which leads to a fast oscillating quadcopter with a small amplitude.
  3. the i-part (integrative): the last value of the i part is added to the calculated value of this tick. This leads to a correction of a constant error, e.g. a misplaced emphasis. A too weak i-constant will lead into a drifting copter if a constant error is given.

To calculate these constants we first followed a guide given by this article. The working of such a controller is also discribed there.
But with this process we were not able to calculate perfect values. We used it to calculated values to begin with. After that we implemented methods to change these values over the bluetooth communication in small steps. Than we did testflights with the current controller constants and changed them the way it was needed. E.g. if the copter started to oscillate we decreased the p-value.

This process leaded to values that worked for our project. But it is important to work with aa fully charged battery, because a nearly empty battery could also lead into an oscillating copter.