Featured

2023 Half Marathon

It’s been a long-standing goal of mine to run a half marathon. It’s long enough to be a challenge, and short enough that I don’t need to be training all year round and can focus on my other sports.

Pre-requisites

Basal review – I will be doing an incremental basal review in the next few days (hopefully). Skipping meals where required.

Full profile review – Once the basal profile has been updated, I will check my CR (carb ratio) and CRR (carb rise ratio). No need to check ISF (insulin sensitivity factor) as its calculated in Android APS. I will need to be on the look out for blood sugar dips two or more hours after meals as I may need to reduce the Dynamic ISF Adjustment factor.

Injuries

At the moment I have an Achilles tendon issue I am in rehabilitating. It’s the first time I am experiencing this issue, so I am working with a Physio to remedy it.

Training Program

I plan on using the Garmin training program to do most of my training. My longest run prior to this was 16 km and I mountain bike so I think I may be ok with fitness if I can get back into training fairly quickly, but this is dependent on how well my current rehab program works.

This will be updated as and when I can, but the next 3 three (3) weeks are as follows:

Tendon Rehab Program:

WeekMondayTuesdayWednesdayThursdayFridaySaturdaySunday
1Calf raise holds 5 x 45 seconds, Gym3km run,
double leg calf raise x 3 12-15, body weight single leg calf raise 3 x 10-15
Calf raise holds 5 x 45 seconds, GymCalf raise holds 5 x 45 seconds, Gym3km run in AM,
double leg calf raise x 3 12-15, body weight single leg calf raise 3 x 10-15
Calf raise holds 5 x 45 seconds, GymBike in AM
2Calf raise holds 5 x 45 seconds, Gym4-5 kmCalf raise holds 5 x 45 seconds, GymCalf raise holds 5 x 45 seconds, Gym4-5 kmCalf raise holds 5 x 45 seconds, GymBike in AM
3Calf raise holds 5 x 45 seconds, Gym5-7kmCalf raise holds 5 x 45 seconds, GymCalf raise holds 5 x 45 seconds, Gym5-7kmCalf raise holds 5 x 45 seconds, GymBike in AM

NOTES: If pain/stiffness gets progressively worse, then reduce load and re-assess. If not monitor and keep working.

Strava Running Program:

I had really wanted to use the Garmin program, but I was too late to start it. The Strava program doesn’t seem to have the ability to select the days I plan on running or feedback on training progress at a granular level. My desired routine is 3 days per week.

Garmin Running:

Global Triathlon Network (GTN) half marathon training program

I really liked the plan from GTN, I have modified it a little to fit within my availability.

Training Progress

I will add a table to the weekly updates with progress on my training plans.

Diet / Food

I plan on sticking to my diet as much as possible. I will however cut back on alcohol and focus on drinking more water.

Supplements

Vitamin B – https://www.healthline.com/health/food-nutrition/vitamin-b-complex#benefits

Alpha lipoic acid – https://www.healthline.com/nutrition/alpha-lipoic-acid

Omega 3 – https://www.healthline.com/nutrition/17-health-benefits-of-omega-3

Vitamin D – https://www.healthline.com/health/food-nutrition/benefits-vitamin-d

Gear

Shoes: New Balance 1080, Fresh Foam More v3, Brooks Ghost

Watch: Garmin Fenix 7

Hydration vest: Osprey Duro 6 hydration vest

APS Hardware: Cubot King Kong Mini 2 Pro

Artificial Pancreas System: Android APS / Branch: Dev (Dynamic ISF)

Pump: Mixture of Omnipod and Accu-Check Combo

Insulin: Fiasp

Insulin Peak: 55 minutes

DIA: 9 hours

Glucose statistics

Measurements

Weight: 75km (afternoon)

Waist: 88cm

Body fat (estimate):

Updates (Weekly)

I will try and update the blog weekly with progress.

Featured

My diabetes history

Control Statistics for the last 5 years

