Sine Wave

Purpose

Generate time-based sine wave with optional bias

Library

Control / Sources

Description

../../_images/sine_wave.svg

The Sine Wave block generates a sinusoidal output signal with an optional bias according to the equation

\[y = A\cdot\sin(\omega\cdot t + \varphi) + C\quad\quad\quad\quad\omega = 2\pi f\]

If a variable-step solver is used, the solver step size is automatically limited to ensure that a smooth waveform is produced.

Example Model

  • See the example model “Sine Wave Generator”.

  • Find it in PLECS under Help > PLECS Documentation > List of Example Models.

Parameters

Amplitude

The amplitude \(A\) of the sine wave signal.

Bias

The offset \(C\) that is added to the sine wave signal.

Frequency

The frequency of the sine wave in hertz (\(f\)) or radians/second (\(\omega\)), see below.

Phase

The phase \(\varphi\) of the sine wave in rad, per unit \((\mathrm{p.u.})\) or degrees, see below. The parameter value should be in the range \([0, 2\pi]\), \([0, 1]\) or \([0, 360]\) respectively.

Units for frequency and phase

The frequency and phase can be expressed in terms of (rad/s, rad), (Hz, p.u.) or (Hz, degrees). If the phase is expressed in per unit \((\mathrm{p.u.})\), a value of 1 is equivalent to the period length.

Probe Signals

Output

The block output signal.