Subsystem/stabilization

Subsystems
== Stabilization subsystem ==
The stabilization subsystem provides the attitude controller for rotorcrafts.
Currently possible attitude stabilization subsystem types are
* int_quat
* float_quat
* int_euler
* float_euler
* indi
== Attitude Control Implementations ==
There are several different attitude control algorithm implementations.
They use the same STABILIZATION_ATTITUDE xml configuration section:
; SP_MAX_*: maximum PHI/THETA (roll/pitch) angles and maximum angular velocity R around yaw axis
; DEADBAND_*: RC stick deadband around the center for A,E,R (roll,pitch,yaw)
; REF_*: parameters for the reference generator
; REF_OMEGA_* : second order model natural frequency for respective axis
; REF_ZETA_* : second order model damping factor for respective axis
; REF_MAX_x : bound on ref model angular speed
; REF_MAX_xDOT : bound on ref model angular acceleration
; [PHI|THETA|PSI]_[PID]GAIN: gains for the feedback control of the respective axis
; [PHI|THETA|PSI]_DDGAIN: feedforward gains for the respective axis
=== Quaternion ===
Attitude controllers using quaternions (no gimbal lock).
There is a fixed point implementation (recommended) and a floating point implementation for reference and testing.
* fixed point: <subsystem name="stabilization" type="int_quat"/>
* floating point: <subsystem name="stabilization" type="float_quat"/>
You also need the STABILIZATION_ATTITUDE xml configuration section as described above.
=== Euler ===
Attitude controller using Euler Angles. Due to the inherent singularities (e.g. 90deg pitch) of the euler angles representation you can't use this controller if you want to fly in regimes close or at these singularities (e.g. acrobatics or transitioning vehicles).
See Control_Loops#Attitude_loop for diagrams of the control loop.
You also need the STABILIZATION_ATTITUDE xml configuration section as described above.
=== INDI ===
Attitude controller based on an Incremental Nonlinear Dynamic Inversion inner loop. It controls the angular acceleration in an incremental way. Detailed information can be found in the paper 'Adaptive Incremental Nonlinear Dynamic Inversion for Micro Aerial Vehicles' (http://arc.aiaa.org/doi/abs/10.2514/1.G001490).
The idea is that any moment on the drone, results in an angular acceleration. With the onboard gyroscope, we measure the angular rate. This means that if we take the derivative of the angular rate, we have a measure of all moments on the drone through the angular acceleration. This includes the moment caused by the inputs. We know what the angular acceleration is with the inputs that we are giving, so to change the angular acceleration to a desired value, we just need to increment these inputs. How much we should increment the inputs to get a certain increment in angular acceleration is determined by the control effectiveness.
The benefit of using INDI over PID is that the disturbance rejection is a lot faster. This means that an external moment on the drone due to wind or something else is counteracted as fast as the drone can measure it and the actuators can move. Compare this to the integrator gain of a PID controller, that only slowly removes steady state offsets.
More practical information can be found on working with INDI
== Rate Control ==
You can also control the rotation rates of the vehicle with the RC, instead of using full (self-leveling) attitude control.
For the control method, it is possible to choose a PI controller, by specifying type="rate", or INDI control, by specifying type="rate_indi", like in the example below.
See Control_Loops#Rate_loop for diagrams of the control loop.
Category:User_Documentation Category:Subsystems