pyFDN.td.TimeVaryingMatrix#
- class pyFDN.td.TimeVaryingMatrix(N, cycles_per_second, amplitude, fs, spread)[source]#
Stateful sinusoidally modulated orthogonal mixing matrix (time-varying feedback).
Each adjacent channel pair is rotated by a sinusoidally modulated angle, so the operator is orthogonal at every sample but never constant. Sitting on a
Recursionfeedback path, e.g.Series([Gain(A), TimeVaryingMatrix(N, 1.5, 0.35, fs, 0.1)]), it makes the loop genuinely time-varying – there is no static transfer function. This is the operator form of thepost_matrixargument ofpyFDN.process_fdn().Translation of the MATLAB implementation
timeVaryingMatrix.mfrom fdnToolbox. Original MATLAB code: (c) Sebastian Jiro Schlecht, 2019. Python translation: Alma Hova, 2026.- Parameters:
N (
int) – Number of channels (the matrix is N x N). Must be a positive even integer.cycles_per_second (
float) – Frequency of the time variation in Hz (controls oscillation speed).amplitude (
float) – Maximum angle deflection in radians (strength of modulation).fs (
float) – Sampling rate in Hz.spread (
float) – Randomness factor (controls how differently each eigenmode behaves).
- Variables:
num_pairs (int) – Number of eigenmode pairs (
N // 2), i.e. independent 2-D rotation planes.angle_amplitude (phase, frequency,) – Per-pair modulation parameters, drawn from the global NumPy RNG at construction. Seed
np.random.seedbeforehand for a reproducible modulation.sample_index (int) – Current sample index; the modulation clock.
Methods
__init__(N, cycles_per_second, amplitude, ...)filter(block)Apply the time-varying orthogonal transformation to one block.
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