MIMPC++
A fast typesafe Mixed Integer MPC C++ library
REACSA.hpp
1 #pragma once
2 
3 #include "../System.hpp"
4 #include "REACSA_constants.h"
5 namespace mimpc::systems {
6  using SystemSized = System<7, 1, 8>;
7 
8  class REACSA : public SystemSized {
9  private:
10  const double system_m_;
11  const double body_Izz_;
12  const double rw_Izz_;
13  const double r_;
14  const double f_nom;
15 
16  SystemSized::AMatrix A_;
17  SystemSized::BMatrix B_;
18  public:
19 
20  REACSA(double systemM, double bodyIzz, double rwIzz, double r, double fNom);
21 
22  REACSA();
23 
24  virtual ~REACSA() = default;
25 
26  SystemSized::AMatrix getA(const SystemSized::StateVec &state) const override;
27 
28  SystemSized::BMatrix getB(const SystemSized::StateVec &state) const override;
29 
30  void updateA(const SystemSized::StateVec &state,
31  std::function<void(unsigned int, unsigned int, double)> &changeAval) const override;
32 
33  void updateB(const SystemSized::StateVec &state,
34  std::function<void(unsigned int, unsigned int, double)> &changeBval) const override;
35 
36  static double get_angular_velocity_bound(double rw_speed_final_bound);
37 
38  static void get_limitcycle_v_bounds(unsigned int num_break_thrusts, double &v_bound, double &x_bound);
39 
40  static double
41  get_angular_velocity_bound(double body_Izz, double rw_Izz, double rw_speed_max, double rw_speed_final_bound);
42 
43  static void
44  get_limitcycle_v_bounds(unsigned int num_break_thrusts, double system_m, double f_nom, double t_min_on,
45  double t_min_off, double t_max_on, double &v_bound, double &x_bound);
46 
47  };
48 }
49 
Definition: System.hpp:32
Definition: REACSA.hpp:8
void updateB(const SystemSized::StateVec &state, std::function< void(unsigned int, unsigned int, double)> &changeBval) const override
SystemSized::BMatrix getB(const SystemSized::StateVec &state) const override
SystemSized::AMatrix getA(const SystemSized::StateVec &state) const override
void updateA(const SystemSized::StateVec &state, std::function< void(unsigned int, unsigned int, double)> &changeAval) const override