GaussianNoiseGenerator
Generates Gaussian (normal) random noise with a given covariance (variance per sample), one sample per input sample.
Processing
- One noise sample is output each time a Covariance sample arrives (Covariance is the triggering input), so the output rate is the rate of the Covariance input.
- Output = sqrt(|Covariance|) * n, where n is a standard normal random number (MT19937 uniform random numbers and the polar method). The variance of each sample is |Covariance|, whatever the sampling rate.
Data format
- Input: scalar (vector size 1; otherwise the component stops with an error). Output: Float64 scalar with the timestamp of the Covariance input.
Notes
- Feed Covariance from a periodic source (e.g. a number generator) at the desired output rate.
- To simulate the measurement noise of a Kalman filter, give Covariance the same value as the filter's measurement noise covariance R.
- The random sequence starts from the same seed at every start, so a run gives the same noise each time, on Windows and Linux alike.
References
- [1] M. Matsumoto and T. Nishimura, "Mersenne Twister: A 623-Dimensionally Equidistributed Uniform Pseudo-Random Number Generator," ACM Transactions on Modeling and Computer Simulation, vol. 8, no. 1, pp. 3-30, 1998. Used through std::mt19937 of the C++ standard library. https://doi.org/10.1145/272991.272995 — Used for: uniform random numbers (MT19937).
- [2] G. Marsaglia and T. A. Bray, "A Convenient Method for Generating Normal Variables," SIAM Review, vol. 6, no. 3, pp. 260-264, 1964. https://doi.org/10.1137/1006063 — Used for: normal random numbers (polar method).
Outputs
| Name | Description |
|---|---|
GaussianNoise | Gaussian noise sample (mean 0, variance |Covariance|). Type: Float64 |
Inputs
| Name | Description |
|---|---|
Covariance | Covariance (variance per sample) of the output noise. Each sample triggers one output sample. Type: Float64 |
RTMaps Toolkits Documentation