14#ifndef TWOINERTIASTATEOBSRV
15#define TWOINERTIASTATEOBSRV
31 #define arcs_assert(a) (assert(a))
34 #define EventLogVar(a)
39template <
size_t N = 1>
62 CalcPlantStateModel();
84 StateObsrv(std::move(r.StateObsrv))
100 return StateObsrv.
Estimate(u, xhat);
116 std::tuple<double,double,double>
GetEstimatedVars(
const double Current,
const double Velocity){
119 return std::forward_as_tuple(xhat[1], xhat[2], xhat[3]);
141 void CalcPlantStateModel(
void){
146 0 , -Ks/(Jm*Rg) , -Dm/Jm
157 void CalcObserverGain(
void){
159 const double k1 = -(Jm*Rg*(Dl*Dl*Dl - 3.0*Dl*Dl*Jl*g + 3.0*Dl*Jl*Jl*g*g - 2.0*Ks*Dl*Jl - Jl*Jl*Jl*g*g*g + 3.0*Ks*Jl*Jl*g))/(Jl*Jl*Jl*Ks);
160 const double k2 = (- Jm*Dl*Dl*Rg*Rg + 3.0*Jm*Dl*Jl*Rg*Rg*g - 3.0*Jm*Jl*Jl*Rg*Rg*g*g + Ks*Jl*Jl + Jm*Ks*Jl*Rg*Rg)/(Jl*Jl*Ks*Rg);
161 const double k3 = -(Dl*Jm + Dm*Jl - 3.0*Jl*Jm*g)/(Jl*Jm);
#define PassedLog()
イベントログ用マクロ(ファイルと行番号のみ記録版)
Definition ARCSeventlog.hh:26
離散化クラス(テンプレート版) !!!注意喚起:このクラスは将来的に廃止予定です。代わりに、ArcsControlDiscretizeを使用して下さい。
行列/ベクトル計算クラス(テンプレート版)
Definition Matrix.hh:44
constexpr void Set(const T1 &u1, const T2 &... u2)
行列要素に値を設定する関数
Definition Matrix.hh:385
一般形のオブザーバクラス
Definition Observer.hh:39
void Estimate(const Matrix< 1, 2 > &u, Matrix< 1, N > &xhat)
状態推定の計算をして状態ベクトルを返す関数(普通版)
Definition Observer.hh:88
void SetPlantModelAndGain(const Matrix< N, N > &A, const Matrix< 1, N > &b, const Matrix< N, 1 > &c, const Matrix< 1, N > &k, const double Ts)
対象のプラントモデルとゲインを設定する関数
Definition Observer.hh:76
2慣性共振系のパラメータ構造体(Ds無し版)
Definition TwoInertiaParamDef.hh:18
2慣性系状態オブザーバクラス
Definition TwoInertiaStateObsrv.hh:40
std::tuple< double, double, double > GetEstimatedVars(const double Current, const double Velocity)
各々の推定状態変数を取得する関数(タプル版)
Definition TwoInertiaStateObsrv.hh:116
TwoInertiaStateObsrv(TwoInertiaStateObsrv &&r)
ムーブコンストラクタ
Definition TwoInertiaStateObsrv.hh:70
TwoInertiaStateObsrv(const struct TwoInertiaParamDef &Params, const double Bandwidth, const double SmplTime)
コンストラクタ
Definition TwoInertiaStateObsrv.hh:46
~TwoInertiaStateObsrv()
デストラクタ
Definition TwoInertiaStateObsrv.hh:90
Matrix< 1, 3 > GetEstimatedVect(const double Current, const double Velocity)
推定状態ベクトルを取得する関数(ベクトルで返す版)
Definition TwoInertiaStateObsrv.hh:107
void GetEstimatedVect(const double Current, const double Velocity, Matrix< 1, 3 > &xhat)
推定状態ベクトルを取得する関数(普通版)
Definition TwoInertiaStateObsrv.hh:98