nightscout / AndroidAPS

Opensource automated insulin delivery system (closed loop)
https://wiki.aaps.app
GNU Affero General Public License v3.0
695 stars 1.7k forks source link

Auto-increase CHO and not decrease problem #3343

Open lostboy86 opened 4 months ago

lostboy86 commented 4 months ago

Install yesterday the latest dev build eb3fa57744-2024.05.18.

I see my cho inserted with calc or normally, not decrease with time, sometimes autoincrease, very dangerous. Yesterday i eat 189 CHO at 18.25 p.m. and this morning at 7 oclock i have 70cho remains, and after 10 minutes, increased to 80cho, without doing nothing.

DynamicISF enable.

Same thing happens with 3bb0705a03-2024.04.02 I try everything :

stop app and reopen reboot phone clean stats clean db suspect for ns 15.0.3 dev (but with another previous build installed, all work normally and cho decrease with time)

See the attachments (pay attention to the graphs of the first photo from yesterday)

photo_1_2024-05-19_16-51-14 photo_3_2024-05-19_16-51-14 photo_4_2024-05-19_16-51-14

i also attach the full log and the defaults log

AndroidAPS_LOG_1716129971548.log.zip AndroidAPS_LOG_1716129949467.log.zip

robertrub commented 4 months ago

It doesn't increase in my case but the carb reduction is much slower than usual. 37g after 3 hours are still there...

I use "basic" OpenAPS SMB algorithm.

Screenshot_20240521_120142_AAPS.jpg

Screenshot_20240519_173817_AAPS.jpg

lostboy86 commented 4 months ago

Yes, sometimes too slow also for me the decrease

Il mar 21 mag 2024, 12:03 Robrub @.***> ha scritto:

It doesn't increase in my case but the carb reduction is much slower than usual. 37g after 3 hours are still there...

Screenshot_20240521_120142_AAPS.jpg (view on web) https://github.com/nightscout/AndroidAPS/assets/76626474/d5961734-a9b9-4d97-9515-5cb5aea57e25

Screenshot_20240519_173817_AAPS.jpg (view on web) https://github.com/nightscout/AndroidAPS/assets/76626474/cad33b2e-8cb7-4ff8-b7ba-34103c0823b7

— Reply to this email directly, view it on GitHub https://github.com/nightscout/AndroidAPS/issues/3343#issuecomment-2122253662, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QQCNUVSVH2V4OUB5W3ZDMLYFAVCNFSM6AAAAABH6NZNAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRSGI2TGNRWGI . You are receiving this because you authored the thread.Message ID: @.***>

Philoul commented 3 months ago

