Skip to content

Commit 7603440

Browse files
committed
Deploying to gh-pages from @ a733ceb 🚀
1 parent 1c00bd8 commit 7603440

File tree

4 files changed

+115
-115
lines changed

4 files changed

+115
-115
lines changed

operation/algorithm/prediction/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3772,7 +3772,7 @@ <h3 id="expected-change-in-glucose-for-each-loop-interval">Expected Change in Gl
37723772
<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><abbr title="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>
37733773
<p><img alt="rate of bg change" src="../img/derivative.png" /></p>
37743774
<p>The insulin effect for a given dose can be expressed mathematically:</p>
3775-
<div class="arithmatex">\[ \Delta BG_{dose}[t] = IS\text{F}[t_{dose}] \times IA_{dose}[t] \]</div>
3775+
<div class="arithmatex">\[ \Delta BG_{dose}[t] = \mathit{IS}\mathit{F}[t_{dose}] \times IA_{dose}[t] \]</div>
37763776
<p>where <span class="arithmatex">\(\Delta BG_{I}\)</span> is the expected change in glucose due to insulin with the units (mg/dL/5min), <abbr title="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 <abbr title="Endogenous Glucose Production: glucose produced by the body from its reserves (mainly glycogen in the liver)">EGP</abbr>.</p>
37773777
<h3 id="insulin-effect-on-glucose-over-time">Insulin Effect on Glucose Over Time<a class="headerlink" href="#insulin-effect-on-glucose-over-time" title="Anchor link to this Header on this Page">&para;</a></h3>
37783778
<p>For this example, assuming a user’s glucose was 205 mg/dL at the time of insulin delivery, <em><abbr title="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>
@@ -3824,12 +3824,12 @@ <h3 id="linear-carbohydrate-absorption">Linear Carbohydrate Absorption<a class="
38243824
<h3 id="dynamic-carbohydrate-absorption">Dynamic Carbohydrate Absorption<a class="headerlink" href="#dynamic-carbohydrate-absorption" title="Anchor link to this Header on this Page">&para;</a></h3>
38253825
<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 (<abbr title="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>
38263826
<div class="arithmatex">\[
3827-
\text{IC}\text{E}[t] = \Delta BG_{O}[t] - \Delta BG_{I}[t]
3827+
\mathit{IC}\mathit{E}[t] = \Delta BG_{O}[t] - \Delta BG_{I}[t]
38283828
\]</div>
38293829
<p>where, <abbr title="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, <span class="arithmatex">\(\Delta BG_{O}\)</span> is the observed change in glucose (mg/dL/5min) at time <em>t</em>, and <span class="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>
38303830
<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, <abbr title="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><abbr title="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>
38313831
<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>
3832-
<div class="arithmatex">\[ AC[t] = \text{IC}\text{E}[t] \times \frac{CIR[t_{meal}]}{IS\text{F}[t_{meal}]} \]</div>
3832+
<div class="arithmatex">\[ AC[t] = \mathit{IC}\mathit{E}[t] \times \frac{CIR[t_{meal}]}{\mathit{IS}\mathit{F}[t_{meal}]} \]</div>
38333833
<p>where AC is the number of carbohydrates absorbed (g/5min), <abbr title="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 <abbr title="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>
38343834
<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>
38353835
<div class="arithmatex">\[ MAR[t = 12pm] = \frac{ 72g }{ 1.5 \times 4hr } = 12 \frac{ g }{ hr } = 1 \frac{ g }{ 5min } \]</div>
@@ -3852,7 +3852,7 @@ <h3 id="minimum-carbohydrate-absorption-rate">Minimum Carbohydrate Absorption Ra
38523852
<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>
38533853
<h3 id="modeling-remaining-active-carbohydrates">Modeling Remaining Active Carbohydrates<a class="headerlink" href="#modeling-remaining-active-carbohydrates" title="Anchor link to this Header on this Page">&para;</a></h3>
38543854
<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><abbr title="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>
3855-
<div class="arithmatex">\[ \Delta BG_{C}[t] = MAR[t] \times \frac{IS\text{F}[t_{meal}]}{CIR[t_{meal}]} \]</div>
3855+
<div class="arithmatex">\[ \Delta BG_{C}[t] = MAR[t] \times \frac{\mathit{IS}\mathit{F}[t_{meal}]}{CIR[t_{meal}]} \]</div>
38563856
<h2 id="retrospective-correction-effect">Retrospective Correction Effect<a class="headerlink" href="#retrospective-correction-effect" title="Anchor link to this Header on this Page">&para;</a></h2>
38573857
<div class="admonition note">
38583858
<p>The retrospective correction effect allows the <em><abbr title="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
38623862
<div class="arithmatex">\[ BG_{vel}=\frac{1}{6} \times \left(BG[0] - RF[0]\right) \]</div>
38633863
<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>
38643864
<p>The retrospective correction effect can be expressed mathematically:</p>
3865-
<div class="arithmatex">\[ \Delta BG_{R\text{C}}[t] = BG_{vel} \times \left(1-\frac{t-5}{55}\right) \]</div>
3865+
<div class="arithmatex">\[ \Delta BG_{\mathit{R}\mathit{C}}[t] = BG_{vel} \times \left(1-\frac{t-5}{55}\right) \]</div>
38663866
<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>
38673867
<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>
38683868
<table>
@@ -4015,7 +4015,7 @@ <h2 id="glucose-momentum-effect">Glucose Momentum Effect<a class="headerlink" hr
40154015
<p>It is also worth noting that <em><abbr title="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 <abbr title="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 <abbr title="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 <abbr title="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>
40164016
<h2 id="predicting-glucose">Predicting Glucose<a class="headerlink" href="#predicting-glucose" title="Anchor link to this Header on this Page">&para;</a></h2>
40174017
<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>
4018-
<div class="arithmatex">\[ \Delta BG[t] = \Delta BG_{M}[t] + \left(\Delta BG_{I}[t] + \Delta BG_{C}[t]+ \Delta BG_{R\text{C}}[t] \right) \times min\left(\frac{t-5}{15}, 1\right) \]</div>
4018+
<div class="arithmatex">\[ \Delta BG[t] = \Delta BG_{M}[t] + \left(\Delta BG_{I}[t] + \Delta BG_{C}[t]+ \Delta BG_{\mathit{R}\mathit{C}}[t] \right) \times min\left(\frac{t-5}{15}, 1\right) \]</div>
40194019
<p>Lastly, the predicted glucose BG at time <em>t</em> is the current glucose BG plus the sum of all glucose effects <span class="arithmatex">\(\Delta BG\)</span> over the time interval <span class="arithmatex">\([t_{5}, t]\)</span>:</p>
40204020
<div class="arithmatex">\[ \widehat{BG}[t] = BG[t_{o}] + \sum_{i=5}^{t} \Delta BG[t_{o+i}] \]</div>
40214021
<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>

search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)