Date Started TestControl Mechanisme-A1CAverage Blood GlucoseTime In Range (TIR) 3.9 – 10Standard DeviationAverage carbs consumedCoefficient of the variationGVIPGSCGP – PGR
20/11/2019MDI6.1%7 mmol/l87%2.2 mmol/l31%1.220.331.7
20/11/2020MDI5.6%6.3 mmol/l94%1.7 mmol/l< 6027%1.178.671.3
20/11/2021Loop5.7%6.5 mmol/l94%1.7 mmol/l<100 (carb counting)26%1.258.291.3
04/02/2022Android APS5.7%6.5 mmol/l96%1.5 mmol/l>200, little to no carb counting23%1.245.701.2
01/08/2022Android APS – UAM5.7%6.5 mmol/l95%1.6 mmol/lNo carb counting with pre-bolus25%1.3271.3
Last 3 monthsAndroid APS – UAM5.6%6.4 mmol\l95%1.6 mmol/lNo carb counting with pre-bolus25%1.347.51.3
Analysis stats provided by Nightscout reporter.

Exercise statistics for the last 5 years

YearAverage Time in Range (3.9-7.8 mmol/l)Average blood glucose (mmol/l)Average Standard Deviation (mmol/l)Average Coefficient of the variation (%)Total HoursTotal KM
202377.4%6.70.56121431027
202275.6%7.040.43 16131885
202171.9 %6.7 0.417 149920
202069.7 %6.9 0.713.6 67658
201966%7.270.5812.6 16146
201837333
Annual improvements are made through tweaking system variables and my approach to exercise.

A1C conversion chart with explanation

A1C level conversion chart help convert A1C in % to BS in mg/dl & mmol/L using DCCT formula.

Featured

Analysing 2022 exercise data from AAPS

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 blood sugar management program.

So far 2022 has been quite the year. With the return to my work offices Its been rather difficult to reach many of the goals I set myself, but I did make progress. It seems 2023 is set to be a particular difficult year, but perhaps this will be the inspiration I need to make some positive changes. The Python scripts I wrote to export data from Nightscout to create my mountain bike videos seem to be working well and I can’t wait to make a few more videos.

I was curious to see if there were any differences in insulin sensitivity between longer and shorter activity durations, as well as higher intensity (where average heart rate was more than 80% of max heart rate) training and it seemed there was, it just wasn’t what I was expecting.

My average total daily dose (TDD) for 2022 was 32.9 units per day. If we analyse my aerobic activity (ride and runs) for the year and we use my sensitivity ratio from AAPS for 24 hours post exercise, I calculate that I saved 256 units of insulin in 2022 through exercise due to increased insulin sensitivity. During aerobic activity I consume 12g of carbs on average per 30 mins of activity unless I am exercising fasted. I can use this input to calculate that I ate 2277g of carbs during 2022. I would need 311 units of insulin to absorb 2277g of carbs. Since I don’t add carbs to AAPS while exercising I don’t have the exact numbers but I do believe this calculation to be pretty accurate. That equates to 49 Big Mac burgers / 82 Apples / 73 slices of Dominos peperoni pizza that I got to eat without insulin as a direct result of exercise.

Exercise metrics

Analysing my exercise metrics I found that I was spending way too much time exercising at more than 75% of heart rate max, this would be hampering performance and building endurance. I did eighteen (18) runs at a distance greater than 8km, an improvement over the two (2) I did in 2021. I also managed my longest run ever at 16km.

exercise typeexercise counttotal distance (km)average distance (km)average moving time (minutes)average heart rate (bpm)
EBikeRide720.642.9518.65N/A
EBikeRide ( > 8 km)17252.415.759.4133.8 (72% max HR)
Run108374.253.4723.5139.26 (75% max HR)
Run ( > 8 km)18183.110.167156 (85% max HR)
Walk4865.81.3718.693 (50% max HR)
WeightTraining650.0033.77105 (57% max HR)
TOTAL2628965.636125 (68% max HR)
Exercise stats table for 2022

Time-in-range (TIR)

