MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
PIDController.h
Go to the documentation of this file.
1 // PIDController.h ---
2 //
3 // Filename: PIDController.h
4 // Description:
5 // Author: subhasis ray
6 // Maintainer:
7 // Created: Tue Dec 30 23:14:00 2008 (+0530)
8 // Version:
9 // Last-Updated: Wed Feb 22 18:34:37 2012 (+0530)
10 // By: Subhasis Ray
11 // Update #: 57
12 // URL:
13 // Keywords:
14 // Compatibility:
15 //
16 //
17 
18 // Commentary:
19 //
20 //
21 //
22 //
23 
24 // Change log:
25 //
26 // 2012-02-22 17:14:29 (+0530) subha - started porting to dh_branch
27 //
28 //
29 /**********************************************************************
30 ** This program is part of 'MOOSE', the
31 ** Messaging Object Oriented Simulation Environment,
32 ** also known as GENESIS 3 base code.
33 ** copyright (C) 2003-2008 Upinder S. Bhalla. and NCBS
34 ** It is made available under the terms of the
35 ** GNU General Public License version 2
36 ** See the file COPYING.LIB for the full notice.
37 **********************************************************************/
38 
39 #ifndef _PIDCONTROLLER_H
40 #define _PIDCONTROLLER_H
41 
42 #include "../basecode/header.h"
43 
45  public:
46  PIDController();
47 
48  void setCommand( double command );
49  double getCommand() const;
50  void setSensed(double sensed );
51  double getSensed() const;
52  double getOutput() const;
53  void setGain(double gain );
54  double getGain() const;
55  void setTauI(double tau_i );
56  double getTauI() const;
57  void setTauD(double tau_d );
58  double getTauD() const;
59  void setSaturation(double saturation );
60  double getSaturation() const;
61  double getError() const;
62  double getEIntegral() const;
63  double getEDerivative() const;
64  double getEPrevious() const;
65  void process(const Eref&e, ProcPtr process );
66  void reinit(const Eref& e, ProcPtr process );
67  static const Cinfo * initCinfo();
68 
69  private:
70  double command_;
71  double saturation_;
72  double gain_;
73  double tau_i_;
74  double tau_d_;
75  double sensed_;
76  double output_;
77  double error_; // e of PIDController in GENESIS ( error = command - sensed )
78  double e_integral_; // integral of error dt
79  double e_derivative_; // derivative of error
80  double e_previous_;
81 };
82 
83 #endif
84 
85 // Code:
86 
87 
88 
89 
90 //
91 // PIDController.h ends here
void reinit(const Eref &e, ProcPtr process)
double getTauD() const
double getEDerivative() const
double e_previous_
Definition: PIDController.h:80
double getGain() const
double getCommand() const
double getTauI() const
double getEPrevious() const
void setSensed(double sensed)
double getEIntegral() const
void setGain(double gain)
void process(const Eref &e, ProcPtr process)
double e_integral_
Definition: PIDController.h:78
double getSaturation() const
double e_derivative_
Definition: PIDController.h:79
void setTauD(double tau_d)
double saturation_
Definition: PIDController.h:71
Definition: Eref.h:26
static const Cinfo * initCinfo()
void setCommand(double command)
double getOutput() const
double getSensed() const
Definition: Cinfo.h:18
void setSaturation(double saturation)
double getError() const
void setTauI(double tau_i)