33
1 PSPICE Lecture – Transient Analysis PSPICE – Transient Analysis Topics to be presented : • Transient Analysis • Analysis of 1 st -order circuits • Analysis of 2 nd -order circuits • Transient and Parametric Analysis Reference: Additional examples available at: http://faculty.tcc.edu/PGordy/Orcad/index. htm

PSPICE Lecture – Transient Analysis

  • Upload
    boyd

  • View
    135

  • Download
    3

Embed Size (px)

DESCRIPTION

PSPICE Lecture – Transient Analysis. 1. PSPICE – Transient Analysis. Topics to be presented : Transient Analysis Analysis of 1 st -order circuits Analysis of 2 nd -order circuits Transient and Parametric Analysis. - PowerPoint PPT Presentation

Citation preview

Page 1: PSPICE Lecture – Transient Analysis

1PSPICE Lecture – Transient Analysis

PSPICE – Transient AnalysisTopics to be presented:• Transient Analysis• Analysis of 1st-order circuits• Analysis of 2nd-order circuits• Transient and Parametric Analysis

Reference: Additional examples available at: http://faculty.tcc.edu/PGordy/Orcad/index.htm

Page 2: PSPICE Lecture – Transient Analysis

Recall that there are 4 types of analysis in PSPICE.

2

Transient Analysis in PSPICEPSPICE Lecture – Transient Analysis

• Bias Point (DC analysis where you place voltages, currents, and power on the schematic)

• DC Sweep (vary a source or component)

• AC Sweep (vary frequency)• Transient (vary time)

Simulation Settings window shows 4

analysis types

Page 3: PSPICE Lecture – Transient Analysis

3PSPICE Lecture - Transient Analysis

Transient Analysis – A transient analysis is used to graph various quantities versus time. Recall that whatever is varied in PSPICE will be placed on the x-axis when graphs are created. So graphs created using a transient analysis will always have time, t, on the x-axis.

Example: Use a transient analysis to graph the source voltage, resistor voltage, and capacitor voltage in the circuit below until they reach steady-state.

1 k

1 F

+

VC

_

+ VR -

+_100 V

t = 0

Page 4: PSPICE Lecture – Transient Analysis

4

1) Create the Project and draw the circuit: Create a project and draw the circuit shown below. Refer to earlier PSPICE lectures if you need help creating a project.

PSPICE Lecture - Transient Analysis

Notes:• Switch: Use part Sw_tClose from EVAL library for the switch• Nodes: Label the nodes so that they can be referred to when graphing. • Ground: Recall that all analog circuits require the 0 ground.

Page 5: PSPICE Lecture – Transient Analysis

5

2) Initial Capacitor Voltage: You must add the initial capacitor voltage, even if it is 0V. To do this:• Double-click on the capacitor to open the Property Editor (shown on the

left below)• Select the part (column) named IC and select the Display tab• Change the Display Format to Name and Value and select OK• IC = should now appear on the schematic. Double-click on it and enter

the value (20V in this example)

PSPICE Lecture - Transient Analysis

Page 6: PSPICE Lecture – Transient Analysis

6

3) Capacitor polarity: Capacitors has fixed + and - terminals in PSPICE. This is important when initial conditions are added. The 20V initial condition just added might act like -20V if the capacitor is upside down. To check the polarity:• Select PSPICE – Create Netlist• Select PSPICE – View Netlist• The Netlist shown below indicates that capacitor C1 is connected from node 0

(+) to node C (-), so it is upside down! (The positive node is listed first.)

PSPICE Lecture - Transient Analysis

• Right-click on the capacitor and select Mirror Vertically

• Check the Netlist to see that the capacitor now has the correct polarity.

Page 7: PSPICE Lecture – Transient Analysis

7PSPICE Lecture - Transient Analysis4) Create the Simulation Profile: Recall that exponential functions take 5Tau to

decay, so we often want to perform a transient analysis for 5Tau. For this example: Length of transient analysis = 5Tau = 5RC = 5(1k)(1uF) = 5ms• Select PSPICE – New Simulation Profile• Give the Simulation Profile a Name (any name is OK but using the schematic

name is a good idea)• Under Analysis Type select Time Domain (Transient) • Under Run To Time: Enter 5ms (no spaces!)• Select OK.

Fine point: By default approximately 100 points will be used to create each graph, so Maximum step size = (Run to time)/100.

In this example the blank box indicates that the Maximum step size is 5ms/100 = 50us. If you wished to use twice as many points you could enter 25us into the Maximum step size box.

Page 8: PSPICE Lecture – Transient Analysis

8PSPICE Lecture - Transient Analysis5) Analyze the circuit and graph the results

• Select PSPICE – Run to analyze the circuit. The graphing window should appear. Since we did a transient analysis from 0 to 5ms, time should vary from 0 to 5ms on the x-axis.

Page 9: PSPICE Lecture – Transient Analysis

9PSPICE Lecture - Transient Analysis6) Add waveforms • Select Trace – Add trace and the Add Traces window will appear.• Select or type the names of one or more waveforms to view• Voltages in the list are all node voltages, so to find the resistor voltage V(B,C)

was entered (positive terminal is listed first).

Page 10: PSPICE Lecture – Transient Analysis

10PSPICE Lecture - Transient Analysis7) Add text and mark points

Toggle Cursor On/Off

Mark Point

Add text

Select Waveform for Cursor

Cursor

Cursor value – currently for V(B,C)

Page 11: PSPICE Lecture – Transient Analysis

11PSPICE Lecture - Transient Analysis7) Comments on the graph

• Capacitor voltage – Charges from the initial value (20V) to 100V as expected• Resistor voltage – Decays from its initial voltage (100 – 20 = 80V) to zero• Source voltage – Constant 100V

Page 12: PSPICE Lecture – Transient Analysis

12PSPICE Lecture - Transient Analysis

8) Other graphing features There are many other graphing features which may be demonstrated in class or you may try on your own. Features include:• Two cursors: PSPICE has two cursors that can be added to determine values of

waveforms at different points.• Controlling two cursors: The left-mouse button controls Cursor 1 and the right-

mouse button controls Cursor2 (coarse adjustments). The cursors can be moved for fine adjustments with the arrow keys (Cursor1) or Shift + arrow keys (Cursor2).

• Marking Points: Use Plot - Label – Mark or the toolbar.• Saving graphs: Use Window – Display Control. Last graph is saved here

automatically.• Printing graphs: Use Window – Copy to Clipboard. This was used to create the

graph on the previous slide. Note that the black background is changed to white.• Graphing expressions: Note the functions in the Add Trace window, such as *, /,

abs(), sin(), exp(), etc. You could, for example, graph V(C)*I(C1) or abs(I(C1)).• Trace Properties: Right-click on a trace to change its color, line width, etc.• Other: You can zoom in and out, use linear or log scales, turn off minor gridlines,

etc.

Page 13: PSPICE Lecture – Transient Analysis

13PSPICE Lecture - Transient Analysis

Charging and discharging a capacitor using VPULSE Suppose that the switch in the circuit below moves back and forth between A and B (for at least 5Tau in each position). The result is that the capacitor will charge and discharge repeatedly.

1 k

1 F

+

VC

_

+_100 V

A

B

100 V

0 V5Tau 10Tau 15Tau 20Tau

t

VC

Switch moves to A

Switch moves to B

Switch moves to A

Switch moves to B

Switch moves to A

Page 14: PSPICE Lecture – Transient Analysis

14PSPICE Lecture - Transient Analysis

How is a switch moved back and forth in PSPICE?This is simulated by using a pulse waveform.

100 V

0 V5Tau 10Tau 15Tau 20Tau

t

VPulse

Connect 100 Vto the

RC circuit

Connect 0 V

to the RC circuit

1 k

1 F

+

VC

_

+_100 V

A

B 1 k

1 F

+

VC

_

0 to100VPulse

Waveform

Equivalentcircuits

Page 15: PSPICE Lecture – Transient Analysis

15PSPICE Lecture - Transient Analysis

