Class ProportionalController
java.lang.Object
neqsim.process.ml.controllers.ProportionalController
- All Implemented Interfaces:
Serializable, Controller
Proportional (P) controller for single setpoint tracking.
Simple controller: action = Kp * error
- Version:
- 1.0
- Author:
- ESOL
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final doubleprivate final doubleprivate final intprivate final doubleprivate final Stringprivate static final long -
Constructor Summary
ConstructorsConstructorDescriptionProportionalController(String name, int errorIndex, double kp, double actionMin, double actionMax) Create P controller. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]computeAction(double[] observation) Compute control action based on observation.getName()Get controller name.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Controller
reset
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
name
-
errorIndex
private final int errorIndex -
kp
private final double kp -
actionMin
private final double actionMin -
actionMax
private final double actionMax
-
-
Constructor Details
-
ProportionalController
public ProportionalController(String name, int errorIndex, double kp, double actionMin, double actionMax) Create P controller.- Parameters:
name- controller nameerrorIndex- index of error in observation arraykp- proportional gainactionMin- minimum action valueactionMax- maximum action value
-
-
Method Details
-
computeAction
public double[] computeAction(double[] observation) Description copied from interface:ControllerCompute control action based on observation.- Specified by:
computeActionin interfaceController- Parameters:
observation- normalized observation array- Returns:
- action array
-
getName
Description copied from interface:ControllerGet controller name.- Specified by:
getNamein interfaceController- Returns:
- name
-