Allpole Filter
Model allpole filters
Library
Filtering / Filter Implementations
dsparch4
Description
The Allpole Filter block independently filters each channel of the input signal with the specified allpole filter. The block can implement static filters with fixed coefficients, as well as time-varying filters with coefficients that change over time. You can tune the coefficients of a static filter during simulation.
This block filters each channel of the input signal independently over time. The Input processing parameter allows you to specify whether the block treats each element of the input as an independent channel (sample-based processing), or each column of the input as an independent channel (frame-based processing).
This block supports the Simulink® state logging feature. See State (Simulink) in the Simulink User's Guide for more information.
Filter Structure Support
You can change the filter structure implemented with the Allpole Filter block by selecting one of the following from the Filter structure parameter:
Direct form
Direct form transposed
Lattice AR
Specifying Initial States
The Allpole Filter block initializes the internal filter states to zero by default, which has the same effect as assuming that past inputs and outputs are zero. You can optionally use the Initial states parameter to specify nonzero initial conditions for the filter delays.
To determine the number of initial states you must specify and how to specify them, see the table on valid initial states. The Initial states parameter can take one of the forms described in the next table.
Valid Initial States
Initial Condition | Description |
---|---|
Scalar | The block initializes all delay elements in the filter to the scalar value. |
Vector or matrix | Each vector or matrix element specifies a unique initial condition for a corresponding delay element in a corresponding channel:
|
Data Type Support
The Allpole Filter block accepts and outputs real and complex signals of any numeric data type supported by Simulink. The block supports the same types for the coefficients.
The following diagrams show the filter structure and the data types used within the Allpole Filter block for fixed-point signals.
Direct Form
You cannot specify the state data type on the block mask for this structure because the output states have the same data types as the output.
Direct Form Transposed
States are complex when either the inputs or the coefficients are complex.
Lattice AR
Dialog Box
The Main pane of the Allpole Filter block dialog box appears as follows.
- Coefficient source
Select whether you want to specify the filter coefficients on the block mask or through an input port.
- Filter structure
Select the filter structure you want the block to implement. You can select
Direct form
,Direct form transposed
, orLattice AR
.- Coefficients
Specify the row vector of coefficients of the filter's transfer function.
This parameter is visible only when you set the Coefficient source to
Dialog parameters
.- Input processing
Specify whether the block performs sample- or frame-based processing. You can select one of the following options:
Elements as channels (sample based)
— Treat each element of the input as an independent channel (sample-based processing).Columns as channels (frame based)
— Treat each column of the input as an independent channel (frame-based processing).
- Initial states
Specify the initial conditions of the filter states. To learn how to specify initial states, see Specifying Initial States.
The Data Types pane of the Allpole Filter block dialog box appears as follows.
- Coefficients
Specify the coefficient data type. You can set it to:
A rule that inherits a data type, for example,
Inherit: Same word length as input
A built-in integer, for example,
int8
A data type object, for example, a
Simulink.NumericType
objectAn expression that evaluates to a data type, for example,
fixdt(1,16,0)
Click the Show data type assistant button
to display the Data Type Assistant, which helps you set the Coefficient parameter.
See Specify Data Types Using Data Type Assistant (Simulink) for more information.
- Coefficients minimum
Specify the minimum value that a filter coefficient should have. The default value is
[]
(unspecified). Simulink software uses this value to perform:Parameter range checking (see Specify Minimum and Maximum Values for Block Parameters (Simulink))
Automatic scaling of fixed-point data types
- Coefficients maximum
Specify the maximum value that a filter coefficient should have. The default value is
[]
(unspecified). Simulink software uses this value to perform:Parameter range checking (see Specify Minimum and Maximum Values for Block Parameters (Simulink))
Automatic scaling of fixed-point data types
- Product output
Specify the product output data type. You can set it to:
A rule that inherits a data type, for example,
Inherit: Inherit via internal rule
. For more information on this rule, see Inherit via Internal Rule.A built-in data type, for example,
int8
A data type object, for example, a
Simulink.NumericType
objectAn expression that evaluates to a data type, for example,
fixdt(1,16,0)
Click the Show data type assistant button
to display the Data Type Assistant, which helps you set the Product output parameter.
See Specify Data Types Using Data Type Assistant (Simulink) for more information.
- Accumulator
Specify the accumulator data type. You can set it to:
A rule that inherits a data type, for example,
Inherit: Inherit via internal rule
. For more information on this rule, see Inherit via Internal Rule.A built-in data type, for example,
int8
A data type object, for example, a
Simulink.NumericType
objectAn expression that evaluates to a data type, for example,
fixdt(1,16,0)
Click the Show data type assistant button
to display the Data Type Assistant, which helps you set the Accumulator parameter.
See Specify Data Types Using Data Type Assistant (Simulink) for more information.
- State
Specify the state data type. You can set it to:
A rule that inherits a data type, for example,
Inherit: Same as accumulator
A built-in integer, for example,
int8
A data type object, for example, a
Simulink.NumericType
objectAn expression that evaluates to a data type, for example,
fixdt(1,16,0)
This parameter is only visible when the selected filter structure is
Lattice MA
.Click the Show data type assistant button
to display the Data Type Assistant, which helps you set the State parameter.
See Specify Data Types Using Data Type Assistant (Simulink) for more information.
- Output
Specify the output data type. You can set it to:
A rule that inherits a data type, for example,
Inherit: Same as accumulator
A built-in data type, for example,
int8
A data type object, for example, a
Simulink.NumericType
objectAn expression that evaluates to a data type, for example,
fixdt(1,16,0)
Click the Show data type assistant button
to display the Data Type Assistant, which helps you set the Output parameter.
See Control Data Types of Signals (Simulink) for more information.
- Output minimum
Specify the minimum value that the block should output. The default value is
[]
(unspecified). Simulink software uses this value to perform:Simulation range checking (see Specify Signal Ranges (Simulink))
Automatic scaling of fixed-point data types
- Output maximum
Specify the maximum value that the block should output. The default value is
[]
(unspecified). Simulink software uses this value to perform:Simulation range checking (see Specify Signal Ranges (Simulink))
Automatic scaling of fixed-point data types
- Lock data type settings against changes by the fixed-point tools
Select this parameter to prevent the fixed-point tools from overriding the data types you specify on the block mask.
- Integer rounding mode
Specify the rounding mode for fixed-point operations.
- Saturate on integer overflow
Action Reasons for Taking This Action What Happens for Overflows Example Select this check box.
Your model has possible overflow and you want explicit saturation protection in the generated code.
Overflows saturate to either the minimum or maximum value that the data type can represent.
An overflow associated with a signed 8-bit integer can saturate to -128 or 127.
Do not select this check box.
You want to optimize efficiency of your generated code.
You want to avoid overspecifying how a block handles out-of-range signals. For more information, see Troubleshoot Signal Range Errors (Simulink).
Overflows wrap to the appropriate value that is representable by the data type.
The number 130 does not fit in a signed 8-bit integer and wraps to -126.
When you select this check box, saturation applies to every internal operation on the block, not just the output or result. In general, the code generation process can detect when overflow is not possible. In this case, the code generator does not produce saturation code.
Supported Data Types
Double-precision floating point
Single-precision floating point
Signed fixed point
8-, 16-, and 32-bit signed integers
See Also
Discrete FIR Filter (Simulink) | DSP System Toolbox |
Filter Realization Wizard | DSP System Toolbox |
filterDesigner | DSP System Toolbox |
FVTool | Signal Processing Toolbox |
Extended Capabilities
Version History
Introduced in R2011b