Class ProportionalController

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

public class ProportionalController extends Object implements Controller
Proportional (P) controller for single setpoint tracking.

Simple controller: action = Kp * error

Version:
1.0
Author:
ESOL
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • name

      private final String 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 name
      errorIndex - index of error in observation array
      kp - proportional gain
      actionMin - minimum action value
      actionMax - maximum action value
  • 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
    • getName

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