Skip to content

Commit caa0589

Browse files
authored
Merge pull request #2607 from je-l/dia
Add more manual-style description for the DIA configuration
2 parents 6983da5 + b52b9a2 commit caa0589

8 files changed

Lines changed: 49 additions & 24 deletions

File tree

‎docs/EN/AdvancedOptions/InsulinConcentration.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
(Insulin-Concentration)=
12
# Insulin Concentration
23

34
```{warning}

‎docs/EN/DailyLifeWithAaps/AapsScreens.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ Enable either one or both of the following options in [OpenAPS SMB settings](#Pr
147147

148148
If **AAPS** detects resistance or sensitivity, the target will change from what is set from profile, and the displayed target changes color to indicate the adjustment.
149149

150+
(aaps-screens-iob-cob-basal-sens)=
150151
#### IOB, COB, basal and sensitivity
151152

152153
![IOB, COB, basal and sensitivity](../images/Home2020_TBR.png)

‎docs/EN/SettingUpAaps/ConfigBuilder.md‎

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -126,39 +126,60 @@ More information to understand the Insulin Profile as shown in **AAPS** [here](#
126126
* This effect profile is recommended if an unbacked insulin or a mixture of different insulins is used.
127127

128128
(Config-Builder-insulin-dia)=
129-
### Duration of insulin action (DIA)
129+
### Duration of insulin action (DIA) and peak
130130

131-
#### Description
131+
```{warning}
132+
In looping, decreasing DIA or peak will always increase administered insulin. DIA works differently in AAPS than in commercial AID systems and careless changes to these settings can change insulin dosing in a way which is much larger or smaller than expected.
133+
```
132134

133-
The length of time that insulin takes to decay to zero.
135+
AAPS models the timeline of insulin action with a mathematical formula, configured using **DIA** and the closely related **peak** settings. DIA is the theoretical duration until IOB reaches zero and peak is the timepoint when the effect of insulin is strongest. This yields an IOB curve and an activity curve, which is simply the **rate** of IOB decay.
134136

135-
The duration of insulin action is set to a single value per insulin type in **AAPS**, because your pump will continually infuse the same type of insulin.
137+
Consider that when AAPS is looping, it's normal to have periods of [zero-temping](#Open-APS-features-super-micro-bolus-smb). This missing basal insulin is fully subtracted from the IOB, explaining why IOB will in practice reach zero many hours earlier than the configured DIA. You can inspect [bolus IOB and basal IOB](#aaps-screens-iob-cob-basal-sens) separately from the main screen.
136138

137-
![Sample insulin Profile](../images/Screenshot_insulin_profile.png)
139+
To configure DIA and peak, tap **Manage** in the main screen, and then tap **Insulin**. AAPS displays the active insulin configuration like this:
138140

139-
This, together with the insulin type's peak time, results in the [insulin profile](#AapsScreens-insulin-profile), as shown in the image above. The important thing to note is that the decay has a **long tail**. If you have been used to manual pumping, you have probably been used to assuming that insulin decays over a much shorter period i.e. about 3.5 hours. However, when you are looping, the long tail matters as the calculations are far more precise and these small amounts add up when they are subjected to the recursive calculations in the **AAPS** algorithm. Therefore, **AAPS** uses a minimum of 5h as **DIA**.
141+
![Sample insulin configuration](../images/Screenshot_insulin_profile.png)
140142

141-
Additional reading on the topic of duration of insulin action, and why it matters :
142-
* [Understanding the New IOB Curves Based on Exponential Activity Curves](https://openaps.readthedocs.io/en/latest/docs/While%20You%20Wait%20For%20Gear/understanding-insulin-on-board-calculations.html#understanding-the-new-iob-curves-based-on-exponential-activity-curves) on OpenAPS documentation.
143-
* [Why we are regularly wrong in the duration of insulin action (DIA) times we use, and why it matters…](https://www.diabettech.com/insulin/why-we-are-regularly-wrong-in-the-duration-of-insulin-action-dia-times-we-use-and-why-it-matters/) on Diabettech.
144-
* [Exponential Insulin Curves + Fiasp](https://web.archive.org/web/20220630154425/http://seemycgm.com/2017/10/21/exponential-insulin-curves-fiasp/) on See My CGM (archive).
145-
* [Revised Humalog model in a closed loop](https://bionicwookiee.com/2022/04/13/revised-humalog-model-in-a-closed-loop/) and other articles on Bionic Wookie, recommending a DIA of 9h for Lyumjev, Fiasp, NovoRapid, Humalog.
143+
In this example, peak setting is 75 minutes, DIA is 8 hours and [insulin concentration](#Insulin-Concentration) is the standard 100 IU/mL.
144+
145+
Due to the influence of zero-temping explained above and the formula used for IOB decay in AAPS, most users set a clearly higher DIA than in commercial systems. In general, many people find that a **DIA** of 9h works well for them. After you have more experience with AAPS and have a well-tuned profile, you can try to find personalized DIA and peak settings with the information below.
146146

147-
#### Impact
148147

149-
Too short **DIA** can lead to low BGs. And vice versa.
148+
````{admonition} Details on the impact of DIA and peak configuration
149+
:class: dropdown
150150
151-
If **DIA** is too short, **AAPS** will calculate too early that your previous bolus is all consumed, and if your **BG** is still high, it will over-deliver in insulin. (Actually, it does not wait that long, but predicts what would happen, and keeps adding insulin). This essentially creates ‘insulin stacking’ that **AAPS** is unaware of. This is especially noticeable at night, if you see negative IOB with no other explanation than the queue of the last bolus.
151+
Since the basal rate has an indirect influence to IOB decay in AAPS, it follows that too high basal rates can mask too high DIA, and vice versa. It makes sense to first carefully tune basal rates before adjusting DIA and peak. Additionally, consider that the DIA and peak settings interact in sense that the effect of DIA depends on peak, and vice versa.
152152
153-
Example of a too-short **DIA** is a **high BG** followed by **AAPS** over-correcting and giving a **low BG**.
153+
These charts show the exact impact of DIA and peak to the IOB curves, across hard limits.
154154
155-
#### How to set it
155+
Adjusting DIA:
156156
157-
The **figure below** shows an example of a DIA setting.
157+
```{image} ../images/iob_remaining_static_peak.png
158+
:width: 400px
159+
```
160+
161+
Adjusting peak:
162+
163+
```{image} ../images/iob_remaining_static_dia.png
164+
:width: 400px
165+
```
158166
159-
![DIA](../images/Profile_DIA.png)
167+
Finally, a comparison adjusting DIA and peak in parallel. The logic here is that both values are adjusted in same relative amounts, so that `49/35 ~ 7/5`. Or similarly, `120/93 ~ 9/7`. The intervals will be consistent regardless of the baseline DIA or peak, as long as the relative change is same for both.
160168
161-
The **DIA** setting is often set too short by new users. A **DIA** of 6 or 7 is probably a good place to start. A growing number of people find that a **DIA** of 8 to 9 hours works well for them. See the additional reading mentioned above.
169+
```{image} ../images/iob_remaining_uniform.png
170+
:width: 400px
171+
```
172+
173+
Note that when DIA and peak are adjusted in this fashion, every point in the curve will shift by the same relative amount.
174+
175+
````
176+
177+
#### Further reading on DIA and peak configuration
178+
179+
* [Technical details and historical background from the AAPS predecessor, OpenAPS](https://openaps.readthedocs.io/en/latest/docs/While%20You%20Wait%20For%20Gear/understanding-insulin-on-board-calculations.html#understanding-the-new-iob-curves-based-on-exponential-activity-curves).
180+
* [Why we are regularly wrong in the duration of insulin action (DIA) times we use, and why it matters…](https://www.diabettech.com/insulin/why-we-are-regularly-wrong-in-the-duration-of-insulin-action-dia-times-we-use-and-why-it-matters/) on Diabettech.
181+
* [Exponential Insulin Curves + Fiasp](https://web.archive.org/web/20220630154425/http://seemycgm.com/2017/10/21/exponential-insulin-curves-fiasp/) on See My CGM (archive).
182+
* [Revised Humalog model in a closed loop](https://bionicwookiee.com/2022/04/13/revised-humalog-model-in-a-closed-loop/) and other articles on Bionic Wookie, recommending a DIA of 9h for Lyumjev, Fiasp, NovoRapid, Humalog.
162183

163184
(Config-Builder-bg-source)=
164185
## BG Source

‎docs/EN/SettingUpAaps/SetupWizard.md‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -278,15 +278,17 @@ In the editor you can give the insulin a **nickname** and set its **Peak** (in m
278278

279279
![Insulin editor](../images/setup-wizard/Wizard-Insulin-Novorapid.png)
280280

281-
```{admonition} Don't change the peak unless you know what you are doing
282-
:class: danger
283-
For advanced users or medical studies it is possible to define a customized insulin activity profile. Please don't change the peak unless you are an expert — usually the preset values work well for each branded insulin.
284-
```
285-
286281
Pick the preset that matches your insulin, for example **Fiasp**:
287282

288283
![Insulin Fiasp](../images/setup-wizard/Wizard-Insulin-Fiasp.png)
289284

285+
```{admonition} Tap your insulin brand and use the given preset for peak.
286+
:class: danger
287+
Please don't change the peak unless you are an expert — usually the preset values work well for each branded insulin.
288+
```
289+
290+
If you are a new AAPS user, set DIA to 9 hours. More details at [the DIA section of the docs](#Config-Builder-insulin-dia).
291+
290292
```{admonition} "Insulin configuration changed" dialog
291293
:class: note
292294
If a paired client (_e.g._ another phone) has changed the insulin configuration, a dialog appears. Press **OK** to load their changes, or **Cancel** to keep editing (your next save will overwrite theirs).

‎docs/EN/images/Profile_DIA.png‎

-78.3 KB
Binary file not shown.
91.4 KB
Loading
81.9 KB
Loading
98.6 KB
Loading

0 commit comments

Comments
 (0)