The longer distance running seem to result in the best time-in-range (TIR) (3.9-7.8 mmol/l) but I do feel that these runs also seem to happen at a similar time in the morning where I have more control over insulin-on-board (IOB) and carbs-on-board (COB) and I am the most resistant to insulin. My heart rate is also far more consistent (aerobic) during running than when mountain biking ( aerobic / anaerobic ).

If I start digging into the data for short runs more closely I find that;

  • TIR (3.9-7.8 mmol/l) from 04:00am – 10:00am is 63%
  • TIR (3.9-7.8 mmol/l) from 10:00am – 13:00pm is 83%
  • TIR (3.9-7.8 mmol/l) after 13:00pm is only 23%
exercise typeexercise counttime-in-range (%)
EBikeRide781.67
EBikeRide ( > 8 km)1665.56
Run10856.8
Run (04:00 – 10:00 am)1863.8
Run (10:00 – 13:00 pm)6183.6
Run (13:00 – 10:00pm)2923.02
Run ( > 8 km)1893.6
Walk4575.8
WeightTraining6587.7
Exercise time-in-range table for 2022

Blood glucose control metrics

The exercise that resulted in the lowest blood glucose fluctuations is walking with a CV of 4%. The exercise with the second lowest CS was weight training. I generally try to train with a little insulin-on-board to counteract the hormones released during training and I don’t need to set a high temp target in the lead-up to the activity, thus my reading is much lower at exercise commencement. The third lowest is short runs (< 8km) with CV of 6%. The higher blood glucose average will be a direct result of me setting a higher temp target (8 mmol/l) prior to exercising, but the duration of activity isn’t long enough to reduce the blood glucose substantially resulting in the high average. Long runs seem to result in the least stable blood glucose values with a CV of 12% but the average for long runs is lower as the sustained activity reduces blood glucose. I suppose on these longer runs I do consume a minimum of 30g of ultra-fast acting carbs (glucose, dextrose) which is going to result in some fluctuations in blood glucose.

With coefficient of the variation (CV) a lower percentage is indicative of more stable blood glucose readings.

exercise typeexercise countaverage standard deviationaverage blood glucoseaverage coefficient of the variation (CV)
EBikeRide70.577.498%
EBikeRide ( > 8 km)160.9210.69%
Run1080.437.196%
Run ( > 8 km)180.696.2411%
Walk480.276.774%
WeightTraining650.46.396%
Exercise breakdown for 2022

Insulin sensitivity

A very interesting observation was that longer, more intense activity resulted in sensitivity returning to normal quicker than less intense or shorter activity. Runs shorter than 8km resulted in a massive 12% insulin reduction for 24 hours post activity, that’s around 6.5 units less insulin in a 24 hour period. Long E-Bike rides resulted in the largest increase (35%) in sensitivity 1 hour post activity, with shorter E-Bike rides the second largest increase in sensitivity. Runs longer than 8 km increased sensitivity (25%) the third most, but the body seemed to return to normal more quickly than the shorter runs and was almost back to normal within 12 hours of activity.

(NOTE: I can’t comment on the validity of the results, only that patterns exist after exercise that are not usually observed in the absence of aforementioned exercise.)

average insulin sensitivity
exercise typeexercise count1 hr post exercise3 hr post exercise6 hr post exercise8 hr post exercise12 hr post exercise24 hr post exercise
EBikeRide71091051031029995
EBikeRide ( > 8 km)16687888939779
Run1088692959610298
Run ( > 8 km)18768092949794
Walk48105109111112114109
WeightTraining6595101100106110104
Average insulin sensitivity for multiple time blocks post exercise grouped by exercise type.

Profile Adjustments vs. Temporary Targets (TT)

In the past I used a combination of a 30% reduction in profile and a temporary target of 7 mmol/l while exercising.

This seemed to work quite well, with the caveat that profile adjustments can result in your autosens data being reset if you cancel the adjustment earlier than set.

One way to combat this is to set a higher temp target, this will not effect sensitivity data and can be cancelled at any time without needing to update the basal insulin profile in the pump of effecting autosense data. In order to do this I analysed the adjustments I was using to calculate a temp target that should reduce my insulin enough to keep me in range for the duration of activity.

