Using Controls, Conditions, Actions and Control Sets in WaterGEMS and WaterCAD

Product(s): WaterGEMS, WaterCAD, SewerCAD
Version(s): CONNECT Edition, V8i (SELECTseries 6)
Area:  Modeling

List of Topics 

New controls editor

Classic controls editor

Overview[TopOfPage]

This TechNote describes the three basic methods of creating simple controls in WaterGEMS and WaterCAD. This workflow also applies to logical controls in SewerCAD or SewerGEMS using the GVF-Convex solver. WaterGEMS will be used as an example in the workflow flow.

In addition to general information on creating controls, assigning a particular set of controls to a scenario using Control Sets is also described later this Technote. 

Note : The top portion of this TechNote applies to WaterGEMS and WaterCAD CONNECT Edition update 4 - 10.04.XX.XX and greater. Starting With CE Update 4 (10.04.00.106) and later versions new control UI has been introduced which is discussed here in top portion. And for lower versions like Connect edition update 3 -10.03.XX.XX versions  to V8i SS6 - 08.11.06.XX,  classic controls editor is to be used. See below for more on this. 

For SewerCAD and the GVF-Convex solver in SewerGEMS, the classic controls editor is applicable only, you can scroll down for that. 

New controls editor Vs Classic controls editor 

Starting with 10.04.00.106 version of WaterGEMS / WaterCAD a new control editor user interface (New Controls UI) is introduced, whereas classic control editor is going to be there alongside. It can be accessed through Home > Controls or Components > Controls. If you click on controls new UI will open, if you wish open classic controls editor then you would need to click on dropdown menu. Also, if you click on controls for a specific element through element properties, it will open new controls UI, with controls filtered for that element.

This new UI is more user friendly where you can see all the controls set for the model in a single table like flex table format, with option to filter table on required elements, control sets, on / off status etc.

If you are looking for classic controls editor scroll down to find detailed information on how to use it.

Background[TopOfPage]

In WaterGEMS, controls can be modeled to introduce a user-defined action to a hydraulic element. When one or more conditions provided by the user are met during the model simulation, the action or actions provided by the user will be introduced in the model operation. In a real system, these types of controls are sometimes referred as Programmable Logical Controls (PLCs). SCADA systems and time-based plant operations are major sources of PLCs that should be included in a water model. Including controls in the model is most essential when performing an Extended Period Simulation (EPS).

Controls can be created for a number of element types, including pumps, variable speed pump batteries (VSPB), valves, and pipes. The example below shows controls for pump status based on tank level, but a control could also be other element types or conditions. In addition to basing conditions on element properties, conditions can also be set for Time of Day, System Demand, and Time from Start.

Note: If you are using SewerCAD or SewerGEMS with the GVF-Convex solver to model logical controls, the elements in the condition and action should be in the same pressure subnetwork. 

New controls editor UI

A video has been created to showcase enhancements in new controls UI

Overview:

There are 3 main areas in this controls tab of new controls UI

  • Toolbar – It has options to create new controls, copy, past, edit etc. Creating and editing control sets, hiding the unwanted columns, zoom, find elements, control wizard to directly created controls for tanks and pumps. And to import or export control files.
  • Table – Table contains all the information related to controls for the set elements like on/off settings, status, conditions, actions, values, notes if any for the controls etc.
  • Status bar - It will display total number of elements listed in the table, if there is any filter applied, you can also choose to show controls in active control set only using status bar.

Opening Controls manager and Creating Controls[TopOfPage]

There are two methods to access main Control dialog. First, you can go to the Home tab and select Controls or the Components tab and select Controls, new controls UI will open.

When you open the Controls dialog using this method, all controls in the model will be displayed as the default in a tabular format. You will find information related to controls like Condition Element, Action Element, Type, and Priority, Settings, control type etc.

The second method you can open the Controls dialog is through the Properties. In the Properties grid, find the Operational section and click the ellipsis (...) button in the Controls cell. This will open the Controls dialog filtered on the element. In the example below, the Controls dialog is filtered on tank T-3 and the control set for the active scenario.

This will open controls filtered for that particular element only, e.g. tank T-3 only, which can be seen in the status bar in below screenshot.

Creating controls[TopOfPage]

Below you will find methods to create new controls using new controls UI. 

Method 1: Control Wizard Method

Creating controls using the Control Wizard is very simple and can save time. However, this approach is only applicable when creating controls on pumps that operate based on tank hydraulic grade results. To use the wizard, click the 'Control Wizard' button in the Controls dialog.

