optic.models.devices.adc
- adc(Ei, param)
Analog-to-digital converter (ADC) model.
- Parameters:
Ei (ndarray) – Input signal.
param (optic.utils.parameters object, optional) –
Parameters of the ADC model.
param.inFs : sampling frequency of the input signal [samples/s][default: 1 sample/s]
param.outFs : sampling frequency of the output signal [samples/s][default: 1 sample/s]
param.jitter : jitter rms in seconds [s][default: 0 s]
param.nBits : number of bits used for quantization [default: 8 bits]
param.ENOB : effective number of bits of the ADC [default: 8 bits]
param.Vmax : maximum value for the ADC’s full-scale range [V][default: 1V]
param.Vmin : minimum value for the ADC’s full-scale range [V][default: -1V]
param.AAF : flag indicating whether to use anti-aliasing filters [default: True]
param.N : number of taps of the anti-aliasing filters [default: 201]
- Returns:
Eo – Resampled and quantized signal.
- Return type:
ndarray
Notes
The input signal will be clipped to the range [Vmin, Vmax] before quantization.
If the effective number of bits (ENOB) is less than nBits, additional noise will be added to the output signal to model the reduced resolution of the ADC. The noise power is calculated based on the difference between the ideal quantization noise power (corresponding to nBits) and the actual quantization noise power (corresponding to ENOB).
If AAF is enabled, anti-aliasing filters will be applied to the input signal before resampling and to the output signal after quantization to mitigate aliasing effects.