0% found this document useful (0 votes)
32 views24 pages

Presentation On Using SPICE: by Shweta - Kulkarni

This presentation introduces SPICE (Simulation Program with Integrated Circuit Emphasis), a general purpose circuit simulator. It describes how to define a SPICE netlist to specify circuit components and topology. It also explains different types of analyses in SPICE including DC operating point analysis, transient analysis, pole-zero analysis, signal transfer functions, frequency response, sensitivities, distortion analysis, Fourier analysis and noise analysis. The presentation outlines the necessary control statements for each type of analysis and provides examples of SPICE netlist code.

Uploaded by

Rejeev Cv
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views24 pages

Presentation On Using SPICE: by Shweta - Kulkarni

This presentation introduces SPICE (Simulation Program with Integrated Circuit Emphasis), a general purpose circuit simulator. It describes how to define a SPICE netlist to specify circuit components and topology. It also explains different types of analyses in SPICE including DC operating point analysis, transient analysis, pole-zero analysis, signal transfer functions, frequency response, sensitivities, distortion analysis, Fourier analysis and noise analysis. The presentation outlines the necessary control statements for each type of analysis and provides examples of SPICE netlist code.

Uploaded by

Rejeev Cv
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 24

Presentation on Using SPICE

By Shweta . Kulkarni

OUTLINE
Introduction to SPICE DC Analysis Transient Analysis Locate poles and zeros Perform signal transfer functions Determination signal frequency response Signal sensitivities Fourier, distortion and noise analysis

Introduction
SPICE-Simulation Program with Integrated Circuits Emphasis Developed in 1970s at Berkeley by university of California General purpose analog simulator PSPICE, which runs on the PC and HSPICE is a industry standard SPICE takes a circuit netlist and performs mathematical simulation of the circuits behavior. A netlist describes the components in the circuit and how they are connected. Types of input file Netlist , Schematics

Components
Independent and dependent voltage and current sources Resistors Capacitors Inductors Mutual inductors Transmission lines Operational amplifiers Switches Diodes Bipolar transistors MOS transistors JFET MOSFET Digital gates

HOW TO SPECIFY THE CIRCUIT TOPOLOGY AND ANALYSIS?


A SPICE input file, called source file, consists of three parts. Data statements: description of the components and the interconnections. Control statements: tells SPICE what type of analysis to perform on the circuit. Output statements: specifies what outputs are to be printed or plotted.

Two other statements are required: the title statement and the end statement.

The title statement is the first line and can contain any information, while the end statement is always .END

TITLE STATEMENT ELEMENT STATEMENTS . . COMMAND (CONTROL) STATEMENTS OUTPUT STATEMENTS .END

Data Statements
To Specify the Circuit Components and Topology
Example: RESISTOR General form: RXXX R N1 N2 Values 2 3 50K

Control Statements
To Specify the Type of Analysis Calculate DC Operating Point

.OP Statement This statement instructs Spice to compute the DC operating points: voltage at the nodes current in each voltage source operating point for each element

.DC Statement This statement allows you to increment (sweep) an independent source over a certain range with a specified step.
General form: .DC SRCNAM VSTART VSTOP VINCR [SRC2 START2 STOP2 INCR2]

SRC name is the name of the source, START and STOP are the starting and ending value, respectively; and STEP is the size of the increment. Examples: .DC V1 0 20 2 .DC Vds 0 5 0.5 Vgs 0 5 1

Transient Analysis
The transient analysis portion of SPICE computes the transient output variables as a function of time over a user-specified time interval. The initial conditions are automatically determined by a dc analysis.

.TRAN Statement
This statement specifies the time interval over which the transient analysis takes place, and the time increments. The format is as follows:

.TRAN TSTEP TSTOP <TSTART <TMAX>>


TSTEP is the printing increment. TSTOP is the final time

TSTART is the starting time (if omitted, TSTART is assumed to be zero) TMAX is the maximum step size. Example .TRAN 1NS 100NS

