Mathematical Editor

Mat components process one or more StatusNumeric input values and provide a StatusNumeric output value.

Wiresheet View

AX Property Sheet

AX Slot Sheet

Function

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).

Control Strategy Example

Control Strategy MAT (I/O Dialog Box)

Input

The mathematical editor dialog box controls formula inputs. Necessary inputs can be generated as required.

Mat Output

  • One analog output (Y). The output slot can be linked to any component. It is the result of the formula.

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:

  • Mat Out = 4 * Input_20 / Input_15

Formulas can include numeric, boolean, or enum points.

Connection of the MAT Icon to a Control Icon

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.


   

Differential Function (DIFT) Dialog Box

Purpose

Calculate a differential output signal that varies proportionally to input signal changes.

Formula

DIFT= Td/t0*[x(t)-x(t-t0)]

  • Td is the proportional constant.

  • x is a user address representing the deviation.

  • x(t) is the actual value of user address x.

  • x(t-t0) is the value of the user address x in the previous cycle.

User address x can be a physical point, or software point.

Procedure

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.

  1. In the Math Editor dialog, under Inputs, click Create.

  2. Enter the Input Name and select the Input Type as Numeric, Boolean, or Enum slot.

  1. 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.

Parameter Number Descriptions

P3: Proportional constant (Td)

Formula Entry Procedure

Procedure

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:

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:

  • First, MAT solves any SQRT, e^x, integral, differential, linear, and polynomial functions in a left to right order unless overridden by brackets.

  • Next, it performs multiplications (*), divisions (/), additions (+), and subtractions (-) in this order unless overridden by parentheses or brackets.

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).

SQRT

P1

Argument x

P2

Internal parameter

P3

Internal parameter

P4

Internal parameter

P5

Internal parameter

P6

Internal parameter

 

e^x

P1

Argument x

P2

Internal parameter

P3

Internal parameter

P4

Internal parameter

P5

Internal parameter

P6

Internal parameter

P7

Internal parameter

P8

Internal parameter

P9

Internal parameter

P10

Internal parameter

P11

Internal parameter

 

All internal parameters are for software use only.

Integral Function (INT) Dialog Box

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.

Procedure

  1. Click INT. The integral function dialog box displays. Example with values:

  2. 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.

  1. Enter the limit (Lim) and reset time (Ti) values in the editing fields.

  2. Click desired engineering unit (seconds or minutes).

  3. 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:

  1. Click Save and close the dialog box.
    Or, click Refresh to undo the changes without saving.

  1. 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.

Parameter Number Descriptions

P3: Proportional constant (Ti)

P4: Limitation (Lim)

Linear (LIN) Dialog Box

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).

 

Procedure

  1. Click LIN. The linear equation dialog box displays.

  1. 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.

  1. 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.

  2. 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:

  1. Click Save and close the dialog box.
    Or, click Refresh to undo the changes without saving.

  2. 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.

Parameter Number Descriptions

P3

Coefficient a1

P4

Coefficient a2

P5

Coefficient a3

P6

Coefficient a4

P7

Coefficient a5

P8

Coefficient a6

P9

Coefficient a7

LIN Example

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:

The LIN calculation is:

0.7 * 76 +  0.2 * 70 +  0.1 * 68 = 53.2 + 14 + 6.8 = 128.0

Polynomial Equation (POL) Dialog Box

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):

Procedure

  1. Click POL in the top row of the mathematical editor dialog box. The polynomial equation dialog box displays.




  2. 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.

  1. Enter a1 (N1) through a5 (N31) values in the editing fields (in the parameters dialog box).

  1. 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:

  1. Click Save and close the dialog box.
    Or, click Refresh to undo the changes without saving.

  2. 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.

Parameter Number Descriptions

P3

Coefficient a1

P4

Coefficient a2

P5

Coefficient a3

P6

Coefficient a4

P7

Coefficient a5