One fun experiment I would always have my students do during their electronics classes was to sweep the frequency of an AC source in a circuit and examine how the voltage and current changed on a trace readout. This is a great way for anyone to get a first hand view of how a circuit responds to different frequencies.
When dealing with simple circuits, most designers and engineers can immediately see how the output signal will be affected by the elements in the circuit. Unfortunately, most circuits require more analysis during design. With the right simulator package, you don’t have to actually build the circuit to test it. Using AC/DC sweep simulation profiles gives you this information in an easy-to-read format.
What is a DC Sweep?
When you’re working with sweeps, the simplest type of sweep is a DC sweep. Here, there is only one parameter to be examined: the input voltage from your DC source. Ideally, you want to examine how the voltage drop or current at various locations in the circuit varies as a function of the DC voltage. You can gather current/voltage measurements in your simulated circuit using probes and plot the output current/voltage as a function of input voltage.
Unless your circuit includes nonlinear elements, such as diodes and transistors, a graph of the input voltage vs. output current/voltage will be a straight line. The slope of this line will depend on the values of various elements in the circuit. The curve could have a very odd shape when nonlinear elements are present in the circuit. This allows you to examine a number of properties of your circuit as the input voltage changes.
Note that a DC sweep is not the same thing as transient analysis of a circuit. In a DC sweep, the circuit is in the steady state, meaning that you are examining the current and voltage throughout the circuit after the transient response has died out. The transient response will arise if your circuit includes inductors and capacitors. If you are only conducting a DC sweep, the impedance of these elements under DC driving will be 0 and infinity, respectively, and you will only be able to see the steady-state voltage and current at various input voltages.
To examine the transient response, the voltage needs to change over time. You would need to construct an arbitrary waveform, where the circuit switches from 0 V to the desired DC level. A graph of the output current/voltage over time will then show you the transient response as the driving voltage switches between two different DC levels. This is very useful for simulating the circuit’s response to a series of digital pulses. You can then overlay the input vs. output signals on a single graph to get a direct comparison between them.
Example output from a DC frequency sweep
AC Sweep Simulations
While a DC sweep is designed to sweep through different voltage values of a DC source, an AC sweep is designed to sweep through different frequencies at a constant amplitude. This allows you to examine how the output voltage/current throughout the circuit respond to different driving frequencies. This requires including a sinusoidal source in your circuit. You can then examine the response of the circuit in the time domain or the frequency domain.
Just like the case in transient analysis, the output and input signals can be overlaid on a single graph over time. However, this is really only useful for directly comparing the response at a single frequency. Placing input/output curves on a single graph for multiple frequencies quickly complicates the graph and makes the results difficult to interpret. Therefore, the results from an AC sweep simulation profile is best viewed in the frequency domain.
In the frequency domain, you can gain two pieces of information from an AC sweep. First, you can see how the amplitude of the output signal changes as the input frequency changes. Second, you can see how the phase difference between the input and output signals change as frequency changes. This allows you to construct a transfer function and Bode plot for the circuit. An example output from a linear circuit is shown below:
Example output from an AC sweep for a linear circuit
Circuits with active and nonlinear circuit elements will change the shape of the input signal. Nonlinear elements can also generate sidebands through frequency mixing if the driving voltage is composed of multiple AC signals. Looking at the output amplitude vs. input frequency does not give an accurate view of how the shape of the signal changes at different frequencies. In this case, you’ll want to look at the shape of the signal in the time domain in order to see exactly how the circuit changes the shape of the signal.
Note that, with nonlinear and active circuit elements, the output from the circuit is also affected by the amplitude of an input AC signal. In general, getting an appropriate view of this behavior requires multiple time-domain AC simulations at different frequencies and with different input amplitudes. With nonlinear active elements (e.g., a BJT or MOSFET) in a SPICE simulation, you are better off using small signal analysis to examine the AC behavior of these circuits.
More Complicated DC/AC Sweep Simulation Profiles
Although the above discussion focused on circuits with a single AC or DC voltage source, you can apply the same methods to circuits current sources. You could also adapt your sweep simulations to circuits with multiple voltage/current sources. These circuits are important in designing amplifiers, active filters, and other circuits with feedback.
You can also change the values of different elements in your circuit and examine how the output changes with DC signal level or AC frequency. This helps you optimize the values of component in your circuit so that you can produce the desired behavior.
Working with the right SPICE package simplifies AC/DC sweep simulation profiles and analysis, even in the most complex circuits. The OrCAD PSpice Simulator from Cadence allows you to define any type of voltage/current source and simplifies many important analyses for any application. This unique package is adapted to complex PCB designs and interfaces directly with your circuit schematic data.
If you’re looking to learn more about the solutions Cadence has for you, talk to us and our team of experts.