Simulation Program for Integrated Circuits Emphasis, PSpice Tutorial-Electronics I-Handout, Exercises of Electronics

The course gives the students a sound knowledge of Fourier transforms along with Fourier integrals, partial differential equations, advanced vector analysis, complex variables and complex integrals. This is tutorial of PSpice. It includes: Simulation, Program, Integrated, Circuits, Emphasis, DC, Analysis, Transient, Lineat, Frequency, Noise, Parametrix

Typology: Exercises

2011/2012

Uploaded on 08/07/2012

saravati
saravati 🇮🇳

4.4

(29)

162 documents

1 / 13

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Simulation Program for Integrated Circuits Emphasis.
PSpice is a PC version of SPICE (which is currently available from OrCAD Corp. of
Cadence Design Systems, Inc.). A student version (with limited capabilities) comes with
various textbooks. The OrCAD student edition is called PSpice AD Lite. Information about
Pspice AD is available from the OrCAD website: http://www.orcad.com/pspicead.aspx
The PSpice Light version has the following limitations: circuits have a maximum of 64
nodes, 10 transistors and 2 operational amplifiers.
SPICE can do several types of circuit analyses. Here are the most important ones:
Non-linear DC analysis: calculates the DC transfer curve.
Non-linear transient and Fourier analysis: calculates the voltage and current as a
function of time when a large signal is applied; Fourier analysis gives the frequency
spectrum.
Linear AC Analysis: calculates the output as a function of frequency. A bode plot is
generated.
Noise analysis
Parametric analysis
Monte Carlo Analysis
In addition, PSpice has analog and digital libraries of standard components (such as NAND,
NOR, flip-flops, MUXes, FPGA, PLDs and many more digital components, ). This makes it
a useful tool for a wide range of analog and digital applications.
All analyses can be done at different temperatures. The default temperature is 300K.
The circuit can contain the following components:
Independent and dependent voltage and current sources
Resistors
Capacitors
Inductors
Mutual inductors
Transmission lines
Operational amplifiers
Switches
Diodes
Bipolar transistors
MOS transistors
JFET
MESFET
Digital gates
and other components (see users manual).
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Simulation Program for Integrated Circuits Emphasis, PSpice Tutorial-Electronics I-Handout and more Exercises Electronics in PDF only on Docsity!

S imulation P rogram for I ntegrated C ircuits E mphasis.

PSpice is a PC version of SPICE (which is currently available from OrCAD Corp. of Cadence Design Systems, Inc.). A student version (with limited capabilities) comes with various textbooks. The OrCAD student edition is called PSpice AD Lite. Information about Pspice AD is available from the OrCAD website: http://www.orcad.com/pspicead.aspx

The PSpice Light version has the following limitations: circuits have a maximum of 64 nodes, 10 transistors and 2 operational amplifiers.

SPICE can do several types of circuit analyses. Here are the most important ones:

  • Non-linear DC analysis: calculates the DC transfer curve.
  • Non-linear transient and Fourier analysis: calculates the voltage and current as a function of time when a large signal is applied; Fourier analysis gives the frequency spectrum.
  • Linear AC Analysis: calculates the output as a function of frequency. A bode plot is generated.
  • Noise analysis
  • Parametric analysis
  • Monte Carlo Analysis

In addition, PSpice has analog and digital libraries of standard components (such as NAND, NOR, flip-flops, MUXes, FPGA, PLDs and many more digital components, ). This makes it a useful tool for a wide range of analog and digital applications.

All analyses can be done at different temperatures. The default temperature is 300K.

The circuit can contain the following components :

  • Independent and dependent voltage and current sources
  • Resistors
  • Capacitors
  • Inductors
  • Mutual inductors
  • Transmission lines
  • Operational amplifiers
  • Switches
  • Diodes
  • Bipolar transistors
  • MOS transistors
  • JFET
  • MESFET
  • Digital gates
  • and other components (see users manual).

2. PSpice with OrCAD Capture (release 9.2 Lite edition)

