.Modelica_LinearSystems2.Controllers.Noise

Information

If discrete block, the output y is sampled according to sample time sampleClock.sampleTime * sampleFactor, where sampleClock.sampleTime is defined globally in the outer component sampleClock and sampleFactor is an Integer parameter of component Noise. At every sample time, a random output signal y in the range y_min .. y_max is generated, where y_min and y_max are parameters. A typical noise signal is shown in the next figure:

The Integer[3] parameter vector firstSeed is used to initialize the basic random number generator. The 3 elements of firstSeed need to be in the range [0, 255]. The use of the same seed vector will lead to the same sequence of numbers when these are computed serially. This is usually not desired. Therefore, for every usage of block Noise a different firstSeed should be defined.

If continuous block, the output y = 0.0, i.e., no noise signal is generated. The reason is that the noise can only reasonably be used in a simulation if it is a discrete signal, i.e., changes its value only at sample instants. Since a continuous block is usually used to speed up the simulation, the noise should also be turned off because it will otherwise significantly limit the maximum step size of the integrator.
 

This noise generator is based on a function that generates a random real number uniformly in the semi-open range [0.0, 1.0). The function uses the standard Wichmann-Hill generator, combining three pure multiplicative congruential generators of modulus 30269, 30307 and 30323. Its period (how many numbers it generates before repeating the sequence exactly) is 6,953,607,871,644. While of much higher quality than the rand() function supplied by most C libraries, the theoretical properties are much the same as for a single linear congruential generator of large modulus.


Generated at 2024-12-17T19:26:02Z by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos