These are chat archives for nightscout/intend-to-bolus
Does anyone model IOB?
I am pretty sure you can either do it pretty well and simply either using a natural log function or using differential equations. Obviously you would have to use numerical methods (such as numerical integration) for solving the differential equation in most programming languages.
Therefore, a natural log function would be more realistic.
@kenstack , thank you. I will look at your iHawk repo for the IOB formulas. That is awesome!
Also, if you are using Hovorka's models, which all of the current AP projects in use in clinical trials use, keep in mind that they are all designed for use with Humalog only (not Novolog). However, Hovorka et al described in a paper how to deal with Novolog so that might be used as a modification of the Hovorka models. I can only get Novolog with my insurance, and I can't really appeal it. Anyways, the article is free and it's available here: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3876328/
Also, a close colleague of Hovorka did his doctoral dissertation on the most updated Hovorka models (as far as I know) to date, which can be found entirely here: http://digitool.library.mcgill.ca/webclient/StreamGate?folder_id=0&dvs=1421423512391~496
The dissertation is highly useful, as it's easy to get lost. The math gets really advanced with the relatively new carbohydrate absorption models, and quite intimidating. Markov Chain Monte Carlo, random walks, stochastic stuff, and Bayesian stuff, may actually be the death of me. However, if you stare at the paper and the equations long enough it starts to make more and more sense.
I hope this helps.
@jasoncalabrese , @kenstack , you're welcome!
I realized that the dissertation link won't bring you to the dissertation. Instead search for "External Artificial Pancreas for Type 1 Diabetes: Modeling and Control" (in quotes) in Google.
@kenstack , the standard shape was used because there were no previous studies using radioactive (isotopes) tracers in food to model carbohydrate absoprtion. The APs in clinical trials right now do not have a formally developed (updated) model for CHO absportion, which is a good reason for #WeAreNotWaiting . Hovorka et al published this infomation with updated models in 2012-2013, but I suspect even more work is needed.
I am pretty sure in order to get an actual stable control loop (except overnight), given the current limitations of insulin latency and glucose sensor delays, you have to limit carbohydrates. For starters, that likely means no "normal" pizza, ice cream, candy bars, etc.
However, I would likely minimize carbohydrates in general, like Dr. Bernstein style, whenever I do implement the closed-loop in my life.