TargetTemp_TargetInsulin % reducedActual % of profile30% Reduction20% ReductionNote
5.3851%49%This resulted in quite a few low blood sugars
5.38.560%40%2023 backup temp target strategy
5.38.357%43%2023 temp target strategy.
5.37.542%58%28.5%38.5%
5.57.027%73%42.7%52.7%Strategy in early in 2022

Thank you for reading 🙂

Featured

Diabetes awareness month and Android APS

14/11/2022

Introduction

It’s diabetes awareness month and so I wanted to talk to you about something I am very passionate about, Android artificial pancreas system (AAPS). It’s not the cure I wanted but as far as I am concerned, it’s the closest to normal I have felt in the 25 years I have been a diabetic.

Why I LOVE Android APS

I decided to try Android APS just prior to the birth of my daughter. At the time I was using multiple daily injections (MDI) on a low-carb diet (less than 45g per day excluding protein and fat) and trying to pick up some muscle. I found it rather challenging to eat the number of carbs the trainer suggested without compromising control. I was also anticipating the late nights having a baby entails and I wanted to be prepared. David Burren’s blog provided a blueprint of what could be expected if I committed to investing the time required to perform all necessary testing and fine-tuning.

Benefits of Android APS

  • Meal management
    • Meals can be managed through a number of mechanisms including;
      • Un-announced meals (UAM) – AAPS boluses insulin without intervention or carb entry.
      • Announcing carbs – Add the carbs into the system and the calculator estimates the amount of insulin required based on your COB, IOB, ISF, current blood glucose, blood glucose deltas, and insulin sensitivity.
      • Extended carbs – typically used to mimic the absorption of protein (gluconeogenesis) or delayed gastric emptying caused by high-fat meals.
  • Exercise management
    • Insulin scaling adjusts basal insulin based on current insulin sensitivity
    • Automations allow you to schedule profile changes and temporary blood sugar targets for the duration of activity or condition.
  • Hardware / pumps / wearables
    • Functional on many old and new low-cost Android phones
    • Directly or indirectly (via Nightscout) display various blood glucose-related data on compatible watches. If you are using an Android watch (WearOS) you can control AAPS via the watch. Garmin watches can display blood glucose data during an activity.
    • Control a wide variety of pumps
    • Utilise the blood glucose data from a wide variety of CGMs (continuous glucose monitors)
  • Software
    • Automations allow you to automate system actions based on conditions (eg. blood glucose increasing, blood glucose decreasing, leaving for work, pump disconnect) or schedules.
    • SMS Commands to control AAPS remotely
    • Super micro boluses / boli (SMBs) allow AAPS to provide insulin efficiently and effectively.
    • The system will suspend insulin delivery when blood sugar is predicted to go below a certain threshold.
    • Highly customizable to your unique needs, with certain advanced builds allowing you to control more system variables (Boost, AIMI, Eating Now).
    • Cutting-edge development
      • Dynamic insulin sensitivity factor (ISF that changes based on blood glucose)
      • Improved prediction models
      • Improved insulin modeling (9-hour DIA)
  • Quality of Life
    • Reduced diabetic burden and stress.
    • Glucose is constantly monitored, with the ability for someone to follow you remotely, including community members. This can assist with fine-tuning settings.
    • Ability to eat more foods without compromising control
    • Improved glucose control reduces the possibility of long-term complications.
  • Safety
    • Objectives provide a level of safety as users need to understand basic principles of how to use the APS prior to closing the loop.
  • Cost
    • AAPS is open-source and free to use.
  • Monitoring / Reporting

Dis-benefits of Android APS

  • DIY Software build
    • As with all DIY systems, you are required to build the application prior to using it.
  • Cost of hardware
    • Phone
    • CGM
    • Pump and supplies
  • Connectivity fatigue
    • The burden of being connected to technology 24/7
  • Reliance
    • It is easy to become reliant on AAPS managing blood sugars.
  • Usability
    • Due to its complexity, you are required to invest a large amount of time in order to gain the understanding and skills required to configure and utilise it correctly.

