Everything about my W’ Bal (W Prime Balance) Connect IQ app

A few weeks ago, I released the first version of my W’ Bal datafield on Garmin Connect IQ. This app is designed to display the remaining value of W’ during a ride on the cyclist’s device. Let’s dig a bit into this interesting value…

garmin_iq_wprime_web

What is W’ Balance ?

To make it simple, assume that a cyclist have a given amount of energy at the beginning of a ride. This value, known as W’ (or W prime) is measured in joules.

While you’re riding at low intensity, W’ remains at it full level, and you can theoretically continue riding at this intensity for a while. But if you push harder, you will start using this energy. The limit at which you will start lowering the W’ is known as CP (Critical Power). At my level, I use to consider my CP and FTP as the same value.

So if you push on the pedals harder than CP, W’ will decrease. As soon as your watts get lower than CP, W’ will “regenerate”, and the value will increase again. So if you ride long enough below CP, W’ will be at 100% again.

All these variation in W’ are expressed as “W’ Bal” in the Dr. Skiba theory, and this value was then implemented on the GoldenCheetah software, on the “Charge” chart of a ride:

wprimebal

You can note on this chart the peaks above CP (the line is going down, as the amount of remaining W’ decrease), and the periods where power is below CP (the line is going up, as the amount of remaining W’ increase).

To be able to compute W’ Bal, we need two values:

  • CP: a given threshold (watts)
  • W’: a given amount of energy (joules)

How to get my CP and W’ values ?

To estimate your CP and W’ values (if you don’t already know them), GoldenCheetah provides a tool in the “Tools -> Estimate CP and W’” menu. Here you can enter you maximum amount of watts for a short effort (3-5min) and a long one (15-60 minutes). Based on that, it will give you an estimation of W’ and CP.

Of course, if you already know your FTP value, you can use it as CP.

Compute methods (the real maths behind the data)

Initially, the only known formula to get W’ Bal was the one from Dr Skiba. It was the one implemented in GoldenCheetah at the beginning. On my data field, it’s called “integral” and it’s the default method, just because I prefer it… This formula uses another parameter to define the speed at which W’ is regenerating when the power is below CP. This value is known as TAU, and it’s based on the activity history.

The second method, by Froncioni / Clarke only use current power to compute recovery, so with this formula, W’ Bal will usually regenerate faster, and decrease faster as well. It’s now the default method on GoldenCheetah. It’s known as “differential” and available starting from version 1.2 on my data field, but you have to configure “compute method” parameter to “differential” instead of “integral”.

What is the difference between the two formulas? This one:

wprime

The blue line is the differential formula (the one used by default in GoldenCheetah). The red is the integral formula of Dr. Skiba. Values here are for a mixed field test (5min VO2Max, 10 min recovery, 20 min FTP test).

The only advice I can give you is: try both formulas and choose the one you prefer. Science has not yet validated one against the other.

Where can I get this app ?

First, you will need to ensure your Garmin device is compatible with Connect IQ apps, and has an updated firmware. Compatible devices with powermeters and Connect IQ are, at the time of writing are:

  • Forerunner 920XT
  • Fenix 3 / Fenix 3 HR
  • Edge 1000
  • Edge 520
  • Epix

Then, go to the Connect IQ store on Garmin Connect Mobile, or directly at this page: https://apps.garmin.com/en-US/apps/6dcfffe5-cd3d-41f3-8ba3-13fa0647b003 and get the stuff.

You will have to change the three parameters to suit your values (CP, W’ and Method).

Can I get the sources ?

Yep, all the source code is available on Github here.

Anything else ?

Feel free to leave a comment to this entry for any feature request, bug, advice or question. Enjoy your ride!

18 thoughts on “Everything about my W’ Bal (W Prime Balance) Connect IQ app”

  1. I didn’t see the instructions to change the Cp and W’. To update the them do I have to do it directly on the source code lines;
    // Constants
    var CP; // = 250;
    var WPRIME; // = 20000;

    Thanks,
    Azari

  2. Hi Nakan,
    I’m using this app and I find It really useful!
    I was wondering if time to exaustion and time to recharge are data that it’s possible to see as data field.
    I think it would be really useful when doing intervals.
    What do you think?

    Amazing job by the way.. thanks for sharing the source code.

    Paolo

    1. Hi Paolo,

      Thanks for your message! The hard work in computing TTE is the W’Bal value. If you have it, the work is almost done. I don’t know if there is “standard” way to compute TTE, as we have to smooth the last seconds power data to estimate, if the decreasing rate of W’Bal is steady, when W’Bal will reach zero.

      I didn’t have much time right now, but will definitely continue my work on matches app, and have a look at TTE (and also Time To Recovery), and if it’s not too complicated to implement, why not release a dedicated app for these values !

      Greg

  3. Hi Nakan,
    i have been reading some articles on how critical heart rate could be used instead of critical power for running.
    i want to do an app which does wbal for the heart rate, which could be used for running in a similar way of what your app does for cycling with a power meter.
    i am going to fork your source code. i hope it is ok for you. of course if i release an app, i will mention you 🙂

    thanks and keep the good work!

    1. Hi Dani,

      Thanks for your message. Sure, the code is out exactly for this kind of purpose so you are more than welcome to fork it!

      Looking forward for news about your app !

      Best.

  4. Hi Nakan,

    Thanks for the great article and software update. Is there any way we could get an update for the edge 500?

    Kind regards

    Dorian

    1. Hi Dorian,

      Thanks for the message. Unfortunatly, the Edge 500 is not Connect IQ capable and because of that it’s simly impossible to add third party apps or code on this bike computer. You will have to upgrade to the 520 at least to be able to enjoy IQ apps on the computer.

      Best.

  5. Hello,

    I just started using the app and am stoked on the idea. The remaining kj displayed on my 520 didn’t go down as much as when compared to golden cheetah afterwards. I think I had the values in accurately. (using 375 CP & 35000 w’) Those numbers can fluctuate a little bit, but as pretty useful for reviewing the data on GC. Any ideas?

    Thanks!

    Mark

  6. Your app is great. Any chance you could copy the code and spin up one for Running? Replacing Power with Pace.

    Also, a 2nd vote for adding TTE. Simply,…. TTE (in seconds) = W’ bal/(Current Power – Critical Power). You may have to smooth or average a little depending on the input of Current Power (or take a 10s avg power as input,..however you want). May want to display TTE in mm:ss also. B/c we can only add 2 apps in data fields (on watches) would be ideal to not make separate app for TTE, rather can have D’ balance % and TTE in same one 🙂

    Thanks!
    Best,
    BK

  7. Hi Nakan,

    Love your product! Finally we have something to cycling against and reflecting real time. Thank you.

    I notice couple thing, actually questions:

    1./ The W’ Balance value is a bit lower than Golden Cheetah (GC) through out the cycling ride. Probably 3.0KJ lower than GC. However, it seems to reflect the true personal “battery”. When I hit 0′ Watt, I could not do anymore work unless it came back up a little bit let’s say 2 or 3Watts. So why is it lower than GC? All the parameters for W’ field I got them from GC.

    2./ Is the value of W’ Balance record somewhere? I look and the values available seem to be from GC itself and not W’ Balance.

    Thanks,
    MN

  8. Nakan,

    A great app, thanks.

    One question, which model is used to model the power curve I.e extended, 2 parameter, ward smith etc. and is the option available to select a different model?

    Thanks,
    Richard

  9. Hello Nakan,

    Thank you for this app, really nice.

    Just wandering, how to get graph in Connect after training? I can’t find it. I see W’ during training only.

    Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *