WOLFRAM SYSTEM MODELER
AutomaticSeedDemonstrates noise with startTime and automatic local seed for UniformNoise |
SystemModel["Modelica.Blocks.Examples.Noise.AutomaticSeed"]
This information is part of the Modelica Standard Library maintained by the Modelica Association.
This example demonstrates manual and automatic seed selection of UniformNoise blocks, as well as starting the noise at startTime = 0.5 s with an output value of y = -1 before this time. All noise blocks in this example generate uniform noise in the band y_min=-1 .. y_max=3 with samplePeriod = 0.01 s.
The blocks automaticSeed1, automaticSeed2, automaticSeed3 use the default option to automatically initialize the pseudo random number generators of the respective block. As a result, different noise is generated, see next diagram:
The blocks manualSeed1, manualSeed2, manualSeed3 use manual selection of the local seed (useAutomaticLocalSeed = false). They use a fixedLocalSeed of 1, 2, and 3 respectively. Again, different noise is generated, see next diagram:
Try to set fixedLocalSeed = 1 in block manualSeed2. As a result, the blocks manualSeed1 and manualSeed2 will produce exactly the same noise.
startTime |
Value: 0.5 Type: Time (s) Description: Start time of noise |
---|---|
y_off |
Value: -1.0 Type: Real Description: Output of block before startTime |
manualSeed1_y |
Default Value: manualSeed1.y Type: Real |
---|---|
manualSeed2_y |
Default Value: manualSeed2.y Type: Real |
manualSeed3_y |
Default Value: manualSeed3.y Type: Real |
globalSeed |
Type: GlobalSeed Description: Defines global settings for the blocks of sublibrary Noise, especially a global seed value is defined |
|
---|---|---|
automaticSeed1 |
Type: UniformNoise Description: Noise generator with uniform distribution |
|
automaticSeed2 |
Type: UniformNoise Description: Noise generator with uniform distribution |
|
automaticSeed3 |
Type: UniformNoise Description: Noise generator with uniform distribution |
|
manualSeed1 |
Type: UniformNoise Description: Noise generator with uniform distribution |
|
manualSeed2 |
Type: UniformNoise Description: Noise generator with uniform distribution |
|
manualSeed3 |
Type: UniformNoise Description: Noise generator with uniform distribution |
Date | Description | ||
---|---|---|---|
June 22, 2015 |
|