Back to basics.

108 views
Skip to first unread message

Mattrix

unread,
Jun 27, 2025, 1:32:33 PMJun 27
to OpenAPS Dev
Hi All,
I'm not sure this is the place for this question, I am not a facebook user (yet)

I think this question is about what OAPS calls IOB, but I've seen IOB defined differently in different places.
I subdivide insulin in my body into 2 parts, insulin in the injection depot (often called a pocket) and insulin released into the body fluids and has a therapeutic effect.
So as an MDI user, I inject into the pocket, the amount of insulin in the pocket decays exponentially, the released insulin goes into my body fluids. The quantity of insulin released into my body is dependant on the quantity of insulin in the pocket.

To rephrase that, IF I maintain 5 units in the pocket with a pump, a constant amount of insulin will be released into my body fluids per minute (ie basal insulin) and the pump will need to replenish that released insulin.
Now, to double my basal rate I will need 10 units in the pocket, and the pump will be required to provide way more insulin than what is released into my body, until the insulin in the pocket has reached 10 units.

So OAPS is really managing the insulin in the pocket.

As I understand it, OAPS tells the pump to increase the basal rate, so the profile of actual insulin put into the pocket is determined by the pump's internal algorithm. I would expect a reasonable pump would quickly fill the pocket but will need to let the pocket insulin decay at the end of the temporary basal rate increase. How long is an OAPS temp basal command for?
BUT not all (any) pumps are reasonable. I have become used to medical equipment lieing to you about what they see/are doing.

Pump operation:
inulin-graphs.png
In this graph basal insulin starts at ~0.01 U/min increases to a temp basal of ~0.055 U/min lasting 270 minutes. It actually peaks at 1.5 U/min. I have not considered the delay in formation of monomers, I'm not sure what to do about this.

The figures I have used are a little contrived. The AUC between the basal and pocket insulin is approx 9 units, so the pump could be using this profile for a 9 unit bolus.

The grids in the graph are 45 min apart, which is the 'half time' i have used in preparing the chart. I use half times as I find DIA to vary according to dose. Consider that I inject (not pump) a 9 unit bolus and I find the insulin left at 5.5 'half times' to have no effect, but if I had taken an 18 unit bolus it will take an extra half time to get to the same amount of insulin left. Though a pump can manipulate this so that they end at the same time, ie start to decay earlier.

Sorry this became so wordy, I have used it as a soapbox to organise my thoughts. Also I'm sorry if this is the wrong place for this post.
matt


Scott Leibrand

unread,
Jun 27, 2025, 1:48:15 PMJun 27
to opena...@googlegroups.com
I think the depots/pockets are a lot smaller with pumps than with MDI, as boluses are smaller and slower. Maybe closer to 1-2 units instead of 5. I think some people deal with the initial pocket-filling after a new pump site insertion with a small fixed prime of additional insulin that's not counted as bolus or basal.

MDT pumps do 30m temp basals. They're actually delivered as a series of small pulses/boluses every X minutes to achieve the programmed basal rate.

I think most of the dynamics you're describing are accounted for in practice by initial lag in the DIA curves.

-Scott

--
You received this message because you are subscribed to the Google Groups "OpenAPS Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openaps-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/openaps-dev/fb1311e5-0f95-4e26-ba14-e203e21e4368n%40googlegroups.com.

Mattrix

unread,
Jul 1, 2025, 4:24:38 AMJul 1
to OpenAPS Dev
Thanks Scott,

From what I can see the only command OAPS issues to the pump is to set a temp basal rate?

So the pump is actually managing the pocket insulin, ie OAPS wants a different basal rate, what do I (the pump) have to put into the pocket to acheive that.
If the temp basal duration is 30min and the pump must be prepared to return to the programmed basal at the end of that 30 min, then the maximum temp basal will be ~60% greater than the programmed basal. Unless I have stuffed up the math (I assume a 'half time' of 45 min).
I don't see any way to get around the 'decay period' when going to a lesser  basal rate.

Of course, OAPS can extend the duration of the temp bolus by reissuing the command, but the pump must make the same decisions each time you do.

matt

Scott Leibrand

unread,
Jul 1, 2025, 4:34:03 AMJul 1
to opena...@googlegroups.com, Dev OpenAPS
If you ask for a 1U/hr basal (temp or scheduled), and are using a pump with a tick of 0.05U, then it will tick its stepper motor once every 3 minutes to achieve the requested rate. The pump doesn’t care about the pocket/depot. It just does what it’s told. 

