If an oscillating neural circuit is forced by another such circuit via
a composite signal, the phase lag induced by the forcing can be chang
ed by changing the relative strengths of components of the coupling. W
e consider such circuits, with the forced and forcing oscillators rece
iving signals with some given phase lag. We show how such signals can
be transformed into an algorithm that yields connection strengths need
ed to produce that lag. The algorithm reduces the problem of producing
a given phase lag to one of producing a kind of synchrony with a ''te
aching'' signal; the algorithm can be interpreted as maximizing the co
rrelation between voltages of a cell and the teaching signal. We apply
these ideas to regulation of phase lags in chains of oscillators asso
ciated with undulatory locomotion.