Mathematically expressing FFT and STFT operations on a matrix

32 Views Asked by At

I have a matrix $q(m,n)$, where $m$ represents the vertical direction and $n$ is the horizontal direction. I need to perform the following three operations:

  1. take FFT of matrix $q$ in the vertical direction,
  2. take STFT of the output of the FFT performed in step 1 in the horizontal direction,
  3. For each STFT output, sum the output of STFT in the vertical direction.

I have implemented the above three steps in Matlab. I am trying to mathematically express these steps. Kindly check if I am mathematically presenting it in the correct way. Kindly suggest if the expressions really explain the aforementioned operation.

Approach 1

  1. $Q_n(k) = \sum_{m=0}^{M-1} q_n(m)e^{-j2\pi \frac{k}{M}m}$ for $0\le n \le N-1$, where n is the columns of matrix $q$. The output of this FFT operation is arranged as $Q(k, n)$, where $k$ stands for the NFFT bins.

  2. $P_{k}(z,l) = \sum_{n=0}^{N-1} w(n)Q_k(n+lH)e^{-j2\pi\frac{z}{N}n}$ for $0\le k \le K-1$. I take STFT on each row of $Q(k, n)$. The output is arranged as 3-dimensional, such as $P(k,z,l)$.

  3. $P(l,z) = \sum_{k=0}^{K-1} P_k(z,l) $

Approach 2

  1. $Q(k,n) = \sum_{m=0}^{M-1} q_n(m, n)e^{-j2\pi \frac{k}{M}m}$ for $0\le n \le N-1$, where n is the columns of matrix $q$.

  2. $P(k,z,l) = \sum_{n=0}^{N-1} w(n)Q_k(n+lH)e^{-j2\pi\frac{z}{N}n}$ for $0\le k \le K-1$. I take STFT on each row of $Q(k, n)$.

  3. $P(l,z) = \sum_{k=0}^{K-1} P_k(z,l) $