# Controller -- Noise

Navigation: Models ➔ Control 2 Models ➔ Noise Controller

## General Description

• This unit operation is used to simulate process noise. It can be used to add disturbance to Feeders, pipe outlet capacity and other writeable variables.
• The Noise Control model is an orphan model, i.e it cannot be connected to any other unit operation.
• The noise model is for dynamic simulation only with the purpose of adding disturbance to the model.

### Diagram

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

## Inputs and Outputs

There are no connections to this unit.

## Model Theory

In SysCAD 9.3 Build 136 or earlier, the random number generator used for these probability functions is from Numerical Recipes in C.

In SysCAD 9.3 Build 137 or later, 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:

$\mu$ = Mean Value
$\sigma$ = 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
• $P(t) = \cfrac{1}{\sigma \sqrt{2\pi}}\cdot e^{\tfrac{-(t-\mu)^2}{2\sigma^2}}$
where $\sigma \gt 0$
Flat
• $P(t) = 0$
where $t \lt \mu - m$ or $t \gt \mu + m$
• $P(t) = \dfrac{1}{2\sigma}$

where $\mu - m ≤ t ≤ \mu + m$ and $m ≥ 0$ and $m$ = maximum deviation

Poisson
• $P(t) = \cfrac{\mu^t}{t!}\ e^{-\mu}$
where $e$ = the base of the natural logarithm system (2.71828...) and $\mu \gt 0$
Gamma
• $P(t) = \cfrac{1}{\Gamma(\alpha)\ \beta^{\alpha}}\ t^{\alpha-1}\ e^{-t/\beta}$

where $\alpha ≥ 0.5$ and $\beta \gt 0$

Note: The Chi-squared distribution is a special case of the Gamma distribution
with $\alpha = n/2$ and $\beta = 2$, where $n$ = degrees of freedom

Weibull
• $P(t) = \alpha^{-\beta}\ \beta\ t^{\beta-1}\ e^{-(t/\alpha)^\beta}$

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

Bernoulli
• $P(t) = p^{t}\ (1-p)^{1-t}$

where $0 ≤ p ≤ 1$

(available in Build 137 or later)
Binomial
• $P(t) = \dbinom{n}{t} p^{t}\ (1-p)^{n-t}$

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

(available in Build 137 or later)
Geometric
• $P(t) = p\ (1-p)^{t}$

where $0 \lt p ≤ 1$

(available in Build 137 or later)
Exponential
• $P(t) = \mu\ e^{-\mu\ t}$

where $\mu \gt 0$

(available in Build 137 or later)
Extreme Value
• $P(t) = \cfrac{1}{\beta}\ z(t)\ e^{-z(t)}$
where $z(t) = e^{(\alpha-t)/\beta}$ and $\beta \gt 0$ (available in Build 137 or later)
Log Normal
• $P(t) = \cfrac{1}{s\ t\ \sqrt{2π}}\ e^{-(\ln t-m)^2/2s^2}$
where $0 \lt s ≤ 50.70$ (available in Build 137 or later)
Cauchy
• $P(t) = \cfrac{1}{π\ \beta\ \left [1+\left (\cfrac{t-\alpha}{\beta} \right )^2 \right ]}$
where $\beta \gt 0$ Example (available in Build 137 or later)
Fisher F
• $P(t) = \cfrac{Γ \left (\cfrac{m+n}{2} \right )}{Γ\left (\cfrac{m}{2}\right )\ Γ\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}}$
where $1 ≤ m ≤ 100$ and $n ≥ 1$ (available in Build 137 or later)
Student t
• $P(t) = \cfrac{1}{\sqrt{n\ π}}\ \cfrac{Γ\left (\cfrac{n+1}{2} \right )}{Γ\left (\cfrac{n}{2} \right )}\ \left (1+\cfrac{t^2}{n} \right )^{-(n+1)/2}$
where $n ≥ 0.25$ (available in Build 137 or later)

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

### 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 Only available in Build 137 or later. 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

Insert into Configuration file

Sort either by DLL or Group.

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