# Controller -- Profile

Navigation: Main Page -> Models -> Control 2 Models

## General Description

The Profiler model is only used in Dynamic projects. It allows users to vary input parameters in SysCAD over a period of time using a table of values. The table of values can then be used in profile model in two ways:

1. Set Continuous Data, examples of this type of profile are:
• reliability data for a pump over a year,
• rainfall and evaporation figures on a monthly basis,
• end-user daily demands in water supply network.
2. Set Small Group of Data as required; normally used in conjunction with the PGM file, examples of this type of profile are:
• Startup or shutdown an equipment when conditions are met
• Emulate equipment failure

The Profiler reads a CSV file, normally set up in Excel, that contains the data in columns. The first column must always contain increasing values of time, in seconds, and the user may then have any number columns, each representing an independent input parameter.

Notes:

1. The user sets the number of columns, or Tags, that will be read in the Profiler access window. SysCAD will ignore any 'extra' columns after this value and hence the user may have comments in the columns to the right of the active columns. (See the example below)
2. When used for continuously setting data for full duration of scenario, then WrapAround should be selected. When used in this way, the profile is never in a "Waiting" state.

### Similar Models

• The Event Controller sets SysCAD tags at specific time using a event file in the format of a CSV file.

## Profile Format

1. The first row in the Profile may contain headings made up with valid SysCAD Tags, i.e. cut and paste the output Tag that will be controlled by the Profiler from SysCAD. These are the output tags that will be set by the Profiler when the project is solving. The tags may contain engineering units, such as t/h, %, etc. If the tags do NOT contain engineering units, then SysCAD will use the SI units.
• If the TagsInHeading selection box is ticked in the Profiler model, the tags in the CSV file will be automatically loaded into SysCAD. The user may not set the output tags in the Profiler access window.
• If the TagsInHeading selection box is NOT ticked in the Profiler model, the first row of the CSV file is ignored by SysCAD. The user may then set the output tags in the access window in SysCAD
2. The first column in the Profile must contain increasing time in seconds. (It is recommended, but not essential, that the time settings used are divisible by the planned iteration size.)
3. The second column onwards in the profile must contain data that that will be set in the output tags in the project. In the Example below the second column of data will Set the evaporation rate in the Rain_Evap_Logic General Controller, where evaporation rate is calculated (PGM file not shown here).
4. Not all of the columns need to have the same length, if a cell is empty it will retain the last value it read.
5. Profiles do not support string tags.
6. The maximum columns loaded into SysCAD profile model will be 250.

### Example Profile

 Time (s) Rain_Evap_Logic.Evap_rate (mm/d) Rain_Evap_Logic.Rainfall_rate (mm/d) Comment(Time in days) Comment(Number of Days in Month) Comment(Month) 0 1.37 0.60 0 2592000 1.03 0.81 30 30 June 5270400 1.26 1.03 61 31 July 7948800 1.57 0.93 92 31 August 10540800 2.10 0.81 122 30 September 13219200 2.90 0.50 153 31 October 15811200 3.29 0.35 183 30 November 18489600 3.87 0.32 214 31 December 21168000 5.18 0.37 245 31 January 23587200 3.55 0.41 273 28 February 26265600 3.17 0.43 304 31 March 28857600 2.58 0.52 334 30 April 31536000 1.37 0.60 365 31 May

Note:

1. The blanks in the table are treated as zeros.
2. It is recommended that the first row has a time value of zero to give the initial values at the start of the profile. If there is not an entry at time zero SysCAD assumes that the values at time 0 are the same as the values for the first time entry.
3. If the time column has two (or more) consecutive rows with the same time values then:
• When Linear is not ticked, then only the values of the last row for the same time values is used.
• When Linear is selected, then the first row and last row of values for the same time are used.

## How to use a Profile

1. The easiest way to create a profile is by using MS Excel. The profile format and example is given above. Once the profile is created, save it as a csv file.
2. Insert a Profiler unit (from the Control section) into the SysCAD project.
• If the csv file contains valid SysCAD tags in the first row that you wish to use in the Profiler, then tick the TagsInHeading box.
• Set the number of units, or Tags, that will be controlled in the TagCount field.
4. Use the browse button to locate and load the csv file into the model.

### Example 1 - Use Profile to Set Continuous Data

For this use of a profile, the intention is to continuously set data for the entire duration of scenario. The profile time column should cover the entire duration of the scenario run, or if a pattern is repeated (eg fortnightly) then the time duration would be for a fortnight (1209600 seconds) and the WrapAround option must be selected.

The CSV file given above has yearly rain and evaporation data, this file is best used with the wrap around option to set the rain and evaporation data.

The image below shows the access window of the Profiler with the the csv file in the above example:

Note:

1. TagInHeading has been ticked and hence the Profiler uses the tags in the csv file as the Output tags to be set.
2. TagCount = 2 and hence the Profiler will only read the first 2 data columns (ie, columns 2 and 3).
3. Wrap around can be selected if the simulation time is longer than the profile time.

### Example 2 - Use Profile to Set Intermittent Data

A profile can also be used to set data over a relatively short period of time. When the profile duration is completed the model goes into a "Waiting" state and can be triggered again in the future. This type of profile would NOT have WrapAround selected (as soon as WrapAround is checked it becomes the other type of profile continuously setting data). For example, user may have some set procedure to switch pump pair,

Time PMP_001.Speed.Reqd (%) PMP_002.Speed.Reqd (%) Comments
0 100 0 Pump 1 is running
30   100 Pump 2 is switched on
60 0   Pump 1 is switched off

Note:

1. The blanks in the table are treated as zeros.
2. This profile should only be used when pump 2 needs to be switched on. A PGM file can be used to set the Start trigger. This may be triggered multiple times during a project run.
3. A separate profile can be implemented for the reverse logic (ie switch pump 1 on).
4. User can also set the StartupState and ResetAction to Waiting, this will ensure the profile does not get executed until it is triggered.
5. To run the profile, user can either manually press the Restart Button or use a PGM file to trigger the Restart (ie "push the button from the code"). A very simple example pgm file is shown below:

PGM file: ProfileTrigger.pgm

  Bit	  Switch*

If Switch
SetTag("PC_001.Restart", 1)  ;This will start the profile.
Switch = 0
Endif


## Data Sections

The default sections and variable names are described in detail in the following tables. The default Profiler access window consists of 3 sections:

### Summary of Data Sections

1. Profile tab - Contains general information relating to the unit.
2. P0 tab - The second (and possibly more) section contains details of the tags that the Profiler will set.
3. Info tab - Contains general settings for the unit and allows the user to include documentation about the unit and create Hyperlinks to external documents.

### Profile Page

Unit Type: Profile - The first tab page in the access window will have this name.

### P1

Tag / Symbol Input / Calc Description
The values for the profile tags are listed as a table with the following fields.
Px Display The Profile Tag number
Gain Input Visible only if the WithGainOffSet option is selected. This is the multiplier, where the Output Value = Value in file * Gain + Offset
Offset Input Visible only if the WithGainOffSet option is selected. This is the offset value, where the Output Value = Value in file * Gain + Offset
Value Feed back The value read from the profile (if linear or WithGainOffSet is selected, then it will display the adjusted number).
Output_Tag Input/Display This is the output tag that will be set by the Profiler unit.
Notes:
1. If the TagsInHeading tick box is selected, then the tags present in the first row of the profile will be used here. These fields will then be grey and cannot be changed.
2. If the TagsInHeading tick box is NOT selected, then these fields will be white, changeable data fields and the user may enter the required output tags here.
3. If the Output_Tag field is blank, then the corresponding column of data from the profile will be skipped.

## Adding this Model to a Project

Insert into Configuration file

Sort either by DLL or Group.

 DLL: ControlDyn.dll → Units/Links → Control 2: Profile or Group: General → Units/Links → Control 2: Profile