Ramp

Rises linearly from 0 to Height over Duration after the start time, then holds.

  • signal
  • Modelica Standard Library
  • 1 port
  • 3 parameters
BlockRampKindrampLibrarySources

Description

Outputs zero until Start time, then rises in a straight line to Height over Duration and holds Height from then on (the Modelica library ramp).

Example

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

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

Also in this example:ConstantStepSine wavePulseClock

Ports

Outputs 1

  • y

    Output signal: 0 before Start time, rising to Height, then Height.

Parameters

  • Heightheight1

    The value reached at the end of the ramp. Negative values ramp down.

  • Durationduration1 s

    ≥ 0

    Time the rise takes, in seconds, so the slope is Height / Duration. 0 or more; 0 makes a step.

  • Start timestartTime0 s

    ≥ 0

    Time the ramp starts, in seconds. 0 or more.

Equations

Modelica
y = 0 for time < startTime
y = height · (time − startTime) / duration for startTime ≤ time < startTime + duration
y = height for time ≥ startTime + duration

Implementation

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

Tips

  • For a ramp that keeps rising for the whole run, set Duration to the run length and Height to slope · Duration.

Used in

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

  • EV drivetrain
  • 480 VAC → 24 VDC flyback

See also

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