IEEE PSpice – Transient Analysis

1)Implement the schematic shown below. The input is a sinusoidwith a DC offset of zero, an amplitude of 0.1 and a frequency of 1KHz.

2)Place voltage markers at the input and output.

Parts Used

School Version / Student Version
Description / Part Name / Library / Part Name / Library
DC voltage source / Vdc / Source / Vdc / Source
Sinusoidal
voltage source / Vsin / Source / Vsin / Source
Resistor / R / Analog / R / Analog
741 op-amp / LM741 / OP AMP / uA741 / EVAL

Performing a Transient Simulation

3)From the top toolbar select Pspice->New Simulation Profile

4)In the pop-up menu that appears type in a simulation name

5)Click on<CREATE>

6)You will see the pop-up menu below

7)Select Transient Analysis as an analysis type

8)Change the run time to 2msec

9)Click<OK>to close the window

10)To run the simulation from the top toolbar select: Pspice-> run OR theRun PSpiceicon (see previous page)

Plotting

After the simulation is complete a new window will appear. Because we placed voltage markers at the inputs and output of the circuit these two voltage traces are automatically plotted.

Plotting Additional Traces

To plot additional traces after a simulation has run.

11)In the window with the simulation results select: Traces-> Add Trace

12)The pop-up menu below will appear

On the left hand side are all the voltages and currents that are available to plot. On the right hand side are mathematical functions that can be performed on these values.

The output variables are sensibly named: currents begin with an I, voltages with a V. For example I(R1) is the current going through the resistor R1.

13)Select the current through resistor R1

14)Click <OK> - to close the window and plot the current

Deleting Traces

15)Click on the I(IR) icon at the bottom left of the simulation window

16)click <delete> to delete it

Cursors

After a simulation has run one can use cursors to get precise simulation values.

17)To activate the cursors click on the toggle cursor on iconat the top of the Simulation window (see below)

A small Probe Cursor window, shown below, will appear. Next to A1 are x and y values for the left mouse cursor. Next to A2 are values for the right mouse cursor. dif shows the difference between the values for the left and right mouse cursors

18)Affiliate left cursor, A1, with the trace of V(VOUT) by clicking on its icon at the bottom of the simulation window with the LEFT mouse button (see below)

19)Affiliate right cursor, A2, with the trace of V(VIN) by clicking on its icon with the RIGHT mouse button (see below)

20) Click on the V(VOUT) trace with the LEFT mouse button to define the position of the A1 cursor. Crosshairs will be shown corresponding X and Y values are displayed in the Probe Cursor window. The crosshairs can be moved by dragging the mouse with the right button.

Note:

  • The position of the A2 cursor is similarly controlled with the right mouse button
  • The difference between the A1 and A2 cursors is shown in theProbe Cursor menu as well.
  • Cursors A1 and A2 can be used for the same trace

AC simulation

Delete the voltage probe at the input and replace the Vsin part with either a Vac or Vsrc part from the Source Library. It is possible to add a dc offset to this AC source here we have left it zero. Note that the parameter Vac is one. This is the amplitude of the AC signal. Using an amplitude of one, causes the transfer function to automatically be plotted.

Performing an AC simulation

21)From the top toolbar in the schematic window menu select: PSpice ->Edit Simulation Profile

22)In the Simulation Settings window select AC Sweep/Noiseas an analysis type

23)Enter the frequency range as shown below DO NOT START with 0, Note that 1M is equivalent to 1m = 103

24)Select Logarithmic instead of linear (This is more customary.)

25)Specify 10 points per decade

26)Click <OK> to close the window

27)To run the simulation from the top toolbar select: Pspice-> run OR click on the Run PSpice icon

28)When the simulation is complete you will see the following output.

You can see that the output at 1KHz appears to go to 20Volts even though the amplifier should saturate at +15Volts.

Creating Bode Plots

29)In the top toolbar of the simulation window select: Traces->Add Trace

There are a number of functions that are helpful for AC simulations. These, and others are shown on the right panel of the Add Traces window. Below are some helpful functions:

Function / Function name
Phase / P()
Magnetude / M()
dB / dB()
Imaginary Part / IMG()
Real Part / R()

30)Plot the phase of the transfer function by plotting the function P(V(Vout)) as shown below.

31)Click <OK> to close the window and plot the phase

Below is a plot of the phase. Remember the gain for low frequencies is -20. This is represented with a180 degree phase shift.

Showing the magnitude as a separate plot (a strip chart)

32)From the top toolbar of the schematic window with the waveforms select: Plot-> Add Plot to Window.

33)From the top toolbar of the simulation window select: Traces->Add Trace

34)Plot the magnitude of the transfer function by plotting the function M(V(Vout))

35)Click <OK> to close the window and plot.

A transient simulation with a digital pulse and initial condition

36)Build the simple RC circuit shown below. Add voltage markers to the input and output.

37)The part IC1 is used to assign an assign the initial condition of 2Volts at the node Vout.

PART / LIBBARY
Resistor / R / ANALOG
Capacitor / C / ANALOG
digital waveform / Vpulse / SOURCE
Initial condition / IC1 or IC2 (IC1 shown) / SPECIAL

There are two parts that are helpful for digital Spice simulations. One is Vpwl and the other is Vpulse. Here we are using Vpulse the parameters necessary for Vpulse are summarized below.

Parameter / Description
V1 / First Voltage
V2 / Second Voltage
TD / Delay Time
TR/TF / Rise/Fall time
PW / Pulse width
PER / Period

38)Run a Transient simulation simulating from 1-4usec

39)The output should appear as follows