- 3.0.2 optimal control module.
InputDisturbedSystem.h
Go to the documentation of this file.
1 /**********************************************************************************************************************
2 This file is part of the Control Toolbox (https://github.com/ethz-adrl/control-toolbox), copyright by ETH Zurich.
3 Licensed under the BSD-2 license (see LICENSE file in main directory)
4 **********************************************************************************************************************/
5 
6 #pragma once
7 
8 #include "DisturbedSystem.h"
9 
10 namespace ct {
11 namespace optcon {
12 
27 template <size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
28 class InputDisturbedSystem : public ct::optcon::DisturbedSystem<STATE_DIM, CONTROL_DIM, CONTROL_DIM, SCALAR>
29 {
30 public:
31  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
32 
33  // the dimension of the augmented state used in the filter
34  static const size_t AUGMENTED_STATE_DIM = STATE_DIM + CONTROL_DIM;
35 
37 
44 
47 
49  InputDisturbedSystem* clone() const override;
50 
60  const SCALAR& t,
63 
64 private:
65  // the nominal system (the one we are trying to control)
66  std::shared_ptr<ct::core::ControlledSystem<STATE_DIM, CONTROL_DIM, SCALAR>> system_;
67 };
68 
69 } // namespace optcon
70 } // namespace ct
InputDisturbedSystem * clone() const override
deep cloning
Definition: InputDisturbedSystem-impl.h:26
static EIGEN_MAKE_ALIGNED_OPERATOR_NEW const size_t AUGMENTED_STATE_DIM
Definition: InputDisturbedSystem.h:34
clear all close all load ct GNMSLog0 mat reformat t
Definition: gnmsPlot.m:6
CppAD::AD< CppAD::cg::CG< double > > SCALAR
Disturbed system augments the nominal system so that all the CT interfaces and dimensions are satisfi...
Definition: DisturbedSystem.h:22
typename ct::optcon::DisturbedSystem< STATE_DIM, CONTROL_DIM, CONTROL_DIM, SCALAR > Base
Definition: InputDisturbedSystem.h:36
Implementation of an input disturbed system where, the dimension of the disturbance is equal to the d...
Definition: InputDisturbedSystem.h:28
void computeControlledDynamics(const ct::core::StateVector< AUGMENTED_STATE_DIM, SCALAR > &state, const SCALAR &t, const ct::core::ControlVector< CONTROL_DIM, SCALAR > &control, ct::core::StateVector< AUGMENTED_STATE_DIM, SCALAR > &derivative) override
compute the dynamics (the left-hand-side of the dynamics equation) for the disturbance-augmented syst...
Definition: InputDisturbedSystem-impl.h:33
InputDisturbedSystem(std::shared_ptr< ct::core::ControlledSystem< STATE_DIM, CONTROL_DIM, SCALAR >> sys)
Construct a new Input Disturbed System object.
Definition: InputDisturbedSystem-impl.h:13