main content

design fir or iir highpass filter -凯发k8网页登录

design fir or iir highpass filter

  • highpass filter block

libraries:
dsp system toolbox / filtering / filter designs

description

the highpass filter block independently filters each channel of the input signal over time using the given design specifications. you can control whether the block implements an iir or fir highpass filter using the filter type parameter. you can specify the passband and stopband edge frequencies in hz or in normalized frequency units (since r2023a).

this block supports arm® cortex® code generation. under certain conditions, this block also supports simd code generation. for details, see code generation.

ports

input

input signal, specified as a real- or complex-valued column vector or matrix. if the input signal is a matrix, each column of the matrix is treated as an independent channel. the number of rows in the input signal denotes the channel length.

data types: single | double | fixed point
complex number support: yes

output

filtered signal, returned as a vector or matrix. the output has the same size and complexity characteristics as the input. if the output has a fixed-point data type, it is always signed.

data types: single | double | fixed point
complex number support: yes

parameters

main

specify whether the block implements an fir highpass filter or an iir highpass filter.

when you select this check box, the block designs a filter with minimum order. when you clear this check box, you can specify the filter order as a positive integer.

specify the order of the highpass filter as a positive integer.

dependencies

to enable this parameter, clear the design minimum order filter check box.

specify the stopband edge frequency of the highpass filter as a real positive scalar in hz or in normalized frequency units (since r2023a).

if you set the sample rate mode parameter to:

  • specify on dialog or inherit from input port –– the value of the stopband edge frequency is in hz and must be less than the passband edge frequency.

  • use normalized frequency (0 to 1) –– the value of the stopband edge frequency is in normalized frequency units. the value must be a positive scalar less than the passband edge frequency.

(since r2023a)

dependencies

to enable this parameter, select the design minimum order filter check box.

specify the passband edge frequency of the highpass filter as a real positive scalar in hz or in normalized frequency units (since r2023a).

if you set the sample rate mode parameter to:

  • specify on dialog or inherit from input port –– the value of the passband edge frequency is in hz and must be less than half the value of the input sample rate.

  • use normalized frequency (0 to 1) –– the value of the passband edge frequency is in normalized frequency units. the value must be a positive scalar less than 1.0.

(since r2023a)

specify the minimum attenuation in the stopband as a real positive scalar in db.

specify the maximum ripple of the filter response in the passband as a real positive scalar in db.

since r2023a

specify the input sample rate using one of these options:

  • specify on dialog –– specify the input sample rate in the block dialog box using the input sample rate (hz) parameter.

  • inherit from input port –– the block inherits the sample rate from the input signal.

  • use normalized frequency (0 to 1) –– specify the passband edge and the stopband edge frequencies in normalized frequency units (0 to 1).

specify the input sample rate as a scalar in hz.

dependencies

to enable this parameter, set the sample rate mode parameter to specify on dialog. (since r2023a)

type of simulation to run:

  • interpreted execution (default)

    simulate model using the matlab® interpreter. this option shortens startup time but has slower simulation speed than code generation.

  • code generation

    simulate model using generated c code. the first time you run a simulation, simulink® generates c code for the block. the c code is reused for subsequent simulations as long as the model does not change. this option requires additional startup time but provides faster simulation speed than interpreted execution.

opens the filter visualization tool () and displays the magnitude/phase response of the highpass filter. the response is based on the block dialog box parameters. changes made to these parameters update fvtool.

to update the magnitude response while fvtool is running, modify the dialog box parameters and click apply.

data types

rounding method for the output fixed-point operations.

fixed-point data type of the coefficients, specified as one of the following:

  • fixdt(1,16) — signed fixed-point data type of word length 16, with binary point scaling. the block determines the fraction length automatically from the coefficient values in such a way that the coefficients occupy maximum representable range without overflowing.

  • fixdt(1,16,0) — signed fixed-point data type of word length 16 and fraction length 0. you can change the fraction length to any other integer value.

  • — specify the data type using an expression that evaluates to a data type object, for example, numeric type (fixdt([ ],16, 15)). specify the sign mode of this data type as [ ] or true.

  • refresh data type — refresh to the default data type.

click the show data type assistant button to display the data type assistant, which helps you set the data type. for more information, see (simulink).

block characteristics

data types

double | fixed point | integer | single

direct feedthrough

no

multidimensional signals

no

variable-size signals

yes

zero-crossing detection

no

algorithms

extended capabilities

fixed-point conversion
design and simulate fixed-point systems using fixed-point designer™.

version history

introduced in r2015b

see also

blocks

objects

  • |
网站地图