Go to www.awrcorp.com
Back to search page Click to download print version MWO,VSS,AO,MMIC,Analyst

Chapter 24. Analog Office: Simulation in Analog Office

This chapter familiarizes you with different simulations in Analog OfficeTM. Simulation in Analog Office is measurement-based; the circuit cannot be simulated until a measurement is set up. After the circuit is simulated, adding a new measurement only simulates the circuit for the new measurement unless a parameter or simulation setting is altered on an existing measurement. The example circuit that follows is kept extremely simple and generic to focus your attention on tool use. Design examples in the following chapters of this guide illustrate key features of Analog Office. When using a foundry library, the library elements display in the Element Browser under the Libraries node in a subcategory with the foundry name.

For more information about Analog Office and its features, you can visit the NI AWR website at www.ni.com/awr.

You can also search the NI AWR Knowledge Base for the following relevant articles:

This chapter introduces the following procedures:

NOTE: The Quick Reference document lists keyboard shortcuts, mouse operations, and tips and tricks to optimize your use of the NI AWR Design Environment suite. Choose Help > Quick Reference to access this document.

DC Analysis

In this simple BJT amplifier example you annotate the circuit schematic with simulated DC voltages and currents.

Creating a New Project

The example you create in this chapter is available in its complete form as BJT_Amp_Complete.emp. To access this file from a list of Getting Started example projects, choose File > Open Example to display the Open Example Project dialog box, then Ctrl-click the Keywords column header and type "getting_started" in the text box at the bottom of the dialog box. You can use this example file as a reference.

To create a project:

  1. Choose File > New Project.

  2. Choose File > Save Project As. The Save As dialog box displays.

  3. Navigate to the directory in which you want to save the project, type "BJT_Amp.emp" as the project name, and then click Save.

Setting Default Project Units

To set default project units:

  1. Choose Options > Project Options. The Project Options dialog box displays.

  2. Click the Global Units tab and verify that the settings match those in the following figure. You can choose units by clicking the arrows to the right of the display boxes.

  3. Click OK.

Creating a Schematic

To create a schematic:

  1. Choose Project > Add Schematic > New Schematic. The New Schematic dialog box displays.

  2. Type "DC Bias", and click Create. A schematic window displays in the workspace and the schematic displays under Circuit Schematics in the Project Browser.

  3. Click the Elements tab to display the Element Browser. The Element Browser replaces the Project Browser window.

  4. Under Circuit Elements, expand the Nonlinear category by clicking the "+" to the left of its name, then click the BJT group.

  5. From the list of models displayed in the bottom window, select the GBJT3 model and drag and drop it on the "DC Bias" schematic.

  6. Double-click the GBJT3 model on the schematic to display the Element Options dialog box. On the Parameters tab, click the Show Secondary button to show all secondary parameters for the model. Note that the parameters are set to default values.

  7. Change the CJE parameter to "0.3", the TF parameter to "0.01", and the CJC parameter to "0.3", then click OK.

  8. Expand the Lumped Element category and then click the Resistor group.

  9. Select the resistor (RES) and drag it to the schematic. Attach it to the collector as shown in the following figure, then repeat this step to add resistors to the base and emitter of the BJT as shown in the following figure. Remember to right-click to rotate the resistor before clicking to place it. For more information see Connecting Element and System Block Nodes and Using the Element Browser.

  10. Double-click a RES element. In the Element Options dialog box, change its parameters to those shown in the following schematic. Repeat this step for the other two RES elements.

    NOTE: You can also simply double-click the parameter value displayed on the schematic to open a text box in which you can modify a parameter.

  11. In the Element Browser under Circuit Elements, expand the Sources category and then click the DC group. Select the DCVS element (DC voltage source) and connect it to the circuit schematic as shown in the following figure. Change its parameters to match those shown.

Placing Ground on a Node

To add ground to a node:

  1. Choose Draw > Add Ground.

  2. Move the cursor onto the schematic and position the ground on the bottom node of DCVS as shown in the following figure, then click to place it.

  3. Repeat these steps to add a ground to the Re resistor.

Tip: When adding/moving/pasting an element in a schematic, an inference line displays when nodes between elements align. Press the Shift key when placing an inference-aligned element to automatically add the connecting wire.

Back Annotating Voltages and Currents on the Schematic

