28 #define arcs_assert(a) (assert(a))
31 #define EventLogVar(a)
44 template<
size_t NN,
size_t MM>
46 static_assert(NN == MM);
57 template<
size_t NN,
size_t MM>
71 template<
size_t NA,
size_t MA,
size_t NB>
83 template<
size_t NA,
size_t MA,
size_t NB>
97 template<
size_t NA,
size_t MA,
size_t MC>
109 template<
size_t NA,
size_t MA,
size_t MC>
127 template<
size_t NA,
size_t MA,
size_t NB,
size_t MC>
128 static constexpr void BalanceReal(
const Matrix<NA,MA>& A,
const Matrix<NB,MA>& b,
const Matrix<NA,MC>& c,
Matrix<NA,MA>& Ah,
Matrix<NB,MA>& bh,
Matrix<NA,MC>& ch){
129 static_assert(NA == MA);
141 const auto [U, S, V] = SVD( tp(Lo)*Lc );
166 template<
size_t NA,
size_t MA,
size_t NB,
size_t MC>
167 static constexpr std::tuple<Matrix<NA,MA>,
Matrix<NB,MA>,
Matrix<NA,MC>>
BalanceReal(
const Matrix<NA,MA>& A,
const Matrix<NB,MA>& b,
const Matrix<NA,MC>& c){
185 template <
size_t N,
size_t M>
187 const Matrix<N,N>& Ac,
const Matrix<M,N>& Bc,
Matrix<N,N>& Ad,
Matrix<M,N>& Bd,
const double Ts,
const size_t Npade = 13,
const size_t Nint = 10000
189 Ad = expm(Ac*Ts, Npade);
190 Bd = integral_expm(Ac, Ts, Nint, Npade)*Bc;
202 template <
size_t N,
size_t M>
204 const Matrix<N,N>& Ac,
const Matrix<M,N>& Bc,
const double Ts,
const size_t Npade = 13,
const size_t Nint = 10000
ARCS-Control 制御理論クラス
Definition ArcsControl.hh:36
static constexpr void BalanceReal(const Matrix< NA, MA > &A, const Matrix< NB, MA > &b, const Matrix< NA, MC > &c, Matrix< NA, MA > &Ah, Matrix< NB, MA > &bh, Matrix< NA, MC > &ch)
状態空間モデルを平衡化する関数(引数で返す版)
Definition ArcsControl.hh:128
static constexpr Matrix< NN, MM, double > Lyapunov(const Matrix< NN, MM, double > &A, const Matrix< NN, MM, double > &Q)
連続リアプノフ方程式 A*X + X*A^T + Q = 0 の解Xを求める関数(実数版, 戻り値で返す版)
Definition ArcsControl.hh:58
static constexpr void Discretize(const Matrix< N, N > &Ac, const Matrix< M, N > &Bc, Matrix< N, N > &Ad, Matrix< M, N > &Bd, const double Ts, const size_t Npade=13, const size_t Nint=10000)
連続系状態空間モデルを離散化する関数(引数で返す版)
Definition ArcsControl.hh:186
static constexpr void GramianObsrv(const Matrix< NA, MA > &A, const Matrix< NA, MC > &c, Matrix< NA, MA > &Wo)
可観測グラミアンを計算する関数(引数で返す版)
Definition ArcsControl.hh:98
static constexpr std::tuple< Matrix< NA, MA >, Matrix< NB, MA >, Matrix< NA, MC > > BalanceReal(const Matrix< NA, MA > &A, const Matrix< NB, MA > &b, const Matrix< NA, MC > &c)
状態空間モデルを平衡化する関数(タプルで返す版)
Definition ArcsControl.hh:167
static constexpr Matrix< NA, MA > GramianObsrv(const Matrix< NA, MA > &A, const Matrix< NA, MC > &c)
可観測グラミアンを計算する関数(戻り値で返す版)
Definition ArcsControl.hh:110
static constexpr Matrix< NA, MA > GramianCtrl(const Matrix< NA, MA > &A, const Matrix< NB, MA > &b)
可制御グラミアンを計算する関数(戻り値で返す版)
Definition ArcsControl.hh:84
static constexpr void GramianCtrl(const Matrix< NA, MA > &A, const Matrix< NB, MA > &b, Matrix< NA, MA > &Wc)
可制御グラミアンを計算する関数(引数で返す版)
Definition ArcsControl.hh:72
static constexpr std::tuple< Matrix< N, N >, Matrix< M, N > > Discretize(const Matrix< N, N > &Ac, const Matrix< M, N > &Bc, const double Ts, const size_t Npade=13, const size_t Nint=10000)
連続系状態空間モデルを離散化する関数(タプルで返す版)
Definition ArcsControl.hh:203
static constexpr void Lyapunov(const Matrix< NN, MM, double > &A, const Matrix< NN, MM, double > &Q, Matrix< NN, MM, double > &X)
連続リアプノフ方程式 A*X + X*A^T + Q = 0 の解Xを求める関数(実数版, 引数で返す版)
Definition ArcsControl.hh:45
行列/ベクトル計算クラス(テンプレート版)
Definition Matrix.hh:44
static constexpr Matrix< NN, NN, TT > eye(void)
n行n列の単位行列を返す関数 (identのエイリアス)
Definition Matrix.hh:678