I need to simulate a realistic signal voltage triangle waveform in Mathematica. I know that a real waveform won't have sharp corners, but I don't remember exactly what a real triangle wave looks like. I have been using the waveforms suggested here and am curious if they are realistic.

My simulations are in the .01 GHz to 2 GHz bandwidth.

  • 1
    \$\begingroup\$ Realistic for what? You can see such waveforms, but they may also be sharper or more distorted. Depends... \$\endgroup\$
    – user76844
    Oct 14, 2015 at 19:44
  • \$\begingroup\$ The square waves and sawtooth waves on that link don't have any overshoot/reflections, which will occur in reality on the fast transitions if the characteristic impedances are not matched well. The triangle wave is more likely to be correct as there are no fast transitions (unless you're talking about a 2 GHz triangle wave). \$\endgroup\$
    – Justin
    Oct 14, 2015 at 19:44
  • \$\begingroup\$ Thanks @justin. So for the square and saw tooth, better to use a a Fourier expansion? In the case of a 2 GHz triangle wave, will the corners just get more curved, or will there be additional shapes? \$\endgroup\$ Oct 14, 2015 at 19:51
  • \$\begingroup\$ Why not simply model an ideal waveform and feed that through your choice of low pass filter? \$\endgroup\$
    – user16324
    Oct 14, 2015 at 19:57

1 Answer 1


It varies with the situation. In the real world, there will be some transmission line effects, mainly filtering out higher frequencies but also some reflections. I found a circuit lab schematic/simulation someone named signality created with a lumped-element model of a transmission line, and I've slightly modified it.


simulate this circuit – Schematic created using CircuitLab

The simulation is set up to plot with R2 (the load termination) equal to 30 ohms, 50 ohms (nominal), and 70 ohms.

You can change this test bench to simulate your own source and export csv data to use in your simulation. It probably won't match your situation exactly (particularly the frequency scaling), but take a look at the shapes below.

I know you only asked about triangle waves, but square waves and sawtooth waves are also interesting. They are worse than triangle waves because of the higher-frequency components involved in sharp transitions.

Square wave:

enter image description here

Square wave (faster):

enter image description here


enter image description here

Sawtooth (faster): enter image description here

Triangle: enter image description here You can see how there are minor "humps" in the trace due to the reflections.

Triangle (faster): enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.