110 likes | 375 Views
DC Sweep. In PSpice. DC Sweep in PSpice. A simulation that results in a plot of specified voltages and/or currents in the circuit as a function of a particular variable .
E N D
DC Sweep In PSpice
DC Sweep in PSpice • A simulation that results in a plot of specified voltages and/or currents in the circuit as a function of a particular variable. • The variables that can be swept include the magnitude of a d.c. voltage or current source, temperature of the circuit (as most materials including resistors change their value as temperature changes), a model parameter – which might be the open loop gain of an op amp, and a global parameter, such as the magnitude of a variable defined using the PARAM part. • Multiple sweeps can be performed using the nested sweep option.
Example: Circuit from Design a Night Light Goal: Perform a DC Sweep of the voltage on the positive input terminal of the op amp to show how the output voltage changes as the value of Vref increases from 0V to a value larger than the voltage on the negative input terminal, which is equal to the voltage across R2.
DC Sweep • To set up a DC sweep, open the Analysis Setup popup window and select DC Sweep • Sweep Var. Type: Voltage Source • Name: Vref • Sweep Type: Linear • Start Value: 0V • End Value: 9V • Increment: Should be sufficiently small to show a sharp transition
Selection of Increment 0.5V increment 1mV increment These are two plots of the DC Sweep of Vref in the example circuit, where the only difference is the value used as the increment. Ideally, there should be a sharp transition as the output of the voltage comparator switches from one output level to the other . However, when the increment of 0.5V was used, PSpice interpolated between the calculated values for the output voltage of the op amp when Vref = 5V and Vref = 5.5V. As a result, the sharp transition looks like a gradual transition – an artifact of improper settings used during the simulation.
Markers • A plot will be automatically generated for the node voltages as a function of Vref wherever a voltage marker is placed in the circuit. • Current markers must be placed at the end of a component – the point where the blue of the component wire meets the green of the wire that you drew to connect the part to another component. • Two voltage markers, one with a + and one with a –are placed on the schematic when Voltage Differential is selected from the Marker toolbar. The difference in the node voltages is displayed on the plot. • Mark Advanced contains a set of options that include phase angle of the voltage or current at a node.
Markers • Voltage and current markers are placed in the schematic by clicking on either: • the Markers/Mark Voltage/Level or Mark/Mark Current into Pin • or by using the shortcut on the toolbar.
Plotting Current and Voltage • More than one marker can be put into a schematic. However only one plot will be generated automatically. • Only one scale is used per plot. If you plot the current flowing through the diode on the same graph as the output voltage of the op amp, the current flowing out of the op amp will look like it is always zero because it is a maximum of 15 mA when the scale is +/- 9V. The green curve in the plot is the output voltage of the op amp and the red curve is the current flowing out of the op amp into the 1kW resistor, Rlimit, connected to the output of the op amp.
Rescaling Current • Once you have a plot with both voltage and current, click on the key for the current located on the bottom left of the graph • in this example, -I(Rlimit) • A popup window called Modify Trace will open. • In the Trace Expression box at the bottom, type *1000 next to the name of the current that is already in the box.