This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Algorithm for computing the Normalized Power

I wrote some Python code to compute the Normalized Power and I noted that the
value is different from the one computed by Garmin Edge 530.

Here is the code I used (the only dependencies are garmin_fit_sdk and numpy):
gist.github.com/.../816876d348be36b7727c9cc8c96a53f7


The compute average values are correct (once rounded), but the normalized power is incorrect.

The value from my code is: 194.33244763009563
The value from Garmin Edge 530 is: 195

Is this caused by a different algorithm or is the difference caused by additional data available internally to Garmin Edge?

Thanks

Manlio Perillo

  • Thanks for the explanation.

    However it seems there is a discrepancy in the data generated by Favero Assioma Duo:

    {'accumulated_power': 167,
     'altitude': 513.6,
     'cadence': 49,
     'distance': 18.3,
     'enhanced_altitude': 513.6,
     'enhanced_respiration_rate': 17.72,
     'enhanced_speed': 3.583,
     'fractional_cadence': 0.0,
     'heart_rate': 73,
     'left_pco': 0,
     'left_pedal_smoothness': 20.0,
     'left_power_phase': [355.7812555590821, 61.87500096679689],
     'left_power_phase_peak': [22.500000351562505, 45.00000070312501],
     'left_right_balance': 182,
     'left_torque_effectiveness': 63.0,
     'power': 106,
     'right_pco': 0,
     'right_pedal_smoothness': 11.5,
     'right_power_phase': [0.0, 15.468750241699222],
     'right_power_phase_peak': [4.21875006591797, 9.843750153808596],
     'right_torque_effectiveness': 46.5,
     'speed': 3.583,
     'temperature': 18,
     'timestamp': '2023-11-01 06:15:08+01:00'}

    {'accumulated_power': 167,
     'altitude': 513.6,
     'cadence': 49,
     'distance': 22.0,
     'enhanced_altitude': 513.6,
     'enhanced_respiration_rate': 17.72,
     'enhanced_speed': 3.695,
     'fractional_cadence': 0.0,
     'heart_rate': 75,
     'left_pco': 0,
     'left_pedal_smoothness': 20.0,
     'left_power_phase': [355.7812555590821, 61.87500096679689],
     'left_power_phase_peak': [22.500000351562505, 45.00000070312501],
     'left_right_balance': 182,
     'left_torque_effectiveness': 63.0,
     'power': 74,
     'right_pco': 0,
     'right_pedal_smoothness': 11.5,
     'right_power_phase': [354.3750055371095, 61.87500096679689],
     'right_power_phase_peak': [16.87500026367188, 37.96875059326173],
     'right_torque_effectiveness': 46.5,
     'speed': 3.695,
     'temperature': 18,
     'timestamp': '2023-11-01 06:15:09+01:00'}

    This seems incorrect.

  • Sorry what discrepancy do you mean? Normalized power doesn't come from the power meter, it's calculated by the Edge.

  • Sorry, I missed an explanation.

    The problem is that:

      - the "previous" record has accumulated_power = 167 and power = 106

      - the "current" record has accumulated_power = 167 and power = 74

    This seems inconsistent with how accumulated is generated, unless I missing something.

    P.S:

    I tried to compute the agv_power by dividing the last value of accumulated_power by total_timer_time, and the result is always consistent with Garmin Edge.

  • Would you mind sharing the FIT activity file?

  • The example you're showing just highlights the reason for the error detection algorithm: it doesn't always add up.

    Take a FIT file and plot the accumulated power vs time. Also manually calculate your own accumulated power from the power values and plot that too. The final total, and the graphs, should be virtually identical. I just tried one of mine and the difference at the end was only 0.02 % on an hour+ activity.

    Also calculate the difference between them and plot that. You will see a scatter through the activity showing the error detection/correction algorithm at work (see screenshot of my example). If there is a steady band of points, that represents what I'll call a cumulative "permanent" error: data discrepancies that the algorithm could not address. I can only speculate the causes, but in my case it occurred only at the very start when I was still sorting out connection issues, and there are a lot of partial crank rotations as I start/stop, and rotations at less then 60 rpm, so not keeping up with the Edge's 1-second recording rate. (Note the Garmin Rally pedals I use have a habit of going to sleep too quickly when I'm setting up my Zwift session and I have to wake them up again.)

    We're getting deep into the characteristics of a specific power meter, and it's ANT+ transmission and reception here, at the very beginning of a recording. I suggest it's irrelevant, what matters is that overall the Edge is generally recording all of the useful power data that was transmitted with negligible loss %.

    Edit: on the chart, the recorded accumulated power (red) and my calculated version (blue) appear identical at this scale (which is why the blue isn't visible, it's under the red). The delta between them (green) uses the right-side axis. I've circled the "permanent" error that occurred near the start of the recording (it jumps to 90 to 105 to 212 for the remainder). The scatter throughout shows the error detection/correction algorithm at work. Of curious side-interest, there is a cluster of green circles near time=3000s and accumulated power 200000; I'm standing pedalling there so my cadence is below 60 rpm, meaning the Edge is sampling quicker then my power meter is transmitting fresh values.

    Edit2: the FIT file for this one reported 90% reception rate for the power meter.

  • Thanks.

    I was assuming that the power may be incorrect but the accumulated_power is always correct.  It seems both can be incorrect.

    Also, I assumed that error correction was necessary for missed data, and not for incorrect data.

    About where data is missing, in my case it occurs at the the very start (just like you, but in my case there is also an auto stop) and after an auto stop (this happens almost always on my usual route, due to a semaphore in a narrow town street).

    In today activity I noted about 3 missing power from the Edge screen after a pothole on the road.

    I have to check when incorrect data occurs.

    Is there some online resource or academy paper about these issues?

  • Hi, my understanding is that its intent is for receiving devices to detect and possibly compensate for ANT+ transmissions that were not received from the source (power meter) -- "missing" data. The accumulated power is calculated by the power meter, so it's only as "correct" as the power meter's calibration accuracy and proper functioning. If a power meter is inaccurate or not operating correctly, nothing can correct that.

    I believe it should be described in the specifications for the ANT+ standards. Edit: probably should have said FIT protocol, not ANT+. I imagine someone else here could provide more info.