00001 // 加速度オブザーバクラス 00002 // 2011/02/16 Yuki YOKOKURA 00003 // 00004 // 加速度オブザーバ 00005 // 加速度参照値と外乱オブザーバによる推定外乱から加速度応答値を計算する 00006 // 00007 // Copyright (C) 2011 Yuki YOKOKURA 00008 // This program is free software; 00009 // you can redistribute it and/or modify it under the terms of the GNU General Public License 00010 // as published by the Free Software Foundation; either version 3 of the License, or any later version. 00011 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 00012 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00013 // See the GNU General Public License for more details <http://www.gnu.org/licenses/>. 00014 // Besides, you can negotiate about other options of licenses instead of GPL. 00015 // If you would like to get other licenses, please contact us<yuki@katsura.sd.keio.ac.jp>. 00016 00017 #ifndef ACCOBSRV 00018 #define ACCOBSRV 00019 00020 namespace ARCS { // ARCS名前空間 00021 class AccObsrv { 00022 private: 00023 double gacc; // [rad/s] 加速度オブザーバの帯域 00024 double gdis; // [rad/s] 外乱オブザーバの帯域 00025 double Mn; // [kg] or [kgm^2] 慣性 00026 double Ts; // [s] 制御周期 00027 double XDDrefZ1;// 状態変数1 00028 double FdisZ1; // 状態変数2 00029 double XDDresZ1;// 状態変数3 00030 00031 public: 00032 AccObsrv(double AccBandwidth, double DistBandwidth, double Mass, double SmplTime); 00033 // コンストラクタ 00034 // gdis;[rad/s] 帯域,Mass;[kg] or [kgm^2] 慣性 00035 // TrqConst;[N/A] or [Nm/A] トルク定数,SmplTime;[s] 制御周期 00036 ~AccObsrv(); // デストラクタ 00037 double GetAcceleration(double XDDref, double Fdis); // 加速度応答の取得 XDDref;[m/s^2] 加速度参照値,Fdis;[N] 推定外乱 00038 void SetAccBandwidth(double Bandwidth); // 加速度オブザーバの帯域の再設定 Bandwidth;[rad/s] 帯域 00039 void SetDistBandwidth(double Bandwidth); // 外乱オブザーバの帯域の再設定 Bandwidth;[rad/s] 帯域 00040 void SetInertia(double Mass); // 慣性の再設定 Mass;[kg] or [kgm^2] 慣性 00041 void SetSmplTime(double SmplTime); // 制御周期の再設定 SmplTime;[s] 制御周期 00042 void ClearStateVars(void); // すべての状態変数のリセット 00043 }; 00044 } 00045 00046 #endif 00047 00048 00049