functiontransition_factor
Extends from Modelica.Icons.Function (Icon for functions).
Information
DESCRIPTION:
This function returns a value between 1 and 0. A smooth transition is achieved by means of defining the position and the transition intervall from start to stop parameter. Outside this intervall, the 1 and the 0 are returned, respectively. This transition function with up to two smooth derivatives was taken from [1]. If you provide an order higher than 2, the generalised logistic function[2] will be used to calculated the transition curve.
OUTPUT:
tFactor = smooth transition between 0 and 1 from start to stop [-]
Use tFactor in an equation like this:
tFactor = transition_factor(start=start,stop=stop,position=position); smoothed = tFactor*1stValue + (1 - tFactor)*2ndValue;
REFERENCES:
[1] Christoph C Richter, Proposal of New Object-Oriented Equation-Based Model Libraries for Thermodynamic Systems, PhD thesis, Technical University Carolo-Wilhelmina Braunschweig, 2008
[2] Generalised logistic function on Wikipedia
IMPLEMENTATION:
Implemented in 2012 for Technical University of Denmark, DTU Mechanical Engineering, Kongens Lyngby, Denmark by Jorrit Wronski (jowr@mek.dtu.dk)
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | start | 0.25 | start of transition interval |
| Real | stop | 0.75 | end of transition interval |
| Real | position | 0.0 | current position |
| Integer | order | 2 | Smooth up to which derivative? |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | tFactor | weighting factor |