Note: When you use the wizard tool to create Pump ON/OF controls based on a tank level, this tool is able to create the control but assigns ON and OFF actions incorrectly.  Defect 1036597 has been filed to address the issue in the next release.  This issue seems to have started beginning with the latest 10.4 release. In the previous 10.3.5.5 release, the problem does not occur. Also, the problem occurs in 10.4 in both the new controls UI as well as the classic. For some reason the on/off is swapped in the latest version.

Next, select the pump to which you want to assign a control from the drop-down list.

Next, select the tank from the drop-down list. This will be the tank that the pump status will be based on.

Next, set the On Operator and Off Operator. You would typically use operators like such as greater than '>' or less than '<' options. Also set the On HGL and Off HGL. 

Click the Create button to complete the process. This will create new conditions related to the tank and new actions related to the pump. The control will be created and visible in the Controls table. Please scroll to Control Set for further information on setting up a control set for the new control.

Method 2 : Creating Controls through Controls Dialogue

This method allows you to create conditions and actions in one place, directly from the Controls tab.

First click on New in controls dialogue, you will see a new control that is essentially blank and all the dropdown options to create a new control will become active, which let you select appropriate type within. The left section is for defining Conditions, the middle section is for defining Actions, and the right portion is for defining optional ELSE Actions. Notice there is a new control that is blank. You can now use the options available at dropdown dialog to either select an existing condition or action or create a new condition or action.

First you will need to define whether you want to create a logical or simple control and then set the priority if required (priority is applicable for logical controls). Scroll down to understand how priorities work in controls. In the If type column you need to define whether you want to set control for an element or system. For system conditions could be based on Time of Day, System Demand, and Time from Start as seen below.

If you select element as if type, use the Select button from the pulldown menu to select an element from the model or Find button. For the THEN statement or action, use the Select button from the pulldown menu to select an element from the model or Find button to choose an element from the model.

Note: Each option for the condition will have different properties to enter. The example below using Element.

When you choose the Element option for the Condition or for the Action, you will see new fields become available. The fields will depend on the type of element that is used. For instance, a pump will see options such as pump setting and pump status, a tank will see options like hydraulic grade and level, a pipe will see pipe status, and a valve will see valve setting or valve status. The example below uses tanks as a condition and a pump as an option. 

Note: To open a closed valve using controls, see this link: How to make a PRV, PSV, or FCV active after closing it with controls?

Whichever method you choose, the end results should look like this.

Method 3 : Composite Conditions and/or Actions

This method allows you to create multiple composite conditions and actions using Edit composite tab in toolbar. It is necessary to use this approach when creating a control with multiple conditions and or / actions (i.e., a composite condition or action) using AND or OR. And /Or Conditions are created from Edit Composite tab > Edit if condition and actions are created from Edit Composite tab > Edit Then Action. 

To start, create new control in controls window as mentioned in method 2. You have options to create Simple or Composite conditions. A simple condition has a single statement. A composite condition will include multiple conditions using an AND or OR operator.

To start defining the composite conditions select the new control row and go to from Edit Composite tab > Edit if condition. Or click in any tab within that control row.

Here create the And / Or conditions as per your requirement, like shown below.

After creating composite conditions, similarly, select the control row and go to Edit Composite tab > Edit Then Action. Type required action elements; this is an example of composite control for cycling between pumps.

If you also have else condition which is applicable for logical control, then same way go Edit Composite tab > Edit Else Action to define else actions. Once completed, a new control will be created. 

NOTE: When you are opening a model with controls created in old versions, if it has messed up controls meaning either condition elements missing or action elements missing because the work is still incomplete, so controls were not fully created. In that case you cannot click in the if element field or element setting and edit the condition or control for that control. Rather you need to right click on that control and then select Edit “if” Condition or Edit “Then” Action, whichever is missing. See below screenshot as an example.

Creating a Control SetTopOfPage]

Control sets allow you to manage and modify controls.  The use of multiple control sets enables you to apply different controls to different scenarios. To create a control set, select Control Set icon in controls toolbar.

By selecting the "Control Sets..." option, you can see the existing controls along with the control sets that have already been created. You can edit the controls in an existing control from there by toggling the check box. 

If you select the "Add/Remove Control Sets" option, you can create new control sets or delete existing ones. After creating a new control set, you can use the "Control Sets..." option, you can then add controls to a control set.

