4.9  PULSE: Pulsed time dependent value

4.9.1  Syntax

PULSE args
PULSE iv pv delay rise fall width period

4.9.2  Purpose

The component value is a pulsed function of time.

4.9.3  Comments

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

The shape of a single pulse is described by the following algorithm:
if (time > _delay+_rise+_width+_fall){
  // past pulse
  ev = _iv;
}else if (time > _delay+_rise+_width){
  // falling
  interp=(time-(_delay+_rise+_width))/_fall;
  ev = _pv + interp * (_iv - _pv);
}else if (time > _delay+_rise){
  // pulsed value
  ev = _pv;
}else if (time > _delay){
  // rising
  interp = (time - _delay) / _rise;
  ev = _iv + interp * (_pv - _iv);
}else{
  // initial value
  ev = _iv;
}
For other components, it gives a time dependent value.

As an extension beyond Spice, you may specify the parameters as name=value pairs in any order.

4.9.4  Parameters

IV = x
Initial value. (required)

PV = x
Pulsed value. (required)

DELAY = x
Rise time delay, seconds. (Default = 0.)

RISE = x
Rise time, seconds. (Default = 0.)

FALL = x
Fall time, seconds. (Default = 0.)

WIDTH = x
Pulse width, seconds. (Default = 0.)

PERIOD = x
Repeat period, seconds. (Default = infinity.)