OCS2 Manual  v1.0.0
OCS2 Documentation
ocs2::DerivativesBase< STATE_DIM, INPUT_DIM > Class Template Referenceabstract

#include <DerivativesBase.h>

Detailed Description

template<size_t STATE_DIM, size_t INPUT_DIM>
class ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >

Base class for the linearized system dynamics.
The linearized system flow map is defined as:
$ dx/dt = A(t) \delta x + B(t) \delta u $
The linearized system jump map is defined as:
$ x^+ = G \delta x + H \delta u $

Template Parameters
STATE_DIMDimension of the state space.
INPUT_DIMDimension of the control input space.
Inheritance diagram for ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >:
ocs2::SystemDynamicsBase< STATE_DIM, INPUT_DIM, NUM_MODES > ocs2::SystemDynamicsLinearizer< STATE_DIM, INPUT_DIM > ocs2::SystemDynamicsBase< STATE_DIM, INPUT_DIM > ocs2::SystemDynamicsBase< STATE_DIM, INPUT_DIM, 1 > ocs2::SystemDynamicsBaseAD< STATE_DIM, INPUT_DIM, NUM_MODES > ocs2::SystemDynamicsBaseAD< cartpole::STATE_DIM_, cartpole::INPUT_DIM_, 1 > ocs2::LinearSystemDynamics< STATE_DIM, INPUT_DIM > ocs2::SystemDynamicsBaseAD< ballbot::STATE_DIM_, ballbot::INPUT_DIM_ > ocs2::cartpole::CartPoleSytemDynamics ocs2::ballbot::BallbotSystemDynamics

Public Types

using Ptr = std::shared_ptr< DerivativesBase< STATE_DIM, INPUT_DIM > >
 
using ConstPtr = std::shared_ptr< const DerivativesBase< STATE_DIM, INPUT_DIM > >
 
using DIMENSIONS = Dimensions< STATE_DIM, INPUT_DIM >
 
using scalar_t = typename DIMENSIONS::scalar_t
 
using state_vector_t = typename DIMENSIONS::state_vector_t
 
using input_vector_t = typename DIMENSIONS::input_vector_t
 
using state_matrix_t = typename DIMENSIONS::state_matrix_t
 
using state_input_matrix_t = typename DIMENSIONS::state_input_matrix_t
 
using constraint1_state_matrix_t = typename DIMENSIONS::constraint1_state_matrix_t
 
using constraint1_input_matrix_t = typename DIMENSIONS::constraint1_input_matrix_t
 
using constraint2_state_matrix_t = typename DIMENSIONS::constraint2_state_matrix_t
 
using dynamic_vector_t = typename DIMENSIONS::dynamic_vector_t
 
using dynamic_state_matrix_t = typename DIMENSIONS::dynamic_state_matrix_t
 
using dynamic_input_matrix_t = typename DIMENSIONS::dynamic_input_matrix_t
 

Public Member Functions

 DerivativesBase ()=default
 
virtual ~DerivativesBase ()=default
 
virtual void setCurrentStateAndControl (const scalar_t &t, const state_vector_t &x, const input_vector_t &u)
 
virtual void getFlowMapDerivativeTime (state_vector_t &df)
 
virtual void getFlowMapDerivativeState (state_matrix_t &A)=0
 
virtual void getFlowMapDerivativeInput (state_input_matrix_t &B)=0
 
virtual void getJumpMapDerivativeTime (state_vector_t &dg)
 
virtual void getJumpMapDerivativeState (state_matrix_t &G)
 
virtual void getJumpMapDerivativeInput (state_input_matrix_t &H)
 
virtual void getGuardSurfacesDerivativeTime (dynamic_vector_t &D_t_gamma)
 
virtual void getGuardSurfacesDerivativeState (dynamic_state_matrix_t &D_x_gamma)
 
virtual void getGuardSurfacesDerivativeInput (dynamic_input_matrix_t &D_u_gamma)
 
virtual DerivativesBase< STATE_DIM, INPUT_DIM > * clone () const =0
 

Protected Attributes

scalar_t t_
 
state_vector_t x_
 
input_vector_t u_
 

Member Typedef Documentation

◆ ConstPtr

template<size_t STATE_DIM, size_t INPUT_DIM>
using ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::ConstPtr = std::shared_ptr<const DerivativesBase<STATE_DIM, INPUT_DIM> >

◆ constraint1_input_matrix_t

template<size_t STATE_DIM, size_t INPUT_DIM>
using ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::constraint1_input_matrix_t = typename DIMENSIONS::constraint1_input_matrix_t

◆ constraint1_state_matrix_t

template<size_t STATE_DIM, size_t INPUT_DIM>
using ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::constraint1_state_matrix_t = typename DIMENSIONS::constraint1_state_matrix_t

◆ constraint2_state_matrix_t

template<size_t STATE_DIM, size_t INPUT_DIM>
using ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::constraint2_state_matrix_t = typename DIMENSIONS::constraint2_state_matrix_t

◆ DIMENSIONS

