Be the first to rate this file! 28 downloads (last 30 days) File Size: 352.22 KB File ID: #24331

PlotFilter / Filter Coefficient Files

by Peter Kabal

 

02 Jun 2009 (Updated 19 Jun 2009)

Code covered by the BSD License  

PlotFilter plots filter responses. Filter files include ITU-T filters & QMF filters.

Download Now | Watch this File

File Information
Description

PlotFilter
This program plots filter responses. The program takes as input a filter specification in [b,a] (numerator, denominator polynomials) form. It offers a number of different types of frequency response plots.
• log: Log amplitude plot with a limited dynamic range.
• log-radian: Log plot as above, with frequency axis labeled with normalized radian frequency.
• linear: Linear amplitude response.
• linear-radian: Linear plot as above, with the frequency axis labeled with normalized radian frequency.
• real: Linear plot of the real part of the response. The frequency response is decomposed into the product of a phase factor (the phase can be non-linear) and a real factor. The real factor (can be both positive and negative) is plotted.
• real-radian: Linear plot of the real part, with the frequency axis labeled with normalized radian frequency.
• phase: Plot of the unwrapped phase factor. This is the phase factor that accompanies the real factor (see above).
• phase-radian: Plot of the phase factor, with the frequency axis labeled in normalized radian frequency.
• delay: Plot of the group delay (derivative of the phase response).
• delay-radian: Plot of the group delay, with the frequency axis labeled in normalized radian frequency.

Features
• The frequency response is first calculated on a dense frequency grid. The frequency evaluation points are readjusted to coincide more closely with the local extrema of the response. In this way, zeros and maxima of the response are better reproduced and the envelope of the frequency response is shown correctly.
• For log amplitude plots, the amplitude range is chosen so that upper limit of the range is a multiple of 10 or 20 dB. The dynamic range is limited to be no more than 100 dB. The actual range depends on the number of filter coefficients.
• The number of plot points is reduced by eliminating points in regions in which the plot is smooth. In this way, the dense frequency grid is usually reduced to a very much smaller number of points without affecting the appearance. The critical regions of the plot are reproduced without change.
• The axis ticks are chosen using a custom algorithm which ensures that the number of labeled ticks is reasonable. An additional overlay is created so that shorter length ticks are created between the labeled ticks. In this way, we create axes with labels which are not overly crowded.
• The plots with radian labels are created by turning off normal labels and generating custom labels which include the pi designations.
Example:
  h = hamming(120);
  PlotFilter(h, 1, 'log-radian');
 
Filter Coefficient Files:
The filter files included in this package have the coefficients in ASCII. A header indicates the type of file and documents the design parameters. The routine ReadFilter reads the coefficient files and returns the filter transfer function in a form usable by PlotFilter and other Matlab filtering routines.

ITU-T Software Tools Library:
The ITU-T document “Software Tool Library” [1] has C-language routines for filtering speech and audio files. In these routines, the filter coefficients are imbedded in the code. The filter files included in this package have the coefficients extracted from the C-code. The filter files taken from the Software Tools Library have the prefix STL.

TIA Speech Coder Filter Files:
This package also includes filters used by the TIA in their speech coding standards. These filters have the prefix TIA and the name of the standard in the coefficient file name.

Quadrature Mirror Filters:
The Johnston Quadrature Mirror Filters [2] are included in this package. The notation for the filter coefficient files follows that in the original paper, e.g. QMF_16B.cof is a 16 coefficient QMF filter with transition band of type B.

Example:
  [b, a] = ReadFilter('Filters/STL/STL_G712_IIR_16k.cof');
  Fs = 16000;
  PlotFilter (b, a, Fs);

