Skip to content

Commit 1747261

Browse files
committed
update algorithm section, use glucose instead of blood glucose
1 parent db25762 commit 1747261

File tree

4 files changed

+113
-74
lines changed

4 files changed

+113
-74
lines changed

docs/operation/algorithm/bolus.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,33 @@ Loop will recommend bolus insulin corrections when the eventual blood glucose is
44

55
These recommendations are not proactively sent to the Loop user through any notification or banner alert; the recommendation is only viewable when the user clicks on the bolus tool. Note that Loop never issues a bolus command automatically while using the default Temp Basal [Dosing Strategy](../../loop-3/settings.md#dosing-strategy); all boluses are initiated by the user unless the [Automatic Bolus](../../loop-3/settings.md#automatic-bolus) dosing strategy is enabled. With automatic bolus enabled, each automatic bolus is limited to 40% of the recommended amount or the maximum bolus setting, whichever is smaller.
66

7-
The bolus dose calculation is identical to the dose equation given in the basal recommendations section, with the exception that:
7+
The bolus dose calculation is identical to the dose equation given in the [Determine the Temporary Basal Rate section](temp-basal.md#determine-the-temporary-basal-rate){: target="_blank" }, with these exceptions:
88

99
* the insulin contribution from the currently running temporary basal set by Loop is removed or subtracted from the recommended bolus amount, and
1010
* the delta is calculated for the top of the correction range, rather than the average of the correction range.
1111

12-
For recently saved carbohydrates where the projected carbohydrate absorption will outlast the insulin activity duration (e.g., very slow-digesting meals like pizza or pasta), Loop’s algorithm will inherently decrease the initial meal bolus — to prevent hypoglycemia events that often occur after these meals — by only recommending enough bolus to prevent minimum predicted glucose from going below the suspend threshold. As described above, the Loop algorithm computes the recommended bolus such that predicted glucose will not dip below the suspend threshold. This may result in future blood glucose levels predicted above correction range, but will prevent a hypoglycemia event shortly after the meal (as it sometimes occurs for people giving a "pizza bolus" in traditional pump therapy). Loop will then later make corrections by issuing a command to temporarily [Increase Basal Rate](temp-basal.md#increase-basal-rate) or provide an automatic bolus. In effect, this algorithm behavior mimics traditional pump therapy of “extended” or “dual wave” bolusing, but with the benefit of added information about actual carbohydrate absorption effects as time goes by.
12+
### Slow Absorption Time (Extended Bolus)
13+
14+
For recently saved carbohydrates with longer absorption time, e.g., very slow-digesting meals like pizza or pasta, Loop’s algorithm provides an initial meal bolus less than the simple grams divided by carbohydrate ratio calculation for [Carbohydrate Effect](prediction.md#carbohydrate-effect){: target="_blank" }.
15+
16+
The *Loop* algorithm computes the recommended bolus such that predicted glucose will not dip below the Glucose Safety Limit. This may result in future blood glucose levels predicted above correction range, but will prevent a hypoglycemia event shortly after the meal.
17+
18+
* As time progresses after the meal, when appropriate, *Loop* modifies insulin delivery
19+
* A decrease in recommended insulin amount is always provided as a decreased Temporary Basal rate
20+
* An increase in recommended insulin amount is delivered based on the user-selected [Dosing Strategy](../../loop-3/settings.md#dosing-strategy){: target="_blank" }:
21+
* Temp Basal Only: [Increase Basal Rate](temp-basal.md#increase-basal-rate){: target="_blank" }
22+
* Automatic Bolus: 40% of the recommended amount
23+
* In effect, this algorithm behavior mimics traditional pump therapy of “extended” or “dual wave” bolusing, but with the benefit of added information about actual carbohydrate absorption effects as time goes by
1324

1425
Finally, Loop checks that the result of the calculations is below the maximum single bolus the Loop user specified in their settings. If the calculated bolus is less than the maximum single bolus setting, then the recommended bolus will be displayed in Loop’s bolus tool.
1526

1627
!!! info "Bolusing safety feature"
1728

18-
If the current blood glucose, or any predicted blood glucose, falls below the suspend threshold, Loop will not return a recommended bolus. When the minimum blood glucose rises above the suspend threshold, the bolus tool will provide a recommended bolus.
29+
If the current blood glucose, or any predicted blood glucose, falls below the Glucose Safety Limit, Loop will not return a recommended bolus. When the minimum blood glucose rises above the Glucose Safety Limit, the bolus tool will provide a recommended bolus.
1930

2031
## Algorithm Section Menu
2132

2233
* [Algorithm Overview](overview.md)
2334
* [Bolus Recommendations](bolus.md)
24-
* [Blood Glucose Prediction](prediction.md)
35+
* [Glucose Prediction](prediction.md)
2536
* [Temp Basal Adjustments](temp-basal.md)
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Loop Algorithm
22

3-
Loop’s algorithm for adjusting insulin delivery is oriented around making a blood glucose prediction and modifying delivery to bring that prediction within target range without going below the Glucose Safety Limit. Every five minutes, triggered by new blood glucose data, it generates a new prediction. Both [bolus recommendations](bolus.md) and [temporary basal rate adjustments](temp-basal.md) are set based on this [prediction](prediction.md).
3+
Loop’s algorithm for adjusting insulin delivery is oriented around making a glucose prediction and modifying delivery to bring that prediction within target range without going below the Glucose Safety Limit. Every five minutes, triggered by new glucose data, it generates a new prediction. Both [bolus recommendations](bolus.md) and [temporary basal rate adjustments](temp-basal.md) are set based on this [prediction](prediction.md).
44

55
!!! abstract "Glucose Prediction"
66
The *prediction* is a calculation based on the known parameters of current and historical glucose values, current and historical insulin delivery using any entered carbs. Loop's model predictive control (MPC) calculation includes the user's therapy settings modified by active overrides. This calculation is updated at the next glucose reading and the recommended insulin delivery may be updated.
@@ -10,30 +10,30 @@ Loop’s algorithm for adjusting insulin delivery is oriented around making a bl
1010
## Algorithm Terminology
1111

1212
This graph and legend illustrates terms commonly used in discussing Loop's algorithm,
13-
and shows them in the context of historical and predicted blood glucose in style similar to the
13+
and shows them in the context of historical and predicted glucose in style similar to the
1414
status screen of Loop.
1515

1616
![Chart illustrating terms](img/terms_graph.png)
1717

1818
| | |
1919
|---------|---------|
20-
|Insulin activity duration|The insulin activity duration is the duration of the insulin activity curve, and describes the point at which the delivered insulin dose no longer affects blood glucose. The insulin activity duration is 6 hours for Loop's rapid-acting and ultra-rapid insulin models.|
21-
|Correction range|The correction range is the blood glucose range Loop uses to determine corrective actions (e.g., between 90 and 120 mg/dL in the figure). NOTE: Loop’s correction range is a user setting and should not be confused with the target range, typically 70-180 mg/dL, used for the purpose of calculating the percent time in range.|
20+
|Insulin activity duration|The insulin activity duration is the duration of the insulin activity curve, and describes the point at which the delivered insulin dose no longer affects glucose. The insulin activity duration is 6 hours for Loop's rapid-acting and ultra-rapid insulin models.|
21+
|Correction range|The correction range is the glucose range Loop uses to determine corrective actions (e.g., between 90 and 120 mg/dL in the figure). NOTE: Loop’s correction range is a user setting and should not be confused with the target range, typically 70-180 mg/dL, used for the purpose of calculating the percent time in range.|
2222
|Correction minimum|The lower or minimum value of the user’s correction range, which is 90 mg/dL in the figure.|
2323
|Correction maximum|The upper or maximum value of the user’s correction range, which is 120 mg/dL in the figure.|
2424
|Correction target|The correction target is the average value of the correction range. In the overview figure, this is 105 mg/dL given that the correction minimum is 90 mg/dL and the correction maximum is 120 mg/dL.|
25-
|Predicted blood glucose|Loop makes a prediction of blood glucose values out for a length of time equal to your insulin action duration. The predicted blood glucose is the basis for how Loop makes its insulin delivery recommendations and actions.|
26-
|Eventual blood glucose|The last value of the predicted glucose curve, in other words the very last blood glucose predicted at the end of your insulin action duration. In the figure above, this is 85 mg/dL.|
27-
|Minimum predicted blood glucose|The lowest blood glucose value at any point in time within the prediction. In the figure above, this is 77 mg/dL.|
28-
|Delta|The delta is the difference between the eventual blood glucose and the correction target. In the overview figure, the eventual blood glucose is 85 mg/dL and the correction target is 105 mg/dL, which means that the delta is -20 mg/dL. |
29-
|Suspend Threshold (Glucose Safety Limit)|The glucose safety limit (called suspend threshold when this figure was generated) is a safety feature of the Loop algorithm. If any predicted blood glucose is below this value, the Loop algorithm will issue a temporary basal rate of 0|
30-
|CGM data|Blood glucose readings made by a continuous glucose monitor.|
31-
|Insulin sensitivity factor|A configuration value that provides an estimate of how much blood glucose will drop given a unit of insulin.|
32-
|Active insulin|Active insulin, often referred to as Insulin-on-Board (IOB), is the remaining amount of insulin activity from boluses and temporary basal rates relative to a user’s scheduled basal rates. More specifically, it is the total amount of insulin activity due to all bolus and basal insulin delivered within the last N hours, where N is determined by the insulin activity duration. The amount of “active” insulin depends upon the insulin activity curve, and also accounts for the insulin withheld via basal suspensions. As such, it is possible that the active insulin can be negative. Negative active insulin will result in an increase in predicted blood glucose. The active insulin displayed in Loop's main display does not reflect the currently enacted temporary basal rate, as that basal rate may be canceled or modified before completion over the next 30 minutes. In others words, Loop doesn't count chickens before the eggs hatch...insulin delivery must be confirmed before being added to the active insulin reporting.|
25+
|Predicted glucose|Loop makes a prediction of glucose values out for a length of time equal to your insulin action duration. The predicted glucose is the basis for how Loop makes its insulin delivery recommendations and actions.|
26+
|Eventual glucose|The last value of the predicted glucose curve, in other words the very last glucose predicted at the end of your insulin action duration. In the figure above, this is 85 mg/dL.|
27+
|Minimum predicted glucose|The lowest glucose value at any point in time within the prediction. In the figure above, this is 77 mg/dL.|
28+
|Delta|The delta is the difference between the eventual glucose and the correction target. In the overview figure, the eventual glucose is 85 mg/dL and the correction target is 105 mg/dL, which means that the delta is -20 mg/dL. |
29+
|Suspend Threshold (Glucose Safety Limit)|The glucose safety limit (called suspend threshold when this figure was generated) is a safety feature of the Loop algorithm. If any predicted glucose is below this value, the Loop algorithm will issue a temporary basal rate of 0|
30+
|CGM data|Glucose readings made by a continuous glucose monitor.|
31+
|Insulin sensitivity factor|A configuration value that provides an estimate of how much glucose will drop given a unit of insulin.|
32+
|Active insulin|Active insulin, often referred to as Insulin-on-Board (IOB), is the remaining amount of insulin activity from boluses and temporary basal rates relative to a user’s scheduled basal rates. More specifically, it is the total amount of insulin activity due to all bolus and basal insulin delivered within the last N hours, where N is determined by the insulin activity duration. The amount of “active” insulin depends upon the insulin activity curve, and also accounts for the insulin withheld via basal suspensions. As such, it is possible that the active insulin can be negative. Negative active insulin will result in an increase in predicted glucose. The active insulin displayed in Loop's main display does not reflect the currently enacted temporary basal rate, as that basal rate may be canceled or modified before completion over the next 30 minutes. In others words, Loop doesn't count chickens before the eggs hatch...insulin delivery must be confirmed before being added to the active insulin reporting.|
3333

3434
## Algorithm Section Menu
3535

3636
* [Algorithm Overview](overview.md)
3737
* [Bolus Recommendations](bolus.md)
38-
* [Blood Glucose Prediction](prediction.md)
38+
* [Glucose Prediction](prediction.md)
3939
* [Temp Basal Adjustments](temp-basal.md)

0 commit comments

Comments
 (0)