adapting phase duration according to measured parameters