Pulse

A periodic rectangular pulse.

  • signal
  • Gradara equations
  • 1 port
  • 4 parameters
BlockPulseKindpulseLibrarySources

Description

A periodic rectangular wave switching between Amplitude and 0. Each period starts high for Duty cycle · Period, then stays at 0 for the rest.

Start time sets where the periods are aligned: a period begins at Start time, and at every whole multiple of Period before and after it.

Example

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

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

Also in this example:ConstantStepRampSine waveClock

Ports

Outputs 1

  • y

    Output signal: Amplitude or 0.

Parameters

  • Amplitudeamplitude1

    Value during the high part of each period.

  • Periodperiod1 s

    ≥ 0.0001

    Length of one period, in seconds. At least 0.0001 s.

  • Duty cyclewidth0.5

    ≥ 0

    Duty cycle: the high fraction of each period, from 0 to 1. 0 keeps the output at 0; 1 or more keeps it at Amplitude.

  • Start timestartTime0 s

    ≥ 0

    Alignment time of the periods, in seconds. 0 or more.

Equations

Modelica
y = amplitude if mod(time − startTime, period) < width · period
y = 0 otherwise

Implementation

The block’s Modelica model
y = if mod(time - startTime + period, period) < width*period then amplitude else 0;

Assumptions and limitations

  • Start time only shifts the wave; it does not hold the output at 0 before it. The pulse is already running before Start time.
  • The low level is always 0.

Tips

  • For a Boolean pulse train, use Boolean pulse instead.

Used in

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

  • Data center cooling control

See also

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