Before one can simulate a circuit one needs to specify the circuit configuration. This can be done in a variety of ways. One way is to enter the circuit description as a text file in terms of the elements, connections, the models of the elements and the type of analysis. This file is called the SPICE input file or source file and has been described somewhere else (see http://www.seas.upenn.edu/%7Ejan/spice/spice.overview.html).

An alternative way is to use a schematic entry program such as OrCAD CAPTURE. OrCAD Capture is bundled with PSpice Lite AD on the same CD that is supplied with the textbook. Capture is a user-friendly program that allows you to capture the schematic of the circuits and to specify the type of simulation. Capture is non only intended to generate the input for PSpice but also for PCD layout design programs.

The following figure summarizes the different steps involved in simulating a circuit with Capture and PSpice. We'll describe each of these briefly through a couple of examples.

Step 1: Circuit Creation with Capture

  • Create a new Analog, mixed AD project
  • Place circuit parts
  • Connect the parts
  • Specify values and names

Step 2: Specify type of simulation

  • Create a simulation profile
  • Select type of analysis: o Bias, DC sweep, Transient, AC sweep
  • Run PSpice

Step 3: View the results

  • Add traces to the probe window
  • Use cursors to analyze waveforms
  • Check the output file, if needed
  • Save or print the results

Figure 1: Steps involved in simulating a circuit with PSpice.

The values of elements can be specified using scaling factors (upper or lower case):

T or Tera (= 1E12); G or Giga (= E9); MEG or Mega (= E6); K or Kilo (= E3); M or Milli (= E-3);

U or Micro (= E-6); N or Nano (= E-9); P or Pico (= E-12) F of Femto (= E-15)

Both upper and lower case letters are allowed in PSpice and HSpice. As an example, one can specify a capacitor of 225 picofarad in the following ways:

225P, 225p, 225pF; 225pFarad; 225E-12; 0.225N

Figure 3: Design manager with schematic window and toolbars (OrCAD screen capture)

2.1.2. Place the components and connect the parts

  1. Click on the Schematic window in Capture.
  2. To Place a part go to PLACE/PART menu or click on the Place Part Icon. This will open a dialog box shown below.

Figure 4: Place Part window

  1. Select the library that contains the required components. Type the beginning of the name in the Part box. The part list will scroll to the components whose name contains the same letters. If the library is not available, you need to add the library, by clicking on the Add Library button. This will bring up the Add Library window. Select the desired library. For Spice you should select the libraries from the Capture/Library/PSpice folder.

Analog : contains the passive components (R,L,C), mutual inductane, transmission line, and voltage and current dependent sources (voltage dependent voltage source E, current- dependent current source F, voltage-dependent current source G and current-dependent voltage source H). Source : give the different type of independent voltage and current sources, such as Vdc, Idc, Vac, Iac, Vsin, Vexp, pulse, piecewise linear, etc. Browse the library to see what is available. Eval : provides diodes (D…), bipolar transistors (Q…), MOS transistors, JFETs (J…), real opamp such as the u741, switches (SW_tClose, SW_tOpen), various digital gates and components. Abm : contains a selection of interesting mathematical operators that can be applied to signals, such as multiplication (MULT), summation (SUM), Square Root (SWRT), Laplace (LAPLACE), arctan (ARCTAN), and many more. Special : contains a variety of other components, such as PARAM, NODESET, etc.

  1. Place the resistors, capacitor (from the Analog library), and the DC voltage and current source. You can place the part by the left mouse click. You can rotate the components by clicking on the R key. To place another instance of the same part, click the left mouse button again. Hit the ESC key when done with a particular element. You can add initial conditions to the capacitor. Double-click on the part; this will open the Property window that looks like a spreadsheet. Under the column, labeled IC, enter the value of the initial condition, e.g. 2V. For our example we assume that IC was 0V (this is the default value).
  2. After placing all part, you need to place the Ground terminal by clicking on the GND icon (on the right side toolbar – see Fig. 3). When the Place Ground window opens, select GND/CAPSYM and give it the name 0 (i.e. zero). Do not forget to change the name to 0, otherwise PSpice will give an error or "Floating Node". The reason is that SPICE needs a ground terminal as the reference node that has the node number or name 0 (zero).

Figure 5: Place the ground terminal box; the ground terminal should have the name 0

  1. Now connect the elements using the Place Wire command from the menu (PLACE/WIRE) or by clicking on the Place Wire icon.
  2. You can assign names to nets or nodes using the Place Net Alias command (PLACE/NET ALIAS menu). We will do this for the output node and input node. Name these Out and In, as shown in Figure 2.

2.1.3. Assign Values and Names to the parts

  1. Change the values of the resistors by double-clicking on the number next to the resistor. You can also change the name of the resistor. Do the same for the capacitor and voltage and current source.
  2. If you haven't done so yet, you can assign names to nodes (e.g. Out and In nodes).
  3. Save the project

The check the direction of the current, you need to look at the netlist: the current is positive flowing from node1 to node1 (see note on Current Direction above).

Figure 6: Results of the Bias simulation displayed on the schematic.

2.2.2 DC Sweep simulation

We will be using the same circuit but will evaluate the effect of sweeping the voltage source between 0 and 20V. We'll keep the current source constant at 1mA.

  1. Create a new New Simulation Profile (from the PSpice Menu); We'll call it DC Sweep
  2. For analysis select DC Sweep; enter the name of the voltage source to be swept: V1. The start and end values and the step need to be specified: 0, 20 and 0.1V, respectively (see Fig. below).

Figure 7: Setting for the DC Sweep simulation.

  1. Run the simulation. PSpice will generate an output file that contains the values of all voltages and currents in the circuit.

2.3 Step 3: Displaying the simulation Results

PSpice has a user-friendly interface to show the results of the simulations. Once the simulation is finished a Probe window will open.

Figure 8: Probe window

  1. From the TRACE menu select ADD TRACE and select the voltages and current you like to display. In our case we'll add V(out) and V(in). Click OK.

Figure 9: Add Traces window

Figure 11: Result of the DC sweep, showing Vout, Vin and the current through resistor R2. Cursors were used for V(out) and V(in).

2.4 Other types of Analysis

2.4.1 Transient Analysis

We'll be using the same circuit as for the DC sweep, except that we'll apply the voltage and current sources by closing a switch, as shown in Figure 12.

Figure 12: Circuit used for the transient simulation.

  1. Insert the SW_TCLOSE switch from the EVAL Library as shown above. Double click on the switch TCLOSE value and enter the value when the switch closes. Lets make TCLOSE = 5 ms.
  2. Set up the Transient Analysis: go to the PSPICE/NEW SIMULATION PROFILE.
  3. Give it a name (e.g. Transient). When the Simulation Settings window opens, select "Time Domain (Transient)" Analysis. Enter also the Run Time. Lets make it 50 ms. For the Max Step size, you can leave it blank or enter 10us.
  4. Run PSpice.
  5. A Probe window in PSpice will open. You can now add the traces to display the results. In the figure below we plotted the current through the capacitor in the top window and the voltage over the capacitor on the bottom one. We use the cursor to find the time constant of the exponential waveform (by finding the 0.632 x V(out)max = 9.48. The

cursor gave a corresponding time of 30ms which gives a time constant of 30-5=25ms ( ms is subtracted because the switch closed at 5ms).

Figure 13: Results of the transient simulation of Figure 12.

  1. Instead of using a switch we can also use a voltage source that changes over time. This was done in Figure 14 where we used the VPULSE and IPULSE sources from the SOURCE Library. We entered the voltage levels (V1 and V2), the delay (TD), Rise and Fall Times, Pulse Width (PW) and the Period (PER). The values are indicated in the figure below. For details on these parameters click here. A description of other Spice elements can be found in the User’s guide or in the Spice Tutorial. (http://www.seas.upenn.edu/~jan/spice/)

Figure 14: Circuit with a PULSE voltage and current source.

  1. After doing the transient simulation results can be displayed as was done before
  2. The last example of a transient analysis is with a sinusoidal signal VSIN. The circuit is shown below. We made the amplitude 10V and frequency 10 Hz.

Figure 17: Circuit for the AC sweep simulation.

  1. Create a new project and build the circuit
  2. For the voltage source use VAC from the Sources library.
  3. Make the amplitude of the input source 1V.
  4. Create a Simulation Profile. In the Simulation Settings window, select AC Sweep/Noise.
  5. Enter the start and end frequencies and the number of points per decade. For our example we use 0.1Hz, 10 kHz and 11, respectively.
  6. Run the simulation
  7. In the Probe window, add the traces for the input voltage. We added a second window to display the phase in addition to the magnitude of the output voltage. The voltage can be displayed in dB by specifying Vdb(out) in the Add Trace window (type Vdb(out) in the Trace Expression box. For the phase, type VP(out).
  8. An alternative to show the voltage in dB and phase is to use markers on the schematics: PSPICE/MARKERS/ADVANCED/dBMagnitude or Phase of Voltage, or current. Place the markers on the node of interest.
  9. We used the cursors in Figure 18 to find the 3dB point. The value is 6.49 Hz corresponding to a time constant of 25 ms (R1||R2.C). At 10 Hz the attenuation of Vout is 11.4db or a factor of 3.72. This corresponds to the value of the amplitude of the output voltage obtained during the transient analysis of Figure 16 above.