These are chat archives for nightscout/intend-to-bolus

Feb 2015
Feb 28 2015 00:29
I am going to work on the last 2 differential equations some more tonight. It's not "mission impossible" at all though. I haven't worked on this project since yesterday morning because I received some good news and I have been tired. I slept/rested all day, which is probably a good thing. My lymph nodes in my neck are visibly swollen, and my rheumatologist noticed they were swollen too. Cardiology tests came back normal, except for low potassium and magnesium, from a GI problem that can cause dehydration. So, my series of bad luck didn't really do "notable" damage to my body. Anyways, back to working on the DIY artificial pancreas stuff.
Feb 28 2015 10:24
So, all of the concern about those final 2 differential equations were nothing. I don't have to worry about Michaelis Menten stuff but like that's how they derived the original equations to get them. I cross-referenced another paper, and it appears that the paper I am using has two typos/formatting errors, that make four equations appear as 2. The old paper is correct. I can solve for the initial condition by solving for the steady state variable, but it's nasty, as it's differential equations. Of course, Maple (preferably) or Mathematica can rearrange the equations nicely (without error), to solve for the initial conditions. MATLAB isn
t ideal for that. I only need it for solving for two equations, which I can hard-code into MATLAB. I can solve it by hand, using the quadratic formula, and substituting in a, b, and c for like 10 other variables that are unknown, relative to the quadratic variables
but, it's nasty and it's differential equations
Of course, I am talking to IT at my university to get Maple which I have remote access to, to work. I tried fixing it and I couldn't
I am downloading Mathematica as I type
Feb 28 2015 10:39
Actually, I can use MATLAB, as I have the symbolic toolbox. I guess I am carried away. MATLAB does everything, as far as I am concerned, for this project
Feb 28 2015 11:10
Solved my issue. Of course the steady state variable that I had to solve for is ridiculously long, as there were like 10 variables, approximately, and 9 were represented as "constants" in the quadratic equation, which caused craziness. The chances of anyone getting that right without computer help is nearly impossible. That is the approach that the author told me to use, given that I don't have estimates of the parameters.
now I just have to finish up the diagramming of the DiffEqs in MATLAB, which can be ported into code. This will be the closest proof I have for you guys that this is solvable, although I know it is solvable, from previous experience and just being good at math.
Toby Canning
Feb 28 2015 15:39
For those that don't know the 505 is the lastest Dexcom algorithm used to interpret raw sensor data. Mostly it smooths out noise, but sometimes it smooths out actual BG drops. The problem is, whatever the person's bias is towards the data, we remember the hits and ignore the misses. I don't necessarily agree with the criticism that the 505 is faulty when showing drops in BG because of situations like the one illustrated in the picture above.
Toby Canning
Feb 28 2015 15:51
While I don't think the 505 algorithm is faulty, I do think it is invaluable for knowledgeable PWDs to have access to the raw BG data because that data combined with other variables (like "how do I feel?" and "what is happening physically to me right now?") will allow the user to outperform the 505 in certain circumstances in knowing if the rise/drop is sensor error or real.
Matthias Granberry
Feb 28 2015 16:44
The "how do I feel" part is tricky, though, because after 20+ years of tight control I don't always feel lows early enough to keep them shallow.
Scott Leibrand
Feb 28 2015 17:05
More important than the feels, IMO, is knowing whether there's something that would legitimately be causing a drop or rise.
Unlike the Dex, our systems can know if there's lots of insulin or carb activity, and therefore whether BG should be falling or rising
I agree the 505 algorithm is quite well calibrated to make the best of the info the Dex has available, but it needs to show us the raw data, because we as humans, or systems we build, can do better with more info.
Feb 28 2015 18:48
Yeah, we are smarter than something programmed in series. We think in parallel. :P
Jason Calabrese
Feb 28 2015 19:40
not showing anything when there is heavy noise (???) is a huge problem with the dexcom receiver, they don't even alarm on it
Toby Canning
Feb 28 2015 22:31
@scottleibrand @jasoncalabrese Agreed on all points. When users say a simple slope-intercept calibration is superior to the 505 algorithm, I don't think statistical analysis would actually back that claim up. E.g.," my dexdrip is more accurate than my dexcom." It may be at times more accurate, but my guess in the Dexcom MARD will out perform the dexdrip overall.