Efficient Integer Sequence Convolution Without Direct FFT
Efficient Integer Sequence Convolution Without Direct FFT
Fast convolution of integer sequences is a critical operation in many domains, including signal processing, data analysis, and cryptography. Traditionally, Fast Fourier Transform (FFT) has been a popular choice for implementing convolution. However, in the mid-1960s, before the Cooley-Tukey FFT algorithm was widely known, an innovative approach was taken to perform convolution without explicit FFT transformations. This article explores the method developed by a pioneering engineer, focusing on techniques for efficient integer sequence convolution using solely addition and subtraction operations.
The Algorithm Overview
The engineer described a method that was both effective and efficient, involving manual 'compilation' of a reference signal into a series of machine-level instructions. The algorithm avoided explicit multiplication by leveraging precomputed sums and then applying additional operations to achieve the desired result.
Correlation vs. Convolution
It's important to note that the engineer was dealing with correlation operations, which is essentially a convolution in reverse. The convolution of two signals f(n) and g(n) is defined as:
[ (textit{f} ast textit{g})(n) sum_{m} textit{f}(m) textit{g}(n - m) ]And the correlation is:
[ (textit{f} circ textit{g})(n) sum_{m} textit{f}(n - m) textit{g}(m) ]The engineer's method can be adapted to handle convolutions as well, by reversing the reference signal.
Implementation Details
The system was designed to handle lengthy sequences, often containing thousands of points, with data samples no more than a hundred units in magnitude. The key insight was that many points in the reference signal would have the same magnitude, allowing for optimization through precomputed sums and aggregation of terms.
Precompiled Programs for Correlation
The reference signal was compiled into a program consisting of add and subtract instructions. The number of these instructions was the length of the reference signal plus 100. Each run of this program generated one point of the correlation.
Optimization Through Aggregation
For a given point in the correlation, the engineer added all signal points that would be multiplied by the same magnitude from the reference signal in a single operation. This was achieved through successive machine instructions, where each add or subtract instruction included a fixed address offset relative to a variable base address held in a register.
Efficient Accumulation of Results
The core of the algorithm involved using two accumulators, accumulator-1 and accumulator-2. The signal points to be multiplied by the largest multiplier were loaded into accumulator-1. Then, the sum of these points was added to accumulator-2. This process was repeated for the next smaller multipliers without clearing the results in accumulator-1. After processing the multipliers, the final sum was added to accumulator-2, ensuring that each signal point was added the necessary number of times.
Adaptation to FFT-free Convolution
While the described method focuses on correlation, it can be adapted to handle convolutions. To do this, the reference signal is simply reversed, making the correlation equivalent to a convolution. This property allows the engineer's method to be directly applied to convolution problems.
End Effects Management
Dealing with end effects, which occur when the signal borders reach the edges of the data, required additional considerations. These were managed through careful programming of the top-level Fortran program that handled the data and invoked the high-level instructions.
The IBM 7070 System
The implementation was carried out on an IBM 7070 computer system, a mainframe that was quite advanced for its time. The system's architecture allowed for such detailed optimization at the machine-language level, making the algorithm both feasible and efficient.
Conclusion
This method of performing integer sequence convolution without explicit FFT transformations demonstrates the power of leveraging precomputed sums and aggregation in machine-level programming. By avoiding multiplication and minimizing the use of register operations, the algorithm offers a fast and effective way to handle large-scale data processing tasks.
For those interested in optimizing integer sequence convolution or exploring alternative methods to FFT, the principles described in this article provide valuable insights. Whether implemented in modern programming languages or as a theoretical reference, the method discussed here has significant historical and practical value in the field of signal processing and data analysis.