Pole-Zero Analysis
The pole-zero analysis portion of SPICE computes the poles and/or zeros in the small-signal ac transfer function. The program first computes the dc operating point and then determines the linearized, small-signal models for all the nonlinear devices in the circuit. This circuit is then used to find the poles and zeros of the transfer function. The transfer function can either be Voltage Gain (output voltage/input voltage) or Impedance (output voltage/input current).

.PZ: Pole-Zero Analysis General form: .PZ NODE1 NODE2 NODE3 NODE4 CUR POL . PZ NODE1 NODE2 NODE3 NODE4 CUR ZER . PZ NODE1 NODE2 NODE3 NODE4 CUR PZ .PZ NODE1 NODE2 NODE3 NODE4 VOL POL .PZ NODE1 NODE2 NODE3 NODE4 VOL ZER .PZ NODE1 NODE2 NODE3 NODE4 VOL PZ

Example

Example
Consider the circuit in the image, where a Pole-Zero analysis is defined with the following parameter values: Input Node = IN Input Reference Node = 0 Output Node = OUT Output Reference Node = 0 Transfer Function Type = V ( output) / V( input) Analysis Type = Poles and Zeros The entry in the SPICE netlist will be: .PZ IN 0 OUT 0 VOL PZ

Running the simulation will yield the output wave plot shown in the image below:

Signal Transfer Function


.TF Statement The .TF statement instructs PSpice to calculate the following small signal characteristics: the ratio of output variable to input variable (gain or tranfer gain) the resistance with respect to the input source the resistance with respect to the output terminals General form: .TF OUTVAR INSRC Example: .TF V(5, 3) VIN

Signal Frequency Response


.AC Statement This statement is used to specify the frequency (AC) analysis. The format is as follows: .AC LIN NP FSTART FSTOP .AC DEC ND FSTART FSTOP .AC OCT NO FSTART FSTOP
Examples: .AC DEC 10 1 10K .AC LIN 100 1 100HZ

LIN stands for a linear frequency variation,

DEC and OCT for a decade and octave variation respectively. NP stands for the number of points ND and NO for the number of frequency points per decade and octave. FSTART and FSTOP are the start and stopping frequencies in Herz

Signal Sensitivities
Spice will calculate either the DC operating-point sensitivity or the AC small-signal sensitivity of an output variable with respect to all circuit variables, including model parameters. Spice calculates the difference in an output variable (either a node voltage or a branch current) by perturbing each parameter of each device independently.

.SENS: DC or Small-Signal AC Sensitivity Analysis General form: .SENS OUTVAR .SENS OUTVAR AC DEC ND FSTART FSTOP .SENS OUTVAR AC OCT NO FSTART FSTOP .SENS OUTVAR AC LIN NP FSTART FSTOP Examples: .SENS V(1,OUT) .SENS V(OUT) AC DEC 10 100 100k

Distortion Analysis
.DISTO: Distortion Analysis The Disto line does a small-signal distortion analysis of the circuit. Syntax .DISTO DEC ND Fstart Fstop .DISTO OCT NO Fstart Fstop .DISTO LIN NP Fstart Fstop Example .DISTO DEC 10 1kHz 100Mhz

Fourier Analysis ,Noise Analysis


.NOISE: Noise Analysis
The Noise line does a noise analysis of the circuit. Syntax .NOISE V(OUTPUT <,REF>) SRC ( DEC | LIN | OCT ) PTS Fstart Fstop Example .NOISE V(5) VIN DEC 10 1kHZ 100Mhz .FOUR The Fourier analysis statement initiates a Fourier analysis of the results of a transient analysis. General form: .FOUR FREQ OV1 <OV2; OV3 ...> Frequency species the fundamental frequency Output variables for which analysis is desired.

Output Statements
Specifies what outputs are to be printed or plotted. Types
.PRINT Statement A print is a table of data points Syntax .PRINT PRtype OV1 <OV2; ... OV8> Example: .PRINT DC I(R1) I(R2) I(R3) I(R4) .PLOT Lines Syntax: .PLOT TYPE OV1 OV2 OV3 Example .PLOT DC V(4) V(5) V(1)

You might also like