15#ifndef TWOINERTIASTATEDISTOBSRV
16#define TWOINERTIASTATEDISTOBSRV
32 #define arcs_assert(a) (assert(a))
35 #define EventLogVar(a)
40template <
size_t N = 1>
63 CalcPlantStateModel();
85 StateDistObsrv(std::move(r.StateDistObsrv))
117 std::tuple<double,double,double,double>
GetEstimatedVars(
const double Current,
const double Velocity){
120 return std::forward_as_tuple(xhat[1], xhat[2], xhat[3], xhat[4]);
131 StateDistObsrv.
Estimate(u, xhat_dis);
132 xhat[1] = xhat_dis[1];
133 xhat[2] = xhat_dis[2];
134 xhat[3] = xhat_dis[3];
135 LoadDisturbance = xhat_dis[4];
157 void CalcPlantStateModel(
void){
160 -Dl/Jl, Ks/Jl , 0 , -1.0/Jl,
161 -1 , 0 , 1.0/Rg , 0 ,
162 0 , -Ks/(Jm*Rg) , -Dm/Jm , 0 ,
175 void CalcObserverGain(
void){
177 const double k1 = -(Jm*Rg*(Dl - 2.0*Jl*g)*(Dl*Dl - 2.0*Dl*Jl*g + 2.0*Jl*Jl*g*g - 2.0*Ks*Jl))/(Jl*Jl*Jl*Ks);
178 const double k2 = (- Jm*Dl*Dl*Rg*Rg + 4.0*Jm*Dl*Jl*Rg*Rg*g - 6.0*Jm*Jl*Jl*Rg*Rg*g*g + Ks*Jl*Jl + Jm*Ks*Jl*Rg*Rg)/(Jl*Jl*Ks*Rg);
179 const double k3 = -(Dl*Jm + Dm*Jl - 4.0*Jl*Jm*g)/(Jl*Jm);
180 const double k4 = -(Jl*Jm*Rg*g*g*g*g)/Ks;
#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 TwoInertiaStateDistObsrv.hh:41
std::tuple< double, double, double, double > GetEstimatedVars(const double Current, const double Velocity)
各々の推定状態変数を取得する関数(タプル版)
Definition TwoInertiaStateDistObsrv.hh:117
Matrix< 1, 4 > GetEstimatedVect(const double Current, const double Velocity)
推定状態ベクトルを取得する関数(ベクトルで返す版)
Definition TwoInertiaStateDistObsrv.hh:108
void GetEstimatedVect(const double Current, const double Velocity, Matrix< 1, 4 > &xhat)
推定状態ベクトルを取得する関数(普通版)
Definition TwoInertiaStateDistObsrv.hh:99
void GetEstimatedVect(const double Current, const double Velocity, Matrix< 1, 3 > &xhat, double &LoadDisturbance)
推定状態ベクトルと負荷側外乱を分けて取得する関数(普通版)
Definition TwoInertiaStateDistObsrv.hh:128
TwoInertiaStateDistObsrv(const struct TwoInertiaParamDef &Params, const double Bandwidth, const double SmplTime)
コンストラクタ
Definition TwoInertiaStateDistObsrv.hh:47
~TwoInertiaStateDistObsrv()
デストラクタ
Definition TwoInertiaStateDistObsrv.hh:91
TwoInertiaStateDistObsrv(TwoInertiaStateDistObsrv &&r)
ムーブコンストラクタ
Definition TwoInertiaStateDistObsrv.hh:71