Sorry for having being slow to understand your screenshots... 16h36 49g (DynISF selected ISF 169 instead of 60 in profile) 16h26 48g (but here I don't see variable ISF value). => was DynISF enabled at 16h26?

In 16h26 screenshot I can see an issue in -BGI curve at about 15h10 that have been fixed in screenshot done at 16h36. (your secondary curves settings definitively doesn't help analysis with too many things not comparable together). Please don't mix DEV and -BGI (generally together alone on same subgraph) with COB.

For your safety, forget DynISF for now... When you see an ISF value 2.5 higher (or lower) than your profile, it's OFF so not working for you...

lostboy86 commented 3 months ago

The problem Is not the graphs, but the COB value.

Sometimes cob for example was 70, After 10 minutes , its 80.

Sometimes its 0 cob (end decay cob meal) but goes up After 10 minutes to 1 or 2 cho.

For me the Dynamic work very well, 92-97% in range with 1500gr cho for 3 days, but i suspect this problem not related with DynISF, because on fb group aaps users there Is others users with cho very long decay problem

Il gio 30 mag 2024, 09:00 Philoul @.***> ha scritto:

Sorry for having being slow to understand your screenshots... 16h36 49g (DynISF selected ISF 169 instead of 60 in profile) 16h26 48g (but here I don't see variable ISF value). => was DynISF enabled at 16h26?

In 16h26 screenshot I can see an issue in -BGI curve at about 15h10 that have been fixed in screenshot done at 16h36. (your secondary curves settings definitively doesn't help analysis with too many things not comparable together). Please don't mix DEV and -BGI (generally together alone on same subgraph) with COB.

For your safety, forget DynISF for now... When you see an ISF value 2.5 higher (or lower) than your profile, it's OFF so not working for you...

— Reply to this email directly, view it on GitHub https://github.com/nightscout/AndroidAPS/issues/3343#issuecomment-2138815871, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QRDC7IDVWOVICOFFJLZE3FA3AVCNFSM6AAAAABH6NZNAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZYHAYTKOBXGE . You are receiving this because you authored the thread.Message ID: @.***>

robertrub commented 3 months ago

@lostboy86 The COB value (residual CHO) is calculated using ISF. When your ISF changes drastically (as it happens with DynISF), your COB will change too.

If you turn OFF DynISF, you can check if COB values get back to normal. This test will enable all to see where the problem originates.

Also, 500g carbs (CHO) per day will take a very long time to be used.

lostboy86 commented 3 months ago

Thanks for explaining well. With calculation ISF, the COB value can be increase automatically with DynISF?

Il giorno gio 30 mag 2024 alle ore 09:41 Robrub @.***> ha scritto:

@lostboy86 https://github.com/lostboy86 The COB value (residual CHO) is calculated using ISF. When your ISF changes drastically (as it happens with DynISF), your COB will change too.

If you turn OFF DynISF, you can check if COB values get back to normal. This test will enable all to see where the problem originates.

— Reply to this email directly, view it on GitHub https://github.com/nightscout/AndroidAPS/issues/3343#issuecomment-2138878819, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QTHHCEAUDJ7UIODWV3ZE3JZHAVCNFSM6AAAAABH6NZNAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZYHA3TQOBRHE . You are receiving this because you were mentioned.Message ID: @.***>

lostboy86 commented 3 months ago

https://www.facebook.com/groups/AndroidAPSUsers/permalink/3775078956046827/

Is this related?

Philoul commented 3 months ago

To explain how calculation is done for COB decay, you start from Insulin activity in Units per 5min (how many units are absorbed between 2 BG values (see Insulin curves)

With ISF you calculate how many you BG value should decrease due to insulin only (mg/dl /5min or mmol/l / 5min) => this is -BGI curve (always shown in mg/dl in curve scale whatever unit selected by user).

Then the Real BG value is received, and often different that the one calculated with insulin only. The difference between BG received from CGM and BG expected with insulin only is called deviation (mg/dl / 5min) and will be used to calculate amount of Carbs consumed to "increase" BG value during 5 min... (DEV curve).

For example if BG should decrease by 10mg/dl during 5 min due to insulin, but in reality it increased by 5 mg/dl. then deviation bar will be 5 mg/dl greater than -BGI curve, and the 15 mg/dl value (+5 - (-10)) will be used to calculate COB decay.

The factor to convert Deviation (mg/dl / 5min) to Absorbed Carbs is IC/ISF... (IC/ISF is also called Carb Sensitivity Factor (CSF) and unit is g / mg/dl ), so Deviation * CSF will be in g / 5min, so number of Carbs absorbed during 5min. This iterative calculation is done again every 5 min...

If Deviation value is too small (so carbs absorption too small), then there is a safety parameter (min_5m_carbimpact) that will fix the minimum value to calculate COB absorption (and the minimum reduction slope of COB will be min_5m_carbimpact * IC /ISF).

having an ISF value 3 or 4 times higher can have a huge impact on COB absorption speed if IC remains unchanged.

We should also check the impact on COB value shown in overview when you have important variation of ISF during the period of meal absorption...

There is an additional safety parameter (max meal duration), that will directly replaced remaining COB of a meal to 0 if meal is too old...

ArthurusDent commented 3 months ago

I have seen problems with carb decay twice now. I'm on bb1a276078, which is the regular 3.2.0.3.

I'm using OpenAPS SMB.

Nightscout 15.0.2.

This occurred on 27-05-24.

Other than re-adding the carbs as described below, I didn't try anything else to solve the problem, so no restarts, no database reset.

I didn't take a screenshot from AAPS at the time but it was still visible in NS: Screenshot_20240530_213713

When I noticed that the 45 g of carbs did not decay correctly, I deleted the carb entry in AAPS and then re-added the carbs, once as 45 g, then deleted those again and re-added just 35 g. This is what you can see here. Keep in mind that in the list this seems to have happened at around 10:15, when in reality re-adding happened maybe three or more hours later. Screenshot 2024-05-30 at 21-35-24 204 3 →

Logs: AndroidAPS._2024-05-27_02-00-19_1.zip AndroidAPS._2024-05-27_02-00-19_2.zip

lostboy86 commented 3 months ago

Screenshot_2024-06-01-15-05-58-99_3eaa31bb2c2a38a1c605d9dc918cf694 Screenshot_2024-06-01-15-07-59-50_572064f74bd5f9fa804b05334aa4f912 Screenshot_2024-06-01-15-08-35-17_3eaa31bb2c2a38a1c605d9dc918cf694 Screenshot_2024-06-01-15-12-34-73_3eaa31bb2c2a38a1c605d9dc918cf694 Screenshot_2024-06-01-15-01-43-39_3eaa31bb2c2a38a1c605d9dc918cf694

I screenshot the bug (pay attention with COB value and phone timestamp in the upper status bar.

Cob increase from 1 tò 2, then 0, then lockscreen 2, etc

robertrub commented 3 months ago

@lostboy86 In this case, the differences are very small and can be related to your changing ISF (due to DynISF) and rounding up or down. 0.5g will be rounded to 1 but 0.4 will be rounded to 0.

I copied them in chronological order

Screenshot_20240601_215130_Samsung Notes.jpg

lostboy86 commented 3 months ago

I have found (no screenshot) the case then i have 70, then 84, then 68 in 10 minutes

Il sab 1 giu 2024, 21:55 Robrub @.***> ha scritto:

@lostboy86 https://github.com/lostboy86 In tviscase, the differences are very small and can be related to your changing ISF (due to DynISF) and rounding up or down. 0.5g will be rounded to 1 but 0.4 will be rounded to 0.

I copied them in chronological order

Screenshot_20240601_215130_Samsung.Notes.jpg (view on web) https://github.com/nightscout/AndroidAPS/assets/76626474/60ca9456-d6e1-4b75-8b7d-a92dc1f212f4

— Reply to this email directly, view it on GitHub https://github.com/nightscout/AndroidAPS/issues/3343#issuecomment-2143565744, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QST4OTILNF46ZR5CG3ZFIRKBAVCNFSM6AAAAABH6NZNAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBTGU3DKNZUGQ . You are receiving this because you were mentioned.Message ID: @.***>

robertrub commented 3 months ago

@lostboy86 As I said, it depends on your ISF and that changes all the time with DynISF. You need COB and ISF

lostboy86 commented 3 months ago

Yes, but this not the decay, but the value of COB.

Cob its impossible to increase, wherever the isf value.

Il sab 1 giu 2024, 22:19 Robrub @.***> ha scritto:

@lostboy86 https://github.com/lostboy86 As I said, it depends on your ISF and that changes all the time with DynISF. You need COB and ISF

— Reply to this email directly, view it on GitHub https://github.com/nightscout/AndroidAPS/issues/3343#issuecomment-2143573342, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMW5QVKDQLAYYJN7DRRIGDZFIUGTAVCNFSM6AAAAABH6NZNAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBTGU3TGMZUGI . You are receiving this because you were mentioned.Message ID: @.***>