Equation Editor

Other topics about Data Analysis

Overview

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.

Using Equation Editor

The step-by-step procedure of using Equation Editor is described below:

  1. Select a trace in which you want to enter the equation and activate the trace.

  2. Activating a trace is required as Equation Editor works on traces.

  1. Follow the steps below to enter an equation:

    1. Press Display.

    2. Click Equation Editor (1 in the figure above). The Equation Editor dialog box appears.

    3. Enter an equation in the equation field (4 in the figure above).

  1. Follow the steps below to apply the defined equation. When a valid equation is entered, the Equation Enabled check box becomes available for checking.

    1. Check Equation Enabled check box (2a in the figure above).

    2. Click Apply. The equation becomes visible and annotation of [Equ] (2b in the figure above) is displayed in the trace title area.

    3. Click Close to hide the dialog box.

  2. The equation can also be applied by selecting Display > Equation ON.

  1. 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.

Equation Editor Examples

The following examples may help you in getting started with Equation Editor:

 

Offset each data point in trace 2 from trace 1 by XdB

The equation is entered into trace 2 as "Offset= data(1)*pow(10,X/20)" (4 in the figure e5071c282).

 

To multiply a trace by X-times in log format

The equation is entered as "Example_Trace= pow(data,X)" (4 in the figure e5071c282).

 

Differential Return Loss using a 2-port ENA

The equation is entered as "Sdd11= (S11-S21-S12+S22)/2)" (4 in the figure e5071c282).

 

CMRR of a Balanced Component

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 History

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:

  1. Open Equation Editor by Display > Equation Editor

  2. 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.


     

  3. To store an equation in the History List, the equation must be applied first. This can be done by clicking on the Apply button.

  1. To edit the equations in the list, click Edit History. The text file of history list is opened with Notepad.


     

  2. 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).

Functions and Constants

The following table describes the different functions and constant available in the E5071C Equation Editor. In the following table:

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


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.

 Z0 means the system characteristic impedance (Z0) which can be accessed under Cal.

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)

Channel Parameter Data

data

corrected data

data(scalar i)

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

Converting S-Parameters to H, Y, Z, F & T-Parameters

The following section provides definition of the two port parameters in Equation Editor of the ENA.

  1. Hybrid parameters (H)


     

  2. Admittance parameters (Y)


     

  3. Impedance parameters (Z)


     

Fundamental parameters (F)


 

  1.  







     

  1. 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:

  1. Converting S-parameters to H-parameters


     

  2. Converting S-parameters to Y-parameters


     

  3. Converting S-parameters to Z-parameters


     

  4. Converting S-parameters to F-parameters


     

  5. Converting S-parameters to T-parameters



    Where:


    D
    s=S11S22 - S12S21
     

Operators used in Equation Editor

Operator

Description

+

Addition

-

Subtraction

*

Multiplication

/

Division

^

Power

(

Open parenthesis

)

Close parenthesis

,

Comma - separator for arguments

=

Equal (optional)

E

Exponent (as in 23.45E6)