- 3.0.2 models module.
HyQBareModelLinearizedReverse.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 <ct/core/core.h>
9 
10 namespace ct {
11 namespace models {
12 namespace HyQ {
13 
15 {
16 public:
18 
23 
24  HyQBareModelLinearizedReverse(const ct::core::SYSTEM_TYPE& type = ct::core::SYSTEM_TYPE::GENERAL)
25  : ct::core::LinearSystem<36, 12>(type)
26  {
27  initialize();
28  }
29 
32 
33  virtual HyQBareModelLinearizedReverse* clone() const override { return new HyQBareModelLinearizedReverse; }
34  virtual const state_matrix_t& getDerivativeState(const state_vector_t& x,
35  const control_vector_t& u,
36  const double t = double(0.0)) override;
37 
38  virtual const state_control_matrix_t& getDerivativeControl(const state_vector_t& x,
39  const control_vector_t& u,
40  const double t = double(0.0)) override;
41 
42 private:
43  void initialize()
44  {
45  dFdx_.setZero();
46  dFdu_.setZero();
47  vX_.fill(0.0);
48  vU_.fill(0.0);
49  }
50 
51  state_matrix_t dFdx_;
52  state_control_matrix_t dFdu_;
53  std::array<double, 3790> vX_;
54  std::array<double, 383> vU_;
55 };
56 }
57 }
58 }
ct::core::ControlVector< control_dim > u
ct::core::LinearSystem< 36, 12, double > Base
Definition: HyQBareModelLinearizedReverse.h:17
virtual const state_matrix_t & getDerivativeState(const state_vector_t &x, const control_vector_t &u, const double t=double(0.0)) override
Definition: HyQBareModelLinearizedReverse.cpp:13
Base::state_control_matrix_t state_control_matrix_t
Definition: HyQBareModelLinearizedReverse.h:22
Definition: HyQBareModelLinearizedReverse.h:14
Base::state_vector_t state_vector_t
Definition: HyQBareModelLinearizedReverse.h:19
clear all close all load ct GNMSLog0 mat reformat t
Base::control_vector_t control_vector_t
Definition: HyQBareModelLinearizedReverse.h:20
virtual const state_control_matrix_t & getDerivativeControl(const state_vector_t &x, const control_vector_t &u, const double t=double(0.0)) override
Definition: HyQBareModelLinearizedReverse.cpp:27311
HyQBareModelLinearizedReverse(const HyQBareModelLinearizedReverse &other)
Definition: HyQBareModelLinearizedReverse.h:30
StateVector< 36, double > state_vector_t
ct::core::StateVector< state_dim > x
StateMatrix< 36, double > state_matrix_t
Base::state_matrix_t state_matrix_t
Definition: HyQBareModelLinearizedReverse.h:21
StateControlMatrix< 36, 12, double > state_control_matrix_t
virtual ~HyQBareModelLinearizedReverse()
Definition: HyQBareModelLinearizedReverse.h:31
ControlVector< 12, double > control_vector_t
virtual HyQBareModelLinearizedReverse * clone() const override
Definition: HyQBareModelLinearizedReverse.h:33
HyQBareModelLinearizedReverse(const ct::core::SYSTEM_TYPE &type=ct::core::SYSTEM_TYPE::GENERAL)
Definition: HyQBareModelLinearizedReverse.h:24