importing blood glucose/insulin data into golden cheetah

62 views
Skip to first unread message

Anne

unread,
Apr 10, 2011, 6:50:37 PM4/10/11
to golden-cheetah-users, amfi...@gmail.com
hi all,
At the risk of coming across as not as technologically savvy as the
users posting here, I wanted to put out a query. I just recently
started using a powertap device and am finally in a position to work
towards my long-time goal/dream of integrating power information with
blood glucose/insulin/carbohydrate-intake data. I've had type 1
diabetes for >20 years and am currently racing for Team Type 1 women's
cycling team.

I am trying to figure out if my C++ programming skills can be revived
from college or if it better to seek out someone with the skills and
interest to help me. I am familiar with matlab and shell scripting
since everything I do at work is on Linux, and am reasonably good at
deciphering/modifying code if I know where to look. Anyway, I am
trying to prepare a proposal by April 29 to receive a modest amount of
funding to do this in the case that I find someone else to do the
programming.

In my experience, the correlation between power output and effect on
blood glucose is strong and also non-linear. For example, when I do a
crit, my blood sugar will rise dramatically if I don't give extra
insulin. On the other hand, a long endurance ride will generally
cause my blood sugar to drop. Today I did a group ride for 1:30 and
my blood sugar went up to 350 (very high) but once I started the
endurance phase, I had to start eating to prevent low blood sugar.
This is thought to be due to adrenalin stimulating the liver to
breakdown glycogen-->glucose. I would like to make a power-glucose
analysis tool available to all. I have access to many top-level
athletes with type 1 diabetes for what metrics would be most useful,
as well as my own experience, but need more guidance on the
programming aspect.

I would like to import data from the following devices:
blood glucose meter
continuous glucose meter
insulin pump
manual entry for carbohydrates (g)
There are devices to bring the data into a Windows PC (unfortunately
not mac compatible!! blech). I need to double-check and see if the
data is in any standard format.

If you think this might interest you, or have any advice on the best
way for me to get started, please send me a note. Long-term, I hope
to develop this into a research tool that could be useful to athletes
with diabetes and those without!

Cheers,
Anne Findlay

Fredrik

unread,
Apr 11, 2011, 3:09:26 AM4/11/11
to golden-cheetah-users
Anne,

I would start with importing all the data in Matlab (or GNU Octave)
first and then work on designing a good model for your problem (Matlab/
Octave can read text data so that is probably easiest way to import
data - just a table of the values). After you have found a good model
(and a good method to estimate the model parameters) then you can
implement it in C++ for GC.

I would also start with a linear model before developing more advanced
non-linear ones. One usually get a closed form solution for your
estimation problem then; non-linear problems often require iterative
methods to estimate the model parameters. You can, for example,
vectorize your input and output data (all inputs in a column vector u
and all outputs in a column vector y) and write the model as:

y = Au + m + e

where e is the model error "noise" vector and A is your model matrix
and m is a constant model vector. In the general non-linear case you
have a (non-linear) function, f, instead of the matrix A and the
vector m:

y = f(theta,u) + e

where theta is a model parameter vector. Finding the "best" model is
not easy but you can at least compare different models against each
other by (Baysian) model comparison (I can give some refs if you are
interested).

Hope this helps

/Fredrik

Anne Findlay

unread,
Apr 11, 2011, 4:04:47 PM4/11/11
to golden-cheetah-users
Thanks, Fredrik--very helpful suggestions for getting started and for thinking about how to model the system.

One of the difficulties of dealing with this is the currently painstaking nature of getting all the data in the same place.  (This should be the easy part from my POV.)  Also, there are many variables that have a significant effect on blood glucose--insulin recently injected, ongoing basal insulin infusion rates (from insulin pump) or basal insulin (injection), power output, weather, stress/anxiety level, food, starting blood glucose value.  One of the most initially (at least) valuable things for me and other type 1 athletes would be to see the data graphically to try and get a general understanding of what is going on.  Right now the hold up is just getting all the data in a manipulable display. 

I guess I could try and develop some matlab program to read in the data from the various devices and come up with some useful metrics.  For example, what would be very interesting is to see under what blood glucose/insulin/food conditions the power is consistently the highest with lowest heartrate--sort of like optimizing cadence.
cheers,
Anne


--
_______________________________________________
Golden-Cheetah-Users mailing list
golden-che...@googlegroups.com
http://groups.google.com/group/golden-cheetah-users?hl=en



--
annetics.blogspot.com
Reply all
Reply to author
Forward
0 new messages