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 E5052B. 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.
Equation Editor can be accessed through Trace/View > Equation Editor (1 in the Figure below).
Equation Editor can be used to enter an algebraic equation with measurement functions available in the trace. For example, "Eq1 = data + 52.555", can be applied to the measurement where the "Eq1' will be displayed on the measurement as a label. In case you do not wish to apply a label to be displayed, enter the equation directly, for example as "= data + 52.555".
The length of the equation should be within 254 characters, and the length of equation label should be within 20 characters. If the label is more than 20 characters, then the equation label is truncated to 20 characters.
If the equation label contains an invalid character, then an error (Error No: 170, Invalid equation label) is generated.
If the equation is more than 254 characters, or if the equation formula is invalid (For example, if the case arc is not pair), then an error (Error No: 171,Invalid equation expression) is generated.
The available data is the data that is able to be measured by an active source port in the same channel. The equation can be entered by the on-screen key board (3 and 4).
User Equation created in Equation Editor can be applied to a measurement by selecting Trace/View > Data Math > User Equation.
The Equation Editor has the capability to store and use all previously used equations, and can be accessed by clicking the ... button shown as 5 in the figure above. The ... button in E5052B Equation Editor provides an option to view either the List or the History of Equation entered in the Equation Editor.
The key difference between History and List is that History contains all the equations that are used in the Equation Editor and List stores specific equations that are manually added using the Edit button in the Equation History dialog box. The commands visible in History are lost when the firmware is restarted but commands manually saved in List are stored permanently in a text file located at F:\Equ_list.txt.
To save the equations in List, follow this procedure:
Open Equation Editor by Trace/View > Equation Editor
Enter the equation you wish to store permanently, say "5kHz_filtered=data-20*log10(sqrt(1+pow(5E3,2)/pow(x,2)))”, click Apply, and click ... button (5 in the figure above). This open the Equation History dialog box.
To store an equation, the equation must be applied first. This can be done by clicking on the Apply button.
Click Edit. The Equation History Edit dialog box appears.
Select the equation/s you wish to store permanently in History tab and click Add to add them in the List tab.
Click OK to save the equations. The equations are stored in a text file located at F:\Equ_list.txt.
The List/History button in Equation History dialog box (as shown in Step 2) opens the saved List of equations. If History contains 3 equations and you have saved only 1 equation in the List, then pressing this button will display only 1 equation in the List.
The History can save a maximum of 10 equations and List can save a maximum of 15 equations.
The following table describes the different functions and constant available in the E5052B Equation Editor:
Functions |
|
abs(a) |
returns the absolute value of a |
acos(a) |
returns the arc cosine of a in radians |
asin(a) |
returns the arc sine of a in radians |
atan(a) |
returns the arc tangent of a in radians |
atan2(a, b) |
returns the phase of (a, b) in radians |
cos(a) |
gets a in radians and returns the cosine |
exp(a) |
returns the exponential of a |
ln(a) |
returns the natural logarithm of a |
log10(a) |
returns the base 10 logarithm of a |
pow(a,b) |
returns a to the power b |
sin (a) |
takes a in radians and returns the sine |
sqrt(a) |
returns the square root of a |
tan(a) |
takes a in radians and returns the tangent |
max(a, b) |
returns the maximum value a or b |
min (a, b) |
returns the minimum value a or b |
Constants |
|
e |
2.718281828459045 |
PI |
3.141592653589793 |
a and b are of double data type.
The following table describes the various operators that can be used in the E5052B Equation Editor:
Operators |
|
+ |
Addition |
- |
Subtraction |
* |
Multiplication |
/ |
Division |
( |
Open parenthesis |
) |
Close parenthesis |
, |
Comma - separator for arguments |
= |
Equal (optional) |
E |
Exponent (as in 23.45E6) |