1 Introduction

Nonlinear oscillators—dynamical systems with stable periodic orbits—arise in many systems of physical, technological, and biological interest. Examples from biology include pacemaker cells in the heart, the firing of action potentials in neurons, and circadian rhythms.

A powerful classical technique for the analysis of periodic orbits is the rigorous reduction to phase models, with a single variable describing the phase of the oscillation with respect to some reference state. Through reduction to phase models, one can understand the dynamics of high-dimensional and analytically intractable models in a more convenient form (see, e.g., [2, 33, 43, 53, 117]), and design useful phase-based control strategies (see, e.g., [15, 18, 48, 69, 75, 76, 95, 96, 106, 110, 118]). There are also situations for which extensions of phase reduction can improve the ability to understand and control the dynamics of a system with a periodic orbit [5, 37, 71, 105, 113]. Moreover, a useful analog to phase reduction can be formulated for systems with a stable fixed point, which allows novel control algorithms to be developed for such systems [112].

This tutorial gives a unified treatment of phase reduction for nonlinear oscillators and for systems with a stable fixed point and includes a discussion of recent developments, mathematical examples for which results can be found analytically, and biological examples for which numerical techniques must be employed. It also covers the use of phase reduction for the design of control algorithms which optimally change properties of the system, such as the phase of an oscillation, with examples for controlling neural and cardiac systems. Although by no means comprehensive, this tutorial illustrates the exciting potential of phase reduction and phase-based optimal control methods for biological applications, and it is hoped that it will provide a useful entry point for the reader who wishes to explore such methods further.

This tutorial is organized as follows. Section 2 describes the standard phase reduction and phase response curves for nonlinear oscillators and uses these to design energy-optimal phase control and time-optimal control of a thalamic neuron. Section 3 describes isostable reduction for systems with a stable fixed point and a method for controlling cardiac alternans based on this reduction. Section 4 covers an extension of standard phase reduction called augmented phase reduction which includes the concept of isostable response curves for nonlinear oscillators and applies this to energy-optimal phase control; it also describes an extension to second-order phase reduction. Section 5 discusses global isochrons and isostables and includes a control scheme for steering a trajectory from a stable periodic orbit to an unstable fixed point which uses knowledge of such global coordinates. Section 6 gives a brief introduction to phase-based control of oscillator populations. Concluding thoughts are given in Sect. 7.

2 Standard phase reduction and control

Consider an autonomous vector field

$$\begin{aligned} \frac{\hbox {d} \mathbf {x}}{\hbox {d}t} = \mathbf {F}(\mathbf {x}), \quad \mathbf {x} \in {\mathbb {R}}^n, \quad (n \ge 2) \end{aligned}$$
(1)

having a stable hyperbolic periodic orbit \(\mathbf {x}^\gamma (t)\) with period T. We define the set of all points in the basin of attraction as \({\mathcal {B}}\). For each point \(\mathbf {x}^*\) in \({\mathcal {B}}\), there exists a unique \(\theta (\mathbf {x}^*)\) such that [9, 33, 45, 53, 59, 115,116,117]

$$\begin{aligned} \lim _{t \rightarrow \infty } \left| \mathbf {x}(t) - \mathbf {x}^\gamma \left( t + \frac{T}{2\pi } \; \theta (\mathbf {x}^*) \right) \right| = 0, \end{aligned}$$
(2)

where \(\mathbf {x}(t)\) is a trajectory starting with the initial point \(\mathbf {x}^*\). The function \(\theta (\mathbf {x})\) is called the asymptotic phase of \(\mathbf {x}\) and takes values in \([0, 2\pi )\). Other conventions, related to this through a simple rescaling, define the asymptotic phase to take values in [0, T) or in [0, 1).

Let \(\mathbf{x}_0^\gamma \) be the point on the periodic orbit where the phase is zero. Our typical convention is to choose \(\mathbf{x}_0^\gamma \) as corresponding to the global maximum of the first coordinate on the periodic orbit. An isochron is a level set of \(\theta (\mathbf {x})\), that is, the collection of all points in the basin of attraction of \(\mathbf {x}^\gamma \) with the same asymptotic phase [115, 117]. We note that if \(\mathbf{x}(0)\) is a point on a periodic orbit, the isochron associated with that point is the set of all initial conditions \(\tilde{\mathbf{x}}(0)\) such that \(||\mathbf{x}(t) - \tilde{\mathbf{x}}(t)|| \rightarrow 0\) as \(t \rightarrow \infty \). Isochrons extend the notion of phase of a stable periodic orbit to the basin of attraction of the periodic orbit. It is conventional to define isochrons so that the phase of a trajectory on the periodic orbit advances linearly in time:

$$\begin{aligned} \frac{\hbox {d}\theta }{\hbox {d}t} = \frac{2 \pi }{T} \equiv \omega \end{aligned}$$
(3)

both on and off the periodic orbit. Points at which isochrons of a periodic orbit cannot be defined form the phaseless set [116].

Isochrons can be shown to exist for any stable hyperbolic periodic orbit. They are codimension one manifolds as smooth as the vector field, and transversal to the periodic orbit \(\mathbf {x}^\gamma \). Their union covers an open neighborhood of \(\mathbf {x}^\gamma \). This can be proved directly by using the implicit function theorem [9, 33] and is also a consequence of results on normally hyperbolic invariant manifolds [103].

Control theory seeks to design inputs to a dynamical system which change its behavior in a desired way. With this in mind, we consider the perturbed system

$$\begin{aligned} \frac{\hbox {d} \mathbf{x}}{\hbox {d}t} = \mathbf{F}(\mathbf{x}) + \mathbf{U}(\mathbf{x},t), \end{aligned}$$
(4)

where \(\mathbf{U}(\mathbf{x},t)\) is a small control input. The evolution of this system in terms of isochrons is [2, 53]

$$\begin{aligned} \frac{\hbox {d} \theta }{\hbox {d}t} = \frac{\partial \theta }{\partial \mathbf{x}} \cdot \frac{\hbox {d} \mathbf{x}}{\hbox {d}t} = \frac{\partial \theta }{\partial \mathbf{x}} \cdot \left( \mathbf{F}(\mathbf{x}) + \mathbf{U}(\mathbf{x},t) \right) = \omega + \frac{\partial \theta }{\partial \mathbf{x}} \cdot \mathbf{U}(\mathbf{x},t). \end{aligned}$$

Evaluating on the periodic orbit \(\mathbf{x}^\gamma \) for the unperturbed system gives, to leading order,

$$\begin{aligned} \frac{\hbox {d} \theta }{\hbox {d}t} = \omega + \mathbf{Z}(\theta ) \cdot \mathbf{U}(\mathbf{x}^\gamma ,t), \quad \mathbf{Z}(\theta ) = \left. \frac{\partial \theta }{\partial \mathbf{x}} \right| _{\mathbf{x}^\gamma (\theta )} \equiv \nabla _{\mathbf{x}^\gamma } \theta . \nonumber \\ \end{aligned}$$
(5)

Here \(\mathbf{Z}(\theta ) \in {\mathbb {R}}^n\) is the gradient of phase variable \(\theta \) evaluated on the periodic orbit and is referred to as the (infinitesimal) phase response curve (PRC) [19, 24, 38, 78, 117]. It quantifies the effect of an external perturbation on the phase of a periodic orbit. We call (5) the standard phase reduction. In this tutorial we will consider inputs \(\mathbf{U}(t)\), with no dependence on \(\mathbf{x}\).

2.1 Calculating phase response curves

Given the importance of PRCs for phase reduction, we now describe several ways in which they can be calculated.

Direct method [28, 78, 117]

This is the classical way to compute the PRC, which is useful especially in experimental studies. Letting \(\mathbf{x} = (x_1, x_2, \ldots , x_n)\), by definition

$$\begin{aligned} \left. \frac{\partial \theta }{\partial x_i} \right| _{\tilde{\mathbf {x}}^\gamma } = \lim _{\varDelta x_i \rightarrow 0} \frac{ \varDelta \theta }{\varDelta x_i}, \quad i=1,\ldots ,n, \end{aligned}$$
(6)

where \(\varDelta \theta = \theta (\tilde{\mathbf{x}}^\gamma + \varDelta {x_i} \hat{i}) - \theta (\tilde{\mathbf{x}}^\gamma )\) is the change in \(\theta (\mathbf{x})\) resulting from the perturbation \(\tilde{\mathbf{x}}^\gamma \rightarrow \tilde{\mathbf{x}}^\gamma + \varDelta x_i \hat{i}\) from the base point \(\tilde{\mathbf{x}}^\gamma \) on the periodic orbit in the direction of the \(i{\mathrm{th}}\) coordinate. Since \(\dot{\theta } = 2 \pi /T\) everywhere in the neighborhood of \(\mathbf{x}^\gamma \), where the dot indicates \(\frac{d}{dt}\), the difference \(\varDelta \theta \) is preserved under the flow; thus, it may be measured in the limit as \(t \rightarrow \infty \), when the perturbed trajectory has collapsed back to the periodic orbit. That is, \(\left. \frac{\partial \theta }{\partial x_i} \right| _{\mathbf{x}^\gamma }\) can be found by comparing the phases of solutions in the infinite-time limit with initial conditions on and infinitesimally shifted from base points on \(\gamma \).

Practically, determination of the change in phase \(\varDelta \theta \) in computation of (6) can vary from relatively straightforward to quite complex depending on the particular features of the system of interest. For instance, when applying phase reduction strategies in neurons [78], the timing of a neural action potential is generally taken to correspond to \(\theta = 0\). In this case, the change in phase \(\varDelta \theta \) resulting from a perturbation can simply be inferred by measuring deviations from the expected timing between spikes. On the opposite end of the spectrum, phase estimation becomes difficult in more complicated models when there are no easily identifiable features that directly correspond to the phase. In these cases, more sophisticated methods need to be employed. For example, motivated by the problem of understanding the oscillatory biomechanics of cockroach running, the authors of [84] devise a methodology to estimate the phase of a population of phase-locked oscillators from multivariate data that is both robust to noise and measurement error. These ideas were later built upon in [85] to identify the dimension required to adequately characterize a periodic orbit using only measurement data. See [10] for other results on phase response curves for running cockroaches. Other phase inference algorithms [89] have been developed for use in low signal-to-noise environments, for instance, in electroencephalogram (EEG) recordings. Other methods have been developed that are applicable to multiple coupled oscillators which are not phase locked. For example, Kralemann et al. [50] develops a strategy to simultaneously measure the phases of two interacting oscillators using passive observations and uses this technique to analyze respiratory influence on heart rate variability [100]. Also, Wilson and Moehlis [111] developed a strategy for inferring the phase response curve of individual oscillators from aggregate population data, Kralemann et al. [51] proposes a method for determining directional connectivity in small populations of oscillators, and Krishnan et al. [52] investigates phase response curves that result when multiple perturbations are applied per cycle. While phase reduction methods are immensely useful for reducing the complexity of a complicated model displaying stable periodic oscillations, there are many practical considerations to be aware of when working with real, noisy, and possibly unreliable experimental data.

Adjoint method [2, 20, 23, 40]

Another technique for finding the PRC involves solving an associated adjoint equation, which we now derive following [2]. This adjoint equation can be solved numerically with the program XPP [20].

Consider an infinitesimal perturbation \(\varDelta \mathbf{x}\) to the trajectory \(\mathbf{x}^\gamma (t)\) at time \(t=0\). Let \(\mathbf {x}(t)\) be the trajectory evolving from this perturbed initial condition. Defining \(\varDelta \mathbf {x} (t)\) according to \(\mathbf {x}(t)=\mathbf {x}^{\gamma }(t) + \varDelta \mathbf {x} (t)\),

$$\begin{aligned} \frac{\hbox {d} \varDelta {\mathbf{x}}(t)}{\hbox {d}t} = D \mathbf{F}(\mathbf {x}^\gamma (t)) \varDelta {{\mathbf {x}}}(t) + {{{\mathcal {O}}}}(\Vert \varDelta \mathbf{x} \Vert ^2). \end{aligned}$$
(7)

For the phase shift defined as \(\varDelta \theta = \theta (\mathbf {x}(t)) - \theta (\mathbf {x}^\gamma (t))\), we have

$$\begin{aligned} \varDelta \theta = \langle \nabla _{\mathbf{x}^\gamma (t)} \theta , \varDelta \mathbf{x}(t) \rangle + {{\mathcal {O}}}(\Vert \varDelta \mathbf{x} \Vert ^2), \end{aligned}$$
(8)

where \(\langle \cdot , \cdot \rangle \) defines the standard inner product and \(\nabla _{\mathbf{x^\gamma }(t)}\theta \) is the gradient of \(\theta \) evaluated at \({\mathbf{x^\gamma }(t)}\). We recall from above that \(\varDelta \theta \) is independent of time (after the perturbation at \(t=0\)) so that taking the time derivative of (8) yields, to lowest order in \(\Vert \varDelta \mathbf{x} \Vert \),

$$\begin{aligned} \left\langle \frac{ \hbox {d} \nabla _{\mathbf{x}^\gamma (t)} \theta }{\hbox {d}t}, \varDelta \mathbf{x}(t) \right\rangle= & {} - \left\langle \nabla _{\mathbf{x}^\gamma (t)} \theta , \frac{ \hbox {d} \varDelta \mathbf{x}(t)}{\hbox {d}t} \right\rangle \nonumber \\= & {} -\langle \nabla _{\mathbf{x}^\gamma (t)} \theta , D \mathbf{F}(\mathbf {x}^\gamma (t)) \, \varDelta {{\mathbf {x}}}(t) \rangle \nonumber \\= & {} -\langle D \mathbf{F}^\mathrm{T}(\mathbf {x}^\gamma (t)) \, \nabla _{\mathbf{x}^\gamma (t)} \theta , \varDelta {{\mathbf {x}}}(t) \rangle . \end{aligned}$$
(9)

Here the matrix \(D \mathbf{F}^\mathrm{T}(\mathbf {x}^\gamma (t))\) is the transpose (i.e., adjoint) of the (real) matrix \(D \mathbf{F}(\mathbf {x}^\gamma (t))\). Since the above equalities hold for arbitrary infinitesimal perturbations \(\varDelta \mathbf{x}(t)\), we have

$$\begin{aligned} \frac{\hbox {d} \nabla _{\mathbf{x}^\gamma (t)} \theta }{\hbox {d} t} = - D \mathbf{F}^\mathrm{T}(\mathbf{x}^\gamma (t)) \, \nabla _{\mathbf{x}^\gamma (t)} \theta . \end{aligned}$$
(10)

This follows from non-degeneracy of the inner product, which states that if \(<a,b> = 0\) for all b, then \(a=0\). To see this more rigorously, we can rearrange (9) to give

$$\begin{aligned} \left\langle \underbrace{\frac{ \hbox {d} \nabla _{\mathbf{x}^\gamma (t)} \theta }{\hbox {d}t} + D \mathbf{F}^\mathrm{T}(\mathbf {x}^\gamma (t)) \, \nabla _{\mathbf{x}^\gamma (t)} \theta }_{a(t)}, \varDelta \mathbf{x}(t) \right\rangle {= 0}. \end{aligned}$$

At any time t, by choosing \(\varDelta \mathbf{x}(t)\) to be a(t) we get \(\langle a,a \rangle = 0\) which from definite positivity of the inner product implies that \(a=0\). This can be rearranged to give (10).

Fig. 1
figure 1

Thalamic neuron model: Left panel shows how the spike time changes by \(\delta T\) under an external perturbation \(\delta v\). Here, black (resp., red) line shows the voltage under no (resp., \(\delta v\)) perturbation. In the right panel, the blue line (resp., red dots) shows the first component of the PRC computed from the adjoint (resp., the direct) method (color figure online)

Finally, note that

$$\begin{aligned} \frac{\hbox {d} \theta }{\hbox {d}t} = \nabla _\mathbf{x} \theta \cdot \frac{\hbox {d} \mathbf{x}}{\hbox {d}t} = \nabla _\mathbf{x} \theta \cdot \mathbf{F}(\mathbf{x}) = \omega , \end{aligned}$$

which in particular must hold at \(t=0\). Thus, we must solve (10) subject to the condition

$$\begin{aligned} \nabla _{\mathbf{x}^\gamma (0)} \theta \cdot \mathbf{F}(\mathbf{x}^\gamma (0)) = \omega . \end{aligned}$$
(11)

Since \(\nabla _{\mathbf{x}^\gamma (t)} \theta \) evolves in \({\mathbb {R}}^n\), (11) supplies only one of n required initial conditions; the rest arise from requiring that the solution \(\nabla _{\mathbf{x}^\gamma (t)} \theta \) to (10) be T-periodic [20, 23, 40].

We note that [37] describes a method for calculating a generalization of phase response curves based on an invariance equation for planar systems and shows that this is equivalent to the adjoint method. This approach will be discussed in more detail in Sect. 5.

Example PRC calculation: thalamic neuron model

As an illustration, we calculate the PRC using both the direct method and the adjoint method for the thalamic neuron model [88] for the spiking behavior of neurons in the thalamus:

$$\begin{aligned} \dot{v}= & {} \frac{-I_L(v)-I_\mathrm{Na}(v,h)-I_K(v,h)-I_T(v,r)+I_\mathrm{b}}{C_m}\nonumber \\&+u(t), \end{aligned}$$
(12)
$$\begin{aligned} \dot{h}= & {} \frac{h_{\infty }(v)-h}{\tau _h(v)}, \end{aligned}$$
(13)
$$\begin{aligned} \dot{r}= & {} \frac{r_{\infty }(v)-r}{\tau _r(v)}. \end{aligned}$$
(14)

In these equations, \(I_\mathrm{b}\) is the baseline current, which we take as \(5\,\upmu \hbox {A/cm}^2\), v is the transmembrane voltage, and \(h,\ r\) are the gating variables of the neuron which describe the modulation of the flow of ions across the neural membrane. u(t) represents the applied current as the control input. For details of the currents (\(I_L, I_\mathrm{Na}, I_K, I_T\)), functions \(h_{\infty }, \tau _h,r_{\infty }, \tau _r\), and the rest of the parameters, see Appendix A. With no control input, these parameters give a stable periodic orbit with period \(T=8.3955\) ms.

The first (i.e., voltage) component of the PRC for this periodic orbit is shown in the right panel of Fig. 1. In this figure, we used XPP to calculate the first component of the PRC from the adjoint method. For the direct method, a MATLAB code was written where perturbations of size \(\delta v = -\,0.3\) were given at 20 points spread along the periodic orbit. Once the perturbed trajectories came reasonably close to the periodic orbit, spike time changes caused by the perturbations were scaled to obtain the corresponding phase changes, which when normalized by the magnitude of the perturbation gives the first component of the PRC.

Analytical results

There are certain dynamical systems for which PRCs can be calculated analytically. Here we consider three illustrative examples which can arise for simplified models of biological systems and physiological rhythms [24, 28, 117]: general radial isochron clocks which capture key characteristics of phase models, \(\lambda - \omega \) systems including the Hopf bifurcation normal form, and a system which has been used to model neurons undergoing a SNIPER bifurcation.

\(\bullet \) General radial isochron clocks

Consider planar dynamical systems that can be written in the form

$$\begin{aligned} \frac{\hbox {d}r}{\hbox {d}t}=G(r), \quad \frac{\hbox {d} \phi }{\hbox {d}t} = K(\phi ), \end{aligned}$$
(15)

where r and \(\phi \) are standard polar coordinates in two dimensions, \(K(\phi )>0\) for all \(\phi \), and there is a stable periodic orbit \(\mathbf{x}^\gamma \) with radius \(r_\mathrm{po}\) found by solving \(G(r_\mathrm{po}) = 0\). Such a periodic orbit will have period \(T=\int _0^{2\pi }d\phi /K(\phi )\). Because the dynamics of \(\phi \) are independent of r, the isochrons for such systems are radial lines. When \(K(\phi )\) is a constant, such a system is often referred to as a radial isochron clock [28, 41]. Because we allow K to be non-constant, we will refer to this system as a general radial isochron clock. The following calculation of PRCs for general radial isochron clocks generalizes previously published results in [28, 41] for radial isochron clocks.

Fig. 2
figure 2

Geometrical setup for finding the PRC for a general radial isochron clock. Sample isochrons are shown as dotted lines

For such systems, it is possible to find the PRC using the following geometrical argument. From Fig. 2, we see that

$$\begin{aligned} \tan \phi = \frac{y}{x}. \end{aligned}$$

Taking the partial derivative of both sides with respect to x,

$$\begin{aligned} \sec ^2\phi \; \frac{\partial \phi }{\partial x} = - \frac{y}{x^2}. \end{aligned}$$

Rearranging and evaluating on the periodic orbit (i.e., using \(x = r_\mathrm{po} \cos \phi \) and \(y = r_\mathrm{po} \sin \phi \)),

$$\begin{aligned} \left. \frac{\partial \phi }{\partial x} \right| _{\mathbf{x}^\gamma } = -\frac{\sin \phi }{r_\mathrm{po}}. \end{aligned}$$

PRCs are defined in terms of the change in the phase variable \(\theta \), and to obtain this, we recall that the isochrons are radial and note that

$$\begin{aligned} \frac{\hbox {d} \theta }{\hbox {d} \phi } = \frac{\hbox {d}\theta /\hbox {d}t}{\hbox {d}\phi /\hbox {d}t} = \frac{\omega }{K(\phi )}. \end{aligned}$$
(16)

Therefore

$$\begin{aligned} \left. \frac{\partial \theta }{\partial x} \right| _{\mathbf{x}^\gamma } = \frac{\hbox {d} \theta }{\hbox {d} \phi } \left. \frac{\partial \phi }{\partial x} \right| _{\mathbf{x}^\gamma } = -\frac{\omega }{r_\mathrm{po} K(\phi )} \sin \phi . \end{aligned}$$
(17)

Similarly,

$$\begin{aligned} \left. \frac{\partial \theta }{\partial y} \right| _{\mathbf{x}^\gamma } = \frac{\omega }{r_\mathrm{po} K(\phi )} \cos \phi . \end{aligned}$$
(18)

We can rewrite the right-hand side of (17) and (18) in terms of the phase variable \(\theta \) by using (16) to give

