Main Content

Audio Weighting Filter

Design audio weighting filter

Compatibility

Note

The Audio Weighting Filter block will be removed from DSP System Toolbox™ in a future release. Existing instances of the block continue to run. For new code, use the Weighting Filter block from Audio Toolbox™ instead.

  • Audio Weighting Filter block

Library

Filtering / Filter Designs

dspfdesign

Description

This block brings the filter design capabilities of the filterBuilder function to the Simulink® environment.

Dialog Box

See Audio Weighting Filter Design — Main Pane for more information about the parameters of this block. The Data Types and Code panes are not available for blocks in the DSP System Toolbox Filter Designs library.

View Filter Response

This button opens the Filter Visualization Tool (FVTool) from the Signal Processing Toolbox™ product. You can use the tool to display:

  • Magnitude response, phase response, and group delay in the frequency domain.

  • Impulse response and step response in the time domain.

  • Pole-zero information.

The tool also helps you evaluate filter performance by providing information about filter order, stability, and phase linearity. For more information on FVTool, see the Signal Processing Toolbox documentation.

Filter Specifications

In this group, you specify your filter format, such as the impulse response and the filter order.

Weighting type

The weighting type defines the frequency response of the filter. The valid weighting types for this filter are A, C , C-message, ITU-R 468–4, and ITU-T 0.41.

Class

The filter class describes the frequency-dependent tolerances specified in the relevant standards [1], [2]. There are two possible class values: 1 and 2. Class 1 weighting filters have stricter tolerances than class 2 filters. The filter class value does not affect the design. The class value is only used to provide a specification mask in FVTool for the analysis of the filter design. The default value of this parameter is 1.

The filter class is only applicable for A weighting and C weighting filters.

Impulse response

Specify the impulse response type as one of IIR or FIR. For A, C , C-message, and ITU-R 468–4 filter, IIR is the only option. For a ITU-T 0.41 weighting filter, FIR is the only option.

Frequency units

Specify the frequency units as Hertz (Hz), kilohertz (kHz), megahertz (MHz), or gigahertz (GHz). Normalized frequency designs are not supported for audio weighting filters. The default value of this parameter is Hz.

Input sample rate

Specify the input sampling frequency. The units correspond to the setting of the Frequency units parameter.

Algorithm

Design Method

Valid design methods depend on the weighting type. For type A and C weighting filters, the only valid design type is ANSI S1.42. This is an IIR design method that follows ANSI standard S1.42–2001. For a C message filter, the only valid design method is Bell 41009, which is an IIR design method following the Bell System Technical Reference PUB 41009. For a ITU-R 468–4 weighting filter, you can design an IIR or FIR filter. If you choose an IIR design, the design method is IIR least p-norm. If you choose an FIR design, the design method choices are Equiripple or Frequency Sampling. For an ITU-T 0.41 weighting filter, the available FIR design methods are Equiripple or Frequency Sampling.

Scale SOS filter coefficients to reduce chance of overflow

Selecting this parameter directs the design to scale the filter coefficients to reduce the chances that the inputs or calculations in the filter overflow and exceed the representable range of the filter. Clearing this option removes the scaling. This parameter applies only to IIR filters.

Filter Implementation

Structure

For the filter specifications and design method you select, this parameter lists the filter structures available to implement your filter. For audio weighting IIR filter designs, you can choose direct form I or II biquad (SOS). You can also choose to implement these structures in transposed form.

For FIR designs, you can choose a direct form, direct-form transposed, direct-form symmetric, or direct-form asymmetric structure.

Use basic elements to enable filter customization

Select this check box to implement the filter as a subsystem of basic Simulink blocks. Clear the check box to implement the filter as a high-level subsystem. By default, this check box is cleared.

The high-level implementation provides better compatibility across various filter structures, especially filters that would contain algebraic loops when constructed using basic elements. On the other hand, using basic elements enables the following optimization parameters:

  • Optimize for zero gains — Terminate chains that contain Gain blocks with a gain of zero.

  • Optimize for unit gains — Remove Gain blocks that scale by a factor of one.

  • Optimize for delay chains — Substitute delay chains made up of n unit delays with a single delay by n.

  • Optimize for negative gains — Use subtraction in Sum blocks instead of negative gains in Gain blocks.

Optimize for unit-scale values

Select this check box to scale unit gains between sections in SOS filters. This parameter is available only for SOS filters.

Input processing

Specify how the block should process the input. The available options may vary depending on he settings of the Filter Structure and Use basic elements for filter customization parameters. You can set this parameter to one of the following options:

  • Columns as channels (frame based) — When you select this option, the block treats each column of the input as a separate channel.

  • Elements as channels (sample based) — When you select this option, the block treats each element of the input as a separate channel.

For more information about sample- and frame-based processing, see Sample- and Frame-Based Concepts.

Use variable names for coefficients

Select this check box to enable the specification of coefficients using MATLAB® variables. The available coefficient names differ depending on the filter structure. Using symbolic names allows tuning of filter coefficients in generated code. By default, this check box is cleared.

Supported Data Types

PortSupported Data Types

Input

  • Double-precision floating point

  • Single-precision floating point

Output

  • Double-precision floating point

  • Single-precision floating point

References

[1] American National Standard Design Response of Weighting Networks for Acoustical Measurements, ANSI S1.42-2001, Acoustical Society of America, New York, NY, 2001.

[2] Electroacoustics Sound Level Meters Part 1: Specifications, IEC 61672-1, First Edition 2002-05.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2011b

See Also

Functions

Tools