Tag Info

4

If you look at the questions dealing with the other side (Convolution on time domain and element wise multiplication of frequency domain) you'd see that in order to have proper equality one must pay attention to the borders and type of convolution. For example, have a look at Applying a 2D Convolution Using 2D FFT which aggregates many other answers. ...

3

My code is wrong Even without assuming that the code's behavior is wrong, for long-term maintainability it has its problems. You'd do much better to structure your code such that you have a data type defined that describes a 2nd-order filter (in C or C++ it would be a struct or class), and a data type that describes a filter's state (in C or C++ it could be ...

3

c) My code is wrong That one. You have your difference equations backwards. It should be $$y[n] = x[n] + 2x[n-1] + x[n-2] - a_1y[n-1] - a_2y[n-2]$$ You have your "a" and "b" coefficient swapped. You can probably do it this way, but it feels needlessly complicated. IMO it's easier to Start with the poles of an analog prototype filter. ...

2

Is this some sort of correlation or convolution? No. For that you'd need to build products from the elements. You only do differences. It should be meaningful for calculating ifft(X), but I can't see how... I'm not immediately recognizing these terms, and the length of 5 seems very odd¹; so, this is probably an algorithmic step in a specific FFT algorithm ...

2

To help your intuition, consider a sinusoidal signal with frequency $\omega_0$ and some arbitrary but constant phase $\phi$: $$x[n]=A\sin(\omega_0n+\phi)\tag{1}$$ Delaying the signal $x[n]$ by $n_0$ samples gives \begin{align}x[n-n_0]&=A\sin\big(\omega_0(n-n_0)+\phi\big)\\&=A\sin\big(\omega_0n-\omega_0n_0+\phi\big)\\&=A\sin\big(\omega_0n+\... 1 I always thought an interesting comparison would be the autocorrelation result of the transformed signal. This goes on the assumption that the closer the resulting signal is to white noise, the better the compression is as it has effectively removed all memory (redundancy) from the signal. That said, white noise has an autocorrelation function that is an ... 1 For the complex pole pair you just need to do the multiplication in the denominator to get the coefficients:(z-z_{\infty})(z-z_{\infty}^*)=z^2-2\textrm{Re}\{z_{\infty}\}z+|z_{\infty}|^2

Only top voted, non community-wiki answers of a minimum length are eligible