All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
massless_spring_damper.h
1 /* Copyright (C) 2011 Markus Schneider
2 
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2.1 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 
17  *
18  *
19  * Contact:
20  * schneidm@amm.mw.tu-muenchen.de
21  *
22  */
23 
24 #ifndef _MASSLESS_SPRING_DAMPER_
25 #define _MASSLESS_SPRING_DAMPER_
26 
27 #include "mbsimControl/signal_processing_system.h"
28 
29 namespace MBSimControl {
30 
36 
37  public:
38  MasslessSpringDamper(const std::string& name="");
39  virtual std::string getType() const {return "MasslessSpringDamper"; }
40  void initializeUsingXML(xercesc::DOMElement * element);
41 
42  void calcxSize() {xSize=1; }
43  fmatvec::VecV calculateOutput() {return x.copy(); }
44 
45  void init(InitStage stage);
46 
47  void updatedx(double t, double dt);
48  void updatexd(double t);
49 
50  void plot(double t,double dt);
51 
52  void setSpringStiffness(double c_) {c=c_; }
53  void setBasicSpringForce(double F0_) {F0=F0_; }
54  void setDampingCoefficient(double d_) {dPos=d_; }
55  void setNegativeDampingCoefficient(double d_) {dNeg=d_; }
56  void setFrictionForce(double FFric_) {FFricPos=FFric_; }
57  void setNegativeFrictionForce(double FFric_) {FFricNeg=FFric_; }
58  void setMinimumPositionValue(double xMin_) {xMin=xMin_; }
59  void setMaximumPositionValue(double xMax_) {xMax=xMax_; }
60 
61  private:
62  double c, F0, dPos, dNeg, FFricPos, FFricNeg, xMin, xMax;
63  double xdLocal;
64  };
65 }
66 
67 #endif
SignalProcessingSystem.
Definition: signal_processing_system.h:37
Massless Spring Damper (PT1)
Definition: massless_spring_damper.h:35

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML