modelNormalNoiseProperties
Demonstrates the computation of properties for normally distributed noise
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
This example demonstrates statistical properties of the Blocks.Noise.NormalNoise block using a normal random number distribution with mu=3, sigma=1. 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 normal noise with mu=3 is 3 and the variance of normal noise is sigma^2, so 1. The simulation results above show good agreement (after a short initial phase). This demonstrates that the random number generator and the mapping to a normal distribution have good statistical properties.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Real | mu | 3 | Mean value for normal distribution |
| Real | sigma | 1 | Standard deviation for normal distribution |
| Real | pMean | mu | Theoretical mean value of normal distribution |
| Real | var | sigma^2 | Theoretical variance of uniform distribution |
| Real | std | sigma | Theoretical standard deviation of normal distribution |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Noise.GlobalSeed | globalSeed | ||
| Real | meanError_y | meanError.y | |
| Real | sigmaError_y | sigmaError.y | |
| Modelica.Blocks.Noise.NormalNoise | 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 |
|