Measure, then correct
We want the drone to stay at a height of two meters. A sensor measures the current height, and we calculate the error: the target minus the reading. If the error is positive, the drone is too low and we speed up the propellers; if it is negative, we slow them down. This repeating loop is called feedback.
The letter P: proportional
The simplest idea: make the correction proportional to the error. A big error means a big correction. But if we overdo this factor, the drone overshoots the target, then comes back and overshoots from the other side, and starts to oscillate.
The letter I: integral
Sometimes a small error stays and does not go away, for example because of the weight of an extra load. The integral part adds up the error over time, so if the drone stays a little too low for a long time, the correction gradually grows until the difference disappears. Too much of it causes a slow overshoot of the target.
The letter D: derivative
The derivative part looks at how fast the error is changing. If the drone is approaching the target quickly, it eases off the correction early, like a driver lifting their foot before a traffic light. This reduces oscillation, but it is sensitive to noise in the sensor readings.
Tuning is both an art and a science
Choosing the three factors is called "tuning" the controller. We usually start with the proportional part alone, then add the derivative to calm the oscillation, then a little integral to remove the remaining error. These tests are carried out on real aircraft in a safe, enclosed space, with barriers and protected propellers.
An educational article written by the Madar team to simplify a scientific idea. Madar is a center in its founding stage, and what appears here about its programs consists of proposed plans.