pyFDN.td.ControllableFullWaveRect#
- class pyFDN.td.ControllableFullWaveRect(channels, alpha, active_channels)[source]#
Stateful, controllable, memoryless nonlinearity,
y[n, c] = g_cfwr * ((1 - alpha) * x[n, c] + alpha * abs(x[n, c])), applied toactive_channelsonly; the rest pass through unchanged.At
alpha = 0the nonlinearity drops out and only the DC blocker below is left, atalpha = 1it is a full-wave rectifier;g_cfwr = sqrt(2 - 2 * abs(alpha - 0.5))keeps the output power roughly constant acrossalpha.abs(x)here is not the plain absolute value but its first-order antiderivative-antialiasing approximation (Parker et al. 2016), which reduces the aliasing that rectification would otherwise fold back from above Nyquist. The result is passed through an internalDCBlockerwith energy compensation, since rectification also injects a DC offset that would otherwise accumulate in a feedback loop.Methods
__init__(channels, alpha, active_channels)abs(x)anti_dev(x)filter(block)Filter one block and advance internal state.
process(signal, *[, squeeze])Filter a whole signal in one call, from the current state.
reset()Clear internal state (no-op for stateless operators).
Attributes
in_channelsout_channels