- 3.0.2 core module.
ct::core::Sensitivity< STATE_DIM, CONTROL_DIM, SCALAR > Class Template Referenceabstract

#include <Sensitivity.h>

Inheritance diagram for ct::core::Sensitivity< STATE_DIM, CONTROL_DIM, SCALAR >:
ct::core::DiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR > ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > ct::core::DiscreteSystem< STATE_DIM, CONTROL_DIM, SCALAR > ct::core::SensitivityApproximation< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR > ct::core::SensitivityIntegrator< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR >

Public Types

typedef std::shared_ptr< ControlVectorArray< CONTROL_DIM, SCALAR > > ControlVectorArrayPtr
 
- Public Types inherited from ct::core::DiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >
typedef Base::time_t time_t
 
typedef Base::state_vector_t state_vector_t
 
typedef Base::control_vector_t control_vector_t
 
typedef StateMatrix< STATE_DIM, SCALARstate_matrix_t
 state Jacobian type More...
 
typedef StateControlMatrix< STATE_DIM, CONTROL_DIM, SCALARstate_control_matrix_t
 input Jacobian type More...
 
- Public Types inherited from ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >
typedef DiscreteSystem< STATE_DIM, CONTROL_DIM, SCALARBase
 
typedef Base::state_vector_t state_vector_t
 
typedef Base::control_vector_t control_vector_t
 
typedef Base::time_t time_t
 
- Public Types inherited from ct::core::DiscreteSystem< STATE_DIM, CONTROL_DIM, SCALAR >
typedef int time_t
 the type of the time variable More...
 
typedef StateVector< STATE_DIM, SCALARstate_vector_t
 
typedef ControlVector< CONTROL_DIM, SCALARcontrol_vector_t
 

Public Member Functions

 Sensitivity ()
 
virtual ~Sensitivity ()
 
virtual Sensitivity< STATE_DIM, CONTROL_DIM, SCALAR > * clone () const override
 deep cloning More...
 
virtual void setLinearSystem (const std::shared_ptr< LinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >> &linearSystem)=0
 
virtual void setTimeDiscretization (const SCALAR &dt)=0
 update the time discretization More...
 
virtual void setApproximation (const SensitivityApproximationSettings::APPROXIMATION &approx)
 update the approximation type for the discrete-time system More...
 
void setSubstepTrajectoryReference (std::vector< StateVectorArrayPtr, Eigen::aligned_allocator< StateVectorArrayPtr >> *xSubstep, std::vector< ControlVectorArrayPtr, Eigen::aligned_allocator< ControlVectorArrayPtr >> *uSubstep)
 
virtual void getAandB (const StateVector< STATE_DIM, SCALAR > &x, const ControlVector< CONTROL_DIM, SCALAR > &u, const StateVector< STATE_DIM, SCALAR > &x_next, const int n, size_t numSteps, StateMatrix< STATE_DIM, SCALAR > &A, StateControlMatrix< STATE_DIM, CONTROL_DIM, SCALAR > &B) override=0
 
- Public Member Functions inherited from ct::core::DiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >
 DiscreteLinearSystem (const ct::core::SYSTEM_TYPE &type=ct::core::SYSTEM_TYPE::GENERAL)
 default constructor More...
 
virtual ~DiscreteLinearSystem ()
 destructor More...
 
virtual void propagateControlledDynamics (const state_vector_t &state, const time_t n, const control_vector_t &control, state_vector_t &stateNext) override
 compute the system dynamics More...
 
virtual void getAandB (const state_vector_t &x, const control_vector_t &u, const state_vector_t &x_next, const int n, size_t subSteps, state_matrix_t &A, state_control_matrix_t &B)=0
 retrieve discrete-time linear system matrices A and B. More...
 
void getAandB (const state_vector_t &x, const control_vector_t &u, const int n, state_matrix_t &A, state_control_matrix_t &B)
 
- Public Member Functions inherited from ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >
 DiscreteControlledSystem (const SYSTEM_TYPE &type=SYSTEM_TYPE::GENERAL)
 default constructor More...
 
 DiscreteControlledSystem (std::shared_ptr< DiscreteController< STATE_DIM, CONTROL_DIM, SCALAR >> controller, const SYSTEM_TYPE &type=SYSTEM_TYPE::GENERAL)
 constructor More...
 
 DiscreteControlledSystem (const ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > &arg)
 copy constructor More...
 
virtual ~DiscreteControlledSystem ()=default
 destructor More...
 
void setController (const std::shared_ptr< DiscreteController< STATE_DIM, CONTROL_DIM, SCALAR >> &controller)
 set a new controller More...
 
void getController (std::shared_ptr< DiscreteController< STATE_DIM, CONTROL_DIM, SCALAR >> &controller) const
 get the controller instance More...
 
std::shared_ptr< DiscreteController< STATE_DIM, CONTROL_DIM, SCALAR > > getController ()
 get the controller instace More...
 
virtual void propagateDynamics (const state_vector_t &state, const time_t n, state_vector_t &stateNext) override
 propagates the system dynamics forward by one step More...
 
- Public Member Functions inherited from ct::core::DiscreteSystem< STATE_DIM, CONTROL_DIM, SCALAR >
 DiscreteSystem (const SYSTEM_TYPE &type=GENERAL)
 constructor More...
 
