Other topics about Data Analysis
Equation Editor allows you to enter an algebraic equation of standard mathematical operators and functions, referencing data that is available in the E5071C. Once a valid equation is entered and enabled, the display of the active trace is replaced with the results of the equation, and updated in real-time as new data is acquired. For equations that can be expressed with Equation Editor's supported functions, operators, and data, there is no need for off-line processing in a separate program.
For example, on entering the equation “Example=S21/(1-S11)” in the E5071C Equation Editor (4 in the Figure below), the resulting trace is computed as each S21 data point divided by one minus the corresponding S11 data point. For a 201 point sweep setup, the computation is repeated 201 times, once for each point.
As another example, if you want the ENA to make a directivity measurement of your 3-port DUT, then the desired result is the sum and difference of LogMag formatted traces, which can be expressed as: S12 + S23 - S13.
Because Equation Editor operates on unformatted complex data, the required equation is:
DIR = S12 * S23 / S13
DIR becomes a display label to help you identify the computed data trace. On the equation trace, set the format to LogMag.
The step-by-step procedure of using Equation Editor is described below:
Select a trace in which you want to enter the equation and activate the trace.
Activating a trace is required as Equation Editor works on traces.
Follow the steps below to enter an equation:
Press Display.
Click Equation Editor (1 in the figure above). The Equation Editor dialog box appears.
Enter an equation in the equation field (4 in the figure above).
Referring to traces in a different channel is NOT available with Equation Editor on the ENA.
The equation can be entered with the native On Screen Keyboard enabled by selecting Keyboard... (3 and 3a in the figure above).
Follow the steps below to apply the defined equation. When a valid equation is entered, the Equation Enabled check box becomes available for checking.
Check Equation Enabled check box (2a in the figure above).
Click Apply. The equation becomes visible and annotation of [Equ] (2b in the figure above) is displayed in the trace title area.
Click Close to hide the dialog box.
The equation can also be applied by selecting Display > Equation ON.
If error correction is not turned on, then the raw, uncorrected data is used in the equation trace.
If an equation is NOT valid (i.e. referring to a trace that is not measured in the measured channel), annotation of [Equ!] is displayed in the trace title area instead.
The following examples may help you in getting started with Equation Editor:
The equation is entered into trace 2 as "Offset= data(1)*pow(10,X/20)" (4 in the figure e5071c282).
The equation is entered as "Example_Trace= pow(data,X)" (4 in the figure e5071c282).
The equation is entered as "Sdd11= (S11-S21-S12+S22)/2)" (4 in the figure e5071c282).
For detailed on mixed-mode S-parameters on the 2-port ENA, refer to the related FAQ on the Keysight website.
The equation is entered as "CMRR = data(2) / data (1)" (4 in the figure e5071c282)
where:
data (1) - a trace that measures Scc21 with Fixture Simulator
data (2) - a trace that measures Sdd21 with Fixture Simulator
Equation Editor has the capability to save and recall all previously defined equations, which can be accessed by clicking the ... button (shown as 5 in the figure e5071c282). All equations can be viewed in the Equation History dialog box.
To view the equations in the list, follow this procedure:
Open Equation Editor by Display > Equation Editor
Enter an equation and click Apply in the Equation Editor dialog box (Figure e5071c282) to save the defined equation in the directory of the ENA. To view a list of saved equations, click the ... button (5 in Figure e5071c282) to open the Equation History dialog box.
To store an equation in the History List, the equation must be applied first. This can be done by clicking on the Apply button.
To edit the equations in the list, click Edit History. The text file of history list is opened with Notepad.
The History List is stored as a text file D:\Agilent\Equation\history.txt and can save a maximum of 50 lines (equations) with a maximum of 254 character per line (equation).
The following table describes the different functions and constant available in the E5071C Equation Editor. In the following table:
Function(scalar x) means that the function requires a scalar value. If a complex value is entered, it is automatically converted to a scalar value; complex(x,y) -> scalar(x)
Function(complex x) means that the function requires a complex value. If a scalar value is entered, it is automatically converted to a complex value; scalar(x) -> complex(x, 0)
a,b are arguments that are used in the function.
Basic Math Functions
Function |
Description |
abs(complex a) |
returns the sqrt(a.re*a.re+a.im*a.im) |
acos(scalar a) |
returns the arc cosine of a in radians |
asin(scalar a) |
returns the arc sine of a in radians |
atan(scalar a) |
returns the arc tangent of a in radians |
atan2(complex a) |
returns the phase of a = (re, im) in radians |
atan2(scalar a, scalar b) |
returns the phase of (a, b) in radians |
conj(complex a) |
returns the conjugate of a |
cos(complex a) |
takes a in radians and returns the cosine |
cpx(scalar a, scalar b) |
returns a complex value (a+ib) from two scalar values |
exp(complex a) |
returns the exponential of a |
im(complex a) |
returns the imaginary part of a as the scalar part of the result (zeroes the imaginary part) |
ln(complex a) |
returns the natural logarithm of a |
log10(complex a) |
returns the base 10 logarithm of a |
mag(complex a) |
returns sqrt(a.re*a.re+a.im*a.im) |
phase(complex a) |
returns atan2(a) in degrees |
pow(complex a,complex b) |
returns a to the power b |
re(complex a) |
returns the scalar part of a (zeroes the imaginary part) |
sin(complex a) |
takes a in radians and returns the sine |
sqrt(complex a) |
returns the square root of a, with phase angle in the half-open interval (-pi/2, pi/2] |
tan(complex a) |
takes a in radians and returns the tangent |
Constants |
|
e |
2.71828182845904523536 |
PI |
3.14159265358979323846 |
Mutual transformation is automatically made for scalar and complex.
scalar(x) -> complex(x, 0)
complex(x, y) -> scalar(x)
Advanced Math Functions
In the following table: a,b,c,d are arguments of complex value that are used in the function. For 2-port network measurement: a,b,c,d corresponds to Sii,Sji, Sij, Sjj respectively.
The functions can also be defined by scalar arguments with port numbers of the ENA. For example, the function, kfac(1,2) returns the K-factor of 2-port measurement between port 1 and port 2 of the ENA.
When a scalar argument of the port number in the function is out of range (i.e. mu1(1,3) for the 2-port ENA), the ENA indicates an error message, “Equation runtime error” and equation is not reflected on the trace.
Z0 means the system characteristic impedance (Z0) which can be accessed under Cal.
Although the port impedance for each port can be changed with the port impedance conversion function by Fixture Simulator, the change is not reflected on the computed trace by Equation Editor.
Function |
Description |
A(complex a, complex b, complex c, complex d) |
F11 conversion = ((1+a)*(1-d) + b*c)/(2*b) |
A(scalar i, scalar j) |
returns A(Sii, Sji, Sij, Sjj) |
B(complex a, complex b, complex c, complex d) |
F12 conversion = Z0*((1+a)*(1+d) - b*c)/(2*b) |
B(scalar i, scalar j) |
returns B(Sii, Sji, Sij, Sjj) |
C(complex a, complex b, complex c, complex d) |
F21 conversion = (1/Z0)*((1-a)*(1-d) - b*c)/(2*b) |
C(scalar i, scalar j) |
returns C(Sii, Sji, Sij, Sjj) |
D(complex a, complex b, complex c, complex d) |
F22 conversion = ((1-a)*(1+d) + b*c)/(2*b) |
D(scalar i, scalar j) |
returns D(Sii, Sji, Sij, Sjj) |
H11(complex a, complex b, complex c, complex d) |
H11 conversion = Z0*((1+a)*(1+d) - b*c)/((1-a)*(1+d) + b*c) |
H11(scalar i, scalar j) |
returns H11(Sii, Sji, Sij, Sjj) |
H12(complex a, complex b, complex c, complex d) |
H12 conversion = 2*c/((1-a)*(1+d) + b*c) |
H12(scalar i, scalar j) |
returns H12(Sii, Sji, Sij, Sjj) |
H21(complex a, complex b, complex c, complex d) |
H21 conversion = -2*b/((1-a)*(1+d) + b*c) |
H21(scalar i, scalar j) |
returns H21(Sii, Sji, Sij, Sjj) |
H22(complex a, complex b, complex c, complex d) |
H22 conversion = (1/Z0)*((1-a)*(1-d) - b*c)/((1-a)*(1+d) + b*c) |
H22(scalar i, scalar j) |
returns H22(Sii, Sji, Sij, Sjj) |
kfac(complex a, complex b, complex c, complex d) |
k-factor = (1 - abs(a)^2 - abs(d)^2 + (abs(a*d - b*c)^2)/(2*abs(b*c)) |
kfac(scalar i, scalar j) |
returns kfac(Sii, Sji, Sij, Sjj) |
MAPG(complex a, complex b, complex c, complex d) |
maximum available power gain = abs(b/c)*(kfac(a,b,c,d) - sqrt(kfac(a,b,c,d)^2 - 1)) |
MAPG(scalar i, scalar j) |
returns MAPG(Sii, Sji, Sij, Sjj) |
MSG(complex a, complex b, complex c, complex d) |
maximum stable power gain = abs(b)/abs(c) |
MSG(scalar i, scalar j) |
returns MSG(Sii, Sji, Sij, Sjj) |
mu1(complex a, complex b, complex c, complex d) |
µ-factor = (1 - abs(a)^2) / (abs(d - conj(a) * (a*d-b*c)) + abs(b*c)) |
mu1(scalar i, scalar j) |
returns mu1(Sii, Sji, Sij, Sjj) |
mu2(complex a, complex b, complex c, complex d) |
µ-factor = (1 - abs(d)^2) / (abs(a - conj(d) * (a*d-b*c)) + abs(b*c)) |
mu2(scalar i, scalar j) |
returns mu2(Sii, Sji, Sij, Sjj) |
T11(complex a, complex b, complex c, complex d) |
T11 conversion = -(a*d - b*c)/b |
T11(scalar i, scalar j) |
returns T11(Sii, Sji, Sij, Sjj) |
T12(complex a, complex b, complex c, complex d) |
T12 conversion = a/b |
T12(scalar i, scalar j) |
returns T12(Sii, Sji, Sij, Sjj) |
T21(complex a, complex b, complex c, complex d) |
T21 conversion = -d/b |
T21(scalar i, scalar j) |
returns T21(Sii, Sji, Sij, Sjj) |
T22(complex a, complex b, complex c, complex d) |
T22 conversion = 1/b |
T22(scalar i, scalar j) |
returns T22(Sii, Sji, Sij, Sjj) |
Y11(complex a, complex b, complex c, complex d) |
Y11 conversion = (1/Z0)*((1-a)*(1+d) + b*c)/((1+a)*(1+d) - b*c) |
Y11(scalar i, scalar j) |
returns Y11(Sii, Sji, Sij, Sjj) |
Y12(complex a, complex b, complex c, complex d) |
Y12 conversion = (1/Z0)*(-2*c)/((1+a)*(1+d) - b*c) |
Y12(scalar i, scalar j) |
returns Y12(Sii, Sji, Sij, Sjj) |
Y21(complex a, complex b, complex c, complex d) |
Y21 conversion = (1/Z0)*(-2*b)/((1+a)*(1+d) - b*c) |
Y21(scalar i, scalar j) |
returns Y21(Sii, Sji, Sij, Sjj) |
Y22(complex a, complex b, complex c, complex d) |
Y22 conversion = (1/Z0)*((1+a)*(1-d) + b*c)/((1+a)*(1+d) - b*c) |
Y22(scalar i, scalar j) |
returns Y22(Sii, Sji, Sij, Sjj) |
Z11(complex a, complex b, complex c, complex d) |
Z11 conversion = Z0*((1+a)*(1-d) + b*c)/((1-a)*(1-d) - b*c) |
Z11(scalar i, scalar j) |
returns Z11(Sii, Sji, Sij, Sjj) |
Z12(complex a, complex b, complex c, complex d) |
Z12 conversion = Z0*(2*c)/((1-a)*(1-d) - b*c) |
Z12(scalar i, scalar j) |
returns Z12(Sii, Sji, Sij, Sjj) |
Z21(complex a, complex b, complex c, complex d) |
Z21 conversion = Z0*(2*b)/((1-a)*(1-d) - b*c) |
Z21(scalar i, scalar j) |
returns Z21(Sii, Sji, Sij, Sjj) |
Z22(complex a, complex b, complex c, complex d) |
Z22 conversion = Z0*((1-a)*(1+d) + b*c)/((1-a)*(1-d) - b*c) |
Z22(scalar i, scalar j) |
returns Z22(Sii, Sji, Sij, Sjj) |
For both mu1 and mu2, conj is the complex conjugate. For scalars a and b, conj(a+ib)=(a-ib).
Channel Parameter Data |
|
data |
corrected data |
corrected data of trace i (trace number) |
|
mem |
memory data |
mem(scalar i) |
memory data of trace i (trace number) |
xAxis |
x-axis data |
xAxis(scalar i) |
x-axis data of trace i (trace number) |
S11 - S44 |
S-parameter data |
When a trace number is out of range, the ENA indicates an error message, “Equation runtime error” and equation is not reflected on the trace. The maximum number of traces can be set by System > Misc Setup > Channel/Trace Setup.
The following section provides definition of the two port parameters in Equation Editor of the ENA.
Hybrid parameters (H)
Admittance parameters (Y)
Impedance parameters (Z)
Fundamental parameters (F)
Scattering transfer parameters (T)
S-parameters of 2-port network can be converted to Hybrid parameters (H), Admittance parameters (Y), Impedance parameters (Z), Fundamental parameters (F) and Scattering transfer parameters (T) using the following functions:
Converting S-parameters to H-parameters
Converting S-parameters to Y-parameters
Converting S-parameters to Z-parameters
Converting S-parameters to F-parameters
Converting S-parameters to T-parameters
Where:
Ds=S11S22 - S12S21
Operator |
Description |
---|---|
+ |
Addition |
- |
Subtraction |
* |
Multiplication |
/ |
Division |
^ |
Power |
( |
Open parenthesis |
) |
Close parenthesis |
, |
Comma - separator for arguments |
= |
Equal (optional) |
E |
Exponent (as in 23.45E6) |
Priority of operators is:
1. ^
2. *,/
3. +,-