Class RampFilter

  • Direct Known Subclasses:
    DisabledRampFilter

    public class RampFilter
    extends java.lang.Object
    A controller that increases the input by a given increase rate.
    • Constructor Summary

      Constructors 
      Constructor Description
      RampFilter()
      Creates a RampFilter using default values
      RampFilter​(double increasingRate)
      Creates a RampFilter
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected int applyLowHighLimits​(int value)
      Applies the configured PID low and high limits to a value.
      int applyRampFilter​(int input, int target)
      Apply the filter using the current Channel value as input and the target value.
      void setLimits​(java.lang.Integer lowLimit, java.lang.Integer highLimit)
      Limit the output value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_INCREASE_RATE

        public static final double DEFAULT_INCREASE_RATE
        See Also:
        Constant Field Values
    • Constructor Detail

      • RampFilter

        public RampFilter​(double increasingRate)
        Creates a RampFilter
        Parameters:
        increasingRate - the rate of increase
      • RampFilter

        public RampFilter()
        Creates a RampFilter using default values
    • Method Detail

      • setLimits

        public void setLimits​(java.lang.Integer lowLimit,
                              java.lang.Integer highLimit)
        Limit the output value.
        Parameters:
        lowLimit - lowest allowed output value
        highLimit - highest allowed output value
      • applyRampFilter

        public int applyRampFilter​(int input,
                                   int target)
                            throws OpenemsException
        Apply the filter using the current Channel value as input and the target value.
        Parameters:
        input - the input value, e.g. the measured Channel value
        target - the target value
        Returns:
        the filtered set-point value
        Throws:
        OpenemsException
      • applyLowHighLimits

        protected int applyLowHighLimits​(int value)
        Applies the configured PID low and high limits to a value.
        Parameters:
        value - the input value
        Returns:
        the value within low and high limit