Skip to content

Commit fdf8d57

Browse files
committed
add to docs
1 parent b5ef30c commit fdf8d57

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

docs/src/blocks.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
## Noise and measurement corruption
1717
- [`NormalNoise`](@ref)
1818
- [`Quantization`](@ref)
19+
- [`SampleWithADEffects`](@ref)
1920
- [`UniformNoise`](@ref)
2021

2122
## Controllers
@@ -25,6 +26,7 @@
2526

2627
## Discrete-time filters
2728
- [`ExponentialFilter`](@ref)
29+
- [`MovingAverageFilter`](@ref)
2830

2931

3032
## Docstrings

docs/src/tutorials/noise.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ plot(figy, figu, plot_title = "DC Motor with Discrete-time Speed Controller")
8888
You may, e.g.
8989
- Use [`ExponentialFilter`](@ref) to add exponential filtering using `y(k) ~ (1-a)y(k-1) + a*u(k)`, where `a` is the filter coefficient and `u` is the signal to be filtered.
9090
No discrete-time filter components are available yet. You may, e.g.
91-
- Add moving average filtering using [`MovingAverageFilter`](@ref) according to `y(k) ~ 1/N * sum(u(k-i) for i=0:N-1)`, where `N` is the number of samples to average over.
91+
- Use [`MovingAverageFilter`](@ref) to add moving average filtering according to `y(k) ~ 1/N * sum(u(k-i) for i=0:N-1)`, where `N` is the number of samples to average over.
9292

9393
## Colored noise
9494
Colored noise can be achieved by filtering white noise through a filter with the desired spectrum. No components are available for this yet.

src/discrete_blocks.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@ end
10421042
"""
10431043
MovingAverageFilter(N = 3)
10441044
1045-
Exponential filtering with input-output relation ``y(z) = sum(u(z-i) for i in 0:N-1) / N``.
1045+
Exponential filtering with input-output relation ``y(z) = \\dfrac{1}{N} \\sum_{i=0}^{N-1} u(z-i)``.
10461046
10471047
Please note: this implementation of a moving average filter is not optimized for very large number of filter taps `N`.
10481048

0 commit comments

Comments
 (0)