Bug in Zwiftpower calculating categories

When doing some checks for Mad Monday races tonight, I noticed a bug in Zwiftpower calculating the category correctly. It’s likely a rare bug, but reporting this nevertheless:

Have a look at the following profile (ID 1433063):

This person’s best 3 efforts in last 90 days (95% of 20 minute) are 2.894 w/kg, 2.850 w/kg and 2.806 w/kg. However, somehow Zwiftpower is not using the 2.850 w/kg for the calculation.

Educated guess as a dev myself: perhaps the script is grouping the best efforts of a person to the best efforts per day (before starting to average the 3 best efforts), omitting the 2.850 w/kg data for September 6th (due to the other entry for September 6th).

EDIT: Screenshot data anonymized

Correct; it takes only the best effort on the day.

It’s always been that way.

1 Like

Alright thank you Sticky! And if I’m not mistaken you were the original developer of Zwiftpower, so thank you very much for all your work. Really impressive what you’ve built with Zwiftpower. :+1: :heart:

Just two questions out of curiosity: was there any rationale as to why you’d first take the best effort per day, before searching for the best 3 values?

Also as I have been testing some calculations in recent days, would it be an idea for future Zwift developments by Zwift HQ to only use race efforts for the average? Intuitively I was calculating the Zwift averages first by only looking to races. By also mixing the group rides etc. it decreases the estimated FTP for people who have raced less than 3 races in the last 90 days. (eg. 1 race at 3.0 w/kg and 2 group rides at 2.0 w/kg would give a much lower estimated FTP on Zwiftpower than just 1 race at 3.0 w/kg)

Zwift’s new CE system uses your best performances for the 2-50min power curve regardless of ride type. IMO, it’s very unlikely Zwift would make any changes to the ZP cat system given CE is replacing it (see this thread for more info - first post is the one to read).

1 Like

@Gio_Hoeberigs I played no part in the development of Zwiftpower; that was @James_Hodges_KRT
I only provided Admin Support as I had a good understanding of how i worked.

Zwift have not developed Zwiftpower a jot since they seized control so I wouldn’t expect them to do much; notwithstanding the aforementioned move to CE.

2 Likes

Alright, one final question about the FTP calculation on Zwiftpower @James_Hodges_KRT / @S_ticky_KRT . The complexity comes from: due to people changing weights the best 3 efforts in absolute FTP doesn’t have to be from the same events as the best 3 efforts in W/KG.

So my question is: does Zwiftpower use the same efforts for both the w/kg and absolute watts (watt floors) in its calculation of estimated FTP? Or does it scan previous 90 days and look for the best 3 events with w/kg efforts AND seperately look for the best 3 events based on absolute 20 min power (which means, due to changing weights, the top 3 w/kg events can be different from the top 3 event with highest 20 min power)) ?

ZwiftpowerCalc

Or to put it differently: is A1 & B1 always from the same event? And Event(A2) = Event (B2)? Event (A3) = Event (B3)? Or can the top efforts in watts and w/kg over the last 90 days be a mix of more than 3 events?

It takes the best 3 w/kg

1 Like

Hey @James_Hodges_KRT and @S_ticky_KRT, I have found another interesting case in which Zwiftpower does not seem to calculate the FTP as one would expect. My script which simulates Zwiftpower FTP calculation has been pretty accurate in giving identical results, but today a new situation was found in which Zwiftpower gives a surprising result:

For some reason in this rider profile (ZwiftID=905145) the November 15th, 2022 TeamTimeTrial effort is not used for the FTP estimation. As I mentioned in some posts above, I would have expected Zwiftpower to only use races towards FTP estimation, but Zwiftpower uses group rides etc. as well for FTP estimation.

However, could it be that Zwiftpower is not using plain Team Time Trials for FTP Estimation? To be precise: if events only have TYPE_TEAM_TIME_TRIAL tag in the event settings AND there is no TYPE_RACE tag; are those being overlooked by Zwiftpower? So, when TYPE_RACE is not set, is Zwiftpower including activities which are Group Rides and at the same time excluding Team Time Trials for FTP estimation?

If my above guess is not correct: do you have any idea what other reason could explain why the November 15th activity is not used to calculate the estimated FTP?

Zwiftpower takes best 3 race efforts in a 90 day period; TTTs do not accrue ranking points so are/should be reclassified as a Ride so that points are not calculated.

Hey Sticky thank you for your reply, but I don’t think it’s the accurate description of how Zwiftpower is estimating FTP.

“Zwiftpower takes best 3 race efforts in a 90 day period”

I can give you many examples of Zwiftpower estimating the FTP based on any effort in a 90 day period, not only race events. But here are two:

Proof 1
Example ID = 4575816: ZwiftPower - Login

Proof 2
Example ID = 1098774: ZwiftPower - Login

So, based on having simulated hundreds of Zwiftpower profiles, I am assuming these as facts:

  • Zwiftpower does use Group Rides to calculate estimated FTP
  • Zwiftpower sometimes does use TTT to calculate estimated FTP
  • Zwiftpower sometimes ignores TTT events to calculate estimated FTP

“TTTs do not accrue ranking points so are/should be reclassified as a Ride so that points are not calculated”

I recognize that indeed TTT’s do not accrue ranking points. However this is unrelated to the FTP estimation, as shown above. Events that do not accrue ranking points can contribute to FTP estimation as you can see in TTT’s and other non race events above.

So either @James_Hodges_KRT coded Zwiftpower this way or it was changed afterwards like this by Zwift HQ: TTT’s only count for estimated FTP if an additional TYPE_RACE tag is activated.

Because I have seen WTRL/Zwift HQ are not consistently applying the TYPE_RACE tag to their TTT events; as a result, sometimes the TTT’s are ignored to calculate estimated FTP. Whether this is a “bug” or “as intended”: at the end of the day this becomes an inconsistency if not all people administrating the Zwift events are aware of how this works.

1 Like

My apologies; I thought you were asking about Minimum Race Category.

Estimated FTP has no meaningful value so I have not looked in to it. Could it be the best ever 95% of 20 mins within an event?

Simply edit settings to reflect your known FTP.

He is talking about minimum race category - see the graphics above.

Whether it is a group ride or race in Zwift, does not matter. It’s all down to the format selected in the ZP settings for the race, and it seems that is inconsistently applied.