= pd.read_csv("../data/mmpcurve.csv")
df = PDC(df['Secs'], df['Watts']) pdc
PDC
Utilities to manipulate power duration curves, fit them and do what-if analysis
The power_curve function will be fitted to its parameters, with reasonable bounds
power_curve
power_curve (x, frc, ftp, tte, tau, tau2, a)
Details | |
---|---|
x | |
frc | Functional Reserve Capacity |
ftp | Functional Threshold Power |
tte | Time to Exhaustion |
tau | Short end calibration |
tau2 | Long end calibration |
a | Decay factor past TTE |
PDC
PDC (x, y)
A Power Duraction Curve
Load a mean maximal curve, with time in seconds and corresponding watts
= pdc.fit() result
result.best_values
{'frc': 10190.691792353007,
'ftp': 247.97104270072407,
'tte': 1800.0000561443576,
'tau': 12.619522854826833,
'tau2': 25.0,
'a': 33.22731702525135}
= power_curve(pdc.x, result.best_values['frc'],
fitted_curve 'ftp'],
result.best_values['tte'],
result.best_values['tau'],
result.best_values['tau2'],
result.best_values['a']) result.best_values[
=(10,6))
plt.figure(figsize='MMP')
plt.plot(pdc.x, pdc.y, label='PDC')
plt.plot(pdc.x, fitted_curve, label
plt.legend()True)
plt.grid('log')
plt.xscale( plt.show()