Assigning a Control Set to an Alternative for use in a Scenario

Assigning a Control Set to an Alternative for use in a Scenario

Recognizing Elements with Controls

Recognizing elements with controls

Priorities in ControlsTopOfPage]

You can add a Priority value to a control where multiple controls may have conflicting actions. To set a priority for the control being created, it needs to be a logical control. To define priority, select the priority drop-down list.

You can set a priority of 1-5, with 5 being the highest priority. If multiple controls meet a certain condition and they have conflicting actions, the logical control with the highest priority will be used.

Note: At calculation time, the priority is used to determine the logical control to apply when multiple controls require that conflicting actions be taken. Logical controls with identical priorities will be prioritized based on the order they appear in the control set in the Operational alternative. A rule without a priority value always has a lower priority than one with a value. For two rules with the same priority value, the rule that appears first is given the higher priority. 

It is important to note that priority only works with Logical controls. If priority does not appear to be working, check to make sure that all controls with conflicting actions are set as logical controls.

Note: If you are using SewerCAD to model logical controls, the control priorities apply to individual pressure subnetworks. For that reason, if you have conflicting controls that involved elements in different pressure subnetworks, such as two controls that have two different tanks as the condition, you will need to make sure that there are no gravity elements between the elements referenced in the control.

Duplicate ControlsTopOfPage]

Controls can be duplicated depending upon your requirement, if you click on any tab within a control row or select the control row and click duplicate in toolbar, whole control along with condition and action will be duplicated.

If you want to copy specific composite conditions or actions only for creating a new control, then you would need to copy those conditions or actions through Edit Composite toolbar. Select a control to open on composite conditions or actions for that control and then click on Edit composite.

Copy and paste option will help you to copy the whole controls table and paste it in external source like excel sheet.

Arranging ControlsTopOfPage]

When you are adding multiple controls in the model for several elements, whenever you will create a new control, it will be added at the bottom in the controls window. However, you will want to have controls for one element listed altogether, say controls for tank T-1 one after other to edit them as required. If they are not in proper sequence, it will be difficult to read them. In that case you can either filter the controls based on condition elements or action elements or sort the controls in ascending or descending order based on any field in controls table.

Hide / Unhide Columns

You can choose to hide unwanted columns from the controls table, e.g. if you are not working on composite controls, you can choose hide related columns by unchecking in columns list in toolbar.

Find and Zoom To

Find option is useful when you have list of controls defined and you want to quickly jump to controls set for any specific element then you can click on find button and find required element in the controls table, you can look for any data that you have entered to create controls, e.g. HGL value, time from start etc.

Zoom to option is useful when you want to zoom in to any element either condition element or action element from a control, e.g., when you are not sure about HGL value of tank set for a control. Just click on the control row or any tab within a control click Zoom to, by default it will zoom to action element, if you click on dropdown in zoom to, you will see zoom to if condition element and zoom to then action element.

Import and export of ControlsTopOfPage]

You have the ability import and export controls from one project to another. This will save you time in recreating the controls for new projects. 

  • Once you have created controls, control sets, you can export them to a new file which can be saved as control file .ctl or as tab delimited excel file .txt. 
  • After exporting save the file to the desired location and then you can import this controls file into a new model or existing model without having to rebuild the controls. 


CLASSIC controls editorTopOfPage]

Note : The classic controls editor is applicable to version 10.03.XX.XX and earlier till SS6 - 08.11.06.XX. For versions above 10.03.XX.XX, please refer the top portion - New Controls Editor.  If you need to upgrade to the latest version of the product, please refer link - Downloading OpenFlows products

Whereas the new controls editor user interface is more user friendly where you can see all the controls set for the model in a single table like flex table format, with option to filter table on required elements, control sets, on / off status etc. See video below to understand more about, how it has changed from classic controls editor. 

Opening Controls manager and Creating Controls

There are two methods to access main Control dialog. First, you can go to the Home tab and select Controls or the Components tab and select Controls. For V8i SelectSeries 6, go to Components > Controls.

When you open the Controls dialog using this method, all controls in the model will be displayed as the default. You will find a series of pulldown menus at the top of the dialog for Controls Set, Condition Element, Action Element, Type, and Priority. By choosing from these menus, you can filter the list of controls based on the selection.

The second method you can open the Controls dialog is through the Properties. In the Properties grid, find the Operational section and click the ellipsis (...) button in the Controls cell. This will open the Controls dialog filtered on the element. In the example below, the Controls dialog is filtered on PMP-2 and the control set for the active scenario.

