PIController Class Reference

#include <PIController.h>

Public Member Functions

 PIController (Mdouble pGain, Mdouble iGain)
 
Mdouble apply (Mdouble stressError, Mdouble timeStep)
 

Private Attributes

Mdouble pGain
 
Mdouble iGain
 
Mdouble iController = 0
 

Constructor & Destructor Documentation

◆ PIController()

PIController::PIController ( Mdouble  pGain,
Mdouble  iGain 
)
8 {}
Mdouble iGain
Definition: PIController.h:11
Mdouble pGain
Definition: PIController.h:10

Member Function Documentation

◆ apply()

Mdouble PIController::apply ( Mdouble  stressError,
Mdouble  timeStep 
)
9  {
10  // Proportional Controller
11  Mdouble pController = pGain * stressError;
12 
13  //Integral Controller
14  iController += iGain * timeStep * stressError;
15 
16  // Controller Command
17  return pController + iController;
18 }
double Mdouble
Definition: GeneralDefine.h:34
Mdouble iController
Definition: PIController.h:12

References iController, iGain, and pGain.

Referenced by ControllerUnitTest::RungeKutta().

Member Data Documentation

◆ iController

Mdouble PIController::iController = 0
private

Referenced by apply().

◆ iGain

Mdouble PIController::iGain
private

Referenced by apply().

◆ pGain

Mdouble PIController::pGain
private

Referenced by apply().


The documentation for this class was generated from the following files: