For many natural and engineered systems, a central function or design goal is
the synchronization of one or more rhythmic or oscillating processes to an
external forcing signal, which may be periodic on a different time-scale from
the actuated process. Such subharmonic synchrony, which is dynamically
established when N control cycles occur for every M cycles of a forced
oscillator, is referred to as N:M entrainment. In many applications,
entrainment must be established in an optimal manner, for example by minimizing
control energy or the transient time to phase locking. We present a theory for
deriving inputs that establish subharmonic N:M entrainment of general nonlinear
oscillators, or of collections of rhythmic dynamical units, while optimizing
such objectives. Ordinary differential equation models of oscillating systems
are reduced to phase variable representations, each of which consists of a
natural frequency and phase response curve. Formal averaging and the calculus
of variations are then applied to such reduced models in order to derive
optimal subharmonic entrainment waveforms. The optimal entrainment of a
canonical model for a spiking neuron is used to illustrate this approach, which
is readily extended to arbitrary oscillating systems