You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: operation/algorithm/prediction/index.html
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -3772,7 +3772,7 @@ <h3 id="expected-change-in-glucose-for-each-loop-interval">Expected Change in Gl
3772
3772
<p>Lastly, taking the first derivative (i.e., the rate of change) of the cumulative drop in the glucose curve yields the expected change in glucose over the insulin activity duration. For each dose of insulin given, <em><abbrtitle="With a capital L, Loop is one of several do-it-yourself artifical pancreas systems">Loop</abbr></em> calculates the expected discrete drop in glucose at each 5-minute period for the insulin activity duration, as shown below.</p>
3773
3773
<p><imgalt="rate of bg change" src="../img/derivative.png" /></p>
3774
3774
<p>The insulin effect for a given dose can be expressed mathematically:</p>
<p>where <spanclass="arithmatex">\(\Delta BG_{I}\)</span> is the expected change in glucose due to insulin with the units (mg/dL/5min), <abbrtitle="Insulin Sensitivity Factor; how many points your blood sugar will drop for each unit of insulin; sometimes called Correction Factor">ISF</abbr> is the insulin sensitivity factor (mg/dL/U) at the time of the relevant dose, and IA is the insulin activity (U/5min) at time <em>t</em>. Insulin activity can also be thought of as a velocity or rate of change in insulin in the blood as it acts on glucose. Insulin activity explicitly accounts for active insulin from temporary basals and boluses, and implicitly accounts for scheduled basal which is assumed to balance out with <abbrtitle="Endogenous Glucose Production: glucose produced by the body from its reserves (mainly glycogen in the liver)">EGP</abbr>.</p>
3777
3777
<h3id="insulin-effect-on-glucose-over-time">Insulin Effect on Glucose Over Time<aclass="headerlink" href="#insulin-effect-on-glucose-over-time" title="Anchor link to this Header on this Page">¶</a></h3>
3778
3778
<p>For this example, assuming a user’s glucose was 205 mg/dL at the time of insulin delivery, <em><abbrtitle="With a capital L, Loop is one of several do-it-yourself artifical pancreas systems">Loop</abbr></em> would predict a drop in glucose due to the two units delivered at 12 pm as shown in the figure below.</p>
<h3id="dynamic-carbohydrate-absorption">Dynamic Carbohydrate Absorption<aclass="headerlink" href="#dynamic-carbohydrate-absorption" title="Anchor link to this Header on this Page">¶</a></h3>
3825
3825
<p>The linear model above is modulated by an additional calculation that uses recently observed glucose data to estimate how fast carbohydrates have been absorbing. The expected change in glucose due to insulin effects alone is compared to the actual observed changes in glucose. This difference is termed the insulin counteraction effect (<abbrtitle="Insulin Counteraction Effect - Refers to the difference between observed change in blood glucose and the change in blood glucose that Loop models based on the effects of insulin.">ICE</abbr>):</p>
<p>where, <abbrtitle="Insulin Counteraction Effect - Refers to the difference between observed change in blood glucose and the change in blood glucose that Loop models based on the effects of insulin.">ICE</abbr> (mg/dL/5 min) is the insulin counteraction effect, <spanclass="arithmatex">\(\Delta BG_{O}\)</span> is the observed change in glucose (mg/dL/5min) at time <em>t</em>, and <spanclass="arithmatex">\(\Delta BG_{I}\)</span> is the modelled change in glucose due to insulin alone (i.e. the insulin effect as described above mg/dL/5min).</p>
3830
3830
<p>Insulin counteraction effects are caused by more than just carbohydrates, and can include exercise, sensitivity changes, or incorrectly configured insulin delivery settings (e.g., basal rate, <abbrtitle="Insulin Sensitivity Factor; how many points your blood sugar will drop for each unit of insulin; sometimes called Correction Factor">ISF</abbr>, etc.). However, since the effect of carbohydrates is often dominant (after insulin), <em><abbrtitle="With a capital L, Loop is one of several do-it-yourself artifical pancreas systems">Loop</abbr></em> can still make useful ongoing adjustments to its carbohydrate model by assuming that the increase in glucose is mainly carbohydrate absorption in the period following recorded meal entries. </p>
3831
3831
<p>The insulin counteraction effect is converted into an estimated carbohydrate absorption amount by using both the carbohydrate-to-insulin ratio and the insulin sensitivity factor that were current at the time of a recorded meal entry.</p>
<p>where AC is the number of carbohydrates absorbed (g/5min), <abbrtitle="Insulin Counteraction Effect - Refers to the difference between observed change in blood glucose and the change in blood glucose that Loop models based on the effects of insulin.">ICE</abbr> is the insulin counteraction effect, CIR is the carbohydrate-to-insulin ratio (g/U) at the time of the relevant meal entry, and <abbrtitle="Insulin Sensitivity Factor; how many points your blood sugar will drop for each unit of insulin; sometimes called Correction Factor">ISF</abbr> is the insulin sensitivity factor (mg/dL/U) at the time of the relevant meal entry.</p>
3834
3834
<p>If multiple meal entries are active (i.e., still absorbing), the estimated absorption is split between each carbohydrate entry in proportion to each carbohydrate entry’s minimum absorption rate. For example, if 72g carbohydrates with an expected absorption time of 4 hours was consumed at 12 pm, and another 72g of carbohydrates with an expected absorption time of 2 hours was consumed at 3 pm, then the minimum absorption rate (see MAR equation above) would be 12 g/hr and 6 g/hr respectively, or 1 g/5min and 0.5 g/5min.</p>
@@ -3852,7 +3852,7 @@ <h3 id="minimum-carbohydrate-absorption-rate">Minimum Carbohydrate Absorption Ra
3852
3852
<p>If the dynamically-estimated carbohydrate absorption of a meal entry up to the current time <em>t</em> is less than what would have been absorbed using the minimum absorption rate, then the minimum absorption rate is used instead. This is to ensure that meal entries expire in a reasonable amount of time.</p>
3853
3853
<h3id="modeling-remaining-active-carbohydrates">Modeling Remaining Active Carbohydrates<aclass="headerlink" href="#modeling-remaining-active-carbohydrates" title="Anchor link to this Header on this Page">¶</a></h3>
3854
3854
<p>After the estimated absorbed carbohydrates have been subtracted from each meal entry, the remaining carbohydrates (for each entry) are then predicted to decay or absorb using the minimum absorption rate. <em><abbrtitle="With a capital L, Loop is one of several do-it-yourself artifical pancreas systems">Loop</abbr></em> uses this prediction to estimate the effect (active carbohydrates, or carbohydrate activity) of the remaining carbohydrates. The carbohydrate effect can be expressed mathematically using the terms described above:</p>
<h2id="retrospective-correction-effect">Retrospective Correction Effect<aclass="headerlink" href="#retrospective-correction-effect" title="Anchor link to this Header on this Page">¶</a></h2>
3857
3857
<divclass="admonition note">
3858
3858
<p>The retrospective correction effect allows the <em><abbrtitle="With a capital L, Loop is one of several do-it-yourself artifical pancreas systems">Loop</abbr></em> algorithm to account for effects that are not modeled with the insulin and carbohydrate effects, by comparing historical predictions to the actual glucose.</p>
@@ -3862,7 +3862,7 @@ <h2 id="retrospective-correction-effect">Retrospective Correction Effect<a class
<p>where BG<em>vel</em> is a velocity term (mg/dL per 5min) that represents the average glucose difference between the retrospective prediction (RF) and the actual glucose (BG) over the last 30 minutes. This term is applied to the current prediction from the insulin and carb effects with a linear decay over the next hour. For example, the first prediction point (t=5) is 100% of this velocity, the prediction point one-half hour from now is adjusted by approximately 50% of the velocity, and points from one hour or more in the future are not affected by this term.</p>
3864
3864
<p>The retrospective correction effect can be expressed mathematically:</p>
<p>where BG is the predicted change in glucose with the units (mg/dL/5min) at time <em>t</em> over the time range of 5 to 60 minutes, and the other term gives the percentage of BG<em>vel</em> that is applied to this effect.</p>
3867
3867
<p>The retrospective correction effect can be illustrated with an example: if the BG<em>vel</em> over the past 30 minutes was -10 mg/dL per 5min, then the retrospective correction effect over the next 60 minutes would be as follows:</p>
<p>It is also worth noting that <em><abbrtitle="With a capital L, Loop is one of several do-it-yourself artifical pancreas systems">Loop</abbr></em> will not calculate glucose momentum in instances where <abbrtitle="continuous glucose monitor, wearable medical device that measures and reports glucose in interstitial fluid">CGM</abbr> data is not continuous (i.e., must have at least three continuous <abbrtitle="continuous glucose monitor, wearable medical device that measures and reports glucose in interstitial fluid">CGM</abbr> readings to draw the best-fit straight line trend). It also will not calculate glucose momentum when the last three <abbrtitle="continuous glucose monitor, wearable medical device that measures and reports glucose in interstitial fluid">CGM</abbr> readings contain any calibration points, as those may not be representative of true glucose momentum trends.</p>
4016
4016
<h2id="predicting-glucose">Predicting Glucose<aclass="headerlink" href="#predicting-glucose" title="Anchor link to this Header on this Page">¶</a></h2>
4017
4017
<p>As described in the momentum effect section, the momentum effect is blended with the insulin, carbohydrate, and retrospective correction effects to predict the change in glucose:</p>
<p>Lastly, the predicted glucose BG at time <em>t</em> is the current glucose BG plus the sum of all glucose effects <spanclass="arithmatex">\(\Delta BG\)</span> over the time interval <spanclass="arithmatex">\([t_{5}, t]\)</span>:</p>
<p>Each individual effect along with the combined effects are illustrated in the figure below. As shown, glucose is trending slightly upwards at the time of the prediction. Therefore, the glucose momentum effect’s contribution is pulling up the overall prediction from the other three effects for a short time. Retrospective correction is lowering the current prediction, indicating that the recent rise in glucose was not as great as had been predicted in the recent past.</p>
0 commit comments