modelUniformNoiseProperties
Demonstrates the computation of properties for uniformly distributed noise
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
This example demonstrates statistical properties of the Blocks.Noise.UniformNoise block using a uniform random number distribution. Block "noise" defines a band of 0 .. 6 and from the generated noise the mean and the variance is computed with blocks of package Blocks.Math. Simulation results are shown in the next diagram:
The mean value of a uniform noise in the range 0 .. 6 is 3 and its variance is 3 as well. The simulation results above show good agreement (after a short initial phase). This demonstrates that the random number generator and the mapping to a uniform distribution have good statistical properties.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Real | y_min | 0 | Minimum value of band |
| Real | y_max | 6 | Maximum value of band |
| Real | pMean | (y_min + y_max)/2 | Theoretical mean value of uniform distribution |
| Real | var | (y_max - y_min)^2/12 | Theoretical variance of uniform distribution |
| Real | std | sqrt(var) | Theoretical standard deviation of uniform distribution |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Noise.GlobalSeed | globalSeed | ||
| Real | meanError_y | meanError.y | |
| Real | sigmaError_y | sigmaError.y | |
| Modelica.Blocks.Noise.UniformNoise | noise | ||
| Modelica.Blocks.Math.ContinuousMean | mean | ||
| Modelica.Blocks.Math.Variance | variance | ||
| Modelica.Blocks.Math.MultiProduct | theoreticalVariance | ||
| Modelica.Blocks.Math.Feedback | meanError | ||
| Modelica.Blocks.Sources.Constant | theoreticalMean | ||
| Modelica.Blocks.Math.Feedback | varianceError | ||
| Modelica.Blocks.Sources.Constant | theoreticalSigma | ||
| Modelica.Blocks.Math.StandardDeviation | standardDeviation | ||
| Modelica.Blocks.Math.Feedback | sigmaError |
Revisions
| Date | Description | ||
|---|---|---|---|
| June 22, 2015 |
|