|
mbsimcontrol
3.3.0
|
00001 /* Copyright (C) 2006 Mathias Bachmayer 00002 00003 * This library is free software; you can redistribute it and/or 00004 * modify it under the terms of the GNU Lesser General Public 00005 * License as published by the Free Software Foundation; either 00006 * version 2.1 of the License, or (at your option) any later version. 00007 * 00008 * This library is distributed in the hope that it will be useful, 00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 * Lesser General Public License for more details. 00012 * 00013 * You should have received a copy of the GNU Lesser General Public 00014 * License along with this library; if not, write to the Free Software 00015 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00016 00017 * 00018 * 00019 * Contact: 00020 * mbachmayer@gmx.de 00021 * 00022 */ 00023 00024 #ifndef _LINEAR_TRANSFER_SYSTEM_ 00025 #define _LINEAR_TRANSFER_SYSTEM_ 00026 00027 #include "mbsimControl/signal_processing_system.h" 00028 00029 namespace MBSimControl { 00030 00035 class LinearTransferSystem : public SignalProcessingSystem { 00036 00037 public: 00038 LinearTransferSystem(const std::string& name=""); 00039 virtual std::string getType() const {return "LinearTransferSystem"; } 00040 void initializeUsingXML(MBXMLUtils::TiXmlElement * element); 00041 00042 void calcxSize() {xSize=A.rows(); } 00043 00044 void init(MBSim::InitStage stage); 00045 00046 void updatedx(double t, double dt); 00047 void updatexd(double t); 00048 00049 void plot(double t,double dt); 00050 00051 void setPID(double P_, double I_, double D_); 00052 void setABCD(fmatvec::Mat A_,fmatvec::Mat B_,fmatvec::Mat C_,fmatvec::Mat D_); 00053 void setBandwidth(double Hz_fg); 00054 void setIntegrator(double OutputGain); 00055 void setI2(double OutputGain); 00056 void setPT1(double P, double T); 00057 void setGain(double P); 00058 void showABCD(); 00059 00060 protected: 00061 fmatvec::Mat A,B,C,D; 00062 double R1,R2,c; 00063 fmatvec::Vec calculateOutput(); 00064 fmatvec::Vec (LinearTransferSystem::*calculateOutputMethod)(); 00065 fmatvec::Vec outputMethodC(); 00066 fmatvec::Vec outputMethodD(); 00067 fmatvec::Vec outputMethodCD(); 00068 }; 00069 } 00070 00071 #endif
1.8.0