Formulas and rules
you can trust.
A practical guide to building calculated signals and analyzing automotive CSV logs.
Quick start
Calculated channels and analysis rules use the same expression language.
- Open a CSV log.
- Select Formula or press Ctrl/⌘+F.
- Enter a name, unit, and expression.
- Select Create channel.
- Open Settings → Diagnostics.
- Select Configure diagnostic rules.
- Select New rule.
- Configure the conditions and run the analysis again.
Shared expression language
These features are available in both calculated channels and rule conditions.
[Engine Speed (rpm)]A channel name inside square bracketsMIN_RPMLetters, digits, and _, not starting with a digit0.5 · .5 · 1e-3Decimal or exponential notation+ − * / % ^Standard precedence; parentheses change evaluation order> >= < <= == !=Returns 1 when true and 0 when falseAND · OR · NOTCombines multiple conditionsScalar functions
abs(x)absolute valuemin(a, b, …)smallest valuemax(a, b, …)largest valueavg(a, b, …)argument averagesqrt(x)square rootpow(x, y)x raised to yclamp(x, min, max)range limitround(x)round to nearestfloor(x)round downceil(x)round upif(condition, yes, no)conditional choiceChannel names must match those shown by the application. Division by zero and insufficient data produce an undefined value.
Calculated channels
A new channel is calculated for every sample in the source log.
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 nameA unique name for the new channel. Other calculated channels can reference it.
UnitThe unit displayed on the chart. Units are not converted automatically.
ExpressionThe expression calculated for every sample.
Reusable parametersNamed 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.
lag, delta, moving_avg, moving_min, moving_max, and moving_sum. See Window functions for details.Log analysis rules
A rule finds continuous areas in which its configured conditions are true.
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
- 1Open the editor
Go to Settings → Diagnostics → Configure diagnostic rules, then select New rule.
- 2Add conditions
All conditions requires every condition; Any condition requires at least one.
- 3Set the duration
Duration removes short areas, while Cooldown merges nearby areas.
- 4Restrict the full-throttle area
With WOT area only enabled, only areas inside detected WOT pulls are considered.
- 5Run the analysis
After saving, select Re-run diagnostics to apply the changes to the current log.
Main fields
SeverityThe importance of a detected event: info, warning, or critical.
WOT area onlyKeeps results only inside automatically detected full-throttle areas.
Duration, msMinimum time for which the conditions must remain continuously true.
Cooldown, msLargest gap across which two areas are merged.
Correlation window, msThe interval used to associate events that occur close together.
ParametersThreshold values for conditions. Double-click a name to edit it.
Recommended channelsChannels that are useful to display alongside the detected event.
Message / Possible causesThe 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 msTo 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.
Window functions
A shared function set for calculated channels and analysis rules.
Every function listed below works both in a calculated channel expression and on either side of a diagnostic rule condition.
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.25For 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.
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.
Ready-to-use examples
Replace the names in square brackets with channel names from your own log.
Boost error
[Boost Target] - [Boost Actual]Lambda error
[Lambda Actual] - [Lambda Target]Smoothed signal
moving_avg([Fuel Pressure Actual], 20)Windowed change
delta([Engine Speed (rpm)], 5)Range limit
clamp([Throttle Position], 0, 100)Conditional signal
if([Engine Speed] > MIN_RPM, [Boost Actual], 0)