$$\begin{aligned} \theta = f(\phi ) \equiv \int _{\phi _0}^{\phi } \frac{\omega }{K(\phi ')} \hbox {d} \phi ', \end{aligned}$$
(19)

where we take \(\theta =0\) at \(\phi = \phi _0\); inverting this will give \(\phi \) as a function of \(\theta \).

As an alternative derivation, we can start with (19) and differentiate with respect to r and \(\phi \) to give

$$\begin{aligned} \left( \frac{\partial \theta }{\partial r}, \frac{\partial \theta }{\partial \phi }\right) =\left( 0, \frac{\omega }{K(\phi )}\right) . \end{aligned}$$
(20)

Transforming to Cartesian coordinates using

$$\begin{aligned} \frac{\partial \theta }{\partial x} = \frac{\partial \theta }{\partial r} \frac{\partial r}{\partial x} + \frac{\partial \theta }{\partial \phi } \frac{\partial \phi }{\partial x} \end{aligned}$$

and a similar expression for \(\frac{\partial \theta }{\partial y}\), we can obtain the PRC as

$$\begin{aligned} \mathbf{Z}(\phi ) = \frac{\omega }{r_\mathrm{po}K(\phi )}\left( -\sin \phi {\hat{x}}+\cos \phi {\hat{y}}\right) . \end{aligned}$$
(21)

This is identical to (17) and (18). We note that PRCs for general radial isochron clocks take both positive and negative values, meaning that the same instantaneous, infinitesimal perturbation can either increase or decrease the phase, depending on when it is applied.

\(\bullet \,\lambda -\omega \) systems

Consider planar systems that can be written in the form

$$\begin{aligned} \frac{\hbox {d}r}{\hbox {d}t} = G(r), \quad \frac{\hbox {d}\phi }{\hbox {d}t} = H(r), \end{aligned}$$
(22)

where r and \(\phi \) are again standard polar coordinates in two dimensions and there is a stable periodic orbit with nonzero radius \(r_\mathrm{po}\) (found by solving \(G(r_\mathrm{po}) = 0\)) and angular frequency \(\omega = H(r_\mathrm{po})\). We assume that \(G'(r_\mathrm{po}) \ne 0\). Note that these equations can be viewed as a polar coordinate representation of \(\lambda -\omega \) systems [24, 49] and include the normal forms for the Hopf bifurcation and the Bautin bifurcation [35, 54]. The PRC for examples of such systems has been calculated in references including [2, 5, 19, 22, 24, 37, 40, 68]. In general, we have

$$\begin{aligned} \frac{\hbox {d}}{\hbox {d}t} \left( \begin{array}{c} \left. \frac{\partial \theta }{\partial r} \right| _{\mathbf{x}^\gamma } \\ \left. \frac{\partial \theta }{\partial \phi } \right| _{\mathbf{x}^\gamma } \end{array} \right) = -D\mathbf{F}^\mathrm{T}(\mathbf{x}^\gamma ) \left( \begin{array}{c} \left. \frac{\partial \theta }{\partial r} \right| _{\mathbf{x}^\gamma } \\ \left. \frac{\partial \theta }{\partial \phi } \right| _{\mathbf{x}^\gamma } \end{array} \right) , \end{aligned}$$

where

$$\begin{aligned} D\mathbf{F}^\mathrm{T}(\mathbf{x}^\gamma ) = \left( \begin{array}{cc} G'(r_\mathrm{po}) &{} H'(r_\mathrm{po}) \\ 0 &{} 0 \end{array} \right) . \end{aligned}$$

It is readily verified that this is solved by (cf. [46, 68])

$$\begin{aligned} \left( \left. \frac{\partial \theta }{\partial r} \right| _{\mathbf{x}^\gamma },\left. \frac{\partial \theta }{\partial \phi } \right| _{\mathbf{x}^\gamma } \right) = \left( - \frac{H'(r_\mathrm{po})}{G'(r_\mathrm{po})},1 \right) . \end{aligned}$$
(23)

Transforming to Cartesian coordinates \((x,y) = (r \cos \phi , r \sin \phi )\), and using the fact that \(\theta = \phi \) on the periodic orbit (since \(\partial \theta /\partial \phi = 1\), and choosing \(\theta =0\) to coincide with \(\phi =0\)), we obtain

$$\begin{aligned} \mathbf{Z}(\theta )= & {} \left( \left. \frac{\partial \theta }{\partial x} \right| _{\mathbf{x}^\gamma },\left. \frac{\partial \theta }{\partial y} \right| _{\mathbf{x}^\gamma } \right) \nonumber \\= & {} \left( -\frac{H'(r_\mathrm{po})}{G'(r_\mathrm{po})} \cos \theta - \frac{\sin \theta }{r_\mathrm{po}} \right) \hat{x} \nonumber \\&+ \left( -\frac{H'(r_\mathrm{po})}{G'(r_\mathrm{po})} \sin \theta + \frac{\cos \theta }{r_\mathrm{po}} \right) \hat{y}, \end{aligned}$$
(24)

cf. [22, 24], where \(\hat{x}\) and \(\hat{y}\) are unit vectors in the x and y directions, respectively. We note that PRCs for \(\lambda -\omega \) systems are appropriately scaled and shifted sinusoidal functions, which take both positive and negative values. As for the general radial isochron clocks, the same instantaneous, infinitesimal perturbation can either increase or decrease the phase, depending on when it is applied.

\(\bullet \)SNIPER example [2, 19]

The SNIPER (Saddle-Node Infinite PERiod) bifurcation [35, 54], also called SNIC (Saddle-Node on Invariant Circle) bifurcation, takes place when a saddle-node bifurcation of fixed points occurs on a periodic orbit. This bifurcation arises, for example, for Type I neurons [19]. Following the method of [19], we ignore the direction(s) transverse to the periodic orbit and consider the one-dimensional normal form for a saddle-node bifurcation of fixed points:

$$\begin{aligned} \dot{x} = \eta + x^2, \end{aligned}$$
(25)

where x may be thought of as local arclength along the periodic orbit. For \(\eta >0\), the solution of (25) traverses any interval in finite time; as in [19], the period T of the orbit may be approximated by calculating the total time necessary for the solution to (25) to go from \(x = -\,\infty \) to \(x = +\,\infty \) and making the solution periodic by resetting x to \(-\,\infty \) every time it “fires” at \(x=\infty \). This gives \(T = \frac{\pi }{\sqrt{\eta }}\); hence, \(\omega = 2 \sqrt{\eta }\).

Since (25) is one-dimensional, Ermentrout [19] computes

$$\begin{aligned} \frac{\partial \theta }{\partial x} = \omega \frac{\partial t}{\partial x} = \frac{\omega }{\frac{\mathrm{d}x}{\mathrm{d}t}} \; , \end{aligned}$$

where \(\frac{\mathrm{d}x}{\mathrm{d}t}\) is evaluated on the solution trajectory to (25). This gives

$$\begin{aligned} \frac{\partial \theta }{\partial x} \; = \; \frac{2}{\omega }[1-\cos \theta ] \; \end{aligned}$$
(26)

as first derived in [19], but with explicit \(\omega \)-dependence displayed as in [2]. In contrast to general radial isochron clocks and \(\lambda -\omega \) systems, the PRC for this SNIPER system is always positive. Thus instantaneous, infinitesimal perturbations will always increase the phase (or decrease the phase, depending on the sign of the perturbation) regardless of the time at which they are applied, although the magnitude of the phase change will be different. We will consider a different SNIPER example later in Sect. 4. Also note that the example in [21] shows that care must be used in relating bifurcations to PRCs.

It is also possible to calculate analytic approximations to the PRC near a homoclinic bifurcation [2], a heteroclinic orbit [90], and for relaxation oscillators [44].

2.2 Control based on standard phase reduction

Since phase-reduced models have lower dimension than the full models from which they came, optimal control problems for phase-reduced models give lower-dimensional boundary value problems and thus are simpler to solve. In this tutorial, we will consider control problems for which the control input only directly affects a single state variable. For example, in neural control applications one might apply control in the form of an injected electrical current which only affects the equation for the transmembrane voltage. Moreover, we assume that the control input only depends on time, and not on the state variables. That is, we take \(\mathbf{U(\mathbf{x},t)} = (u(t),0_{n-1})\), where without loss of generality we say that the control affects the first state variable \(x_1\), and \(0_{n-1}\) is a vector of \((n-1)\) zeros.

We consider three different problems. The first, energy-optimal phase control, illustrates the basics of how standard phase reduction can be used to find optimal control inputs. The second, energy-optimal phase control with a charge-balance constraint, illustrates how integral constraints can be incorporated into such problems. The third, time-optimal control with a charge- balance constraint, illustrates how the choice of a cost function affects the nature of the optimal control inputs.

Energy-optimal phase control [69]

Suppose at \(t=0\) our system starts at the point \(\mathbf {x_0^\gamma }\) on \(\mathbf{x}^\gamma (t)\). Without any control input, we expect the trajectory will return to the point \(\mathbf {x_0^\gamma }\) at time \(t=T\). Our objective here is to devise a control which returns the trajectory to its initial position after time \(t=T_1\), where \(T_1\ne T\). Possible motivations include changing the time at which a neuron fires (a first step toward controlling neural populations), shifting one’s circadian rhythm to adjust to a new time zone, or changing the phase of cardiac pacemaker cells to treat cardiac arrhythmias [71].

To do this, consider the standard phase reduction for the oscillator given by

$$\begin{aligned} \frac{\hbox {d} \theta }{\hbox {d}t} = \omega + Z(\theta ) u(t), \end{aligned}$$
(27)

where \(\omega \) is the oscillator’s natural angular frequency, \(Z(\theta )\) is the component of the phase response curve in the \(x_1\) direction, and u(t) is the control stimulus. We assume that \(Z(\theta )\) vanishes only at isolated points and that \(\omega > 0\), so orbits of full revolution are possible. We will assume that \(\theta =0\) corresponds to a special event for the oscillator, such as the firing of an action potential for a neuron, i.e., when a neuron’s transmembrane voltage is maximal.

Suppose that for the specified time \(T_1\) and for all stimuli u(t) which evolve \(\theta (t)\) via (27) from \(\theta (0) = 0\) to \(\theta (T_1) = 2 \pi \), we want to find the one which minimizes the cost function

$$\begin{aligned} {{\mathcal {G}}}[u(t)] = \int _0^{T_1} [u(t)]^2 \hbox {d}t, \end{aligned}$$
(28)

that is, the square-integral cost on the current. For example, for a neural system this would correspond to causing a neuron which fires an action potential at \(t=0\) to fire another action potential at \(t=T_1\); if the system has resistance R obeying Ohm’s law, this corresponds to minimizing the power \(P \sim u^2 R\).

We apply calculus of variations (see Appendix B) to minimize [25]

$$\begin{aligned} C[u(t)] = \int _0^{T_1} \underbrace{\left\{ [u(t)]^2 + \lambda (t) \left( \frac{\hbox {d} \theta }{\hbox {d}t} - \omega - Z(\theta ) u(t) \right) \right\} }_{\mathcal {L}} \hbox {d}t, \nonumber \\ \end{aligned}$$
(29)

with \(\lambda \) being the Lagrange multiplier (sometimes called a costate) which forces the dynamics to satisfy (27). The associated Euler–Lagrange equations are

$$\begin{aligned}&\frac{\partial {{\mathcal {L}}}}{\partial u} = \frac{\hbox {d}}{\hbox {d}t} \left( \frac{\partial {{\mathcal {L}}}}{\partial \dot{u}} \right) , \quad \frac{\partial {{\mathcal {L}}}}{\partial \lambda } = \frac{\hbox {d}}{\hbox {d}t} \left( \frac{\partial {{\mathcal {L}}}}{\partial \dot{\lambda }} \right) , \nonumber \\&\frac{\partial {{\mathcal {L}}}}{\partial \theta } = \frac{\hbox {d}}{\hbox {d}t} \left( \frac{\partial {{\mathcal {L}}}}{\partial \dot{\theta }} \right) ,\nonumber \\&\Rightarrow u(t) = \frac{\lambda (t) Z(\theta (t))}{2}, \end{aligned}$$
(30)
$$\begin{aligned}&\frac{\hbox {d} \theta }{\hbox {d}t} = \omega + Z(\theta ) u(t) = \omega + \frac{\lambda (t) [Z(\theta )]^2}{2}, \end{aligned}$$
(31)
$$\begin{aligned}&\frac{\hbox {d} \lambda }{\hbox {d}t} = - \lambda (t) Z'(\theta ) u(t) = - \frac{[\lambda (t)]^2 Z(\theta ) Z'(\theta )}{2}, \;\;\;\;\;\;\;\;\;\; \end{aligned}$$
(32)

where \(' = \hbox {d}/\hbox {d}\theta \). To find the optimal u(t), (31) and (32) need to be solved subject to the conditions

$$\begin{aligned} \theta (0) = 0, \quad \theta (T_1) = 2 \pi . \end{aligned}$$
(33)

This is a two-dimensional two-point boundary value problem where the boundary conditions for \(\theta (t)\) are given in (33). The appropriate initial conditions \((\theta (0),\lambda (0))\) can be found, for example, by using a shooting method in which updated initial conditions are determined via Newton iteration; see Appendix C. The solution \((\theta (t),\lambda (t))\) using this initial condition can then be used in (30) to give the optimal stimulus u(t). Reference [69] shows under certain conditions that the optimal stimulus for this problem is unique.

Fig. 3
figure 3

Flowchart describing the energy-optimal control algorithm based on standard phase reduction

Fig. 4
figure 4

Energy-optimal phase control for the thalamic neuron model: Left column shows the trajectory and time series, the middle column shows the evolution of phase \(\theta (t)\) and \(\lambda (t)\), and the right column shows the PRC and the control input. Control is on (resp., off) for the portion shown by the thick black (resp., thin blue) line. The trajectory starts at the small red circle. The red horizontal line shows the amplitude of the uncontrolled periodic orbit (color figure online)

Energy-optimal phase control example: thalamic neuron model

As an example, consider the thalamic neuron model given by Eqs. (1214) with the same parameters as before. We set \(T_1=1.2T\) to demonstrate the control. We calculate the PRC of the model using XPP and then solve the Euler–Lagrange equations (3132) as a two-point boundary value problem with boundary conditions given by Eq. (33). This gives \(\theta (t)\) and \(\lambda (t)\) as a time series, from which we obtain u(t) from (30). Then with the obtained input, we solve the full model (1214) to see how the control algorithm based on reduced model performs when applied to the full model. The control algorithm based on standard phase reduction is outlined in the flowchart in Fig. 3, and the results are shown in Fig. 4. It can be seen that control input is of opposite sign of the PRC, which slows down the \(\theta \) dynamics; see (27). In fact, as shown in [69] for control objectives with \(T_1 \approx T\), the shape of the optimal input u(t) is very similar to the shape of the PRC (here the shape is “flipped” because our control objective was to slow down the oscillator). Since the control input is small, it does not drive the trajectory far away from the periodic orbit. The optimal control found with this procedure works very well when applied to the full model: The spike occurs at a time which differs from the desired time of 1.2T by only \(0.04\%\). The total control energy consumed (\(\int _0^{T_1} u(t)^2 \hbox {d}t\)) comes out to be 10.8 units. This is approximately \(25\%\) less power than what would be required to achieve the same \(T_1\) with a constant input \(u(t) = -\,1.19\), with a total control energy consumed of 14.3 units.

Note that if we applied optimal control theory to the full thalamic neuron model with the objective of changing the time at which the neuron fires, we would need to solve a six-dimensional boundary value problem: three dimensions for the variables Vh, and r, and three more dimensions for the corresponding Lagrange multipliers. Additionally, the transformation to phase variables allows for an intuitive definition of when the neuron spikes (i.e., when \(\theta = 0\)). By contrast, for the thalamic neural model, a hypersurface corresponding to the moment of a neural spike would need to be defined, ultimately resulting in a significantly more difficult optimal control problem to solve.

The above calculation assumes that we know the exact expression for the PRC for the system that we wish to control. In an experimental setting, one expects that the PRC which is found using the direct method will not be exactly correct, due to noise and other uncertainties. However, the following illustrates that the control which is found from an approximate PRC can still give good results, suggesting that the optimal control calculation has a good level of robustness.

Consider the left panel of Fig. 5, in which an approximate PRC is found by fitting a Fourier series to noisy data from the direct method; here the fit includes constant, \(\cos (\theta ), \sin (\theta ), \cos (2 \theta ), \sin (2 \theta ), \cos (3 \theta )\), and \(\sin (3 \theta )\) terms. We use the approximate PRC in (3032) with \(T_1 = 1.2 T = 10.07\) to calculate the control input, which is shown in the right panel of Fig. 5. The next spike which occurs with this input is at \(t=9.95 = 1.185 T\), so it approximately achieves the desired control objective. Interestingly, the input found using the approximate PRC consumes less total energy (9.4 units) than the optimal input found for \(T_1 = 1.2 T\) using the exact PRC (10.8 units); this can be understood by noting that it should require less power to make the neuron fire at \(t=9.95\) than at \(t = 10.07\), since this is a milder objective. The optimal input calculated for a target time of \(T_1 = 9.95\) with the exact PRC would require even less power.

More rigorous investigations of the robustness of optimal control schemes for phase models can be found, for example, in [106, 107, 110]. However, there is still much work to be done to develop robust control algorithms for noisy, uncertain, heterogeneous biological systems.

Fig. 5
figure 5

The green dots in the left panel show noisy PRC measurements that might arise, for example, from applying the direct method to a thalamic neuron. The red line in the left panel shows the approximate PRC obtained by fitting a Fourier series to these data, while the blue line shows the exact PRC for this system. In the right panel, the red (resp., blue) line shows the control calculated using the approximate (resp., exact) PRC (color figure online)

We note that in optimal control problems, it is common to consider a Hamiltonian formulation which is equivalent to the Euler–Lagrange equations. In particular, one can define conjugate momenta \(p_i\) to the generalized coordinates \(q_i\) as \(p_i = \frac{\partial {{\mathcal {L}}}}{\partial \dot{q}_i}\). Then, the Legendre transformation [30] gives

$$\begin{aligned} H(q,p,t) = \sum \dot{q}_i p_i - \mathcal {L}(q,\dot{q},t), \end{aligned}$$

from which one obtains Hamilton’s equations

$$\begin{aligned} \dot{q}_i = \frac{\partial H}{\partial p_i}, \quad \dot{p}_i = -\frac{\partial H}{\partial q_i}. \end{aligned}$$
(34)

For the present problem, \(q_i \in \{u,\lambda ,\theta \}\), and the only nonzero conjugate momentum is the conjugate momentum to \(\theta \) given by \(p_\theta = \frac{\partial L}{\partial \dot{\theta }} = \lambda \). Therefore,

$$\begin{aligned} H= & {} \dot{\theta } \lambda - \underbrace{\left( [u(t)]^2 + \lambda \left( \frac{\hbox {d} \theta }{\hbox {d}t} - \omega - Z(\theta ) u(t) \right) \right) }_{\mathcal {L}} \\= & {} -[u(t)]^2 + \lambda \omega + \lambda Z(\theta ) u(t). \end{aligned}$$

From Hamilton’s equations, we then obtain

$$\begin{aligned} 0= & {} -\frac{\partial H}{\partial u} = 2 u - \lambda Z(\theta ), \\ \dot{\theta }= & {} \frac{\partial H}{\partial \lambda } = \omega + Z(\theta ) u(t), \\ \dot{\lambda }= & {} - \frac{\partial H}{\partial \theta } = - \lambda Z'(\theta ) u(t). \end{aligned}$$

It is readily shown that these are the same as the Euler–Lagrange equations in (3032).

Energy-optimal phase control with charge-balance constraint: [14, 74]

It may be desirable for energy-optimal phase control to restrict control inputs to obey the integral constraint \(\int _{0}^{T_1}u(t)\hbox {d}t=0\). If u(t) is an electrical input, this corresponds to a charge-balance constraint: The total amount of charge injected into the system over one control cycle is zero. We note that for neuroscience applications, charge-imbalanced inputs can cause Faradaic chemical reactions to take place near the stimulating electrode, which can result in damage to the tissue [67]. We can restate this constraint as follows: Let Q(t) be the amount of charge injected instantaneously at time t. Then, we get

$$\begin{aligned} \dot{Q}=u(t). \end{aligned}$$
(35)

Integrating both sides of this equation from 0 to \(T_1\), we obtain

$$\begin{aligned} Q(T_1)-Q(0)=\int _{0}^{T_1}u(\tau )\hbox {d}\tau . \end{aligned}$$

For the charge-balance constraint to hold, we need the right-hand side of this equation to be zero. This means \(Q(T_1)=Q(0)\), and assuming that the input is being applied from time \(t=0\), which implies \(Q(0)=0\), we also have \(Q(T_1)=0\).

Similar to above, suppose that for a specified spike time \(T_1\), for all stimuli u(t) which evolve \(\theta (t)\) via (27) from \(\theta (0) = 0\) to \(\theta (T_1) = 2 \pi \), we want to find the stimulus which minimizes the cost function (28) and yields \(q(T_1)=0\). We apply calculus of variations to minimize [25]

$$\begin{aligned}&\mathcal {C}[{\varvec{\Phi }}(t),\dot{{\varvec{\Phi }}}(t),u(t)]\nonumber \\&\quad = \int _0^{T_1} \underbrace{\left\{ [u(t)]^2 + \left[ \lambda _1(t) \quad \lambda _2(t) \right] \cdot \begin{bmatrix} \dot{\theta }-\omega - Z(\theta ) u(t) \\ \dot{Q}-u(t) \end{bmatrix} \right\} }_{\mathcal {L}[{\varvec{\Phi }},\dot{{\varvec{\Phi }}},u(t)]} \hbox {d}t, \nonumber \\ \end{aligned}$$
(36)

where \({\varvec{\Phi }}(t)=[\theta (t), \; Q(t), \; \lambda _1(t), \; \lambda _2(t)]^\mathrm{T}\). The Lagrange multipliers \(\lambda _1(t)\) and \(\lambda _2(t)\) force the dynamics to satisfy Eqs. (27) and (35).

Using vector notation, the associated Euler–Lagrange equations are

$$\begin{aligned} \frac{\partial \mathcal {L}}{\partial u} = \frac{\hbox {d}}{\hbox {d}t} \left( \frac{\partial \mathcal {L}}{\partial \dot{u}} \right) , \quad \frac{\partial \mathcal {L}}{\partial {\varvec{\Phi }}} = \frac{\hbox {d}}{\hbox {d}t} \left( \frac{\partial \mathcal {L}}{\partial \dot{{\varvec{\Phi }}}} \right) , \end{aligned}$$

so that

$$\begin{aligned}&u(t) = \frac{ \lambda _1(t) Z(\theta ) +\lambda _2(t)}{2}, \end{aligned}$$
(37)
$$\begin{aligned}&\dot{\theta } = \omega + \frac{\lambda _1(t) [Z(\theta )]^2 + \lambda _2(t) Z(\theta )}{2}, \end{aligned}$$
(38)
$$\begin{aligned}&\dot{Q} = u(t)=\frac{\lambda _1(t)Z(\theta )+\lambda _2(t)}{2}, \end{aligned}$$
(39)
$$\begin{aligned}&\dot{\lambda }_1 = -\frac{[\lambda _1(t)]^2 Z(\theta )Z'(\theta )+\lambda _1(t) \lambda _2(t) Z'(\theta )}{2}, \end{aligned}$$
(40)
$$\begin{aligned}&\dot{\lambda }_2 = 0. \end{aligned}$$
(41)

To find the optimal u(t), (38)–(41) need to be solved subject to the boundary conditions

$$\begin{aligned} \theta (0) = 0, \quad \theta (T_1) = 2 \pi , \quad Q(0) = 0, \quad Q(T_1) = 0. \end{aligned}$$
(42)

This is a four-dimensional two-point boundary value problem where the boundary values for \(\theta (t)\) and Q(t) are given in (42).

Charge-balanced control example: thalamic neuron model

To demonstrate the control, we again consider the thalamic neuron model given by Eqs. (1214) with same parameters as before. We set \(T_1=1.2T\) and show the results in Fig. 6. The steps taken to generate these results are similar to the ones given in Fig. 3.

Fig. 6
figure 6

Energy-optimal phase control with charge-balance constraint for the thalamic neuron model: Left column shows the trajectory and time series, the middle column shows the evolution of phase \(\theta (t)\) and instantaneous charge Q(t), and the right column shows the PRC and the control input. Control is on (resp., off) for the portion shown by the thick black (resp., thin blue) line. The trajectory starts at the small red circle. The red horizontal line shows the amplitude of the uncontrolled periodic orbit, whereas the red dashed line highlights the charge-balance constraint (color figure online)

It can be seen from Fig. 6 that control input takes both positive and negative values, as is necessary for charge balance. In order to slow down the oscillation, the input is most negative when the PRC is most positive. Moreover, when the input is most positive, it has little effect on the oscillation because the PRC is close to zero at those times; such positive inputs are necessary to achieve charge balance. The total control energy consumed (\(\int _0^{T_1} u(t)^2 \hbox {d}t\)) here is 37.9 units, which is almost 4 times the amount of energy consumed for the previous control without a charge-balance constraint. Since the control input is moderately large, it drives the trajectory away from the periodic orbit, which eventually returns back to the orbit once the control is turned off after time \(T_1\).

Note that if we applied optimal control theory to the full thalamic neuron model with the objective of changing the time at which the neuron fires and with the charge-balance constraint, we would need to solve an eight-dimensional boundary value problem: three dimensions for the variables Vh, and r, three more dimensions for the corresponding Lagrange multipliers, and two more dimensions for the charge-balance constraint.

This algorithm has been successfully applied to in vitro neurons in [76], showing that it is robust to noise and uncertainty inherent in real experimental systems. Moreover, an extension of such charge-balanced phase control to include constraints on the range of allowed control inputs is given without a charge-balance contraint in [15] and with a charge-balance constraint in [16].

Time-optimal control with charge-balance constraint: [75]

As an alternative control objective, suppose we want to find the control input u(t) that, when bounded to be less than a certain value \(\bar{u}\) in magnitude, i.e., \(|u(t)| \le \bar{u}\), would result in the minimum or maximum value of the timing of an event such as an action potential. For example, one might want a neuron to fire as quickly as possible subject to a constraint on the magnitude of the allowed input current; this could be used to increase the firing rate of neurons with a constraint due to hardware limitations and/or concern that large inputs might cause tissue damage. This is an optimization problem in which the next spike time \(T_1\) needs to be extremized. We will consider this problem with a charge-balance constraint imposed on the control input.

Fig. 7
figure 7

Time-optimal control with charge-balance constraint for the thalamic neuron model: Left column shows the trajectory and time series, the middle column shows the evolution of phase \(\theta (t)\) and instantaneous charge Q(t) under optimal control, and the right column shows the PRC and the control input. Control is on (resp., off) for the portion shown by the thick black (resp., thin blue) line. The trajectory starts at the small red circle. The red horizontal line shows the amplitude of the uncontrolled periodic orbit (color figure online)

In particular, we seek a control input u(t) which extremizes

$$\begin{aligned} \mathcal {G}(T_1)=\int _{0}^{T_1}1\;\hbox {d}t, \end{aligned}$$
(43)

with the following constraints:

$$\begin{aligned} \begin{array}{l} \dot{\theta } = \omega +Z(\theta )u(t), \quad \theta (0)=0, \quad \theta (T_1)=2\pi , \\ \dot{Q} = u(t), \;\; |u(t)| \le \bar{u}, \quad Q(0)=0, \quad Q(T_1)=0. \end{array} \end{aligned}$$
(44)

Following a similar procedure to above, the Hamiltonian associated with this system is

$$\begin{aligned} H(\theta ,q,\lambda _1,\lambda _2,u)=1+\lambda _1(\omega +Z(\theta )u(t))+\lambda _2u(t),\nonumber \\ \end{aligned}$$
(45)

where \(\lambda _1\) and \(\lambda _2\) are the Lagrange multipliers for this system. To obtain the necessary conditions for optimality, one can use the Hamiltonian in (45) to give

$$\begin{aligned} \dot{\theta }= & {} \frac{\partial H}{\partial \lambda _1} \Rightarrow \dot{\theta }=\omega + Z(\theta )u(t), \\ \dot{\lambda }_1= & {} -\frac{\partial H}{\partial \theta } \Rightarrow \dot{\lambda }_1=-\lambda _1(t) Z'(\theta )u(t), \\ \dot{Q}= & {} \frac{\partial H}{\partial \lambda _2} \Rightarrow \dot{Q}=u(t), \\ \dot{\lambda }_2= & {} -\frac{\partial H}{\partial q} \Rightarrow \dot{\lambda }_2=0. \end{aligned}$$

The optimal control for this problem is obtained from Pontryagin’s minimum principle [47, 57], which states that an optimal control must minimize the Hamiltonian. For the present problem, this gives

$$\begin{aligned} u(t)= \arg \mathcal {M}_{|u(t)| \le \bar{u}} \left( 1+ \lambda _1 \left( \omega +Z(\theta )u(t) \right) +\lambda _2u(t) \right) , \end{aligned}$$

where \(\mathcal {M} \in \{\mathrm{min,max}\}\). This yields the following equations for the optimal control input, u(t), for the cases of minimizing the inter spike interval (or \(T_1\)) of the neuron and maximizing it:

$$\begin{aligned}&u(t)= -\,\mathrm{sign}[\lambda _1Z(\theta )+\lambda _2]\bar{u} \quad \mathrm{for\; the \; min\; problem}, \end{aligned}$$
(46)
$$\begin{aligned}&u(t)= +\,\mathrm{sign}[\lambda _1Z(\theta )+\lambda _2]\bar{u} \quad \mathrm{for\; the\; max\; problem}. \nonumber \\ \end{aligned}$$
(47)

Equations (46) and (47) indicate that the magnitude of the optimal control is always equal to its bound and that only its sign changes with respect to time. This solution, known as bang–bang control, is expected since the objective here is to achieve extreme final time, and thus, one expects maximum effort from the control stimulus.

Fig. 8
figure 8

The left panel shows isostable coordinates of (50) numerically calculated according to (49). Black lines denote level sets of isostables. Dashed white lines show two different trajectories starting from different initial conditions and ultimately approaching the fixed point (gray dot). In the right panel, the black trace takes longer to return to the fixed point than the red trace, as predicted from their initial isostable coordinate values (color figure online)

Time-optimal control with charge-balance constraint example: thalamic neuron model

To demonstrate the control, we again consider the thalamic neuron model given by Eqs. (1214) with the same parameters as before. We set \(\bar{u}=1\) and consider the interspike interval minimization problem. We solve the optimal control equations subject to constraints given in Eq. (44) and plot the results in Fig. 7. Here as well, the steps taken to generate results are similar to the ones given in Fig. 3. With \(\bar{u}=1\), we get minimum \(T_1=0.93T\) under charge-balance constraint (the results from applying the optimal input to the phase model and the full model differ by only \(0.06\%\)). Since the control input is moderately small, the trajectory remains close to the periodic orbit. As can be seen from bottom panel of the right column of Fig. 7, the control input is positive and negative for equal amounts of time, thus giving zero net charge inflow at the end of the control.

Reference [75] shows for a different example neuron that the time-optimal control input obtained using this method gives good results when applied to the full non-reduced model for a range of input constraints \(\bar{u}\); see, for example, Fig. 6 from that reference.

3 Isostable reduction and control for systems with a stable fixed point

Before moving on to more sophisticated formulations of phase reduction for systems with a stable periodic orbit, we will first discuss a reduction which is analogous to the standard phase reduction, but for systems with a stable fixed point.

3.1 Isostables for a fixed point

Reference [112] proposed a method of phase reduction for systems with a stable fixed point, based on the notion of isostables [65], cf. [86]. Isostables are analogous to isochrons for asymptotically periodic systems and can be defined as sets of points in phase space that approach a fixed point together, in a well-defined sense described below. Isostables are related to the eigenfunctions of the Koopman operator [65].

The calculation of an isostable field, \(\mathcal {I}(\mathbf{x})\), exploits the linear nature of nonlinear dynamics near a fixed point \(\mathbf{x}_0\). For a linear system

$$\begin{aligned} {\dot{\mathbf{x}}} = A (\mathbf{x}-\mathbf{x}_0), \end{aligned}$$

and solutions \(\phi (t,\mathbf{x}(0))\) (also known as the flow) approach the fixed point as

$$\begin{aligned} \phi (t,\mathbf{x}(0)) - \mathbf{x}_0 = \sum _{j = 1}^n s_j(\mathbf{x}(0)) \mathbf{v}_j \hbox {e}^{\lambda _j t}, \end{aligned}$$
(48)

where \(s_j(\mathbf{x})\) are the coordinates of the vector \(\mathbf{x}\) in the basis \(\{ \mathbf{v}_j | j = 1,\dots ,n \}\) of unit eigenvectors of A, with associated eigenvalues \(\{ \lambda _j| j = 1,\dots ,n \}\), sorted so that \(\lambda _1\) corresponds to a unique slowest direction of the stable manifold, i.e., \(\mathrm{Re}(\lambda _j)< \lambda _1 < 0, \; \forall \; j > 1\). Here, we assume that \(\lambda _1\) is real and unique, and as shown in [65], the magnitude of \(s_1(x)\) determines the infinite-time approach to the origin. In other words, hyperplanes of constant isostables, \(\mathcal {I}_\tau \equiv \{ {\mathbf {x}} \in {\mathbb {R}}^n | \mathcal {I}(\mathbf {x}) = \tau \}\), near a fixed point are parallel to the faster directions \(\mathbf {v}_2, \dots , \mathbf {v}_n\).

For nonlinear systems, the isostable field within the fixed point’s entire basin of attraction, \(\mathcal {I}( \mathbf{x})\), can be calculated by monitoring the infinite-time approach of \(\phi (t,\mathbf{x}) \) to the fixed point, \(\mathbf{x}_0\), by computing

$$\begin{aligned} \mathcal {I}(\mathbf{x}) = \lim _{t \rightarrow \infty } \hbox {e}^{-\lambda _1 t} || \phi (t,\mathbf{x }) - \mathbf{x}_0 ||, \end{aligned}$$
(49)

where \(|| \cdot ||\) can be any norm; here we will be working with the 1-norm on \({\mathbb {R}}^n\). Intuitively, Eq. (49) compares the asymptotic approach to the fixed point along the slowest direction of the stable manifold, \(\mathbf{v}_1\), to an exponential function governed by the associated eigenvalue, \(\lambda _1\). We emphasize that Eq. (49) is valid for systems with a stable fixed point where \(\lambda _1\) is real and unique. In other cases, such as when \(\lambda _1\) is complex or the fixed point is unstable, isostables can still be calculated, and we refer the interested reader to [65] for a more complete discussion.

As an intuitive illustration of the notion of isostable coordinates, consider a FitzHugh–Nagumo-based model of an excitable system given in [87]:

$$\begin{aligned} \dot{V}&= c_1 V (V-a)(1-V)-c_2 V w, \nonumber \\ \dot{w}&= b(V-dw). \end{aligned}$$
(50)

Here the variables V and w are dimensionless and could be used to represent a cell membrane voltage and the state of a gating variable, respectively. In this example, we take \(a = 0.13, b = 0.013, c_1= 0.26, c_2 = 0.1,\) and \(d = 1\). With this choice of parameters, there is a stable fixed point at \((V,w) = (0,0)\). In the vicinity of the fixed point, small positive perturbations in the V variable result in large excursions. Numerically, \(\lambda _1\) is determined to be 0.013 and isostable coordinates are calculated directly according to (49) and shown in Fig. 8. As is characteristic of isostable coordinates, larger isostable values correspond to initial conditions that will take longer to approach the stable fixed point.

3.2 Isostable reduction

Isostables provide a useful coordinate system from which to define a reduced set of equations, similar to the phase reduction discussed in Sect. 2. To do so, consider an n-dimensional differential equation

$$\begin{aligned} \dot{\mathbf{x}} = \mathbf{F}(\mathbf{x}) + \mathbf{U}(\mathbf{x},t); \quad \mathbf{x} \in {\mathbb {R}}^n, \end{aligned}$$
(51)

where \(\mathbf{F}(\mathbf{x})\) is the vector field and \(\mathbf{U}(\mathbf{x},t)\) is an external stimulus. For a given set of initial conditions, suppose that the system follows the known trajectory \(\gamma \) to the stable fixed point \(\mathbf{x}_0\).

Our objective is to simplify (51) to a one-dimensional equation by defining scalar isostable coordinates \(\psi (\mathbf{x}) \in (-\infty , \infty ]\) for all \(\mathbf{x}\) in some neighborhood U of \(\mathbf{x}_0\) within its basin of attraction. It will be convenient to take \(\psi (\mathbf{x}) = -\log (\mathcal {I}(\mathbf{x}))\), where \(\mathcal {I}( \mathbf{x} )\) is defined in (49). Changing variables to isostable coordinates using the chain rule yields

$$\begin{aligned} \frac{\hbox {d} \psi }{\hbox {d}t} = \frac{\partial \psi }{\partial \mathbf{x}} \cdot \frac{\hbox {d} \mathbf{x}}{\hbox {d}t}&= \frac{\partial \psi }{\partial \mathbf{x}} \cdot \left( \mathbf{F}(\mathbf{x}) + \mathbf{U}(\mathbf{x},t) \right) , \nonumber \\&= \omega + \frac{\partial \psi }{\partial \mathbf{x}} \cdot \mathbf{U}(\mathbf{x},t), \end{aligned}$$
(52)

where the final line is obtained by noting that \(\hbox {d} \psi / \hbox {d}t = -\lambda _1\) at all locations when \(\mathbf{U}(\mathbf{x,t}) = 0\) (see equation (2.3) of [112] for further explanation of this feature of isostable coordinates). Thus \( \frac{\partial \psi }{\partial \mathbf{x}} \cdot \mathbf{F}(\mathbf{x}) = \omega \), with \(\omega = -\lambda _1\) (recall that \(\lambda _1\) is negative). Reduction (52) for systems which approach a fixed point is directly analogous to standard phase reduction (5) for systems with a stable period orbit. Moreover, calculation of the gradient along a trajectory \(\mathbf{x}(t)\) is also similar, as shown in [112]:

$$\begin{aligned} \frac{\hbox {d} \nabla _{\mathbf{x}(t)} \psi }{\hbox {d}t} = -D \mathbf{F}^\mathrm{T}(\mathbf{x}(t))\nabla _{\mathbf{x}(t)} \psi , \end{aligned}$$
(53)

with

$$\begin{aligned} \left\langle \nabla _{\mathbf{x}(t)} \psi ,\mathbf{v}_j \right\rangle = 0 \qquad \forall \; j \ge 2, \end{aligned}$$
(54)

where \(\mathbf{v}_j\) is the \(j{\mathrm{th}}\) right eigenvector of \(D\mathbf{F} (\mathbf{x}_0)\) when the eigenvalues are sorted in terms of increasing magnitude of their real parts. (Recall that \(\mathbf{x}_0\) is stable, so all eigenvalues have negative real part.) We refer to this gradient \(\nabla _{\mathbf{x} (t)}\psi \) as the isostable response curve (IRC); it gives a measure of the effect of a control input on the value of \(\psi \). In the absence of external stimuli, \(\frac{\hbox {d} \psi }{\hbox {d}t} = \omega \), i.e., \(\psi (\mathbf{x})\) increases at a constant rate. We note that \(\psi \) can be rescaled by a constant if desired, which will yield a different constant rate of change. By definition, \(\psi (\mathbf{x}) = \infty \) corresponds to \(\mathbf{x} =\mathbf{x}_0\), meaning that in the absence of external control, all trajectories in the domain of attraction of \(\mathbf{x}_0\) approach the fixed point in infinite time.

Fig. 9
figure 9

a The steady-state alternans behavior when pacing the FMG model at a rate of BCL \(=\) 175 ms with action potentials alternating between long and short durations. b APD restitution curves measured with different pacing histories. To measure one datapoint from the light blue curve, for instance, the model is paced at 250 ms until transient behavior dies out; the next action potential is initiated once the DI reaches a prescribed value. Different color curves highlight memory in the system [7, 99]. All curves increase monotonically with the DI

Example of control based on the isostable reduction: controlling alternans

Isostable reduction strategies have been shown to be useful in cardiological applications [112, 114] where the timing of the approach to the associated system’s fixed point is of interest. Cardiomyocytes are the electrically excitable cells within the heart which work together to produce a coordinated heartbeat. For these electrically coupled cells, small voltage perturbations from the resting state result in an action potential. The action potential duration (APD) is a (generally) increasing function of the diastolic interval (DI), i.e., time duration for which the cell remains quiescent preceding the next action potential [31]. This relationship is known as the APD restitution curve.

Under healthy conditions, a constant pacing interval, often referred to as the basic cycle length (BCL), produces steady-state period-1 behavior resulting in APDs which are constant on a beat-to-beat basis. However, pathological conditions can arise which result in period-2 behavior with action potentials of alternating duration. This phenomenon, known as alternans, has been well studied in the past decades and is generally viewed as a precursor to more deadly cardiac arrhythmia [77, 81]. Seminal work by Nolasco and Dhalen [79] showed that alternans can emerge as a result of a period doubling bifurcation when the slope of the APD restitution curve is greater than 1. The understanding of the exact cause of alternans has become more complicated in recent years as unstable calcium dynamics [82, 83] and memory of pacing history [7, 99] have been shown to play a contributing role.

In this example, cf. [112], we will consider the problem of eliminating alternans in the FMG model of cardiac action potentials [26]; see Appendix A. In this model, alternans ermeges primarily due to steep APD restitution. Using the nominal parameter set from [26], the single cell is paced at a BCL of 175 ms. Under steady-state conditions, alternans develops with action potentials of alternating duration, as shown in Panel A of Fig. 9. Previous work has focused on eliminating alternans by stabilizing the unstable period-1 behavior [8, 27, 114]. Isostable reduction allows one to investigate alternans elimination strategies in a weakly perturbed setting. Advantages of using this strategy as compared to others are that it can be implemented in high-dimensional models, does not require continuous feedback about state variables from the cell, and does not require the application of premature pulses.

Much like the analysis of the energy-optimal phase control of neural action potentials presented earlier, we begin with a standard isostable reduction (52)

$$\begin{aligned} \dot{\psi } = \omega + \mathcal {I}(\psi ) u(t). \end{aligned}$$
(55)

In the context of controling cardiac arrhythmia, \(\psi \) represents the infinite-time decay of the smallest magnitude eigenvalue of the fixed point, \(\omega \) is determined by the rate of decay, and \(\mathcal {I}(\psi ) \equiv \hbox {d} \psi / \hbox {d} V\) is the isostable response curve to time varying voltage perturbations u(t). Here \(I(\psi )\) is a scalar function because we assume that the control only affects the voltage equation for the system. Note that while isostable coordinates are defined in terms of the ultimately linear infinite- time behavior near the fixed point, the reduction is valid in the entire basin of attraction of the fixed point. In this example, \(\psi = 0\) is defined to correspond to the moment that \(\hbox {d}V/\hbox {d}t = 0\) during the action potential plateau. Additionally, the isostable coordinates are scaled so that \(\omega = 1/2000\).

For this model, as is the case with most cardiac cells, the APD restitution curve is monotonically increasing as shown in Panel B of Fig. 9. We will also assume that in the absence of control, the APD is a monotonically increasing function of the isostable coordinate, i.e., \(\mathrm{APD}^{n} = \varLambda (\psi ^n)\) where \(\mathrm{APD}^n\) is the \(n{\mathrm{th}}\) APD and \(\psi ^n\) is the value of the isostable coordinate immediately preceeding the upstroke of the \(n{\mathrm{th}}\) action potential. Such a relation certainly holds in the unperturbed case, where longer DIs allow the system to travel closer to the fixed point resulting in larger values of \(\psi \) and longer APDs on the subsequent beat.

We will formulate our optimal control problem assuming that alternans is present and apply control on the \((n+1){\mathrm{th}}\) beat when \(\mathrm{APD}^{n}<\mathrm{APD}^{n-1}\). In other words, we will be applying control to modify a long APD. We define \(t = 0\) to correspond to the time the next action potential starts and define \(t_1\) to be the moment \(\psi (\mathbf{x}(t_1)) = 0\). Our objective will be to modify the isostable coordinate at \(t = \mathrm{BCL}\) (corresponding to the moment the following action potential occurs) in order to restore period-1 behavior. We do this by requiring

$$\begin{aligned} \psi (\mathrm{BCL}) = \omega (\mathrm{BCL}-t_1) - \omega (\mathrm{APD}_n - \mathrm{APD}_{n-1})/2. \end{aligned}$$
(56)

Intuitively, the above relation advances the isostable coordinate midway between isostable coordinates which produce long and short action potentials. Because we assume that the APD is a monotonically increasing function of the isostable coordinate immediately preceeding the upstroke in the action potential, satisfying this control objective will ultimately stabilize the unstable period-1 behavior in this system and eliminate alternans (see [112] for further explanation). Suppose that we also want to achieve this control objective using the stimulus u(t) which minimizes the cost functional

$$\begin{aligned} {{\mathcal {G}}}[u(t)] = \int _{t_1}^{\mathrm{BCL}} [u(t)]^2 \hbox {d}t, \end{aligned}$$
(57)

which is the same square-integral cost as (28). This optimal control formulation produces an analogous calculus of variations problem to the one posed in Sect. 2 resulting in similar Euler–Lagrange equations which can be solved for the appropriate boundary conditions using a shooting method.

Fig. 10
figure 10

Despite using different BCLs to obtain different action potentials for the FMG model, the IRCs are nearly identical. Dashed lines in a show bounds within which 90% of all measured IRCs fit. b The APD as a function of the beat number when control is applied (shaded regions) and without control (unshaded regions). Upon application of the optimal control, alternans is quickly eliminated resulting in period-1 behavior. When control is turned off, alternans reemerges in steady state

In order to calculate IRCs along trajectories of the FMG model we take the slowly varying sarcoplasmic reticulum calcium concentration \([\mathrm{Ca}^{2+}]_\mathrm{SR}\) to be equal to its average value of 318 \(\upmu \mathrm{mol}\) steady-state behavior using a BCL of 175 ms. We calculate IRCs using this reduced model for trajectories determined from action potentials in systems paced at BCLs ranging from 160 to 210 ms. Numerically, this is accomplished by integrating until the trajectory approaches the fixed point, determining the initial value of the IRC using both (54) and \(\frac{\mathrm{d} \phi }{\mathrm{d}t} = \frac{\partial \psi }{\partial \mathbf{x}} \cdot \mathbf{F}(\mathbf{x}) = \omega \), and integrating (53) backwards in time to determine the IRC. The IRC is similar over multiple trajectories, and the dashed lines in Panel A of Fig. 10 show boundaries within which 90 percent of the calculated IRCs fit. Because they are so similar, we use the average value of each calculated IRC in reduction (55). Optimal control is calculated by finding the u(t) which minimizes cost functional (57) subject to constraint (56). The resulting control is applied to the full 13-dimensional FMG model. Results are presented in panel B of Fig. 10, which show the measured APD as a function of the beat number. Without control (unshaded regions), alternans develops in the system. With control (shaded regions), alternans are quickly eliminated and the action potential does not change significantly on a beat-to-beat basis.

The control strategy documented above was investigated in greater detail in [112] and was shown to be effective for eliminating alternans in single-cell models. Later work [114] extended this general strategy for use in PDE models of cardiac tissue with one and two spatial dimensions. This and other alternans control elimination strategies [8, 27] require control to be given at multiple locations throughout the tissue when considering large domains, and it remains an open question whether alternans can be eliminated throughout the heart by applying local perturbation; [71] proposes a possible approach to do this by controlling cardiac pacemaker cells.

When compared to the wealth of the literature on optimal control methods using phase reduction (see, e.g., [15, 18, 48, 69, 75, 76, 95, 96, 106, 110, 118]), isostable coordinates are relatively new and control applications are still emerging. Preliminary applications, including the one presented above, have suggested that isostable control methods are particularly useful when the timing of a system’s approach to a fixed point or stationary solution is of practical interest. Additional applications include [62], which investigates optimal control input used to either speed or slow the convergence of a dynamical system to its fixed point. Also, [92, 108] develop control strategies to drive a population of excitable systems to the same isostable coordinate, thereby synchronizing their resulting convergence to a fixed point.

4 Augmented phase reduction for systems with a periodic orbit

Standard phase reduction (5) is valid only in a small neighborhood of the periodic orbit. Therefore, a control input derived based on the standard phase reduction can only be expected to be effective if its amplitude is small enough that it does not drive the system far away from the periodic orbit. This limitation becomes even more important if the nontrivial Floquet multiplier, which describes the rate of decay of perturbations transverse to the periodic orbit, has magnitude close to unity [71]. This limits the ability to achieve certain control objectives and necessitates the use of augmented phase reduction, to be described below. Augmented phase reduction uses the concept of isostables for a periodic orbit [113], which are coordinates that a give a sense of the distance in directions transverse to the periodic orbit; see Fig. 11. The addition of these transversal coordinates allows one to design control algorithms which, while achieving the desired control objective, also keep the controlled trajectory close to the periodic orbit [71]. Reference [71] devises an energy-optimal control algorithm to change the phase of a periodic orbit and shows how such a control algorithm is effective in situations where the control algorithm based on standard phase reduction fails; we will give a summary of this approach in Sect. 4.2. We note that augmented phase reduction is related to other proposed reductions given in [5, 34, 91, 101]; for more detail, see [71].

Fig. 11
figure 11

A sketch of the behavior of a two-dimensional system near its limit cycle \(\mathbf{x}^\gamma (t)\). The red and blue lines represent two trajectories which start on the isostable level set indicated as a dotted line, and after one period are on the isostable level set indicated as a dashed line. The isostable coordinate \(\psi _1\) decreases at an exponential rate governed by the Floquet multiplier \(\lambda _1\) (color figure online)

Toward defining isostable coordinates for (4) with a periodic orbit, consider a point \(\mathbf {x_0}\) on the periodic orbit \(\mathbf{x}^\gamma (t)\) with the corresponding isochron \(\varGamma _0\). The transient behavior of the system near \(\mathbf {x_0}\) can be analyzed by a Poincaré map P on \(\varGamma _0\),

$$\begin{aligned} P:\varGamma _0 \rightarrow \varGamma _0; \quad \mathbf {x} \rightarrow P(\mathbf {x}). \end{aligned}$$

Here \(\mathbf {x_0}\) is a fixed point of this map, and we can approximate P in a small neighborhood of \(\mathbf {x_0}\) as

$$\begin{aligned} P(\mathbf {x})=\mathbf {x_0}+DP(\mathbf {x}-\mathbf {x_0})+\mathcal{} O({||\mathbf {x}-\mathbf {x_0}||}^2), \end{aligned}$$

where \(DP=\hbox {d}P/\hbox {d}x|_{\mathbf {x_0}}\). Suppose DP is diagonalizable with \(V \in {\mathbb {R}}^{n\times n}\) as a matrix with columns of unit length eigenvectors \(\{ v_k|k=1,\ldots ,n\}\) and the associated eigenvalues \(\{ \lambda _k|k=1,\ldots ,n\}\) of DP. These eigenvalues \(\lambda _i\) are the Floquet multipliers of the periodic orbit. For every nontrivial Floquet multiplier \(\lambda _i\), with the corresponding eigenvector \(v_i\), the set of isostable coordinates is defined as [113]

$$\begin{aligned} \psi _i(\mathbf {x})= & {} \lim \limits _{j \rightarrow \infty } \left[ e_i^TV^{-1}(\mathbf {x}_\varGamma ^j-\mathbf {x_0})\exp (-\log (\lambda _i)t_\varGamma ^j/T) \right] , \nonumber \\ i= & {} 1,\ldots ,n-1. \end{aligned}$$
(58)

Here \(\mathbf {x}_\varGamma ^j\) and \(t_\varGamma ^j \in [0,T)\) are defined to be the position and the time of the \(j{\mathrm{th}}\) crossing of the isochron \(\varGamma _0\), and \(e_i\) is a vector with 1 in the \(i\mathrm{th}\) position and 0 elsewhere. Note that \(e_i^T V^{-1}\) is a left eigenvector of the linearization DP which selects for the appropriate component of \({\mathbf {x}}^j_\varGamma - {\mathbf {x}_0}\) in the basis of eigenvectors of DP. As shown in [113], cf. [5], we get the following equations for \(\psi _i\) and its gradient \(\nabla _{\gamma (t)} \psi _i\) under the flow \(\dot{\mathbf {x}}=\mathbf{F}(\mathbf {x})\):

$$\begin{aligned} {\dot{\psi }}_i= & {} k_i \psi _i, \end{aligned}$$
(59)
$$\begin{aligned} \frac{\hbox {d}\nabla _{\gamma (t)} \psi _i}{\hbox {d}t}= & {} \left( k_i \; Id - D \mathbf{F}^\mathrm{T}(\gamma (t))\right) \nabla _{\gamma (t)}\psi _i, \end{aligned}$$
(60)

where \(k_i=\log (\lambda _i)/T\) are Floquet exponents, \(D \mathbf{F}\) is the Jacobian of \(\mathbf{F}\), and Id is the identity matrix. We refer to this gradient \(\nabla _{\gamma (t)}\psi _i\equiv \mathbf{I}_i(\theta )\) as the isostable response curve (IRC). To ensure uniqueness of the IRC, along with its T-periodicity, we take the normalization condition \(\nabla _{\mathbf {x_0}}\psi _i \cdot v_i=1\). The IRC gives a measure of the effect of a control input in driving the trajectory away from the periodic orbit. The n-dimensional system can be realized as [113]

$$\begin{aligned} {\dot{\theta }}= & {} \omega +\mathbf{Z}(\theta ) \cdot \mathbf{U}(t), \end{aligned}$$
(61)
$$\begin{aligned} {\dot{\psi }}_i= & {} k_i\psi _i+\mathbf{I}_i(\theta )\cdot \mathbf{U}(t), \quad \text {for} \quad i=1,\ldots ,n-1. \end{aligned}$$
(62)

We refer to (6162) as the augmented phase reduction. Here, the phase variable \(\theta \) indicates the position of the trajectory along the periodic orbit, and the isostable coordinate \(\psi _i\) gives information about transversal distance from the periodic orbit along the ith eigenvector \(v_i\). We note that, at this order, the phase (\(\theta \)) dynamics are unaffected by the isochron coordinates (\(\psi _i\)’s) and are identical to the phase dynamics for standard phase reduction (5). Therefore, the augmented phase reduction does not lead to any correction to the phase dynamics. In Sect. 4.3, we will show that this is no longer the case when the phase reduction is carried out to next order. The augmented phase reduction is identical to the two-dimensional system given by equation (22) in [5], in which \(\theta \) and \(\sigma \) describe the dynamics along, and transverse to the periodic orbit, respectively. It is evident from (6162) that the control input affects the oscillator’s phase through the PRC and its transversal distance to the periodic orbit through the IRC. In practice, isostable coordinates with nontrivial Floquet multiplier sufficiently close to 0 can be ignored as perturbations in those directions decay quickly under the evolution of the vector field. If all isostable coordinates are ignored, the augmented phase reduction reduces to the standard phase reduction. In this tutorial, we consider dynamical systems that only have one of the nontrivial Floquet multipliers close to one, and the remaining \(n-2\) nontrivial Floquet multipliers sufficiently close to zero. We then can write the augmented phase reduction as

$$\begin{aligned} {\dot{\theta }}= & {} \omega +\mathbf{Z}(\theta ) \cdot \mathbf{U}(t), \end{aligned}$$
(63)
$$\begin{aligned} {\dot{\psi }}= & {} k\psi +\mathbf{I}(\theta )\cdot \mathbf{U}(t) . \end{aligned}$$
(64)

Here we have removed the subscript for \(\psi \) and k, as we only have one isostable coordinate. Note that for planar systems, the eigenvector v is the unit vector along the one-dimensional projection of the isochron \(\varGamma _0\), and the nontrivial Floquet exponent k can then be computed, for example, from the divergence of the planar vector field as [29]

$$\begin{aligned} k=\frac{\int _0^T{ \nabla \cdot \mathbf{F}(\mathbf{x}^\gamma (t))\hbox {d}t}}{T}. \end{aligned}$$
(65)

4.1 Calculating isostable response curves

Given the importance of IRCs for the augmented phase reduction, we now describe several ways in which they can be calculated.

Direct method: [113]

PRCs are calculated by the direct method by giving perturbations to the oscillator at various phases and recording the phase change caused by the perturbation as a function of the stimulation phase. IRCs can be measured in a similar way. We apply perturbations \((\tilde{\mathbf{x}}^\gamma + \varDelta {x_i} \hat{i})\) at various phases along the periodic orbit in the direction of the \(i{\mathrm{th}}\) coordinate. We record a time series of crossings of the \(\varGamma _0\) isochron, \(t_\varGamma ^j\), as well as the crossing locations, \({\mathbf {x}}_\varGamma ^j\), and use this information with the definition of isostable in (58) to calculate the isostable change \(\varDelta \psi \) caused by the perturbation, which when scaled by the magnitude of the perturbation yields the IRC.

Fig. 12
figure 12

IRC for the thalamic neuron model: The blue line (resp., red dots) shows IRC in response to voltage perturbations computed from the adjoint (resp., the direct) method (color figure online)

Adjoint method: [5, 113]

Unlike solving for the PRC, backwards integration of (60) will result in positive Floquet exponents and hence a periodic solution that is unstable. To see why, consider the related adjoint equation (10), which yields Floquet exponents that are identical to those of the periodic orbit when integrated backwards in time. By contrast, the Floquet exponents of (60) will each be shifted by \(k_i\). Because (10) has a Floquet exponent of zero (corresponding to the periodic orbit itself), the shifted Floquet exponent in (60) will be positive, resulting in an unstable periodic orbit. We have therefore found it useful to formulate the calculation as a boundary value problem and solve it with Newton iteration; see Appendix C. The first step is to compute and save the periodic solution \(\mathbf{x}^\gamma (t)\) using an ODE solver. For the two-point boundary value formation, we take the boundary conditions as \(\mathbf{I}(0) = \mathbf{I}(T)\). For Newton iteration, we take

$$\begin{aligned}&c^\nu =\mathbf{I}(0),\\&g(c^\nu )=\mathbf{I}(0)-\mathbf{I}(T),\\&\left. \frac{\partial g}{\partial c}\right| _{c^\nu }=Id-J, \end{aligned}$$

where Id is the identity matrix and J is the Jacobian matrix

$$\begin{aligned} J=\frac{\partial \mathbf{I}(T)}{\partial \mathbf{I}(0)}, \end{aligned}$$

which is computed numerically. Once a periodic solution is obtained, the computed IRC is scaled by the normalization condition \(\nabla _{\mathbf {x_0}}\psi \cdot v_i=1\).

Example IRC calculation: thalamic neuron model

As an illustration, we calculate the IRC using both the direct method and the adjoint method for the thalamic neuron model given by Eqs. (1214) with the same parameters as before. Those parameters give a stable periodic orbit with time period \(T=8.3955\) ms and nontrivial Floquet multipliers 0.8275 and 0.0453. Since one of the nontrivial Floquet multipliers is close to 0, we only consider the isostable coordinate corresponding to the larger nontrivial Floquet multiplier in the augmented phase reduction. To calculate the IRC by the adjoint method, we solve the corresponding adjoint equation as a two-point boundary value problem. For the direct method, a MATLAB code was written where perturbations of size \(\delta v = -0.3\) were given at 20 points spread along the periodic orbit. Once the perturbed trajectories came reasonably close to the periodic orbit, the corresponding isostable change was calculated, which when normalized by the magnitude of the perturbation gives the first component of the IRC. The first (i.e., voltage) component of the IRC for the periodic orbit is shown in Fig. 12.

Analytical results

We now derive analytical results for IRCs for two illustrative examples which can arise for simplified models of biological systems and physiological rhythms: : \(\lambda -\omega \) systems and general radial isochron clocks. Some of these results are similar, but obtained using a different method, to the results in [37].

\(\bullet \) \(\lambda - \omega \) systems

Recall from (24) that the PRC for a \(\lambda - \omega \) system is

$$\begin{aligned} \mathbf{Z}(\theta )= & {} \left( -\frac{H'(r_\mathrm{po})}{G'(r_\mathrm{po})}\cos \theta -\frac{\sin \theta }{r_\mathrm{po}}\right) {\hat{x}}\\&+\left( -\frac{H'(r_\mathrm{po})}{G'(r_\mathrm{po})}\sin \theta +\frac{\cos \theta }{r_\mathrm{po}}\right) {\hat{y}}. \end{aligned}$$

At a point \((x,y)=(r_\mathrm{po},0)\equiv (x_0,y_0)\), the isochron is in the direction orthogonal to the PRC (because surfaces of constant phase are orthogonal to the gradient of the phase). Thus, the eigenvector v is given as

$$\begin{aligned} \frac{\left( -\frac{1}{r_\mathrm{po}}\right) {\hat{x}} + \left( -\frac{H'(r_\mathrm{po})}{G'(r_\mathrm{po})}\right) {\hat{y}}}{\sqrt{\left( \frac{H'(r_\mathrm{po})}{G'(r_\mathrm{po})}\right) ^2+\frac{1}{{r_\mathrm{po}}^2}}}. \end{aligned}$$

We will use this vector in the normalization condition for the IRC below. The IRC (in polar coordinates: \(\frac{\partial \psi }{\partial r}~{\hat{r}}+ \frac{\partial \psi }{\partial \phi } {\hat{\phi }} \equiv I_r~{\hat{r}}+I_{\phi }~{\hat{\phi }}\)) can be found by solving the adjoint equation subject to T-periodicity and normalization condition as:

$$\begin{aligned} \dot{I}_r= & {} \left( k-G'(r_\mathrm{po})\right) I_r - H'(r_\mathrm{po})I_\phi ,\\ \dot{I}_{\phi }= & {} k I_{\phi }\\\Rightarrow & {} I_{\phi } =I_{\phi _0}\hbox {e}^{kt}. \end{aligned}$$

To find k, we note that near the periodic orbit we have the linear approximation \(\dot{r} = G'(r_0) r\), with solution \(r(t) = r_0 \exp [G'(r_0) t]\); since \(r(T) = r_0 \exp [G'(r_0) T]\), the Floquet exponent \(k = G'(r_0)\). Since \(I_{\phi }\) and \(I_r\) are T-periodic, we must have \(I_{\phi _0}=0\). Thus, the IRC in polar coordinates is

$$\begin{aligned} \mathbf{I}_{r,\phi } =I_{r_0}~{\hat{r}}+0~ {\hat{\phi }}; \end{aligned}$$

equivalently in Cartesian coordinates the IRC is

$$\begin{aligned} \mathbf{I}_{x,y} =I_{r_0}\cos \theta ~{\hat{x}}+I_{r_0}\sin \theta ~{\hat{y}}. \end{aligned}$$

To find the constant \(I_{r_0}\), we use the normalization condition at point \((x_0,y_0)\)

$$\begin{aligned} \mathbf{I}_{x_0,y_0} \cdot v= & {} 1.\\\Rightarrow & {} \left\{ I_{r_0}~{\hat{x}}+0~{\hat{y}}\right\} \cdot \left\{ \frac{\left( -\frac{1}{r_\mathrm{po}}\right) {\hat{x}} + \left( -\frac{H'(r_\mathrm{po})}{G'(r_\mathrm{po})}\right) {\hat{y}}}{\sqrt{\left( \frac{H'(r_\mathrm{po})}{G'(r_\mathrm{po})}\right) ^2+\frac{1}{{r_\mathrm{po}}^2}}}\right\} =1,\\\Rightarrow & {} I_{r_0} = -\sqrt{1+\frac{{r_\mathrm{po}}^2H'(r_\mathrm{po})^2}{G'(r_\mathrm{po})^2}}. \end{aligned}$$

This gives the IRC in polar and Cartesian coordinates as

$$\begin{aligned} \mathbf{I}_{r,\phi } =-\sqrt{1+\frac{{r_\mathrm{po}}^2H'(r_\mathrm{po})^2}{G'(r_\mathrm{po})^2}}~{\hat{r}}+0~ {\hat{\phi }}, \end{aligned}$$
(66)

or, equivalently,

$$\begin{aligned} \mathbf{I}_{x,y} = -\sqrt{1+\frac{{r_\mathrm{po}}^2H'(r_\mathrm{po})^2}{G'(r_\mathrm{po})^2}}\left( \cos \theta ~{\hat{x}}+\sin \theta ~{\hat{y}}\right) . \end{aligned}$$
(67)

We see that the Cartesian components of the IRC for a \(\lambda -\omega \) system each take positive and negative values, depending on the value of the phase \(\theta \). Thus, the same instantaneous, infinitesimal perturbation can either increase or decrease the isostable coordinate (moving the trajectory inward or outward from the periodic orbit, in the sense of isostables), depending on when it is applied.

We now consider two special cases of \(\lambda -\omega \) systems.

Hopf bifurcation normal form

The normal form for a Hopf bifurcation [35] in Cartesian coordinates is:

$$\begin{aligned} \dot{x}= & {} ax-by+(x^2+y^2)(cx-dy),\\ \dot{y}= & {} bx+ay+(x^2+y^2)(dx+cy), \end{aligned}$$

which can be written in polar coordinates as:

$$\begin{aligned} \dot{r}=ar+cr^3,\\ {\dot{\phi }}=b+dr^2. \end{aligned}$$

Thus, the Hopf normal form is a \(\lambda - \omega \) system, with \(G(r)=ar+cr^3\) and \(H(r)=b+dr^2\). With parameters \(c<0\) (corresponding to a supercritical Hopf bifurcation), and \(a<0\), the system has a stable fixed point. As a increases through 0, a stable periodic orbit is born, and the fixed point loses stability. For \(a>0\), the radius of the stable periodic orbit is \(r_\mathrm{po}=\sqrt{-a/c}\), and its time period is given by \(T=2\pi / \left( b+dr_\mathrm{po}^2\right) \). Using Eqs. (6667), we get the IRC as

$$\begin{aligned} \mathbf{I}_{x,y}= & {} -\sqrt{1+\frac{d^2}{c^2}}\left( \cos \theta ~{\hat{x}}+\sin \theta ~{\hat{y}}\right) . \end{aligned}$$
(68)

We note that a special case of this problem was considered using different methods in Example 5.1 from [37].

Bautin bifurcation normal form

The Bautin normal form [36, 54] can capture a saddle-node bifurcation of periodic orbits, where an unstable branch of periodic orbits born out of a subcritical Hopf bifurcation turns around and gains stability. This can be written in polar coordinates as:

$$\begin{aligned} \dot{r}=ar+cr^3+fr^5,\\ {\dot{\phi }}=b+dr^2+gr^4. \end{aligned}$$

The Bautin normal form is thus a \(\lambda - \omega \) system with \(G(r)=ar+cr^3+fr^5\) and \(H(r)=b+dr^2+gr^4\). With parameters \(c>0\), \(f<0\), and \(a>0\), the system has an unstable fixed point and a stable periodic orbit. As a decreases through 0, an unstable periodic orbit is born in a subcritical Hopf bifurcation, and the fixed point becomes stable. As a decreases further, the stable and unstable periodic orbits annihilate in a saddle-node bifurcation of periodic orbits at \(a=c^2/4f\). The bifurcation diagram is shown in Fig. 13. Now consider the stable periodic orbit with radius \(r_\mathrm{po}=\sqrt{\frac{-c-\sqrt{c^2-4af}}{2f}}\) and time period \(T=2\pi / \left( b+dr_\mathrm{po}^2+gr_\mathrm{po}^4\right) \). Using Eqs. (6667), we get the IRC in polar and Cartesian coordinates as

$$\begin{aligned} \mathbf{I}_{r,\phi }= & {} -\sqrt{1+r_\mathrm{po}^2\left( \frac{2dr_\mathrm{po}+4gr_\mathrm{po}^3}{a+3cr_\mathrm{po}^2+5fr_\mathrm{po}^4}\right) ^2}~{\hat{r}}+0~ {\hat{\phi }},\\ \mathbf{I}_{x,y}= & {} -\sqrt{1+r_\mathrm{po}^2\left( \frac{2dr_\mathrm{po}+4gr_\mathrm{po}^3}{a+3cr_\mathrm{po}^2+5fr_\mathrm{po}^4}\right) ^2}\left( \cos \theta ~{\hat{x}}+\sin \theta ~{\hat{y}}\right) . \end{aligned}$$
Fig. 13
figure 13

Bautin normal form bifurcation diagram for \(c=1\), and \(f=-2\). Solid blue (resp., dashed red) lines show stable (resp., unstable) solutions (color figure online)

Fig. 14
figure 14

Periodic orbit for the thalamic neuron model with \(I_\mathrm{b}=0.3281\)

We now consider the IRC for the thalamic neuron model for a parameter regime for which the system undergoes a saddle-node bifurcation of periodic orbits, and compare with the results for the Bautin normal form.

Example: IRC for thalamic neuron model near saddle-node bifurcation of periodic orbits

For the thalamic neuron model (1214) with \(u=0\) and \(I_\mathrm{b}=0.3281\,\upmu \hbox {A/cm}^2\), there exists a stable periodic orbit near a saddle-node bifurcation of periodic orbits with time period \(T=88.6816\) ms and nontrivial Floquet multipliers 0.8415 and \(2.584 \times 10^{-8}\). Since one of the nontrivial Floquet multiplier is close to 0, we only consider the isostable coordinate corresponding to the larger nontrivial Floquet multiplier for the augmented phase reduction. The nontrivial Floquet exponent comes out to be \(k=-\,0.001946\). Figure 14 shows the periodic orbit for the thalamic neuron model with the given parameter values. Figure 15 shows the numerically computed IRC for the thalamic neuron model for these parameters. We see that the IRC along the voltage v and gating variable r match closely with a sinusoid, whereas the IRC along the gating variable h does not. This is because the Bautin normal form only captures the turning around of an unstable periodic orbit branch born out of a subcritical Hopf bifurcation and gaining stability in a saddle-node bifurcation of periodic orbits. However, it does not capture the relaxation nature of dynamics present in some models, including this one. That is why the IRC computed numerically for such models does not match closely in shape with the derived analytical expression, cf. [44]. The variables x and y in the Bautin normal form vary at a similar rate, but the variables v and h in the thalamic neuron model vary at a much faster rate than the variable r.

Fig. 15
figure 15

IRC for the thalamic neuron model near the saddle-node bifurcation of periodic orbits: The blue line shows the numerically computed IRCs, while the red line shows the best matching sinusoid curve. The left, middle, and right panels show the \(v, \ h\), and r components of the IRC and its closest matching sinusoid, respectively (color figure online)

\(\bullet \) General radial isochron clocks

Recall from (21) that the PRC for the general radial isochron clock is

$$\begin{aligned} \mathbf{Z}(\phi ) = \frac{\omega }{r_\mathrm{po}K(\phi )}\left( -\sin \phi {\hat{x}}+\cos \phi {\hat{y}}\right) , \end{aligned}$$

which can be rewritten in terms of the phase variable \(\theta \) by using (16). To use adjoint Eq. (60) for the IRC (with \(\psi _i \rightarrow \psi \) and \(k_i \rightarrow k\)), we need an expression for the nontrivial Floquet exponent k, which must be negative for a stable periodic orbit. As for a \(\lambda -\omega \) system, \(k = G'(r_0)\).

The isochrons are radial lines, with eigenvector \(v={\hat{x}} + 0{\hat{y}}\) at point \((x,y)=(-r_\mathrm{po},0)\equiv (x_0,y_0)\). Thus, the adjoint equation for the IRC becomes:

$$\begin{aligned} \dot{I}_r= & {} 0,\\ \dot{I}_{\phi }= & {} \left( G'(r_\mathrm{po})-\frac{\hbox {d}K(\phi )}{\hbox {d}\phi }\right) I_{\phi }. \end{aligned}$$

Since the IRC is T-periodic, \(I_{\phi _0}=0\). Thus, we get the IRC in polar and Cartesian coordinates:

$$\begin{aligned} \mathbf{I}_{r,\phi }= & {} I_{r_0}~{\hat{r}}+0~ {\hat{\phi }},\\ \mathbf{I}_{x,y}= & {} I_{r_0}\cos \phi ~{\hat{x}}+I_{r_0}\sin \phi ~{\hat{y}}. \end{aligned}$$

To find the constant \(I_{r_0}\), we use the normalization condition at point \((x_0,y_0)\)

$$\begin{aligned} \mathbf{I}_{x_0,y_0} \ . \ v=1 \quad \Rightarrow I_{r_0} = -1. \end{aligned}$$

Thus, it gives the IRC in polar and Cartesian coordinates as

$$\begin{aligned} \mathbf{I}_{r,\phi }= & {} -{\hat{r}}+0 {\hat{\phi }}, \end{aligned}$$
(69)
$$\begin{aligned} \mathbf{I}_{x,y}= & {} -\cos \phi ~{\hat{x}}-\sin \phi ~{\hat{y}}. \end{aligned}$$
(70)

We note that the Cartesian components of the IRC for a general radial isochron clock take both positive and negative values depending on the value of \(\phi \), which is related to the phase \(\theta \) through (16). Thus, as for \(\lambda -\omega \) systems, the same instantaneous, infinitesimal perturbation can either increase or decrease the isostable coordinate (moving the trajectory inward or outward from the periodic orbit in the sense of isostables), depending on when it is applied.

General radial isochron clock SNIPER example

A simple system which undergoes a SNIPER bifurcation is

$$\begin{aligned} \dot{r}= & {} \rho r -r^3 \equiv G(r), \\ {\dot{\phi }}= & {} =\eta -\sin \phi \equiv K(\phi ;\eta ), \end{aligned}$$

where r and \(\phi \) are standard polar coordinates and \(\rho >0\). This is an example of a general radial isochron clock and was considered using different methods in Example 5.2 in [37]. As the bifurcation parameter \(\eta \) varies, two fixed points annihilate at \(\eta =1, \ \phi =\pi /2\), and \(r=\sqrt{\rho }\), giving rise to a periodic orbit for \(\eta >1\). The periodic orbit is stable with radius \(r_\mathrm{po}=\sqrt{\rho }\) and time period \(T=2\pi /\sqrt{\eta ^2-1}\). The phase variable \(\theta =f(\phi ;\eta )\) is found from (19) as

$$\begin{aligned} \theta =2\arctan \left( \frac{\eta \tan \left( \frac{\phi }{2}\right) -1}{\sqrt{\eta ^2-1}}\right) +\pi . \end{aligned}$$
(71)

Thus, as \(\phi \) varies from \(-\,\pi \) to \(\pi \), \(\theta \) advances linearly in time from 0 to \(2\pi \). The bifurcation occurs at \(\phi =\pi /2\), which corresponds to \(\theta =\pi \). The periodic trajectory spends most of its time near \(\phi =\pi /2\) near the bifurcation, as shown in the left panel of Fig. 16. Thus, we expect the PRC to be large near \(\phi =\pi /2\) (i.e., \(\theta =\pi \)), and small elsewhere. From (20), we get the PRC as

$$\begin{aligned} \left( \frac{\partial \theta }{\partial r}, \frac{\partial \theta }{\partial \phi }\right) =\left( 0, \frac{\sqrt{\eta ^2-1}}{\eta -\sin \phi }\right) , \end{aligned}$$
(72)

which in terms of \(\theta \) is

$$\begin{aligned} \left( \frac{\partial \theta }{\partial r}, \frac{\partial \theta }{\partial \phi }\right) =\left( 0,\frac{\eta ^2-\cos \theta -\sqrt{\eta ^2-1}\sin \theta }{\eta \sqrt{\eta ^2-1}}\right) . \end{aligned}$$
(73)

It is clear from (72) that the PRC is always positive, and it blows up to infinity at \(\phi =\pi /2\) (i.e., \(\theta =\pi )\) at the bifurcation. This is evident from Fig. 16. Note: For \(\eta \gtrsim 1\), the expression in (73) reduces to \(\frac{\partial \theta }{\partial \phi }=\frac{1-\cos \theta }{\omega }\), which is consistent with the SNIPER example given in Sect. 2, cf. [2, 19].

Fig. 16
figure 16

\(\phi \) evolution and PRC for the general radial isochron clock SNIPER bifurcation model: The left panel plots the evolution of azimuthal angle \(\phi \) as a function of the phase \(\theta \) of the periodic orbit, which advances linearly in time. The middle (resp., the right) panel plots the PRC \(Z_\phi \) versus \(\theta \) (resp., \(\phi \)). The blue, red, green, and black lines correspond to \(\eta =20, \ 1.5, \ 1.05\), and 1.0005 respectively (color figure online)

Transforming to Cartesian coordinates \((x,y)=(r \cos \phi , r \sin \phi )\), we can write the PRC as

$$\begin{aligned} \mathbf{Z}(\theta )= & {} \frac{\cos \theta +\sqrt{\eta ^2-1}\sin \theta -1}{\sqrt{\rho }\sqrt{\eta ^2-1}}{\hat{x}}\\&+\frac{\sin \theta -\sqrt{\eta ^2-1}\cos \theta }{\sqrt{\rho }\eta }{\hat{y}}. \end{aligned}$$

From (6970), we get the IRC in polar and Cartesian coordinates:

$$\begin{aligned} \mathbf{I}_{r,\phi }= & {} -{\hat{r}}+0 {\hat{\phi }},\\ \mathbf{I}_{x,y}= & {} -\cos \phi ~{\hat{x}}-\sin \phi ~{\hat{y}}. \end{aligned}$$
Fig. 17
figure 17

IRC for the general radial isochron clock SNIPER bifurcation model: The left (resp., the right) column plots the IRC \(I_x\) (resp., \(I_y\)) versus \(\theta \). In both plots, the blue, red, green, and black lines correspond to \(\eta =20, \ 1.5, \ 1.05\), and 1.00001 respectively (color figure online)

At first glance, it seems that the IRC is sinusoidal. It is, but only far away from the bifurcation point. As we approach the bifurcation, \(\phi \) no longer varies linearly with phase (see the left panel of Fig. 16). The “sinusoidal” IRC gets expanded near the bifurcation point and squeezed away from the bifurcation point. This is seen in Fig. 17, which plots the IRC as the bifurcation parameter \(\eta \) varies. We see that near the bifurcation point, the IRC stays close to zero in the x direction and close to \(-\,1\) in the y direction. This observation agrees with the intuitive definition of IRC. Near the bifurcation point, the periodic trajectory points in the x direction, so the IRC, which is the gradient of \(\psi \) coordinate, is zero along that direction. On the other hand, the y coordinate is antiparallel to the isochron, along which the gradient of \(\psi \) is unity. We can write IRC as a function of phase as

$$\begin{aligned} \mathbf{I}_{x,y}= & {} \frac{\sqrt{\eta ^2-1}\sin \theta -(\eta ^2-1)\cos \theta }{\sqrt{\eta ^2-1}\sin \theta +\cos \theta -\eta ^2}{\hat{x}}\\&+ \frac{\eta \left( 1-\sqrt{\eta ^2-1}\sin \theta -\cos \theta \right) }{\sqrt{\eta ^2-1}\sin \theta +\cos \theta -\eta ^2}{\hat{y}}. \end{aligned}$$

We now consider a neural model for parameters near a SNIPER bifurcation and compare the PRC and IRC with the results from the preceding SNIPER example.

Example: Morris–Lecar model, cf. [37]

The Morris–Lecar model [72], a two-dimensional neuron model, is given as

$$\begin{aligned} C_M\dot{v}= & {} I_\mathrm{b}-g_L(v-E_L)-g_Kn(v-E_K)\\&-g_\mathrm{Ca}m_\infty (v)(v-E_\mathrm{Ca}),\\ \dot{n}= & {} \phi (n_\infty (v)-n)/\tau _n(v). \end{aligned}$$

In these equations, \(I_\mathrm{b}\) is the baseline current, v is the transmembrane voltage, and n is the gating variable. For details of the functions \(m_\infty (v), \ n_\infty (v), \ \tau _n(v)\) and the rest of the parameters, see Appendix A. For \(I_\mathrm{b}=39.9957\) mA, the system has a stable periodic orbit near a SNIPER bifurcation with time period \(T=1002.88\) ms, nontrivial Floquet multiplier \(\lambda =3.632 \times 10^{-45}\), with corresponding nontrivial Floquet exponent \(k=-\,0.1020\). The time series for one period is shown in Fig. 18. Figure 19 plots the PRC and IRC for the Morris–Lecar oscillator. The PRC is sinusoidal and does not change sign, just like the simple model (see Fig. 16 for comparison). The IRC looks like a sinusoid skewed to one side, similar to the IRC calculated for the simple model (see Fig. 17 for comparison).

Fig. 18
figure 18

Morris–Lecar model: Time series for the periodic orbit near the SNIPER bifurcation. Here \(I_\mathrm{b}=39.9957\) mA

Fig. 19
figure 19

Morris–Lecar model: Top (resp., bottom) row plots the PRC (resp., IRC) near the SNIPER bifurcation. Here \(I_\mathrm{b}=39.9957\) mA

Fig. 20
figure 20

Thalamic neuron model: Top row shows the uncontrolled periodic orbit, PRC, and IRC for the thalamic neuron model with parameters given in the main text. The middle (resp., bottom) row shows the trajectory, time series, and control input for control based on the augmented (resp., standard) phase reduction. Control is on (resp., off) for the portion shown by the thick black (resp., thin blue) line. The trajectory starts at the small red circle. The red horizontal line shows the amplitude of the uncontrolled periodic orbit (color figure online)

4.2 Energy-optimal phase control revisited [71]

As mentioned previously, when the control objective is more demanding, control based on standard phase reduction can fail because the controlled trajectory leaves the vicinity of the unperturbed periodic orbit where the reduction is valid. This can occur, for example, when trying to control cardiac pacemaker cells or circadian oscillators [71]. This motivates a control formulation based on the augmented phase reduction (6364). This control algorithm minimizes not only the control energy, but also minimizes the oscillator’s transversal distance to the uncontrolled periodic trajectory. We take the following cost function: [71]

$$\begin{aligned}&C[u(t)] = \nonumber \\&\quad \int _0^{T_1} \underbrace{\left[ \alpha u^2 +\beta \psi ^2 +\lambda _1\left( {\dot{\theta }}-\omega -Z(\theta )u(t)\right) +\lambda _2\left( {\dot{\psi }}-k\psi -I(\theta )u(t)\right) \right] }_{\mathcal {L}}\hbox {d}t. \nonumber \\ \end{aligned}$$
(74)

The first term in the cost function ensures that the control law uses a minimum energy input, and the second term minimizes the transversal distance (in the direction of the slow isostable coordinate \(\psi \)) from the uncontrolled periodic trajectory. The last two terms ensure that the system obeys the augmented phase reduction, with \(\lambda _1\) and \(\lambda _2\) being the Lagrange multipliers. The Euler–Lagrange equations are obtained from

$$\begin{aligned} \frac{\partial \mathcal {L}}{\partial q}=\frac{\hbox {d}}{\hbox {d} t}\left( \frac{\partial \mathcal {L}}{\partial \dot{q}}\right) , \quad q=\lambda _1, \lambda _2,\theta , \psi , u, \end{aligned}$$

which gives

$$\begin{aligned} {\dot{\theta }}= & {} \omega +Z(\theta )u(t), \end{aligned}$$
(75)
$$\begin{aligned} {\dot{\psi }}= & {} k\psi +I(\theta )u(t),\end{aligned}$$
(76)
$$\begin{aligned} {\dot{\lambda }}_1= & {} -u\left( \lambda _1 Z'(\theta )+\lambda _2 I'(\theta )\right) ,\end{aligned}$$
(77)
$$\begin{aligned} {\dot{\lambda }}_2= & {} 2\beta \psi -k\lambda _2, \end{aligned}$$
(78)

where

$$\begin{aligned} u(t)=\frac{\lambda _1 Z(\theta )+\lambda _2 I(\theta )}{2\alpha }. \end{aligned}$$
(79)

These equations are solved as a four-dimensional two-point boundary value problem (see Appendix C) with the boundary conditions

$$\begin{aligned} \theta (0)=0,\quad \theta (T_1)=2\pi ,\quad \psi (0)=0,\quad \psi (T_1)=0. \end{aligned}$$

The last boundary condition ensures that trajectory ends back on the periodic orbit. The corresponding optimal control problem with standard phase reduction, as described in Sect. 2, can be obtained by setting \(\beta =0\) and \(\lambda _2=0\) in the cost function.

Energy-optimal phase control example using augmented phase reduction: thalamic neuron model

To demonstrate the control, we again consider the thalamic neuron model given by Eqs. (1214) with the same parameters as before and \(I_\mathrm{b}=5\upmu \hbox {A/cm}^2\). This gives a stable periodic orbit with time period \(T=8.3955\) ms and nontrivial Floquet multipliers 0.8275 and 0.0453. Since one of the nontrivial Floquet multipliers is close to 0, we only consider the isostable coordinate corresponding to the larger nontrivial Floquet multiplier in the augmented phase reduction. We set a more “aggressive” control objective \(T_1=0.5T\) and calculate the energy-optimal control based on both the augmented and standard phase reduction. The results are shown in Fig. 20. The numerical steps taken to generate these results are similar to the ones given by the flowchart in Fig. 3. To compare the control laws, we compute the control energy as \(\int _0^{T_1}u(t)^2 \hbox {d}t\) and the control error as the normalized Euclidean distance between the final position \(\mathbf {x}(T_1)\) and the initial position \(\mathbf {x}(0)\).

As seen in middle and bottom panels of the left column of this figure, the control based on the augmented phase reduction does better at keeping the trajectory close to the periodic orbit. On the other hand, with control based on the standard phase reduction, the trajectory moves far away from the periodic orbit. Since one of the Floquet multipliers is close to zero, the voltage state returns back quickly, but the other states still remain far away from the limit cycle. This is evident from the first two panels of the bottom row of Fig. 20. We also see that for the augmented phase reduction-based control, the control input is large when the IRC is near zero and is small when the IRC is large. This diminishes the effect of the control input on the isostable coordinate, and thus, the oscillator’s transversal distance from the periodic orbit remains small. This ensures that the augmented phase reduction represents the dynamics accurately, making the control more effective. The better performance of the augmented phase reduction- based control is also reflected in the control error, which is 0.023 and 0.045 for the augmented and standard phase reduction-based optimal control, respectively. The augmented phase reduction-based control does better at the expense of consuming more energy (434.82 units) compared to (329.25 units) in the standard phase reduction- based control.

Reference [71] gives other examples which illustrate how the use of the augmented phase reduction for energy-optimal phase control can give better results than the use of standard phase reduction, including cases where the standard phase reduction completely fails. It also considers the robustness of this algorithm to noise.

4.3 Second-order phase reduction [105]

Standard phase reduction (5) is valid for infinitesimal perturbations to a periodic orbit. In practice, however, provided the perturbations are small enough so that the system’s state does not travel too far from the unperturbed periodic orbit, (5) can be used in control problems where the applied control is certainly not infinitesimal (e.g., for phase- and time-optimal control problems from Sect. 2). In situations where the applied control must be larger, Eq. (62) can be used with the explicit goal of limiting the magnitude of the isostable coordinates so that the phase-reduced dynamics remain valid, as was done in Sect. 4.2. In this instance, the augmented phase-reduced equations (6162) provide a reasonably simplified framework from which further analysis can be performed.

Note, however, that to a leading order approximation, the phase and isostable dynamics from (6162) are uncoupled so that the phase dynamics of (61) are no different than those of (5). In many cases, it can be useful to employ a second- order approximation to the phase and isostable dynamics to better understand how the phase-reduced dynamics change as the system is perturbed from its stable periodic orbit. Previous authors have investigated the computation of second and higher-order approximations of isochrons near the periodic orbit [93, 94], which is useful for understanding the perturbed behavior of initial conditions from the periodic orbit itself. However, such strategies are difficult to apply to systems which have already been perturbed from the periodic orbit without explicit knowledge of the state with respect to the periodic orbit. As we show below, isostable coordinates can be used to bridge this gap resulting in a closed set of equations for a second-order accurate phase-amplitude reduction. This reduction framework was originally presented in [105] and is summarized below.

To begin, to leading order, the gradient of the phase and isostable coordinates near the stable periodic orbit can be written as

$$\begin{aligned} \left. \frac{\partial \theta }{\partial \mathbf{x}} \right| _{{\mathbf{x}^\gamma }(\theta ) + \varDelta \mathbf{x}}&= \left. \frac{\partial \theta }{\partial \mathbf{x}} \right| _{{\mathbf{x}^\gamma }(\theta )} + \left. \frac{\partial ^2 \theta }{\partial \mathbf{x}^2} \right| _{{\mathbf{x}^\gamma }(\theta )} \varDelta \mathbf{x} {\; + \; \mathcal {O}(|\varDelta \mathbf{x}|^2)} \nonumber \\&=\mathbf{Z}(\theta ) + H_{\theta ,\mathbf{x}^\gamma (\theta )} \varDelta \mathbf{x} + \mathcal {O}(|\varDelta \mathbf{x}|^2), \end{aligned}$$
(80)
$$\begin{aligned} \left. \frac{\partial \psi _i}{\partial \mathbf{x}} \right| _{{\mathbf{x}^\gamma }(\theta ) + \varDelta \mathbf{x}}&= \left. \frac{\partial \psi _i}{\partial \mathbf{x}} \right| _{{\mathbf{x}^\gamma }(\theta )} + \left. \frac{\partial ^2 \psi _i}{\partial \mathbf{x}^2} \right| _{{\mathbf{x}^\gamma }(\theta )} \varDelta \mathbf{x} {\; + \; \mathcal {O}(|\varDelta \mathbf{x}|^2)} \nonumber \\&= \mathbf{I}_i(\theta ) + H_{\psi _i,\mathbf{x}^\gamma (\theta )} \varDelta \mathbf{x} + \mathcal {O}(|\varDelta \mathbf{x}|^2), \nonumber \\&\qquad i = 1,\dots ,n-1, \end{aligned}$$
(81)

where \(H_{\theta ,\mathbf{x}^\gamma (\theta )}\) and \(H_{\psi _i,\mathbf{x}^\gamma (\theta )}\) are the Hessian matrices of second derivatives of \(\theta \) and \(\psi _i\) evaluated at \(\mathbf{x}^\gamma (\theta )\). Near the periodic orbit, Floquet theory [32, 35] allows us to write

$$\begin{aligned} \varDelta \mathbf{x}(t) = \sum _{j = 1}^n c_j \exp (k_j t) \mathbf{q}_j(t), \end{aligned}$$

where \(k_j\) are the Floquet exponents associated with the linearization of differential equation (1) by \(\varDelta \dot{\mathbf{x}} = D\mathbf{F}(\mathbf{x}^\gamma (t)) \varDelta \mathbf{x}\), \(\mathbf{q}_j\) are T-periodic vectors, and \(c_j\) are chosen to satisfy initial conditions. Using the definition of isostables (58), one can show that \(c_j = \psi _j\) so that the following relation can be derived as in [105]:

$$\begin{aligned} \varDelta \mathbf{x}(\theta ,\psi _1, \dots , \psi _{n-1}) = \sum _{j = 1}^{n-1} \psi _j \mathbf{p}_j(\theta ), \end{aligned}$$
(82)

where \(\mathbf{p}_j(\theta (0) + \omega t) = \mathbf{q}_j(t)\). Recalling the fact that \(\hbox {d}\theta /\hbox {d}t = \partial \theta /\partial \mathbf{x} \cdot \hbox {d}{} \mathbf{x}/\hbox {d}t\), one can combine (82), (80) and perturbed system dynamics (4) to obtain a second- order correction to the phase reduction. Likewise, the relation \(\hbox {d}\psi _i/\hbox {d}t = \partial \psi _i/\partial \mathbf{x} \cdot \hbox {d}{} \mathbf{x}/\hbox {d}t\), along with Eqs. (82), (81) and (4), provides a second-order correction to the isostable dynamics. The augmented reduction to this order is given as

$$\begin{aligned} \dot{\theta }&= \omega + \mathbf{Z}(\theta ) \cdot \mathbf{U}(t) + \sum _{j = 1}^{n-1} \left[ \mathbf{B}^j(\theta ) \psi _j \right] \cdot \mathbf{U}(t), \end{aligned}$$
(83)
$$\begin{aligned} \dot{\psi _i}&= k_i \psi _i + \mathbf{I}_i(\theta ) \cdot \mathbf{U}(t) + \sum _{j = 1}^{n-1} \left[ \mathbf{C}^j_i(\theta ) \psi _j \right] \cdot \mathbf{U}(t) , \end{aligned}$$
(84)

for \(i = 1,\dots ,n-1\), where \(\mathbf{B}^j(\theta ) \equiv H_{\theta ,\mathbf{x}^\gamma (\theta )} \mathbf{p}_j(\theta )\) and \(\mathbf{C}_i^j(\theta ) \equiv H_{\psi _i,\mathbf{x}^\gamma (\theta )} \mathbf{p}_j(\theta )\). Equation (83) is a second-order correction to the standard phase reduction (5). Unlike the augmented reduction (6162), the phase dynamics depend on the isostable coordinates.

Ultimately, to find a second-order accurate augmented phase reduction, one must have knowledge of \(H_{\theta ,\mathbf{x}^\gamma (\theta )}\) and \(H_{\psi _i,\mathbf{x}^\gamma (\theta )}\). These can be obtained by noting that for an initial condition on the periodic orbit, perturbation results in the following changes to the phase coordinate:

$$\begin{aligned} \varDelta \theta = \nabla _{\mathbf{x}^\gamma } \theta \varDelta \mathbf{x} + \frac{1}{2} \varDelta \mathbf{x}^\mathrm{T} H_{\theta ,\mathbf{x}^\gamma } \varDelta \mathbf{x} + \mathcal {O}(|{\varDelta \mathbf{x}|^3}). \end{aligned}$$
(85)

If we consider a infinitesimal perturbation \(\varDelta \mathbf{x}\), to the trajectory \(\mathbf{x}^\gamma (t)\) at time \(t = 0\), letting \(\mathbf{x}(t)\) be the trajectory resulting from this initial condition and defining \(\varDelta \mathbf{x}(t) = \mathbf{x}^\gamma (t) + \varDelta \mathbf{x}(t)\), then to a second-order approximation,

$$\begin{aligned} \frac{\varDelta \mathbf{x}(t)}{\hbox {d}t}= & {} D\mathbf{F}(\mathbf{x}^\gamma (t)) \varDelta \mathbf{x}(t) + \frac{1}{2} \begin{bmatrix} \varDelta \mathbf{x}^\mathrm{T}(t) H_{1,\mathbf{x}^\gamma (t)} \\ \varDelta \mathbf{x}^\mathrm{T}(t) H_{2,\mathbf{x}^\gamma (t)} \\ \vdots \\ \varDelta \mathbf{x}^\mathrm{T}(t) H_{n,\mathbf{x}^\gamma (t)}\end{bmatrix} \varDelta \mathbf{x}(t)\nonumber \\&+ \mathcal {O}(|\varDelta \mathbf{\mathbf{x}}|^3), \end{aligned}$$
(86)

where \(H_{i,\mathbf{x}^\gamma (t)}\) is the Hessian matrix of second partial derivatives of the \(i{\mathrm{th}}\) component of \(\mathbf{F}\). Similar to the process of obtaining (10) from both (8) and (7), one can take the time derivative of (85) (noting that \(d \varDelta \theta /dt = 0)\), substitute (86) into the result, and collect all \(\mathcal {O}(|\varDelta \mathbf{x}|^2)\) terms of the result to yield (cf. [105])

$$\begin{aligned} \frac{\hbox {d} H_{\theta ,\mathbf{x}^\gamma (t)}}{\hbox {d}t}&= -\sum _{k = 1}^n\left[ Z_k(\mathbf{x}^\gamma (t)) H_{k,\mathbf{x}^\gamma (t)} \right] \nonumber \\&\qquad - D\mathbf{F}^\mathrm{T}(\mathbf{x}^\gamma (t)) H_{\theta ,\mathbf{x}^\gamma (t)} - H_{\theta ,\mathbf{x}^\gamma (t)} D\mathbf{F}(\mathbf{x}^\gamma (t)), \end{aligned}$$
(87)

where \(Z_k(x(t)) \equiv \left. \partial \theta /\partial x_i \right| _{x(t)}\). The solution to (87) must be T-periodic with the additional normalization condition

$$\begin{aligned} -D\mathbf{F}^\mathrm{T}(\mathbf{x}^\gamma (t)) \nabla _{\mathbf{x}^\gamma (t)}\theta = H_{\theta ,\mathbf{x}^\gamma (t)} \mathbf{F}(\mathbf{x}^\gamma (t)), \end{aligned}$$
(88)

in other words, for an initial perturbation along the periodic orbit the change in the PRC predicted according to adjoint equation (10) [i.e., the left-hand side of Eq. (88)] must be identical to the change predicted by using \(H_{\theta ,\mathbf{x}^\gamma (t)}\) [i.e., the right-hand side of Eq. (88)].

Fig. 21
figure 21

A Different level sets of \(\psi _1\) for the thalamic neural model (1214). B The component of \(\mathbf{B}^1(\theta )\) associated with voltage perturbations. In C, the gradient of the phase coordinate is calculated using the direct method (dots) and estimated according to the reduced equation (solid lines) for locations corresponding to different values of \(\theta \) and \(\psi _1\)

As shown in [105], one can use similar arguments to those presented above to show \(H_{\psi _i,\mathbf{x}^\gamma (\theta )}\) can be obtained by finding the periodic solution of

$$\begin{aligned}&\frac{\hbox {d} H_{\psi _i,\mathbf{x}^\gamma (t)}}{\hbox {d}t} = k_i H_{\psi _i,\mathbf{x}^\gamma (t)} -\sum _{k = 1}^n\left[ I_{i,k}(\mathbf{x}^\gamma (t)) H_{k,\mathbf{x}^\gamma (t)} \right] \nonumber \\&\quad - D\mathbf{F}^\mathrm{T}(\mathbf{x}^\gamma (t)) H_{\psi _i,\mathbf{x}^\gamma (t)} - H_{\psi _i,\mathbf{x}^\gamma (t)} D\mathbf{F}(\mathbf{x}^\gamma (t)), \end{aligned}$$
(89)

subject to the normalizing condition

$$\begin{aligned} \left( k_i Id -D\mathbf{F}^\mathrm{T}(\mathbf{x}^\gamma (t)) \right) \nabla _{\mathbf{x}^\gamma (t)}\psi _i = H_{\psi _i,\mathbf{x}^\gamma (t)} \mathbf{F}(\mathbf{x}^\gamma (t)), \end{aligned}$$
(90)

where \(I_{i,k}(\mathbf{x}^\gamma (t)) \equiv \left. \partial \psi _i/\partial x_k \right| _{\mathbf{x}^\gamma (t)}\). Notice that (87) requires knowledge of the PRC and that (89) requires knowledge of the IRC, both of which must be found, for instance, using (10) and (60), respectively.

As discussed in [105], the computational effort required to find the matrices \(H_{\theta ,\mathbf{x}^\gamma (t)}\) and \(H_{\psi _i,\mathbf{x}^\gamma (t)}\) using (87) and (89) grows with the square of the dimension of system (1). As such, this computation becomes a limiting factor in the reduction, especially in higher-dimensional systems. Preliminary results, however, suggest that it is possible to directly compute the terms \(\mathbf{B}^j(\theta )\) and \(\mathbf{C}_i^j\) as part of (83) and (84) using an alternative strategy with computational effort that scales with the dimension of the system. Such a method would be preferable especially when some of the isostable coordinates have small- magnitude Floquet multipliers and are neglected. Such investigations will be the subject of future work by the authors.

Example: second-order phase reduction for thalamic neuron model

Figure 21 gives an example of the second-order reduction methodology detailed above applied to the thalamic neural model considered earlier in Sect. 2 with parameters given in Appendix A. Nonunity Floquet multipliers associated with this periodic orbit are numerically determined to be \(\lambda _1 =0.8275\) and \(\lambda _2 = 0.0453\). Because \(\lambda _2\) is close to zero, we will only consider the decay of solutions associated with the more slowly decaying direction in this example. The solid line in panel A shows the periodic orbit, and curves of the form \(\mathbf{x}(\theta ,\psi _1) = \mathbf{x}^\gamma (\theta ) +\psi _1 \mathbf{p}_1(\theta )\) for \(\psi _1 = \pm \, 0.05\) are shown as dashed lines. The function \(\mathbf{B}^1(\theta )\) is numerically determined according to (83) by first calculating \(H_{\theta ,\mathbf{x}^\gamma (\theta )}\) using to (87). \(B_V^1(\theta )\), i.e., the component of \(\mathbf{B}^1(\theta )\) associated with voltage perturbations is shown in panel B. Panel C shows the gradient of the phase coordinate at locations \(\mathbf{x}(\theta ,\psi _1) = \mathbf{x}^\gamma (\theta ) +\psi _1 \mathbf{p}_1(\theta )\). Numerical calculations using direct method (6) are shown with dots, and the predicted values are shown according to the relation \(\frac{\partial \theta }{\partial V} = Z_V(\theta ) + \psi _1 B^1_V(\theta )\) where \(Z_V(\theta )\) is the components of \(\mathbf{Z}(\theta )\) associated with voltage perturbations. Practically, the neuron in this example might be perturbed from its limit cycle solution to a nonzero isostable coordinate; the reduction strategy suggested here gives a sense of how the effective phase response curve will change due to those perturbations. The ability to predict how a periodic dynamical system “adapts” to past inputs is important in many biological applications (cf., [11, 52, 99]). Additional control applications where this reduction strategy is useful are also shown in [105]. In general, it is expected that using the second-order reduction with optimal control algorithms will give improved accuracy over the standard or augmented phase reduction, particularly when the control input causes the trajectory to move away from the immediate neighborhood of the unperturbed periodic orbit.

5 Global isochrons and isostables

The phase dynamics associated with weak control inputs can typically be understood in terms of the phase reduction formulations presented so far. However, for stronger control inputs it might be necessary to consider the full global properties of the isochrons and isostables. The reduction in terms of global isochron and isostable coordinates is

$$\begin{aligned} {\dot{\theta }}= & {} \omega +\mathbf{Z}(\psi ,\theta ) \cdot \mathbf{U}(t), \end{aligned}$$
(91)
$$\begin{aligned} {\dot{\psi }}= & {} k\psi +\mathbf{I}(\psi , \theta )\cdot \mathbf{U}(t) , \end{aligned}$$
(92)

which is identical to (6364), except that we now have a global PRC and a global IRC instead of evaluating these on the periodic orbit. This reduction is exact in the full basin of attraction of the periodic orbit.

With this in mind, here we describe several methods which have been proposed to calculate isochrons and isostables throughout the basin of attraction of a periodic orbit.

(Brute force) forward integration method: [45]

Here one chooses an initial condition \({\mathbf {x}}_0 \in {\mathbf {x}}^\gamma \) and integrates forward for some large time \(\tau \). One then takes an intial condition \({\mathbf {x}}_\mathrm{test}\) in the basin of attraction of \({\mathbf {x}}^\gamma \) and integrates forward for the same time \(\tau \). Let \(\varPhi _t({\mathbf {x}})\) denote the flow of the dynamical system, i.e., the trajectory starting at \({\mathbf {x}}\). If

$$\begin{aligned} \left| \varPhi _\tau ({\mathbf {x}}_0) - \varPhi _\tau ({\mathbf {x}}_\mathrm{test}) \right| < \epsilon , \end{aligned}$$

for some appropriately small tolerance \(\epsilon \), then \(\mathbf{x}_\mathrm{test}\) approximately lies on the isochron defined by \({\mathbf {x}}_0\). If not, one considers a different \({\mathbf {x}}_\mathrm{test}\) which is expected to give a smaller \(\left| \varPhi _\tau ({\mathbf {x}}_0) - \varPhi _\tau ({\mathbf {x}}_\mathrm{test}) \right| \) after time \(\tau \), for example based on a bisection algorithm. This is repeated for enough points \(\mathbf{x}_0\) and \(\mathbf{x}_\mathrm{test}\) in order to find the isochrons of interest. While this method can in principle be used for systems of any dimensionality, in practice one expects that it will be computationally very costly.

Backward integration method: [4]

Here one chooses an initial condition \({\mathbf {x}}_0 \in {\mathbf {x}}^\gamma \) and an initial condition \({\mathbf {x}}_\mathrm{test}\) near \({\mathbf {x}}_0\) on the local approximation to isochron as determined by the PRC. (Note that since the PRC is the gradient of the phase \(\theta \), it is perpendicular to the isochrons, which are level sets of \(\theta \).) The points \(\varPhi _{-\tau }({\mathbf {x}}_0)\) and \(\varPhi _{-\tau }({\mathbf {x}}_\mathrm{test})\), which can be obtained numerically through backward integration, approximately lie on same isochron. By choosing enough initial points, all isochrons of interest can be approximated numerically. In principle, this method can be used for systems of any dimensionality, but it typically has only been used for planar systems.

Boundary value problem formulation: [80]

It is possible to formulate the calculation of isochrons as a boundary value problem as follows. Truncating (7), we obtain the linearization about the periodic orbit \({\mathbf {x}}^\gamma \)

$$\begin{aligned} \frac{\hbox {d} \varDelta {\mathbf{x}}(t)}{\hbox {d}t} = D {\mathbf {F}}(\mathbf {x}^\gamma (t)) \varDelta {{\mathbf {x}}}(t). \end{aligned}$$

Now, notice that if \(\varDelta {\mathbf {x}}(0)\) is tangent to an isochron, then

$$\begin{aligned} \varDelta {\mathbf {x}}(T) = \mu \varDelta {\mathbf {x}}(0) \end{aligned}$$

where \(\mu \) is the Floquet multiplier for the periodic orbit. Thus, locally an isochron is given by the stable eigenvector of the linearization about the periodic orbit. This defines a boundary value problem, and one can trace out isochrons by using different (small-magnitude) vectors in the direction \(\varDelta {\mathbf {x}}(0)\).

We note that for fast–slow dynamical systems, which are common for biological oscillators, \(|\mu |\) can be quite small, in which case it can be numerically advantageous to let

$$\begin{aligned} \varDelta {\mathbf {x}} (t) = \hbox {e}^{(\log \mu ) t} \mathbf{w}(t), \quad \tau = t/T. \end{aligned}$$

Then

$$\begin{aligned} \frac{\hbox {d} {\mathbf {w}}}{\hbox {d} \tau } = T (D{\mathbf {F}}({\mathbf {x}}^\gamma ) - \log \mu ) {\mathbf {w}}, \quad {\mathbf {w}}(1) = {\mathbf {w}}(0). \end{aligned}$$

In [80], this was solved using the boundary value solver from the numerical continuation package AUTO. This method works well for fast–slow systems as often arise for biological problems and can allow isochrons to be calculated in beautiful detail [55, 56, 80], but thus far it has only been used for planar systems.

Method of Fourier averages: [64]

Reference [64] makes the observation that isochrons of a periodic orbit with angular frequency \(\omega = 2 \pi /T\) are level sets of the Fourier average defined by

$$\begin{aligned} f^*_{\omega }(\mathbf{x}) = \lim _{\tau \rightarrow \infty } \frac{1}{\tau } \int _0^\tau (f \circ \phi _t)(\mathbf{x}) \hbox {e}^{-i \omega t} \hbox {d}t, \end{aligned}$$

where \(f: {\mathbb {R}}^n \rightarrow {\mathbb {R}}\) is a continuously differentiable observable function and \(\phi _t(x)\) is the flow induced by (1). This is related to the fact that Fourier averages are eigenfunctions of the Koopman semigroup of operators \(U^t\) which are defined by \(U^t f(\mathbf{x}) = f \circ \phi _t(\mathbf{x})\). The Fourier averages can be calculated numerically for specific trajectories using forward integration of a set of initial conditions, and interpolation is used to obtain the isochrons. This method can be used for systems with dimensionality two or greater; see, e.g., [66] for its application to bursting neurons. Reference [63] develops a related framework to calculate global isochrons and isostables for periodic orbits.

Invariance equation approach: [5, 37, 42]

This method is based on a parameterization \(K(\theta ,\sigma )\) of the stable manifold of a periodic orbit for a planar system which gives the simplified equations

$$\begin{aligned} \dot{\theta }= & {} 1/T, \\ \dot{\sigma }= & {} \lambda \sigma /T, \end{aligned}$$

where \(\lambda \) is the nontrivial Floquet exponent for the periodic orbit. These equations are equivalent apart from scaling to what we called the augmented phase reduction for a planar system in the absence of control input (in particular, \(\theta \) here is a rescaled version of the phase in the augmented phase reduction, and \(\sigma \) is a scaled version of the isostable coordinate \(\psi \)). This parametrization satisfies the invariance equation [3]

$$\begin{aligned} \left( \frac{1}{T} \partial _\theta + \frac{\lambda \sigma }{T} \partial _\sigma \right) K(\theta ,\sigma ) = F(K(\theta ,\sigma )), \end{aligned}$$

which is solved numerically in [37] using a series method and in [42] using a Newton method. Isochrons and isostables then can be deduced from the solution for K, as can the phase response curve and the isostable response curve generalized to be defined throughout the basin of attraction of the periodic orbit, rather than just in its neighborhood [5, 37]. Thus far, this approach has only been applied to planar systems.

Hamilton–Jacobi formulation: [17]

By definition of isochrons,

$$\begin{aligned} \frac{\hbox {d} \theta }{\hbox {d} t} = \frac{\partial \theta }{\partial \mathbf{x}} \cdot \frac{\hbox {d} \mathbf{x}}{\hbox {d}t} = \omega , \end{aligned}$$

from which we obtain the (static) Hamilton–Jacobi equation for \(\theta (\mathbf{x})\):

$$\begin{aligned} \frac{\partial \theta }{\partial \mathbf{x}} \cdot \mathbf{F}(\mathbf{x}) = \omega , \end{aligned}$$
(93)

which holds for all points \(\mathbf{x}\) in the basin of attraction of the periodic orbit. A simple boundary condition for this PDE is obtained by numerically finding the phase everywhere on the periodic orbit itself: One chooses an initial point on the periodic orbit and calculates the phase according to \(\hbox {d} \theta /\hbox {d}t = \omega \). After solving (93), any isochron can be visualized by taking an isocontour of \(\theta (\mathbf{x})\). Reference [17] demonstrates this approach by using a particular finite difference discretization of (93) and an iterative fast sweeping method which allows numerical calculation of isochrons for systems with dimensionality two or greater. Unlike the method of Fourier averages which solves for a number of specific trajectories, this is an Eulerian method which can often lead to faster computations for higher-dimensional systems.

Analytical results: global isostables and isochrons

We now derive the coordinate systems for global isostables and isochrons for two classes of planar dynamical systems which can arise for simplified models of biological systems and physiological rhythms: \(\lambda -\omega \) systems and general radial isochron clocks. Some of these results are similar, but obtained using a different method, to the results in [37].

\(\bullet \) \(\lambda -\omega \) systems

In general, the dynamics of the isostable coordinate in the polar coordinate system are given by

$$\begin{aligned} \frac{\hbox {d} \psi \left( \mathbf {x}\right) }{\hbox {d}t}=k \psi \left( \mathbf {x}\right) =\frac{\partial \psi }{\partial r}\dot{r}+\frac{\partial \psi }{\partial \phi } \dot{\phi }, \end{aligned}$$
(94)

where k is the nontrivial Floquet exponent for the periodic orbit. Because \(\lambda -\omega \) systems are radially symmetric, \(\frac{\partial \psi }{\partial \phi }= 0\), i.e., \(\psi \) is a function of r only. Using this and (22), we can then rewrite (94) as:

$$\begin{aligned} \frac{d \psi \left( r \right) }{dr} = \frac{k \psi \left( r \right) }{G(r)}, \end{aligned}$$
(95)

with the condition that \(\psi (r_\mathrm{po}) = 0\) for all \(\phi \). Note that these results are consistent with (66), which says that the IRC (i.e., the gradient of \(\psi \) evaluated on the periodic orbit) points in the radial direction.

We can carry out a similar analysis to find global isochron coordinates, cf. Example 5.3 of [37]. Unlike the case of the isostable coordinate, the isochron coordinate has a dependence on both r and \(\phi \); this results from the requirement that \(\theta \) changes with \(\phi \) on the periodic orbit. We equate the time derivative to the appropriate partial derivatives:

$$\begin{aligned} \frac{\hbox {d}\theta \left( \mathbf {x}\right) }{\hbox {d}t} = \omega = \frac{\partial \theta }{\partial r} G(r) +\frac{\partial \theta }{\partial \phi } H(r). \end{aligned}$$

Because \(\dot{\phi }\) depends only on r, it is constant along the periodic orbit; therefore, \(\dot{\phi }\left( r_\mathrm{po}\right) =\omega \) and we can without loss of generality specify that, along the periodic orbit, \(\theta = \phi \), meaning \(\frac{\partial \theta }{\partial \phi } = 1\). Furthermore, for a fixed value of \(r = r_1\), \(\theta \left( r_1,\phi \right) + 2\pi = \theta \left( r_1,\phi +2\pi \right) \) and \(\frac{\partial \theta }{\partial \phi }\) must be independent of \(\phi \) because of the system’s radial symmetry (the dynamics are completely independent of \(\phi \) so the phase dynamics should be similarly independent). Thus, we can extend the result on the periodic orbit and conclude that \(\frac{\partial \theta }{\partial \phi } = 1\) for all r and \(\phi \). As a result, we can again reduce the system to an ODE in r:

$$\begin{aligned} \frac{\hbox {d}\theta }{\hbox {d}r} = \frac{\omega -H(r)}{G(r)}, \end{aligned}$$
(96)

with the global isochron coordinate being given by:

$$\begin{aligned} \theta \left( \mathbf {x}\right) = \phi + \int \frac{\omega - H(r)}{G(r)} \hbox {d}r. \end{aligned}$$
(97)

We note that these results are consistent with (23) for the PRC (i.e., the gradient of the phase \(\theta \) evaluated on a periodic orbit) of a \(\lambda -\omega \) system.

Example: supercritical Hopf bifurcation

For the supercritical Hopf bifurcation, \(G(r) = ar + cr^3\) and \(H(r) = b+dr^2\); this is slightly more general than Example 4.1.1 from [5], which uses a different but related approach to find what we refer to as global isochrons and isostables. The ODE (95) for the global isostable coordinates is:

$$\begin{aligned} \frac{\hbox {d} \psi \left( r\right) }{\hbox {d}r} = - \frac{2 a \psi \left( r\right) }{ar+cr^3}, \end{aligned}$$
(98)

which has the general solution

$$\begin{aligned} \psi \left( r\right) = c_1\left( \frac{a}{r^2}+c\right) , \end{aligned}$$
(99)

where \(c_1\) is an arbitrary scaling coefficient that can be chosen to normalize as desired. To match the IRC given in (68), one would take

$$\begin{aligned} c_1 = -\frac{\sqrt{-a c (c^2 + d^2)}}{2}. \end{aligned}$$

Note that rearranging (99) allows us to represent r in terms of \(\psi \) instead:

$$\begin{aligned} r = \sqrt{\frac{c_1 a}{\psi -c_1 c}}. \end{aligned}$$
(100)

Now, substituting (99) into (98) and simplifying yields the IRC directly:

$$\begin{aligned} \mathbf {I}_{r,\phi }\left( r\right)= & {} -\frac{2ac_1}{r^3} \hat{r} \Rightarrow \mathbf {I}_{r,\phi }\left( \psi \right) = -2\sqrt{\frac{\left( \psi -c_1 c\right) ^3}{c_1 a}}\hat{r},\\ \mathbf {I}_{x,y}= & {} -2\sqrt{\frac{\left( \psi -c_1 c\right) ^3}{c_1 a}}\left( \cos {\phi } \hat{x}+\sin {\phi } \hat{y}\right) . \end{aligned}$$

We now carry out a similar analysis to find the global isochron coordinates. Our ODE (96) is

$$\begin{aligned} \frac{\hbox {d}\theta \left( \mathbf {x}\right) }{\hbox {d}r} = -\frac{d\left( r^2+\frac{a}{c}\right) }{ar+cr^3}, \end{aligned}$$

which is solved as:

$$\begin{aligned} \theta \left( r,\phi \right) = \phi - \frac{d}{c}\log {r} + c_2. \end{aligned}$$
(101)

To enforce \(\phi = \theta \) on the periodic orbit, we select \(c_2=\frac{d}{2c}\log \left( -\frac{a}{c} \right) \). The relation between \(\phi \) and \(\theta \) can then be flipped and written as:

$$\begin{aligned} \phi = \theta + \frac{d}{2c}\left( \log { \left( \frac{c_1 a}{\psi -c_1 c} \right) }-\log \left( -\frac{a}{c} \right) \right) . \end{aligned}$$
(102)

Lastly, by taking the gradient of (101), the global PRC is given by

$$\begin{aligned} \mathbf {Z}_{r,\phi }\left( r,\phi \right)= & {} -\frac{d}{c}\frac{1}{r}\hat{r}+\frac{1}{r}\hat{\phi },\\ \mathbf {Z}_{x,y}\left( r,\phi \right)= & {} -\frac{1}{r}\left( \frac{d}{c}\cos {\phi }+\sin {\phi }\right) \hat{x}\\&+\frac{1}{r}\left( \cos {\phi }-\frac{d}{c}\sin {\phi }\right) \hat{y}. \end{aligned}$$

Note that for \(r=r_\mathrm{po} = \sqrt{-\frac{a}{c}}\) and using the fact that \(\theta = \phi \) on the periodic orbit, this expression is equivalent to that obtained from (24). In general, the PRC can be put in terms of the coordinates \(\psi \) and \(\theta \) by substituting for r and \(\phi \) using (100) and (102), respectively.

Fig. 22
figure 22

Control to an unstable fixed point for the Hopf bifurcation normal form: The top panel shows the computed optimal input to reach \(r=0.01\) at \(T_1=12\), with the inset showing more detail. The bottom left panel shows the trajectory of the system which starts at \((x,y) = (r_\mathrm{po},0)\) until it reaches the target for r, and the bottom right panel shows the slow relaxation back to the periodic orbit after the control is turned off at \(T_1=12\)

Example: control to an unstable fixed point

A new frontier is the application of optimal control to systems for which the global isochrons and isostables are known; to our knowledge, the following is the first example of such a calculation. Typically, when we consider the phase reduction, one of the assumptions is that the trajectory remains close to the stable periodic orbit, i.e., \(\psi \approx 0\). There may be situations, however, where this is not desirable; in this case, the underlying assumptions of the non-global approach no longer hold and it is necessary to use global coordinates. For example, for the supercritical Hopf bifurcation there is an unstable fixed point interior to the stable periodic orbit; attempting to control to this point using the traditional augmented phase reduction analysis would yield an inaccurate result, but with the global coordinates we can effectively drive the system to the neighborhood of this unstable point. In terms of the stable periodic orbit’s isostable coordinates, the unstable fixed point corresponds to \(\psi \rightarrow \infty \); this can be seen from (99). Therefore, designing a control to reach the unstable point at time \(T_1\) would correspond to maximizing the value of \(\psi \) at \(T_1\).

To illustrate this, we consider the Hopf bifurcation normal form with the parameters \(a = 0.1, b = 1, c=d=-1\). Additionally, we assume we can only apply a control input in the \(\hat{x}\) direction. The components of the PRC and IRC in the \(\hat{x}\) direction are, respectively,

$$\begin{aligned} Z\left( r,\phi \right) = -\frac{1}{r}\left( \frac{d}{c}\cos {\phi }+\sin {\phi }\right) \end{aligned}$$
(103)

and

$$\begin{aligned} I\left( r,\phi \right) = -\frac{2a}{r^3}\cos {\phi }. \end{aligned}$$
(104)

Note that for convenience, for (104) we have taken \(c_1=1\).

We now design a minimum energy control that brings the system close to the fixed point. Our cost function is given by (28), where u(t) is the control input and \(T_1\) is now the time at which we want the trajectory to be within a specified Euclidean distance from the unstable fixed point. We apply calculus of variations to minimize

$$\begin{aligned} C[u(t)]= & {} \int _0^{T_1} [u(t)]^2 + \lambda _1 \left( \dot{\theta }-\omega -Z(\psi ,\theta )u(t)\right) \end{aligned}$$
(105)
$$\begin{aligned}&+ \lambda _2\left( \dot{\psi }-k \psi -I\left( \psi ,\theta \right) u\left( t\right) \right) \hbox {d}t. \end{aligned}$$
(106)

The associated Euler–Lagrange equations are:

$$\begin{aligned}&2u\left( t\right) -\lambda _1 Z \left( \psi ,\theta \right) -\lambda _2 I\left( \psi ,\theta \right) = 0 \nonumber \\&\Rightarrow u\left( t\right) = \frac{\lambda _1 Z\left( \psi ,\theta \right) +\lambda _2 I\left( \psi ,\theta \right) }{2}, \end{aligned}$$
(107)
$$\begin{aligned}&\frac{\hbox {d}\lambda _1}{\hbox {d}t} = -\lambda _1\frac{\partial Z}{\partial \theta } u\left( t\right) -\lambda _2\frac{\partial I}{\partial \theta }u\left( t\right) , \end{aligned}$$
(108)
$$\begin{aligned}&\frac{\hbox {d}\lambda _2}{\hbox {d}t} = -\lambda _1\frac{\partial Z}{\partial \psi }u\left( t\right) -\lambda _2\frac{\partial I}{\partial \psi }u\left( t\right) -\lambda _2 k. \end{aligned}$$
(109)

Because it is more convenient in general to represent the PRC and IRC in terms of the original polar coordinates, we calculate the partial derivatives with respect to \(\theta \) and \(\psi \) by utilizing the chain rule:

$$\begin{aligned} \frac{\partial Z}{\partial \psi }= & {} \frac{\partial Z}{\partial r}\frac{\partial r}{\partial \psi }+\frac{\partial Z}{\partial \phi }\frac{\partial \phi }{\partial \psi }, \nonumber \\ \frac{\partial I}{\partial \psi }= & {} \frac{\partial I}{\partial r}\frac{\partial r}{\partial \psi }+\frac{\partial I}{\partial \phi }\frac{\partial \phi }{\partial \psi }, \end{aligned}$$
(110)
$$\begin{aligned} \frac{\partial Z}{\partial \theta }= & {} \frac{\partial Z}{\partial \phi }\frac{\partial \phi }{\partial \theta },\quad \frac{\partial I}{\partial \theta } = \frac{\partial I}{\partial \phi }\frac{\partial \phi }{\partial \theta }. \end{aligned}$$
(111)

The partial derivatives of r and \(\phi \) are computed from (100) and (102). A shooting method on the reduced model was employed to obtain the values of \(\lambda _1\) and \(\lambda _2\) required to give the value of \(\psi \) corresponding to \(r=0.01\) at time \(T_1\); Fig. 22 shows the results of a realization for \(T_1 = 12\). Then, the original Hopf bifurcation normal form model was simulated using the input corresponding to these initial values for \(\lambda _1\) and \(\lambda _2\) for the reduced model. At the target time \(T_1\), the control was turned off (\(u=0\)) and the system was allowed to relax back to the periodic orbit. As can be seen, this control strategy effectively forces the system into the vicinity of the unstable fixed point.

We note that this method is computationally simpler than using a Hamilton–Jacobi–Bellman approach to achieve a similar goal of steering a trajectory to an unstable fixed point [13, 73]; however, it requires knowledge of the global PRC and IRC, which might not always be possible.

\(\bullet \) General radial isochron clock

Applying (94) to the general radial isochron clock system (15) gives

$$\begin{aligned} k \psi \left( r \right) =\frac{\partial \psi }{\partial r}G(r)+\frac{\partial \psi }{\partial \phi }K(\phi ). \end{aligned}$$
(112)

If we make the ansatz that the global isostable coordinate only depends on r, that is that \(\frac{\partial \psi }{\partial \phi } = 0\), then

$$\begin{aligned} \frac{\hbox {d} \psi }{\hbox {d} r} = \frac{k \psi (r)}{G(r)}. \end{aligned}$$
(113)

If we can solve this under the condition that \(\psi (r_\mathrm{po}) = 0\), then the ansatz is confirmed.

The isochrons are radial for systems described by (15), and we can use (16) to determine how the phase variable \(\theta \) depends on \(\phi \).

General radial isochron clock SNIPER example

We now consider the planar general radial isochron clock SNIPER bifurcation example considered previously, cf. [37], with \(G(r) = \rho r-r^3\) and \(K(\phi ;\eta ) = \eta -\sin (\phi )\); here \(r_\mathrm{po} = \sqrt{\rho }\) and \(k = G'(r_\mathrm{po}) = -2 \rho \). From (113), the ODE for the global isostable coordinate is

$$\begin{aligned} \frac{\hbox {d}\psi \left( r\right) }{\hbox {d}r} = -\frac{2\rho \psi \left( r\right) }{\rho r-r^3}. \end{aligned}$$
(114)

This has the general solution:

$$\begin{aligned} \psi \left( r\right) = c_1\left( 1-\frac{\rho }{r^2}\right) , \end{aligned}$$
(115)

which is of the same form as the isostables found in (99) up to a scaling factor. From here, we find that the global IRC is given as:

$$\begin{aligned} \mathbf {I}_{r,\phi }\left( r\right) = \frac{2\rho c_1}{r^3} \hat{r} \quad \Rightarrow \quad \mathbf {I}_{r,\phi }\left( \psi \right) = 2\sqrt{\frac{\left( c_1-\psi \right) ^3}{c_1\rho }}\hat{r},\nonumber \\ \end{aligned}$$
(116)

or, equivalently,

$$\begin{aligned} \mathbf {I}_{x,y}=2\sqrt{\frac{\left( c_1-\psi \right) ^3}{c_1\rho }}\left( \cos {\phi }\hat{x}+\sin {\phi }\hat{y}\right) . \end{aligned}$$
(117)

Assuming the system has a periodic orbit, the global isochrons are found by solving (72):

$$\begin{aligned} \frac{\hbox {d}\theta }{\hbox {d}\phi } = \frac{\sqrt{\eta ^2-1}}{\eta -\sin {\phi }}. \end{aligned}$$
(118)

The resulting PRC is therefore given by:

$$\begin{aligned} \mathbf {Z}_{r,\phi }\left( r,\phi \right)= & {} \frac{1}{r}\frac{\sqrt{\eta ^2-1}}{\eta -\sin {\phi }}\hat{\phi } \\ \Rightarrow \mathbf {Z}_{r,\phi }\left( \psi ,\theta \right)= & {} \sqrt{\frac{c_1-\psi }{c_1\rho }}\frac{\eta ^2-\cos {\theta }-\sqrt{\eta ^2-1}\sin {\theta }}{\eta \sqrt{\eta ^2-1}}\hat{\theta }, \end{aligned}$$

or equivalently,

$$\begin{aligned} \mathbf {Z}_{x,y}= & {} \sqrt{\frac{c_1-\psi }{c_1\rho }}\frac{\cos {\theta }+\sqrt{\eta ^2-1}\sin {\theta }-1}{\sqrt{\eta ^2-1}}\hat{x}\\&+\sqrt{\frac{c_1-\psi }{c_1\rho }}\frac{\sin {\theta }-\sqrt{\eta ^2-1}\cos {\theta }}{\eta }\hat{y}. \end{aligned}$$

6 Phase-based control of a population of oscillators

Thus far, the control applications in this tutorial have been focused on individual oscillators. But phase-based control of oscillator populations can also be achieved.

As an example application, consider the hypothesis that pathological synchronization of spiking neurons in the basal ganglia–cortical loop within the brain is a factor contributing to tremors exhibited by patients with Parkinson’s disease [6, 58, 102]. For patients with advanced Parkinson’s disease who do not respond to drug therapy, there is an established treatment option called deep brain stimulation in which a neurosurgeon implants an electrode that can inject current into the brain tissue [1]. This suggests the control problem of designing a single electrical stimulus u(t) which desynchronizes a population of neural oscillators.

Various phase-based control methods have been proposed to accomplish such desynchronization; see, e.g., [48, 95,96,97]. Here we briefly describe an approach called chaotic desynchronization, which is based on the Lyapunov exponent associated with the phase difference between a pair of identical oscillators which both receive the same input u(t) [110]:

$$\begin{aligned} \varLambda (\tau ) = \frac{1}{\tau } \int _0^\tau Z'(\theta (s)) u(s) \hbox {d}s. \end{aligned}$$
(119)

A control input u(t) with a positive Lyapunov exponent gives a desynchronizing effect. Note that the expression for the Lyapunov exponent in (119) depends on the derivative of the phase response curve for a single oscillator. Reference [110] formulates the desynchronization problem as an optimal control problem: Find the stimulus which maximizes the Lyapunov exponent while simultaneously minimizing the power used by the stimulus, the latter goal being desirable because it allows the battery which generates the electrical stimulus to have a longer life, thereby reducing the need for battery replacement surgery. This could also lessen the chance of undesirable side effects of deep brain stimulation, because it uses a weaker stimulus. The optimal control from this approach was found to be a very effective strategy for desynchronizing a neural population; moreover, this methodology is robust to weak coupling and heterogeneities of the neurons [110]. Chaotic desynchronization has been extended to the more realistic case of extracellular stimulation [109]. Other phase-based control schemes for neural populations include phasic burst stimulation [39] and stabilization of clusters [60, 61]. Also notable are control schemes which are inspired by phase reduction, in that they optimally drive a population of oscillators to the phaseless set [116], where the phase cannot be defined; noise then randomizes the phases of the oscillators, leading to desynchronization [12, 73].

A different approach to the control of oscillator populations is based on a partial differential equation for the distribution of phases. For example, suppose we have a population of N noise-free, identical, uncoupled oscillators all receiving the same control input u(t), with phase dynamics given by

$$\begin{aligned} \frac{\hbox {d} \theta _i}{\hbox {d}t} = \omega + Z(\theta _i) u(t), \quad i = 1,\ldots ,N. \end{aligned}$$
(120)

Consider the probability distribution \(\rho (\theta ,t)\) for the limit \(N \rightarrow \infty \), with the interpretation that \(\rho (\theta ,t) \hbox {d}\theta \) is the probability that a neuron’s phase lies in the interval \([\theta ,\theta + \hbox {d} \theta )\) at time t. This distribution evolves according to the advection equation [2, 95]

$$\begin{aligned} \frac{\partial \rho (\theta ,t)}{\partial t} = -\frac{\partial }{\partial \theta } [(\omega + Z(\theta ) u(t)) \rho (\theta ,t)]. \end{aligned}$$
(121)

Here desynchronization corresponds to a flat distribution \(\rho = 1/(2 \pi )\). Different ideas for controlling a phase distribution include controlling the distribution’s peak [110], control based on a generalization of the isostable reduction to partial differential equations [113, 114], and control which minimizes the norm between the current and target distributions [70].

7 Conclusion/outlook

The concepts of isochrons and phase reduction for nonlinear oscillators have a long history [33, 53, 115, 117], and their usefulness has been demonstrated for a number of systems of physical, technological, and biological interest over the last five decades. More recently, phase reduction techniques have been extended to include transverse directions and higher-order terms, and they have also been generalized to systems with stable fixed points. This tutorial presented a unified treatment of such phase reduction techniques and illustrated their use through various mathematical and biological examples.

This tutorial also covered the use of phase reduction for the design of control algorithms which optimally change properties of the system, such as the phase or period of an oscillation. By reducing the dimension of the system, phase reduction allows a more tractable approach to designing control algorithms than trying to do so for the full evolution equations for a system.

There is still much to be explored in this realm, and we note recent results on phase reduction for stochastic oscillators [98], and operational phase reduction which makes more natural ties to experimentally measurable quantities [104]. There are also ample opportunities to use phase reduction to design control algorithms for a variety of neural, cardiac, circadian, and other biological systems, and to investigate and design for robustness of such algorithms to noise, uncertainty, and heterogeneity. We hope that this tutorial has illustrated the promise of phase reduction and phase-based optimal control and will lead the reader down the path of applying such techniques to their own systems of interest.