Noise Controller

From SysCAD Documentation
Jump to navigation Jump to search

Navigation: Models ➔ Control 2 Models ➔ Noise Controller

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

Related Links: Noise Class


General Description

  • The Noise Controller unit operation is used to simulate process noise. It can be used to add disturbance to feeders, pipe outlet capacity, and other writeable variables.
  • Standalone unit - no Pipe connections.
  • Dynamic simulation only.

Diagram

Noise.jpg

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

Inputs and Outputs

There are no connections to this unit.

Model Theory

The random number generator used for all probability functions is from the C++ standard library (http://www.cplusplus.com/reference/random/).

The Probability Density functions used for the Noise generation are shown in the following table. In all cases the following convention is used:

[math]\displaystyle{ \mu }[/math] = Mean Value
[math]\displaystyle{ \sigma }[/math] = Standard Deviation

For all methods, the tag PlantModel.RandomSeedAtStart (set on the Plant Model - FlwSolve page) affects the repeatability of the random values generated. For the same seed value, a repeatable set of random numbers will be generated. For a different seed, a different set of random numbers will be generated. If "*" is used, then a new random set of values will be generated on every run.

Type Probability Density Function P(t) NOTES
Gaussian

[math]\displaystyle{ P(t) = \cfrac{1}{\sigma \sqrt{2\pi}}\cdot e^{\dfrac{-(t-\mu)^2}{2\sigma^2}} }[/math]

where [math]\displaystyle{ \sigma \gt 0 }[/math] Normal distribution: 68.27% of the numbers generated will be between [math]\displaystyle{ \mu-\sigma }[/math] and [math]\displaystyle{ \mu+\sigma }[/math] (see Wikipedia).
Flat

[math]\displaystyle{ P(t) = 0 }[/math]

where [math]\displaystyle{ t \lt \mu - m }[/math] or [math]\displaystyle{ t \gt \mu + m }[/math]

[math]\displaystyle{ P(t) = \dfrac{1}{2\sigma} }[/math]

where [math]\displaystyle{ \mu - m ≤ t ≤; \mu + m }[/math] and [math]\displaystyle{ m ≥; 0 }[/math] and [math]\displaystyle{ m }[/math] = maximum deviation

Poisson

[math]\displaystyle{ P(t) = \cfrac{\mu^t}{t!}\ e^{-\mu} }[/math]

where [math]\displaystyle{ e }[/math] = the base of the natural logarithm system (2.71828...) and [math]\displaystyle{ \mu \gt 0 }[/math]
Gamma

[math]\displaystyle{ P(t) = \cfrac{1}{\Gamma(\alpha)\ \beta^{\alpha}}\ t^{\alpha-1}\ e^{-t/\beta} }[/math]

where [math]\displaystyle{ \alpha ≥ 0.5 }[/math] and [math]\displaystyle{ \beta \gt 0 }[/math]

The Chi-squared distribution is a special case of the Gamma distribution
with [math]\displaystyle{ \alpha = n/2 }[/math] and [math]\displaystyle{ \beta = 2 }[/math], where [math]\displaystyle{ n }[/math] = degrees of freedom

Weibull

[math]\displaystyle{ P(t) = \alpha^{-\beta}\ \beta\ t^{\beta-1}\ e^{-(t/\alpha)^\beta} }[/math]

where [math]\displaystyle{ t = \alpha (-\ln(U))^{1/\beta} }[/math] and [math]\displaystyle{ \alpha ≥ 0.04 }[/math] and [math]\displaystyle{ \beta ≥ 0.01 }[/math]
[math]\displaystyle{ U }[/math] is a randomly generated number between 0 and 1

Bernoulli

[math]\displaystyle{ P(t) = p^{t}\ (1-p)^{1-t} }[/math]

where [math]\displaystyle{ 0 ≤ p ≤ 1 }[/math]

Binomial

[math]\displaystyle{ P(t) = \dbinom{n}{t} p^{t}\ (1-p)^{n-t} }[/math]

where [math]\displaystyle{ n }[/math] is a positive integer, [math]\displaystyle{ \dbinom{n}{t} = \cfrac{n!}{t!(n-t)!} }[/math] and [math]\displaystyle{ 0 \lt p ≤ 1 }[/math]

Geometric

[math]\displaystyle{ P(t) = p\ (1-p)^{t} }[/math]

where [math]\displaystyle{ 0 \lt p ≤ 1 }[/math]

Exponential

[math]\displaystyle{ P(t) = \mu\ e^{-\mu\ t} }[/math]

where [math]\displaystyle{ \mu \gt 0 }[/math]

Extreme Value

[math]\displaystyle{ P(t) = \cfrac{1}{\beta}\ z(t)\ e^{-z(t)} }[/math]

where [math]\displaystyle{ z(t) = e^{(\alpha-t)/\beta} }[/math] and [math]\displaystyle{ \beta \gt 0 }[/math]
Log Normal

[math]\displaystyle{ P(t) = \cfrac{1}{s\ t\ \sqrt{2\pi;}}\ e^{-(\ln t-m)^2/2s^2} }[/math]

where [math]\displaystyle{ 0 \lt s ≤ 50.70 }[/math]
Cauchy

[math]\displaystyle{ P(t) = \cfrac{1}{\pi;\ \beta\ \left [1+\left (\cfrac{t-\alpha}{\beta} \right )^2 \right ]} }[/math]

where [math]\displaystyle{ \beta \gt 0 }[/math]
Fisher F

[math]\displaystyle{ P(t) = \cfrac{\Gamma; \left (\cfrac{m+n}{2} \right )}{\Gamma;\left (\cfrac{m}{2}\right )\ \Gamma;\left (\cfrac{n}{2}\right )}\ \frac{\left (\cfrac{m\ t}{n} \right )^{(m/2)}}{t\ \left (1+\cfrac{m\ t}{n} \right )^{(m+n)/2}} }[/math]

where [math]\displaystyle{ 1 ≤ m ≤ 100 }[/math] and [math]\displaystyle{ n ≥ 1 }[/math]
Student t

[math]\displaystyle{ P(t) = \cfrac{1}{\sqrt{n\ \pi;}}\ \cfrac{\Gamma;\left (\cfrac{n+1}{2} \right )}{\Gamma;\left (\cfrac{n}{2} \right )}\ \left (1+\cfrac{t^2}{n} \right )^{-(n+1)/2} }[/math]

where [math]\displaystyle{ n ≥ 0.25 }[/math]

References

  1. Press W.H, Teukolsky S.A, Vetterling W.T, Flannery B.P Numerical Recipes in C (2nd Edition) Cambridge University Press 1992.
  2. Sanders D.H Statistics A Fresh Approach McGraw-Hill 1990.
  3. http://www.cplusplus.com/reference/random/ and related links describing each distribution.

Data Sections

The default sections and variable names are described in detail in the following tables. The default Noise Controller access window consists of 2 sections. This number may increase or decrease, based on user configuration.

Summary of Data Sections

  1. NoiseCon tab - Contains a summary of all of the individual Noise Controls contained in the unit.
  2. NC Tabs tab - This page contains all of the information for each individual Noise Controls, starting at 1 for the first Noise Controls.
  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.

NoiseCon

Unit Type: NoiseCon - 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 Overall Noise Control unit will be enabled or disabled using this box. This means that all of the independent Noise controllers in the unit will be disabled.
The following message and field is visible when upgrading the project with existing noise controllers from SysCAD 9.2 (or earlier) to SysCAD 9.3.
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 noise 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.
Count Input The number of independent Noise controllers required. This may be any number from 1 upwards. The user may also change this number at any time. The unit will always add new noise controllers after existing ones.
User may delete individual Noise using the 'Delete Me' button under the individual noise controller blocks.
FreqMethod Each Step The noise controller output value will be set every step.
Steps Period The frequency of setting the noise controller output value is based on steps.
Time Period The frequency of setting the noise controller output value is based on simulated time period.
StepsPeriod Input Only visible only if FreqMethod is set to Steps Period. The number of steps which must pass before the noise controller output value is set.
StepsOffSet Input Only visible only if FreqMethod is set to Steps Period. Number of steps delay before the first noise controller output value is set.
StepsPassed Display Only visible only if FreqMethod is set to Steps Period. The number of steps that have passed since the last output value set.
TimePeriod Input Only visible only if FreqMethod is set to Time Period. The amount of simulated time must pass before the noise controller output value is set.
TimeOffSet Input Only visible only if FreqMethod is set to Time Period. Simulated time delay before the first noise controller output value is set.
TimePassed Display Only visible only if FreqMethod is set to Time Period. The amount of simulated time that has passed since the last output value set.
SetAtStartUp Tick Box With this option selected, the noise controller output value will be set during Startup step.
SetTagAlways Tick Box Only visible only if FreqMethod is set to Steps Period or Time Period. With this option selected, the noise controller output value will be set every step.
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 step.
ShowOnePerPage Tick Box With this option selected, SysCAD will display each noise block per tab page. If not selected, each page displays four Noise Controllers.
Check Tags Button SysCAD will perform a check on the validity of the tags and functions used in the noise controllers.
Summary
shows a summary table with the following values for each individual noise controller in the unit.
NC Display The Noise Controller number
Action On The random number generator is on and the controller will be setting the output tag at the specified frequency.
Off The random number generator is off and the controller will NOT be setting the output tag.
Manual (User) The random number generator is off but the controller will be setting the output tag to the User value (ManualOutput) at the specified frequency.
Manual (Mean) The random number generator is off but the controller will be setting the output tag to the mean value at the specified frequency.
Output Display The output value for the individual Noise Controller.
DevFrac Display The deviation fraction, when compared with mean value; for each individual Noise Controller.
OutputUnitTag Display The output tag for each individual Noise Controller.

NC1: Individual Noise Controller Data Fields

Noise Controller is displayed on the NCx pages.

  • If "ShowOnePerPage" is NOT selected, then each page displays four Noise Controllers.
  • If "ShowOnePerPage" is selected, then each page displays one Noise Controller.
Tag (Long/Short) Input / Calc Description/Calculated Variables / Options
[NC number]
Action On The random number generator is on and the controller will be setting the output tag at the specified frequency.
Off The random number generator is off and the controller will NOT be setting the output tag.
Manual (User) The random number generator is off but the controller will be setting the output tag to the User value (ManualOutput) at the specified frequency.
Manual (Mean) The random number generator is off but the controller will be setting the output tag to the mean value at the specified frequency.
Name Input The user may give the Noise Controller a name that describes the control, such Feed_Variation.
Index Display Controller Index. Useful for sorting the controller in reports
Type Gaussian Distribution method as described in the Model Theory above. 68.27% of the numbers generated will be between (Mean - StdDev) and (Mean + StdDev).
Flat Distribution method as described in the Model Theory above.
Poisson Distribution method as described in the Model Theory above.
Gamma Distribution method as described in the Model Theory above.
Weibull Distribution method as described in the Model Theory above.
Bernoulli Distribution method as described in the Model Theory above.
Binomial Distribution method as described in the Model Theory above.
Geometric Distribution method as described in the Model Theory above.
Exponential Distribution method as described in the Model Theory above.
ExtremeValue Distribution method as described in the Model Theory above.
LogNormal Distribution method as described in the Model Theory above.
Cauchy Distribution method as described in the Model Theory above.
Fisher_F Distribution method as described in the Model Theory above.
Student_t Distribution method as described in the Model Theory above.
ManualOutput Value Only visible when Action is set to Manual (User). The output tag will be set to this value instead of a randomly generated number.
StdDevInput Only visible if Type = Gaussian or Flat
Value The user specifies the Standard Deviation value.
Fraction The user specifies the Standard Deviation as a fraction of the Mean value.
Mean Input Only visible if Type = Gaussian, Flat, Poisson or Exponential. The mean value around which the random number must be generated.
StdDev Input/Calc Only visible if Type = Gaussian. The standard deviation around the mean value.
StdDevFrac Input/Calc Only visible if Type = Gaussian. The standard deviation expressed as a fraction of the mean value.
MaxDev Input/Calc Only visible if Type = Flat. The maximum deviation around the mean value.
MaxDevFrac Input/Calc Only visible if Type = Flat. The maximum deviation expressed as a fraction of the mean value.
Alpha Input Only visible if Type = Gamma, Weibull, ExtremeValue or Cauchy. The alpha parameter as described in the Model Theory above.
Beta Input Only visible if Type = Gamma, Weibull, ExtremeValue or Cauchy. The beta parameter as described in the Model Theory above.
n Input Only visible if Type = Binomial, Fisher_F or Student_t. The n parameter as described in the Model Theory above.
p Input Only visible if Type = Bernoulli, Binomial or Geometric. The probability (of success) parameter as described in the Model Theory above.
m Input Only visible if Type = LogNormal or Fisher_F. The m parameter as described in the Model Theory above.
s Input Only visible if Type = LogNormal. The s parameter as described in the Model Theory above.
OutputTag Input This is the Tag that will be set. This tag must be copied from the relevant unit. For example: Plant_Feed.QmReqd (t/h), Feed_Water.T_Reqd (C) or P_001.Qm_Capacity (kg/h).
Note 1: Only input data fields (i.e. white) can be used here.
Note 2: This field is optional.
OutputUnitTag Display The Unit Operation Tag. For example: If the Output Tag is Plant_Feed.QmReqd (t/h), then the OutputUnitTag is Plant_Feed.
OutputValue / Output Calc The output value.
Dev Calc The deviation value: (output - mean).
DevFrac Calc The deviation fraction: (output - mean)/mean.
Delete Button This allows the user to Delete the current individual noise controller. Please note that there is no 'Undo'!
MoveUp Button This allows the user to increase the Priority of the current individual noise controller. For example, if the current noise controller is number 3, the user can change it to 2 or 1 by clicking on this button once or twice.
MoveDown Button This allows the user to decrease the Priority of the current individual noise controller. For example, if there are 3 noise controller in the unit and the current noise controller is number 1, the user can change it to 2 or 3 by clicking on this button once or twice.

Adding this Model to a Project

Add to Configuration File

Sort either by DLL or Group:

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

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


Insert into Project Flowsheet

  Insert Unit Control 2 Noise

See Insert Unit for general information on inserting units.

Example Project