Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
wls_alloc.h File Reference
#include "generated/airframe.h"
#include "modules/datalink/telemetry.h"
+ Include dependency graph for wls_alloc.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  WLS_t
 

Macros

#define WLS_N_U_MAX   6
 active set algorithm for control allocation More...
 
#define WLS_N_V_MAX   4
 

Functions

void send_wls_v (char *name, struct WLS_t *WLS_p, struct transport_tx *trans, struct link_device *dev)
 
void send_wls_u (char *name, struct WLS_t *WLS_p, struct transport_tx *trans, struct link_device *dev)
 
void wls_alloc (struct WLS_t *WLS_p, float **B, float *u_guess, float *W_init, int imax)
 active set algorithm for control allocation More...
 

Data Structure Documentation

◆ WLS_t

struct WLS_t

Definition at line 66 of file wls_alloc.h.

Data Fields
float gamma_sq
int iter
int nu
int nv
float PC
float SC
float u[WLS_N_U_MAX]
float u_max[WLS_N_U_MAX]
float u_min[WLS_N_U_MAX]
float u_pref[WLS_N_U_MAX]
float v[WLS_N_V_MAX]
float Wu[WLS_N_U_MAX]
float Wv[WLS_N_V_MAX]

Macro Definition Documentation

◆ WLS_N_U_MAX

#define WLS_N_U_MAX   6

active set algorithm for control allocation

Takes the control objective and max and min inputs from pprz and calculates the inputs that will satisfy most of the control objective, subject to the weighting matrices Wv and Wu

The dimension of the input vectors u and v are defined at compilation time and must be large enough for all the considered cases.

Parameters
uThe control output vector
vThe control objective vector
BThe control effectiveness matrix
n_uLength of u
n_vLenght of v
u_guessInitial value for u
W_initInitial working set, if known
WvWeighting on different control objectives
WuWeighting on different controls
upPreferred control vector
gamma_sqPreference of satisfying control objective over desired control vector (sqare root of gamma)
imaxMax number of iterations
n_uLength of u (the number of actuators)
n_vLenght of v (the number of control objectives)
Returns
Number of iterations: (imax+1) means it ran out of iterations

Definition at line 60 of file wls_alloc.h.

◆ WLS_N_V_MAX

#define WLS_N_V_MAX   4

Definition at line 64 of file wls_alloc.h.

Function Documentation

◆ send_wls_u()

void send_wls_u ( char *  name,
struct WLS_t WLS_p,
struct transport_tx *  trans,
struct link_device *  dev 
)

Definition at line 71 of file wls_alloc.c.

References dev, WLS_t::nu, WLS_t::u, WLS_t::u_max, WLS_t::u_min, WLS_t::u_pref, and WLS_t::Wu.

Referenced by send_wls_u_oneloop(), and send_wls_u_stab().

+ Here is the caller graph for this function:

◆ send_wls_v()

void send_wls_v ( char *  name,
struct WLS_t WLS_p,
struct transport_tx *  trans,
struct link_device *  dev 
)

Definition at line 61 of file wls_alloc.c.

References dev, WLS_t::gamma_sq, WLS_t::iter, WLS_t::nv, WLS_t::v, and WLS_t::Wv.

Referenced by send_wls_v_oneloop(), and send_wls_v_stab().

+ Here is the caller graph for this function:

◆ wls_alloc()

void wls_alloc ( struct WLS_t WLS_p,
float **  B,
float *  u_guess,
float *  W_init,
int  imax 
)

active set algorithm for control allocation

Takes the control objective and max and min inputs from pprz and calculates the inputs that will satisfy most of the control objective, subject to the weighting matrices Wv and Wu

Parameters
WLS_pStruct that contains most of the WLS parameters
BThe control effectiveness matrix
u_guessInitial value for u
W_initInitial working set, if known
imaxMax number of iterations

Definition at line 119 of file wls_alloc.c.

References A, alpha, B, b, WLS_t::gamma_sq, WLS_t::iter, lambda, WLS_t::nu, WLS_t::nv, p, qr_solve_wrapper(), WLS_t::u, WLS_t::u_max, WLS_t::u_min, WLS_t::u_pref, UNUSED, WLS_t::v, WLS_t::Wu, and WLS_t::Wv.

Referenced by oneloop_andi_run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: