Fourier Transform and Matrix-vector Multiplication
K. R. Rao and P. Yip, Discrete cosine transform: algorithms, advantages, applications.
We will start by recalling the definition of the Fourier transform. Given a function x(t) for , its Fourier transform is given by
,
subject to the usual existence conditions for the integral. Here, , is the radian frequency and is the frequency in Hertz. The function x(t) can be recovered by the inverse Fourier transform, i.e.,
If x(t) is defined only for , we can construct a function y(t) given by:
Then
We can now define this as the Fourier cosine transform (FCT) of x(t) given by
Noting that is an even function of , we can apply the Fourier inversion to to obtain
The convolution property: Recall that the convolution of two functions x(t) and y(t) is given by
The Fourier cosine transform of x*y is given by
where denotes the Fourier sine transform (FST) given by
has a kernel given by
Let and be the sampled angular frequency and time, where and represent the unit sample intervals for frequency and time, respectively; m and n are integers.
If we further let where N is an integer, we have
which represents a discretized Fourier cosine kernel. But, it is far simpler, both mathematically and conceptually, to regard the discrete kernel as elements in an (N + 1) by (N + 1) transform matrix. Let his matrix be denoted by [M]. Then, the mnth element of this matrix is
When [M] is applied to a column vector , we obtain the vector
such that
where
DCT-II:
where
Fourier cosine transform (FCT) of x(t) given by
DCT-II Forward:
where
DCT-II Inverse:
where
Signal flow graph for DCT-II, N=8.
Discrete Fourier Transform (DFT) converts the sampled signal or function from its original domain (order of time or position) to the frequency domain. It is regarded as the most important discrete transform and used to perform Fourier analysis in many practical applications including mathematics, digital signal processing and image processing.
Discrete cosine transform(DCT) is a Fourier-related transform similar to DFT, but using only real numbers. Comparing to DFT, DCT has two strong advantages: first, it is much easier to compute, second and more important, it has nice energy compaction.
MATLAB function dctmtx generates DCT matrix – conductance:
https://www.mathworks.com/help/images/ref/dctmtx.html
Accelerating Discrete Fourier Transforms with dot-product engine
Fig. 1
Fig. 2
MATLAB dctmtx generates the DCT matrix. Map DCT matrix to conductance, i.e., output of MATLAB function ‘dctmtx’ equal/similar to DCT matrix in Fig. 2.
Convolution can be converted to matrix multiplications, for example, DCT.