Digital Signal Processing Reference
In-Depth Information
( θ)) = M 2
(M
θ)(M
Then to return to the correct magnitude, we take the square root. Thus, the entire operation (per
bin) is
(a
NewBinVal
=
+
jb)(a
jb)
3.22.2 PHASE SHIF TING
To adjust the phase of any bin to be whatever you want, simply multiply the positive frequency bins by
whatever phase angle you want to shift by, and multiply the corresponding negative frequency bins by
the complex conjugate of that phase angle.
Recall that a phase angle in degrees is specified as a complex number, such as
e j 2 π(θ/ 360 )
Let's say we wanted to shift every bin by π/ 4 radians (45 degrees); this can be done by multiplying
each positive frequency bin value by
e j 2 π( 45 / 360 )
e jπ/ 4
=
=
+
0 . 707
j 0 . 707
and each negative bin value by
e j 2 π( 45 / 360 )
= e jπ/ 4
=
0 . 707
j 0 . 707
For bin zero, it is not necessary to multiply by a phase angle, since DC has no phase. This is
automatically taken care of in the script LVxPhaseShiftViaDFT , which we'll discuss below, by specifying
the phase factor as dependent on frequency k ; hence for k = 0 the phase factor turns out to be 1.
A script designed to demonstrate this (see exercises below) is
LVxPhaseShiftViaDF T
which generates a waveform having the harmonic amplitudes of a square wave, but totally random phases
for all harmonics present. All phases are returned to zero, which produces a cusped waveform; to correct
this, the phases of all bins are then shifted 90 degrees using the same technique, which places all harmonics
in just the proper phase so the waveform appears as a square wave. The script LVxPhaseShiftViaDFT
then presents a general phase-shifting demo, in which the initial derandomized result is incrementally
shifted in phase until its phase has been shifted 90 degrees from its initial value of zero degrees for
all frequencies. Each time the derandomized waveform is phase-shifted, the Hilbert Transform of the
resultant waveform is taken and also plotted. The result is that initially, the derandomized waveform is
the cusped waveform, and its Hilbert Transform is a square wave. After phase shifting by 90 degrees, the
cusped waveform becomes a square wave, while its Hilbert transform becomes a cusped waveform.
Figure 3.53 shows the initial random-phase test signal, the derandomized result (in the time
domain), and then the Hilbert Transform of that.
3.22.3 EQUALIZATION USING THE DF T
An interesting use of the DFT/IDFT is to analyze the impulse response of a system that distorts signals
and to generate an inverse or deconvolution filter to reverse the distortion induced by the system. The
 
Search WWH ::




Custom Search