cbadc.simulator.numerical_simulator.FullSimulator

class cbadc.simulator.numerical_simulator.FullSimulator(analog_system: Union[AnalogSystem, ChainOfIntegrators, LeapFrog], digital_control: Union[DigitalControl, MultiLevelDigitalControl], input_signal: List[_AnalogSignal], initial_state_vector: array = None, state_noise_covariance_matrix: ndarray = None, atol: float = 1e-15, rtol: float = 1e-10, seed: int = 4212312513432239834528672)[source]

Bases: _BaseSimulator

Simulate the analog system and digital control interactions in the presence on analog signals.

Parameters
  • analog_system (cbadc.analog_system.AnalogSystem) – the analog system

  • digital_control (cbadc.digital_control.DigitalControl) – the digital control

  • input_signals ([cbadc.analog_signal.AnalogSignal]) – a python list of analog signals (or a derived class)

  • initial_state_vector (array_like, shape=(N), optional) – initial state vector.

  • state_noise_covariance_matrix (array_like, shape=(N, N), optional) – the covariance matrix of white noise contributions at the state vector during each control step.

  • atol (float, optional) – Relative and absolute tolerances. The solver keeps the local error estimates less.

  • rtol (float, optional) – Relative and absolute tolerances. The solver keeps the local error estimates less.

analog_system

the analog system being simulated.

Type

cbadc.analog_system.AnalogSystem

digital_control

the digital control being simulated.

Type

cbadc.digital_control.DigitalControl

t

current time of simulator.

Type

float

rtol, atol

Relative and absolute tolerances. The solver keeps the local error estimates less than atol + rtol * abs(y). Effects the underlying solver as described in scipy.integrate.solve_ivp(). Default to 1e-3 for rtol and 1e-6 for atol.

Type

float, optional

Yields

array_like, shape=(M,)

Methods

__init__(analog_system, digital_control, ...)

observations()

return the current analog system observations.

reset([t])

reset initial time of simulator and digital control

state_vector()

return current analog system state vector \(\mathbf{x}(t)\) evaluated at time \(t\).

Attributes

res

observations() ndarray

return the current analog system observations.

in other words we return

\(\mathbf{y}(t) = \mathbf{C}^{\mathsf{T}} \mathbf{x}(t)\)

Returns

returns the analog system observation :math:`mathbf{y}(t)

Return type

array_like, shape=(N_tilde,)

reset(t: float = 0.0)

reset initial time of simulator and digital control

state_vector() ndarray

return current analog system state vector \(\mathbf{x}(t)\) evaluated at time \(t\).

Returns

returns the state vector \(\mathbf{x}(t)\)

Return type

array_like, shape=(N,)