Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
stabilization_indi_simple.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) Ewoud Smeur <ewoud_smeur@msn.com>
3  * MAVLab Delft University of Technology
4  *
5  * This control algorithm is Incremental Nonlinear Dynamic Inversion (INDI)
6  *
7  * This is a simplified implementation of the (soon to be) publication in the
8  * journal of Control Guidance and Dynamics: Adaptive Incremental Nonlinear
9  * Dynamic Inversion for Attitude Control of Micro Aerial Vehicles
10  *
11  * This file is part of paparazzi.
12  *
13  * paparazzi is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 2, or (at your option)
16  * any later version.
17  *
18  * paparazzi is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with paparazzi; see the file COPYING. If not, write to
25  * the Free Software Foundation, 59 Temple Place - Suite 330,
26  * Boston, MA 02111-1307, USA.
27  */
28 
34 #ifndef STABILIZATION_INDI_SIMPLE_H
35 #define STABILIZATION_INDI_SIMPLE_H
36 
41 
42 struct Indi_gains {
43  struct FloatRates att;
44  struct FloatRates rate;
45 };
46 
50  float rate_d[3];
51  float rate_dd[3];
52  float u_d[3];
53  float u_dd[3];
54  struct FloatRates g1;
55  float g2;
56  float mu;
57 };
58 
59 struct IndiVariables {
60  float cutoff_r;
62  struct FloatRates du;
63  struct FloatRates u_in;
64  struct FloatRates u_act_dyn;
65  float rate_d[3];
66 
69  struct FloatRates g1;
70  float g2;
71  struct FloatRates act_dyn;
72 
73  struct Indi_gains gains;
74 
75  bool adaptive;
76  float max_rate;
78  struct IndiEstimation est;
79 };
80 
81 
82 extern struct IndiVariables indi;
83 extern void stabilization_indi_init(void);
84 extern void stabilization_indi_enter(void);
85 extern void stabilization_indi_rate_run(bool in_flight, struct StabilizationSetpoint *rate_sp, struct ThrustSetpoint *thrust, int32_t *cmd);
86 extern void stabilization_indi_attitude_run(bool in_flight, struct StabilizationSetpoint *att_sp, struct ThrustSetpoint *thrust, int32_t *cmd);
87 extern void stabilization_indi_simple_reset_r_filter_cutoff(float new_cutoff);
88 
89 #endif /* STABILIZATION_INDI_SIMPLE_H */
90 
angular rates
Simple first order low pass filter with bilinear transform.
Second order low pass filter structure.
General attitude stabilization interface for rotorcrafts.
General stabilization interface for rotorcrafts.
Rotorcraft attitude reference generation.
float max_rate
Maximum rate in rate control in rad/s.
struct Indi_gains gains
void stabilization_indi_enter(void)
Function that resets important values upon engaging INDI.
Butterworth2LowPass rate[3]
void stabilization_indi_rate_run(bool in_flight, struct StabilizationSetpoint *rate_sp, struct ThrustSetpoint *thrust, int32_t *cmd)
Does the INDI calculations.
struct FloatRates act_dyn
struct IndiEstimation est
Estimation parameters for adaptive INDI.
Butterworth2LowPass u[3]
void stabilization_indi_simple_reset_r_filter_cutoff(float new_cutoff)
struct FloatRates du
Butterworth2LowPass u[3]
struct FloatRates u_act_dyn
struct FloatRates u_in
struct FloatRates rate
struct FloatRates angular_accel_ref
struct FloatRates att
void stabilization_indi_init(void)
Function that initializes important values upon engaging INDI.
struct FloatRates g1
void stabilization_indi_attitude_run(bool in_flight, struct StabilizationSetpoint *att_sp, struct ThrustSetpoint *thrust, int32_t *cmd)
runs stabilization indi
bool adaptive
Enable adataptive estimation.
struct IndiVariables indi
struct FloatRates g1
float attitude_max_yaw_rate
Maximum yaw rate in atttiude control in rad/s.
Butterworth2LowPass rate[3]
Stabilization setpoint.
Definition: stabilization.h:53
Thrust setpoint // TODO to a setpoint header Structure to store the desired thrust vector with differ...
Definition: stabilization.h:82
int int32_t
Typedef defining 32 bit int type.
Definition: vl53l1_types.h:83