Statistics and examples:

Nightscout statistics – 3 Months

Nightscout blood glucose distribution report
Nightscout blood glucose weekly distribution report

Control stats for different systems

Date Started TestControl Mechanisme-A1CAverage Blood GlucoseTime In Range (TIR) 3.9 – 10Standard DeviationAverage carbs consumedGVIPGSCGP – PGR
20/11/2019MDI6.1%7 mmol/l87%2.2 mmol/l1.220.331.7
20/11/2020MDI5.6%6.3 mmol/l94%1.7 mmol/l< 601.178.671.3
20/11/2021Loop5.7%6.5 mmol/l94%1.7 mmol/l<100 (carb counting)1.258.291.3
04/02/2022Android APS5.7%6.5 mmol/l96%1.5 mmol/l>200, little to no carb counting1.245.701.2
Analysis stats provided by Nightscout reporter.
Comprehensive glucose pentagon from Nightscout reporter report.

Un-announced meal (UAM) example

Low-carb meal with UAM running (Low-carb bread with cheese, ham, and mayo.)

Extract from Android APS data for a low carb meal

As can be seen above the system manages low-carb meals quite well with no carb inputs from the user. The system constantly monitors for rapid changes in blood sugars and administers insulin when required to quickly brings sugars into range.

Nightscout screenshot of low carb meal being absorbed while AAPS manages sugars.

Exercise stats / examples

YearAverage Time in Range (3.9-7.8 mmol/l)Average blood glucose (mmol/l)Average Standard Deviation (mmol/l)Total HoursTotal KM
202280.1 %6.60.43 131885
202171.9 %6.7 0.4149920
202069.7 %6.9 0.767658
Annual improvements are made through tweaking system variables and my approach to exercise.
Weight Training
DateIOB @ startMoving timeExercise TypeAverage HR (bpm)Standard Deviation (mmol/l)CGM BG StartCGM BG EndCGM BG Average (mmol/l)TIR (3.9-10)
2022-10-070.1436.93WeightTraining101.10.3657.76.87.27100.0%
EBike Ride
Android APS data exported during an E-Bike Ride 2022-11-06.
DateIOB @ startMoving timeExercise TypeDistance (km)Average HR (bpm)Standard Deviation (mmol\l)CGM BG StartCGM BG EndCGM BG Average (mmol\)TIR (3.9-10)
2022-11-06-0.849115.92eBikeRide271431.0955.95.87.16100%
Running
Android APS data exported during a run 2022-10-03.
DateIOB @ startMoving timeExercise TypeDistance (km)Average HR (bpm)Standard Deviation (mmol\l)CGM BG StartCGM BG EndCGM BG Average (mmol\)TIR (3.9-10)
2022-10-03-0.53478Run12 1681.1055.55.16.75100%

Glucose Analysis Tool

Two years ago my daughter was born. At this time I was off work for a few weeks and I had been strongly considering writing a tool that could provide some insight into managing my blood sugars, as I knew controlling my blood sugar was the best chance I had of being the best parent I cold be. At the time I was on multiple daily injections (MDI), leveraging heavily on Dr Bernstein’s teachings and using daily (if possible) exercise as a tools for glucose control.

Two years later the tool has pivoted many times, and at one time I was using machine learning (ML) to predict blood glucose during exercise, until I started using the Dexcom G6 continues glucose monitor (CGM) which was accurate enough to circumvented the need for the aforementioned tool.

At present I am using an automated insulin delivery (AID) device to deliver most of my insulin based on my shifting needs. This significantly reduces the mental burden required for good glycaemic control, as well as reduce some of the anxiety I was experiencing at meals times and when going to the doctor for diabetic checks. This system still requires manual input prior to exercise and constant tuning if you want to have the best experience, and so my tool has pivoted towards analysing this data and providing insight there.

Diabetic Metrics

An analysis of the last 4 years of my diabetic journey highlights a better A1C with a lower standard deviation (SD) indicating more consistency in blood sugars. Its interesting to note the much improved time-in-range (TIR-IN) metrics once I moved over to a insulin pump using an automated insulin delivery (AID) device.