References:
1. ITU-T, “Software Tool Library for Speech and Audio Coding Standardization”, Recommendation G.191, Sept. 2005 (on-line at http://www.itu.int/rec/T-REC-g)
2. J. D. Johnston, “A Filter Family Designed for Use in Quadrature Mirror Filter Banks”, Proc. IEEE Int. Conf. Acoustics, Speech, Signal Processing (Denver, CO), pp. 291–294, April 1980.

MATLAB release MATLAB 7.8 (R2009a)
Other requirements Group delay plots require the signal processing toolbox
Zip File Content  
Other Files
Filter/Documentation/PlotFilter.pdf,
Filter/Filter Files/QMF/QMF_12A.cof,
Filter/Filter Files/QMF/QMF_12B.cof,
Filter/Filter Files/QMF/QMF_16A.cof,
Filter/Filter Files/QMF/QMF_16B.cof,
Filter/Filter Files/QMF/QMF_16C.cof,
Filter/Filter Files/QMF/QMF_24B.cof,
Filter/Filter Files/QMF/QMF_24C.cof,
Filter/Filter Files/QMF/QMF_24D.cof,
Filter/Filter Files/QMF/QMF_32C.cof,
Filter/Filter Files/QMF/QMF_32D.cof,
Filter/Filter Files/QMF/QMF_32E.cof,
Filter/Filter Files/QMF/QMF_48C.cof,
Filter/Filter Files/QMF/QMF_48D.cof,
Filter/Filter Files/QMF/QMF_48E.cof,
Filter/Filter Files/QMF/QMF_64D.cof,
Filter/Filter Files/QMF/QMF_64E.cof,
Filter/Filter Files/QMF/QMF_8A.cof,
Filter/Filter Files/STL/STL_BPF100x5k_FIR_16k.cof,
Filter/Filter Files/STL/STL_BPF50x14k_FIR_32k.cof,
Filter/Filter Files/STL/STL_BPF50x5k_FIR_16k.cof,
Filter/Filter Files/STL/STL_BPF_FIR_16k.cof,
Filter/Filter Files/STL/STL_dc_IIR_8k.cof,
Filter/Filter Files/STL/STL_dsm_FIR_16k.cof,
Filter/Filter Files/STL/STL_G712_IIR_16k.cof,
Filter/Filter Files/STL/STL_G712_IIR_8k.cof,
Filter/Filter Files/STL/STL_hIRS_FIR_16k.cof,
Filter/Filter Files/STL/STL_IRS_FIR_16k.cof,
Filter/Filter Files/STL/STL_IRS_FIR_8k.cof,
Filter/Filter Files/STL/STL_IRS_IIR_8k.cof,
Filter/Filter Files/STL/STL_LP10k_FIR_48k.cof,
Filter/Filter Files/STL/STL_LP3p5k_FIR_48k.cof,
Filter/Filter Files/STL/STL_LP7k_FIR_48k.cof,
Filter/Filter Files/STL/STL_LPx2_FIR.cof,
Filter/Filter Files/STL/STL_LPx3_FIR.cof,
Filter/Filter Files/STL/STL_LPx3_IIR.cof,
Filter/Filter Files/STL/STL_mIRSR_FIR_16k.cof,
Filter/Filter Files/STL/STL_mIRSR_FIR_8k.cof,
Filter/Filter Files/STL/STL_mIRSS_FIR_16k.cof,
Filter/Filter Files/STL/STL_mIRSS_FIR_48k.cof,
Filter/Filter Files/STL/STL_MSin_FIR_16k.cof,
Filter/Filter Files/STL/STL_P341S_FIR_16k.cof,
Filter/Filter Files/STL/STL_pso_FIR_8k.cof,
Filter/Filter Files/TIA/TIA-IS-127-HP-8k.cof,
Filter/Filter Files/TIA/TIA-IS-641-HP-8k.cof,
Filter/Filter Files/TIA/TIA_IRS_FIR_8k.cof,
Filter/PlotFilter.m,
Filter/private/AdjustFreq.m,
Filter/private/BlankAxes.m,
Filter/private/GenTicks.m,
Filter/private/MidTick.m,
Filter/private/SetAxisTicks.m,
Filter/private/SetXTickLabel.m,
Filter/private/SetYTickLabel.m,
Filter/private/SFdataXpt.m,
Filter/private/SymbolLabels.m,
Filter/private/Xaxis.m,
Filter/private/XYmerge.m,
Filter/ReadFilter.m,
Filter/test/TestPlotFilter.m,
license.txt
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
19 Jun 2009

Update to BSD License. Missing filter files included.

19 Jun 2009

Filter coefficient files included

Tag Activity for this File
Tag Applied By Date/Time
filter coefficients Peter Kabal 02 Jun 2009 13:09:39
filter response Peter Kabal 02 Jun 2009 13:09:40
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com