DSP System Toolbox 

This example shows how to obtain designs for the most common weighting filters  Aweighting, Cweighting, Cmessage, ITUT 0.41, and ITUR 4684  using the audio weighting filter designer, fdesign.audioweighting, in the DSP System Toolbox™.
In many applications involving acoustic measurements, the final sensor is the human ear. For this reason, acoustic measurements usually attempt to describe the subjective perception of a sound by this organ. Instrumentation devices are built to provide a linear response, but the ear is a nonlinear sensor. Therefore, special filters, known as weighting filters, are used to account for the nonlinearities.
On this page… 

A and C Weighting (ANSI® S1.42 standard) 
A and C Weighting (ANSI® S1.42 standard)
You can design A and C weighting filters that follow the ANSI S1.42 [1] and IEC 616721 [2] standards. An Aweighting filter is a band pass filter designed to simulate the loudness of lowlevel tones. An Aweighting filter progressively deemphasizes frequencies below 500 Hz. A Cweighting filter removes sounds outside the audio range of 20 Hz to 20 kHz and simulates the loudness perception of highlevel tones.
The ANSI S1.42 standard requires that the filter magnitudes fall within a specified tolerance mask. The standard defines two masks, one with stricter tolerance values than the other. A filter that meets the tolerance specifications of the stricter mask is referred to as a Class 1 filter. A filter that meets the specifications of the less strict mask is referred to as a Class 2 filter. You define the type of class you want in your design by setting the Class property to 1 or 2. The choice of the Class value will not affect the filter design itself but it will be used to render the correct tolerance mask in FVTOOL.
A and Cweighting filter designs are based on direct implementation of the filter's transfer function based on poles and zeros specified in the ANSI S1.42 standard. The filters only have one design method referred to as 'ansis142'.
The following code obtains an IIR Class 1 filter design for Aweighting with a sampling rate of 48 kHz.
h = fdesign.audioweighting('WT,Class','A',1,48e3)
h = Response: 'Audio Weighting' Specification: 'WT,Class' Description: {'Weighting type, Class'} NormalizedFrequency: false Fs: 48000 WeightingType: 'A' Class: 1
Ha = design(h,'ansis142','SystemObject',true); hfvt = fvtool(Ha); legend(hfvt, 'Aweighting')
The A and C weighting standards specify tolerance magnitude values for up to 20 kHz. In the following example we use a sampling frequency of 28 kHz and design a Cweighting filter. Even though the Nyquist interval for this sampling frequency is below the maximum specified 20 kHz frequency, the design still meets the Class 2 tolerances. The design, however, does not meet Class 1 tolerances due to the small sampling frequency value.
h = fdesign.audioweighting('WT,Class','C',2,28e3); Hcclass2 = design(h,'SystemObject',true); setfilter(hfvt,Hcclass2); legend(hfvt, 'Cweighting, Class 2')
ITUR 4684 recommendation [3] was developed to better reflect the subjective loudness of all types of noise, as opposed to tones. ITUR 4684 weighting was designed to maximize its response to the types of impulsive noise often coupled into audio cables as they pass through telephone switching facilities. ITUR 4684 weighting correlates well with noise perception, since perception studies have shown that frequencies between 1 kHz and 9 kHz are more "annoying" than indicated by Aweighting.
You design a weighting filter based on the ITUR 4684 standard for a sampling frequency of 80 kHz using the following code. You can choose from frequency sampling or equiripple FIR approximations, or from a least Pnorm IIR approximation. In all cases, the filters are designed with the minimum order that meets the standard specifications (mask) for the sampling frequency at hand.
h = fdesign.audioweighting('WT','ITUR4684',80e3)
h = Response: 'Audio Weighting' Specification: 'WT' Description: {'Weighting type'} NormalizedFrequency: false Fs: 80000 WeightingType: 'ITUR4684'
Hitur1 = design(h,'allfir','SystemObject',true); setfilter(hfvt,Hitur1{1}); addfilter(hfvt,Hitur1{2}); legend(hfvt,'ITUR 4684 FIR equiripple approximation', ... 'ITUR 4684 FIR frequency sampling approximation')
Hitur2 = design(h,'iirlpnorm','SystemObject',true); setfilter(hfvt,Hitur2); legend(hfvt,'ITUR 4684 IIR least Pnorm approximation')
While IIR designs yield smaller filter orders, FIR designs have the advantage of having a linear phase. In the FIR designs, the equiripple design method will usually yield lower filter orders when compared to the frequency sampling method but might have more convergence issues at large sampling frequencies.
ITUT 0.41 and Cmessage Weighting Filters
ITUT 0.41 and Cmessage weighting filters are band pass filters used to measure audiofrequency noise on telephone circuits. The ITUT 0.41 filter is used for international telephone circuits. The Cmessage filter is typically used for North American telephone circuits. The frequency response of the ITUT 0.41 and Cmessage weighting filters is specified in the ITUT O.41 standard [4] and Bell System Technical Reference 41009 [5], respectively.
You design an ITUT 0.41 weighting filter for a sampling frequency of 24 kHz using the following code. You can choose from FIR frequency sampling or equiripple approximations. The filters are designed with the minimum order that meets the standard specifications (mask) for the sampling frequency at hand.
h = fdesign.audioweighting('WT','ITUT041',24e3); Hitut = design(h,'allfir','SystemObject',true); setfilter(hfvt,Hitut{1}); addfilter(hfvt,Hitut{2}); legend(hfvt,'ITUT 0.41 FIR equiripple approximation', ... 'ITUT 0.41 FIR frequency sampling approximation')
You design a Cmessage weighting filter for a sampling frequency of 51.2 kHz using the following code. You can choose from FIR frequency sampling or equiripple approximations or from an exact IIR implementation of poles and zeros based on the poles and zeros specified in [6]. You obtain the IIR design by selecting the 'bell41009' design method. The FIR filter approximations are designed with the minimum order that meets the standard specifications (mask) for the sampling frequency at hand.
h = fdesign.audioweighting('WT','Cmessage',51.2e3); Hcmessage1 = design(h,'allfir','SystemObject',true); setfilter(hfvt,Hcmessage1{1}); addfilter(hfvt,Hcmessage1{2}); legend(hfvt,'Cmessage FIR equiripple approximation', ... 'Cmessage FIR frequency sampling approximation')
Hcmessage2 = design(h,'bell41009','SystemObject',true); setfilter(hfvt,Hcmessage2); legend(hfvt,'Cmessage weighting (IIR)')
We have presented the design of A, C, Cmessage, ITUT 0.41, and ITUR 4684 weighting filters. Some of the audio weighting standards do not specify exact pole/zero values, instead, they specify a list of frequency values, magnitudes and tolerances. If the exact poles and zeros are not specified in the standard, filters are designed using frequency sampling, equiripple, and/or IIR least Pnorm arbitrary magnitude approximations based on the aforementioned list of frequency values, attenuations, and tolerances. The filter order of the arbitrary magnitude designs is chosen as the minimum order for which the resulting filter response is within the tolerance mask limits. Designs target the specification mask tolerances only within the Nyquist interval. If Fs/2 is smaller than the largest mask frequency value specified by the standard, the design algorithm will try to meet the specifications up to Fs/2.
In the FIR designs, the equiripple design method will usually yield lower filter orders when compared to the frequency sampling method but might have more convergence issues at large sampling frequencies.
[1] 'Design Response of Weighting Networks for Acoustical Measurements', American National Standard, ANSI S1.422001.
[2] 'Electroacoustics Sound Level Meters Part 1: Specifications', IEC 616721, First Edition 200205.
[3] 'Measurement of AudioFrequency Noise Voltage Level in Sound Broadcasting', Recommendation ITUR BS.4684 (19701974197819821986).
[4] 'Specifications for Measuring Equipment for the Measurement of Analogue Parameters, Psophometer for Use on TelephoneType Circuits', ITUT Recommendation 0.41.
[5] 'Transmission Parameters Affecting Voiceband Data TransmissionMeasuring Techniques', Bell System Technical Reference, PUB 41009, 1972.
[6] 'IEEE® Standard Equipment Requirements and Measurement Techniques for Analog Transmission Parameters for Telecommunications', IEEE Std 7431995 Volume , Issue , 25, September 1996.