# Vensim Help

 Navigation: Reference Guide > Functions > Dynamic Functions SMOOTH N(input,delay time, initial value, order) N'th order exponential SMOOTH

Returns an N'th order exponential smooth.  If order is 1 this function is almost the same as SMOOTHI and if order is 3 it is almost the same as SMOOTH3I.

The SMOOTH N function is treated as a discrete delay function, so that its output is constant for each Time Step.  If you are using Euler or Diff integration this is true of all variables.  However, if you are using Runge-Kutta integration this is different from functions such as SMOOTH3.

The SMOOTH N function does not conserve quantities.  See DELAY N if you want to conserve flows..

Note that for the SMOOTH N function to make sense delay time must be bigger than order* TIMEĀ  STEP.  If this is not the case Vensim will issue a warning and automatically reduce the order so that this is true.  When this happens the behavior of the SMOOTH N function is essentially the same as the behavior of the DELAY INFORMATION function.

Restrictions: SMOOTH N must directly follow the equal sign.  It signals Vensim that the variable on the left-hand side of the equation is a Level or State variable.  In the Equation Editor select Variable type Level, subtype Delay/Queue and enter SMOOTH N as the function.

 Units: SMOOTH N( unit, time unit, unit, dmnl ) --> unit

Example (12th order Smooth)

perceived quality = SMOOTH N(quality,delay time,quality,12)

Sample model: SMOOTH 1 3 N.mdl in FunctionExamples