Calculated Signals Details; Data Types - ETAS MDA V8.6 User Manual

Table of Contents

Advertisement

ETAS
If-Then-Else to ignore samples with Not a Number (NaN) state
In some cases your recorded signal includes already samples with Not a
Number (NaN) value.
Typically such specific samples prevent a subsequent calculation, and again
you need a method to exclude such samples from your calculation.
Examples:
4.4

Calculated Signals Details

4.4.1

Data Types

The following table gives an overview of the data types supported in calculated
signals:
MDA V8.6 – User Guide
1. To eliminate a NaN sample, you need to detect first a NaN
sample, and then assign the No Value flag instead.
Condition for Not a Number: InputSignal != InputSignal
As NaN prevents calculation for a sample, the condition is true if
the input signal has at that point in time a NaN sample.
You can directly replace the lengthy If-Then-Else function
with the shorter SetNoValueStatus function:
InputSignal_without_NaN = SetNoValueStatus
(InputSignal, InputSignal != InputSignal)
You can use the InputSignal_without_NaN for calculations
with history (like Average, Minimum, Maximum) and still get a
result in which the NaN samples are excluded.
2. Excluding NaN samples from integral calculation
As already mentioned above, the No Value state effects an
integral calculated in an undesired manner.
Therefore, to exclude NaN values from an integral calculation, you
must use the If-Then-Else calculation, so that the NaN
samples get the neutral value for the integral calculation, namely
0.
Integral_excl_NaN = Accumulate_Prefix_Integral
( InputSignal != InputSignal ? 0 : InputSignal)
4 Calculated Signals
68

Advertisement

Table of Contents
loading

Table of Contents