PeriodHypo (below 3.9)In (3.9-10)High (above 10)AverageA1CSDGVIPGSPGRPGR-RiskExercise hoursKilometresPump / MDI
201919%77%3%7.76.50%2.61.2640.192.2Low16146MDI
20208%88%3%6.96.00%2.11.1917.341.6very-low67658MDI
20213%94%3%6.45.60%1.71.188.791.3very-low149920Pump (Loop) 20/11/2021
2022 (YTD)3%96%1%6.55.70%1.51.25.431.2very-low75496Pump (AAPS)
Table displaying the last few years worth of diabetic data.

For a description of some of these values mean please read this article.

Goals

My goal was to provide some insight into what was working and was not. To do this I needed to obtain blood sugar readings as well as nutritional and exercise data. I achieved this by creating a tool that obtains data from Nightscout, Strava and MyFitnessPal This data is then processed and enriched to provide insight. I then developed a tool to export some of this data and display it on my YouTube videos. I had it connected to Garmin to extract sleep and exercise data but the Garmin API failed and I have not had time to update the program.

My tool will then do some analysis to provide some insight at a per meal or per activity level by looking at metrics like time-in-range, average glucose, standard deviation, max glucose, min glucose and many more metrics.

Below are some example’s of some of the data I am exporting and using to make decisions.

This tool is very much still under constant development, as I am always finding new stats to display and bugs with some of my current code (at present both the Garmin API and the MyFitnessPal API have issues)

Below are some graphs and tables that I created in my Tool (The graphs are generated in DB Browser, these will at some stage be created in a JS library or Python graphing library).

Analysis of BG vs ISF, vs Sensitivity after a run.
Analysis of BG vs ISF, vs Sensitivity after gym.
Average TIR (time-in-range) and average blood glucose per exercise type for 2022.

Return-to-Range

I use this table to understand how quickly the system is able to reduce sugars into a normal blood sugar range. At the moment I am using 8 and 6.

Return-to-range analysis (by year)

In 2019 It took just over 6 hours to return to euglycemia (blood glucose < 6) after a peak, in 2023 I managed to reduce that to 3.2 hours.

The average time it takes to return to a blood glucose of 6 mmol/l after a peak.
The average time it takes to return to a blood glucose of 8 mmol/l after a peak.

Daily Sensitivity Analysis

I find this useful to determine if I am more sensitive to insulin on certain days, usually due to exercise.

Exercise Sensitivity Analysis

The exercise sensitivity data has been updated to be hourly for 12 hours post exercise. Its now calculated via SQL (insert statement) and not a Python function into a staging table.

APS Version Analysis

APS Version Battery Analysis

Exercise Stats Analysis (per exercise)

Exercise Stats Analysis (annual)

In the hopes of improving time-in-range while exercising I experimented with reducing insulin and used these values to provide insight into wether the changes were successful or not. In 2019 I was in-range only 66.6 of the time, in 2023 I am in-range 75%, with a slight improvement in glucose while exercising.

Treatments Analysis (per treatment)

Treatment Type Analysis

I use this table to understand how frequently I am interacting with the loop. This has little impact on the version of the variant of Android APS I am using.

Strava diabetic stats

I wanted to see diabetic statistics for each event in Strava, so I wrote a script to update the description field with some data I calculating in the Python tool. The script will check to see if the description field is populated and only update records that have no data in the description field.

Data to follow:

https://1drv.ms/u/s!AmpIRdFk1_yMgosDqE73Osiyl30ZAg?e=w9sIzl

Improvements

There are a number of improvements I am working on.

  • Web Interface

Featured

Thirty day challenge

It’s spring, and after a brief ‘almost two months’ of going off the reservation snacking at all times of day and barely exercising, I decided to check my weight. I discovered I had picked up a few kilograms since my last weigh in. After learning this, I decided that it was time for me to get my life back together and start another 30 day challenge. I find these great to provide the reason to get back into a routine.

