-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to set up the input/Controller in this repo to determine the basal rate with only insulin input (without meal)? #30
Comments
Hi, you can only control the insulin through the action of the environment. Do you mean you want to also change CHO through the action? |
I update my description of the question. Looking forward to your future reply. Thanks a lot. |
BBController needs meal information (how much carb is taken by the patient currently) to determine the bolus amount, but this meal information is not necessary for a controller. You can definitely specify an insulin amount without the meal information. For example PIDController does not use the meal information at all. The P, I and D parameters need to be tuned carefully to have acceptable performance. Setting all of them to 1 might not be a good idea. Ideally, if you are using BBController, and there is no meal intake at all (you can setup custom scenario with all the meal amount to be 0), the glucose level should be staying at its balance point, which might not be 120 (it varies among patients). If you want to make the glucose level stabilized at arbitrary level by changing the basal rate, then I would say this is a super hard problem since it is a nonlinear system. It took my whole PhD years to figure this out by designing various controllers. I don't have a good answer for it, and that is also the purpose I created this environment to train AI to accomplish that :). |
Thank you for your detailed explanation. I'm thinking about your suggestion. |
Hi all! My goal is to obtain simulations showing hyper- and hypo-glycemia events during one of the windows (t 30 min, 60 min and 120 min after meal). From the preivous answers, I have interpreted that the BBcontroller can be tuned in terms of meal quantity but it is not recommended to alter the basal and bolus rates due to the complexity of the system. Therefore, I assume that my first attempt is wrong. I was wondering if it is a good approach to modify the target so that I can generate hypo and hyper-glycemia events. Thanks in advance! |
I think your approach of changing the bolus to 1/10 or 10x of the original amount is good to generate hypo hyper-glycemia events. Modifying target (I assume you mean the target here
|
Thank you a lot for the reply!
|
I read the code of this repo. Your code is well-written. However, I think I need more clarification about the tutorial to better understand how to use your repo correctly.
In your tutorial, you give an example of BBcontroller that changes the meal "scen=[(7,45), ...]" as input. To my understanding, in BBController the insulin = basal (determined by patient) + bolus (meal). We couldn't change insulin input without meals here, right?
I also try PIDController, which seems to change the insulin intake instead (if I understand correctly). However, the results show that BG drops very quickly (PIDController(P=1, I=1, D=1, target=120)).
My question is: how to set up the input/Controller in your repo to determine the basal rate that makes the BG be a fixed number, let's say 120, if I want to only control the insulin as the input (without meal).
Any hints would be helpful. Thanks in advance.
The text was updated successfully, but these errors were encountered: