cbadc.digital_control.dither_control.DitherControl
- class cbadc.digital_control.dither_control.DitherControl(number_of_random_controls: int, digital_control: DigitalControl, impulse_response: List[_ImpulseResponse] = None, dithering=True, random_sequence_length=4194304, t_delay: float = 0.0)[source]
Bases:
DigitalControlA control with dither signal.
An extension to the traditional digital controls, that stabilize the digital dimension, where the dither control adds a randomly generated dithering signal to the mix.
Note that the dithering controls are prepended those of the initalizing digital control.
- Parameters
number_of_random_controls (int) – number of dithering controls
digital_control (
cbadc.digital_control.DigitalControl) – a digital control to be extended
Methods
__init__(number_of_random_controls, ...[, ...])Evaluates the control contribution at time t.
Returns the current control state, i.e, \(\mathbf{s}[k]\).
control_update(t, s_tilde)Updates the control at time t if valid.
impulse_response(m, t)The impulse response of the corresponding DAC waveform
reset([t0])Reset the digital control clock
turn_off_dither()turn_on_dither()- control_contribution(t: float) ndarray
Evaluates the control contribution at time t.
- Parameters
t (float) – time at which the digital control i evaluated.
- Returns
the control signal \(\mathbf{s}(t)\)
- Return type
array_like, shape=(M,)
- control_signal() ndarray
Returns the current control state, i.e, \(\mathbf{s}[k]\).
Examples
>>> from cbadc.digital_control import DigitalControl >>> from cbadc.analog_signal import Clock >>> import numpy as np >>> T = 1e-6 >>> M = 4 >>> dc = DigitalControl(Clock(T), M) >>> _ = dc.control_contribution(T) >>> dc.control_signal() array([0., 0., 0., 0.])
- Returns
current control state.
- Return type
array_like, shape=(M,), dtype=numpy.int8
- control_update(t: float, s_tilde: ndarray)[source]
Updates the control at time t if valid.
- Parameters
t (float) – time at which the digital control i evaluated.
s_tilde (array_like, shape=(M_tilde,)) – state vector evaluated at time t
- impulse_response(m: int, t: float) ndarray[source]
The impulse response of the corresponding DAC waveform
- Parameters
m (int) – determines which \(m\in\{0,\dots,M-1\}\) control dimension which is triggered.
t (float) – evaluate the impulse response at time t.
- Returns
the dac waveform of the digital control system.
- Return type
array_like, shape=(M,)