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)
.
gov.sns.tools.dsp.LtiDigitalFilter
Constructor and Description |
---|
DigitalDifferentiator()
Create a new
DigitalDifferentiator object
with zero initial response. |
DigitalDifferentiator(double dblVal)
Create a new
DigitalDifferentiator object
with the given initial response. |
Modifier and Type | Method and Description |
---|---|
void |
setInitialResponse(double dblVal)
Set the initial response of the differentiator to the
given value.
|
getInputCoefficient, getInputCoefficient, getOutputCoefficient, getOutputCoefficient, setInputCoefficient, setInputCoefficients, setOutputCoefficient, setOutputCoefficients, toString, transferFunction
getCoefficientCount, getOrder, getTimeIndex, reset, response, response
public DigitalDifferentiator()
DigitalDifferentiator
object
with zero initial response.setInitialResponse(double)
public DigitalDifferentiator(double dblVal)
DigitalDifferentiator
object
with the given initial response.dblVal
- initial response of the differentiatorpublic void setInitialResponse(double dblVal)
dblVal
- initial response of the differentiatorAbstractDigitalFilter.reset()