|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavaclient2.extra.Controller
javaclient2.extra.PDController
public class PDController
Proportional-Derivative controller implementation.
Field Summary | |
---|---|
protected double |
kd
Derivative constant |
protected double |
kp
Proportional constant |
Fields inherited from class javaclient2.extra.Controller |
---|
currE, eSum, goal, lastE |
Constructor Summary | |
---|---|
PDController(double Kp,
double Kd)
Constructor for PDController. |
Method Summary | |
---|---|
double |
getCommand(double currentOutput)
Calculate and return the controller's command for the controlled system. |
double |
getKd()
Get the current value of the derivative constant. |
double |
getKp()
Get the current value of the proportional constant. |
void |
setKd(double newKd)
Set a new value for the derivative constant. |
void |
setKp(double newKp)
Set a new value for the proportional constant. |
Methods inherited from class javaclient2.extra.Controller |
---|
deltaE, setGoal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double kp
protected double kd
Constructor Detail |
---|
public PDController(double Kp, double Kd)
Kp
- the proportional constantKd
- the derivative constantMethod Detail |
---|
public double getCommand(double currentOutput)
currentOutput
- the current output of the system
public double getKp()
public void setKp(double newKp)
newKp
- the new value for Kppublic double getKd()
public void setKd(double newKd)
newKd
- the new value for Kd
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |