Sign in

username:

password:



Not a member?

Search Online Books



Search tips

Free Online Books

Sponsor

Industry's highest performing at the lowest power DSPs now as low as $5.00*
Start development today!
*volume pricing for 10ku

Chapters

See Also

Embedded SystemsFPGAElectronics
Chapter Contents:

Search Introduction to Digital Filters

  

Book Index | Global Index


Would you like to be notified by email when Julius Orion Smith III publishes a new entry into his blog?

  

Phase Response

The phase of the frequency response is called the phase response. Like the phase of any complex number, it is given by the arctangent of the imaginary part of $ H(e^{j\omega T})$ divided by its real part, and it specifies the delay of the filter at each frequency. The phase response is a good way to look at short filter delays which are not directly perceivable as causing an ``echo''.4.4 For longer delays in audio, it is usually best to study the filter impulse response, which is output of the filter when its input is $ [1,0,0,0,\ldots]$ (an ``impulse''). We will show later that the impulse response is also given by the inverse z transform of the filter transfer function (or, equivalently, the inverse Fourier transform of the filter frequency response).

In this example, the phase response is

$\displaystyle \angle{H(e^{j\omega T})} = \angle \left(1 + g_1 e^{-jM_1\omega T}\right)
- \angle \left ( 1 + g_2 e^{-jM_2\omega T} \right).
$

A specific case is plotted in Fig.3.10b, corresponding to the amplitude response in Fig.3.10a. The impulse response is plotted in Fig.3.8. The matlab code for producing these figures is shown in Fig.3.11. (The plotting utility plotfr is given in §J.4.) In Octave or the Matlab Signal Processing Toolbox, a figure similar to Fig.3.10 can be produced by typing simply freqz(B,A,Nspec).

Figure 3.11: Matlab script for computing and displaying the frequency response of the example filter $ y(n) = x(n) + 0.5^3 x(n-3) - 0.9^5 y(n-5)$.

 
% efr.m - frequency response computation in Matlab/Octave

% Example filter:
g1 = 0.5^3; B = [1 0 0 g1];      % Feedforward coeffs
g2 = 0.9^5; A = [1 0 0 0 0 g2];  % Feedback coefficients

Nfft = 1024;         % FFT size
Nspec = 1+Nfft/2;    % Show only positive frequencies
f=[0:Nspec-1]/Nfft;  % Frequency axis
Xnum = fft(B,Nfft);  % Frequency response of FIR part
Xden = fft(A,Nfft);  % Frequency response, feedback part
X = Xnum ./ Xden;    % Should check for divide by zero!

clf; figure(1);      % Matlab-compatible plot
plotfr(X(1:Nspec),f);% Plot frequency response
cmd = 'print -deps ../eps/efr.eps'; disp(cmd); eval(cmd);


Previous: Amplitude Response
Next: Pole-Zero Analysis

Order a Hardcopy of Introduction to Digital Filters


About the Author: Julius Orion Smith III
Julius Smith's background is in electrical engineering (BS Rice 1975, PhD Stanford 1983). He is presently Professor of Music and Associate Professor (by courtesy) of Electrical Engineering at Stanford's Center for Computer Research in Music and Acoustics (CCRMA), teaching courses and pursuing research related to signal processing applied to music and audio systems. See http://ccrma.stanford.edu/~jos/ for details.


Comments


No comments yet for this page


Add a Comment
You need to login before you can post a comment (best way to prevent spam). ( Not a member? )