I know that setting unrealistic goals (like losing 5kgs) isn’t going to work, so I’m going to break down my plan in to nutrition, exercise and diabetes goals.

Exercise

My plan for the month is to gym three days a week, run a minimum of 2 times per week and to mountain bike at least once a week. (So I guess I lied about setting unrealistic goals 🙂 )

Nutrition

For my meals I plan to stick to my usual low-ish carbohydrate meals during the week and try to only go coo-coo bananas on the late night snacking over the weekend. I’ll start carb-counting again as this will almost always yield the best results. This will be supplemented with 2-3 liters of water, depending on length of cardio that day.

Diabetes

Above is a chart of my starting metrics. Lets see how quickly I can improve those values. Its going to be a little bit of an unfair test as I was not carb-counting during the above period.

We want to see the In range (Time-in-range) increase and the standard deviation decrease. By doing that the average and the A1c should follow. This will mostly be achieved by the diet component of the plan. The exercise component will allow me to eat more cabs and require less insulin, as well as improve circulation, sleep, blood pressure, mood, cholesterol, memory and overall mental and physical health.

I will check in with weekly updates to ensure I keep motivated and accountable.

Android APS – Adjusting Boost after testing AIMI

An interesting set of results from my time with Boost. I cant wait to return to AIMI with what I have learned.

I was eating slightly less carbs (118g vs. 136g) than when I was using AIMI, but I would expect that if your profile is setup correctly that the amount of carbs shouldn’t have much of an impact on performance metrics. I was running into a few hypos so I lowered the algorithms insulin required percentage (70% vs. 100%) which resulted in a whopping 1.6% decrease (57 minutes vs. (288 minutes / 4.8 hours)) of time spent in a hypoglycaemic state while using Boost.

My standard deviation was slightly lower (1.3 vs. 1.4) signifying less fluctuations between readings while my time in a hyperglycaemic state went up 0.6% (25.2 hours vs. 26.6 hours)).

I did have to turn off “enable boost percentage scale” as this was providing too much insulin, but more experimenting could remedy this.

Another interesting observation was that my ratio between total daily dose (TDD) and total carbs eaten went down from 4.2 to 4.01 (grams of carbs per unit of insulin) as my average blood sugar lowered.

My exercise seems to have stayed pretty consistent during testing (as per the table below) which leads me to believe the reduced insulin need may be related to requiring less insulin when blood sugar is euglycemic. Its going to be a little more difficult to track that for the next few weeks as I am preparing to ramp up training for the Southern Cross 10km in July. The training has however provided an opportunity to fine tune my running routine as outlined here in my post about predicting blood sugars while running.

I cant wait to do some further testing with AIMI, Boost and Eating now.

Table of performance metrics from when I was MDI to the latest build of Boost.
Boost Stats (70% insulin required)
AIMI Stats (100% insulin required)
Boost TIR stats 3.9 – 10mmol/l
Exercise table (stats derived from Strava and Python scripts)

Predicting blood sugars while exercising.

I recently posted about how my experimenting with running using AAPS was progressing. I observed that under certain conditions there was a significant lag between the capillary blood and CGM readings at about the 30 minute mark. This sparked some interest in wanting to know if I could predict what my capillary blood sugar could be using machine learning. I’m still not sure if its entirely possible yet, but I am having fun trying, and I have learned a lot in the process. I’m currently working on the script that will allow me to overlay a lot more AAPS data during a workout, including predictions.

I am getting a lot better at managing blood sugars as I noticed the last 14 exercises I was in range (3.9-7.8) 100% of the time.

Python script data capture

I have changed my approach slightly towards eating before exercise and have piggy backed off some research done by Gary Scheiner to create a spreadsheet that estimates the carbs required and effort for a run.

https://wordpress.com/post/t1daaps.wordpress.com/482

Dynamic Insulin Sensitivity Factor (ISF)

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 :138g
Using 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.

https://github.com/nightscout/AndroidAPS

I’ll write a post about building in the next few days.

Ciao for now!

AAPS – Run Testing 2022

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.

Capture from my GoPro during exercise