Workout Planner: Training Load Calculation Issue

Hi,

Love the application!

I’m noticing some unexpected behavior in the training load calculation in the bike workout planner. Here’s are several inputs that I used to try to isolate the issue:

  1. Workout steps:
    -60m 100%
    => Load 100 - correct

  2. Workout steps:
    -60m 50%
    => Load 25 - correct

  3. Workout steps:
    -60m 50%
    -60m 100%
    => Load 145 - wrong - should be 125

  4. Workout steps (first step incomplete definition)
    -60m
    -60m 100%
    => Load 142 - wrong since there is no full step definition…

  5. Workout steps:
    -60m 100%
    -60m 100%
    => Load 200 - correct

I wonder if this might also affect the activity load calculation which seems to be an overestimate compared to the formula implemented below from the P.F.Skiba training book. Custom stream calculation for the training load of the activity:

{
  let time = icu.streams.time;
  let watts = icu.streams.fixed_watts;
  let ftp = icu.activity.icu_ftp;

  // exponentially weighted moving average
  let ewma = new Array(time.length);

  // normalized "physiological" power: 
  // 50% ftp => 25% physiological effect
  // 100% ftp => 100% physiological effect
  // 200% ftp => 400% physiological effect
  let np = new Array(time.length);

  ewma[0] = watts[0];
  np[0] = (ewma[0] / ftp) ** 2;

  // data will be the activity training load (integral of physiological effect)
  // 60 minutes at 100% ftp = 100 training load
  data[0] = 0.0;

  let movAvgSamples = 26; 

  for (let i = 1; i < time.length; i++) {
    let totalWeight = Math.min(i+1, movAvgSamples);
    let prevWeight = totalWeight - 1;
    ewma[i] = (watts[i] / totalWeight) + (ewma[i-1] * prevWeight / totalWeight);
    np[i] = (ewma[i] / ftp) ** 2;

    let dt = time[i] - time[i-1];
    data[i] = data[i-1] + (np[i] * dt / 36.0);
  }
}

Thanks for looking at this!

  • Aleksey

The calculation of TSS/Load = IF^2 * 100 * hours

Intervals is using the TrainingPeaks method for load calculation which is the formula mentioned by @R2Tom. Results are only slightly different then Skiba’s formula. I think you made a mistake somewhere.
IF is calculated as the Normalized Power. That’s a 30sec rolling avg of the power ^4, and then the fourth root of the resulting value.
In the above case number 3, the IF would be around 85.
Fourth root of (100^4 + 50^4) / 2 = 85.37
Result should then be (if I didn’t make a mistake …)
0.8537^2 * 100 * 2 = 145.77

Details of Skiba’s formula (Bike score iso TSS and xPower iso NP) can be found here:
https://perfprostudio.com/Help/BikeScore.htm

1 Like

Thank you both for looking at this! I will read more and try again.

However, I may still be confused in the workout planner, or there may still be an issue calculating the intensity (Case 3 and 4 seem strange, but case 5 and 6 are especially unexpected):

  1. 60m 100% => Intensity 100%

  2. 10m 100% => Intensity 100%

  3. 1m 100% => Intensity 14% - Strange

  4. 45s 100% => Intensity 11% - Strange

  5. 10s 100% => Intensity 24% - Going back up

  6. 10s 200% => Intensity 24% - No change

Thanks again!
Aleksey

And that is because NP doesn’t make sense for such short duration if you look at it ‘isolated’. NP is a 30s rolling average. It works OK if you insert those shorter spikes in a longer workout.
Believe me, there’s no error in the calculation. There are a couple of flaws caused by math limitations. And it isn’t taxing all kind of rides equally good, but overall it does the job.
You should not look at blocks on its own, you have to judge on a complete workout.
If what you did was considered ‘correct’, a ride of 2 hours at 75% compared to 1 hour at 100% in combination with 1 hour at 50% would be considered equally taxing. We all know that the first one is soo much easier then the second one…

Thanks for your patience! This doesn’t feel intuitive, so I’ll have to keep trying to understand.

I think you are looking at this from the point of ‘Work Done’ where you would be correct.
But the intention here is to look at it from the point of how much stress a workout creates for the body and how easy/difficult it will be to recover from that. Anything below 70-75% FTP is usually quite easy to recover from by the next 24-48 hours. Efforts around and above FTP can leave you sore for multiple days and will need a lot more recovery time. That’s why NP uses a 30sec rolling avg of te power values to the fourth power. The higher the power output, the more ‘load’ it will create, and that’s not linear but exponential. That represents the load on the body better.

I think I’m also getting confused because the book in front of me shows a plot of the relationship between CP and physiological effect as a power of 2 (showing that 200% CP => 4x impact on physiology), but the words are saying 4th power (which would mean 200% CP => 16x impact on physiology)

I’ll update my streams to use the formulas you provided as they seem to be the standard understanding.

Thank you!
– Aleksey