To back annotate the circuit:

  1. In the Project Browser under Circuit Elements, right-click the "DC Bias" schematic and choose Add Annotation.

  2. Add a measurement to calculate the DC current for all the elements using the settings shown in the following figure, then click OK.

  3. Similarly, add the following measurement to calculate the DC voltages, then click OK.

Simulating the Circuit

To simulate the circuit choose Simulate > Analyze or click the Analyze button on the toolbar. The current and voltages display in the schematic window.

Tuning the Circuit

Tuning a circuit in Analog Office is a very simple, interactive task. In this example, you tune the base resistor RB1 and analyze how the annotation results change.

To tune a parameter:

  1. Choose Simulate > Tune Tool or click the Tune Tool button on the toolbar.

  2. Move the cursor into the schematic window to see the Tune Tool cursor. Click the R parameter of the RB1 resistor with the Tune Tool. The R parameter should change colors to indicate that it is ready for tuning. Click elsewhere in the schematic to deactivate the Tune Tool.

  3. Choose Simulate > Tune or click the Tune button on the toolbar to display the Tuner. Inside the tuner you see the R parameter of the RB1 resistor with a range of values. You can edit those values as desired.

  4. Slide the tuner bar and note how the DC voltage and current values in the schematic change for different values of R. As you slide the tuner, the APLAC simulator automatically calculates and displays new values.

  5. Click Restore to return to the original value, then close the Tuner.

DC Sweep

To perform a DC sweep:

  1. Double-click the DCVS element name as shown in the following figure to activate the edit box. Replace the element name with DC_V and then click outside of the box. Note that the element is replaced with the dynamic voltage source DC_V. You can also right-click the DCVS element in the schematic and choose Swap Element. From the list of elements, select DC_V and then click OK.

  2. Set the sweep parameters as shown in the following figure, then click OK.

  3. In the Element Browser, expand the MeasDevice category, then click the Probes group. Select the V_PROBE element and connect it to node 2 of the BJT element as shown in the following figure. This is an easier method of measuring the voltage at a node. It can also be done without using a probe, as demonstrated in the next chapter.

Adding a Graph

To add a graph:

  1. In the Project Browser, right-click Graphs and choose New Graph. You can also click the Add New Graph button on the toolbar. The New Graph dialog box displays.

  2. Select Rectangular as the graph type, type "DC Sweep" as the graph name, and then click Create. The new graph displays in a window in the workspace and its name displays as a subnode under Graphs in the Project Browser.

Adding a Measurement

To add measurements to the graph:

  1. Right-click the "DC Sweep" graph in the Project Browser and choose Add Measurement. The Add Measurement dialog box displays. You can also click the Add New Measurement button on the toolbar.

  2. Add a measurement by specifying the settings shown in the following figure (under Measurement Type, expand the Nonlinear node to see these options), then click OK.

  3. Choose Simulate > Analyze or click the Analyze button on the toolbar. The simulation response shown in the following figure displays.

Post-Analysis Tuning

In this example you analyze how the DC Sweep curve changes while tuning the base resistor, and see the effect of tuning on a DC sweep source.

To see tuning effects on a graph:

  1. In the Project Browser under Circuit Schematics and DC Bias, double-click an annotation measurement. In the Edit Schematic Annotation dialog box, ensure that DC_V.V1 is set to Select with tuner and then click OK. (Click OK even if no changes are necessary.) Repeat this step for the other annotation measurement.

  2. Choose Simulate > Tune or click the Tune button on the toolbar to display the Variable Tuner. An additional Vdc parameter displays in the tuner with a range of index values.

  3. Slide the tuner bar for the R parameter of the RB1 resistor. Note how the DC Sweep graph changes for different values of R.

  4. Slide the tuner bar for Vdc to sweep the DC source. The numbers in the tuner are the number of sweep points, not the actual DC values. As you slide the tuner bar notice how the current and voltage values change on the schematic for every possible value of Vdc source, but the DC Sweep graph remains unchanged. Remember that these values are stored in memory and are displayed upon sliding the tuner; Analog Office does not resimulate the circuit when you vary the Vdc value. Varying RB1 still resimulates and generates new sweep data.

  5. Click Restore > Initial to return to the original values, and close the tuner.

Small Signal AC Analysis

