Automatic Gain Control¶

- class AutomaticGainControl(agc_type=GainControlType.MAX_AMPLITUDE, backoff=1.0, rescale_quantization=False)[source]¶
- Bases: - GainControlBase- Analog-to-digital conversion automatic gain control modeling. - Parameters:
- agc_type ( - GainControlType) – Type of amplitude gain control at ADC input. Default is GainControlType.MAX_AMPLITUDE.
- backoff ( - float) – this is the ratio between maximum amplitude and the rms value or maximum of input signal, depending on AGC type. Default value is 1.0.
- rescale_quantization ( - bool) – If enabled, the quantized signal is rescaled to the original signal range before gain adjustment. Disabled by default.
 
 - classmethod Deserialize(process)[source]¶
- Deserialize an object’s state. - Objects cannot be deserialized directly, instead a - Factorymust be instructed to carry out the deserialization process.- Parameters:
- process ( - DeserializationProcess) – The current stage of the deserialization process. This object is generated by the- Factoryand provides an interface to deserialization methods supporting multiple backends.
- Return type:
- Returns:
- The deserialized object. 
 
 - estimate_gain(input_signal)[source]¶
- Estimate the gain required to adjust the signal to the ADC input range. - Returns: Linear gain to be applied to the input_signal’s Voltage samples. 
 - serialize(process)[source]¶
- Serialize this object’s state. - Objects cannot be serialized directly, instead a - Factorymust be instructed to carry out the serialization process.- Parameters:
- process ( - SerializationProcess) – The current stage of the serialization process. This object is generated by the- Factoryand provides an interface to serialization methods supporting multiple backends.
- Return type:
 
 - property agc_type: GainControlType¶
- Automatic Gain Control - The AGC may have the following types of gain control, which wil specify the quantizer range: - GainControlType.NONE: no gain control, range must be specified - GainControlType.MAX_AMPLITUDE: the range is given by the maximum amplitude of the - GainControlType.RMS_AMPLITUDE: the range is given by the rms value plus a given backoff Note the for complex numbers, amplitude is calculated for both real and imaginary parts separately, and the greatest value is considered.