PseudoRandomNoiseGenerator

Pseudo-random noise generator for signal injection.

The PseudoRandomNoiseGenerator processing block can be found in the ‘Templates’ feature in the PMP installer.

Description

The top level routing of the processing block is shown in PseudoRandomNoiseGenerator processing block routing.

pseudorandomnoise generator implementation

PseudoRandomNoiseGenerator processing block routing

Note

The PMP Generic Filter block is a GenericFilter and discretized using Tustin’s method.

Generator

When the generator is disabled the output of the generator block equals 0 and all internal counters are reset. The generator goes to lead state when the Enable input is set to True. In lead state the output of the generator remains 0. After LeadTime the generator goes to enabled state, in which the generator starts generating noise. The generator transitions to disabled state when the TimeEnabled exceeds the Duration. If the duration is set to zero (default) the generator will remain enabled infinitely.

The generator gives a pseudo-random noise sequence with output range of \([-1,1]\). The noise sequence \(N\) is calculated as follows:

\[N_{n} = \frac{X_{n}}{2147483648}-1\]

Where \(X\) is generated using an unsigned linear congruential generator algorithm:

\[\begin{split}X_{n+1} &= \left(aX_{n}+c\right) \bmod m \\ a &= 2045 \\ c &= 1 \\ m &= 4294967296\end{split}\]

The seed \(X_{0}\) can be configured via the Seed signal. The time resolution of the generator is equal to the sample period of the controller.

Interface

Inputs

Inputs

Name

Description

Enable

Trigger input, the pseudo-random noise generator starts executing when high.

Read only signals

Read only signals

Name

Description

TimeEnabled [s]

The time the pseudo random noise generator is enabled.

State

The state of the pseudo-random noise generator.

  1. StateDisabled

  2. StateLead

  3. StateEnabled

UnfilteredOutput

The output of the pseudo-random noise generator after gain and offset, before applying the generic filter.

Output

The output of the pseudo-random noise generator after the generic filter.

Read-write signals

Read-write signals

Name

Description

Gain

Factor that the pseudo random noise is multiplied by.

Offset

Value that is added to the output of the pseudo random noise after gain.

Duration [s]

Amount of time that the pseudo random noise will be active. Value zero (default) results in an infinite duration.

LeadTime [s]

Time between enabling the pseudo random noise generator and start of the pseudo random noise.

Seed

Seed of the pseudo random noise.