Compensators#

class FrequencyDomainEqualizer(axis: int = 0, name: str = 'frequency domain equalizer', h: ndarray = None, shift: bool = False, norm: Literal['ortho', 'backward', 'forward'] = 'ortho')#

A frequency domain equalizer that applies weights to compensate for channel effects in the frequency domain.

This class extends the WeightAmplifier to operate in the frequency domain, using the Fast Fourier Transform (FFT) to compute weights that equalize the input signal. The equalizer can optionally shift the zero-frequency component to the center of the spectrum.

Signal Model#

Given a channel impulse response \(h[l]\), the Frequency Domain Equalizer applies the following weight amplifier

\[y[n] = \left(\frac{1}{H[n]}\right) \cdot x[n]\]
  • \(H[n]\) corresponds to the inverse of the \(n\)-th bin of the channel’s Discrete Fourier Transform (DFT).

Attributes#

hnp.ndarray, optional

The impulse response of the channel to be equalized. Default is None.

shiftbool, optional

If True, applies a frequency shift to center the zero-frequency component. Default is True.

axisint, optional

The axis along which to compute the FFT and apply the weights. Default is -2.

namestr

Name of the frequency domain equalizer instance.

Example#

>>> equalizer = FrequencyDomainEqualizer(h=np.array([1, 0.5, 0.2]))
>>> X = np.random.randn(4, 3, 2)  # Example input tensor
>>> Y = equalizer(X)
prepare(X)#

Compute the amplifier weight from the channel impulse response