javaclient2.extra
Class Controller

java.lang.Object
  extended by javaclient2.extra.Controller
Direct Known Subclasses:
PController, PDController, PIController, PIDController

public abstract class Controller
extends java.lang.Object

Abstract controller implementation. Used as a starting point for P, PI, PD, PID controllers.

Author:
Radu Bogdan Rusu

Field Summary
protected  double currE
          current error
protected  double eSum
          the sum of all errors so far
protected  double goal
          set the controller's goal
protected  double lastE
          last error
 
Constructor Summary
Controller()
           
 
Method Summary
protected  double deltaE()
          Get the difference between the current error and the last error.
 void setGoal(double newGoal)
          Set a new goal for the controller.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

goal

protected double goal
set the controller's goal


eSum

protected double eSum
the sum of all errors so far


currE

protected double currE
current error


lastE

protected double lastE
last error

Constructor Detail

Controller

public Controller()
Method Detail

setGoal

public void setGoal(double newGoal)
Set a new goal for the controller.

Parameters:
newGoal - the new goal for the controller

deltaE

protected double deltaE()
Get the difference between the current error and the last error.

Returns:
the difference between the current error and the last error