Records of gas flow during breathing are cyclical, with the cycles var
ying in duration. The shape of these cycles may change with the intens
ity of respiratory stimulation or the development of respiratory disea
se, but currently research is hampered by the lack of a fully satisfac
tory technique for determining the shape of a typical cycle. The appro
ach adopted here is to replace the time series by a 'phase diagram', p
lotting the time integral of flow against flow itself. Principal curve
s are then fitted. These are curves 'through the middle of the data' w
hich were introduced by Hastie and Stuetzle. The shapes of these curve
s are compared, either directly or after reconstructing an average cyc
le corresponding to each fitted curve. This has the advantage that the
shape of the waveform is separated from the amplitude, and from the d
uration of the breath. A disadvantage is that periods of zero flow are
lost, and the reconstructed average cycle may show irregularities at
points near zero flow as a result. In practice, the methodology showed
clear differences in shape between the protocols, gave reasonable ave
rage cycles and ordered the waveform shapes according to the hardness
of breathing induced by the protocols.