Part VPULSE in PSPICEVPULSE is a part in the Source Library. It has various properties as defined below:V1 = First voltageV2 = Second voltageTD = Time Delay (time before pulse starts). It is OK to use TD = 0.TR = Rise Time (time to go from V1 to V2). TR cannot be 0.TF = Fall Time (time to go from V2 to V1). TF cannot be 0.PW = Pulse Width (time when output = V2)PER = Period

Illustration:

V2

V1

TF

PERt

VPulse

TD

TR

PW

Page 16: PSPICE Lecture – Transient Analysis

16PSPICE Lecture - Transient Analysis

PSPICE Example using part VPULSE

Page 17: PSPICE Lecture – Transient Analysis

17PSPICE Lecture - Transient AnalysisExample: Use a transient analysis to graph the capacitor voltage in the circuit below. Assume that the switch moves to position A at t = 0 and then moves back and forth between A and B every 5Tau to repeatedly charge and discharge the capacitor. Graph VC as it charges and discharges 3 times.

1 k

1 F

+

VC

_

+_100 V

A

B

Page 18: PSPICE Lecture – Transient Analysis

18PSPICE Lecture - Transient AnalysisSolution: 1. Create the Project and draw the circuit: Create a project and draw the

circuit shown below.Notes:• Use part VPULSE from the

Source Library• 5Tau = 5RC = 5ms, so use

PW = 5ms (the capacitor charges here)

• 5RC is also needed for the capacitor to discharge, so use PER = 10ms (time to charge and discharge)

• TR and TF cannot be 0, so make them very small compared to PER. Note that 1ns is only one ten-millionth of PER.

• The initial condition for the capacitor must be set to 0V.

Page 19: PSPICE Lecture – Transient Analysis

19PSPICE Lecture - Transient Analysis2. Create a new Simulation Profile and determine the length of the analysis:In order to charge and discharge the capacitor 3 times, the analysis should last for 30Tau (or 30ms) as illustrated below.

100 V

0 V5Tau 10Tau 15Tau 20Tau

t

VC

25Tau 30Tau

Page 20: PSPICE Lecture – Transient Analysis

20PSPICE Lecture - Transient Analysis3. Simulate the circuit and graph the results:

Page 21: PSPICE Lecture – Transient Analysis

21PSPICE Lecture - Transient Analysis

Parametric Analysis in PSPICE A parametric analysis is used to vary a second parameter to generate a series of curves. Many types of parametric analysis are possible in PSPICE.

Examples:• Top Example: Vary

voltage and current• Bottom Example: Vary

time and resistance

Vary voltage (DC Sweep)

Vary current (parametric analysis

Vary time (Transient analysis

Vary R (parametric analysis

Page 22: PSPICE Lecture – Transient Analysis

22PSPICE Lecture - Transient Analysis

Example: Graph VC versus time as the capacitor charges for R = 10k, 20k, 30k, 40k and 50k.

R

1 F

+

VC

_

+_100 V

t = 0

Solution: • A transient analysis can be used to vary time from 0 to 5Tau.• Use the largest value of Tau, so 5Tau = 5(50k)(1F) = 250 ms• A parametric analysis can be used to vary R from 10k to 50k

Page 23: PSPICE Lecture – Transient Analysis

23PSPICE Lecture - Transient Analysis

Use the following steps to vary a resistor:a) Use a variable resistor part, R_varb) Change the value of R_var to a name in braces, such as {Rvalue}c) Change the property SET to 1 for R_var (be sure to display it also)d) Add a part named PARAM from the Special Librarye) Add a property (column) to PARAM with the same name as the resistor

value in braces – Rvalue in this cases

1. Create the Project and draw the circuit: Create a project and draw the circuit shown below.

Page 24: PSPICE Lecture – Transient Analysis

24PSPICE Lecture - Transient Analysis2. Create a new Simulation Profile• Select Time Domain (Transient) for the Analysis type.• Enter 250 ms for the value for Run to time:

Page 25: PSPICE Lecture – Transient Analysis

