# Error-prone growth calculation

**URL:** <https://forum.pioreactor.com/t/error-prone-growth-calculation/678>\
**Category:** Software\
**Created:** [February 27, 2025, 1:06am UTC](https://forum.pioreactor.com/t/error-prone-growth-calculation/678 "2025-02-27T01:06:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![xykb86](https://forum.pioreactor.com/letter_avatar_proxy/v4/letter/x/9f8e36/32.png) [@xykb86](https://forum.pioreactor.com/u/xykb86)\
**Post date:** [February 27, 2025, 1:06am UTC](https://forum.pioreactor.com/t/error-prone-growth-calculation/678/1 "2025-02-27T01:06:47Z")

</div>

Hi developers,  
Ever since update to the latest version (25.2.20), growth rate calculation becomes erroneous. As shown in the figure, it seems that the filter made a mistake in generating current/initial OD which resulted a jump in grwoth rate.

Any suggestion in how to tune the parameters?

 ![image](https://forum.pioreactor.com/uploads/default/original/1X/591fff3d7fd5d1d538b8d873a65e778970922eac.jpeg)

---

<div class="post-metadata">

**Author:** ![xykb86](https://forum.pioreactor.com/letter_avatar_proxy/v4/letter/x/9f8e36/32.png) [@xykb86](https://forum.pioreactor.com/u/xykb86)\
**Post date:** [February 27, 2025, 1:11am UTC](https://forum.pioreactor.com/t/error-prone-growth-calculation/678/2 "2025-02-27T01:11:29Z")

</div>

Indeed, instead of processing the noisy OD readings and having hard time extracting growth rate herein, calculating growth rate from volume turnover, provided dosing is on, is a more reliable and simpler. Is it possible to implement this new way of growt rate calculation?

---

<div class="post-metadata">

**Author:** ![CamDavidsonPilon](https://forum.pioreactor.com/user_avatar/forum.pioreactor.com/camdavidsonpilon/32/3_2.png) [@CamDavidsonPilon](https://forum.pioreactor.com/u/CamDavidsonPilon)\
**Post date:** [February 27, 2025, 1:14am UTC](https://forum.pioreactor.com/t/error-prone-growth-calculation/678/3 "2025-02-27T01:14:20Z")

</div>

Hi @xykb86,

We’ll try to determine what might be happening tomorrow. Did you happen to restart the growth-rate job around that point? Is this constantly happening, or just a problem for this experiment / pioreactor?

* * *

> Indeed, instead of processing the noisy OD readings and having hard time extracting growth rate herein, calculating growth rate from volume turnover, provided dosing is on, is a more reliable and simpler. Is it possible to implement this new way of growt rate calculation?

It’s a neat idea, but I don’t think we’ll implement this natively - not everyone uses dosing for their growth curves.

---

<div class="post-metadata">

**Author:** ![xykb86](https://forum.pioreactor.com/letter_avatar_proxy/v4/letter/x/9f8e36/32.png) [@xykb86](https://forum.pioreactor.com/u/xykb86)\
**Post date:** [February 27, 2025, 1:18am UTC](https://forum.pioreactor.com/t/error-prone-growth-calculation/678/4 "2025-02-27T01:18:20Z")

</div>

Hi Cam,  
Did you happen to restart the growth-rate job around that point?  
——no, the whole run is continuous without stops.

Is this constantly happening, or just a problem for this experiment / pioreactor?  
——This problem is across the board with multiple devices. The following is another example.

 ![image](https://forum.pioreactor.com/uploads/default/original/1X/cf94eee60c6701f8d150960c54e5f8903fa51934.jpeg)

---

<div class="post-metadata">

**Author:** ![CamDavidsonPilon](https://forum.pioreactor.com/user_avatar/forum.pioreactor.com/camdavidsonpilon/32/3_2.png) [@CamDavidsonPilon](https://forum.pioreactor.com/u/CamDavidsonPilon)\
**Post date:** [February 27, 2025, 1:22am UTC](https://forum.pioreactor.com/t/error-prone-growth-calculation/678/5 "2025-02-27T01:22:04Z")

</div>

Yuck! Something is very wrong if you’re seeing negative Normalized ODs.

Can you send us the

1. OD readings,
2. normalized OD Readings,
3. logs

exported data for either of these experiments? Send to [cam@pioreactor.com](mailto:cam@pioreactor.com) please.

---

<div class="post-metadata">

**Author:** ![CamDavidsonPilon](https://forum.pioreactor.com/user_avatar/forum.pioreactor.com/camdavidsonpilon/32/3_2.png) [@CamDavidsonPilon](https://forum.pioreactor.com/u/CamDavidsonPilon)\
**Post date:** [February 28, 2025, 11:54am UTC](https://forum.pioreactor.com/t/error-prone-growth-calculation/678/6 "2025-02-28T11:54:55Z")

</div>

I’ll try to replicate it locally today. My best guess after looking at the data is some numerical instability in the Kalman Filter inference.

---

<div class="post-metadata">

**Author:** ![CamDavidsonPilon](https://forum.pioreactor.com/user_avatar/forum.pioreactor.com/camdavidsonpilon/32/3_2.png) [@CamDavidsonPilon](https://forum.pioreactor.com/u/CamDavidsonPilon)\
**Post date:** [March 1, 2025, 12:49am UTC](https://forum.pioreactor.com/t/error-prone-growth-calculation/678/7 "2025-03-01T00:49:03Z")

</div>

Hi @xykb86,

So I “replayed” the GR and nOD inference using your od readings - and I successfully replicated the bug!

We have an update and improvement to the algorithm for the next release, but here’s what you can do now. Change the `ekf_outlier_std_threshold` config parameter from 3.0 to something like 10.0.

---

<div class="post-metadata">

**Author:** ![xykb86](https://forum.pioreactor.com/letter_avatar_proxy/v4/letter/x/9f8e36/32.png) [@xykb86](https://forum.pioreactor.com/u/xykb86)\
**Post date:** [March 1, 2025, 1:12am UTC](https://forum.pioreactor.com/t/error-prone-growth-calculation/678/8 "2025-03-01T01:12:51Z")

</div>

> [@CamDavidsonPilon](#):
>
> have an update and improvement to the algorithm for the next release, but here’s what you can do

Thanks a lot! Already implemented!
