PhaseResponse (FPScript)

21.09.2021

Calculates the phase response from the filter coefficients.

Syntax

PhaseResponse(FilterCoefficients, [ Length = 1024 ], [ SamplingRate = 1 ] [ , Unwrapped = TRUE ])

 

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

Part

Description

FilterCoefficients

The filter coefficients for which the phase 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 phase 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 for which you are using the filter, then the X component is scaled in such a way that it represents the physical frequencies. If you omit the argument, the phase response for normalized frequencies will be calculated in a range from 0 to 0.5.

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.

Unwrapped

Specifies whether the phase response will be unwrapped. TRUE stands for phase unwrapping.

Permitted data structures are scalar value. Supported data types are Boolean value.

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 TRUE.

Remarks

The result has the unit °.

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

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

Calculates the phase response from the coefficients of a Butterworth low pass filter of the 5th order with the normalized cut-off frequency of 0.1. The phase response is unwrapped automatically.

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

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

See Also

Filter Function

FIRFilterEquiripple Function

FIRFilterWindow Function

IIRFilter Function

AmplitudeResponse Function

GroupDelay Function

PhaseUnwrap 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