Convolution is the computational equivalent of ordinary linear differential operators (with constant coefficients). Applications are vast and end effects are important. Another choice of data handling at ends is that zero data not be assumed beyond the interval where the data is given. This is important in data where the crosscorrelation changes with time. Then it is sometimes handled as constant in short time windows. Care must be taken that zero signal values not be presumed off the ends of those short time windows; otherwise, the many ends of the many short segments can overwhelm the results.
In the sets (4) and (5), the top two equations explicitly assume that the input data vanishes before the interval on which it is given, and likewise at the bottom. Abandoning the top two and bottom two equations in (5) we get:
![]() |
(8) |
![]() |
(9) |
In practice we typically allocate equal space for input and output.
Because the output is shorter than the input,
it could slide around in its allocated space,
so its location is specified by an additional parameter called its lag.
The statement x=y-b+lag in module
icaf1
says that the
output time y aligns with the
input time x for the filter point b=lag.
module icaf1 { # Internal Convolution, Adjoint is Filter. 1-D
integer :: lag
real, dimension (:), pointer :: xx
#% _init ( xx, lag)
#% _lop ( bb, yy)
integer x, b, y
do b= 1, size(bb) {
do y= 1+size(bb)-lag, size(yy)-lag+1 { x= y - b + lag
if( adj)
bb(b) = bb(b) + yy(y) * xx(x)
else
yy(y) = yy(y) + bb(b) * xx(x)
}
}
}
The value of lag always used in this book is lag=1. For lag=1 the module icaf1 implements not equation (8) but (10):
![]() |
(10) |
The end effects of the convolution modules are summarized in Figure 2.
conv90
Figure 2 Example of convolution end-effects. From top to bottom: input; filter; output of tcai1(); output of icaf1() also with (lag=1). | ![]() |