ETAS MDA V8.6 User Manual page 65

Table of Contents

Advertisement

ETAS
If-Then-Else within another calculation
If the If-Then-Else function is embedded in a more complex calculation,
typically either the True case or the False case should be a neutral value
for the overall calculation. The most simple neutral value is 0 for an addition or
subtraction, while it is 1 for a multiplication or division.
Examples:
MDA V8.6 – User Guide
1. You want to know the total amount of CO
speed range of 40 to 80 km/h. By integrating the CO
gas flow (in g/s), you can calculate the amount.
Condition for speed range: (Speed > 40) AND (Speed
<= 80)
True case: integration of CO
False case: neutral value for integration, i.e. 0
CO2_Amount = Accumulate_Prefix_Integral ( (
(Speed > 40) AND (Speed <= 80) ) ? CO2_Emission
: 0 )
Accumulate_Prefix_Integral is the name of the Integral
function starting with the first sample.
2. You want to calculate the distance driven on a test trip in a speed
range of 40 to 80 km/h only.
The distance can be calculated as Integral of the Speed signal.
Only the sections within the given speed range shall be con-
sidered.
Condition for speed range: (Speed > 40) AND (Speed
<= 80)
True case: current Speed value is used for integral calculation
False case: a neutral value for the integral calculation, i.e. 0
Distance = [Factor *] Accumulate_Prefix_Integ-
ral ( ( (Speed > 40) AND (Speed <= 80) ) ?
Speed : 0 )
Assuming that the unit for the speed is km/h, and the distance
shall be in kilometers, you must apply a conversion factor = 1 /
3600.
3. You want to know for how long the speed was in the range of 40
to 80 km/h
Duration = Accumulate_Prefix_Integral ( (Speed
> 40) AND (Speed <= 80) )
4 Calculated Signals
emissions for the
2
2
emission gas flow
2
emission
65

Advertisement

Table of Contents
loading

Table of Contents