Package xal.tools.dsp
Class DigitalIntegrator
java.lang.Object
xal.tools.dsp.AbstractDigitalFilter
xal.tools.dsp.LtiDigitalFilter
xal.tools.dsp.DigitalIntegrator
Convenience class implementing a simple 1st order digital
integrator. The response yn of this filter to an input
xn is given by
yn = yn-1 +
xn
Thus, the transfer function H(z) is given by
H(z) = 1/(1 - z-1)
where z is the Z-transform variable. Note that the integrator is
unstable for zero frequency corresponding to z = 1, which is
expected for integration.
The integrator is initialized so that the constant of integration
(y-1) is zero. This value may be changed with a call to
setConstantOfIntegration(double)
.
- Author:
- Christopher K. Allen
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a newDigitalIntegrator
object with zero constant of integration.DigitalIntegrator
(double dblConst) Create a newDigitalIntegrator
object with the given constant of integration. -
Method Summary
Modifier and TypeMethodDescriptionvoid
setConstantOfIntegration
(double dblConst) Sets the constant of integration equal 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
-
DigitalIntegrator
public DigitalIntegrator()Create a newDigitalIntegrator
object with zero constant of integration. -
DigitalIntegrator
public DigitalIntegrator(double dblConst) Create a newDigitalIntegrator
object with the given constant of integration.- Parameters:
dblConst
- constant of integration- See Also:
-
-
Method Details
-
setConstantOfIntegration
public void setConstantOfIntegration(double dblConst) Sets the constant of integration equal to the given value. Note also that the filter is reset.- Parameters:
dblConst
- constant of integration- See Also:
-