This section describes how to use other AC analysis statements.
The .DISTO statement causes Star-Hspice to compute the distortion characteristics of the circuit in an AC small-signal, sinusoidal, steady-state analysis.The program computes and reports five distortion measures at the specified load resistor. The analysis is performed assuming that one or two signal frequencies are imposed at the input. The first frequency, F1 (used to calculate harmonic distortion), is the nominal analysis frequency set by the .AC statement frequency sweep. The optional second input frequency, F2 (used to calculate intermodulation distortion), is set implicitly by specifying the parameter skw2, which is the ratio F2/F1.
The .DISTO summary report includes a set of distortion measures for each contributing component of every element, a summary set for each element, and a set of distortion measures representing a sum over all the elements in the circuit.
.DISTO Rload <inter <skw2 <refpwr <spwf>>>>
|
The resistor element name of the output load resistor into which the output power is fed |
|
|
Interval at which a distortion-measure summary is to be printed. Specifies a number of frequency points in the AC sweep (see the np parameter in Using the .AC Statement). If inter is omitted or set to zero, no summary printout is made. In this case, the distortion measures can be printed or plotted with the .PRINT or .PLOT statement. If inter is set to 1 or higher, a summary printout is made for the first frequency, and once for each inter frequency increment thereafter. To obtain a summary printout for only the first and last frequencies, set inter equal to the total number of increments needed to reach fstop in the .AC statement. For a summary printout of only the first frequency, set inter to greater than the total number of increments required to reach fstop. |
|
|
Ratio of the second frequency F2 to the nominal analysis frequency F1. The acceptable range is 1e-3 < skw2 <= 0.999. If skw2 is omitted, a value of 0.9 is assumed. |
|
|
Reference power level used in computing the distortion products. If omitted, a value of 1mW, measured in decibels magnitude (dbM), is assumed. The value must be >= 1e-10. |
|
|
Amplitude of the second frequency F2. The value must be >= 1e-3. Default = 1.0. |
Only one distortion analysis is performed per simulation. If more than one .DISTO statement is found, only the last is performed.
The .NOISE statement, used in conjunction with the AC statement, controls the noise analysis of the circuit.
The noise calculations in Star-Hspice are based on the complex AC nodal voltages, which in turn are based on the DC operating point. Noise models are described for each device type in the appropriate chapter in Volume II. A noise source is not assumed to be statistically correlated to the other noise sources in the circuit; each noise source is calculated independently. The total output noise voltage is the RMS sum of the individual noise contributions:
The equivalent input noise voltage is the total output noise divided by the gain or transfer function of the circuit. The contribution of each noise generator in the circuit is printed for each inter frequency point. The output and input noise levels are normalized with respect to the square root of the noise bandwidth, and have the units volts/Hz1/2 or amps/Hz1/2.
You can simulate flicker noise sources in the noise analysis by including values for the parameters KF and AF on the appropriate device model statements.
Use the .PRINT or .PLOT statement to print or plot the output noise and the equivalent input noise.
You can only perform one noise analysis per simulation. If more than one NOISE statement is present, only the last one is performed.
For data acquisition of analog signals, data sampling noise often needs to be analyzed. This is accomplished with the .SAMPLE statement used in conjunction with the .NOISE and .AC statements.
The SAMPLE analysis causes Star-Hspice to perform a simple noise folding analysis at the output node.
.SAMPLE FS = freq <TOL = val> <NUMF = val> <MAXFLD = val>
+ <BETA = val>
The .NET statement computes the parameters for the impedance matrix Z, the admittance matrix Y, the hybrid matrix H, and the scattering matrix S. The input impedance, output impedance, and admittance are also computed. This analysis is a part of the AC small-signal analysis. Therefore, network analysis requires the specification of the AC statement frequency sweep.
.NET output input <ROUT = val> <RIN = val>
.NET VINAC RIN = 50
.NET IIN RIN = 50
.NET V(10,30) VINAC ROUT = 75 RIN = 50
.NET I(RX) VINAC ROUT = 75 RIN = 50
Xij(z), ZIN(z), ZOUT(z), YIN(z), YOUT(z)
If "z" is omitted, output includes the magnitude of the output variable.
.PRINT AC Z11(R) Z12(R) Y21(I) Y22 S11 S11(DB) Z11(T)
.PRINT AC ZIN(R) ZIN(I) YOUT(M) YOUT(P) H11(M) H11(T)
.PLOT AC S22(M) S22(P) S21(R) H21(P) H12(R) S22(T)
*FILE: FBP_1.SP
.OPTIONS DCSTEP = 1 POST
*BAND PASS FILTER
C1 IN 2 3.166PF
L1 2 3 203NH
C2 3 0 3.76PF
C3 3 4 1.75PF
C4 4 0 9.1PF
L2 4 0 36.81NH
C5 4 5 1.07PF
C6 5 0 3.13PF
L3 5 6 233.17NH
C7 6 7 5.92PF
C8 7 0 4.51PF
C9 7 8 1.568PF
C10 8 0 8.866PF
L4 8 0 35.71NH
C11 8 9 2.06PF
C12 9 0 4.3PF
L5 9 10 200.97NH
C13 10 OUT 2.97PF
RX OUT 0 1E14
VIN IN 0 AC 1
.AC LIN 41 200MEG 300MEG
.NET V(OUT) VIN ROUT = 50 RIN = 50
.PLOT AC S11(DB) (-50,10) S11(P) (-180,180)
.PLOT AC ZIN(M) (5,130) ZIN(P) (-90,90)
.END
Star-Hspice uses the results of AC analysis to perform network analysis. The .NET statement defines the Z, Y, H, and S parameters to be calculated.
The following list shows various combinations of the .NET statement for network matrices that are initially calculated in Star-Hspice:
3) .NET Iout Isrc [V1 I2]
4) .NET Vout Vsrc [I1 V2]
( [M ]
The example in Parameters with .NET V(2) Isrc shows the importance of the variables used in the .NET statement. Here, Isrc and Vce are the DC biases applied to the BJT.
This .NET statement provides an incorrect result for the Z parameters calculation:
When Star-Hspice performs AC analysis, all the DC voltage sources are shorted and all the DC current sources are open-circuited. As a result, V(2) is shorted to ground, and its value is zero for AC analysis, directly affecting the results of the network analysis. When Star-Hspice attempts to calculate the Z parameters Z11 and Z21, defined as Z11 = V1/I1 and Z21 = V2/I1 with I2=0, the requirement that I2 must be zero is not satisfied in the circuit above. Instead, V2 is zero, which results in incorrect values for Z11 and Z21.
The correct biasing configurations for performing network analysis for Z, Y, H, and S parameters are shown in Network Parameter Configurations.
As an example, the H parameters are calculated by using the .NET statement.
Here, VC denotes the voltage at node C, the collector of the BJT. With this statement, Star-Hspice calculates the H parameters immediately after AC analysis. The H parameters are calculated by:
For Hybrid parameter calculations of H11 and H21, V2 is set to zero (due to the DC voltage source VCE), while for H12 and H22 calculations, I1 is set to zero (due to the DC current source IB). Setting I1 and V2 equal to zero precisely meets the conditions of the circuit under examination; namely, that the input current source is open circuited and the output voltage source is shorted to ground.
External DC biases applied to a BJT can be driven by a data file of measured results. In some cases, not all of the DC currents and voltages at input and output ports are available. When performing network analysis, examine the circuit and select suitable input and output variables to obtain correctly calculated results. The following examples demonstrate the network analysis of a BJT using Star-Hspice.
BJT network analysis
.option nopage list
+ newtol reli = 1e-5 absi = 1e-10 relv = 1e-5 relvdc = 1e-7
+ nomod post gmindc = 1e-12
.op
.param vbe = 0 ib = 0 ic = 0 vce = 0
$ H-parameter
.NET i(vc) ibb rin = 50 rout = 50
ve e 0 0
ibb 0 b dc = 'ib' ac = 0.1
vc c 0 'vce'
q1 c b e 0 bjt
.model bjt npn subs = 1
+ bf = 1.292755e+02 br = 8.379600e+00
+ is = 8.753000e-18 nf = 9.710631e-01 nr = 9.643484e-01
+ ise = 3.428000e-16 isc = 1.855000e-17 iss = 0.000000e+00
+ ne = 2.000000e+00 nc = 9.460594e-01 ns = 1.000000e+00
+ vaf = 4.942130e+01 var = 4.589800e+00
+ ikf = 5.763400e-03 ikr = 5.000000e-03 irb = 8.002451e-07
+ rc = 1.216835e+02 rb = 1.786930e+04 rbm = 8.123460e+01 + re = 2.136400e+00
+ cje = 9.894950e-14 mje = 4.567345e-01 vje = 1.090217e+00
+ cjc = 5.248670e-14 mjc = 1.318637e-01 vjc = 5.184017e-01 + xcjc = 6.720303e-01
+ cjs = 9.671580e-14 mjs = 2.395731e-01 vjs = 5.000000e-01
+ tf = 3.319200e-11 itf = 1.457110e-02 xtf = 2.778660e+01
+ vtf = 1.157900e+00 ptf = 6.000000e-05
+ xti = 4.460500e+00 xtb = 1.456600e+00 eg = 1.153300e+00
+ tikf1 = -5.397800e-03 tirb1 = -1.071400e-03
+ tre1 = -1.121900e-02 trb1 = 3.039900e-03
+ trc1 = -4.020700e-03 trm1 = 0.000000e+00
.print ac par('ib') par('ic')
+ h11(m) h12(m) h21(m) h22(m)
+ z11(m) z12(m) z21(m) z22(m)
+ s11(m) s21(m) s12(m) s22(m)
+ y11(m) y21(m) y12(m) y22(m)
.ac Dec 10 1e6 5g sweep data = bias
.data bias
vbe vce ib ic
771.5648m 292.5047m 1.2330u 126.9400u
797.2571m 323.9037m 2.6525u 265.0100u
821.3907m 848.7848m 5.0275u 486.9900u
843.5569m 1.6596 8.4783u 789.9700u
864.2217m 2.4031 13.0750u 1.1616m
884.3707m 2.0850 19.0950u 1.5675m
.enddata
.end
Other possible biasing configurations for the network analysis follow.
.NET v(c) vbb rin = 50 rout = 50
ve e 0 0
vbb b 0 dc = 'vbe' ac = 0.1
icc 0 c 'ic'
q1 c b e 0 bjt
.NET v(c) ibb rin = 50 rout = 50
ve e 0 0
ibb 0 b dc = 'ib' ac = 0.1
icc 0 c 'ic'
q1 c b e 0 bjt
.NET i(vc) vbb rin = 50 rout = 50
ve e 0 0
vbb b 0 'vbe' ac = 0.1
vc c 0 'vce'
q1 c b e 0 bjt
Goyal, Ravender. "S-Parameter Output From SPICE Program", MSN & CT, February 1988, pp. 63 and 66.
Star-Hspice Manual - Release 2001.2 - June 2001