Re: dft : property of symmetry for real & even seq



On Mar 10, 8:22 pm, "Steven G. Johnson" <stev...@xxxxxxxxxxxx> wrote:
I think that the real answer to your question is that, if you know a
priori that your data has (or should have) real-even symmetry, then
you should use a discrete cosine transform (DCT).  In particular, the
symmetry that you have been assuming in your posts is *exactly*
equivalent to using a type-I DCT.  See, e.g.:

http://en.wikipedia.org/wiki/Discrete_cosine_transform

Not only do you save a factor of ~4 in time and memory by using a DCT,
but it also enforces the boundary conditions so that you can't
accidentally screw them up e.g. by zero padding.

Most signals in DSP work probably don't have real-even symmetry, which
is why people normally have a complex-output DFT (even if they have
real inputs).  When DSP people have (or want) real-even symmetry, I
think they normally switch to a DCT (e.g. as in JPEG, MP3, etcetera).

However, it is good to understand the symmetry in the DFT first, as in
the preceding posts, before you go to a DCT (equivalent to an
optimization for a special case of the DFT inputs).

Steven

Thank you sir,

final question sir:

the relationship between the two as described below is correct?????

Real DFT:
Converts N samples to two sets of N/2 + 1 samples (ImX[] and ReX[]
according to the text book). These are not really complex numbers but
are the amplitudes of the basis functions (cosine and sine waves) that
can be combined to make up the time domain signal. Since they are the
amplitudes of cosine and sine basis functions they can be treated as
the real and imaginary parts of complex numbers through substitution.
One purpose of doing this is to convert them into polar form by
creating N/2 + 1 size magnitude and phase vectors RMagX[] RPhaseX[]
from the complex numbers, giving the magnitude and phase of the
frequency response.

If converting to polar form, the values for RMagX and RPhaseX give the
magnitude and phase from k = 0 (DC) to k = fs/2.


Complex DFT:
Converts N complex number samples in the “time domain” into N complex
number samples in the frequency domain. This includes the negative
frequencies from –fs/2 to 0 which are generally a duplicate of the
positive frequencies (as I understand it when the time domain samples
are purely real then the negative frequencies mirror the positive
ones).

The values can be represented in polar form CMagX, CPhaseX both N
samples in size.

The relationship between the real DFT polar form and the complex DFT
polar form, is that the first N/2 samples of CMagX and RMagX would be
the same (possibly with scaling differences), and the first N/2
samples of CPhaseX and RPhaseX would also be the same. This comes from
the fact that the real DFT “assumes” a mirrored set of negative
frequencies due to the fact that the real DFT only ever transforms
real time domain signals and never complex ones (thus producing
mirrored negative frequencies).

If this is correct and I have the samples for a “Real DFT” in the
frequency domain, I could create the “Complex DFT" samples in the
frequency domain by simply mirroring the values for RMagX and RPhaseX
in the range 0 to N/2 into the range N/2 + 1 N for CMagX and CPhaseX.
Is this correct?

Finally as a last question, do people generally use the real DFT or
the complex DFT for most of their DSP work? What sorts of applications
would you choose to use each of these for?


Thank you.
.



Relevant Pages

  • Re: Why window in time domain before FFT?
    ... alledged *inherent* periodic nature of the DFT (which is what the FFT ... DTFT is sampled at N equal frequencies from -Nyquist to +Nyquist, ... FFTs of these signals will produce the ...
    (comp.dsp)
  • Re: Query DCT and DFT
    ... So to compute the fourier series, ... For DFT, ... For DCT, the sequence is mirrored and then ... applications) or of type-I corresponds to even boundary conditions at ...
    (sci.image.processing)
  • Re: DFT und DCT
    ... Wie die DFT und die DCT berechnet werden, ... DFT: Weshalb wird eigentlich eine komplexe Basis verwendet (an Stelle ... um ein Signal aus Zeit-/Raumbereich in den Frequenzbereich ... Wie entscheidet man, welche Transformation man braucht? ...
    (de.sci.mathematik)
  • Discret fourier transform help needed
    ... a simple DFT for testing, but will code it as a FFT ... The magnitude of the frequencies: ... But the magnitude changes whenever I change the FFT ... I have compared it's output to a comparable FFT I made in maple ...
    (sci.math)
  • Re: Spectra of Unequally Sampled Data
    ... Automatic Spectra Analysis and the ARMASA toolbox. ... % Compute DFT at frequencies given ... give the same coefficients at usual DFT frequencies as the usual DFT ... at the uniformly spaced frequencies that the conventional DFT ...
    (comp.soft-sys.matlab)

Loading