Performs frequency domain integration.
FINTEG(series, n, fc)
series |
- |
A series or table, the data to integrate. |
n |
- |
Optional. An integer, the integration order. Defaults to 1, first order integration. |
fc |
- |
Optional. A real, the high pass cutoff frequency. Defaults to |
A series or array.
W1: gnorm(1000, 1)
W2: integ(w1)
W3: finteg(w1)
W2 contains a standard time domain integration of W1. W3 contains the integration as performed in the frequency domain.
W1: gnorm(10000, 1/1000);setvunits("G")
W2: finteg(W1, 2, 5)
W1 contains data sampled at 1000 Hz. W2 high pass filters the data with a cutoff frequency of 5 Hz and double integrates the result.
n = 1000;
x = extract(linspace(0, 2*pi, n), 1, n-1);
W1: -sin(x + 2*cos(3*x)) * (1-6*sin(3*x))
W2: cos(x + 2*cos(3*x))
W3: finteg(W1)
W4: abs(W2 - W3)
W1 contains 999 samples of the periodic function:
W2 contains the analytic integral of W1
W3 computes the frequency domain integration and W4 displays the difference between the analytic and calculated. In this case, the difference is negligible.
FINTEG performs integration in the frequency domain using the following Fourier transform relation:
where X(f) is the Fourier transfrom of the time domain series and f is the frequency range of the transform.
X[1] is set to 0 to de-mean the result. The integration calculation is transformed back into the time domain.
This method performs a de-meaned integration where the DC offsets of the input and output series are removed.
To view the result in the frequency domain, try:
spectrum(finteg(s))
finteg(s, n) computes the nth order integration with:
X(f) / (i 2πf )^{n}
If fc >= 0, the input data is high passed filtered. The filter is implemented by zeroing out the frequency domain components of the series <= fc. See ZHPFILT for more details.
See INTEG for a time-domain implementation of integration using Simpson’s rule.
See FDERIV for an implementation of a frequency domain derivative.