|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavaclient2.extra.Controller
javaclient2.extra.PIDController
public class PIDController
Proportional-Integral-Derivative controller implementation.
Field Summary | |
---|---|
protected float |
kd
Derivative constant |
protected float |
ki
Integral constant |
protected float |
kp
Proportional constant |
Fields inherited from class javaclient2.extra.Controller |
---|
currE, eSum, goal, lastE |
Constructor Summary | |
---|---|
PIDController(float Kp,
float Ki,
float Kd)
Constructor for PIDController. |
Method Summary | |
---|---|
float |
getCommand(float currentOutput)
Calculate and return the controller's command for the controlled system. |
double |
getKd()
Get the current value of the derivative constant. |
float |
getKi()
Get the current value of the integral constant. |
float |
getKp()
Get the current value of the proportional constant. |
void |
setKd(float newKd)
Set a new value for the derivative constant. |
void |
setKi(float newKi)
Set a new value for the integral constant. |
void |
setKp(float 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 float kp
protected float ki
protected float kd
Constructor Detail |
---|
public PIDController(float Kp, float Ki, float Kd)
Kp
- the proportional constantKi
- the integral constantKd
- the derivative constantMethod Detail |
---|
public float getCommand(float currentOutput)
currentOutput
- the current output of the system
public float getKp()
public void setKp(float newKp)
newKp
- the new value for Kppublic float getKi()
public void setKi(float newKi)
newKi
- the new value for Kipublic double getKd()
public void setKd(float newKd)
newKd
- the new value for Kd
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |