Class BangBangController

java.lang.Object
neqsim.process.ml.controllers.BangBangController
All Implemented Interfaces:
Serializable, Controller

public class BangBangController extends Object implements 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 Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • name

      private final String 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 name
      valueIndex - index of controlled variable in observation
      setpoint - target setpoint
      deadband - hysteresis band (±deadband around setpoint)
      lowAction - action when below setpoint
      highAction - action when above setpoint
  • Method Details

    • computeAction

      public double[] computeAction(double[] observation)
      Description copied from interface: Controller
      Compute control action based on observation.
      Specified by:
      computeAction in interface Controller
      Parameters:
      observation - normalized observation array
      Returns:
      action array
    • reset

      public void reset()
      Description copied from interface: Controller
      Reset controller state (for stateful controllers like PID).
      Specified by:
      reset in interface Controller
    • getName

      public String getName()
      Description copied from interface: Controller
      Get controller name.
      Specified by:
      getName in interface Controller
      Returns:
      name