PulseGenerator
SourcesThe 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.
Mathematical Model
The Pulse Generator block implements:
Where:
tis simulation timeamplitudeis pulse heightperiodis time between pulse startsdutyCycleis percentage of time signal is highphaseDelayis 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) → LogicSystemRemarks & Best Practices
- Timing Alignment: Use
phaseDelayto 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