Micro-Cap v7.1.6 / RM
.PDF.TRAN
General Form (SPICE files only)
.TRAN <printstep> <run stop time>
+ [<print start time> [<max time step>]] [UIC]
Examples
.TRAN 10ps 110ns
.TRAN 1ns 1us 500ns .5ns UIC
The .TRAN command arguments control the transient analysis run parameters. They are copied into the appropriate Analysis Limits dialog box fields upon selecting Transient from the Analysis menu. Here is the conversion:
.TRAN value <printstep> <run stop time>
<print start time> <max time step> UIC
MC7 effect or assignment
Number of Points = 1 + <run stop time> / <printstep> Time Range = <run stop time>
No effect
Maximum Time Step = <max time step> Disables the Operating Point option
The <printstep> value declares the time interval between numeric printouts. The <run stop time> value specifies the last time point to be simulated. The UIC keyword, an acronym for Use Initial Conditions, instructs the simulator to skip the usual operating point calculation and use the initial conditions as specified in the
.IC statements and device initial conditions.
327
328 Chapter 20: Command Statements
Chapter 21 AnalogBehavioralModeling
What's in this chapter
This chapter describes the analog behavioral modeling capability and macro circuit blocks. These macro circuit files are provided with the MC7 package:
•Absolute value (full wave rectifier) function (ABS)
•Amplifier (AMP)
•Center-tapped transformer (CENTAP)
•Clipping limiter circuit (CLIP)
•Delay (DELAY)
•Differentiator (DIF)
•Divider (DIV)
•Linear transfer function (F)
•Frequency-shift keyer (FSK)
•Gyrator for impedance transformation (GYRATOR)
•Integrator (INT)
•Two-input weighted multiplier (MUL)
•Time domain noise source (NOISE)
•Potentiometer (POT)
•Phase-shift keyer (PSK)
•Programmable Unijunction Transistor (PUT)
•Relays (RELAY1 AND RELAY2)
•Resonant circuit (RESONANT)
•Schmitt trigger circuit (SCHMITT)
•Silicon-controlled rectifier (SCR)
•Slip or hysteresis function (SLIP)
•Spark gap device (SPARKGAP)
•Two-input weighted subtracter (SUB)
•Two-input weighted summer (SUM)
•Three-input weighted summer (SUM3)
•Triac (TRIAC)
•Trigger (TRIGGER)
•Triode vacuum tube model (TRIODE)
•Voltage-controlled oscillator (VCO)
•Wideband transformer (WIDEBAND)
•Crystal model (XTAL)
•555 Timer (555)
329
Laplace sources
Laplace sources are controlled sources whose transfer function is a function of the complex frequency variable, S= 2*PI*J*F. There are eight basic types:
Expression-defined sources: |
|
Current-controlled current source |
LFIOFI |
Current-controlled voltage source |
LFVOFI |
Voltage-controlled voltage source |
LFVOFV |
Voltage-controlled current source |
LFIOFV |
Table-defined sources: |
|
Current-controlled current source |
LTIOFI |
Current-controlled voltage source |
LTVOFI |
Voltage-controlled voltage source |
LTVOFV |
Voltage-controlled current source |
LTIOFV |
The presence of the complex frequency variable, S, lets you describe more than simple gain blocks. This type of source lets you define an arbitrary linear transfer function block with any combination of poles and zeros. In fact, you can define virtually any linear S domain function that can be expressed either as an algebraic formula or as a table of ordered triplets (frequency, magnitude, phase).
For transient analysis, MC7 first determines the impulse response of the function. The impulse response is obtained by performing an inverse Fourier transform on the transfer function. During the transient analysis, the output of the source is obtained from the convolution of the actual waveform at the source input nodes and the stored impulse response waveform. This allows the Laplace source to accurately respond to any input waveform, not just simple, predefined waveforms.
In AC analysis, the transfer function value is computed from the expression involving S, where S = 2•π •frequency•j, or interpolated from the given table.
For DC analysis, the transfer function value is computed from the expression with S = 0, or obtained from the table using the lowest frequency data point.
|
Here are some examples: |
|
|
1/(1+.001*S) |
A low pass filter |
|
.01*S/(1+.01*S) |
A high pass filter |
|
exp(-pow((C*S*(R+S*L)),.5)) |
Simple lossy, transmission line |
330 |
Chapter 21: Analog Behavioral Building Blocks |
|
Function sources
Function sources are controlled sources whose transfer function is a function of everything but the complex frequency variable. Like Laplace sources, there are four basic types; current and voltage dependent and current and voltage output. There are both expression and table-defined versions.
The table-defined sources come in the usual four varieties:
Current-controlled current source |
NTIOFI |
Current-controlled voltage source |
NTVOFI |
Voltage-controlled voltage source |
NTVOFV |
Voltage-controlled current source |
NTIOFV |
A table of ordered pairs (in,out) describes the time domain input-output relationship. For AC analysis, the source is linearized about the operating point, and the resulting linear real transfer function is used.
The algebraic sources come in two varieties:
Voltage sources |
NFV |
Current sources |
NFI |
Because you define the output value directly in an expression, rather than describing the transfer function, the sources can be used as either dependent or independent sources. The 'input' is implicitly contained in the expression as a variable.
Here are some examples: |
|
10*TANH(I(L1)) |
Nonlinear inductor expression |
10PF/(1+V(D1)/.45) |
Nonlinear varactor expression |
10*SIN(2*PI*10*T)*EXP(-T/(R(R1)*5)) |
Damped Sine wave source |
331
ABS
Sometimes referred to as a full-wave rectifier, the ABS block provides the absolute value of the input signal. Its definition is:
VOut(t) = | VIn(t) |
The function is implemented with the ABS macro:
Figure 21-1 ABS macro equivalent circuit
There are no input parameters. This implementation uses an NFV Function source to provide the absolute value function. The macro block mainly serves to provide a more suitable symbol than the general source symbol of the NFV Function source.
See the circuit SYSTEM2 for an example of the use of this macro.
332 Chapter 21: Analog Behavioral Building Blocks
AMP
This block provides a simple linear amplifier. Its definition is:
VOut(t) = gain VIn(t)
The function is implemented with the AMP macro:
Figure 21-2 AMP macro equivalent circuit
The single input parameter, GAIN, multiplies the input to produce an amplified output. This implementation uses a simple linear dependent VOFV source. It could have been done with a Function source or a Spice poly source. In general, the simplest type of source that will perform the function is preferred.
333
CENTAP
The CENTAP macro is a center-tapped five terminal transformer with parameters defining the primary and two secondary inductances
This circuit is implemented with three linear inductors and one K (coupling) device.
Figure 21-3 CENTAP macro equivalent circuit
Parameter |
Definition |
L1 |
Primary inductance |
L2 |
Secondary inductance 1 |
L3 |
Secondary inductance 2 |
See the circuit TRANS for an example of the use of this macro.
334 Chapter 21: Analog Behavioral Building Blocks
CLIP
The clip macro can be used as a limiter, ideal OPAMP, or inverter. It provides an output that is a scaled copy of the input, but limited to the specified maximum and minimumlevels.
This function is implemented with the CLIP macro:
Figure 21-4 CLIP macro equivalent circuit
A pair of input parameters, LOW and HIGH, define the lowest value and highest value of the output. Between these limits, the output equals the input multiplied by the GAIN parameter. The block is constructed of a NTVOFV Function table source.
Parameter |
Definition |
GAIN |
Linear gain between clip limits |
LOW |
Lowest output value |
HIGH |
Highest output value |
See the circuit SYSTEM2 for an example of the use of this macro.
335
DELAY
The delay macro provides a programmable time delay.
VOut(t+delay) = VOut(t)
This function is implemented with the DELAY macro:
Figure 21-5 DELAY macro equivalent circuit
The single input parameter, DELAY, provides the specified time delay through a transmissionline.
336 Chapter 21: Analog Behavioral Building Blocks