The flow limitation is an adaptation of the ResMed flattening index which is a mathematical formula for calculating the flatness of an inhalation.
The algorithm searches for inhalations in the nasal pressure signal.
An average breath is calculated and then the first 25% and last 25% of the inhalation is removed and the difference from the calculated average is found.
Then for each inhalation a threshold is applied, if the inhalation is below the threshold the inhalation is considered flow limited.
More specifically the range of the formula is 0.0 = completely flat breath to 0.3 = perfect breathing pattern (perfect sine wave).
The threshold for flow limitation is set based on the European Sleep Research Society description of the index.
Note: The algorithm has also its limitations as the flow limitation is not always flat but can have different effects on the inhalation pattern.