Engee documentation

intfilt

Page in progress.

Calculation of the interpolation FIR filter.

Library

EngeeDSP

Syntax

Function call

  • b = intfilt(l, p, alpha) — designs a linear phase response FIR filter that performs perfect bandwidth-limited interpolation using the nearest p non-zero samples in a sequence interspersed with l consecutive zeros every l samples, assuming that the initial band is limited by alpha multiplied by the Nyquist frequency. The returned filter b identical to the filter used in interp.

  • b = intfilt(l, n, "Lagrange") — designs a FIR filter that performs interpolation by the Lagrange polynomial n-th order for a sequence interspersed with l consecutive zeros every l counts.

Arguments

Input arguments

# l — number of counts

+ real number

Details

The number of samples specified as a positive integer scalar. Function intfilt designs an FIR filter with a linear phase response using a sequence interspersed with l consecutive zeros every l counts.

Data types

Real

# p — number of non-zero samples

+ real number

Details

The number of non-zero samples, set as a positive integer scalar. Function intfilt Designs a linear phase response FIR filter that performs interpolation within the bandwidth using the nearest p non-zero counts.

Data types

Real

# alpha is the inverse of the transition bandwidth

+ real number

Details

The inverse of the transition bandwidth, set as a scalar. Meaning alpha It is inversely proportional to the filter bandwidth and also affects the bandwidth of areas of no interest in the attenuation band. Meaning alpha allows you to specify how much of the Nyquist interval of the input signal is occupied, which part of the Nyquist interval is occupied by the input signal. This is useful for signal interpolation because it allows you to increase the transition bandwidth without affecting the interpolation, and leads to better attenuation in the delay band for given l and p. If you set the value alpha an equal 1, then it is assumed that the signal occupies the entire Nyquist interval. Installation for alpha values less than 1 allows for the presence of areas of no interest in the delay band. For example, if the input signal occupies half of the Nyquist interval, then you can set for alpha meaning 0.5.

Data types

Real

# n is the order of the Lagrange polynomial

+ real number

Details

The order of the Lagrange polynomial, given as a positive integer scalar. FIR filter performs Lagrange polynomial interpolation n-th order for a sequence interspersed with l consecutive zeros every l counts. If n and l If they are even, then the developed filter does not have a linear phase characteristic.

Data types

Real

# "Lagrange" — Lagrange polynomial interpolation

+ line

Details

An option that means Lagrange polynomial interpolation.

Data types

String

Output arguments

# b — filter coefficients

+ vector

Details

The filter coefficients returned as a vector. Vector elements b are the coefficients of the FIR filter. If the value is specified alpha, then it is assumed that the initial band is limited by alpha multiplied by the Nyquist frequency. Vector length b equal to l p .

When interpolating by the Lagrange polynomial n-th order, vector b has a length of n l if n even, and the length n l if n the odd one.

Data types

Float64

Additional Info

Algorithms

Details

The limited bandwidth method uses firls to build an interpolation FIR filter. The polynomial method uses the Lagrange polynomial interpolation formula for equidistant samples to construct a suitable filter. Both types of filters are essentially low-pass filters with a gain factor. l in the bandwidth.

Literature

  1. Lyons, Richard G. Understanding Digital Signal Processing. Upper Saddle River, NJ: Prentice Hall, 2004.