i have a question regarding phase randomisation and its effect on the signal. i took the fft of a sound file. to its phase part i added a random phase. and from the magnitude part i subtracted the magnitude of the spectrum of noise which in magnitude was very less compared to the original sound (simple spectral subtraction). i then reconstructed the sound file thus edited by taking ifft. all this processing was done in matlab. now after taking ifft i was expecting a real signal which i should ideally get. but i am getting a complex signal. please explain this irregularity to me. thanks
phase addition to spectrum of signals and reconstruction
Started by ●June 21, 2005
Reply by ●June 21, 20052005-06-21
in article 1119355225.421761.167410@o13g2000cwo.googlegroups.com, adj at arshdeepjindal@gmail.com wrote on 06/21/2005 08:00:> i have a question regarding phase randomisation and its effect on the > signal. i took the fft of a sound file. to its phase part i added a > random phase.if your input signal was real, the phase in the FFT was odd-symmetric about 0 (or about N/2). if the random phase you added was not also odd-symmetric, then you break that property and that will be the FFT of a not entirely real signal.> and from the magnitude part i subtracted the magnitude of > the spectrum of noise which in magnitude was very less compared to the > original sound (simple spectral subtraction). i then reconstructed the > sound file thus edited by taking ifft. all this processing was done in > matlab. now after taking ifft i was expecting a real signal which i > should ideally get. but i am getting a complex signal. please explain > this irregularity to me. thanksmake sure the real part (or magnitude) is even symmetry and the imag part (or phase) is odd symmetry. then you'll get a real result. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by ●June 21, 20052005-06-21
please could you explain in a little more detail. i would very much appreciate it. also could you tell me some sources where i can read more on even symmetry and odd symmetry of magnitude and phase parts. thank you very much in advance.
Reply by ●June 22, 20052005-06-22
Hi, I would recommend using a real FFT ( an FFT, which is designed for real input data ). Its IFFT assumes the right symmetry properties by default, so you will get real output data from it, whatever you do with the Fourier spectrum ;-) And as a side effect, the Real FFT will be faster than the usual complex FFT. Unfortunately I don't know if there is any Matlab code around ( well, it surely is, but I don't know where to find it.) Maybe you can write a wrapper for the C++ code from Laurent de Soras' webpage: http://ldesoras.free.fr/prod.html ( look for FFTReal ). Good luck! Karin ps: of course this is not an explanation of the irregularity you found - maybe you try a Google search on the keywords r b-j was using in his email ;-)
Reply by ●June 22, 20052005-06-22
Hi, I would recommend using a real FFT ( an FFT, which is designed for real input data ). Its IFFT assumes the right symmetry properties by default, so you will get real output data from it, whatever you do with the Fourierspectrum ;-) And as a side effect, the Real FFT will be faster than the usual complex FFT. Unfortunately I don't know if there is any Matlab code around ( well, it surely is, but I don't know where to find it.) Maybe you can write a wrapper for the C++ code from Laurent de Soras' webpage: http://ldesoras.free.fr/prod.html ( look for FFTReal ). Good luck! Karin ps: of course this is not an explanation of the irregularity you found - maybe you try a Google search on the keywords r b-j was using in his email ;-)
Reply by ●June 22, 20052005-06-22
adj wrote:> please could you explain in a little more detail. i would very much > appreciate it. also could you tell me some sources where i can read > more on even symmetry and odd symmetry of magnitude and phase parts. > thank you very much in advance.Try to look for a chapter named "Properties of the Fourier Transform" in whatever textbook on DSP you have available. Rune
Reply by ●June 22, 20052005-06-22
Reply by ●June 27, 20052005-06-27
adj wrote:> please could you explain in a little more detail. i would very much > appreciate it. also could you tell me some sources where i can read > more on even symmetry and odd symmetry of magnitude and phase parts. > thank you very much in advance.Your original signal was real, and its FFT was the Fourier transform of a real signal. The noise you added was not the FT of real noise, so the sum of the two FTs is not the FT of a real signal. To add random noise to a real signal and be sure that the result is real, either do it in the time domain, or add the FT of real time-domain noise to the FT of the signal. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������