cbadc.digital_control.switch_capacitor_control.SwitchedCapacitorControl
- class cbadc.digital_control.switch_capacitor_control.SwitchedCapacitorControl(T, T1, T2, M, A, t0=0, VCap=1.0)[source]
Bases:
DigitalControlRepresents a digital control system that uses switched capacitor control
- Parameters
T (`float) – total clock period
T1 (float, array_like, shape=(M,)) – time at which the digital control empties the capacitor into the system. Can be either float or array of float.
T2 (float, array_like, shape=(M,)) – time at which the switched capacitor is re-charged and disconnected from the analog system.
M (int) – number of controls.
A (array_like, shape(M,M), optional) – dynamical system model.
t0 (float, optional) – determines initial time, defaults to 0.
VCap (float, optional) – the voltage stored on each capacitor before discharge, defaults to 1.
- T
total clock period \(T\) of digital control system.
- Type
float
- T1
discharge phase time
- Type
array_like, shape=(M,)
- T2
charge phase time
- Type
float
- M
number of controls \(M\).
- Type
int
- M_tilde
number of control observations \(\tilde{M}\).
- Type
int
Note
For this digital control system \(M=\tilde{M}\).
Methods
__init__(T, T1, T2, M, A[, t0, VCap])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
next_update()reset([t0])Reset the digital control clock
- 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[source]
Returns the current control state, i.e, \(\mathbf{s}[k]\).
- Returns
current control state.
- Return type
array_like, shape=(M,), dtype=numpy.int8
- control_update(t, s_tilde: ndarray)[source]
Updates the control at time t if valid.
- Parameters
t (float) – time at which the digital control i evaluated. For t > clock.T the control is updated.
s_tilde (array_like, shape=(M_tilde,)) – state vector evaluated at time t
- impulse_response(m: int, t: float) ndarray
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,)