Skip to content

Libre value smoothing

Johan Degraeve edited this page Nov 13, 2020 · 13 revisions

Libre value smoothed with xDrip4iOS.

Libre values are usually not smooth. Goal is to smoothen the values.

Smoothening happens on the first 16 per minute values that the Libre sends.

Also the 32 per 15 minutes values will be smoothed but these will only be used if the app did not read values for more than 15 minutes.

If enabled, then xDrip4iOS uses Savitzky Golay with filterwidth 5 which is quite an agressive smoothing. When smoothing the values of 8 hours (maximum amount of readings that Libre can send), high peaks (or dips) may be strongly flattened. This would only be applicable if Libre hasn't been read for longer period. If the Libre is read every 5 minutes, then the smoothing of peaks will be less because it's per minute. When processing the last reading, then we don't know yet that the reading is a peak (or dip). The algorithm assumes that the readings will continue to go up or down at the same speed as the last 5 minutes. As a result, when reading every 5 minutes, smoothing will be less

The smoothing needs to be enabled in the developer settings.

Before using the resulting values, the existing readings of the last 10 minutes will be deleted, and then recreated using the new smoothed values. This is done to come with a more accurate result, because the resulting values at 10 and 5 minutes are smoothed based a full range of readings (and not values based on linear regression)

Sample smoothing result for 15 minutes of readings

This is an example of smoothing of 15 minutes of readings.

image 1

image 2

image 3

image 4

image 6