diff --git a/src/discrete_blocks.jl b/src/discrete_blocks.jl index d764eb8..cf4ae09 100644 --- a/src/discrete_blocks.jl +++ b/src/discrete_blocks.jl @@ -194,6 +194,9 @@ end Internal function. This function seeds the seed parameter as well as the current simulation time. """ function seeded_randn(seed, t) + if rand() < 0.1 + @show t + end rng = StableRNGs.StableRNG(hash(t, hash(seed))) randn(rng) end @@ -1010,7 +1013,7 @@ end """ ExponentialFilter(a = 0.1) -Exponential filtering (first-order filter) with input-output relation ``y(z) ~ (1 - a) y(z-1) + a u(z-1)``, transfer function +Exponential filtering (first-order filter) with input-output relation ``y(z) = (1 - a) y(z-1) + a u(z-1)``, transfer function ```math Y(z) = \\dfrac{a}{1 - (1 - a) z^{-1}} U(z) ``` @@ -1042,7 +1045,7 @@ end """ MovingAverageFilter(N = 3) -Exponential filtering with input-output relation ``y(z) ~ sum(u(z-i) for i in 0:N-1) / N``. +Exponential filtering with input-output relation ``y(z) = sum(u(z-i) for i in 0:N-1) / N``. Please note: this implementation of a moving average filter is not optimized for very large number of filter taps `N`.