This page presents the default control loops used by the Paparazzi airborne code for navigation, guidance and control.
- 1 General Information
- 2 Fixed-wing autopilot
- 3 Multi-rotor (Booz) autopilot
- 3.1 Global View
- 3.2 Vertical Control
- 3.3 Reference generators
- 3.4 Hover loop
- 3.5 Horizontal Control
- 3.6 Reference generators
- 3.7 Attitude loop
- 3.8 Rate loop
- 3.9 Horizontal hover loop
- 3.10 Horizontal navigation loop
All the possible combinations of control loops might not be fully detailed.
In the following diagrams, the block s is used for the derivative function and 1/s is used for the integrator function.
The variables' names are the one used in the airborne code (written in C). Most of this name can the used capitalized in the Airframe Configuration file in order to define the default value of these variables. If in capital letters in the diagrams, the value is fixed and cannot be changed using Settings mechanism.
The elements servos, rc_commands, commands and command_laws correspond to specific section of the Airframe Configuration file. Most of the code located in these blocks is generated from the xml of th configuration file.
The value +/-9600 correspond to +/-MAX_PPRZ. This pprz unit is used as a normalized internal unit for input and output values of the control_laws block.
The navigation loop is located in sw/airborne/nav.*. The navigation routines are called from the Flight Plans.
The course loop is the upper stage of the horizontal control. It is located in sw/airborne/firmwares/fixedwing/stabilization/stabilization_attitude.c (formerly fw_h_ctl.c).
The roll loop is the lower stage of the horizontal control and is used for lateral attitude stabilization. It is located in stabilization_attitude.c. If H_CTL_ROLL_ATTITUDE_GAIN is undefined, the code will fallback to a attitude-only loop, where estimator_p is disregarded and the gain for estimator_phi is H_CTL_ROLL_PGAIN.
The altitude loop is the upper stage of the vertical control. It is located in sw/airborne/firmwares/fixedwing/guidance/guidance_v.c (formerly fw_v_ctl.c)
Auto Throttle and Auto Pitch climb loops
Two climb loops are available. The are called from the flight plan by changing the vertical navigation mode. The default mode is Auto Throttle.
Auto throttle loop
Auto pitch loop
The climb loop is the intermediate stage of the vertical control. It is located in guidance_v.c.
The pitch loop is the lower stage of the vertical control and is used for longitudinal attitude stabilization. It is located in stabilization_attitude.c.
Control loops using Airspeed Sensor
Adding an airspeed sensor measures actual airspeed resulting in better throttle control and aircraft performance especially in windy conditions. The control loops using an airspeed sensor are described here.
Multi-rotor (Booz) autopilot
The code for this autopilot is located in sw/airborne/firmwares/rotorcraft.
Depending on the general mode selected, one of the following vertical modes is used.
from set point
from set point
The adjust accel is a simple algorithm to set acceleration to zero when velocity reaches boundaries.
Depending on the general mode selected, one of the following horizontal modes is used.
Horizontal hover loop + rotation to body + ref generator + attitude loop (coming soon...)
Horizontal navigation loop + rotation to body + ref generator + attitude loop (coming soon...)
from euler attitude angle set point
Acceleration is set to zero when rate reaches min or max value.
from angular rate set point
Horizontal hover loop