The universal source provides the function of transient, AC and DC sources all in one device. In addition, it may be used to create a random noise source.
Most of the possible source types are already available as predefined Parts, but this allows you to create your own custom source. This is done from the properties of the source by editing the <Spice Parameters>.
Note that only absolute sources can be modelled by these sources. If you require a source influenced by external controls (known as a behavioural source) you will have to select the appropriate source as the universal sources do not provide the necessary input pins.
An alternative to defining a universal source component is to use one of the specific source components: Current Source, DC Current Source) and PWL (Current) Source.
Shortcuts
Default Keys: F7
Default Menu: Simulation
Command: Edit Spice Value/Model
How To Add A Universal Source Component
Once you have a circuit that you wish to simulate, add some signal source devices to provide a stimulus for the circuit. There are various ways to add a Source device 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.
- Select the source required and drag it into the design, or
- From the Simulation> menu, click on Sources>, select on the source required and place it in the design, or
- From the Insert menu, select Insert Component, select the source required from the PulsonixSim library.
How To Define a Source’s Signal
In a Schematic Design, double click on the Source device that you wish to change, this will open the Properties. Select the Comp Attributes tab, double click on <Spice Parameters> or select and Edit.
This is where you define the parameters for your chosen source type. You have already selected whether is will be a voltage or current source by the type of source you have already chosen. Here are the main available parameters for analog sources. For sinusoidal and pulse options, see the links below. Note the angled brackets which determine the correct sequence and dependencies. Omitting a parameter not required will also remove the need for any in dependent brackets:
<<DC> DC/TRAN VALUE> <AC <ACMAG <ACPHASE>>>
+ <DIST0F1 <F1MAG <F1PHASE>>> <DIST0F2 <F2MAG <F2PHASE>>>
Notes:
If a pure DC source is required, the ‘DC’ may be omitted providing the value is defined.
If an AC source is defined, the initial parameter DC=0 must be included to enable the necessary initial transient analysis. Apart from this, transient and AC parameters must not be mixed. The AC keyword is required but the magnitude and phase values are defined by their position and do not need keywords.
Multiple distortion parameters may be added, each contributing at the specified frequency and phase as long as the parameter count is incremented for each instance. The DIST0Fx keyword is required but the following parameters are identifiable by their position and do not need keywords. Note that it is a zero, not an ‘O’.
Exponential Source Parameters:
EXP(V1 V2 TD1 TAU1 TD2 TAU2)
Notes:
EXP is a required keyword. V1 and V2 define the initial and pulsed values. TD1 is the delay before initial pulse rise, defaulting to zero. TAU1 and TAU2 are the rise and fall time constants, defaulting to the value of the minimum step time (see Simulation - Simulation Parameters). TD2 is the fall delay time, defaulting to the sum of the first two timing parameters.
Piece-Wise Linear Source Parameters:
PWL(T1 V1 <T2 V2 T3 V3 T4 V4 …>) <r=value> <td=value>
Notes:
PWL is a required keyword. At least one pair of linear parameters must be defined. Tx and Vx are time and voltage pairs. T1 must be zero to define the initial voltage. As the values are defined by position, the keywords are unnecessary, but the brackets are essential to define the list of parameters. The two remaining parameters only apply to voltage sources.
r sets a repeat time point. If omitted or set to -1, the sequence only repeats once. If set to zero or a positive value, it defines the point at which an indefinite repetition will occur, omitting earlier values from the repetition. The value must match one of the Tx values.
Td defines an initial delay before the start of the output defaulting to zero. If r is omitted, this must be declared if required.
Single Frequency FM Source Parameters:
SFFM (VO VA FM MDI FC TD PHASEM PHASEC)
Notes:
SFFM is a keyword which must be included. VO and VA are the offset voltages (or currents) and must be defined. FM is the frequency of modulation and defaults to 5 divided by the value of the minimum step time (see Simulation - Simulation Parameters). MDI is the modulation index, defaulting to 90. FC is the carrier frequency, defaulting to 500 divided by the minimum step time. TD is the initial signal delay, defaulting to zero. PHASEM and PHASEC are the initial modulation and carrier phases, both defaulting to zero. Any parameters with a listed default may be omitted. MDI is constrained by:
0 ⇐ MDI ⇐ FC/FM
The signal these parameters produce is:
V(t) = VO +VA·
sin(2ℼ ·FC · (t -TD)+MDI sin(2ℼ ·FM · (t -TD)+PHASEM)+PHASEC)
(Zero while t<TD).
Amplitude Modulated Source Parameters:
AM (VO VMO VMA FM FC TD PHASEM PHASEC)
Notes:
AM is a required keyword. Vo and VMO are the overall offset and modulation signal offset respectively, with required values and units of V/A. VMA is the modulation signal amplitude defaulting to a value of 1 (V/A). FM and FC are the modulation signal frequency and the carrier signal frequency in Hz with defaults of 5 and 500 over the Stop Time as defined in (see Simulation - Simulation Parameters). PHASEM and PHASEC are the initial modulation signal and carrier signal phase respectively, both defaulting to a value of zero degrees.
Transient Noise Source:
Please see the Noise Analysis link below.
Random Voltage Source Parameters:
TRRANDOM (TYPE TS <TD <PARAM1 <PARAM2>>>)
Notes:
This yields statistically distributed voltage values, derived from the Spice random number generator. These values may be used in the transient simulation directly within a circuit, e.g. for generating a specific noise voltage, but they are especially useful in the control of behavioural sources to simulate the circuit dependence on statistically varying device parameters. Thus, it becomes possible to create a Monte Carlo simulation in a single run.
TRRANDOM is a required keyword, as are the parameter brackets. The TYPE parameter determines the statistical distribution and the meaning of PARAM1 and PARAM2. These values and meanings are:
| TYPE | PARAM1 | PARAM2 | |
|---|---|---|---|
| 1 - | Uniform distribution | Range | Offset |
| 2 - | Gaussian distribution | Std. deviation | Mean |
| 3 - | Exponential distribution | Mean | Offset |
| 4 - | Poisson distribution | Lambda | Offset |
In all cases the default value of PARAM1 is one, and PARAM2, zero.
RF Port Source Parameters:
DC 0 AC 1 portnum n1 <z0 n2>
Notes:
This only applies to voltage sources. portnum is a required keyword. The number following it must be sequential from 1 for all sources of this type in a design. Z0 is the port impedance, defaulting to 50 ohms if undeclared. If declared, the following value is the port impedance. The resulting source behaves as a standard voltage source with a source impedance defined by n2.
Source Pages
Click on one of the links below for details of the relevant source page.
DC Source | AC Source | Pulse Source | Sine Source | Noise Source | Other Source
Related Topics
AC Sweep Analysis | Digital Pulse | PWL Source | Edit Device Type | Noise Analysis | Generating Waveforms