How to Write your own Flight Controller Software — Part 3

The PID Loop

Figure 1. Flight Controller Loop.

Some Theory

Figure 2. Typical PID Loop Response to a step change from the input (credit: AVR221)
Figure 3. Effect of Changing PID Loop Gains: Kp, Ki and Kd (ref: PID Tute).

PID Loop Implementation

Generating the Error Input

Figure 4. Throttle response curve.
Figure 5. Nexgen Configurator Radio Control Screen.
Figure 6. IMU Left Bank (i.e. roll).
- Left Bank (or Roll) +ve;- Right Bank -ve;- Pitch Up +ve; and- Pitch Down -ve.
e(t) = roll input° — roll position°

Reefwing Software · iOS & Android Development · Robotics · #followback #iOS #Android #developer #indiedev #robotics #startup #arduino #raspberrypi

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store