Description

The Signal Generator produces various types of electrical signals with configurable parameters including amplitude, frequency, offset, phase, and duty cycle. It supports multiple waveform profiles and automatically detects signal states such as high, low, rising edge, and falling edge.


Example Use Cases

  • Clock Signal Generation: Provide timing signals for digital components and data encoding models.
  • Sensor Excitation: Generate test signals for sensor calibration and verification.
  • Control System Testing: Produce reference waveforms for control loop analysis.

Module Implementation

The signal generator produces time-varying output based on the selected profile and control type (voltage or current).

Signal Profiles

The generator supports the following waveform types:

ProfileDescription
ConstantFixed DC value
SineSinusoidal waveform
SquareDigital square wave with configurable duty cycle
TriangleSymmetric triangle wave
SawtoothRising ramp that resets at each period
PulsePulse wave with variable duty cycle
RampBidirectional ramp waveform

Sine Wave

The sinusoidal output is calculated as:

where is the amplitude, is the frequency, is the phase, and is the DC offset.

Square and Pulse Waves

For square and pulse waveforms, the duty cycle determines the fraction of each period spent in the high state:

State Detection

The generator automatically determines the signal state based on the waveform:

  • High/Low: Signal is at or near peak/trough values
  • Rising Edge: Signal is transitioning from low to high
  • Falling Edge: Signal is transitioning from high to low
  • Constant: Signal is not time-varying

An edge detection window parameter controls how transitions are classified relative to the simulation time step.


Assumptions/Limitations

  • The generator outputs either voltage or current based on the control type setting, not both simultaneously.
  • Edge detection accuracy depends on the simulation time step relative to the signal frequency.