These are chat archives for nightscout/intend-to-bolus
So I have some good news. Keep in mind that I have never took a class on controls, and I have learned "as I have went along". Since I already have a copy of a controller (updated version--not available--is being used at UVa and Stanford outpatient clinical trials), I can use that and I don't need to program Hovorka's models from scratch to use it on an "AP". There are issues with that though, as some components are missing or have to be modified (i.e. modeling the Dexcom G4 sensor error)
However, if we want an open-source controller, which I wholeheartedly want to do, and plus, I love this project, I will have to program the mathematical models and use MATLAB to design a new controller. This is not as difficult as it sounds. I have been watching webinars and it doesn't look remotely as hard as the stuff I have been doing.
So there are technically three ways I can approach the open-source controller: 1. Program and design the mathematical models using statistical methods for solving for the parameters 2. Take a shortcut and use nonlinear recursive least squares regression in MATLAB using System Indentification Toolbox, which is way, way, easier and will save time. 3. Use both and have one override the other if there is less error.
I intend on doing option 3, but implementing option 2 first and just adding on from there. I have made it a long ways on the statistical stuff, and I am not afraid of it, but it's just not the nicest thing to do in MATLAB, so I want to proceed with care.
83, ftw. Not going to bed. Feel too terrible.
I don't know which way of solving the models is easier, but a controller can be created straight from the models, of course. I think I am going to solve it the way the paper says to. I don't want to take any risks.