creating a design -...

17

Upload: others

Post on 08-Sep-2019

5 views

Category:

Documents


0 download

TRANSCRIPT

Cadence® PSpice® is a simulation tool that performs analysis and verification of your circuits. You can use this tool to perform various analyses such as Transient, AC, DC, Parametric Sweep, and worst-case . In this file, you will use OrCAD® Capture to create a simple schematic design. You will then create a PSpice profile, run a simulation, and view the simulation results in the PSpice Probe window.

Creating a Design

Choose File – New – Project in Capture to create a new project.

In the New Project dialog box that appears, as shown in Figure 1, specify a Name and Location for the project. Also select Analog or Mixed A/D to create analog or mixed-signal designs to be used with PSpice.

Figure 1. New Project Dialog Box

In the Create PSpice Project dialog box that appears, as shown in Figure 2, select Create a blank project.

Note: In Capture, you can either create a blank project or base the new project on an existing project. To create a project based on an existing project, select Create based upon an existing project. This will create a new project with the same name and files as the selected existing project.

Figure 2. Create PSpice Project Dialog Box

A new project is created in Capture and a blank schematic entry page with the name PAGE1 is displayed, as shown in Figure 3.

Figure 3. Capture Window with New Schematic Page

You will create a simple schematic by placing one DC voltage source, one resistor, a capacitor, and a ground . You will then connect the placed parts and change a few part properties. Figure4 shows the circuit.

Figure 4. Circuit Design

Placing and Connecting Parts

To place the parts that can be simulated in PSpice, use the Place — PSpice Component menu

options. Press Escape to end the placing of parts.

To place the resistor, choose Place — PSpice Component — Resistor ( R ) and then click on the blank schematic canvas.

To place the capacitor: Choose Place — PSpice Component — Capacitor,( C ) right-click and choose Rotate to rotate the capacitor, and then click to place it.

To place the DC voltage source, choose Place — PSpice Component — Source — Voltage Sources (VDC ) — DC and click on the canvass.

To place a ground choose Place — PSpice Component — PSpice Ground.

To connect the placed parts, choose Place — Wire. Then, click on the respective pins to connect

them. Press Escape when done.

Editing Part Properties

The placed parts have their own default properties and values. You can edit many of these properties.

Double-click OVdc for the voltage source to open the Display Properties window, as shown in

Figure 5, and edit the value to 5Vdc. You can also specify a Display Format, if needed.

Figure 5. Display Properties Dialog Box

You can select a part, right-click, and choose Edit Properties to change property values. Open the Edit Properties window, as shown in Figure 6, for the capacitor.

Figure 6. Editing Part Properties

Click in the value column of the property IC and enter 0 to specify an initial condition of 0V. To

display the property and value, click Display and then select Name and Value, as shown in Figure 7, to display the name of the propety and its value.

Figure 7. Displaying Property and Value Click OK and then click Apply. Close the Property Editor window.

Running a Simulation

To run a simulation, you must first create a simulation profile. Choose PSpice — New Simulation Profile and then specify a name in the New Simulation dialog box as shown in Figure8.

Note: You can click the 'Open Design' button to open a project with a simulation profile created for you. Choose PSpice — Edit Simulation Profile to open the profile and view its settings.

Figure 8. New Simulation Dialog Box

Click Create to open the Simulation Settings dialog box, as shown in Figure 9.

Figure 9. Simulation Settings Dialog Box

You can specify any of the Analysis types, select different options, and set various parameters for

the simulation profile. In this exercise, change Run to time value to 10us to run the simulation

for 10µs. Click OK to accept the changes and save the profile.

Choose PSpice — Run to start the simulation.

Viewing Results

The Probe window, as shown in Figure 10, opens after simulation is complete.

Figure 10. PSpice Probe Window

You will display the waveform for the voltage at pin 2 of the capacitor, C1. Choose Trace — Add Trace to open the Add Traces window. Select V(C1:2), as shown in Figure 11, and click OK.

Figure 11. Add Traces Window

The resultant waveform is displayed in the probe window, as shown in Figure 12.

Figure 12. Resultant Waveform

Transient Analysis

Time Domain (transient) analysis plots outputs as a function of time. For example, you might want to plot the voltage, vc(t), across a capacitor in a RC circuit over a period of time, say

for 3ms.

In a lab, measuring instruments, such as voltmeters and ammeters, are used to measure current and voltage. Oscilloscopes are then used to display the output as a trace. PSpice is a simulation tool that generates signals, emulating measuring instruments, and displays the traces in the probe window, emulating an oscilloscope.

In this chapter, you will perform transient analysis for a switched series RC circuit to plot the voltage and current across a capacitor. You will then perform transient analysis on a switched RLC circuit.Finally, you will perform transient analysis on a series RC circuit with an AC source to plot the voltage across a capacitor.

Transient Analysis of a Switched RC Circuit

In the circuit in Figure 1, the switch U1 is closed at 0s and opens after 50s. The switch U2 is

open at 0s and closes after 50s. The capacitor C1, with initial voltage IC = 0V, is charged for

