Package xal.tools.dsp
Class DigitalDifferentiator
java.lang.Object
xal.tools.dsp.AbstractDigitalFilter
xal.tools.dsp.LtiDigitalFilter
xal.tools.dsp.DigitalDifferentiator
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 Summary
ConstructorsConstructorDescriptionCreate a newDigitalDifferentiator
object with zero initial response.DigitalDifferentiator
(double dblVal) Create a newDigitalDifferentiator
object with the given initial response. -
Method Summary
Modifier and TypeMethodDescriptionvoid
setInitialResponse
(double dblVal) Set the initial response of the differentiator to the given value.Methods inherited from class xal.tools.dsp.LtiDigitalFilter
getInputCoefficient, getInputCoefficient, getOutputCoefficient, getOutputCoefficient, setInputCoefficient, setInputCoefficients, setOutputCoefficient, setOutputCoefficients, toString, transferFunction
Methods inherited from class xal.tools.dsp.AbstractDigitalFilter
getCoefficientCount, getOrder, getTimeIndex, reset, response, response
-
Constructor Details
-
DigitalDifferentiator
public DigitalDifferentiator()Create a newDigitalDifferentiator
object with zero initial response.- See Also:
-
DigitalDifferentiator
public DigitalDifferentiator(double dblVal) Create a newDigitalDifferentiator
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:
-