Changes

Jump to: navigation, search

Analyzing Circuits Using Predefined Tests

3,171 bytes removed, 22:08, 10 November 2016
/* Network Analysis */
<tr>
<td>
[[File:b2MAN_Fig5.png|thumb|left|270px250px|RF.Spice A/D Test Panel.]]
</td>
</tr>
<table>
<tr>
<td> [[File:b2MAN_Fig47.png|thumb|left|250px|DC Sweep Test Settings.]]
</td>
<td> [[File:b2MAN_Fig50.png|thumb|left|250px|DC Sensitivity Test Settings.]]</td></tr>
</table>
 
===Generating Characteristic v-i Curves for Active Devices===
<tr>
<td>
[[File:b2MAN_Fig224.png|thumb|left|460px550px|The NPN-Type BJT curve tracer test circuit.]]
</td>
</tr>
</tr>
</table>
 
[[File:b2MAN_Fig231.png|thumb|200px|The output of a DC Sensitivity Test.]]
===DC Sensitivity Test===
{{Note | In order to view the node numbers in your circuit, check the "Show Node Numbers" option in the View Menu or use the keyboard shortcut "Ctrl+Alt+N".}}
 
<table>
<tr>
<td>
[[File:b2MAN_Fig50.png|thumb|left|250px|DC Sensitivity Test Settings.]]
</td>
</tr>
</table>
The results of a DC sensitivity test are displayed in a table window. The left column of the table lists the part parameters and the right columns shows the derivative of the output voltage with respect to the respective parameters. For example, consider the simple voltage divider circuit of Tutorial lesson No. 1, which consists of a 1V DC voltage source in series with a 1k resistor and another 2k resistor. The output voltage is designated as the voltage across the 2k resistor. The results of the DC sensitivity test for this circuit indicate that the output voltage is increased by 666.66mV for every 1-volt increase in the input source voltage, it is decreased by -1.111 mV for every 1 Ohm change in the first resistor's value, and it is increased by 555.55 microvolts for every 1 Ohm change in the second resistor's value. Note that these are all small-signal operating point results.
 
<table>
<tr>
<td>
[[File:b2MAN_Fig231.png|thumb|left|300px|The output of a DC Sensitivity Test.]]
</td>
</tr>
</table>
===Device Output Parameters Test===
<table>
<tr>
<td> [[File:b2MAN_Fig59.png|thumb|200pxleft|250px|Device Output Parameters Test Settings.]]
</td>
<td> [[File:b2MAN_Fig60.png|thumb|200pxleft|250px|Model Output Parameters Test Settings.]]
</td>
</tr>
== AC Test Types ==
[[File:b2MAN_Fig51.png|thumb|200px|AC Sweep Test Settings.]]
===AC Frequency Sweep Test===
{{Note | Before running an AC analysis, you have to designate one or more AC sources for your circuit and set their AC amplitudes (and phases). During an AC analysis, [[RF.Spice A/D]] shorts out all of the non-constant voltage sources that have a zero AC magnitude and opens all the non-constant current sources that have a zero AC magnitude. Make sure that the voltage and current sources used as inputs have non-zero AC voltage/current values.}}
 
