Digital signal processing

FIR filtering

class sdr.FIR

Implements a finite impulse response (FIR) filter.

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

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

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

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

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

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

sdr.design_bandstop_fir(order: int, ...) 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.design_multirate_fir(interpolation, ...) 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.design_frac_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: NDArray, freq: float = 0, ...) NDArray

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

sdr.to_complex_bb(x_r: NDArray[float64]) NDArray[complex128]

Converts a real passband signal to a complex baseband signal.

sdr.to_real_pb(x_c: NDArray[complex128]) NDArray[float64]

Converts a complex baseband signal to a real passband signal.

sdr.upsample(x: NDArray, 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: NDArray, 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