next up previous contents
Next: TANH: Hyperbolic tangent transfer Up: Behavioral modeling Previous: SFFM: Frequency Modulation time   Contents

Subsections

SIN: Sinusoidal time dependent value

Syntax

SIN args
SIN offset amplitude frequency delay damping

Purpose

The component value is a sinusoidal function of time, with optional exponential decay.

Comments

For voltage and current sources, this is the same as the Spice SIN function, with some extensions.

It generates either a steady sinusoid, or a damped sinusoid.

If delay and damping are both zero, you get a steady sine wave at the specified frequency. Otherwise, you get a damped pulsed sine wave, starting after delay and damping out with a time constant of 1/damping.

The shape of the waveform is described by the following algorithm:

reltime = time - _delay
if (reltime > 0.){
  ev = _amplitude * sin(2*PI*_freq*reltime);
  if (_damping != 0.){
    ev *= exp(-reltime*_damping);
  }
  ev += _offset;
}else{
  ev = _offset;
}

Parameters

Offset = x
DC offset. (Default = 0.)

Amplitude = x
Peak amplitude. (Default = 1.)

Frequency = x
Frequency, Hz. (required)

Delay = x
Turn on delay, seconds. (Default = 0.)

Damping = x
Damping factor, 1/seconds. (Default = 0.)


next up previous contents
Next: TANH: Hyperbolic tangent transfer Up: Behavioral modeling Previous: SFFM: Frequency Modulation time   Contents
Al Davis 2002-03-26