Digital signal processing

FIR filtering

class sdr.FIR

Implements a finite impulse response (FIR) filter.

sdr.lowpass_fir(order: int, cutoff_freq, ...) NDArray[float64]

Designs a lowpass FIR filter impulse response \(h[n]\) using the window method.

sdr.highpass_fir(order: int, cutoff_freq, ...) NDArray[float64]

Designs a highpass FIR filter impulse response \(h[n]\) using the window method.

sdr.bandpass_fir(order: int, center_freq, ...) NDArray[float64]

Designs a bandpass FIR filter impulse response \(h[n]\) using the window method.

sdr.bandstop_fir(order: int, center_freq, ...) NDArray[float64]

Designs a bandstop FIR filter impulse response \(h[n]\) using the window method.

IIR filtering

class sdr.IIR

Implements an infinite impulse response (IIR) filter.

Polyphase FIR filtering

class sdr.PolyphaseFIR(sdr.FIR)

Implements a generic polyphase FIR filter.

class sdr.Interpolator(sdr.PolyphaseFIR)

Implements a polyphase interpolating FIR filter.

class sdr.Decimator(sdr.PolyphaseFIR)

Implements a polyphase decimating FIR filter.

class sdr.Resampler(sdr.PolyphaseFIR)

Implements a polyphase rational resampling FIR filter.

class sdr.Channelizer(sdr.PolyphaseFIR)

Implements a polyphase channelizer FIR filter.

sdr.multirate_fir(interpolation: int, ...) NDArray[float64]

Designs a multirate FIR filter impulse response \(h[n]\) using the Kaiser window method.

sdr.polyphase_decompose(branches: int, taps: ArrayLike) NDArray

Decomposes the prototype filter taps \(h[n]\) into the polyphase matrix \(h_i[n]\) with \(B\) phases.

Filter applications

class sdr.MovingAverager(sdr.FIR)

Implements a moving average FIR filter.

class sdr.Differentiator(sdr.FIR)

Implements a differentiator FIR filter.

class sdr.Integrator(sdr.IIR)

Implements an integrator IIR filter.

class sdr.LeakyIntegrator(sdr.IIR)

Implements a leaky integrator IIR filter.

Arbitrary resampling

class sdr.FarrowResampler

Implements a piecewise polynomial Farrow arbitrary resampler.

class sdr.FractionalDelay(sdr.FIR)

Implements a fractional delay FIR filter.

sdr.fractional_delay_fir(length: int, delay) NDArray[float64]

Designs a fractional delay FIR filter impulse response \(h[n]\) using the Kaiser window method.

Correlation

Signal manipulation

sdr.mix(x: ArrayLike, freq: float = 0.0, ...) NDArray

Mixes a time-domain signal with a complex exponential or real sinusoid.

sdr.to_complex_baseband(x_r: ArrayLike) NDArray[complex128]

Converts a real passband signal to a complex baseband signal.

sdr.to_real_passband(x_c: ArrayLike) NDArray[float64]

Converts a complex baseband signal to a real passband signal.

sdr.upsample(x: ArrayLike, rate: int) NDArray

Upsamples the time-domain signal \(x[n]\) by the factor \(r\), by inserting \(r-1\) zeros between each sample.

sdr.downsample(x: ArrayLike, rate: int) NDArray

Downsamples the time-domain signal \(x[n]\) by the factor \(r\), by discarding \(r-1\) samples every \(r\) samples.


Last update: Jan 01, 2024