SineGenerator

Sine generator for signal injection.

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

Description

The implementation of the processing block is shown in SineGenerator processing block routing.

sine generator implementation

SineGenerator 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 starts executing the sequence. The sequence is repeated for the number of times specified using the RepeatCount signal. The generator transitions to disabled state when the Iteration exceeds the RepeatCount. If the repeat count is set to zero (default) the generator will remain enabled infinitely.

\[SineOutput = sin(2 \ pi \ Frequency \ t + Phase);\]

When the Frequency input changes the time \(t\) in the iteration of the sine is scaled accordingly to prevent steps on the output signal.

Interface

Inputs

Inputs

Name

Description

Enable

Trigger input, the trapezium generator starts executing when high.

Frequency

Frequency of the sine.

Read only signals

Read only signals

Name

Description

Iteration

The iteration number of the sine generator.

State

The state of the sine generator.

  1. StateDisabled

  2. StateLead

  3. StateEnabled

UnfilteredOutput

The output of the sine generator after gain and offset, before applying the generic filter.

Output

The output of the sine generator after the generic filter.

Read-write signals

Read-write signals

Name

Description

Gain

Amplitude of the sine.

Offset

Value that is added to the output of the sine after gain.

Phase [rad]

The phase of the sine at the start of the waveform generation.

RepeatCount

Amount of times that the sine will be repeated.

LeadTime [s]

Time between enabling the sine generator and starting the first iteration of the profile.