This control block will allow the user to write any mathematical expression that will be evaluated at every time-step/iterations.
Example of expressions to be supported:
sin(2*inputs[0])
max(inputs[0], inputs[1])
sqrt(inputs[0]ˆ2 + inputs[1]ˆ2)
Supported functions are:
Name
Argc.
Explanation
sin
1
sine function
cos
1
cosine function
tan
1
tangens function
asin
1
arcus sine function
acos
1
arcus cosine function
atan
1
arcus tangens function
sinh
1
hyperbolic sine function
cosh
1
hyperbolic cosine
tanh
1
hyperbolic tangens function
asinh
1
hyperbolic arcus sine function
acosh
1
hyperbolic arcus tangens function
atanh
1
hyperbolic arcur tangens function
log2
1
logarithm to the base 2
log10
1
logarithm to the base 10
log
1
logarithm to base e (2.71828...)
ln
1
logarithm to base e (2.71828...)
exp
1
e raised to the power of x
sqrt
1
square root of a value
sign
1
sign function -1 if x<0; 1 if x>0
rint
1
round to nearest integer
abs
1
absolute value
min
var.
min of all arguments
max
var.
max of all arguments
sum
var.
sum of all arguments
avg
var.
mean value of all arguments
Supported operators are:
Operator
Description
Priority
=
assignement *
0
||
logical or
1
&&
logical and
2
|
bitwise or
3
&
bitwise and
4
<=
less or equal
5
>=
greater or equal
5
!=
not equal
5
==
equal
5
>
greater than
5
<
less than
5
+
addition
6
-
subtraction
6
*
multiplication
7
/
division
7
^
raise x to the power of y
8
Development Progress
model [ ]
test [ ]
documentation [ ]
Note
It is important to note that this device does not trigger discontinuity events. It should be used for "continuous" variables and not for detecting events requiring small time steps. For example, it should not be used in place of a comparator controlling a switch.
A now control model with two parameters :
This control block will allow the user to write any mathematical expression that will be evaluated at every time-step/iterations.
Example of expressions to be supported:
sin(2*inputs[0])
max(inputs[0], inputs[1])
sqrt(inputs[0]ˆ2 + inputs[1]ˆ2)
Supported functions are:
Supported operators are:
<=
>=
==
>
<
+
-
*
/
^
Development Progress
Note
It is important to note that this device does not trigger discontinuity events. It should be used for "continuous" variables and not for detecting events requiring small time steps. For example, it should not be used in place of a comparator controlling a switch.