WOTLABPERFORMANCE DATA
LOG VIEWER GUIDE Back to the app
WOT LAB · USER GUIDE

Formulas and rules
you can trust.

A practical guide to building calculated signals and analyzing automotive CSV logs.

01

Quick start

Calculated channels and analysis rules use the same expression language.

Calculated channel
  1. Open a CSV log.
  2. Select Formula or press Ctrl/⌘+F.
  3. Enter a name, unit, and expression.
  4. Select Create channel.
Analysis rule
  1. Open Settings → Diagnostics.
  2. Select Configure diagnostic rules.
  3. Select New rule.
  4. Configure the conditions and run the analysis again.
What they shareBoth support arithmetic, parameters, scalar functions, and window functions. Only channel notation differs: a calculated channel uses the name from the log, while a rule uses a standard WOT Lab name.
02

Shared expression language

These features are available in both calculated channels and rule conditions.

Channel[Engine Speed (rpm)]A channel name inside square brackets
ParameterMIN_RPMLetters, digits, and _, not starting with a digit
Number0.5 · .5 · 1e-3Decimal or exponential notation
Arithmetic+ − * / % ^Standard precedence; parentheses change evaluation order
Comparison> >= < <= == !=Returns 1 when true and 0 when false
LogicAND · OR · NOTCombines multiple conditions

Scalar functions

abs(x)absolute value
min(a, b, …)smallest value
max(a, b, …)largest value
avg(a, b, …)argument average
sqrt(x)square root
pow(x, y)x raised to y
clamp(x, min, max)range limit
round(x)round to nearest
floor(x)round down
ceil(x)round up
if(condition, yes, no)conditional choice

Channel names must match those shown by the application. Division by zero and insufficient data produce an undefined value.

03

Calculated channels

A new channel is calculated for every sample in the source log.

How to reference a source channel

Put the exact log channel name, including spaces and units, inside square brackets: [Boost Pressure Actual (bar)]. The easiest method is to click the required channel on the right side of the editor so the reference is inserted automatically.

Formula editor fields

Channel name

A unique name for the new channel. Other calculated channels can reference it.

Unit

The unit displayed on the chart. Units are not converted automatically.

Expression

The expression calculated for every sample.

Reusable parameters

Named numeric values, for example BAR_TO_PSI = 14.5038.

Basic example

Name: Boost Error
Unit: bar
Expression: [Boost Pressure Target (bar)] - [Boost Pressure Actual (bar)]

WOT Lab remembers created channels and attempts to restore them when later logs are opened. If a required source channel is missing or has a different name, the result cannot be calculated. Circular dependencies, where channels directly or indirectly reference each other, are not allowed.

Window functions are supportedA calculated channel expression can use lag, delta, moving_avg, moving_min, moving_max, and moving_sum. See Window functions for details.
How to edit a channelSelect the calculated channel on the chart and use Edit selected, or use the pencil icon next to it in the channel list. Saving also recalculates dependent channels.
04

Log analysis rules

A rule finds continuous areas in which its configured conditions are true.

Formulas also work in rules

Either side of a condition can use parameters, arithmetic, scalar functions, and every window function. For example: moving_avg([boost.target] - [boost.actual], 10) > MAX_ERROR.

How to create a rule

  1. 1
    Open the editor

    Go to Settings → Diagnostics → Configure diagnostic rules, then select New rule.

  2. 2
    Add conditions

    All conditions requires every condition; Any condition requires at least one.

  3. 3
    Set the duration

    Duration removes short areas, while Cooldown merges nearby areas.

  4. 4
    Restrict the full-throttle area

    With WOT area only enabled, only areas inside detected WOT pulls are considered.

  5. 5
    Run the analysis

    After saving, select Re-run diagnostics to apply the changes to the current log.

Main fields

Severity

The importance of a detected event: info, warning, or critical.

WOT area only

Keeps results only inside automatically detected full-throttle areas.

Duration, ms

Minimum time for which the conditions must remain continuously true.

Cooldown, ms

Largest gap across which two areas are merged.

Correlation window, ms

The interval used to associate events that occur close together.

Parameters

Threshold values for conditions. Double-click a name to edit it.

Recommended channels

Channels that are useful to display alongside the detected event.

Message / Possible causes

The result description and possible causes of the issue.

Example rule for a WOT area

Name: Boost under target
WOT area only: enabled

Condition 1:
  [boost.target] - [boost.actual]  >  MAX_ERROR
Condition 2:
  [engine.rpm]  >  MIN_RPM

Parameters:
  MAX_ERROR = 0.25
  MIN_RPM = 2500
Minimum duration = 200 ms
Merge gaps up to 300 ms

To suppress single-sample spikes, replace the first condition with moving_avg([boost.target] - [boost.actual], 10) > MAX_ERROR. If a required channel is unavailable, the rule cannot evaluate that condition.

WOT rules depend on detected pulls.If WOT Lab cannot detect a full-throttle area, rules with WOT area only enabled produce no events.
05

Window functions

A shared function set for calculated channels and analysis rules.

Where they can be used

Every function listed below works both in a calculated channel expression and on either side of a diagnostic rule condition.

N is a sample count, not a time value.At 50 Hz, a 10-sample window is approximately 200 ms. If samples have varying intervals, the actual window duration changes. N must be an integer from 1 through 10,000; a parameter can be used instead of a number.
FunctionResultStart of the log
lag(expr, N)The expression value N samples earlier.The first N values are undefined.
delta(expr, N)The current value minus the value N samples earlier.The first N values are undefined.
moving_avg(expr, N)Average of the latest N samples, including the current sample.Requires a complete window without gaps.
moving_min(expr, N)The smallest value among the latest N samples.Requires a complete window without gaps.
moving_max(expr, N)The largest value among the latest N samples.Requires a complete window without gaps.
moving_sum(expr, N)Sum of the latest N samples.Requires a complete window without gaps.

In a calculated channel

// Smoothed boost error over the latest 10 samples
moving_avg([Boost Target] - [Boost Actual], 10)

// RPM change relative to 5 samples earlier
delta([Engine Speed (rpm)], 5)

In a rule condition

Left side:  moving_avg([boost.target] - [boost.actual], WINDOW)
Operator:   >
Right side: MAX_ERROR

Parameters: WINDOW = 10, MAX_ERROR = 0.25

For lag and delta, the first N rows do not have enough history. A moving_* function starts producing results after its first complete window. A missing value inside the window makes that window's result undefined.

06

Why channel names differ

Rules use standard names so one rule can work with logs from different manufacturers.

Boost Pressure Actual (bar)channel matching[boost.actual]

A calculated channel references the exact column name in the current file. An analysis rule uses a short, standard WOT Lab name. WOT Lab usually finds the corresponding column automatically.

If the wrong column is selected or your logger's name is not recognized, open Settings → Diagnostics → Map channels or select Map channels in the rule editor and choose the match manually. Both source and calculated channels are available: a formula result can be assigned a standard name and used by diagnostic rules.

Units are not convertedA rule threshold must match the real channel unit. For example, a threshold in bar cannot be applied to a kPa value without adjustment.
07

Ready-to-use examples

Replace the names in square brackets with channel names from your own log.

BOOST

Boost error

[Boost Target] - [Boost Actual]
FUEL

Lambda error

[Lambda Actual] - [Lambda Target]
SMOOTHING

Smoothed signal

moving_avg([Fuel Pressure Actual], 20)
CHANGE

Windowed change

delta([Engine Speed (rpm)], 5)
LIMIT

Range limit

clamp([Throttle Position], 0, 100)
CONDITION

Conditional signal

if([Engine Speed] > MIN_RPM, [Boost Actual], 0)