In this section you perform small signal AC analysis and observe the linear voltage gain.

Copying a Schematic

To copy and modify an existing schematic:

  1. In the Project Browser, select the "DC Bias" schematic under Circuit Schematics, then drag and drop the schematic onto the Circuit Schematics node. A new schematic window named "DC Bias_1" displays.

  2. Right-click "DC Bias_1" in the Project Browser and choose Rename. Rename the schematic to "Small Signal".

  3. In the Element Browser, expand the Lumped Element category, then click the Capacitor group. Select a capacitor (CAP) and drag it to the Small Signal schematic. Attach a total of three capacitors (CAP) to the schematic as shown in the following figure, right-clicking as necessary to rotate them.

  4. Replace the DC_V element with a DCVS element as shown previously in the "DC Sweep" section.

  5. Edit the capacitor and source parameters as shown in the following figure.

Placing Ports on a Node

To place a port on a node:

  1. Choose Draw > Add Port.

  2. Move the cursor onto the schematic and position a port on the C1 capacitor node as shown in the following figure, then click to place it.

  3. Repeat these steps to add a port to the C2 capacitor node.

    You can also add a port by clicking the Port button on the toolbar and sliding the cursor onto the schematic.

  4. Edit the port parameters as shown in the following figure.

Setting Up the Frequency Sweep

To set up the frequency sweep:

  1. Choose Options > Project Options. In the Project Options dialog box, click the Frequencies tab. Set the frequencies as shown in the following figure and then click Apply. The frequency list displays under Current Range.

  2. Click OK.

Setting Up Measurements

To set up the measurements:

  1. Add a new rectangular graph named "Bode Plot".

  2. Add a measurement for the magnitude of the voltage gain using the settings in the following figure.

  3. Click Add.

  4. Clear the dB check box, then select Angle under Complex Modifier to plot the phase, then click Add followed by the Close button.

  5. Right-click inside the "Bode Plot" graph window and choose Options, or double-click the legend box inside the graph. Click the Axes tab, select X under Choose axis, and select the Log scale check box.

  6. Select Right 1 under Choose axis and click the Add axis button to add extra y-axes as Left 2 and Right 2.

  7. Click the Measurements tab and specify the settings in the following figure, then click OK. Note that you can also plot magnitude and phase on the right and left y-axes of the same plot.

  8. Choose Simulate > Analyze or click the Analyze button on the toolbar. The simulation response shown in the following figure displays.

  9. Open the "DC Bias" schematic and disable tuning on the RB1 resistor by choosing Simulate > Tune Tool or clicking the Tune Tool button on the toolbar, then clicking the R parameter to toggle off its tuning. The parameter value should change to black. Click elsewhere in the schematic to deactivate the Tune Tool.

  10. On the "Small Signal" schematic, choose Simulate > Tune or click the Tune button on the toolbar to display the Tuner. Vary the value of RB1 and analyze how the gain changes. Click Restore to return to the original values.

Transient Analysis

In this example you set up the circuit for both harmonic balance simulation and transient simulation using the APLAC simulator. The harmonic balance simulations calculate the steady state behavior of the circuit, whereas transient simulations follow the transient process. There are two conditions under which the results of these two simulations agree:

  • For steady state behavior, transient simulations run to steady state (a large number of periods so the transient effects "die out").

  • For transient effects, harmonic balance simulations run with a large period (a small fundamental frequency so transient effects "die out" before the trigger signal repeats, but also with a large number of harmonics, so the sharp transitions are well represented).

These cases are demonstrated by using an AC (sinusoidal) signal source and a pulse voltage source in a circuit.

Large Signal Analysis

To perform a large signal analysis:

  1. Right-click the "Small Signal" schematic in the Project Browser and choose Duplicate. A duplicate schematic named "Small Signal_1" is created.

  2. Right-click "Small Signal_1" in the Project Browser, and choose Rename. Rename the schematic to "Large Signal".

  3. Disable tuning on the RB1 resistor by choosing Simulate > Tune Tool or clicking the Tune Tool button on the toolbar, then click the R parameter to toggle off its tuning. Click elsewhere in the schematic to deactivate the Tune Tool.

  4. Right-click PORT1 and choose Toggle Enable to disable it. The disabled port displays in gray.

  5. Change the port number (P parameter) of the output port to "1". (You can also replace PORT2 with a 500 ohm resistor to ground, in which case you should add a new V_PROBE there.)

  6. In the Element Browser, expand the Sources category, then click the AC group. Add a Dynamic AC voltage source (AC_V) and a ground to the schematic as shown in the following figure. Edit the AC_V element parameters as shown. Note that the default setting for AC_V is Signal=Pulse and you need to change this to Signal=Sinusoid.

