# Negative W'ball and how to adjust

**URL:** <https://forum.intervals.icu/t/negative-wball-and-how-to-adjust/20556>\
**Category:** Uncategorized\
**Created:** [27 September 2022 17:48 UTC](https://forum.intervals.icu/t/negative-wball-and-how-to-adjust/20556 "2022-09-27T17:48:33Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Olly\_Thomas](https://forum.intervals.icu/user_avatar/forum.intervals.icu/olly_thomas/32/28972_2.png) [@Olly\_Thomas](https://forum.intervals.icu/u/Olly_Thomas)\
**Post date:** [29 September 2022 14:38 UTC](https://forum.intervals.icu/t/negative-wball-and-how-to-adjust/20556/8 "2022-09-29T14:38:48Z")

</div>

> [@Mario1](#):
>
> I guess there is a lot I don’t understand yet about how the W’ and W’bal are implemented in intervals.icu. Is there documentation anywhere that I can refer to?

I’m afraid I don’t have anything specific but this thread has lots of snippers of info in etc. including the algorithm that intervals.icu uses to calculate W’

> [@Using W balance](https://forum.intervals.icu/t/using-w-balance/804):
>
> Hello guys, I am a French mid pack triathlete passionate on sports physiology and training. I am also a MD. I am curious to implement W’ monitoring during my HIIT sessions. Would you be kind enough to tell me if it’s useful ? Maybe to adjust dynamically intervals like Xert does ? Where should I start my reading then ? I have seen apps on the Connect IQ store since I use Garmin devices and I have seen that there are 2 différents methods to compute the W’ (integral and differential), what is the…

This post from within the thread might also be useful…

> [@W' and CP settings help](https://forum.intervals.icu/t/w-and-cp-settings-help/1155/21):
>
> Intervals.icu uses the differential algorithm. Here is the code that computes it: let wb = wPrime let pt = 0 for (let i = 0; i \< data.length; i++) { let t = time[i] let secs = t - pt let deltaW = cp - data[i] if (deltaW \> 0) { for (let j = 0; j \< secs; j++) wb += deltaW \* (wPrime - wb) / wPrime } else { wb += deltaW \* secs } data[i] = Math.floor(wb) pt = t } I found a nice writeup here:

[https://medium.com/critical-powers/comparison-of-wbalance-algorithms-8838173e2c15](https://medium.com/critical-powers/comparison-of-wbalance-algorithms-8838173e2c15)

Caveat: info might be outdated…

---

_[View the full topic](https://forum.intervals.icu/t/negative-wball-and-how-to-adjust/20556)._
