In order to define the complex interactions between external stimuli and non-linear physiological systems, a technique (the frequency-tracking locus, FTL) was devised that describes the cycle-by-cycle changes in phase angle and amplitude between two signals. Qualitative assessment of the nature of interactions between the signals can be made by examining the FTL. Quantitation of the extent of entrainment of the spontaneous physiological rhythm is possible after deriving a numerical index (the path-length index, PLI) describing the departure of the system from a fully entrained state. The FTL was applied to the study of interactions between spontaneous respiratory effort and mechanical inflation in preterm newborn babies undergoing mechanical ventilation. Stable and unstable states of 1:1 interaction were noted while integer-ratio relationships were seen at low rates of mechanical ventilation. Stable states of entrainment corresponded to a PLI value near unity, and the value of PLI increased rapidly as interactions became unstable. The FTL may be used to describe complex interactions in physiological systems, and may be used as a guide to baby-ventilator matching during mechanical ventilation of the newborn.