Sine wave

A continuous sinusoid.

  • signal
  • Modelica Standard Library
  • 1 port
  • 4 parameters
BlockSine waveKindsineLibrarySources

Description

A continuous sinusoid with adjustable amplitude, frequency in hertz, phase, and offset (the Modelica library sine source).

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

Modelica Standard Library 4.1.0Modelica.Blocks.Sources.Sine
MSL documentation

Assumptions and limitations

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

Tips

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

See also

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