Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/discrete_blocks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
```
Expand Down Expand Up @@ -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`.

Expand Down
Loading