Filters¶

Radio-Frequency (RF) filters selectively pass spectral signal components of desired frequency ranges while attenuating undesired frequencies. They are commonly used to remove out-of-band noise, suppress interference, and shape signal spectra in communication and radar systems.
This module provides various numerical models of filters commonly applied in front-ends.
- class HPF(cutoff_frequency, filter_order=4, noise_model=None, noise_level=None, seed=None)[source]¶
Bases:
FilterA radio-frequency block that applies a high-pass filter during signal propagation.
- Parameters:
cutoff_frequency (
float) – Cutoff frequency of the high-pass filter in Hz.noise_model (
NoiseModel|None) – Thermal noise model applied after signal propagation. If not specified, i.e.None, AWGN is assumed.filter_order (
int) – Order of the high-pass filter. Refer to the documentation ofscipy.signal.butter()for details.noise_level (
NoiseLevel|None) – Thermal noise level applied after signal propagation. If not specified, i.e.None, thermal noise at 300 K is assumed.seed (
int|None) – Seed with which to initialize the block’s random state.
- realize(bandwidth, oversampling_factor, carrier_frequency)[source]¶
Return the current state of the radio-frequency block.
- Parameters:
- Return type:
- Returns:
Current state of the radio-frequency block.
- property cutoff_frequency: float[source]¶
Cutoff frequency of the high-pass filter in Hz.
- Raises:
ValueError – If the cutoff frequency is not positive.
- property filter_order: int[source]¶
Order of the high-pass filter.
Refer to the documentation of
scipy.signal.butter()for details.- Raises:
ValueError – If the filter order is less than 1.
- class Filter(noise_model=None, noise_level=None, seed=None)[source]¶
Bases:
RFBlockA radio-frequency block that applies an arbitrary filter during signal propagation.
- Parameters:
numerator_coefficients – Coefficients of the filter’s numerator.
denominator_coefficients – Coefficients of the filter’s denominator.
noise_model (
NoiseModel|None) – Thermal noise model applied after signal propagation. If not specifiedm, i.e.None, AWGN is assumed.noise_level (
NoiseLevel|None) – Thermal noise level applied after signal propagation. If not specified, i.e.None, thermal noise at 300 K is assumed.seed (
int|None) – Seed with which to initialize the block’s random state.
- property i: RFBlockPort[Filter][source]¶
Input port of the filter block.
- property num_input_ports: int[source]¶
Number of physical ports feeding into this radio-frequency block.
If the returned number is negative, the block can accept an arbitrary number of input ports.
- property num_output_ports: int[source]¶
Number of physical ports emerging from this radio-frequency block.
- property o: RFBlockPort[Filter][source]¶
Output port of the filter block.
- class FilterRealization(numerator_coefficients, denominator_coefficients, bandwidth, oversampling_factor, noise_realization)[source]¶
Bases:
RFBlockRealizationRealization of a radio-frequency filter block.
- Parameters:
numerator_coefficients (
ndarray) – Coefficients of the filter’s numerator.denominator_coefficients (
ndarray) – Coefficients of the filter’s denominator.bandwidth (
float) – Bandwidth of the simulation in Hz.oversampling_factor (
int) – Oversampling factor of the simulation.noise_realization (
NoiseRealization) – Noise realization applied to the filter.