Difference between revisions of "Subsystem/stabilization"

From PaparazziUAV
Jump to: navigation, search
(Stabilization subsystem)
Line 8: Line 8:
* ''[[Subsystem/stabilization#Euler|int_euler]]''
* ''[[Subsystem/stabilization#Euler|int_euler]]''
* ''[[Subsystem/stabilization#Euler|float_euler]]''
* ''[[Subsystem/stabilization#Euler|float_euler]]''
* ''[[Subsystem/stabilization#INDI|indi]]''
== Attitude Control Implementations ==
== Attitude Control Implementations ==

Revision as of 05:04, 17 June 2015

Stabilization subsystem

The stabilization subsystem provides the attitude controller for rotorcrafts.

Currently possible attitude stabilization subsystem types are

Attitude Control Implementations

There are several different attitude control algorithm implementations.

They use the same STABILIZATION_ATTITUDE xml configuration section:

File: conf/airframes/myplane.xml
    <!-- setpoints -->
    <define name="SP_MAX_PHI"     value="45." unit="deg"/>
    <define name="SP_MAX_THETA"   value="45." unit="deg"/>
    <define name="SP_MAX_R"       value="90." unit="deg/s"/>
    <define name="DEADBAND_A"     value="0"/>
    <define name="DEADBAND_E"     value="0"/>
    <define name="DEADBAND_R"     value="250"/>

    <!-- reference -->
    <define name="REF_OMEGA_P"  value="800" unit="deg/s"/>
    <define name="REF_ZETA_P"   value="0.85"/>
    <define name="REF_MAX_P"    value="400." unit="deg/s"/>
    <define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/>

    <define name="REF_OMEGA_Q"  value="800" unit="deg/s"/>
    <define name="REF_ZETA_Q"   value="0.85"/>
    <define name="REF_MAX_Q"    value="400." unit="deg/s"/>
    <define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/>

    <define name="REF_OMEGA_R"  value="500" unit="deg/s"/>
    <define name="REF_ZETA_R"   value="0.85"/>
    <define name="REF_MAX_R"    value="180." unit="deg/s"/>
    <define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/>

    <!-- feedback -->
    <define name="PHI_PGAIN"  value="1000"/>
    <define name="PHI_DGAIN"  value="400"/>
    <define name="PHI_IGAIN"  value="200"/>

    <define name="THETA_PGAIN"  value="1000"/>
    <define name="THETA_DGAIN"  value="400"/>
    <define name="THETA_IGAIN"  value="200"/>

    <define name="PSI_PGAIN"  value="500"/>
    <define name="PSI_DGAIN"  value="300"/>
    <define name="PSI_IGAIN"  value="10"/>

    <!-- feedforward -->
    <define name="PHI_DDGAIN"   value="300"/>
    <define name="THETA_DDGAIN" value="300"/>
    <define name="PSI_DDGAIN"   value="300"/>

maximum PHI/THETA (roll/pitch) angles and maximum angular velocity R around yaw axis
RC stick deadband around the center for A,E,R (roll,pitch,yaw)
parameters for the reference generator
second order model natural frequency for respective axis
second order model damping factor for respective axis
bound on ref model angular speed
bound on ref model angular acceleration
gains for the feedback control of the respective axis
feedforward gains for the respective axis


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"/>
File: conf/airframes/myplane.xml
  <firmware name="rotorcraft">
    <subsystem name="stabilization" type="int_quat"/>

You also need the STABILIZATION_ATTITUDE xml configuration section as described above.


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.

File: conf/airframes/myplane.xml
  <firmware name="rotorcraft">
    <subsystem name="stabilization" type="int_euler"/>

You also need the STABILIZATION_ATTITUDE xml configuration section as described above.

Rate Control

There is only one rate control implementation (which is included in the rotorcraft firmware by default). It allows you to fly a rotorcraft like a helicopter by controlling the angular rate directly instead of having (self-leveling) attitude control. See Control_Loops#Rate_loop for diagrams of the control loop.

File: conf/airframes/myplane.xml
  <firmware name="rotorcraft">

    <!-- setpoints -->
    <define name="SP_MAX_P" value="10000"/>
    <define name="SP_MAX_Q" value="10000"/>
    <define name="SP_MAX_R" value="10000"/>
    <define name="DEADBAND_P" value="20"/>
    <define name="DEADBAND_Q" value="20"/>
    <define name="DEADBAND_R" value="200"/>
    <define name="REF_TAU" value="4"/>

    <!-- feedback -->
    <define name="GAIN_P" value="400"/>
    <define name="GAIN_Q" value="400"/>
    <define name="GAIN_R" value="350"/>

    <define name="IGAIN_P" value="75"/>
    <define name="IGAIN_Q" value="75"/>
    <define name="IGAIN_R" value="50"/>

    <!-- feedforward -->
    <define name="DDGAIN_P" value="300"/>
    <define name="DDGAIN_Q" value="300"/>
    <define name="DDGAIN_R" value="300"/>