
A Fourier Dot Product Analog Circuit
Artificial Intelligence and Machine Learning rely on matrix multiplication for their operation. Using analog multiplication and Fourier mathematics, I invented a novel circuit that reduces the number of steps required, the number of transistors, and power to compute a dot product, the building block of matrix multiplication. For two N-length vectors, the circuit reduces the N digital multiplies to an analog multiply and integration. Based on Fourier series, I observed that the product of two sine series, with frequencies at integer multiples, when integrated, will produce a dot product of their respective coefficients.

A Fourier Dot Product
Through experimentation on Desmos, I learned that two sine series, f1(x) and f2(x), when multiplied to produce f3(x) and integrated over the period of the lowest frequency component of the sine series produces the dot product of the coefficients of the sine series.

An Analog Multiplier
I found an initial suitable voltage multiplier for my dot product circuit during my literature review. It is a modified Gilbert Cell - a typical voltage multiplier. I built this circuit in LT spice and simulated its linear response to input voltages. I used TSMC 180nm transistors, the process node used by the WPI ICAS lab.

Finding the Surface of Best Fit
Using the data collected from the LT Spice simulation of the multiplier circuit, I generated a surface of best fit. The resulting equation was:
zs(x, y) = 0.032x^2 + 0.24y^2 + 0.86xy

Comparing Neural Networks
I performed sensitivity tests on two neural networks, one built with 'linear' multiplication (z = xy), and one built with 'non-linear' multiplication (zs(x,y)). The Nonlinear Neural Network has similar performance to the linear model which demonstrates the feasibility of my circuit.

Matlab - Simulink Simulator
I coded two simulations of the circuit, one in Simulink, shown above, and a more advanced version in Matlab. These simulations allowed me to analyze the signals produced at each stage of the circuit.

Circuit Block Diagram
The circuit operation is shown above in five stages. First the digital signals must be converted to analog with Digital to Analog Converters (DACs). For every input vector dimension, a sine wave of an integer multiple frequency is generated in the second stage. The component stage applies the vector components to the corresponding sine waves and sums the sine series. An analog multiplier and integrator produce the dot product and an amplifier scales the output. All components in the circuit can be implemented with analog components with much fewer transistors than their digital equivalents. For more details see the paper linked at the top of the page.
