SampleWithADeffectsSample with (simulated) Analog-Digital converter effects including noise |
This information is part of the Modelica Standard Library maintained by the Modelica Association.
This block is similar to the Sample block. The only difference is that after the sampling of the input signal, simulated real-world effects are applied on the sampled signal. In particular:
The following example samples a sine signal with a periodic clock of 20 ms period, and adds the following effects:
model | simulation result |
The output y is quite far away from the continuous-time input signal,
due to the strong discretization and large noise applied to the
sampled input.
noisy |
Value: false Type: Boolean Description: = true, if output should be superimposed with noise |
---|---|
limited |
Value: false Type: Boolean Description: = true, if output is limited |
quantized |
Value: false Type: Boolean Description: = true, if output quantization effects included |
yMax |
Value: 1 Type: Real Description: Upper limit of output (if limited = true) |
yMin |
Value: -yMax Type: Real Description: Lower limit of output (if limited = true) |
bits |
Value: 8 Type: Integer Description: Number of bits of quantization (if quantized = true) |
u |
Type: RealInput Description: Connector of continuous-time, Real input signal |
|
---|---|---|
y |
Type: RealOutput Description: Connector of clocked, Real output signal |
sample1 |
Type: Sample |
|
---|---|---|
noise |
Type: UniformNoise Description: Noise model |
|
limiter |
Type: Limiter |
|
quantization |
Type: Quantization |
Modelica.Clocked.Examples.SimpleControlledDrive Simple controlled drive with discrete controller and simulated AD and DA effects |
|
Modelica.Clocked.Examples.Elementary.RealSignals Example of a SampleWithADeffects block for Real signals |