0

I have managed to implement both forward and inverse FFT transforms in C#. And, i tested them by taking signal both ways and got the real part after iFFT equals the original signal.

Now , I have taken the same signal in frequency domain and changed both magnitude spectrum as well as phase. Then, i have taken the complex number of both outputs to iFFT.

The complex number I got now, has values on the imaginary part(no longer zeros as the original signal case).

How i can rebuild time signal from this IFFT complex output?

Thanks,

  • The complex output is the time series. Real-Valued signals have conjugate symmetric FTs. I'm guessing that when you changed the magnitude and phase of the spectrum, you did not do so symmetrically. – AnonSubmitter85 Feb 03 '16 at 17:29
  • Thanks for your answer. I appreciate if you can elaborate more on what do you mean by changing magnitude and spectrum symmetrically? what i did in frequency domain, was just changing magnitude and phase using all number of bins. I am working with 1799 samples as input for FFT which output in frequency domain as 2048 samples. Thanks in advance. – M.Dawood Feb 03 '16 at 19:16
  • Also one more thing, when we change magnitude and phase in frequency domain, are we expecting to have the imaginary part after iFFT is populated with values rather than zero? – M.Dawood Feb 03 '16 at 19:20

1 Answers1

1

The DFT $X[k]$ of a real-valued signal $x[n]$ satisfies

$$X[k]=X^*[N-k]\tag{1}$$

where $N$ is the DFT length and $*$ denotes complex conjugation. When you modify $X[k]$ you must make sure that the modified DFT also satisfies $(1)$, otherwise your time domain sequence will be complex-valued, which probably does not make sense for your application.

Matt L.
  • 10,636
  • Thanks for your answer. Still did get the point. IN frequency domain we normally do modifications for both magnitude and phase (applied to the total length of the DFT). then we use the formula: Z = r(cos(phase)+isin(phase) to build the complex number to be the input for the iDFT. So in this implemented way, how i can satisfy above equation? – M.Dawood Feb 04 '16 at 08:44
  • @M.Dawood: For real-valued signals the upper half of the DFT coefficients are redundant, so you only modify the lower half and extend the upper half such that Eq. $(1)$ is satisfied. – Matt L. Feb 04 '16 at 08:46
  • Thanks so much. Got it cleared. – M.Dawood Feb 04 '16 at 08:54