Main Content

Triangle Generator

Generate symmetrical triangle waveform at regular intervals

  • Triangle Generator block

Simscape / Electrical / Specialized Power Systems / Sources / Signal Generator Sources


The Triangle Generator block generates a symmetrical triangle waveform, with peak amplitude of +/−1. The figure shows how the Frequency and Phase block parameters affect the output waveform.


Sample TimeSpecified in the Sample Time parameter
Continuous if Sample Time = 0
Scalar ExpansionNo
Zero-Crossing DetectionNo


The power_SignalGenerators example shows various uses of the Triangle Generator block.


expand all

To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.

Frequency of the triangle waveform, in hertz.

Delay of the triangle waveform, in degrees. When the phase is set to 0, the waveform starts with an amplitude of -1 and a positive slope.

Sample time of the block, in seconds. Set to 0 to implement a continuous block.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2013a