25PSPICE Lecture - Transient Analysis• Check the box labeled Parametric Sweep. (Note that the window is the

same one used with a DC Sweep analysis.)• Select Global parameter• Enter Rvalue for the Parameter name• Enter the Start value, End value, and Increment.• Select OK.

Page 26: PSPICE Lecture – Transient Analysis

PSPICE Lecture - Transient Analysis3. Simulate the circuit and graph the results:

(Select OK when the Available Sections window appears to select data for all 5 curves.)

Page 27: PSPICE Lecture – Transient Analysis

27PSPICE Lecture - Transient Analysis

Analyzing 2nd-order circuits in PSPICE There is not much difference between analyzing 2nd-order circuits and analyzing 1st-order circuits. A transient analysis is still used. One difference is in determining the length of the analysis.1st-order circuit: • Length of transient analysis = 5Tau• Find Tau = ReqC or L/Req

• Or find Tau from the expression x(t) = B + Ae-t/Tau

• Example: If v(t) = 10 – 10e-500t, then Tau = 1/500 = 2ms, so 5Tau = 10ms2nd-order circuit: • Recall that the natural response has three forms: overdamped, critically-

damped, and underdamped. Since an overdamped response has two exponential terms, use the one with the largest Tau (the dominant root).

• In each case assume that the exponential terms have the form e-t/Tau and again use: Length of transient analysis = 5Tau

• Example: If v(t) = e-500t[20cos(50t) + 30sin(50t)] (underdamped), then Tau = 1/500 = 2ms, so 5Tau = 10ms

Page 28: PSPICE Lecture – Transient Analysis

28PSPICE Lecture - Transient Analysis

Example: Graph VC versus time until the capacitor reaches steady state.

Solution: First determine the length of the analysis.This is a series RLC circuit so:

12.62

1.57 F

+

VC

_

+_20 V

t = 0

1 mH

0.8ms to0 from performed be should analysis transient theSo

0.8ms 0.7924ms 6310

5 5 5Tau in decay willresponse The

j48873 6310- j s2 s1, are rootscomplex The0 106.369 2610s1 sor 0 w s2 s form thehasequation sticcharacteri The

106.369 6)-3)(1.57E-(1E

1 LC1 w6310,

3)-2(1E12.62

2LR

822o

2

82o

Page 29: PSPICE Lecture – Transient Analysis

29PSPICE Lecture - Transient Analysis

2. Create the simulation profile• Perform a transient analysis from 0 to 0.8 ms

3. Analyze the circuit and graph the capacitor voltage• See the following slide

1. Create the Project and draw the circuit: Create a project and draw the circuit shown below.

Notes:• Set the initial condition to 0 for the capacitor and the inductor (IC = 0).• Label the nodes. The node voltage V(C) is the capacitor voltage.

Page 30: PSPICE Lecture – Transient Analysis

30PSPICE Lecture - Transient Analysis

Note that the capacitor voltage is as expected: It has an initial voltage of 0V, a final voltage of 20V, and it is underdamped.Two other quantities are useful to show on this graph: rise time and % overshoot. They are defined on the following slides.

Page 31: PSPICE Lecture – Transient Analysis

31PSPICE Lecture - Transient Analysis

Rise Time (tr) – the time for a waveform to go from 10% of its final value to 90% of its final value. Rise time can be used with any order circuit and any type of response.

10V

9V

1V

0Vtr t

Example:

Page 32: PSPICE Lecture – Transient Analysis

32PSPICE Lecture - Transient Analysis

% Overshoot – This term is only used with underdamped circuits. It is a measure of how far the waveform shoots past its final value before settling on the final value. It is defined (for a voltage) as:

%100V

V - V Overshoot %final

finalmax

30% 10010

10 - 13 Overshoot % :example For this

Example:

10V

0V t

13V

v(t)

Page 33: PSPICE Lecture – Transient Analysis

33PSPICE Lecture - Transient Analysis

A cursor was used to mark 3 points at:• 2V (10% of the 20V final value)• 18V (90% of the 20V final value)• The max value (use the cursor peak tool)

Add rise time and % overshoot to the previous graph: