*Power to Win*

KB1035 - Using Onboard math functions

Onboard math channels are user defined functions that are calculated in realtime by the data logger. This feature is extremely powerful and allows complex math channels to be created by using existing live channels in combination with predefined functions, operators and constants. These internally calculated channels can then be used by the logger for other functions such as the dash display, telemetry or the logging table.

The logger onboard math engine uses floating point calculations to produce very accurate results when performing its math functions. The math engine supports all of the standard boolean and arithmetic operators in addition to a variety of trignometric and other custom functions. User defined constants and floating point values can also be used in creating your onboard math channels. Nesting of channels up to 8 levels is also supported by the math engine.

The Onboard math channels must first be defined using the config program. The following steps describe how to create your onboard math functions.

- On the
**Display**menu, click**Onboard Math**. - Click on the
**Create New Channel**menu.Use non-ambiguous names for your math channels. Spaces and wild cards in names can sometimes cause confusion with other similar channels and we recommend using the underscore character instead of spaces between names.

- Enter the
**Name**for the new math function. - Click
**OK**. - Enter the math string for your new function.
If you want to nest a channel within your new function it must have previously been defined. Similarly any constant values that you want to use must also have been defined using the onboard math constant editor. Numeric values can be entered directly into your math string but we recommend using constants for values that may vary between cars.

- Click
**OK**to accept the changes.

The next time you download the logger the new setup will be uploaded and the defined math channels will be available for use. You can also manually send the new setup to the car but use caution as this step will erase any data currently stored in the logger memory.

**Brake_Bias** -This example calculates the ratio of the front brake pressure to the total brake pressure. There is a boolean gate on the front pressure of 50psi to eliminate noise at low pressures.

- Brake_Bias = (F_Brake_Pressure > 50) * ((F_Brake_Pressure / (F_Brake_Pressure + R_Brake_Pressure)) * 100)

**Front_Load_Average** - This example calculates the ratio of the vehicle front load to the total load. By using the **Avg** function at the begining of the string it returns the average value for the entire lap.

- Front_Load_Average = (Avg (((LF_Load + RF_Load) / (LF_Load + RF_Load + LR_Load + RR_Load)) * 100))

**Aero_Load** - This example calculates the aero load at maximum speed. It also demonstrates the use of nesting a channel. The value of 20000 is used as a scaling constant to get the resulting value into the preferred engineering units.

- Speed_Max = (FL_Speed >= FR_Speed) * FL_Speed + (FR_Speed > FL_Speed) * FR_Speed
- Aero_Load = ((F_Aero_Load + R_Aero_Load) * 20000) / (Speed_Max ^ 2)

Onboard channels are stored in memory as floating point numbers and use 4 bytes of memory per channel which if sampled at high rates can quickly consume the loggers maximum bandwidth. Similarly sending these channels over telemetry will use more bandwidth than the analog or digital 16 bit channel data.

Using a large number of trignometric functions in several onboard channels can slow down the math engine limiting the refresh rate of all of the math channels. Math strings with more than 15 operators or functions will generate an overflow error and should be broken down into 2 component channels and nested. Nesting of channels is supported up to 8 levels.

The defined onboard math functions are global for any car that has been defined whereas the onboard constants are unique to each car. Please refer to the Power to Win help file for a complete list of the currently available onboard math operators and functions.

- Boolean functions return a value of zero (0) for false and one (1) for true.
- The trigonometric functions return values expressed in radians.
- Before you can nest a math channel it must be first be created and saved.
- Version 9.0 supports a maximum of 32 onboard math channels.

*Winning Edge Electronics*

(c) 2014 EFI Technology Inc. All Rights Reserved.