Applying Calculations To Specific Samples - ETAS MDA V8.6 User Manual

Table of Contents

Advertisement

ETAS
Detecting the duration how long (in seconds) an enumeration signal
l
stayed in a specific state, the decimal value of this state is detected and
then integrated:
Accumulate_Prefix_Integral(Raw(Enumeration)= [Value
of state])
4.3.4

Applying Calculations to Specific Samples

There are different methods how a calculation can be limited to specific
samples.
First, the use of the If-Then-Else function is a powerful way to define the
true and the false case behavior.
Second, the If-Then-Else function also allows to exclude specific samples,
so that these are skipped in the calculation.
"If-Then-Else basics" below
l
"If-Then-Else within another calculation" on the next page
l
"If-Then-Else to ignore samples" on page 66
l
"If-Then-Else to ignore samples with Not a Number (NaN) state" on
l
page 68
If-Then-Else basics
The If-Then-Else function requires a condition which results in True and
False.
Then and Else represent the two behaviors namely for the True case (Then)
and the False case (Else).
Result = Condition ? True Case : False Case
The three parts (Condition, True case, False case) in the If-Then-
Else structure are expressions which can use the same input signals or dif-
ferent ones. The True case and False case can be complex formulas,
single input signals, or constants.
Example:
You want to calculate the power of the engine, but only in case the car is driv-
ing uphill.
Uphill condition = Gradient (Altitude) > 0
True case = EngineSpeed * Load
False case = 0
Power_Uphill = Gradient (Altitude) > 0 ? EngineSpeed *
Load [* Factor] : 0
(Depending on the expected unit for Power and the units given for
EngineSpeed and Load, an additional factor for unit conversion must be
included.)
MDA V8.6 – User Guide
4 Calculated Signals
64

Advertisement

Table of Contents
loading

Table of Contents