Mat components process one or more StatusNumeric input values and provide a StatusNumeric output value.
Create formulas to modify inputs to other control icons.
When one of the conditions required in the control strategy or the switching logic is not supplied directly from one user address or a combination of more than one user address is needed, you can use a mathematical formula to express this condition.
For example, if inputs are in English units (Fahrenheit), use the MAT editor to convert them to metric units (for example, Celsius).
Input |
The mathematical editor dialog box controls formula inputs. Necessary inputs can be generated as required. |
Mat Output |
|
Formula example |
The following formula calculates the value of Mat Out by multiplying the value of Input_20 by 4 and then dividing the result by the value of Input_15:
Formulas can include numeric, boolean, or enum points. |
1) Right-click on the Control strategy workspace in Enhanced Wire Sheet /or Wire sheet view and click New > NumericWritalbe to create a new control icon. Based on the requirement, select the control icon as Numeric, Boolean, String, or EnumWritalbe.
Result: The dialog box for the icon displays.
2) Enter the required name and click OK.
Result: The control icon displays.
3) To define the Out value, right-click on the control icon and then click Actions > Set.
4) Enter the desired value and click OK.
5) Select the clHVAC module from the Palette window and click OK.
6) In the Palette side bar, expand the Arithmetic folder.
7) Drag and drop the Mat icon from the
Palette sidebar to the control strategy workspace (wiresheet).
Result: The Name dialog box displays.
8) By default, the icon is named as Mat. Enter a new name if required and click OK.
9) Double-click on the Mat icon to integrate a new equations or expression.
Result: A Math Editor dialog displays.
10) Create a new formula as per the requirement and click Save.
11) After defining an equation, complete the connection between control icon and Mat icon in the usual way.
Purpose |
Calculate a differential output signal that varies proportionally to input signal changes. |
Formula |
DIFT= Td/t0*[x(t)-x(t-t0)]
User address x can be a physical point, or software point. |
1. Click DIFT. The differential function dialog box displays.
2. Select a input slot for the x value (function variable) from the drop-down. If not listed in the drop-down, create a new input slot as described below.
In the Math Editor dialog, under Inputs, click Create.
Enter the Input Name and select the Input Type as Numeric, Boolean, or Enum slot.
Click OK.
3. Enter the value for Td in the editing field. Td is a constant that the DIFT function uses to vary the output signal proportionally.
4. Click the desired engineering unit (seconds or minutes).
5. Click OK.
Or, to close the dialog box without saving, click Cancel.
Result: If you click OK, the mathematical editor dialog box displays the formula.
Example:
6. Click Save and close the dialog box.
Or, click Refresh to undo the changes without saving.
7. If in the Control Strategy, connect the MAT icon to the appropriate icon. For details, see the connection of the MAT Icon to a control icon procedure.
P3: Proportional constant (Td)
1) Select the clHVAC module from the Palette window and click OK.
2) In the Palette side bar, expand the Arithmetic folder.
3) Drag and drop the Mat icon from the
Palette sidebar to the control strategy workspace (wiresheet).
Result: The Name dialog box displays.
4) By default, the icon is named as Mat. Enter a new name if required and click OK.
5) Double-click on the Mat icon to integrate a new equations or expression.
Result: The Math Editor dialog box displays.
6) Click Create to enter a new formula name, or select an existing formula from the box below New Variable. Click the down arrow in the box to display a list of available variable names. Click one to select it.
Result: If you enter or select a name that already exists, the formula for that name displays in the box next to the equals, =, sign.
If you click Create to enter a new name, the Create Input dialog box displays. Type a formula name and click OK to continue.
If you type a variable name that already exists in the New Variable Name dialog box, the software displays an error message box that says, “Duplicate math output name. Names must be unique”. Click OK to close the message box and type a different name.
7) Enter (or change) a formula using a combination of the following techniques:
Select an input slot name from the drop-down option.
Click Insert to bring the input slot name on the equation pane.
Click desired function from the calculator pad in the dialog box:
SQRT |
Square root |
e^x |
Exponential function to the base e |
INT |
Integral |
DIFT |
Differential |
LIN |
Linear |
POL |
Polynomial |
“ |
Double quotes (to enclose a user address name) |
( |
Left bracket |
) |
Right bracket |
/ |
Divide |
* |
Multiply |
- |
Subtract |
+ |
Add |
0-9 |
Numbers |
. |
Decimal point |
See the Function Hierarchy note for the rules of order that the MAT operator follows in solving a formula.
The SQRT function calculates the square root of an argument. For example, a formula with a square root can look like this: Mat = SQRT(2*x+5). The argument must be in parentheses or brackets if it includes more than one term. The controller calculates the square root function on the basis of the corresponding Taylor series and therefore requires much computer time.
The e^x function calculates the x power of Euler’s number (e = 2.7171) for an argument, for example: y = e^x(2*xw-5). The argument must be in parentheses or brackets if it includes more than one term. The controller calculates the logarithm function on the basis of the corresponding Taylor series and therefore requires much computer time.
The INT, DIFT, LIN, and POL functions are complex functions that display a dialog box for further information when you select them. See the Dialog Box sections following this section for details on their operation. You can use only one of these functions in a formula.
Result: As you select and type items, they appear in the Math Editor dialog box.
8) Click Save and close the dialog box.
Or, click Refresh to undo the changes without saving.
Result: Software checks the formula for errors and displays message boxes if there are any. If there are no errors, software saves the formula.
If you forget to add quotes to a user address, software displays an error message box saying “Missing double quote”.
If there are illegal characters in the formula or a user address in the formula, software displays “Illegal character in math expression” or “Illegal
character in User Address”.
9) In the Control strategy workspace, the formula is now complete.
Function Hierarchy |
The MAT operator adheres to the typical rules of formula calculation:
|
||||||||||||||||||||||||||||||||||||||
Change Existing Formula |
In the Wire Sheet, Right-click the MAT icon > Views > Mat Editor or just double click it. The Mathematical Editor dialog box displays with the formula. Use the highlight-and-change techniques as explained in the previous procedure to modify formula as desired. |
||||||||||||||||||||||||||||||||||||||
Parameter Number Descriptions |
Parameters exist for the square root, logarithm, integral, differential, polynomial, and linear functions only. The following list gives parameter numbers for the square root and logarithm functions only. See the appropriate section for the other functions (INT, DIFT, POL, and LIN).
All internal parameters are for software use only. |
Purpose |
Calculate an integral. |
Formula |
INT= Lim(to/Ti*SUM[x]) The summation of user address x multiplied by the quotient from cycle time (to) and reset (integral action) time (Ti). The sum of the integrals is limited dependent on the value of Lim (-Lim < x < +Lim). User address x can be a physical point, or software point. |
Click INT. The integral function dialog box displays. Example with values:
Select a input slot for the x value (function variable) from the drop-down. To create a new input slot, refer to step 2 of the Differential Function procedure.
Enter the limit (Lim) and reset time (Ti) values in the editing fields.
Click desired engineering unit (seconds or minutes).
Click OK to close the dialog box and save the formula.
Or, to close the dialog box without saving, click Cancel.
Result: If you clicked OK, the mathematical editor dialog box displays with the formula.
Example:
Click Save and close the dialog box.
Or, click Refresh to undo the changes without saving.
If in the Control Strategy, connect the MAT icon to the appropriate icon. See the Connection of the MAT Icon to a Control Icon procedure for details.
P3: Proportional constant (Ti)
P4: Limitation (Lim)
Function |
Legacy RACL function: Calculates the linear product of the inputs. |
I/O Dialog Box |
|
Inputs |
One through thirty two inputs (X1 ...X32) |
Outputs |
One limited output (Y); Y = X1*P1 + X2*P2 + ... + Xn*Pn. |
Purpose |
Set up a linear function, for example, to weight the values of multiple sensors. |
Formula |
LIN= a1 * x1+a2 * x2+-.+a7 * x7 The coefficients a1 through a7 are parameter entries. x1 through x7 are user addresses. They can be flags or analog points (pseudo or physical).
|
Click LIN. The linear equation dialog box displays.
Select a input slot for the x1 through x7 value (function variable) from the drop-down. To create a new input slot, refer to step 2 of the Differential Function procedure.
Enter values for the a1 through a7 coefficients in the editing fields. Enter as many as there are user addresses for the x1 through x7 fields.
Click OK.
Or, to close the dialog box without saving, click Cancel.
Result: If you click OK, the mathematical editor dialog box displays with the formula.
Example:
Click Save and close the dialog box.
Or, click Refresh to undo the changes without saving.
If in the Control Strategy, connect the MAT icon to the appropriate icon. See the Connection of the MAT Icon to a Control Icon procedure for details.
P3 |
Coefficient a1 |
P4 |
Coefficient a2 |
P5 |
Coefficient a3 |
P6 |
Coefficient a4 |
P7 |
Coefficient a5 |
P8 |
Coefficient a6 |
P9 |
Coefficient a7 |
If more than one sensor is in a room, not all the measured temperatures are equally relevant to room comfort. You can use the LIN function to weight the values of the sensors. In this example, there are three sensors with the following weights:
User Address |
Weight |
Sensor_1 |
70 percent |
Sensor_2 |
Coefficient a3 |
Sensor_3 |
Coefficient a4 |
Set up the LIN function with the following values:
a1=0.7 x1 |
Sensor_1 |
a2=0.2 x2 |
Sensor_2 |
a3=0.1 x3 |
Sensor_3 |
When sensor values are:
Sensor_1 = 76
Sensor_2 = 70
Sensor_3 = 68
The LIN calculation is:
0.7 * 76 + 0.2 * 70 + 0.1 * 68 = 53.2 + 14 + 6.8 = 128.0
Function |
Legacy RACL function: Calculates the polynomial of the inputs. |
Formula |
POL= (x + a1)*(x + a2)*(x + a3)*(x + a4)*(x + a5) Y= (X + N1)*(X + N2)*(X + N3)*(X + N4)*…*(X + N31) Where a1 (N1) through a5 (N31) are parameter entries and x is the user address of an analog point (pseudo or physical) or flag.
|
(Select the POL function from the functions tree):
Click POL in the top row of the mathematical editor dialog box. The polynomial equation dialog box displays.
Select a input slot for the x value (function variable) from the drop-down. To create a new input slot, refer to step 2 of the Differential Function procedure.
Enter a1 (N1) through a5 (N31) values in the editing fields (in the parameters dialog box).
Click OK.
Or, to close the dialog box without saving, click Cancel.
Result: If you click OK, the mathematical editor dialog box displays with the formula.
Example:
Click Save and close the dialog box.
Or, click Refresh to undo the changes without saving.
If in the Control Strategy, connect the MAT icon to the appropriate icon. See the Connection of the MAT Icon to a Control Icon procedure for details.
P3 |
Coefficient a1 |
P4 |
Coefficient a2 |
P5 |
Coefficient a3 |
P6 |
Coefficient a4 |
P7 |
Coefficient a5 |