Creating controls[TopOfPage]

Below you will find the methods available to create controls. 

Method 1: Control Wizard Method

Creating controls using the Control Wizard is very simple and can save time. However, this approach is only applicable when creating controls on pumps that operate based on tank hydraulic grade results. To use the wizard, click the 'Control Wizard' button in the Controls dialog.

Next, select the pump to which you want to assign a control from the drop-down list.

Next, select the tank from the drop-down list. This will be the tank that the pump status will be based on.

Next, set the On Operator and Off Operator. You would typically use operators like the  such as greater than '>' or less than '<' options. Also set the On HGL and Off HGL. 


Click the Create button to complete the process. This will create new conditions related to the tank and new actions related to the pump. The control will be created and visible in the Controls tab of the Controls dialog. Please scroll to Control Set for further information on setting up a control set the new control

Method 2: Create Conditions and Actions from Controls Tab 

This method allows you to create both conditions and actions in one place, directly from the Controls tab.

First, click the New button. You will see a new control that is essentially blank. At the bottom of the Controls dialog are several buttons and pulldown menus. The left section is for defining Conditions, the middle section is for defining Actions, and the right portion is for defining optional ELSE Actions.

Notice there is a new control that is undefined ("IF <none> THEN <none>"). You can now use the options available at the bottom of the Controls dialog to either select an existing condition or action or create a new condition or action. 

Next to the dropdown menu for the IF, THEN, or ELSE statements, you will see three small buttons. 

With the button on the left, you can create a new control. With the button on the right, you would be able to find an existing condition or action. The middle button, you have options to create a new simple or composite condition or action or find an existing condition or action.

For the IF station or condition, you will be able to select the type condition (Clock Time, Element, System Demand, Time from Start). If you select the Element option, you can use the pulldown menu to select from elements that have already been used as a condition. You can also use the Select or Find buttons next to the pulldown menu to select an element from the model. For the THEN statement or action, you can select an existing action from the pulldown menu or use the Select or Find buttons next to the pulldown menu to choose an element from the model.

Note: Each option for the condition will have different properties to enter. The example below using Element.

When you choose the Element option for the Condition or for the Action, you will see new fields become available. The fields will depend on the type of element that is used. For instance, a pump will see options such as pump setting and pump status, a tank will see options like hydraulic grade and level, a pipe will see pipe status, and a valve will see valve setting or valve status. The example below uses tanks as a condition and a pump as an option. 

Note: To open a closed valve using controls, see this link: How to make a PRV, PSV, or FCV active after closing it with controls?

You can create new composite conditions and actions by clicking the middle button next to the IF and THEN pulldown menus and choosing New Composite Condition/Action. A composite condition or action consists of multiple conditions/actions separated by an operator like AND or OR. This would require an existing condition or action already available in the Conditions or Actions tab. To create one from here, click the New button. A row with an IF operator (for a condition) or a THEN operation (for an action) will be created. You can then choose a condition or action from the pulldown menu. If none are available, click the ellipsis (...) button and choose from the available conditions or actions. Click the New button again to create another row. From the Operator column, choose AND or OR and then select another condition or action from the list.

No matter what method you use to create the control, the new control that you created at the beginning of the process will be updated to include the condition and action.

Method 3: Creating Controls Using the "Conditions" and "Actions" Tabs (Required for Composite Conditions and/or Actions)

This method allows you to create conditions and actions separately under the Conditions and Actions tab. It is necessary to use this approach when creating a control with multiple conditions and or/actions (i.e., a composite condition or action) using AND or OR. Conditions are created from the Conditions tab and actions are created from the Actions. 

To start, go to the Conditions tab. Click the New button to create a new condition. You have options to create Simple or Composite conditions. A simple condition has a single statement. A composite condition will include multiple conditions using an AND or OR operator.

After selecting a simple or composite condition, you can create the condition. The steps will be similar to those in Method 2. With conditions, you can select the type (Element, Clock Time, System Demand, or Time from Start). If you choose Element, you can select an element you have already selected from the pulldown menu or use the Select or Find buttons next to the pulldown menu to choose an element from the model. 

Next, create the action. The workflow will be similar to create the action. Composite conditions and actions can also be created.

Once the condition and action are created, go to the Controls tab and click the New button. At the bottom of the Controls dialog, click the middle button next to the Conditions and select Find Condition, or click the button on the right, which is the Find button.

Do the same with the Action. Once completed, a new control will be created. 

Creating a Control Set[TopOfPage]

Control sets allow you to manage and modify controls.  The use of multiple control sets enables you to apply different controls to different scenarios. 

To create a control set, select Control Set icon.

By selecting the "Control Sets..." option, you can see the existing controls along with the control sets that have already been created. You can edit the controls in an existing control from there by toggling the check box. 

If you select the "Edit Control Sets for LCxxx" option, you can adjust the control sets for a selected control.

If you select the "Add/Remove Control Sets" option, you can create new control sets or delete existing ones. 

After creating a new control set, you can use the "Control Sets..." option, you can then add controls to a control set.

 

Assigning a Control Set to an Alternative for use in a Scenario[TopOfPage]

To make controls specific to a scenario, it is necessary to add controls to a control set and then assign that control set to the Operational alternative used by the desired Scenario. Make sure to create the control set first. With CONNECT Edition, go to the Home or Analysis tab and select Alternative. With V8i, go to the Analysis pulldown menu and select Alternative. Expand the Operational alternative. You will see a base operational alternative, but you can create new base or child scenarios using scenario and alternative management

You can assign the control set from the pulldown menu. There are two buttons next to the pulldown menu where you can view and edit the control sets.

Recognizing Elements with Controls[TopOfPage]

To identify whether an element has an active control, look for the following symbol next to the element. If the symbol is not present, then it's likely the control you created is not assigned to the control set being utilized by the current Operational Alternative.

Priorities in Controls

You can add a Priority value to a control where multiple controls may have conflicting actions. To set a priority for the control being created, it needs to be a logical control. To activate the priority drop-down list, click the check box next to Priority.

You can set a priority of 1-5, with 5 being the highest priority. If multiple controls meet a certain condition and they have conflicting actions, the logical control with the highest priority will be used.

Note: At calculation time, the priority is used to determine the logical control to apply when multiple controls require that conflicting actions be taken. Logical controls with identical priorities will be prioritized based on the order they appear in the control set in the Operational alternative. A rule without a priority value always has a lower priority than one with a value. For two rules with the same priority value, the rule that appears first is given the higher priority. 

It is important to note that priority only works with Logical controls. If priority does not appear to be working, check to make sure that all controls with conflicting actions are set as logical controls.

Note: If you are using SewerCAD to model logical controls, the control priorities apply to individual pressure subnetworks. For that reason, if you have conflicting controls that involved elements in different pressure subnetworks, such as two controls that have two different tanks as the condition, you will need to make sure that there are no gravity elements between the elements referenced in the control.

Duplicate Controls[TopOfPage]

Controls can be duplicated depending upon your requirement, whether you want to duplicate only control or conditions and actions as well.

  1. When first option is selected of duplicating full control, along with the control, condition and action of that control will also be duplicated, which you can see in the conditions and actions tab.
  2. When second option is selected, then only the control will be duplicated, by reusing the existing condition and action of original control.

Find more details on how to determine if conditions and actions are being reused here: How to determine if a condition or action is being shared with other controls?

Arranging Controls

When you are adding multiple controls in the model for several elements, whenever you will create a new control it will be added at the bottom in the controls window. However you will want to have controls for one element listed altogether,  say controls for tank T-1 one after other to edit them as required. If they are not in proper sequence it will be difficult to read them. In that case you can either filter the controls based on condition elements or action elements which is explained in beginning or click on the Description filed in controls window which will list the controls in ascending or descending order based on condition elements. 

Import and export of Controls[TopOfPage]

Starting with the CONNECT Edition release of WaterGEMS and WaterCAD, you now have the ability import and export controls from one project to another. This will save you time in recreating the controls for new projects. 

  • Once you have created controls, control sets , you can export them to a new file which can be saved as .ctl or .txt or as tab delimated excel file. 
  • After exporting save the file to the desired location and then you can import this controls file into a new model or existing model without having to rebuild the controls. 

Percent Full condition for tanks

The tanks element received a new “Percent Full” condition option that will allow you to specify a given action to occur when your tank gets to a certain percent level full. 

There are also newly added actions for the pump element that will allow you to create a control to have a pump achieve a target pressure and pump target head, which will be useful for VSP pumps. For more on this, see further below under the VSP section.

Troubleshooting Problems with Controls

If your controls do not appear to be working as intended, see the following article for troubleshooting steps: Controls not being followed

Recommended
Related