Dynamic ISF is all the buzz in the diabetic community at the moment, and so it should be! In the first few days of using it I was able to see marked improvements with little to no intervention as the algorithm scaled my correction doses.
What is Dynamic ISF
Your insulin sensitivity factor (ISF) is how much one unit of insulin will lower your blood glucose. Simply put dynamic ISF uses your total daily dose (TDD) of insulin to scale this value depending on blood sugar.
My results
So far the results have been astoundingly positive.
Before D-ISF : Average TDD: 30.1, Average Carbs :138gUsing D-ISF: Average TDD: 25.1, Average Carbs :102g
Update:
Using D-ISF for one (1) month. A little bit of an unfair test as I had 3 sensors fail during this period, which resulted in many issues with sensor accuracy.
Formula
ISF = 277700 / ( BG * TDD )
Differences in the GUI (when using DEV)
As you can see in the picture below, the yellow square highlights the time the loop last ran, and the red square shows the profile ISF vs. the calculated dynamic ISF.
Home screen of AAPS
It’s interesting to note that the D-ISF code isn’t implemented when using the calculator, its only actively scaling ISF using SMB’s (and maybe basal %). This will mean your normal profile ISF is going to be used when eating a meal. If you have never tested your ISF It may be worth while checking what the scaled ISF is at meal time (provided your BG is perfect) and setting your profile to that value if the values are vastly different. This is also providing that you aren’t in a period of significant resistance or sensitivity.
The Dynamic ISF plugin you will obtain in the config builder of the Dev code.
Where do I get a copy of the AAPS Dynamic ISF branch
It is in the same repository as the standard (master) version of AAPS. In order to use it you will need to select a different branch of AAPS (dev) and build that branch. I suggest you read Tim Streets repo notes for a more in depth description of the code and its functionality, even though you will not require the code from that repository. You will need to enable engineering mode on the phone in order to utilise the dev branch.
I decided to try using an automation to lower insulin levels and raise my glucose target before doing cardio. This allows AAPS to start this process at 05:30am on my days of choice so that my body is ready to exercise safely and with less need to consume carbohydrates. In my limited testing the process is working well, with some slight tweaking for testing parameters needed. NOTE: I only added half the amount of carbs I consumed to the APS for tracking. This is to avoid overcorrecting by the algorithm.
Expectations
I am trying to find the ideal conditions to exercise where I can experience moderate blood glucose fluctuations and not be required to consume large amounts of carbohydrates to keep me exercising safely. In the past on MDI I used to exercise fasted with only basal on board, which allowed me to stay in range for about 40 minutes before needing carbs. I am hoping to achieve this same amount using a pump. In past experiments I was able to achieve similar results during exercise by significantly reducing basal rates but I found that post exercise I struggled with higher than usual blood glucose readings for a few hours due to lack of insulin in my body.
Automations
Blood Glucose vs. CGM
The CGM results differed during exercise an average of 25% from blood readings. This made me decide to start some research of my own into using machine learning to try and estimate my blood glucose during exercise.
Results / observations
The automation route works well if you plan your exercise far enough ahead. The next experiment I will drop the profile percentage to 60% and observe. I noted an average of about 25% difference between the results the CGM and the finger pick tests. I was however able to keep my readings in range 100% of the time using 34g of carbs for the duration of the 50 minute experiment.
Capture from Nightscout
Video
I created a video using data from my Garmin Forerunner 245 and AAPS to track the experiment. In this video I track blood glucose, insulin, carbs, basal, distance, heart rate and cadence. I noted that the algorithm the Garmin uses to determine distance does not work well while walking and didn’t register any distance until I started lightly jogging.
In preparation for my cycle I started an automation to prepare my body for the impending exercise. This automation reduces my basal insulin ( as well as scale the rest of my management metrics) by 30% and set a temporary target (TT) of 7mmol/l. AAPS will not allow me to automate a profile % shift of more than 30%, so I reduced the profile a further 5% manually in AAPS an hour before the ride.
Exercise Metrics:
Garmin exercise stats
Blood Glucose:
Interestingly, AAPS stopped basal for a long period and allowed the IOB to runs its course.
My blood glucose held quite steady despite a mixture of anaerobic and aerobic levels of activity and so I didn’t need to consume any carbohydrates. Hopefully future attempts are as successful as this one.
Is the Quest protein bar type 1 diabetic friendly? Yes I think it is, read more below to discover why I think it is.
Review
Nutritional Information
Insulin Strategy
Goal
Results
When trying anything new I always read the nutritional information on order to determine the impact it will have on my body. Certain high fat foods can cause insulin resistance and inflammation and will delay gastric emptying while protein will digest and get synthesised into carbohydrates.
Below are two great resources you should read before deciding on your final dosing strategy. Its important to note that in Australia, most items don’t have total carbohydrate count that includes fibre and sugar alcohol, which can make it difficult to assess the impact of products that don’t list sugar alcohols in the nutritional information.
Based on the nutritional information above, my inulin to carb ratio and my proximity to recent exercise I decided to inject as follows; I didn’t input my eCarbs for the protein as I knew that AAPS would be able to manage. Read my post for injecting for protein and fat if you are not on an AAPS or experience elevated blood glucose two (2) hours after eating.
Goal
The goal of any insulin strategy would be to inject enough insulin at the correct time so that the upward force the carbohydrates exert is counteracted by the downward force the insulin exerts and you stay in range for the duration of the meal.
To analyse this I use three (3) values, standard deviation, time in range (TIR) and Coefficient of the variation. These three (3) values will assist you in determining how good or bad a meal was for you in terms of blood sugar impact (BGI).
Time in Range (TIR): For TIR we are looking for a high percentage of your readings within a normal (I use 3.9-7.8 mmol/l ) range.
Standard Deviation: For standard deviation I look for values under 1 as a meal that has little to no blood glucose impact (BGI).
Coefficient of the variation (CV): Is the standard deviation divided by the average glucose. Its a measure that helps normalise the results by reducing the influence on average glucose. Most studies indicate that anything under 33% is good.
As we can see by the table below that this snack consumed with the correct insulin strategy resulted in very stable blood glucose over a number of hours, with little deviation. What should be noted is that the sugar alcohol started to effect readings after 3 hours and that 1 hour prior to consumption I had exercised. The exercise would have increased my insulin sensitivity.
Time in Range (TIR): 100%
Standard Deviation: 0.38
Coefficient of the variation (CV): 0.06
Read my post on some common foods I eat to gain a better understanding of how this meal impacted me in comparison.
The below is a list of foods I commonly eat that I decided to analyse. I have listed some lower-carb high protein meals, snacks and a few higher-carb meals. These are all more regular meals so I have had the opportunity to adjust my insulin strategy to better cover the various aspects of the meal.
Part of my strategy is to adjust the insulin timing (pre-bolus), starting BG (using temp targets or exercise) and the amounts of insulin used. The amount of insulin used needs to be adjusted based on the macronutrient composition, the amount of fibre and the amount of sugar alcohol in your meal. Sugar alcohols are often not listed on food labels in Australis and those foods should be avoided. Read my post on injecting for protein and fat for a better understanding of how your insulin dose will need to be adjusted to compensate for protein and fat.
To analyse a meal I use three (3) values, standard deviation, time in range (TIR) and Coefficient of the variation. These three (3) values will assist you in determining how good or bad a meal was for you in terms of blood sugar impact (BGI). You can also use the difference between the 3 hour and 5 hour standard deviations to ascertain if you are covering gluconeogenesis correctly.
Time in Range (TIR): For TIR we are looking for a high percentage of your readings within a normal (I use 3.9-7.8 mmol/l ) range.
Standard Deviation: For standard deviation I look for values under 1 as a meal that has little to no blood glucose impact (BGI).
Coefficient of the variation (CV): Is the standard deviation divided by the average glucose. Its a measure that helps normalise the results by reducing the influence on average glucose. Most studies indicate that anything under 33% is good. The lower the number the better the outcome.
On the 04 February 2022 I decided to switch from FreeAPS (Loop) over to AAPS. At that point I had been successfully looping for 6 months with FreeAPS (Loop) but I wanted to get some experience with the oref1 algorithm in the hopes of fine-tuning my diabetes management during sports and to try out unannounced meals.
I was conflicted in the beginning as I was seeing results consistent with my goals on FreeAPS (Loop), but It was something I wanted to try. I am glad that I did.
The first few weeks on AAPS can be painful as you learn the system and go through the objectives. I had completed as many as I could using a virtual pump so It wasn’t long before I was able to close the loop again this time using AAPS. I expect my numbers will improve once again when automations are available to me.
Setup and Configuration:
For the first few days I was still using the Dexcom IOS app as my collector app sending my BG readings to the King King Mini 2 (KKM2) to be processed by AAPS, this worked well as I was always in areas with reception. I did this because I wanted to be able to switch back to Free-APS quickly if I decided that AAPS wasn’t working for me. The first sensor on the KKM2 I paired with xDrip+. I loved xDrip as it provided heaps of additional data, but I had issues with delayed and missed readings. I have now switched to the the Dexcom BYOD app and this seems to be proving readings more consistently. I am using an Anubis transmitter but I am unable to validate battery level with the Anubis Tool on the KKM2.
Stats:
Last 22 days on Loop (FreeAPS)
…
First 21 days on AAPS
Likes:
Improved Time-in-range (TIR) (+7.7 %), average blood glucose (-0.2 mmol/l), GVI, PGS and A1C even though AAPS was new to me and I was still figuring a few things out. I achieved this exercising less than I usually do due to weather.
Better control with less work.
More flexibility – The ability to scale and tailor your meal or correction dose is awesome (include trend, IOB, COB, correction percentage and your blood glucose readings in the the calculation for increased control and precision).
Fewer (0.2% less) low events.
Quicker to respond to bring high blood sugars down.
Unannounced meal management (UAM) using the Oref1 algorithm (not tested).
No Apple Developer licence fee (I paid less for my KKM2 than I was paying for my annual developer license).
Easier to setup and deploy to the KKM2 than the Free-APS (Loop) app.
Remote (SMS) bolus.
The ability to super bolus (include basal for a specific period with a bolus).
Super micro bolus’ (SMB) are more effective at dealing with gluconeogenesis from high protein meals.
Autosens has been useful by identifying periods of insulin resistance or sensitivity and adjusting basal accordingly.
Dislikes:
My pump (Medtronic 522) is using batteries more frequently (60% quicker on AAPS).
Bluetooth (BT) drop-outs more frequently than loop. In the last 21 days I have had 6 ‘Pump unreachable’ errors and 3 ‘Missed BG readings’. This resulted in elevated blood glucose during the evening.
The KKM2 battery drains faster when I am around multiple other Bluetooth enabled devices than what the iPhone did.
The connection between the Phone (King Kong Mini 2) to the Orangelink and pump seems a little less stable than with the with the iPhone and loop, but I suppose you can expect a far inferior Bluetooth chip on a phone that costs a 10th of the price. This is easily remedied by restarting the Orangelink , turning BT on and off or in some cases, usually with the the pump unreachable error, I had to restart my phone.
I really liked the ICE (Insulin Counteraction effect) data in Loop. It was useful to see where I went wrong with my previous bolus and AAPS doesn’t have this data readily available like Loop did. If you were using UAM it would be unnecessary.
It’s been 73 days since I started looping. I have had a difficult December with a sprained wrist from a mountain bike accident and myself, my daughter and my wife had gastro which resulted in very little sleep and some abnormal readings. In fact I am still having abnormal sensitivity to insulin, resulting in frequent lows or blood sugar swings. I also had two failed Dexcom sensors and moved to the code calibration method which resulted in two days of false high CGM readings in comparison to my blood glucose readings. I’ll add the CGM stats once I am finished the analysis. Hello 2022!
Blood Glucose Stats
Blood glucose stats
A marginal improvement in December over the fist two months, but I still have a lot of work to do to get to my goal of a 5.5% A1C. Interestingly enough, after the gastro I am now 40% more sensitive to insulin, so hopefully now that I am aware of this I can get back to better blood glucose readings. I will also need to run in open-loop when changing Dexcom sensors to avoid all the issues I was previously having with false high blood glucose readings causing my Loop to micro-bolus incorrectly or increase my basal in error. Still not sure how I will handle protein in open-loop.
Exercise Stats 2021-2015
Total distance exercised
Total time spend exercising
I more than doubled (55%) the amount of hours I spent exercising in 2021, mostly as I was working from home which allowed me to spend more time exercising. As my A1C lowered, my fitness levels improved dramatically.
Disclaimer: The information contained within this blog post are my thoughts and do not constitute medical advice. Please consult your medical team before making any changes to your diet or program.
This guide is based on past experience, information obtained from other diabetics and input from a multitude of websites.
I have broken this guide up into 3 sections;
Pre-exercise (preparation)
Exercise
Post-exercise
Step 1: Pre-exercise
PUMP: BASAL: If you are on a pump, this usually involves setting a temp basal around an hour prior to exercise, but a multitude of factors will govern the % basal rate and how early you will start it. It seems a general rule of thumb is 30-70% depending on the intensity and duration of the exercise, the longer you exercise the more sensitive to insulin you will become. The faster (think Fiasp) your insulin responds to change, the shorter the waiting period prior to starting exercise could be. Short acting Insulin has a DIA (duration of insulin action) that usually lasts several hours (3-7ish), and any insulin you may have on-board (circulating within your body) will become more potent as you exercise, thus increasing the risk of a severe hypo.
MDI: BASAL: For most exercise under 40 minutes I would keep my basal the same and ensure I exercised in the morning, reducing the risk of a hypo by being fasted and by exercising during a period in time where we are more resistant to insulin. Of course you can exercise at any time you choose, but you need to be aware that if you did not adjust your basal according to your length and vigour of activity you are more likely to experience a hypo.
Snack and snack timing: If you exercise in the morning I prefer to exercise fasted provided the activity is under 40 minutes in duration. If the activity is over 40 minutes then I will have a small snack (under 15g of carbs) just before I set out. The carbohydrate requirements for individuals will differ according to your body composition (ie. smaller people require less fuel to achieve the same results as larger people would, or the more muscle you have the more fuel you will need). If I am exercising more than two hours after I woke up, I will require a snack to sustain me for the duration of the activity. I have found that 20-30 minutes after my snack seems to be my ideal time (snacks with higher protein / fat will digest more slowly than high carb snacks) to begin exercise. Its very much a process of monitoring and evaluating until you find what works for you.
Hypo treatments: Glucose, dextrose or sucrose in liquid form is by far the quickest and most precise way to treat an impending hypo. Its important to note that liquid is absorbed much faster than solid foods according to the Manhattan gastroenterology website. Ingesting solids foods during activity can result in post-exercise hyperglycaemia as the foods begin to digest soon after exercise stops.
“Exercise and digestion can be mutually exclusive. When you exercise, your body isn’t using its energy for digestion. Instead, it slows any digestion currently taking place so it can divert as much blood as it can to feed your muscles and your lungs.”
I use a Camelbak Podium bum bag to store my pump, glucose gels and Powerade.
Other items to consider:
Cannula placement; If the cannula is in the muscle group you plan to train, you may need to reduce basal further.
Sleep; If you are sleep deprived you may require more insulin.
Wake up period; If you are training within two hours of waking up, you may be more insulin resistant and require less pre-training fuel.
Pump suspension; If you suspended your pump you will need to consider the period of time that your pump is suspended as you will have missed that basal insulin.
Step 2: Exercise
In my opinion, the most important things to do whilst exercising is to monitor and respond as required. I take my blood sugar at 15 minute internals when doing cardio ( I have a CGM attached to me at all times, but I prefer to use blood as its more accurate), which as you become more comfortable and attuned to your body, you could probably push to between 30 and 60 minutes to match testing to glycogen store depletion.
The average non-diabetic athlete has between 350-500g of stored glycogen when fully stocked (think high carb diets, the body stores less on lower carb diets) and up and 50% less glycogen just after waking up. These glycogen stores get fully depleted at around 90 minutes or 45 minutes if you exercise in the mornings . A Medivizor study suggested that diabetics have up to 21% less glycogen stores than the average person. If we consider the aforementioned statement regarding diabetics reduced capacity to store glycogen we realise that early morning exercise could lead to glycogen stores being depleted in as little as 35 minutes for the athletic individual, earlier if you are on a low carb diet or are untrained as your body uses glycogen less efficiently.
The Portland clinic advises that;
“During the first 15 minutes of exercise most of the sugar for fuel comes from either the blood stream or the muscle glycogen which is converted back to sugar. After 15 minutes of exercise, however, the fuel starts to come more from the glycogen stored in the liver. After 30 minutes of exercise, the body begins to get more of its energy from the free fatty acids”.
My personal experience seems to correlate to these findings and that’s why I test at 15 minute intervals, especially when starting a new routine, or restarting an old one. Also consider that you need insulin to utilise glycogen.
Effort levels can also influence blood glucose. Exercising at higher intensity levels can increase blood glucose due to stress hormones being released.
I use the formula 220-age to calculate my maximum heartrate. Then I can calculate effort from the below chart. I can then use this information to keep an eye on my heart rate during exercise and adjust my training effort as required. I also use this information to adjust my subsequent insulin doses as I am more sensitive to insulin an hour or two after exercise ( or directly post exercise when on MDI)
Starting Insulin recommendations in-line with activity durations
An example of how to use the table above would be if I had exercised at a moderate pace for 40 minutes, I could then experiment by decreasing my insulin dose by 67% and adjusting further if needed. Its easy to do this in Loop with temporary over-rides.
Temporary over-ride in Loop
An example of what I do to prepare for a run with Android Artificial Pancreas System (AAPS).
Step 3: Post Exercise
PUMP: I am not experiencing the sudden insulin sensitivity increase I did while on MDI. I believe this to be due to the fact that on MDI I cant reduce basal, but with the pump I can decrease basal as required. Be careful not to decrease your basal too much as your blood sugar will increase due to an inability to utilise glucose effectively. If you are using Loop then you could start a temporary over-ride to adjust insulin delivery for the remainder of the day. AAPS is capable of adjusting insulin requirements using a function called autosens which monitors deviations in insulin requirement. Below is a chart of insulin sensitivity post exercise grouped by exercise type.
MDI: I would generally be around 40% more sensitive to insulin immediately after a moderate run or cycle. This reason the onset of the sensitivity seems more rapid is due to the already circulating basal insulin now being super-charged. I found that exercising on MDI lacks some of the flexibility that pumps users have to adjust training duration or time period around your basal dose. On MDI I would the Spike app to adjust my meal time doses according according to the duration and intensity of the exercise. Spike is a very handy app for Apple MDI users to use as it can track meals, insulin and exercise. As well as have the functionality to calculate and adjust adjust insulin doses based on carbs and exercise input.
Screen capture of the the Spike-app.
NOTE: The Spike app is still available, it just requires a developer license and a significant time investment to install as its not available on test flight or the Apple store.
A few days ago I enabled micro-boluses in Free APS and its been working remarkably well at managing any post prandial blood sugars highs. I have only setup a 45% partial bolus being administered when deemed necessary, but at this stage I feel its performing as I want it to. I still count carbs and administer ‘fake’ or ‘extended’ carbs and simply use the micro-boluses as a tool to quickly administer insulin in place of an extended high temporary basal, which would do the job a little more slowly. Tonight I test this on Chinese food. 🙂
In the chart below we can see that I ate a hearty dinner, and then decided to eat some raisin toast. I managed to stay in range almost the entire evening after all these carbs. Amazing. I would never have even considered doing this before Loop, and if I did I would have anxiety the entire time.
UPDATE: The night went well and overall I am very happy with the results. If I am honest though, I think my expectation in the beginning of this experiment was that Loop would autonomously manage my blood sugar with very little input from myself, but I have realised and this is not the case, and adapted my management to include pre-emptive blood sugar correction. I am certain that Loop would indeed make these decisions, but keeping my finger on the pulse allows me to obtain the level of blood sugar control I am after.
Time-in-range (TIR) = >3.9 AND < 7.8mmol/l
The goal: Eat Chinese food and stay in range
The strategy: I went onto MyFitnessPal and found honey chicken, pork pieces and mixed veg. I added them into the dinner section and calculated the insulin required for the carbohydrate, protein and fat macros. I was not sold on the bolus amount for the carbs and ended up only injecting 70% of the calculated amount, but Loop quickly started administering micro-boluses to correct this. The ‘fake carbs’ ( I don’t really know why this name has gained so much traction in the diabetic community, since proteins and fats end up being synthesised into glucose (carbs) through gluconeogenesis, and are thus sugars (real carbs) being generated by the body at a slower rate than the exogenous carbs we eat) for protein and fat were then added to Loop with a 4.5 hour digestion period. This will allow Loop to attribute blood sugar changes to carbs (from gluconeogenesis) for up to 6 hours, and be able to micro-bolus or increase basal for them.
The outcome: I noticed that after an hour I had a substantial amount of insulin on-board and my blood glucose (BG) was dropping at a rate that could not be sustained by the food I had eaten, so I ate another 20g of faster acting carbs. An hour after that I had a mild hypo (3.7 mmol/l) and ended up eating again to correct this. I believe a better strategy may have been to inject 60% of the bolus up-front and then monitor for an hour before injecting the remaining bolus. Then again, this may have been just a carb-counting error on my part.