virtual ~DiscreteSystem ()
 desctructor More...
 
virtual void propagateDynamics (const StateVector< STATE_DIM, SCALAR > &state, const time_t n, StateVector< STATE_DIM, SCALAR > &stateNext)=0
 propagates the system dynamics forward by one step More...
 
SYSTEM_TYPE getType () const
 get the type of system More...
 

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef std::shared_ptr< StateVectorArray< STATE_DIM, SCALAR > > StateVectorArrayPtr
 
- Public Attributes inherited from ct::core::DiscreteLinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALARBase
 
- Public Attributes inherited from ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef std::shared_ptr< DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR > > Ptr
 

Protected Attributes

std::vector< StateVectorArrayPtr, Eigen::aligned_allocator< StateVectorArrayPtr > > * xSubstep_
 
std::vector< ControlVectorArrayPtr, Eigen::aligned_allocator< ControlVectorArrayPtr > > * uSubstep_
 
- Protected Attributes inherited from ct::core::DiscreteControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >
std::shared_ptr< DiscreteController< STATE_DIM, CONTROL_DIM, SCALAR > > controller_
 the controller instance More...
 
- Protected Attributes inherited from ct::core::DiscreteSystem< STATE_DIM, CONTROL_DIM, SCALAR >
SYSTEM_TYPE type_
 type of system More...
 

Member Typedef Documentation

◆ ControlVectorArrayPtr

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
typedef std::shared_ptr<ControlVectorArray<CONTROL_DIM, SCALAR> > ct::core::Sensitivity< STATE_DIM, CONTROL_DIM, SCALAR >::ControlVectorArrayPtr

Constructor & Destructor Documentation

◆ Sensitivity()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
ct::core::Sensitivity< STATE_DIM, CONTROL_DIM, SCALAR >::Sensitivity ( )
inline

◆ ~Sensitivity()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
virtual ct::core::Sensitivity< STATE_DIM, CONTROL_DIM, SCALAR >::~Sensitivity ( )
inlinevirtual

Member Function Documentation

◆ clone()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
virtual Sensitivity<STATE_DIM, CONTROL_DIM, SCALAR>* ct::core::Sensitivity< STATE_DIM, CONTROL_DIM, SCALAR >::clone ( ) const
inlineoverridevirtual

◆ setLinearSystem()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
virtual void ct::core::Sensitivity< STATE_DIM, CONTROL_DIM, SCALAR >::setLinearSystem ( const std::shared_ptr< LinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >> &  linearSystem)
pure virtual

◆ setTimeDiscretization()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
virtual void ct::core::Sensitivity< STATE_DIM, CONTROL_DIM, SCALAR >::setTimeDiscretization ( const SCALAR dt)
pure virtual

◆ setApproximation()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
virtual void ct::core::Sensitivity< STATE_DIM, CONTROL_DIM, SCALAR >::setApproximation ( const SensitivityApproximationSettings::APPROXIMATION approx)
inlinevirtual

update the approximation type for the discrete-time system

Reimplemented in ct::core::SensitivityApproximation< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR >.

◆ setSubstepTrajectoryReference()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
void ct::core::Sensitivity< STATE_DIM, CONTROL_DIM, SCALAR >::setSubstepTrajectoryReference ( std::vector< StateVectorArrayPtr, Eigen::aligned_allocator< StateVectorArrayPtr >> *  xSubstep,
std::vector< ControlVectorArrayPtr, Eigen::aligned_allocator< ControlVectorArrayPtr >> *  uSubstep 
)
inline

Set the trajectory reference for linearization. This should also include potential substeps that the integrator produces.

Parameters
x
u

References n, u, and x.

◆ getAandB()

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
virtual void ct::core::Sensitivity< STATE_DIM, CONTROL_DIM, SCALAR >::getAandB ( const StateVector< STATE_DIM, SCALAR > &  x,
const ControlVector< CONTROL_DIM, SCALAR > &  u,
const StateVector< STATE_DIM, SCALAR > &  x_next,
const int  n,
size_t  numSteps,
StateMatrix< STATE_DIM, SCALAR > &  A,
StateControlMatrix< STATE_DIM, CONTROL_DIM, SCALAR > &  B 
)
overridepure virtual

retrieve discrete-time linear system matrices A and B.

Parameters
xthe state setpoint
uthe control setpoint
nthe time setpoint
numStepsnumber of timesteps of trajectory for which to get the sensitivity for
Athe resulting linear system matrix A
Bthe resulting linear system matrix B

Member Data Documentation

◆ StateVectorArrayPtr

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef std::shared_ptr<StateVectorArray<STATE_DIM, SCALAR> > ct::core::Sensitivity< STATE_DIM, CONTROL_DIM, SCALAR >::StateVectorArrayPtr

◆ xSubstep_

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
std::vector<StateVectorArrayPtr, Eigen::aligned_allocator<StateVectorArrayPtr> >* ct::core::Sensitivity< STATE_DIM, CONTROL_DIM, SCALAR >::xSubstep_
protected

◆ uSubstep_

template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
std::vector<ControlVectorArrayPtr, Eigen::aligned_allocator<ControlVectorArrayPtr> >* ct::core::Sensitivity< STATE_DIM, CONTROL_DIM, SCALAR >::uSubstep_
protected

The documentation for this class was generated from the following file: