You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note how the default mid-rise quantizer mode has a rise at the middle of the interval, while the mid-tread mode has a flat region (a tread) centered around the middle of the interval.
148
149
149
150
The default option `midrise = true` includes both end points as possible output values, while `midrise = false` does not include the upper limit.
151
+
152
+
153
+
## Sampling with AD effects
154
+
The block [`SampleWithADEffects`](@ref) combines a [`Sampler`](@ref), a [`NormalNoise](@ref) and a [`Quantization`](@ref) block to simulate the effects of practical sampling, noise and quantization in an AD converter. The block has the connectors `input` and `output`, where the input is the continuous-time signal to be sampled, and the output is the quantized, noisy signal. Example
A sampler with additional effects that appear in practical systems, such as measurement noise and quantization.
1020
+
1021
+
The operations occur in the order
1022
+
1. Sampling
1023
+
2. Noise addition
1024
+
3. Quantization
1025
+
1026
+
# Structural parameters:
1027
+
- `quantized`: If true, the output is quantized. When this option is used, the output is quantized to the number of bits specified by the `bits` parameter. The quantization is midrise if `midrise = true`, otherwise it is midtread. The output is also limited to the range `[y_min, y_max]`.
1028
+
- `noisy`: If true, the output is corrupted by additive white Gaussian noise with standard deviation `sigma` (defaults to 0.1). If `noisy = false`, the noise block is a unit gain.
1029
+
- `dt`: Sample interval of the sampler. If not specified, the sample interval is inferred from the clock of the system.
1030
+
- `clock`: Clock signal of the system. If not specified, the sample interval is inferred from the clock of the system. If `clock` is specified, the parameter `dt` has no effect.
1031
+
1032
+
# Parameters:
1033
+
- `y_min`: Lower limit of output, defaults to -1. Only used if `quantized = true`.
1034
+
- `y_max`: Upper limit of output, defaults to 1. Only used if `quantized = true`.
1035
+
- `bits`: Number of bits of quantization, defaults to 8 (256 output levels between `y_min` and `y_max`). Only used if `quantized = true`.
1036
+
- `sigma`: Standard deviation of the additive Gaussian noise, defaults to 0.1. Only used if `noisy = true`.
0 commit comments