 
 
 
 
 
 
 
  
SIN args
SIN offset amplitude frequency delay damping
The component value is a sinusoidal function of time, with optional exponential decay.
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;
}
 
 
 
 
 
 