template<size_t STATE_DIM, size_t INPUT_DIM>
using ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::DIMENSIONS = Dimensions<STATE_DIM, INPUT_DIM>

◆ dynamic_input_matrix_t

template<size_t STATE_DIM, size_t INPUT_DIM>
using ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::dynamic_input_matrix_t = typename DIMENSIONS::dynamic_input_matrix_t

◆ dynamic_state_matrix_t

template<size_t STATE_DIM, size_t INPUT_DIM>
using ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::dynamic_state_matrix_t = typename DIMENSIONS::dynamic_state_matrix_t

◆ dynamic_vector_t

template<size_t STATE_DIM, size_t INPUT_DIM>
using ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::dynamic_vector_t = typename DIMENSIONS::dynamic_vector_t

◆ input_vector_t

template<size_t STATE_DIM, size_t INPUT_DIM>
using ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::input_vector_t = typename DIMENSIONS::input_vector_t

◆ Ptr

template<size_t STATE_DIM, size_t INPUT_DIM>
using ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::Ptr = std::shared_ptr<DerivativesBase<STATE_DIM, INPUT_DIM> >

◆ scalar_t

template<size_t STATE_DIM, size_t INPUT_DIM>
using ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::scalar_t = typename DIMENSIONS::scalar_t

◆ state_input_matrix_t

template<size_t STATE_DIM, size_t INPUT_DIM>
using ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::state_input_matrix_t = typename DIMENSIONS::state_input_matrix_t

◆ state_matrix_t

template<size_t STATE_DIM, size_t INPUT_DIM>
using ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::state_matrix_t = typename DIMENSIONS::state_matrix_t

◆ state_vector_t

template<size_t STATE_DIM, size_t INPUT_DIM>
using ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::state_vector_t = typename DIMENSIONS::state_vector_t

Constructor & Destructor Documentation

◆ DerivativesBase()

template<size_t STATE_DIM, size_t INPUT_DIM>
ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::DerivativesBase ( )
default

Default constructor

◆ ~DerivativesBase()

template<size_t STATE_DIM, size_t INPUT_DIM>
virtual ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::~DerivativesBase ( )
virtualdefault

Default destructor

Member Function Documentation

◆ clone()

template<size_t STATE_DIM, size_t INPUT_DIM>
virtual DerivativesBase<STATE_DIM, INPUT_DIM>* ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::clone ( ) const
pure virtual

◆ getFlowMapDerivativeInput()

◆ getFlowMapDerivativeState()

◆ getFlowMapDerivativeTime()

◆ getGuardSurfacesDerivativeInput()

template<size_t STATE_DIM, size_t INPUT_DIM>
virtual void ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::getGuardSurfacesDerivativeInput ( dynamic_input_matrix_t D_u_gamma)
inlinevirtual

Get at a given operating point the derivative of the guard surfaces w.r.t. input vector.

Parameters
[out]D_x_gammaDerivative of the guard surfaces w.r.t. state vector.

Reimplemented in ocs2::LoopshapingDynamicsDerivative< FULL_STATE_DIM, FULL_INPUT_DIM, SYSTEM_STATE_DIM, SYSTEM_INPUT_DIM, FILTER_STATE_DIM, FILTER_INPUT_DIM >.

◆ getGuardSurfacesDerivativeState()

template<size_t STATE_DIM, size_t INPUT_DIM>
virtual void ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::getGuardSurfacesDerivativeState ( dynamic_state_matrix_t D_x_gamma)
inlinevirtual

◆ getGuardSurfacesDerivativeTime()

template<size_t STATE_DIM, size_t INPUT_DIM>
virtual void ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::getGuardSurfacesDerivativeTime ( dynamic_vector_t D_t_gamma)
inlinevirtual

◆ getJumpMapDerivativeInput()

template<size_t STATE_DIM, size_t INPUT_DIM>
virtual void ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::getJumpMapDerivativeInput ( state_input_matrix_t H)
inlinevirtual

Get the G matrix at a given operating point for the linearized system jump map. $ x^+ = G \delta x + H \delta u $.

Parameters
[out]G$ G $ matrix.

Reimplemented in ocs2::LoopshapingDynamicsDerivative< FULL_STATE_DIM, FULL_INPUT_DIM, SYSTEM_STATE_DIM, SYSTEM_INPUT_DIM, FILTER_STATE_DIM, FILTER_INPUT_DIM >, and ocs2::LinearSystemDynamics< STATE_DIM, INPUT_DIM >.

◆ getJumpMapDerivativeState()

◆ getJumpMapDerivativeTime()

◆ setCurrentStateAndControl()

Member Data Documentation

◆ t_

template<size_t STATE_DIM, size_t INPUT_DIM>
scalar_t ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::t_
protected

◆ u_

template<size_t STATE_DIM, size_t INPUT_DIM>
input_vector_t ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::u_
protected

◆ x_

template<size_t STATE_DIM, size_t INPUT_DIM>
state_vector_t ocs2::DerivativesBase< STATE_DIM, INPUT_DIM >::x_
protected

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