<table>
<tr>
<td>
[[File:b2MAN_Fig51.png|thumb|left|250px|AC Sweep Test Settings.]]
</td>
</tr>
</table>
All the sources with non-zero AC values are treated as sinusoidal sources with the specified peak voltage/current amplitudes and phases and default zero offsets. You can view or edit the AC values of voltage and current sources by double clicking on the parts and selecting the "Small-Signal AC and Distortion" tab of their property dialog. Make sure to check the "Use" checkbox in the section titled "AC Properties for Small-Signal AC Properties only". Given the specified voltage and current source values, the DC operating point of your circuit is calculated, and all nonlinear elements are replaced with their small-signal circuit models. If the DC operating point of your circuit with the sources shorted out is not where you want it, you may have to place some constant (DC) voltage sources in the circuit to compensate. Alternatively, you can set a nonzero value for the "Small-Signal Offset" parameter of an AC source as shown in the figure below.
<tr>
<td>
[[File:B2TUT2 18.png|thumb |400pxleft|550px|The AC and Distortion tab of the Source's property dialog.]]</td>
</td>
</tr>
<tr>
<td>
[[File:b2MAN_Fig204.png|thumb|640pxleft|720px|The frequency response of the output voltage of the Op-Amp circuit with capacitive load shown above.]]
</td>
</tr>
</table>
 
[[File:b2MAN_Fig52.png|thumb|200px|AC Sensitivity Settings.]]
===AC Sensitivity Test===
The AC Sensitivity Test calculates the small-signal sensitivity of an output port to all device values and model [[parameters]] over a range of frequencies. The output port for sensitivity calculation is specified by a pair of positive and negative (reference) nodes. You can also prespecify whether the plots use decibels or magnitude, or degrees or radians.
 
<table>
<tr>
<td>
[[File:b2MAN_Fig52.png|thumb|left|250px|AC Sensitivity Settings.]]
</td>
</tr>
</table>
===Distortion Test===
<table>
<tr>
<td> [[File:b2MAN_Fig53.png|thumb|200pxleft|250px|Distortion Test Settings.]]</td><td> [[File:b2MAN_Fig54.png|thumb|200px|Transfer Function Test Settings.]]</td><td> [[File:b2MAN_Fig55.png|thumb|200px|Pole-Zero Test Settings.]]
</td>
</tr>
</table>
 
[[File:b2MAN_Fig232.png|thumb|470px|The output of a Small-Signal Transfer Function Test.]]
===Small-Signal Transfer Function Test===
The Transfer Function Test calculates the small-signal transfer function of your circuit by linearizing it around its DC operating point. It generates the input impedance, output impedance and voltage gain seen across your circuit from the input port to the output port. All you need to do is specify the the input source and the output port.
 
<table>
<tr>
<td>
[[File:b2MAN_Fig54.png|thumb|left|250px|Transfer Function Test Settings.]]
</td>
</tr>
</table>
For the simple voltage divider circuit of Tutorial Lesson 1 consisting of two resistors R1 = 1k and R2 = 2k, the transfer function is requested with the output port set between node 2 to ground (across R2), and the voltage source set as the input port. The test results for this example are shown in the opposite figure. The input impedance seen through the voltage source is R1 + R2 = 3k. The output impedance seen from the output port is the parallel combination R1 || R2 = 666.67. The transfer function is V2/V1 = 0.667.
 
<table>
<tr>
<td>
[[File:b2MAN_Fig232.png|thumb|left|480px|The output of a Small-Signal Transfer Function Test.]]
</td>
</tr>
</table>
===Pole-Zero Test===
The Pole-Zero Test generates a list of small-signal poles and zeros of the transfer function of your circuit given the input and output nodes.
Specify the input and output ports by the Positive and Negative (Reference) node numbers. To define the transfer function, you have two options: voltage gain by choosing "(output voltage)/(input voltage)" or trans-impedance by choosing "(output voltage)/(input current)". You can instruct the program to compute "Poles Only", or "Zeros Only", or "Pole & Zero".
 
<table>
<tr>
<td>
[[File:b2MAN_Fig55.png|thumb|left|250px|Pole-Zero Test Settings.]]
</td>
</tr>
</table>
The results of a Pole-Zero test is displayed as a table. As an example, consider the RLC circuit of Tutorial Lesson 2. Using the voltage gain definition for the transfer function, the Pole-Zero test reports two poles listed below:
|}
[[File:b2MAN_Fig61.png|thumb|200px|Noise Test Settings.]]
===Noise Test===
The Noise Test analyzes the device-generated noise over a range of frequencies. For this test you provide an input source, an output port and a range of frequencies. [[RF.Spice A/D]] calculates the noise contributions of each device (and each noise generator within each device) to the output port voltage. The program also calculates the equivalent to the output noise referred back to the specified input source. This is what is meant by the "Input Noise". The calculated value of the noise over the specified range of frequencies corresponds to the spectral density of the signal viewed as the square root of a stationary Gaussian stochastic process. After calculating the spectral densities, the simulator integrates these values over the frequency range to arrive at the total noise voltage/current over this frequency range. This calculated value corresponds to the variance of the circuit variable viewed as the square root of a stationary gaussian process.
 
<table>
<tr>
<td>
[[File:b2MAN_Fig61.png|thumb|left|250px|Noise Test Settings.]]
</td>
</tr>
</table>
As for the specific noise sources, they include the "shot" noise associated with the DC currents in semiconductor devices and the "thermal" noise associated with resistance. Semiconductors also display "flicker" (1/f) noise. However, due to the lack of a unified model, [[RF.Spice A/D]] handles this type of noise on a "case by case" basis. There are flicker noise parameters available for transistors in the list of model parameters. The program can also provide the noise gain associated with the 1/f source.
<table>
<tr>
<td> [[File:b2MAN_Fig240.png|thumb|360pxleft|480px|The RTL inverter circuit of Tutorial Lesson 3.]] </td></tr><tr><td> [[File:b2MAN_Fig242.png|thumb|360pxleft|480px|The integrated input and output noise results.]] </td>
</tr>
</table>
<table>
<tr>
<td> [[File:b2MAN_Fig241.png|thumb|640pxleft|720px|Plot of input and output noise spectral densities.]] </td>
</tr>
</table>
Just as in low frequency circuits, RF circuits must be excited using a voltage or current source. However, in order to ensure a successful RF circuit simulation, your source must be a single-frequency (sinusoidal) AC source. Remember that in [[RF.Spice A/D]] circuits, you must specifically designate a source to operate as an AC source for all tests of the AC type. The RF Menu of [[RF.Spice A/D]] provides two additional types sources: the AC voltage source with the keyboard shortcut "Alt+V" and the AC current source with the keyboard shortcut "Alt+I". These sources are identical to the regular voltage and current sources of [[RF.Spice A/D]], whose "Use" checkboxes in the AC section of their source property dialog are automatically checked.
 
[[File:RFAC1.png|thumb|400px| AC voltage and current sources with internal series or shunt impedances.]]
{{Note | For AC-type RF circuit analysis, you can only use AC voltage or current sources with a single common frequency.}}
In most RF circuits, the sources are modeled to have an internal source impedance typically denoted by Z<sub>s</sub>. This source impedance is usually real-valued and typically has a value of 50 Ohms. To model the source impedance, you can simply use a resistor in series with the AC voltage source or a resistor in parallel with the AC current source as shown in the opposite figure. If you need a complex-valued source impedance, you can use a "Complex Impedance" and connected it either in series or in parallel with the AC voltage or current source, respectively.
<table><tr><td>[[File:RFAC2RFAC1.png|thumb|400pxleft| A simple RF circuit driven by a 480px| AC voltage source and current sources with a resistive loadinternal series or shunt impedances.]]</td></tr></table> 
Similarly, most RF circuits have a load impedance typically denoted by Z<sub>L</sub>. This load impedance, too, is usually real-valued and typically has a value of 50 Ohms. To model the load impedance, you can simply use a resistor at the output port of your RF circuit. The opposite figure shows a simple RF circuit consisting of a two-port network N1 connected to an AC voltage source with a 50&Omega; internal resistance and terminated at a 100&Omega; resistive load. Note how the negative input and output pins of the two-port device have been grounded.
Your load impedance can also be a combination of resistors, capacitors or inductors to model capacitive or inductive loading<table><tr><td>[[File:RFAC2. Note that in that case you will have png|thumb|left|480px| A simple RF circuit driven by a complex-valued load impedance that varies voltage source and with the operational frequency. In some other cases, you may prefer a user-defined "Complex Impedance" as your resistive load, which cannot be simply modeled as a combination of RLC elements. A resonant antenna load is a good example of this case. The port characteristic data for the antenna structure can be generated by an electromagnetic simulator like [[EM.Cube]] and then imported to [[RF.Spice A</D]]. If you have the input impedance values as a function of frequency, then you should define a complex impedance load. If you have the return loss (s11) data as a function of frequency (as is usually the case), then you can define a one-port as your load. td></tr></table>
[[File:RFAC3Your load impedance can also be a combination of resistors, capacitors or inductors to model capacitive or inductive loading. Note that in that case you will have a complex-valued load impedance that varies with the operational frequency. In some other cases, you may prefer a user-defined "Complex Impedance" as your load, which cannot be simply modeled as a combination of RLC elements.png|thumb|600px| A more realistic version resonant antenna load is a good example of this case. The port characteristic data for the previous antenna structure can be generated by an electromagnetic simulator like [[EM.Cube]] and then imported to [[RF circuit including connecting transmission line segments.Spice A/D]]. If you have the input impedance values as a function of frequency, then you should define a complex impedance load. If you have the return loss (s11) data as a function of frequency (as is usually the case), then you can define a one-port as your load.
===Using Transmission Lines for Connecting Parts===
You can use Generic T-Line segments or physical transmission line types to connect the various RF parts and devices in your circuit. The opposite figure shows the same simple RF circuit of the previous figure, but containing two T-line segments, one connecting the source to Port 1 of two-port N1 and the other connecting Port 2 of N1 to the resistive load. Note how the negative input and output pins of both T-line segments have been grounded. Lossless transmission line segments cause a phase shift of the propagating signal, while lossy transmission lines also cause additional signal attenuation.
<table><tr><td>[[File:RFAC4RFAC3.png|thumb|200pxleft| Setting the parameters in 640px| A more realistic version of the AC Frequency Sweep Test Panelprevious RF circuit including connecting transmission line segments.]]</td></tr></table>
===Defining RF Circuit Observables===
{{Note | Typically the input and output voltage, currents and powers are of primary interest. These are measured at the input port (between the source impedance and input transmission line segment) and output port (between the output transmission line segment and the termination load).}}
 
<table>
<tr>
<td>
[[File:RFAC4.png|thumb|left|250px| Setting the parameters in the AC Frequency Sweep Test Panel.]]
</td>
</tr>
</table>
In the previous RF circuit, the input port has node index 2 and the output port has node index 5. Therefore, the voltage v(2) and v(5) are designated as the simulation output data. The figure below shows a plot of the computed input and output voltages over the frequency range 1-10 GHz. A frequency step size of 10MHz has been set for the frequency sweep.
<tr>
<td>
[[File:RFAC5.png|thumb|500pxleft|550px| Defining the input and output voltages for the previous RF circuit.]]
</td>
</tr>
<tr>
<td>
[[File:RFAC6.png|thumb|640pxleft|720px| Graph of the computed input and output voltages of the previous RF circuit over the frequency range 1-10 GHz.]]
</td>
</tr>
== Network Analysis ==
RF circuits are typically characterized as multiport networks (usually one-port or two-port). In many practical cases, rather than computing the input or output voltages or currents, you will be more interested in the port characteristics of your RF circuit. The Network Analysis Test characterizes a circuit with one or two ports. It is used to determine the circuit’s behavior as seen through its port(s) and generates data in the form of Z (impedance) parameters, Y (admittance) parameters, S (scattering) parameters, and H parameters. For a one-port circuit, you designate an input port (Port 1) and calculate its return loss or input impedance. For a two-port circuit, you specify an input port (Port 1) and an output port (Port 2) and find its insertion loss or gain. The most commonly used set of parameters for RF circuit characterization are the scattering (S) parameters. The "Network Analysis Test" is one of the AC-type tests of [[RF.Spice A/D]], which computes four sets of parameters: S, Z, Y and H. In the case of a two-port circuit, the four Z parameters are Z11 (the input impedance), Z22 (the output impedance), and Z12 and Z21 (the cross-impedances). Network analysis is often used for characterization of circuits that operate at very high frequencies. The components operating at these frequencies are often modeled with tables of S parameters.
{{Note | Network analysis is an AC circuit analysis that is typically performed for high frequency circuits.}}
For amplitude graphs, you have the option to plot them in Decibels (dB) scale. For phase graphs, you have the option to express them in degrees. You also need to specify which parameter set to calculate as the output of network analysis. The four options are Z, Y, S or H.
 
{{Note | Smith charts and polar graphs are available for S parameters only.}}
<table>
<tr>
 <td> [[File:b2MAN_Fig56.png|thumb|200pxleft|250px|Network Analysis Settings: First Page.]]
</td>
<td> [[File:b2MAN_Fig57.png|thumb|200pxleft|250px|Network Analysis Settings: Second Page.]]
</td>
<td> [[File:b2MAN_Fig58.png|thumb|200pxleft|250px|Network Analysis Settings: Third Page.]]
</td>
 
</tr>
</table>
[[File:b2MAN_Fig237.png|thumb|300px|The RLC circuit of Tutorial Lesson 2.]]
As an example, consider the simple RLC circuit of Tutorial Lesson 2, which is shown here in the opposite figure. First, we treat this circuit as a one-port network, with its port established at the voltage source. The characteristic or reference impedance Z0 is set to its default value of 50 Ohms. The frequency sweep is set from 1MHz to 1GHz on a decade scale with 50 points per interval. The figures below show the Z/Y/S parameters of this one-port network plotted on both Cartesian graphs and Smith chart. <table><tr><td>[[File:b2MAN_Fig233.png|thumb|640px|Cartesian plot of the real and imaginary parts of the Z11 parameter.]]</td></tr><tr><td>[[File:b2MAN_Fig234.png|thumb|640px|Cartesian plot of the real and imaginary parts of the Y11 parameter.]]</td></tr><tr><td>[[File:b2MAN_Fig235.png|thumb|640px|Cartesian plot of the magnitude and phase of the S11 parameter.]]</td></tr><tr><td>[[File:b2MAN_Fig236.png|thumb|640px{{Note |The S11 parameter plotted on a Smith chart.]]</td></tr></table> Next, we consider the same RLC circuit as a two-port network. The first port is left intact at the voltage source (between Node 1 charts and the ground), while Port 2 is set up across the 50-Ohm resistor between Node 2 and the ground. The figures below show the Cartesian plot of the magnitude of the S11, S12, S21 an S22 parameters as well as the Smith chart for the two-port network.  <table><tr><td>[[File:b2MAN_Fig238.png|thumb|640px|Cartesian plots of the magnitude of the S11, S12, S21 and S22 parameters.]]</td><tr><td>[[File:b2MAN_Fig239.png|thumb|640px|The S11, S12, S21 and S22 parameters plotted on a Smith chart.]]</td></tr></table> RF circuits polar graphs are typically characterized as multiport networks (usually one-port or two-port). In many practical cases, rather than computing the input or output voltages or currents, you might be more interested in the port characteristics of your RF circuit. For one-port circuits, you would designate an input port (Port 1) and would like to calculate its return loss or input impedance. For two-port circuits, you would specify an input port (Port 1) and an output port (Port 2) and would be interested in finding its insertion loss or gain. The most commonly used set of parameters available for RF circuit characterization are the scattering (S) parameters. The "Network Analysis Test" is one of the AC-type tests of [[RF.Spice A/D]], which is of particular importance to [[RF.Spice A/D]]. Network analysis computes four sets of parameters: S, Z, Y and H. Of these, S-parameters and the "Smith Chart" are of primary interest, although Z-parameters are also frequently sought. To run a network analysis of your RF circuit, open the Test Panel of the Toolbox. Check the checkbox labelled "Network Analysis" and then open the corresponding Settings Dialog. The top part of this dialog has three separate tabs: Connections, Sweep and Output, as shown below. In the Connections tab, you set the input port of the circuit as well as the output port, if it is a two-port network. The ports are defined by specifying their positive and negative pins. You also have to specify the port reference impedance (Z0). The default value of Z0 is 50 Ohms. The Sweep tab of the dialog is identical to the sweep section of AC Sweep Test Settings dialog. Here you set the start and stop frequencies and the step size. In the Output tab, you specify which port characteristics to compute at the end of the network analysis. You can choose only one of the four parameter sets: S, Z, Y or H. All [[parameters]] can be plotted on cartesian graphs with three data formats: Amp Only, Amp/Phase or Real/Imag. The magnitude data can be plotted on either linear or dB scales. S-parameters are the only option that can generate either a Smith chart or a polar graph.  <table><tr><td> [[File:Net1.png|thumb|200px|Network Analysis Settings: Connections Tab.]]</td><td> [[File:Net2.png|thumb|200px|Network Analysis Settings: Sweep Tab.]]</td><td> [[File:Net3.png|thumb|200px|Network Analysis Settings: Output Tab.]]</td></tr></table> [[File:RFAC3.png|thumb|600px| An RF circuit consisting of a two-port network and connecting transmission line segments.]]}}
As an example, consider the RF circuit shown in the opposite figure, which was earlier examined in the discussion for nodal analysis, consisting of AC frequency sweep testa two-port network and connecting transmission line segments. This circuit can be treated as a one-port network with its input port defined between nodes 2 and 0, i.e. between the source's internal resistor and the input T-line segment. As a one-port, the circuit has a single s11 and a single z11 parameter. The first figure below shows the Smith chart for the return loss (s11) over the frequency range 1-10 GHz at larger steps of 100MHz. The second figure below shows Cartesian plots of the real and imaginary parts of z11 over the same frequency range both with finer steps of 10MHz.
<table>
<tr>
<td> [[File:Net4.png|thumb|640pxleft|720px|Smith Chart.]]
</td>
</tr>
<tr>
<td> [[File:Net5.png|thumb|640pxleft|720px|Cartesian graph of Z-parameters.]]
</td>
</tr>
28,333
edits