Ansys Scade One software allows the user to design graphically with the help of operators, used to describe Low-Level Requirements (LLRs). There are four types of operators: predefined, user-defined, imported, and library operators. Predefined operators are located in the catalog after right-clicking, predefines operators include basic mathematical operations, bitwise, relational, boolean, array, structural, group, selection, time, arithmetic, and higher order operators.
User-defined operators are data flow equations comprised of predefined operators and other user-defined operators. Imported operators consist of external C codes that enhance the semantics of the Ansys SCADE software language. Library operators are user operators from another project, ready to be used. The following table presents the predefined operators and library operators utilized in this study.
Symbol | Name | Description |
Fold | A higher-order function to accumulate the result of the N operator applied to the collection of data in the input | |
Scalar to Vector | Created an array of size Ns with each element having the value of the Scalar input | |
Plus | Addition of the scalar inputs | |
Polymorphic Division | Division with real inputs | |
Strictly greater than | If the first input is greater than the second, the output is set to true | |
Pre | Time-delay operator for an output value from 1 cycle in the past. | |
Liblinear: Derivative | Output(k)= (u(k)-u(k-1))/TimeCycle | |
Common: Abs value | Computes the absolute value of real or integer values. | |
Map | A higher-order function that applies the * operator to each of the Ds-1 elements in the input collection by position. | |
Reverse | Permutes values of an array | |
Minus | Subtraction of the scalar inputs | |
Slice | Extracts and arrays from the input array from its 2nd to its N-1 positions. | |
If-then-else | If “true”, the first input is output, and if “false”, the second input is output | |
Liblinear: Gain | Multiplies input by a factor k. | |
Liblinear: Integral | Computes the integral of Input using the trapezoid rule | |
Instance block | Implements a given function a,b => (a+b)/2 |
The Ansys Scade Suite™ model-based development environment for critical embedded software language facilitates operations on a range of data types but also allows the definition of user types. There are three kinds of data types: user-defined, imported, and predefined. Predefined data types include integer, bool, float, and char. User-defined data types are considered in three different formats: equivalent data types, used to enhance model readability (for instance, Speed=float); enumerated data types (for example, color=enu {blue, green, red}); and structural data types, including data structures and arrays [3]. In this study, all variables or constants used have a predefined data type, which is float64.
Imported data types are used to define the data types in imported operators. Constants are utilized to input system-specific constant values along with their corresponding data types. Constant values that will be consistently used within a system are documented in this section, as depicted in the following Table. The use of named constants enhances the readability of the model.
Name | Data Type | Value |
Rd1 | float64 | 1.0 |
Rd2 | float64 | 5.0 |
Rd3 | float64 | 3.0 |
Ki1 | float64 | 20.0 |
Ki2 | float64 | 250.0 |
Ki3 | float64 | 250.0 |
Kp1 | float64 | 120 |
Kp2 | float64 | 120 |
Kp3 | float64 | 50 |
TfDen | float64 ^4 | [1, (-1.705), 1.098, (-0.256)] |
TfNum | float64 ^3 | [0.002968, (-0.001825), 0.000259] |
UpLimInt | float64 | 1000000.0 |