00001 // 遨榊�蝎ィ繧ッ繝ゥ繧ケ 00002 // 2011/02/10 Yuki YOKOKURA 00003 // 00004 // 遨榊�蝎ィ G(s)=1/s (蜿御ク�谺。螟画鋤) 00005 // 00006 // Copyright (C) 2011 Yuki YOKOKURA 00007 // This program is free software; 00008 // you can redistribute it and/or modify it under the terms of the GNU General Public License 00009 // as published by the Free Software Foundation; either version 3 of the License, or any later version. 00010 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 00011 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 // See the GNU General Public License for more details <http://www.gnu.org/licenses/>. 00013 // Besides, you can negotiate about other options of licenses instead of GPL. 00014 // If you would like to get other licenses, please contact us<yuki@katsura.sd.keio.ac.jp>. 00015 00016 #ifndef INTEGRATOR 00017 #define INTEGRATOR 00018 00019 namespace ARCS { // ARCS蜷榊燕遨コ髢� 00020 class Integrator { 00021 private: 00022 double Ts; // [s] 蛻カ蠕。蜻ィ譛� 00023 double uZ1; // 迥カ諷句、画焚1 螟画焚蜷校1縺ョ諢丞袖縺ッz螟画鋤縺ョz^(-1)繧堤、コ縺� 00024 double yZ1; // 迥カ諷句、画焚2 00025 bool Ena; // 遨榊�蝎ィ菴懷虚謖�莉、 true縺ョ縺ィ縺咲ゥ榊�蝎ィ菴懷虚�シ掲alse縺ョ縺ィ縺咲ゥ榊�蛛懈ュ「 00026 00027 public: 00028 Integrator(double SmplTime); // 繧ウ繝ウ繧ケ繝医Λ繧ッ繧ソ SmplTime�シ媼s] 蛻カ蠕。蜻ィ譛� 00029 ~Integrator(); // 繝�繧ケ繝医Λ繧ッ繧ソ 00030 double GetSignal(double u); // 蜃コ蜉帑ソ。蜿キ縺ョ蜿門セ� u�シ帛�・蜉帑ソ。蜿キ 00031 void SetSmplTime(double SmplTime); // 蛻カ蠕。蜻ィ譛溘�ョ蜀崎ィュ螳� SmplTime�シ媼s] 蛻カ蠕。蜻ィ譛� 00032 void SetInitial(double InitValue); // 遨榊�蛻晄悄蛟、縺ョ險ュ螳� InitValue�シ帛�晄悄蛟、 00033 void Enable(bool Flag); // 遨榊�蝎ィ繧貞虚縺九☆縺区ュ「繧√k縺具シ熊lag�シ孚rue縺ョ縺ィ縺咲ゥ榊�蝎ィ菴懷虚�シ掲alse縺ョ縺ィ縺咲ゥ榊�蛛懈ュ「 00034 void ClearStateVars(void); // 縺吶∋縺ヲ縺ョ迥カ諷句、画焚縺ョ繝ェ繧サ繝�繝� 00035 }; 00036 } 00037 00038 #endif 00039 00040 00041