AmplitudeResponse (FPScript)

21.09.2021

Calculates the amplitude response from the filter coefficients.

Syntax

AmplitudeResponse(FilterCoefficients, [ Length = 1024 ] [ , SamplingRate = 1 ])

 

The syntax of the AmplitudeResponse function consists of the following parts:

Part

Description

FilterCoefficients

The filter coefficients for which the amplitude response is calculated.

Permitted data structures are data series und list. All numeric data types are permitted, except calendar time und time span.

Length

Specifies the data length of the amplitude response.

Permitted data structures are scalar value. Supported data types are 16-bit integer und 32-bit integer.

The value must be greater than 0.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

If this argument is omitted, it will be set to the default value 1024.

SamplingRate

If you specify the sampling rate of the time signals to which you apply the filter, then the X component is scaled in such a way that it represents the physical frequencies. If you omit the argument, the amplitude response for normalized frequencies in a range from 0 to 0.5 will be calculated.

Permitted data structures are scalar value. All real data types are permitted.

The value must be greater than 0.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

If this argument is omitted, it will be set to the default value 1.

Remarks

The result is a signal and the data type is always a real or complex 64-bit floating point value. The X component contains the frequencies from 0 to half of the sampling frequency.

The FilterCoefficients argument is either a list with the numerator and denominator coefficients (IIR) or a data series with the numerator coefficients (FIR) of a filter.

Available in

Option Digital Filters

Examples

AmplitudeResponse(IIRFilter(FILTER_BUTTERWORTH, FILTER_LOWPASS, 5, 0.1, 0.1, 0.1, FILTER_DELTA))

Calculates the amplitude response from the coefficients of a Butterworth low pass filter of the 5th order with the normalized cut-off frequency of 0.1.

AmplitudeResponse(IIRFilter(FILTER_ELLIPTIC, FILTER_LOWPASS, 5, 200 Hz, 0.1, 0.1, FILTER_DELTA, FILTER_COEFFICIENTS, 1 kHz), 2048, 1000 Hz)

Calculates the amplitude response of the length 2048 from the coefficients of a Cauer low pass filter of the 5th order with the cut-off frequency 200 at a sampling frequency of 1000 Hz.

See Also

Filter Function

FIRFilterEquiripple Function

FIRFilterWindow Function

IIRFilter Function

PhaseResponse Function

GroupDelay Function

Digital Filters Option

IIR Filter Analysis Object

FIR Filter Analysis Object (Equiripple Method)

FIR Filter Analysis Object (Window Method)

Filter Tutorial

Share article or send as email:

You might be interested in these articles