waveforms

Use this forum to post Vensim related questions.
Post Reply
ETNC(SS)
Junior Member
Posts: 2
Joined: Wed Jan 13, 2010 4:17 am

waveforms

Post by ETNC(SS) »

I am using Vensim PLE and am wondering about the best approach to modeling various waveform inputs to a model, such as a square wave, sawtooth wave, sine wave. I admit I am new to Vensim, but so far I have not had any success trying multiple STEP functions or IF THEN ELSE logic.

Any and all advice is more than welcome....

Thanks in advance!
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

For a sinusoid use SIN(Time/period*6.28) (you will need to add Time to the view as a shadow variable and connect it to your variable). For a square wave use something like PULSE TRAIN(0,10,20,100). For a sawtooth you probably need something like

var = MODULO(Time,Period)*amplitude/period
ETNC(SS)
Junior Member
Posts: 2
Joined: Wed Jan 13, 2010 4:17 am

Post by ETNC(SS) »

Bob,

Thank you very much for the suggestions, and I will experiment with them.

I seem to have few problems modeling fluid systems, but electrical systems have proven more difficult!

Cheers,

ETNC(SS)
Post Reply