Package xal.tools.dsp

Class DigitalDifferentiator


public class DigitalDifferentiator extends LtiDigitalFilter

Convenience class implementing a simple 1st order digital differentiator. The response yn of this filter to an input xn is given by

   yn = xn - xn-1

Thus, the transfer function H(z) is given by

   H(z) = 1 - z-1

where z is the Z-transform variable.

The differentiator is initialized so that the initial input x-1 is zero. Thus, the first output from this filter is the first input. This value may be changed with a call to LtiDigitalFilter.setInputCoefficient(int, double).

Author:
Christopher K. Allen
See Also:
  • Constructor Details

    • DigitalDifferentiator

      public DigitalDifferentiator()
      Create a new DigitalDifferentiator object with zero initial response.
      See Also:
    • DigitalDifferentiator

      public DigitalDifferentiator(double dblVal)
      Create a new DigitalDifferentiator object with the given initial response.
      Parameters:
      dblVal - initial response of the differentiator
  • Method Details

    • setInitialResponse

      public void setInitialResponse(double dblVal)
      Set the initial response of the differentiator to the given value. Note also the the filter is reset.
      Parameters:
      dblVal - initial response of the differentiator
      See Also: