Profile

From SysCAD Documentation
(Redirected from Controller -- Profile)
Jump to navigation Jump to search

Navigation: Models ➔ Control 2 Models ➔ Profile Controller

Get Tag List Set Tag List Noise Controller Slew Rate Controller Downtime Events Scheduled Events Profile Queue Profile Signal Waveform

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.

Diagram

Profile Controller.jpg

The diagram shows the default drawing of the Profile control unit.

Similar Models

  • The Event Controller sets SysCAD tags at specific time using a event file in the format of a CSV file.
  • The Signal Waveform Controller is a useful alternative when data is periodic (wrap-around) with regularly spaced intervals. This controller allows direct user input of instantaneous data points with linear or spline interpolation, or interval average data with options for linear output or spline fitting conserving area under the curve.

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.
  3. Before loading the csv file:
    • 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 (e.g. 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 (i.e. columns 2 and 3).
  3. Wrap around can be selected if the simulation time is longer than the profile time.
Profiler93.png

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 (i.e. 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 (i.e. "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
Profiler93 2.png

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.

Tag (Long/Short) Input / Calc Description/Calculated Variables / Options
Tag Display This name tag may be modified with the change tag option.
Condition Display OK if no errors/warnings, otherwise lists errors/warnings.
ConditionCount Display The current number of errors/warnings. If condition is OK, returns 0.
GeneralDescription / GenDesc Display This is an automatically generated description for the unit. If the user has entered text in the 'EqpDesc' field on the Info tab (see below), this will be displayed here.
If this field is blank, then SysCAD will display the UnitType or SubClass.
Requirements
On Tick Box The Profile can be enabled or disabled using this box.
The following message and field is visible when upgrading the project with existing profile controllers from SysCAD 9.2 (or earlier) to SysCAD 9.3.
Update to use new tags and change numbering to start from 1 instead of 0.
NB this affects Tags.
ChangeNumbering Button Update Numbering to Start from 1 instead of 0. Only visible if the profile controller was added in SysCAD 9.2 or earlier version. NB: this may affect external tag references such as reports, please adjust the external references appropriately if updating the controller numbering.
 
Folder Display The full path of the csv file used in the Profiler.
File Input The file name of the csv, or txt, file used in the Profiler. Relative File Path can be used. Note: this file must be created first. File can be txt or csv format.
Status Display The status of the profile with a brief summary of the file.
Edit Button Allow the user to edit the file.
Browse Button Use this button to Browse for the file.
 
TagCount Input The number of data columns being read from the profile, maximum is 250. Note: this is the number of columns in the profile - 1. (Thus, the time column does not count.)
TagsInHeading Tick Box Uses the first row of the profile as output tags. If the user wants to use the Tags in the csv file this must be ticked before loading the csv file. If this is not ticked, then the user must copy the required tags to be set into the 'Output_Tag' fields.
WithGainOffset Tick Box If this box is selected, the values will be adjusted with a user defined Gain and Offset value. The user may set individual Gains and Offsets for each output tag.
Linear Tick Box If this box is selected, the values will be linearised. For example, if at Time 0 flow is 10, and Time 10 flow is 20. Then if linear is selected, at Time 5, flow will be 15; if linear is not selected, then at Time 5, flow will stay at 10.
WrapAround Tick Box If this box is selected, then when the profile reaches the last entry in the file, it will start again from the beginning. The time value of the last row gives the wrap around duration. The last value is ignored if the Linear option is not selected, but is used if Linear is selected.
If WrapAround is not enabled, the value will not change from the last value in the file once the maximum time has been reached.
StartupState Restart Will restart the profile at start up
Waiting (Completed) Only visible when WrapAround is NOT selected. If the option is selected, the profile will be in a waiting state at start up, user will have to send the Restart trigger to start the profile. (By manually pressing the Restart button or use a PGM to set Restart to 1)
ResetAction None Does nothing when the global Profile Reset is triggered. (Under the Access Window Options Button, Reset Action - Events / Profiles)
Restart Restarts the profile when the global Profile Reset is triggered. (Under the Access Window Options Button, Reset Action - Events / Profiles)
Waiting (Completed) Only visible when WrapAround is NOT selected. If this option is selected, then the profile will be in a waiting state when Reset is triggered. User will have to send the Restart trigger to start the profile. (By manually pressing the Restart button or use a PGM to set Restart to 1)
Actions
ReloadRestart Button Reloads and Restarts the Profile from time 0.
ReloadWait Button Only visible if WrapAround is NOT selected. Reloads the profile and puts the profile in a waiting state. User will have to send the Restart trigger to start the profile. (By manually pressing the Restart button or use a PGM to set Restart to 1)
Restart Button This is the trigger to restart the Profile from time 0. (By manually pressing the Restart button or use a PGM to set Restart to 1)
Complete Button Only visible if WrapAround is NOT selected. This will skip to the end of the profile and put the profile in a waiting state. Use this button to terminate the profile still in progress.
Options
ShowCnv Tick Box With this option selected, SysCAD will display engineering units for the Output tag. Note that these will only be displayed after SysCAD has completed at least one iteration.
TrackEmptyFile Tick Box If this box is selected, then no condition warning will be given if the profile file exists but is empty (has no data rows).
Check Tags Button SysCAD will perform a check on the validity of the tags used.
 
Results
State Feedback The current state of the profile controller.
Row Count Feedback The total number of rows in the profile.
Duration Feedback The total duration of the profile, based on once through.
TimePassed Feedback The time passed since the project has started.
Progress Feedback The percent completed, based on the total time of the current profile (once through).
RestartCount Feedback The number of times the profile has restarted during the current project run. (If the wrap around option is on, this will count the number of times the profile has looped around; if the wrap around option is not selected, then it will count the number of times the profile has Restarted (by pressing the Restart trigger button)
RowIndex Feedback Shows the row number of the current value being read from the profile.

P1

Tag (Long/Short) Input / Calc Description/Calculated Variables / Options
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

Add to Configuration File

Sort either by DLL or Group:

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

See Model Selection for more information on adding models to the configuration file.


Insert into Project Flowsheet

  Insert Unit Control 2 Profile

See Insert Unit for general information on inserting units.

Example Project