Sine wave

A continuous sinusoid.

  • signal
  • Gradara equations
  • 1 port
  • 4 parameters
BlockSine waveKindsineLibrarySources

Description

A continuous sinusoid with adjustable amplitude, frequency in hertz, phase, and offset.

Example

Signal sources The signal sources side by side: step, ramp, sine, pulse, and clock, plus a constant.

ConstantStepRampSinePulseClock
In Gradara, select a Sine wave block and press F1, then choose Open example. It opens as a new model in My models, ready to run.

Also in this example:ConstantStepRampPulseClock

Ports

Outputs 1

  • y

    Output signal.

Parameters

  • Amplitudeamplitude1

    Peak deviation from Offset. A negative value inverts the wave.

  • Frequencyfrequency1 Hz

    ≥ 0

    Frequency, in Hz (cycles per second, not rad/s). 0 or more; 0 gives the constant offset + amplitude · sin(phase).

  • Phasephase0 rad

    Phase at time 0, in radians.

  • Offsetoffset0

    Value the wave oscillates around.

Equations

Modelica
y = offset + amplitude · sin(2π · frequency · time + phase)

Implementation

The block’s Modelica model
y = offset + amplitude*sin(6.283185307179586*frequency*time + phase);

Assumptions and limitations

  • The wave runs from time 0; there is no start time.

Tips

  • For a cosine, set Phase to π/2 (1.5708).

Used in

These larger examples use it too. Open them from Examples in the app.

  • 480 VAC → 24 VDC flyback

See also

Select a block in Gradara and press F1 to open its page offline.