# Function to Simulate Realistic Waveform

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.

• Realistic for what? You can see such waveforms, but they may also be sharper or more distorted. Depends...
– user76844
Commented Oct 14, 2015 at 19:44
• 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). Commented Oct 14, 2015 at 19:44
• 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? Commented Oct 14, 2015 at 19:51
• Why not simply model an ideal waveform and feed that through your choice of low pass filter?
– user16324
Commented Oct 14, 2015 at 19:57

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:

Square wave (faster):

Sawtooth:

Sawtooth (faster):

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

Triangle (faster):