Sunday, December 09, 2012

A quick first attempt at Normalised Power based TTT sessions

(see previous post for more explanation)

Just the code for now, more to come but:

- Our initial session using equal times on the front WAS:

P_on = 125%, P_off = 87.5%

That is, 1' on @ 125% FTP, 2' off @ 87.5% FTP. Using the code below, it is:

P_on = 120.69%, P_off = 84,48%

First impressions are therefore positive! This seems much more representative intensity-wise.

function [P_on_new,P_off_new] = NormalisedPower(time_on)
% Normalised power calculation from uniform step on/off interval

% Input time spent 'on' and interval duration

total_time = 180; %seconds

% Intensities
P_on = 100/(0.7+0.3*time_on);
P_off = P_on*0.7;

% Get absolute time on/off (integers)
time_on = ceil(time_on*total_time); % change into seconds
time_off = total_time-time_on; % change into seconds

time_cycles = 40; % number on/off cycles (should stabilise as we increase)
data_freq = 0.01; % data recording freq (should stabilise as we reduce it)

% Create power file

P=[];
for i = 1:time_cycles
    P = [P; P_on * ones(time_on/data_freq,1);...
        P_off * ones(time_off/data_freq,1)];
end

% Calculate rolling average


window = 30/data_freq; % number of points to get average for
mask = ones(1,window)/window; % overlay to get average
P_rolling = conv(P,mask,'valid');

% Calulate NP and AP


NP = mean(P_rolling.^4)^(1/4);
AP = mean(P);

% Calculate new intensities

P_on_new = P_on*(AP/NP);
P_off_new = P_off*(AP/NP);

No comments:

Post a Comment