Class BangBangController
java.lang.Object
neqsim.process.ml.controllers.BangBangController
- All Implemented Interfaces:
Serializable, Controller
Bang-bang (on-off) controller with hysteresis.
Simple threshold-based control with deadband to prevent oscillation.
- Version:
- 1.0
- Author:
- ESOL
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleprivate final doubleprivate final doubleprivate final doubleprivate final Stringprivate static final longprivate final doubleprivate final int -
Constructor Summary
ConstructorsConstructorDescriptionBangBangController(String name, int valueIndex, double setpoint, double deadband, double lowAction, double highAction) Create bang-bang controller. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]computeAction(double[] observation) Compute control action based on observation.getName()Get controller name.voidreset()Reset controller state (for stateful controllers like PID).
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
name
-
valueIndex
private final int valueIndex -
setpoint
private final double setpoint -
deadband
private final double deadband -
lowAction
private final double lowAction -
highAction
private final double highAction -
currentAction
private double currentAction
-
-
Constructor Details
-
BangBangController
public BangBangController(String name, int valueIndex, double setpoint, double deadband, double lowAction, double highAction) Create bang-bang controller.- Parameters:
name- controller namevalueIndex- index of controlled variable in observationsetpoint- target setpointdeadband- hysteresis band (±deadband around setpoint)lowAction- action when below setpointhighAction- action when above setpoint
-
-
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
-
reset
public void reset()Description copied from interface:ControllerReset controller state (for stateful controllers like PID).- Specified by:
resetin interfaceController
-
getName
Description copied from interface:ControllerGet controller name.- Specified by:
getNamein interfaceController- Returns:
- name
-