lds::SwitchedController

lds::SwitchedController #

SwitchedController Type. More…


#include <lds_sctrl.h>

Inherits from lds::Controller< System >

Inherited by lds::gaussian::SwitchedController, lds::poisson::SwitchedController

Public Functions #

Name
SwitchedController() =default
Constructs a new SwitchedController.
SwitchedController(const std::vector< System > & systems, data_t u_lb, data_t u_ub, size_t control_type =0)
Constructs a new SwitchedController.
SwitchedController(std::vector< System > && systems, data_t u_lb, data_t u_ub, size_t control_type =0)
Constructs a new SwitchedController (moves systems).
void Switch(size_t idx, bool do_force_switch =false)
Switch to a different sub-system/controller.
void set_Kc(const UniformMatrixList<> & Kc)
sets state feedback gains
void set_Kc(UniformMatrixList<> && Kc)
sets state feedback gains (moving)
void set_Kc_inty(const UniformMatrixList<> & Kc_inty)
sets integral feedback gains
void set_Kc_inty(UniformMatrixList<> && Kc_inty)
sets integral feedback gains (moving)
void set_Kc_u(const UniformMatrixList<> & Kc_u)
sets input feedback gains
void set_Kc_u(UniformMatrixList<> && Kc_u)
sets input feedback gains (moving)
void set_g_design(const UniformVectorList & g)
sets input gain used during controller design
void set_g_design(UniformVectorList && g)
sets input gain used during controller design (moving)

Protected Attributes #

Name
std::vector< System > systems_
underlying sub-systems which are switched between
size_t n_sys_
number of systems
size_t idx_
current system/controller index.
UniformMatrixList Kc_list_
UniformMatrixList Kc_inty_list_
UniformMatrixList Kc_u_list_
UniformVectorList g_design_list_

Additional inherited members #

Public Functions inherited from lds::Controller< System >

Name
Controller() =default
Constructs a new Controller.
Controller(const System & sys, data_t u_lb, data_t u_ub, size_t control_type =0)
Constructs a new Controller.
Controller(System && sys, data_t u_lb, data_t u_ub, size_t control_type =0)
Constructs a new Controller by moving the system object.
const Vector & Control(const Vector & z, bool do_control =true, bool do_lock_control =false, data_t sigma_soft_start =0, data_t sigma_u_noise =0, bool do_reset_at_control_onset =true)
updates control signal (single-step)
const Vector & ControlOutputReference(const Vector & z, bool do_control =true, bool do_estimation =true, bool do_lock_control =false, data_t sigma_soft_start =0, data_t sigma_u_noise =0, bool do_reset_at_control_onset =true)
updates control signal, given previously-set (single-step)
const System & sys() const
const Matrix & Kc() const
Get state feedback controller gain.
const Matrix & Kc_inty() const
Get integral controller gain.
const Matrix & Kc_u() const
Get input feedback controller gain.
const Vector & g_design() const
Get input gain used in controller design.
const Vector & u_ref() const
Get reference input.
const Vector & x_ref() const
Get reference state.
const Vector & y_ref() const
Get reference output.
size_t control_type() const
Get controller type.
data_t tau_awu() const
Get time constant of anti-integral-windup.
data_t u_lb() const
Get control lower bound.
data_t u_ub() const
Get control upper bound.
void set_sys(const System & sys)
Set system.
void set_u_ref(const Vector & u_ref)
Set reference input (u_ref)
void set_x_ref(const Vector & x_ref)
Set reference state (x_ref)
virtual void set_y_ref(const Vector & y_ref)
Set reference output (y_ref)
void set_tau_awu(data_t tau)
Set time constant of anti-integral-windup.
void set_control_type(size_t control_type)
Sets the control type.
void set_u_lb(data_t u_lb)
sets control lower bound
void set_u_ub(data_t u_ub)
Sets control upper bound.
void Reset()
reset system and control variables.
void Print()
prints variables to stdout

Protected Attributes inherited from lds::Controller< System >

Name
System sys_
underlying LDS
Vector u_
control signal
Vector u_return_
control signal that is returned to user
Vector g_design_
input gain of the system used for controller design
Vector u_ref_
reference input
Vector u_ref_prev_
reference input at previous time step
Vector x_ref_
reference state
Vector y_ref_
reference output
Vector cx_ref_
Matrix Kc_
state controller gain
Matrix Kc_u_
input controller gain (optional when control updates )
Matrix Kc_inty_
integral controller gain
Vector du_ref_
Vector dv_ref_
Vector v_ref_
Vector dv_
Vector v_
Control after g inversion (e.g., control in physical units)
Vector int_e_
integrated error
Vector int_e_awu_adjust_
anti-windup adjustment to intE
Vector u_sat_
control signal after saturation (for antiWindup)
bool do_control_prev_
bool do_lock_control_prev_
bool u_saturated_
whether control signal has reached saturation limits
data_t u_lb_
lower bound on control
data_t u_ub_
upper bound on control
data_t tau_awu_
antiwindup time constant
data_t k_awu_
data_t t_since_control_onset_
time since control epoch onset
size_t control_type_
controller type

Detailed Description #

template <typename System >
class lds::SwitchedController;


Public Function Details #

SwitchedController #

SwitchedController() =default

SwitchedController #

inline SwitchedController(
    const std::vector< System > & systems,
    data_t u_lb,
    data_t u_ub,
    size_t control_type =0
)

Parameters:

  • systems vector of sub-systems
  • u_lb lower bound on control (u)
  • u_ub upper bound on control (u)
  • control_type [optional] control type bit mask

SwitchedController #

inline SwitchedController(
    std::vector< System > && systems,
    data_t u_lb,
    data_t u_ub,
    size_t control_type =0
)

Parameters:

  • systems vector of sub-systems
  • u_lb lower bound on control (u)
  • u_ub upper bound on control (u)
  • control_type [optional] control type bit mask

Switch #

inline void Switch(
    size_t idx,
    bool do_force_switch =false
)

Parameters:

  • idx index
  • do_force_switch whether to force a system switch even if already there.

set_Kc #

inline void set_Kc(
    const UniformMatrixList<> & Kc
)

set_Kc #

inline void set_Kc(
    UniformMatrixList<> && Kc
)

set_Kc_inty #

inline void set_Kc_inty(
    const UniformMatrixList<> & Kc_inty
)

set_Kc_inty #

inline void set_Kc_inty(
    UniformMatrixList<> && Kc_inty
)

set_Kc_u #

inline void set_Kc_u(
    const UniformMatrixList<> & Kc_u
)

set_Kc_u #

inline void set_Kc_u(
    UniformMatrixList<> && Kc_u
)

set_g_design #

inline void set_g_design(
    const UniformVectorList & g
)

set_g_design #

inline void set_g_design(
    UniformVectorList && g
)

Protected Attribute Details #

**systems_** #

std::vector< System > systems_;

**n_sys_** #

size_t n_sys_ {};

**idx_** #

size_t idx_ {};

**Kc_list_** #

UniformMatrixList Kc_list_;

**Kc_inty_list_** #

UniformMatrixList Kc_inty_list_;

**Kc_u_list_** #

UniformMatrixList Kc_u_list_;

**g_design_list_** #

UniformVectorList g_design_list_;


Updated on 19 May 2022 at 17:16:03 Eastern Daylight Time