The algorithm deciding what temp basal to set has to take into account the insulin on board (both what is in the depot and what is in circulation). The pharmacokinetics/pharmacodynamics of insulin are measured empirically, and such measurements allow us to estimate (via the insulin decay curve) the net effect of all the physiological elements that go into delayed insulin activity.

Scott

On Jul 1, 2025, at 1:24 AM, Mattrix <matt...@gmail.com> wrote:

Thanks Scott,

mattrix

unread,
Jul 1, 2025, 11:54:36 AMJul 1
to opena...@googlegroups.com

If you ask for a 1U/hr basal (temp or scheduled), and are using a pump with a tick of 0.05U, then it will tick its stepper motor once every 3 minutes to achieve the requested rate. The pump doesn’t care about the pocket/depot. It just does what it’s told. 

Sorry Scott, I just can not see that. The circulating insulin response to a change in basal would be far too slow.
 
The algorithm deciding what temp basal to set has to take into account the insulin on board (both what is in the depot and what is in circulation). The pharmacokinetics/pharmacodynamics of insulin are measured empirically, and such measurements allow us to estimate (via the insulin decay curve) the net effect of all the physiological elements that go into delayed insulin activity.

Do you document some where the experiments/tests that you use to empirically determine the PK and PD parameters?

For the PK,
Insulin in the depot, (I presume this is hexameric insulin)
+ insulin in circulation, (unbound monomeric insulin)
+insulin bound to receptors, (the therapeutic insulin at t)
+ insulin degraded/cleared, (I don't have access to papers that document this)
= be constant equal to the dose

The PD would depend on the individual, IR etc, and the bound insulin.

matt 


Scott Leibrand

unread,
Jul 1, 2025, 12:00:53 PMJul 1
to opena...@googlegroups.com
If something works in practice but not in theory, your theory likely is missing something. 
 
 
The original translational research was documented on an issue in the Loop repo, and then used in multiple open source AID systems. 

-Scott
--
You received this message because you are subscribed to the Google Groups "OpenAPS Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openaps-dev...@googlegroups.com.

Tim Street

unread,
Jul 1, 2025, 12:40:35 PMJul 1
to opena...@googlegroups.com
Some of the assumptions inherent in this statement may also need reassessing.

For the PK,
Insulin in the depot, (I presume this is hexameric insulin)
+ insulin in circulation, (unbound monomeric insulin)
+insulin bound to receptors, (the therapeutic insulin at t)
+ insulin degraded/cleared, (I don't have access to papers that document this)
= be constant equal to the dose

The analogue rapid insulins are designed to be held with significantly higher monomer concentrations than traditional hexameric insulin, and thus have higher availability (this is why they have the amino acid modifications after which they are named).

Additionally, the absorption is related to surface area of the pocket compared to volume. As larger doses are given, the surface area per unit volume decreases, reducing the rate of absorption. 

While PD does have an individual response, the documentation suggests that the range of variation within an individual across sites is as large as (possibly larger than) the variation between individuals, so any model is just that. It's a model that we have to work with. The models used in the Open Source AID systems all came from the data that manufacturers created based on testing across multiple subjects, which is widely available. In addition, the bespoke peak and dia models allow a user some ability to modify the curves to better for themselves. 

There are also a very few papers from manufacturers suggesting that a model that adjusts DIA with dosing size is the real case (as per the surface area/volume ratio point earlier), however, the data points are limited, and while this model has been added into experimental variations of AndroidAPS, many of us are not convinced that it's quite right. 

Hope some of that helps. 

Mattrix

unread,
Jul 8, 2025, 3:37:16 AMJul 8
to OpenAPS Dev
 Wow, this is a long way from my initial post.
I'm sorry that I interpreted "empirically" so narrow. I took it to mean 'individual observations' and to exclude formal studies. Is there a repository of the study data that has been used in OAPS? Many of the links from github no longer work.


Some of the assumptions inherent in this statement may also need reassessing.

Yeah, lots of assumptions here.
My, probably over simplified, model is

Injection depot -> body fluids <=> receptors on cells
                                     \/
                               clearance in kidney and liver
                   
I do assume:
- Insulin in vials is hexameric, as this form is more stable for transport and storage. Most (all?) insulin preparations contain zinc ions to promote hexamers. Modifications to the b-chain or the excipients modify the ease of disassociation in the injection pocket.
- that monomers are rapidly distributed into the body fluids. (relatively speaking)
- that the insulin decay curve describes the hexamer (not water soluble) to monomer (water soluble) disassociation.
- that a  good proportion of the released monomers will be bound to receptors on the cell and not found in the plasma as free insulin, which is what is measured in clamp studies. (VOD is .44 L/KG)

Are these reasonable assumptions? Are there any others?
Reply all
Reply to author
Forward
0 new messages