BlockWerk Documentation
📊

PulseGenerator

Sources

The Pulse Generator block creates square wave pulse signals with configurable parameters. It generates periodic pulses that alternate between high and low values, making it useful for creating timing signals, reference waveforms, and test inputs for digital systems.

The block produces a square wave output that spends a portion of each period at the high amplitude level (determined by the duty cycle) and the remainder at zero. The phase delay allows for shifting the pulse timing relative to the simulation start.

Simulate in BlockWerk

Interactive sandbox directly in your browser — zero installation, WASM-powered.

Simulate in BlockWerk →

Mathematical Model

The Pulse Generator block implements:

y(t)={A,(t+delay) mod P<D100P0,otherwisey(t) = \begin{cases} A, & (t + \text{delay}) \bmod P < \frac{D}{100} P \\ 0, & \text{otherwise} \end{cases}

Where:

  • t is simulation time
  • amplitude is pulse height
  • period is time between pulse starts
  • dutyCycle is percentage of time signal is high
  • phaseDelay is time offset

Inputs & Outputs

Direction ID Label Type Status
→ In trigger Trigger number Optional
← Out out Output number Output

Parameters

Parameters Label Type Default Description
amplitude Amplitude number 1
period Period number 1
dutyCycle Duty Cycle number 50
phaseDelay Phase Delay number 0
numberOfPulses Number of Pulses (0=∞) number 0 Number of pulses to generate (0 for infinite)
enableTrigger Show Trigger Input boolean false Enables the external reset trigger input

Usage Examples

1Hz Square Wave

Basic 50% duty cycle signal:

PulseGenerator (period: 1, dutyCycle: 50) → NumericDisplay

Short Pulse Trigger

Generate a 0.1s pulse every 2 seconds:

PulseGenerator (period: 2, dutyCycle: 5) → LogicSystem

Remarks & Best Practices

  • Timing Alignment: Use phaseDelay to align pulses with other time-based signals.
  • Discrete Events: Ideal for representing clock signals or periodic activations.
  • Simulation Step: For very short pulses, ensure the simulation step size is small enough to capture the pulse high-time.

Related Components

  • SignalGenerator: For bipolar square waves and other periodic signals
  • Step: For a single transition event
  • Constant: For steady signal sources