50s and then discharges through U2. You will use PSpice to observe the current and the

charging and discharging voltage across the capacitor.

Figure 1. A switched series RC circuit

Performing a Time Domain (Transient) analysis of the circuit for 100s, you can observe the

voltage across the capacitor; while charging for 50s and then discharging for the remaining 50s.

Start the simulation by choosing PSpice — Run.

To observe the voltage across the capacitor, add a trace (Trace — Add Trace) in PSpice for V(C1:2) as shown in Figure 2.

Figure 2. Waveform for voltage across capacitor

To observe the current, add a Y axis (Plot — Add Y Axis) and then add a trace for I(R1). The result is displayed in Figure 3.

Figure 3. Waveform for current

Transient Analysis of a Circuit with an AC Voltage Source

In Figure 4, an AC source, V1, is connected in series to a resistor and a capacitor. The voltage source

produces a sinusoidal signal of frequency 1KHz and with amplitude of 1V.

Figure 4. RC circuit with AC source

Simulate the circuit for 4ms with a Maximum step size of 4µs. Add a trace V(V1:+) to observe the voltage

at the positive end of the voltage source and then add a trace V(C1:2) to observe the voltage across the

capacitor as shown in Figure 5.

Figure 5. Waveform with AC voltage source

In a circuit with an AC source, the phase difference between the voltage and current across the capacitor is of interest. For the voltage plot the trace V(C1:2). For the current, I(C1) shows the flow from top to

bottom, but the reverse is of interest. Therefore, add a Y axis and plot the trace -I(C1). The resultant

waveforms are shown in Figure 6.

Note: In PSpice, while adding traces, you can perform arithmetic operators as in this example. For more information, refer PSpice User Guide.

Figure 6. Waveform for current and voltage phase difference

AC Analysis AC sweep is a frequency response analysis. AC analysis is performed on linear circuits with a single sinusoidal source. Unlike transient analysis, where output is given as a function of time, the output of AC

analysis is a phasor. A phasor represents both the amplitude and phase of the function without using time. You can perform AC analysis to determine AC gain for amplifiers or perform any network analysis to

determine node voltage magnitude and phase.

In AC analysis, PSpice calculates the small-signal response of the circuit to a combination of inputs by

transforming it around the bias point and treating it as a linear circuit.

In this chapter, you will perform steady-state AC analysis for a series RC circuit to determine the nodal

voltage and the current across the capacitor. In a steady-state analysis you find the phasor voltages and currents at a single frequency. You will then perform AC sweep analysis on the series RC circuit, that is,

determine the frequency response of the circuit over a range of frequencies. You will also explore the decade and octave variations of the logarithmic scale along with PSpice functions

such as DB() and Bode Plot.

AC Sweep of a RC Circuit

You will perform AC sweep analysis to determine the gain of the circuit shown in Figure 1.

In the steady-state analysis, you run the simulation for a single frequency. For a sweep analysis, you will

specify a range of frequencies as shown in Figure 4. Also note that decade variation of the logarithmic scale is used for the sweep.

Figure 4. Simulation for AC sweep analysis

The resultant waveform is shown in Figure 5. This waveform uses the DB() function available in PSpice to

calculate and plot the gain of the circuit. To add the trace: open Add Traces window (Trace — Add Traces), click DB() under Functions and Macros, and then click V(OUT).

Figure 5. Resultant waveform for AC analysis

Using Plot Window Templates - Gain and Phase

You will perform AC analysis of the circuit shown in Figure 1 and use the Bode Plot function of the Plot Window Templates to determine the gain and phase.

Specify a range of frequencies and use an octave variation of the logarithmic scale as shown in Figure 6.

Figure 6. Simulation for AC sweep analysis

To obtain the waveforms for gain and phase, use the Bode Plot function from under Plot Window

Templates and specify V(OUT) as the parameter, as shown in Figure 7.

Figure 7. Bode Plot function for V(OUT)

The resultant waveforms are shown in Figure 8.

Figure 8. Phase and gain waveforms for V(OUT)

Noise Analysis - Plotting Voltage Spectral Density

You will perform noise analysis of the circuit shown in Figure 1 to determine the total voltage spectral

density. In this circuit, the noise is generated by the resistor.

Note: The noise generated by a resistor can be modelled as a noiseless resistor in series with a noise

voltage. The resistor noise is spread uniformly over frequency giving a flat spectral density and resulting in white noise. Specify a range of frequencies and use a decade variation of the logarithmic scale as shown in

Figure 9. Also, note that Noise Analysis is enabled with V(OUT) as the output voltage and V1 as the input

voltage. The noise is to be analyzed at an interval of 1KHz as specified.

Figure 9. Simulation for AC sweep analysis

To obtain the total voltage spectral density, add the trace NTOT(R1) from the Add Trace window.

The resultant waveform is shown in Figure 10.

Figure 10. Voltage spectral density for resistor R1

Copyright © 2014 Cadence Design Systems, Inc.

All rights reserved.