Mixers

Inheritance diagram of hermespy.simulation.rf.blocks.mixers.Mixer, hermespy.simulation.rf.blocks.mixers.IdealMixer

Radio-Frequency (RF) mixers are components combining two input signals by multipling them, resulting in sum and difference frequency components at the output. In the process, they commonly introduce non-linear distortion, phase shifts, thermal noise and leakage of the local oscillator signal to the output.

This module provides various numerical models of RF mixers.

class Mixer(mixer_type, noise_model=None, noise_level=None, seed=None)[source]

Bases: RFBlock

Customizable three-port mixer block model.

Parameters:
  • mixer_type (MixerType) – Type of the mixer, either UP or DOWN.

  • seed (int | None) – Seed with which to initialize the block’s random state.

classmethod Deserialize(process)[source]

Deserialize an object’s state.

Objects cannot be deserialized directly, instead a Factory must be instructed to carry out the deserialization process.

Parameters:

process (DeserializationProcess) – The current stage of the deserialization process. This object is generated by the Factory and provides an interface to deserialization methods supporting multiple backends.

Return type:

Mixer

Returns:

The deserialized object.

realize(bandwidth, oversampling_factor, carrier_frequency)[source]

Return the current state of the radio-frequency block.

Parameters:
  • bandwidth (float) – Bandwith of the proecessed signals in Hz.

  • oversampling_factor (int) – Oversampling factor of the modeling.

  • carrier_frequency (float) – Target carrier frequency of the modeled radio front-end in Hz.

Return type:

MixerRealization

Returns:

Current state of the radio-frequency block.

serialize(process)[source]

Serialize this object’s state.

Objects cannot be serialized directly, instead a Factory must be instructed to carry out the serialization process.

Parameters:

process (SerializationProcess) – The current stage of the serialization process. This object is generated by the Factory and provides an interface to serialization methods supporting multiple backends.

Return type:

None

property i: RFBlockPort[source]

Mixer input port.

property lo: RFBlockPort[source]

Local oscillator port.

property mixer_type: MixerType[source]

Type of the mixer.

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[source]

Mixer output port.

class IdealMixer(mixer_type, lo_frequency=0.0, noise_model=None, noise_level=None, seed=None)[source]

Bases: RFBlock

An ideal mixer moving the input signal to a different center frequency.

Parameters:
  • mixer_type (MixerType) – Type of the mixer, either UP or DOWN.

  • lo_frequency (float) – Center frequency of the mixer’s oscillator in Hz. If set to zero, the device’s configured carrier frequency will be assumed.

  • noise_model (NoiseModel | None) – Noise model to use for the mixer.

  • noise_level (NoiseLevel | None) – Noise level to use for the mixer.

  • seed (int | None) – Seed with which to initialize the block’s random state.

classmethod Deserialize(process)[source]

Deserialize an object’s state.

Objects cannot be deserialized directly, instead a Factory must be instructed to carry out the deserialization process.

Parameters:

process (DeserializationProcess) – The current stage of the deserialization process. This object is generated by the Factory and provides an interface to deserialization methods supporting multiple backends.

Return type:

IdealMixer

Returns:

The deserialized object.

realize(bandwidth, oversampling_factor, carrier_frequency)[source]

Return the current state of the radio-frequency block.

Parameters:
  • bandwidth (float) – Bandwith of the proecessed signals in Hz.

  • oversampling_factor (int) – Oversampling factor of the modeling.

  • carrier_frequency (float) – Target carrier frequency of the modeled radio front-end in Hz.

Return type:

IdealMixerRealization

Returns:

Current state of the radio-frequency block.

serialize(process)[source]

Serialize this object’s state.

Objects cannot be serialized directly, instead a Factory must be instructed to carry out the serialization process.

Parameters:

process (SerializationProcess) – The current stage of the serialization process. This object is generated by the Factory and provides an interface to serialization methods supporting multiple backends.

Return type:

None

property i: RFBlockPort[IdealMixer][source]

Input port of the mixer.

property lo_frequency: float[source]

Center frequency of the local oscillator in Hz.

property mixer_type: MixerType[source]

Type of the mixer.

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[IdealMixer][source]

Output port of the mixer.

class MixerType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: SerializableEnum

Type of the considered mixer.

DOWN = 1[source]

Down-converting mixer, converting the input signal to a lower frequency.

UP = 0[source]

Up-converting mixer, converting the input signal to a higher frequency.

class IdealMixerRealization(sampling_rate, oversampling_factor, noise_realization, type, lo_frequency)[source]

Bases: MixerRealization

Parameters:
  • sampling_rate (float) – Sampling rate of the block in Hz.

  • oversampling_factor (int) – Oversampling factor of the modeling.

  • noise_realization – Thermal noise realization applied to the mixer.

  • type (MixerType) – Type of the mixer, either UP or DOWN.

  • lo_frequency (float) – Center frequency of the mixer’s oscillator in Hz.

property lo_frequency: float[source]

Center frequency of the local oscillator in Hz.

class MixerRealization(sampling_rate, oversampling_factor, noise_realization, mixer_type)[source]

Bases: RFBlockRealization

Realization of a radio-frequency chain mixer block model.

Parameters:
  • sampling_rate (float) – Sampling rate of the block in Hz.

  • oversampling_factor (int) – Oversampling factor of the modeling.

  • noise_realization – Thermal noise realization applied to the mixer.

  • mixer_type (MixerType) – Type of the mixer, either UP or DOWN.

property mixer_type: MixerType[source]

Type of the mixer.