public class DigitalIntegrator extends LtiDigitalFilter
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)
.
gov.sns.tools.dsp.LtiDigitalFilter
Constructor and Description |
---|
DigitalIntegrator()
Create a new
DigitalIntegrator object with
zero constant of integration. |
DigitalIntegrator(double dblConst)
Create a new
DigitalIntegrator object with the
given constant of integration. |
Modifier and Type | Method and Description |
---|---|
void |
setConstantOfIntegration(double dblConst)
Sets the constant of integration equal to the given
value.
|
getInputCoefficient, getInputCoefficient, getOutputCoefficient, getOutputCoefficient, setInputCoefficient, setInputCoefficients, setOutputCoefficient, setOutputCoefficients, toString, transferFunction
getCoefficientCount, getOrder, getTimeIndex, reset, response, response
public DigitalIntegrator()
DigitalIntegrator
object with
zero constant of integration.public DigitalIntegrator(double dblConst)
DigitalIntegrator
object with the
given constant of integration.dblConst
- constant of integrationsetConstantOfIntegration(double)
public void setConstantOfIntegration(double dblConst)
dblConst
- constant of integrationAbstractDigitalFilter.reset()