Engee documentation

designHighpassIIR

Formation of an IIR high-pass filter.

Library

EngeeDSP

Syntax

Function call

  • B,A = designHighpassIIR() — generates an IIR high-pass filter with the filter order 10 and half the power on the frequency 0.25. When using this syntax, the function designs the IIR filter using the window design method. "default" and it does not calculate scale factors.

    B and A — matrices of sections of the second order in size , where — the number of filter sections.

    Argument SystemObject the default value is false. To implement the filter, assign the filter coefficients to the object SOSFilter.

  • B,A = designHighpassIIR(Name=Value) — sets parameters using one or more name-value arguments.

    For example, B, A = designHighpassIIR(FilterOrder=30, HalfPowerFrequency=0.4, DesignMethod="cheby1") designs an IIR high-pass filter with filter order 30, with half the power at the frequency 0.4 using the Chebyshev type I window design method .

    If you specify only a partial list of filter parameters, the function designs the filter, setting the default values for the remaining parameters.

    When specifying any of the numeric input arguments with single precision, the function calculates the filter coefficients with single precision. Alternatively, you can use arguments Datatype and like to control the data type of coefficients.

    The function supports three design methods. Each design method supports a specific set of design combinations. For more information, see DesignMethod.

  • B,A,SV = designHighpassIIR(Name=Value;nout=3) — also returns scale factors if you have specified an argument HasScaleValues. Argument SV It is a vector of units if for the argument HasScaleValues the value is set false, and the vector of scale coefficients if — true.

  • filtObj = designHighpassIIR(Name=Value) — designs an IIR high-pass filter and implements a system object SOSFilter.

    This syntax is used if for the argument SystemObject the value is set true.

Arguments

Name-value input arguments

Specify optional argument pairs as Name=Value, where Name — the name of the argument, and Value — the appropriate value. The order of the name-value arguments does not matter.

# FilterOrder — the order of the IIR high-pass filter

+ 10 (by default) | a non-negative integer

Details

Order The IIR is a high-pass filter, specified as a non-negative integer.

Типы данных

Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64

# HalfPowerFrequency — the cutoff frequency of the IIR high-pass filter by level 3 dB

+ 0.25 (by default) | normalized scalar

Details

The cutoff frequency of the IIR high-pass filter by level 3 dB, , defined as a normalized scalar in the range (0, 1].

Типы данных

Float32, Float64

# DesignMethod — window design method

+ "default" (by default) | "butter" | "cheby1" | "cheby2"

Details

The window design method specified by one of the following values:

  • "default" — the function designs an IIR high-pass filter using one of the following methods:

  • "butter" — the function designs an IIR high-pass filter using the Butterworth method. This method can be used when specifying one of the following combinations of design parameters:

  • "cheby1" — the function designs an IIR high-pass filter using the Chebyshev type I method. This method can be used when specifying arguments. FilterOrder ( ), HalfPowerFrequency ( ) and PassbandRipple ( );

  • "cheby2" — the function designs an IIR high-pass filter using the Chebyshev type II method. This method can be used when specifying arguments. FilterOrder ( ), HalfPowerFrequency ( ) and StopbandAttenuation ( ).

Типы данных

Char, String

# PassbandRipple — ripples in the IIR filter bandwidth

+ 1 (by default) | positive scalar

Details

Ripples in the IIR filter bandwidth, , defined as a positive scalar.

To use this argument, set for the argument DesignMethod meaning "default" or "cheby1".

Типы данных

Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64

# StopbandAttenuation — attenuation in the delay band of the IIR filter

+ 60 (by default) | positive scalar

Details

Attenuation in the IIR filter delay band, , defined as a positive scalar.

To use this argument, set for the argument DesignMethod meaning "default" or "cheby2".

Типы данных

Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64

# HasScaleValues — the flag for calculating scale coefficients

+ false (by default) | true

Details

Flag for calculating scale coefficients SV, set as true or false.

Типы данных

Bool

# SystemObject — flag for creating a system object

+ false (by default) | true

Details

The flag for creating a system object, set as

  • false — the function returns matrices of coefficients of sections of the second order;

  • true — the function returns an object SOSFilter.

Типы данных

Bool

# Verbose — the flag for printing a function call in Engee
false (by default) | true

Details

The flag for printing a function call in Engee, set as

  • false — the function does not output a function call;

  • true — the function outputs the entire function call, including the default values for type arguments Name=Value which were not specified when calling the function.

    Use this value to view all the parameters used by the function to design and implement the filter.

Типы данных

Bool

# Datatype — the data type of the filter coefficients by type name

+ Float64 (by default) | Float32

Details

The data type of the filter coefficients by type name, specified as Float64 or Float32.

To specify the data type of the filter coefficients, you can use the argument Datatype or like, but you can’t use both arguments at the same time.

If you specify the data type of the filter coefficients using this argument, the function ignores the data types of the other numeric arguments.

Типы данных

DataType

# like is the data type of the filter coefficients based on the prototype

+ a real floating-point number

Details

The data type of the filter coefficients, specified as a prototype of a real floating-point number.

To specify the data type of the filter coefficients, you can use the argument Datatype or like, but you can’t use both arguments at the same time.

If you specify the data type of the filter coefficients using this argument, the function ignores the data types of the other numeric arguments.

Типы данных

Float32, Float64

# nout is the size of the output tuple

+ 2 | 3

Details

Size of the output tuple:

  • 2 — the function returns a tuple of two matrices;

  • 3 — the function returns a tuple of three matrices.

Output arguments

# B — numerator coefficients in the form of a second-order section

+ the P×3 matrix

Details

Coefficients of the numerator of the IIR high-pass filter in the form of a second-order section, returned as a matrix of size , where — the number of filter sections equal to ceil(FilterOrder/2).

If values with single precision are specified in any of the input arguments, the function calculates the filter coefficients with single precision.

If the data type is specified using an argument Datatype or like, the function ignores the data types of other numeric arguments.

Типы данных

Float32, Float64

# A — coefficients of the denominator in the form of a second-order section

+ the P×3 matrix

Details

Coefficients of the denominator of the IIR high-pass filter in the form of a second-order section, returned as a matrix of size , where — the number of filter sections equal to ceil(FilterOrder/2).

The highest coefficient of the denominator is always equal to 1.

If values with single precision are specified in any of the input arguments, the function calculates the filter coefficients with single precision.

If the data type is specified using an argument Datatype or like, the function ignores the data types of other numeric arguments.

Типы данных

Float32, Float64

# SV — scale coefficients for each section

+ column vector

Details

Scale factors for each section, returned as a column vector of length , where — the number of filter sections equal to ceil(FilterOrder/2).

If for an argument HasScaleValues the value is set false Then SV it will be a column vector of units.

If values with single precision are specified in any of the input arguments, the function calculates the filter coefficients with single precision.

If the data type is specified using an argument Datatype or like, the function ignores the data types of other numeric arguments.

Типы данных

Float32, Float64

# filtObj — filter object

+ the SOSFilter object

Details

An IIR high-pass filter object returned as a system object SOSFilter.

The function returns this argument if for the argument SystemObject the value is set true.