Gain Control Base

Inheritance diagram of hermespy.simulation.rf_chain.analog_digital_converter.GainControlBase
class GainControlBase(rescale_quantization=False)[source]

Bases: ABC

Base class for all ADC gain control models.

Parameters:

rescale_quantization (bool, optional) – If enabled, the quantized signal is rescaled to the original signal range before gain adjustment. Disabled by default.

adjust_signal(input_signal, gain)[source]

Adjust the signal to the ADC input range.

Parameters:
  • input_signal (Signal) – Input signal to be adjusted.

  • gain (float) – Linear gain to be applied to the input_signal’s Voltage samples.

Return type:

Signal

Returns: The adjusted signal.

abstract estimate_gain(input_signal)[source]

Estimate the gain required to adjust the signal to the ADC input range.

Parameters:

input_signal (Signal) – Input signal to be adjusted.

Return type:

float

Returns: Linear gain to be applied to the input_signal’s Voltage samples.

scale_quantized_signal(quantized_signal, gain)[source]

Scale the quantized signal back to the original signal range before gain adjustment.

Only applied if rescale_quantization is enabled.

Parameters:
  • quantized_signal (Signal) – Quantized signal to be adjusted.

  • gain (float) – Linear gain to applied to the input_signal’s Voltage samples before quantization.

Return type:

Signal

Returns: The scaled qzanitized signal.

property rescale_quantization: bool

Rescale the quantized signal to the original signal range before gain adjustment.