How to use PSPICE - Download as DOC by HC120607135439

VIEWS: 11 PAGES: 7

									                    PSpice Transient Simulation & Plotting Your Results
I.     Transient simulation with a Sinusoid

  Start with the schematic shown below
       Markers can be used to automatically plot simulation results after a simulation has run

  1)   Place Markers using the place marker icon (top toolbar) at Vin and Vo (as shown below).



                                    Place Voltage Marker icon

                                    (also find place current and
                                    differential voltage marker icons)
                                                                          Sets initial
                                                                          condition on
                                                                          capacitor




                                                                         marker




II.    Simulating

  2) Create a new simulation profile: Top toolbar:
     PSpice->New simulation Profile

  3) Enter a Name in the New Simulation Pop-up
     menu

  4) Click on <Create> to close the window

  5) In the Simulation Settings Window (shown)
     a) Select Time Domain/Transient Analysis
     b) Set the simulation run time (2m)
     c) Set the minimum step size
     d) Click <OK> to close the window and apply
         settings




                                                                                                 1
6) To run the simulation: select the run simulation icon (top toolbar)




                          Run simulation icon


Your Results will be Plotted in the Resulting Simulation Window

(Vo is hard to see because it is so small)

7) Adding a New Plot Window
   a) From the Top toolbar of the SCHEMATIC-sim window select: Plot→Add Plot to Window
   b) Select the V(Vo) icon at the bottom of the window
   c) Hit ^x to copy
   d) Click on the top plot
   e) Hit ^v to paste




                        Click here and hit
                        ^v to paste




                                  Select, hit ^x to cut




                                                                                         2
III.   Adding Additional Traces
   After running a simulation you can display additional traces or functions performed on traces. We will plot (Vo-Vn)
   (the voltage across the capacitor)

   8) Adding Traces
      a) From the Top toolbar of the SCHEMATIC-sim window select: Trace→Add Trace
      b) Enter the Expression V(Vo)-V(Vn) as shown below
      c) Click on <OK> to close the window




            Voltages
            and currents                            Functions
            that can be                             that can be
            plotted                                 perfomed




                                                                                                                    3
IV.   Using Cursors

  It is possible to determine precise current and voltage values after running a simulation using interactive cursors.
  There are two cursors: Y1 and Y2. Y1 is controlled with the left mouse button and Y2 with the right

  9) Add cursors: Top toolbar select: Trace→Cursor→Display

  10) Controlling Y1 (left mouse) cursor
      a) Click on the little square of the V(Vo) trace icon with your left mouse (for this example V(Vo)).
         This will affiliate the Y1 (left mouse cursor) with the trace V(Vo).



                                                        Little square

      b) Click on the actual V(Vo) trace with your left mouse. You will see a crosshair at the location
         (see below)
      c) Keeping your left mouse button depressed drag the crosshair to a different location
      d) At the bottom of the screen (X,Y) information for the Y1 cursor is displayed. Also find
         information for Y2 and Y1 minus Y2. (see below)




                            Crosshair for
                            Y1 cursor




                                                                                     Data for Y1
                                                                                     and Y2
                                                                                     cursors



  The Y2 (right mouse) cursor data can be displayed by repeating steps (a)-(c) that were used for the Y1
  cursor (left mouse) substituting the right mouse



                                                                                                                         4
V.    Transient Simulation with a Digital Pulse

 11) Return to your schematic window
 12) Change the capacitor value to 1uF
 13) Select the Vsin part and delete it using the <delete> key

 There are two parts that can commonly be used for digital simulation: Vpwl and Vpulse (also Ipwl and Ipulse for
 currents). Here we will use Vpwl.

 PWL (PieceWise Linear) format
           PWL describes a waveform that is linear in pieces (piecewise linear). It consists of successive pairs of
           points (Ti, Vi) as shown below.
                    (T3, V3)                       (T4, V4)

     (T1, V1)     (T2, V2)                            (T5, V5)




 14) Add and edit a Vpwl part:
     a) Add a Vpwl part from the Library source (Bindkey p) to replace the Vsin part that was just deleted
     b) Double Click on the Vpwl part
     c) In the resulting window scroll to the right to expose part properties T1, T2,… and V1, V2 (see below)




      d) Enter the following part properties.

                               Ti           Vi
                (T1, V1)       0            0
                (T2, V2)       .5m          0
                (T3, V3)       .501m        1
                (T4, V4)       1m           1
                (T5, V5)       1.001m       0

      e) Click on <Apply>
      f) Click on the close window x (top right) to close the window




                                                                                                                      5
VI.       Plotting Currents


       15) On your schematic add a current marker plotting the current through the resistor
           a) Select the Add Current marker icon
           b) Place the marker on the pin of the resistor (the very edge of the part)




                                                        Add Current
                                                        marker


       16) Rerun the simulation (top toolbar run simulation icon) (See step (6)
           of this tutorial)


VII.      Working with Equations and Parameter Sweep
       One can declare variables and create equations based on these variables. We will run three simulations using
       three different capacitor values.


       Declaring a variable

       17) Declaring a variable:
           a) Place the part Param from the Library Special on the schematic
           b) Double click on the PARAMETER part
           c) Select New Column (or New Row)
           d) In the Add New Column window enter a name for your variable (here we are using val)
           e) In the Add New Column window enter a default value for your parameter (here we are using 1)
           f) In the Add New Column click <apply> to apply
           g) In the Add New Column click on the X (top right
              corner) to close the window
           h) Click <apply> again in the first window
           i) Click on the X (top right corner) to close the
              window




                                                                                                                      6
        Creating an Equation

        18) Curley brackets are used to denote equations. Edit the Capacitor value to be: {val*1u}.


VIII.      Performing a Parametric Nested Sweep

        19) Performing a Parametric Nested Sweep
            a) In the schematic window edit the simulation profile: Top toolbar→PSpice→Edit Simulation
               Profile
            b) Additionally select: Parametric Sweep
            c) Select: Global parameter
            d) Indicate the parameter to be swept: val
            e) And the range for val
            f) Click on <OK> to close the window




        20) Rerun the simulation (top toolbar run simulation icon) (See step (6) of this tutorial)
        21) In the resulting window select <OK> to plot all results




                                                                                                         7

								
To top