Setting up the Simulation

To set up the simulation:

  1. In the Project Browser, right-click the "Large Signal" schematic and choose Options.

  2. In the Options dialog box click the Frequencies tab, clear the Use project defaults check box, select the Single point check box, and specify "1" as the Point (GHz) under Modify Range, then click the Apply button.

  3. Click the APLAC Sim tab and ensure that under Common Simulator Options (Shared by multiple simulator types), the Transient Options parameters are set as shown in the following figure.

  4. Click the Show Secondary button and select Show only last two periods, then click OK to save the settings.

Adding Measurements

To add a graph and measurements:

  1. Add a rectangular graph named "Time Domain".

  2. Create an output voltage waveform measurement using the settings in the following figure, then click Add. (Under Measurement Type, expand the Nonlinear node to see Voltage.)

  3. Create an additional measurement by selecting APLAC Trans as the Simulator and then clicking Add.

  4. Select AC_V.V2 as the Measurement Component for input voltage waveform, then click Add followed by the Close button.

  5. Choose Simulate > Analyze or click the Analyze button on the toolbar. The transient and harmonic balance results should match closely, as shown in the following figure. In this case the transient simulation is using the harmonic balance settings. You can increase the number of harmonics for Tone1 for better resolution in the transient waveforms.

  6. To disable the parameter markers in the second legend, right-click in the "Time Domain" graph window and choose Options, or double-click on the legend, to display the Graph Options dialog box. On the Markers tab, clear the Param markers enabled check box, and click OK.

  7. Add another rectangular graph named "Spectrum".

  8. Create a measurement for the spectrum of the output voltage using the settings in the following figure, then click Apply.

  9. Create an additional measurement by selecting APLAC Trans as the Simulator and then click Add followed by the Close button.

  10. Right-click in the "Spectrum" graph window and choose Options to display the Graph Options dialog box. On the Axes tab, select Left1 under Choose axis, clear the Auto limits check box, select the Log scale check box, and specify "0.001" as Min and "1" as Max. Click Apply, and then OK.

  11. Run the simulation. The simulation response shown in the following graph should display.

Pulse Signal

To perform a simulation with a pulse signal:

  1. Make a copy of the "Large Signal" schematic and rename it "Pulse Signal".

  2. In the Project Browser, right-click the "Pulse Signal" schematic and choose Options. In the Options dialog box on the Frequencies tab, select the Single Point check box and type "0.005" as the Point (GHz) under Modify Range, then click the Apply button.

  3. Click the APLAC Sim tab and under Harmonic Balance Options, type "4096" as the value for Tone 1 Harmonics.

  4. On the same tab under Transient Options, ensure that settings match those shown in the following figure.

  5. On the same tab under Transient Analysis Options, clear the Use project defaults check box and change Transient Preset to Accurate. (This setting is usually not necessary, but ensures a close match between simulators in this case.)

  6. In the schematic, double-click the AC source (AC_V) and change the Signal parameter to Pulse. Notice that the parameters change. Edit the parameters to the values shown in the following figure.

  7. Add a new rectangular graph named "Time Domain Pulse".

  8. Add Vtime measurements (expand the Nonlinear category and select Voltage as the Measurement Type and Vtime as the Measurement) to this graph for the "Pulse Signal" schematic at PORT_1 with both the APLAC harmonic balance and APLAC Trans simulators.

  9. Run the simulation. Due to the long time constant and the brief pulse, accurate APLAC harmonic balance results required 4096 harmonics for Tone 1, which may not be practical for very large circuits.

  10. Right-click the "Time Domain Pulse" graph and choose Options to display the Graph Options dialog box. On the Axes tab, select x under Choose axis, clear the Auto limits check box, specify "0" as Min and "10" as Max, then click Apply and OK.

Please send email to awr.support@ni.com if you would like to provide feedback on this article. Please make sure to include the article link in the email.

Legal and Trademark Notice