PulsonixSim includes a number of waveform sources that can be used to apply stimuli to a circuit for simulation. At least one of these is necessary in a design for Spice to know what to do with the circuit. The following sections describe the various types and how to configure them, which is normally done by editing the Properties of the Part in the schematic. The easiest way to access these is to double click on the Component and select the Comp Attributes tab.
All the following generators can be found in the PulsonixSim library supplied.
Shortcuts
Default Keys: F7
Default Menu: Simulation
Command: Edit Spice Value/Model
Adding Sources
Once you have a circuit that you wish to simulate, add a Source device to provide a stimulus for the circuit. There are various ways to add a Sources to a Schematic Design:
- From the Parts Browser, ensure that Category is set to show the Spice categories.
- From the Spice category listed, click on the Sources.
- Click on the source required and drag the source into the design.
- Alternatively, from the Insert menu, select Insert Component or use Insert Component from the Schematic toolbar.
- Set the Library to Look In: to PulsonixSim.
- Select the source required and place it into the design.
Editing Sources
Once a source has been added to a design, you can select it and and press F7. This displays one of the Sources dialog. Each specific one is noted below.
DC Source
For voltage sources, the Power Supply Part is supplied, and for current use the DC Current Source Part.
These are used wherever a power supply or current generator is required, but these requirements are met by different parts which are similar in configuration.
In both cases, once added to a circuit, to edit the value, select it and press F7. This displays the DC Source dialog. Choose from the preset values or type a voltage required. The (understood) units are V and A respectively. For current it is likely that a multiplier such as ‘m’ or ‘u’ will be required.
AC Source
AC Source Parts AC Voltage Source, AC Current Source are used for AC analysis and not used for transient analysis. These can best be considered as a sine source whose frequency is swept across the simulation range. However, although not obvious, this output is based on a Fourier transform of a transient analysis, which is why the parameters for this include a DC specification without which the source won’t be recognised.
Use of F7 on the selected part will enable you to change various parameters from the AC Source dialog.
The available <Spice Parameters> are:
DC (=0)-Arbitrary 0V dc power supply, required for simulation
AC - Required label to describe an ac source
ACMAG - Signal magnitude (V) or (A) voltage/current source
ACPHASE - Initial phase (degrees) - defaults to 0
DC and AC are required names but the remaining two may be omitted. The voltage and current sources are differentiated by their <Spice Value>.
Pulse Source
Parts are available for Pulse Generator and Current Pulse Generator.
The pulse width, period, and rise and fall times are customisable, meaning, this source doesn’t only serve as a square wave generator, but can generate triangular and sawtooth waveforms as well, given appropriate parameters. It can also be configured for a continuous pulse chain or just a finite number and can have a DC offset applied if required.
The available <Spice Parameters > are (with current generator values in square brackets):
V1 - Initial value (V) [I1- Initial value (A)]
V2 - Pulsed value (V) [I2- Pulsed value (A)]
TD - Delay time to first pulse (secs) - defaults to zero
TR - Rise time (secs) - defaults to ‘.PRINT step’ from transient parameter setup
TF - Fall time (secs) - defaults to ‘.PRINT step’ from transient parameter setup
PW - Pulse width (secs) - defaults to ‘Stop Time’ from transient parameter setup
PER - Pulse period (secs) - defaults to ‘Stop Time’ from transient parameter setup
NP - number of pulses - defaults to continuous if omitted or set to ‘0’
Note that these timings are consecutive, so the pulse width does NOT take account of the rise and fall times. Consequently a 50% duty cycle requires that pulse width be set to half of ‘period minus rise time minus fall time’, or:
PW= 0.5 (PER -TR -TF)
For triangular waveforms, set the pulse width to zero and adjust the rise and fall times as required for the shape desired. If the sum of the rise and fall times equals the period, there will be no horizontal parts in the waveform.
If intermediate values are to be omitted, any subsequent parameters must be named.
Sine Generator
For transient simulation, the Sine Generator Part is supplied.
Use of F7 on the selected part will enable you to change various parameters from the Define Source dialog.
This is the most common stimulus for a transient simulation. The <Spice Value> attribute contains information as a list of parameters separated by spaces. From left to right these are:
VO - Offset voltage (V)
VA - Amplitude (V)
FREQ - Frequency (Hz)
TD - Time Delay (seconds) - defaults to zero
THETA - Damping factor (1/sec) - defaults to zero
PHASE - Phase (degrees) - defaults to zero
Only the first three parameters are essential, but unless all the remaining ones are to be omitted, the parameters must be named, as can be seen in the default values. A ‘Current Sine Generator’ is also available, the first two parameters then being IO and IA respectively, with the units being amps. Note that the default direction of current flow means it acts as a sink, as can be seen from the symbol.
Piece-wise Linear (PWL) Source
Parts are available for PWL Source and PWL Current Source.
These sources take as parameters a series of parameters describing the voltage/current to be delivered at various times during analysis, with the intermediate values being linearly interpolated. The voltage source recognises extra parameters which control repetition of the pattern whereas the current source is one shot. The first pair of parameters must always be for time zero to set the initial value.
The <Spice Parameters > provided in the part are for example only. These can be edited using the Component Attribute tab on Component Properties:
T1 - Initial time, always zero (secs)
V1 - Initial voltage (V) [I1-Initial current (A)]
T2 - x-Subsequent time points (secs)
V2 - x-Subsequent voltages (V) [I2-x-Subsequent currents (A)]
r - Repeat time point (secs)
td - Initial time delay (secs)
‘r’ and ‘td’ - only apply to voltage sources and will be ignored if used with current sources
‘r’ - specifies the first point for an indefinite repetitive cycle and must match one of the given time points. The time from 0 to ‘r’ will not repeat. ‘r’ may have the value ‘0’
‘td’ - specifies the initial delay. Its value is effectively added to all the time points in the sequence
Noise and Distortion Sources
Please see the Noise Analysis section.
Conditioned Sources (Behavioural Sources)
PulsonixSim allows circuits to contain linear dependent sources characterised by any of the four equations:
I=gv g=transconductance
V=ev e=voltage gain
I=fi f=current gain
V=hi h=transimpedance
g, e, f and h do not need to be single figures. They can also be expressions referencing other parameters, provided that expression resolves to s single figure when evaluated.
Voltage Controlled Current Source
Available as a Voltage Controlled Current Src Part.
The available <Spice Parameters > are:
VALUE- The transconductance (mohs/Siemens)
m-Multiplier - defaults to 1 if omitted
Both parameters can take expressions including other parameters as long as that expression can be resolved to a number when evaluated.
Current Controlled Current Source
Available as a Current Controlled Current Src Part. Note that this is a three-terminal device, with control and output currents sharing a pin. Also note the directions of current flow for the part.
The available <Spice Parameters > are:
VALUE - Current gain
m - Multiplier - defaults to 1 if omitted
Both parameters can take expressions including other parameters as long as that expression can be resolved to a number when evaluated.
Current Controlled Voltage Source
Available as a Current Controlled Voltage Src Part. Note that this is a three-terminal device, with control and output currents sharing a pin. Also note the directions of current flow for the part.
The available <Spice Parameters > are:
VALUE-Transimpedance (strictly transresistance as complex numbers are not supported
The parameter can take an expression including other parameters as long as that expression can be resolved to a number when evaluated.
Additional Source Types
PulsonixSim also supports the following specialised source types but as these are rarely required, they have not been implemented as parts. Please see the ngspice manual for more details.
Exponential
Single frequency FM
AM
Random Voltages/Currents
External file data
RF port
Related Topics
AC Source | DC Source | Sine Source | PWL Source | Edit Device Type | Universal Source