Sei sulla pagina 1di 79

PSpice

Introduction
PSPICE is a circuit analysis tool that allows the user to simulate a circuit and extract key voltages and currents. Information is entered into PSPICE via one of two methods
Net List Schematic

Net List

Net List Format


Net List is list of components and the nets (or nodes) that connect them together.

The net list consists of: The Title Line: This should contain information to the circuit and your name ( you can live it blank). The Circuit Parameters (R1, C1, VS) as many as needed. The Output Control statements. <.END> statement, to close the file. * & ; are comments ignored by the program

Net List Circuit Parameters


Letter R C L K V I M D Q W X E G H F Circuit Element Resistor Capacitor Inductor Mutual Inductor Independent voltage source Independent current source MOSFET Diode Bipolar transistor transmission line Subcircuit Voltage-controlled voltage source Voltage-controlled current source Current-controlled voltage source Current-controlled current source

Units

Parameter Syntax
Resistor: R<name> [+ node] [- node] [value]
Capacitor: C<name>[+ node][- node][value] [IC=<initial value>, optional] Inductor L<name>[+ node][- node][value] [IC=<initial value>, optional]

Independent Sources I<name> [- node] [+ node] [value] [type] [transient spec] V<name> [+ node] [- node] [value] [type] [transient spec]

Example 1

1. Determine and number the nodes 2. The ground is always node 0 3. Write the program *Circuit name Circuit element R, V, I, L, C , D, Tr,etc . analysis type .end

Node 1

Node 2

Node 3

*node voltages V 1 0 R3 1 2 R1 2 3 R2 2 3 R4 3 0 .op .end

DC 10V 4OHM 7OHM 10OHM 9OHM

Start >> Orcad >> PSPICE AD

First close and reopen the file

Type of analysis
1. DC analysis
a. b. c. DC Bias Point Details DC Sweep Transfer Function

2. AC analysis 3. Transient analysis : Time Domain Analysis

DC Analysis
1. DC operating point
Measure all the voltage nodes Measure the current being supplied by the power supply Measure the circuit consuming power

Example 2

DC analysis
2. DC sweep
.DC [LIN] {varname} {start} {end} {incr}
.DC [OCT][DEC] {varname} {start} {end} {points} Examples: .DC VIN -.25 .25 .05 .DC V1 list 5

12

*DC sweep1 V1 1 0 R1 1 0 .DC V1 .end

10 1k

12

Output !!

Output: 1. Printing any value .PRINT [DC][AC][NOISE][TRAN] [{output variable}*] .PRINT DC V(3) V(2,3) V(R1) IB(Q13)

2. Plot any relation


.PLOT [DC][AC][NOISE][TRAN] [ [{output variable}*] .PLOT DC V(3) V(2,3) V(R1) I(VIN)

.PROBE [output variable]* .PROBE .PROBE V(3) VM(2) I(VIN)

DC sweep
*DC sweep1 V1 1 0 10 R1 1 0 1k .DC V1 0 12 .print DC V(R1) .end

DC sweep
*DC sweep2 V1 1
R1 Vy .DC .Plot .end 1 2 V1 DC 2 0 0

10

1k 0 12 1 I(vy)

DC sweep

DC sweep
*DC sweep3
V1 R1 1 Vy 2 .DC V1 .Probe .end 1 2 0 0 1k 0 0 10

12

DC sweep

DC sweep

DC sweep

DC sweep

DC sweep

DC sweep

DC sweep

DC sweep

DC sweep

DC sweep

Plot V(R2) V(1,2) I(R2)

I(V1)

DC sweep
* V1 1 R1 1 R2 2 R3 3 I1 .DC V1 .probe DC .end
0 20 2 1k 3 1k 0 1k 2 3 20m list 5 9 12 I1 list V(R2) V(1,2) I(R2) I(V1)

Example

1. 2. 3.

Find All node voltages The current and the power dissipation of the voltage sources The current through all resistors

Example
Repeat the above problem for V1=100,120 and 150V Repeat the above problem for V1=100,120 and 150V and V2=80,110 and 140V

Schematic

Start >> Orcad >> Capture CIS


Capture session frame. You do all your schematic design and processing within this window Session log lists the events that have occurred during the current Capture session, including messages resulting from using Captures tools

Analog or Mixed-Signal A/D is used to simulate analog and/or digital circuits using PSpice. PC Board Wizard while we focus on designing PCBs. Programmable Logic Wizard is for working with programmable devices Schematic is basically just a design file.

Project : .Olb Design: .DSN Only one in project

The schematic page editor

Schematic

Project Manager
Schematic Pages

Component used in design Libraries used in design Output Files

Design steps
1) Draw the circuit
a) Place components and define its values.
b) Place Wires c) Place Ground

2) Specify the type of analysis 3) Simulation

Use only Libraries in PSPICE folder [its only can be simulated], other libraries only for schematic and layout

DC analysis
1. DC Bias Point Details 2. DC Sweep

AC analysis Transient analysis : Time Domain Analysis

Bias Point
Bias Point

DC Sweep

Or you can choose the markers from here And place it on the point you want to measure

Exercise 1

Plot Axis Settings X-axis >>6.0 to 10.0 volts Y-axis >>3.0 to 5.0

Param Part
The PARAM part, from the SPECIAL.OLB library, is very useful for investigating circuit behavior for a range of part values. In this circuit we select RL as a circuit parameter : Replace RL default value it by a name e.g. {Rvar}

Note that The variable resistance name must be enclosed in curly brackets{}.

Place the PARAM part, from the SPECIAL.OLB library . Right click and select Edit Properties to display the spreadsheet Add new rows and assign values in the A column. Select New Row and enter Rvar in the Name: box but NO curly brackets, and set a nominal value.

Simulation Settings
Create a simulation profile Select DC Sweep Select Global parameter Enter Rvar in the parameter name Make Rvar is varied Linearly from 1 to 300 in increments of 1 . Plot the output on RL

Modify the simulation profile by choosing secondary sweep too and vary the voltage source Plot the output on RL

Transient Analysis

Change time to 10 us, then simulation >> run

V1 = 0 For the pulse, the beginning voltage level V2 = 1 For the pulse, the ending voltage level TD = 0 The delay time of the pulse, from the simulation starting point (0 sec) TR = 0 The risetime TF = 0 The falltime PW = 3u The pulse width PER = 6u The period of the pulse

AC Analysis

-Transient analysis for 3ms - Add markers at R1, R2 and L1

Potrebbero piacerti anche