Normalized Power fomula by garmin

hi
in edge 130 there is missing NP data field so i want to develop such field but i dont know what formula for normalized power is used by garmin.
anybody knows?
  • I'm not a cyclist, but I think the formula is:

    Average(RollingAverage(Power, 30 seconds)) ^ 4) ^ 0.25

    https://www.mathworks.com/matlabcentral/cody/problems/3064

    Also, if you don't want to code that data field yourself, you can my use my data field app, AppBuilder, which displays the result of the math formula of your choice:
    https://apps.garmin.com/en-US/apps/fd690281-9c22-4fee-a81e-3b7f39aa67c5


    Look for "normalized power" on the examples page:

    http://ciq-appbuilder.blogspot.com/p/examples.html




  • No worries. BTW, since I made that post, I released AppBuilder 5 which has a simpler function for normalized power, on modern "CIQ2" devices such as Edge 130.

    Direct link to example, with a button to copy it to the clipboard:
    https://ciq-appbuilder.blogspot.com/...rmalized_power

    All the examples will be on that page, going forward.
  • How do i translate this ^ to code??

    avg(timeavg(power,30,1)^4)^0.25

     

     

     

  • I understand that the rolling average here is a set of 30 values. Every value is the average of the power during one second. Correct upto now? 

    Now my question is how to determine the average of the power during one second. Do I just take one value during the second? Do I use a Garmin function which has a start-time and an end time differing one second? Or do I take a plurality of power values during that second from which I take the average?

  • I found this article that explains better:


    Normalized Power

    Normalized Power (NP) is a metric to quantify training intensity with power data and is introduced by Andrew Coggan. The concept of NP is discussed in chapter 7 of the book. It is especially useful in conjuction with the other algorithms below.

    Step 1: Calculate the rolling average with a window of 30 seconds: Start at 30 seconds, calculate the average power of the previous 30 seconds and to the for every second after that.

    Step 2: Calculate the 4th power of the values from the previous step.

    Step 3: Calculate the average of the values from the previous step.

    Step 4: Take the fourth root of the average from the previous step. This is your normalized power.

    Or in pseudo code:

    rolling_average = 30 second rolling average

    rolling_avg_powered = rolling_average^4

    avg_powered_values = average of rolling_avg_powered

    NP = avg_powered_values^0.25

    The unit of NP is Watt.

    medium.com/.../formulas-from-training-and-racing-with-a-power-meter-2a295c661b46


    w
    hat I´m understand is this:


    PwAVG = PwAVG + (power - 30PwAVG);

    30PwAVG = Math.pow((30PwAVG + (power-30PwAVG)/30)4;

    NP = Math.pow(30AVG + 30PwAVG).25;

     

  • I understand that the rolling average here is a set of 30 values. Every value is the average of the power during one second. Correct upto now? 

    Now my question is how to determine the average of the power during one second. Do I just take one value during the second? Do I use a Garmin function which has a start-time and an end time differing one second? Or do I take a plurality of power values during that second from which I take the average?

    Garmin Connect IQ data fields give you updated data roughly once per second (in the onUpdate() function), so you just save a sample every time onUpdate() is called. Personally, I would think of each sample as an *instantaneous* power value, not an average.

    In an "device app", you could schedule onUpdate() to run every second.

    Either way, you're basically sampling once per second. Sure, if you could sample more than once per second, you could have "better" data. Hypothetically, if you could sample 10 times per second, then your data set for the 30-second rolling average would contain 300 values.

    Since we're probably talking about a data field here, the sample frequency is once per second and the math is easy.


  • w
    hat I´m understand is this:


    PwAVG = PwAVG + (power - 30PwAVG);

    30PwAVG = Math.pow((30PwAVG + (power-30PwAVG)/30)4;

    NP = Math.pow(30AVG + 30PwAVG).25;

    I'm fairly sure the pseudo-code formula for NP is basically what I already posted before, which matches the medium post you linked above:

    Average(RollingAverage(Power, 30 seconds)) ^ 4) ^ 0.25

    IOW:

    30_second_power = rollingAverage(power, 30 s)

    NP = (average(30_second_power ^ 4))  ^ 0.25

    For each unit of time (i.e. 1 second), calculate the rolling average of power for the last 30 seconds, and raise that to 4th power. Average those values over the entire activity, and raise that to the 1/4th power.

    This translates to the formula I've suggested for NP when using my AppBuilder data field:

    avg(timeavg(power,30,1)^4)^0.25

    So far nobody has complained that it's wrong, but it's also possible that I'm missing something.

    The formula you posted seems a lot more complicated than that.