blockBandLimitedWhiteNoise

Noise generator to produce band-limited white noise with normal distribution

Extends from Modelica.Blocks.Interfaces.PartialNoise (Partial noise generator).

Information

A summary of the common properties of the noise blocks is provided in the documentation of package Blocks.Noise. This BandLimitedWhiteNoise block generates reproducible, random noise at its output according to a band-limited white noise distribution. This is performed by using a normal distribution with mu=0 and sigma = sqrt(noisePower/samplePeriod).

In order for this block to produce meaningful results, you should set the following parameters:

  • The samplePeriod of the block should be much faster (say by a factor of 100) than the fastest dynamics of the system fed by the block's outputs.
  • The noisePower of the signal should be set to the expected power per frequency of the white noise. Since many system models assume a noise power of 1, this preset may be a reasonable first choice (= default).

About sampling frequencies

Ideal white noise contains all frequencies, including infinitely high ones. However, these usually cannot be observed in physical systems, since all physical systems in one way or the other contain low-pass filters. It is thus sufficient to generate a limited range of frequency content in the noise signal, as long as it exceeds the frequencies of the subsequent dynamics by a sufficiently high factor (of e.g. 100).

About noise power

Ideal white noise has a flat, i.e. constant, power spectral density for all frequencies. It has thus infinitely high power, because the total power of a signal can be obtained by integrating the power spectral density over all frequencies. The following three ways to think of the power of a signal may be helpful:

  • The energy of a signal is the integral of its squared absolute value over time. The signal's power is this integral divided by the time span of the integral.
  • The total power of a signal can also be obtained by integrating its (two-sided) power spectral density over all frequencies.
  • The total power of a signal is finally also equal to its variance.

In order to set the correct level of the band-limited white noise power spectral density, the variance of its normal distribution can thus be influenced directly. Recalling that the samplePeriod of the noise signal generates frequency content in the range ±0.5/samplePeriod, the variance must be increased to generate sufficient total signal power. The total power must match the product of the noisePower and its frequency bandwidth 1/samplePeriod: signal power = signal variance = noisePower / samplePeriod.

Example Examples.Noise.DrydenContinuousTurbulence demonstrates how to utilize this block to model wind gust.

Parameters

TypeNameDefaultDescription
SI.PeriodsamplePeriod (from PartialNoise)Period for sampling the raw random numbers
IntegerlocalSeed (from PartialNoise)The actual localSeed
RealnoisePower1Power of white noise signal
Advanced › Noise generation
BooleanenableNoise (from PartialNoise)globalSeed.enableNoise= true: y = noise, otherwise y = y_off
Realy_off (from PartialNoise)0.0Sets y = y_off if enableNoise=false (or time<startTime, see below)
Advanced › Initialization
BooleanuseGlobalSeed (from PartialNoise)true= true: use global seed, otherwise ignore it
BooleanuseAutomaticLocalSeed (from PartialNoise)true= true: use automatic local seed, otherwise use fixedLocalSeed
IntegerfixedLocalSeed (from PartialNoise)1Local seed (any Integer number)
SI.TimestartTime (from PartialNoise)0.0Start time for sampling the raw random numbers

Connectors

TypeNameDefaultDescription
RealOutputy (from SO)Connector of Real output signal