Entrainment Dynamics Organised by Global Manifolds in a Circadian Pacemaker Model

Circadian rhythms are established by the entrainment of our intrinsic body clock to periodic forcing signals provided by the external environment, primarily variation in light intensity across the day/night cycle. Loss of entrainment can cause a multitude of physiological difficulties associated with misalignment of circadian rhythms, including insomnia, excessive daytime sleepiness, gastrointestinal disturbances, and general malaise. This can occur after travel to different time zones, known as jet lag; when changing shift work patterns; or if the period of an individual’s body clock is too far from the 24 h period of environmental cycles. We consider the loss of entrainment and the dynamics of re-entrainment in a two-dimensional variant of the Forger-Jewett-Kronauer model of the human circadian pacemaker forced by a 24 h light/dark cycle. We explore the loss of entrainment by continuing bifurcations of one-to-one entrained orbits under variation of forcing parameters and the intrinsic clock period. We show that the severity of the loss of entrainment is dependent on the type of bifurcation inducing the change of stability of the entrained orbit, which is in turn dependent on the environmental light intensity. We further show that for certain perturbations, the model predicts counter-intuitive rapid re-entrainment if the light intensity is sufficiently high. We explain this phenomenon via computation of invariant manifolds of fixed points of a 24 h stroboscopic map and show how the manifolds organise re-entrainment times following transitions between day and night shift work.


INTRODUCTION
The function of the circadian timekeeping system is to align an organism's physiology and behaviour with the daily environmental cycles conferred by Earth's rotation. Alignment is achieved by endogenous circadian oscillators with periods close to, but not exactly, 24 h synchronising to external 24 h periodic signals, such as the light/dark cycle, in a process called entrainment. Properties of both the internal oscillator and the external forcing signal, such as intrinsic period and light intensity, combine to determine the stable phase of entrainment. For example, circadian clocks with long intrinsic periods can lead to delayed sleep phase syndrome (DSPS), a disorder where patients tend to be unable to fall asleep until late at night and have difficulty waking up in the morning. Bright light therapy can help to advance the entrained phase of DSPS patients so that their hormonal rhythms, sleep-wake patterns, and peak performance times are more in line with societal norms [1].
Failure to achieve entrainment can occur if the mismatch between the periods of the intrinsic oscillator and the external forcing is sufficiently large and the forcing signal is sufficiently weak. In non-24 h sleep-wake disorder (non-24), patients are unable to establish a stable 24 h sleep-wake rhythm [2][3][4][5]. Non-24 is common in blind people that do not have any light perception, leading to sleep-wake rhythms with the period of their intrinsic circadian clock. Since the intrinsic period of most people is greater than 24 h, this results in sleep-wake patterns where the phase of sleep onset progressively drifts later in the day from one day to the next. Non-24 is also experienced by sighted individuals where the combination of a short or long intrinsic period and a reduced sensitivity to light renders them unable to entrain to 24 h cycles.
Transient misalignment of circadian rhythms occurs when there is an abrupt shift in the phase of environmental cycles. After rapid travel across time zones, it can take several days for the circadian clock to establish a stable phase relationship with the light/dark cycle in the new time zone. During the reentrainment process, travelers may experience insomnia, daytime sleepiness, gastrointestinal issues, and other symptoms collectively known as jet lag. Circadian misalignment and associated health problems can also be caused by a change in work patterns, for example, when a worker transitions from day shift to night shift or vice versa. In particular, rotating or permanent night-shift workers have increased incidence of cardiovascular disease and cancer compared to permanent day shift workers [6]. Furthermore, night shift workers that are not entrained to a permanent night shift work schedule exhibit decreased alertness and performance levels relative to entrained night shift workers [7].
Mathematical modeling and tools from dynamical systems theory can be used to gain insight into circadian rhythm sleep disorders and the re-entrainment process following shifts in the light/dark cycle [8,9]. The circadian clock is a complex system consisting of cellular oscillators and network interactions within and across brain regions and tissues throughout the body. Mathematical models have been developed to describe the circadian system at various levels, including detailed models of the transcription/translation feedback loops underlying intracellular molecular clocks and models of the electrical activity of the suprachiasmatic nucleus-a network of ∼20,000 neurons in the hypothalamus that serves as the brain's master circadian timekeeper. We refer the reader to [10,11] for reviews of biochemical and electrophysiological circadian models. Other modelers have focused less on the cellular details and instead have tried to capture the behavior of the circadian system at the level of the whole organism (see [12] for a review). One such effort is the Forger-Jewett-Kronauer (FJK) model, a low-dimensional model of the human circadian system consisting of a central limit cycle oscillator that responds to light via processing by the retina [13]. This model is based on experiments measuring how the amplitude and phase of circadian rhythms in human subjects respond to light pulses. It has been extensively validated in laboratory and field conditions, making it an attractive choice for simulating jet lag and other perturbations to the circadian system [14]. Here, we use dynamical systems tools to analyse the entrainment dynamics of a reduction to the original FJK model.
The remainder of the manuscript is organised as follows. In Section 2, we consider the FJK model equations and then introduce the two-dimensional version of the model that we use in the present study. In Section 3, we characterise the bifurcations that lead to loss of entrainment when key parameters are varied and discuss these results in the context of non-24. In Section 4, we compute invariant manifolds of fixed points for a 24 h stroboscopic map constructed from the model. We show that these manifolds are able to explain the dynamics of a rapid re-entrainment phenomenon that has been previously observed under certain conditions in simulations and experiments. In Section 5, we illustrate how the manifolds organise the dynamics of re-entrainment following transitions between day and night shift work schedules. Finally, in Section 6, we discuss how our results relate to previous studies on the dynamics of circadian entrainment.

THE FORGER-JEWETT-KRONAUER MODEL
In 1990, Kronauer introduced a mathematical model of the human circadian pacemaker that reproduces many general features of how the circadian clock responds to light exposure in laboratory experiments [15]. Kronauer's original model has subsequently been revised and extended to account for additional data on the effects of light observed in phase resetting experiments [16][17][18]. These models consist of a limit cycle oscillator, based on the Van der Pol equations, combined with a model of retinal light processing. Although these models are simplified descriptions of the human circadian system, they have become a widely-used tool for predicting circadian phase and have been carefully validated under a range of conditions [19][20][21].
Here we utilise the Forger-Jewett-Kronauer (FJK) version of the model [13]. This three-dimensional system of ordinary differential equations with external periodic forcing takes the following form: where the dots indicate derivatives with respect to time. The variable C captures daily fluctuations in core body temperature, A is a phenomenological auxiliary variable, and n ∈ [0, 1] describes the activity of the phototransduction pathway that drives the circadian system in response to light input of intensity I with activation rate α and decay rate β. Equations 1,2 include modifications to the Van der Pol oscillator that scale the amplitude and adjust the period. The parameter τ c represents an individual's intrinsic circadian period; the correction factor ρ ensures that the model oscillation period equals τ c for simulations in the absence of light (I 0). The amplitude recovery term (A − qA 3 ) yields a limit cycle amplitude of 1.0 in the absence of light. The parameter μ describes the rate of growth and decay of perturbations away from the limit cycle representing an entrained (24 h) circadian rhythm. The variable B, which is scaled by the gain parameter G, modulates the oscillator's sensitivity to light in accordance with known circadian rhythms in human visual sensitivity [17]. The function α scales the light intensity with respect to a basal value I 0 , a sensitivity exponent p, and a gain parameter α 0 that was fitted to data on experiments with light stimuli over the photopic range [18]. The parameter K determines the shape of the phase response curve (PRC) to light, with positive values biasing the PRC to phase delays as observed in experiments [22]. Note that the impact of B on the auxiliary variable is scaled by a parameter k < 1. Finally, f (t) is a periodic function with a period of 24 h that, when combined with α, represents the light/dark cycle. In this paper, we assume that f is a square-wave with duty cycle N ∈ [0, 24], shifted by an amount t s ∈ [0, 24]: where N represents the number of hours of light in a 24 h interval.
In the absence of light (i.e., with N 0 or I 0), the system Eqs. 1-5 supports a stable limit cycle solution with period τ c . For appropriate choices of system and forcing parameters, the system can be entrained to a 24 h period orbit; example simulations using the default parameter values given in Table 1 are shown in Figures 1A-C. Throughout the paper, we will explore the ability of the system to entrain to such a 24 h cycle, and the consequences of perturbing trajectories away from the limit cycle representing this entrained solution, for example, in response to shift work. For parameters whose values vary, they should be assumed to take the values in curly braces unless otherwise stated. The units for the parameters associated with light intensity (I and I0), time (τc, ts, and N), and rates (α0 and β) are lux, h, and h −1 , respectively. The dynamics for n are significantly faster than those for A and C, as can be seen in the time series in Figure 1. This means that n rapidly adopts its steady state value: This observation allows us to approximate the full, three variable system with a 2-dimensional version by replacing Eq. 4 with where n ∞ has been substituted for n. To demonstrate the validity of this reduced model, we plot in Figures 1D-F a comparison of the full system with the one obtained by replacing n by n ∞ (I). Reduction of the system to a two variable approximation facilitates analysis of the underlying dynamics, as we shall later elucidate. The effect of changing shift work patterns, or of the jet lag induced by travelling across time zones (assuming variation in longitude only), can be modelled by changing t s and observing how trajectories return to the stable limit cycle. The severity of the effect of such perturbations can be measured by the entrainment time, that is, the duration required for trajectories starting from arbitrary initial points to converge to the stable orbit (we provide a more precise definition in Section 4) as the phase of the circadian oscillator with respect to the external forcing is varied. In Figures 2A,B, we plot re-entrainment times obtained by choosing initial conditions at regular phase shifts along the entrained limit cycle. For each point we change t s instantaneously from its reference value by the amount indicated on the x-axis, Δt s , and compute the time taken for the resulting trajectory to converge back to the limit cycle.
Similarly to results reported in [23][24][25][26], we observe that there is a pronounced peak in the re-entrainment for I 50 for Δt s ≈ +10.5, which suggests the existence of a "worst" shift in circadian phases. Interestingly, for higher light intensities, this global maximum in re-entrainment time is replaced by a local minimum, suggesting a change in dynamics near this value of Δt s .
We remark here, that whilst we demonstrate this transition (from global maximum to local minimum) under variation of I, similar observations can be made for other system parameters, such as G or α 0 . This phenomenon has implications for jet lag (where Δt s +10 corresponds to traveling 10 time zones in the eastward direction) and also for workers rotating between day and night shifts. We demonstrate in Figure 2C that at low light intensity, rotating from nights to days is more difficult than rotating from days to nights, whereas at high light intensity days to nights is more difficult than nights to days. The primary goals of this paper are to understand this transition and to establish where and how entrainment to a stable 24 h rhythm is lost.

BIFURCATION ANALYSIS
The behaviour of dynamical systems in general is organised by invariant sets in phase space and their associated manifolds. For periodically forced systems, these invariant sets typically take the form of periodic orbits, where we note that there may be many such objects in the full phase space. With this in mind, we aim to find periodic orbits of the two variable FJK model (hereby referred to as the 2D model) for the default parameter values; see Table 1. In particular, we seek to identify bifurcations in the number of periodic orbits since these transitions are relevant to understanding the dynamics of the entrainment process. Hence, we proceed to probe the bifurcation structure of the 2D model, using the methodology detailed in the Supplementary Material S1.

Variation of Light Intensity
We first perform bifurcation analysis in the light intensity parameter I and display the results in Figure 3. The bifurcation diagram in Figure 3A shows the branches of solutions under variation of I and we identify two fold bifurcations (around I ≈ 2.1 and I ≈ 118.6), which we label I F 1 and I F 2 , respectively. For I > I F2 , we find that the only invariant set in the forced system is a stable limit cycle, the time series of which is shown in Figure 3B, and so all trajectories will converge to this   orbit. For I < I F1 , there are no stable periodic orbits, and trajectories undergo quasiperiodic motion, highlighting the difficulty to entrain to a 24 h rhythm under extremely low light intensities. For intermediate values of I F1 < I < I F2 , the system exhibits three periodic orbits, one of which is stable and one of which is fully unstable, with the remaining orbit being of saddle type. These orbits are shown as time series in Figure 3C, in the full (A, C, t) space in Figure 3D, and projected onto the plane of zero phase (of the light/dark cycle, i.e., the time at which f switches from 0 to 1) in Figure 3E. In this case, trajectories will ultimately converge to the stable periodic orbit, but the unstable limit cycles and their manifolds play an important role in organising how this occurs, as we shall discuss in Section 4.

Variation of Day Length
In addition to light intensity, the day length, expressed by the parameter N, also influences the number and type of periodic orbits supported by the system, as illustrated in Figures 4A-C. For I 50, the fully unstable limit cycle is disconnected from the branch of saddle and stable orbits; see Figure 4A. The isola formed by these latter branches is bounded by two fold bifurcations around N F1 ≈ 2.4 and N F4 ≈ 23.5, using similar notation as before. Thus, if the day length becomes too long or too short (as would be expected in polar regions), the circadian rhythm cannot be entrained to a 24 h rhythm. For higher values of I, the branch of fully unstable orbits merges with the branch of saddle orbits via a cusp bifurcation, leading to the formation of two more fold bifurcations. This scenario is highlighted in Figure  4B for I 150, where the additional folds occur at N F2 ≈ 9.3 and N F3 ≈ 16.1. For N F2 < N < N F3 , the stable periodic orbit is the only solution to the system. As I is increased further, the interval over N for which this is true grows (as shown in Figure 4C for I 1000), highlighting that higher light intensities facilitate entrainment to a 24 h rhythm.

Variation of Natural Period
As well as considering properties of the external environment such as light intensity and day length, it is pertinent to consider the influence of intrinsic properties of the circadian oscillator on entrainment. The natural period, τ c , is of particular note since it can be directly measured and has been shown to affect individual's entrainment properties and daily cycle habits, such as their chronotype [27]. To this end, we show in We observe a similar structure between the two bifurcation diagrams, namely, that for low I values, as in Figure 4D, there is an isola structure similar to that in Figure 4A, but over a much smaller range of τ c . For higher I values, as seen by comparing Figure 4E with Figure 4B, there is a range over τ c for which the system possesses only the stable periodic orbit, whilst for τ c values either side of this region, all three aforementioned solutions are present. For the highest value of I 1000, as in Figure 4F, the stable periodic orbits destabilise via Neimark-Sacker bifurcations, rather than folds. This distinction in bifurcation type, whilst subtle, can have a significant effect on entrainment beyond the bifurcation point, as we shall discuss in Section 3.4.

Behaviour Near the Bifurcations
In Figures 4D-F, we observe that the type of bifurcation leading to loss of stability of the entrained orbit under variation of τ c changes as I increases, switching from a fold to a Neimark-Sacker bifurcation. Following both of these bifurcation types, the system no longer possesses a stable period 1 orbit. In both scenarios, trajectories undergo torus-like behaviour, however, the manner in which they do so differs. This observation has particular significance for people with non-24 h sleep/wake cycles, which can be observed by analysing the phase dynamics of the quasiperiodic motion. In Figure 5, we show the dynamics of the system just past the fold bifurcations shown in Figure 4D (the top row shows dynamics for τ c < τ F1 c , where τ F1 c corresponds to the left-most fold, whilst the bottom row displays dynamics for τ c > τ F4 c , where τ F4 c corresponds to the right-most fold). The toruslike behaviour in both cases is evident from the modulation of the amplitude of the oscillations in C in Figures 5A,D.
To demonstrate the effect that the loss of entrainment has on the circadian rhythm, we plot in Figures 5B,E, the cycle-to-cycle variation of the period, as measured by the interval between successive nadirs in , we see that the period of the circadian cycles is always smaller (greater) than 24 h, highlighting the failure to entrain to a 24 h period rhythm. The consequence of this can be seen by examining the evolution of the phase of the C min values relative to the forcing cycle, as shown in Figures 5C,F. Here we see that relative phase of the circadian oscillator constantly slips with respect to the forcing cycle, completing successive rotations around the full circle of possible phase differences. A person with a circadian oscillator following such dynamics will rarely phase-match to the external forcing, and as such, is likely to experience significant circadian rhythm disorders.
To compare the differences between dynamic behaviour associated with the different bifurcation types, we plot in Figure 6 the system behaviour following Neimark-Sacker instabilities. The panels in the figure follow the same layout as in Figure 5. Whilst we would conclude mathematically that the circadian oscillator is no longer entrained following such a bifurcation as in the case for dynamics near a fold, from a physiological perspective, the oscillator may still be regarded as entrained if the oscillatory dynamics around the now unstable periodic solution are small in amplitude (relative to the original limit cycle). In a similar vein to Figure 5, the top row in Figure 6 displays dynamics for τ < τ N1 c , where τ N1 c is the left-most Neimark-Sacker bifurcation, whilst the bottom row shows trajectories for τ c > τ N2 c , where τ N2 c is the right-most Neimark-Sacker bifurcation. Close to each Neimark-Sacker bifurcation, we expect the period of the modulation of the original limit cycle (that which undergoes the instability) to be approximated by the imaginary part of the linearised system around this limit cycle. In particular, if the eigenvalues of this linearisation at the bifurcation point are given by λ ± μ ± iω with |λ ± | 1, then the expected period of the modulation will be T 2π/ω. In our case, we find that for Figure 6A, ω ≈ 0.56, leading to T ≈ 11.20,  whilst for Figure 6D, ω ≈ 0.35 so that T ≈ 17.79. In both cases, we find excellent agreement between the numerical simulations and the predictions from the bifurcation analysis.
For parameter values near the Neimark-Sacker instabilities, we see that the cycle-to-cycle period of C now varies around 24 h, as can be seen in Figures 6B,E. The consequence of this is that the phase of C relative to the external forcing, although varying from cycle-to-cycle, is constrained to an interval around the correct phase (i.e., the phase of the underlying limit cycle), as shown in Figures 6C,F. This means that even though people with such dynamics will not be entrained to a 24 h period, their phase variation relative to the external forcing will be of small amplitude, meaning that they may not experience significant circadian rhythm disorders. Overall, this highlights the importance of high light intensities (or, equivalently, in boosting sensitivity to light) for combating non-24 h sleep/wake disorders.

Summary of Bifurcation Analysis
The observations of the one-parameter continuations may be summarised via the three-parameter bifurcation diagram as shown in Figure 7A, with two-dimensional slices of the full diagram shown in Figures 7B-D. Figure 7A shows the surfaces of fold bifurcations (purple) together with the surfaces of Neimark-Sacker bifurcations (teal) that bound parameter regimes (indicated in Figures 7B-D) with different entrainment behavior. Figure 7B and Figure 7C showcase the so-called Arnol'd tongues that are commonly observed in forced oscillator systems.
In the central, light orange shaded, region in Figure 7B, bounded by the Neimark-Sacker (teal) and fold (purple) bifurcation lines, only the stable periodic orbit exists and so the system entrains easily. In the lower, darker orange shaded part of the central region, the stable, unstable and saddle periodic orbits coexist. In this region, the system ultimately converges to the stable periodic orbit, since it is the only attracting set, but the pathway involved in this convergence may be heavily shaped by the other orbits, as will be investigated in Section 4. In the white region to the left and right of the shaded regions, no stable 24 h period orbit exists and so we conclude that the circadian oscillator does not entrain to a 24 h rhythm. Similarly, the light orange shaded region in Figure 7C supports only a single, stable periodic orbit, whilst the region bounded between the two fold curves possesses all three types of periodic orbit. To the left and right of the outer fold curve, only the unstable orbit exists, and hence there is no possibility to entrain to a 24 h rhythm. Figure 7D shows the so-called Arnol'd onion [25,28], where we now identify a central portion in which only the stable periodic orbit exists. This is surrounded by a region supporting all three orbit types, which itself is surrounded by the white region with only the unstable orbit.

ENTRAINMENT TIMES
The bifurcation diagrams in Section 3 indicate where in parameter space the circadian oscillator can be entrained to a 24 h cycle under our choice of forcing. Even in these regions of parameter space, however, the dynamics involved with the entrainment can be markedly different depending on initial conditions. To demonstrate this point, we compute the time taken for a trajectory starting from an arbitrary initial condition to converge to the stable limit cycle; we refer to such times as entrainment times. Formally, we define the entrainment time, T (X) ∈ R ≥ 0 , of an initial condition X (A, C) to be where ε is a tolerance which we hereon set to ε 0.001, and Γ s is the stable limit cycle, defined by where X s L is the point along the stable limit cycle when f (t) switches from 0 to 1 (dawn), we refer to this point as the point of zero phase. We denote phase differences along the limit cycle with respect to the point of zero phase by Z, which is defined modulo 24 h.
In Figures 2A,B, we recapitulated results from [25] by plotting the entrainment times for initial conditions along the stable limit cycle at different relative phases (note that the definition of entrainment times between the two studies are different). This section is dedicated to understanding this phenomenon. To this end, we consider a stroboscopic map P : R 2 → R 2 defined by The above may equivalently be thought of as a Poincaré return map, with a section chosen at the zero phase of the forcing cycle. In Figure 8, we show sequences of map iterates of Eq. 11 for I 50 ( Figure 8A and Figure 8C) and I 1000 ( Figure 8E) following an abrupt phase advance of the light/dark cycle, such as that which occurs for positive phase shifts +Δt s . Figures 8B,D,F show the evolution of the phase of the C min values relative to the forcing phase. The initial conditions on Γ s for the Figure 8A and Figure  8C are slightly phase-shifted with respect to each other. The effect of this small difference is evident from the resulting dynamics. In Figure 8A, the iterates move around the orbit in an anti-clockwise fashion, whilst in Figure 8C the iterates follow a clockwise motion. Anti-clockwise iterates correspond to re-entrainment in an orthodromic fashion (i.e., in the same direction as the phase shift of the light/dark cycle) through repetitive phase advancements, as shown in Figure 8B. Conversely, clockwise iterates reflect antidromic re-entrainment (i.e., in the opposite direction as the phase shift of the light/dark cycle) via successive phase delays, as shown in Figure 8D. The sensitivity around the initial conditions in Figure 8A and Figure 8C suggests the presence of a "neutral point" at which the behaviour switches from anti-to orthodromic re-entrainment.
In Figure 8E, we plot iterates for the map with I 1000 with an initial condition close to the neutral point. Rather than displaying anti-or orthodromic behaviour, the sequence of iterates cuts directly across the phase space, appearing to take a "shortcut", rather than re-entraining via gradual phase advancement or delay. This shortcut-type behaviour is reflected by the decrease in entrainment time observed at a phase shift of Δt s ≈ + 10 as shown in Figure 2. In [25], the neutral point appears as an unstable fixed point of a onedimensional entrainment map whose section was chosen to be transverse to the stable limit cycle at the point of zero phase. Here, we will show that the neutral point can be understood by examining (strong) stable manifolds of the stable and saddle fixed points of the stroboscopic map.

Manifolds as Organisers of Entrainment Times
We compute manifolds following the steps outlined in Supplementary Material S2. Figure 9 shows the projection of the periodic orbits in the (A, C)-plane with the fixed points of Eq. 11 indicated with a marker, and the corresponding stable and unstable manifolds of the points for I 50 and I 1000. In Figure 9A, we plot the manifolds of the three fixed points (corresponding to stable, saddle, and unstable limit cycles of the 2D model) for I 50. The stable manifolds (blue lines) of the stable and saddle fixed points are approximately linear for this parameter set, whilst the unstable manifolds (red lines) of the saddle and unstable fixed points curve away from the fixed points, following the periodic orbits more closely. If we focus specifically on the manifolds associated with the saddle orbit, we can clearly see how the manifolds organise the behaviour observed in Figures 8A-D. In particular, the orthodromic and antidromic re-entrainment behaviour closely follow the trajectory charted by the unstable manifold of the saddle point. The separatrix is given by the stable manifold of the saddle point X saddle L , and the neutral point is the intersection of the same stable manifold with the projection of the periodic orbit onto the plane of zero phase. Importantly, we have that λ s saddle − 1 > λ u saddle − 1 so that contraction toward X saddle L along the stable manifold is stronger than repulsion away from the same point along its unstable manifold. This means that trajectories near X saddle L get pulled toward the saddle limit cycle before slowing moving away, explaining the long entrainment times near this point in the simulations shown in Figure 2. This observation is confirmed by examining entrainment times for initial conditions across a range of (A, C) values, as shown in Figure 9B, which we compute according to Eq. 9 via simulation over a GPU architecture. Superimposed on these entrainment time heat maps are the stable manifold of the saddle limit cycle and strong stable manifold of the stable limit cycle. In this figure, we see that peaks in the entrainment times occur exactly along the stable manifold of the saddle. If we examine the unstable manifolds of the saddle point in Figure 9A, we see that they organise the orthodromic and antidromic return to the stable fixed point shown in Figures 8A,C. As such, the stable manifold of the saddle point serves as a separatrix between trajectories exhibiting these two kinds of behaviour. If we increase the light intensity to I 1000, the saddle and unstable orbits are no longer present, having disappeared via a fold bifurcation. In this case, we observe that the stable manifolds of the stable limit cycle are responsible for organising behaviour near the neutral point as shown in Figure 9C. Now we can see that the shortcut shown in Figure 8E corresponds to trajectories that follow this stable manifold, which is confirmed in the heat map in Figure 9D.
This plot highlights the existence of a "river" of points in the (A, C) plane centred on the strong stable manifold of the stable limit cycle that possess significantly lower entrainment times than points around them. We are now in a position to demonstrate how the global maximum at Δt s ≈ 10.5 for I 50 becomes a local minimum for I 1000. As the fixed points of Eq. 11 corresponding to the fully unstable and saddle fixed points approach each other and coalesce at fold point I F2 , the stable manifolds of the saddle and stable limit cycles also approach one other. Since the manifolds vary smoothly with respect to the system parameters, the stable manifold of the saddle limit cycle is effectively replaced by the strong stable manifold of the stable limit cycle as the system moves through the bifurcation. For I > I F2 , trajectories close enough to the strong stable manifold of the stable limit cycle can now follow the shortcut, though most trajectories still follow the typical orthodromic and antidromic re-entrainment routes. As I increases, the width of the river increases, so that more trajectories entrain to the limit cycle quickly, though we remark that this width ultimately saturates as I continues to increase.
Thus far, we have set t s 0, setting the point of zero phase to occur exactly at dawn [when f (t) switches from 0 to 1]. As time zones change, or as a result of changing shift work patterns, the phase of the intrinsic circadian clock will become shifted with respect to the external forcing, causing a shift in t s . Note that variations in t s do not change the location of limit cycles in the system, rather, they cause the point of zero phase to rotate around the orbit. A similar observation holds for the manifolds. This is demonstrated in Figure 10A, where we plot the stable manifold of the saddle limit cycle and strong stable manifold of the stable limit cycle for I 50, shown in Figure 9B, for a sequence of values of t s . In fact, if we denote the set of points comprising a particular manifold in the system with an arbitrary value for t s at a general forcing phase, θ, by W θ ts , we have that W θ ts is equal to the image under the flow of the system of W 0 0 for duration θ − t s that is: noting that θ − t s should be treated modulo a 24 h period. The natural rotation induced by the flow gives rise to the rotated position of the manifolds as t s and θ vary. This relationship allows us to trace out the manifolds over the entire forcing cycle, which we display in Figure 10B for the default parameters as listed in Table 1; compare to Figure 3D. The integrated manifolds can then be used to separate trajectories that follow orthodromic vs antidromic re-entrainment for arbitrary phase shifts and at arbitrary phases of the forcing cycle.

APPLICATION TO SHIFT WORK
In developed economies, millions of people either permanently work the night shift or rotate in and out of night shift work. When a worker rotates from day shift to night shift, or vice versa, the abrupt change in the pattern of their exposure to light can cause circadian misalignment and jet lag-like symptoms until they entrain to the light/dark cycle of the new shift. Here we study the dynamics of re-entrainment following shift work rotations and use the manifolds of the stable and saddle limit cycles discussed in Section 4.1 to explain the simulation results shown in Figure 2. In particular, we focus on the following two questions. Firstly, at low light intensity (I 50), why does it take longer to re-entrain after rotating from night shift to day shift (NS→DS: 1,360 h) than it does after rotating from day shift to We assume that a worker on the day shift works from 7 AM to 3 PM and sleeps from 11 PM to 6 AM, whereas someone on the night shift works from 11 PM to 7 AM and sleeps from 8 AM to 3 PM. In either case, they are exposed to N 17 hours of light. For both DS and NS workers, "dawn" (i.e., when their light exposure begins) occurs at the Z 0 location on the stable limit cycle. Similarly, "dusk" (when their light exposure ends) occurs at the Z 17 location for both DS and NS workers. However, DS and NS workers are at these locations on the limit cycle at different wall-clock times: Z 0 corresponds to 6 AM for DS workers and 3 PM for NS workers; Z 17 corresponds to 11 PM for DS workers and 8 AM for NS workers. With regards to our previous notation, the switch from DS→NS corresponds to Δt s 16 and the switch from NS→DS represents a value of Δt s 22.

Rotating From Day Shift to Night Shift at Low Light Intensity
To simulate a worker rotating from day shift to night shift, we assume that they remain entrained to the DS light/dark cycle until 11 PM, which is the Z 17 location indicated by the solid teal dot in Figure 11A. If they were staying on DS, this would be dusk. However, since they are rotating to NS, instead of going to bed they go to work and receive additional light exposure which perturbs them away from the stable limit cycle. More specifically, the DS worker rotating to NS will receive nine extra hours of light before going to bed at 8 AM. This can be thought of as equivalent to traveling nine time zones in the westward direction. By contrast, a worker that is already entrained to the NS light/dark cycle will not be at the Z 17 location on the stable limit cycle at 11 PM. Rather, they will be at the Z 8 location indicated by the solid orange dot in Figure 11A. The orange periodic orbit shown in Figure 11B represents the entrained NS worker, and the teal trajectory represents the DS worker switching to NS. Re-entrainment is considered complete when the Euclidean norm of the difference between the teal and orange trajectories first falls below the tolerance ε. To help visualise the re-entrainment process, we strobe the system every 24 h and plot the location of the re-entraining trajectory in the (A, C) plane as open teal dots in Figure 11A and as filled teal dots in the time course shown in Figure 11B. For reference, the strobed iterates of the entrained NS worker are shown as filled orange dots. From Figure 11A, we see that the iterates of the stroboscopic map move along the unstable manifold of the saddle limit cycle until they converge to the location of the entrained NS worker.

Rotating From Night Shift to Day Shift at Low Light Intensity
Next we consider a worker rotating from night shift to day shift. We assume that they remain entrained to the NS light/dark cycle Frontiers in Applied Mathematics and Statistics | www.frontiersin.org July 2021 | Volume 7 | Article 703359 until 8 AM, which is at the Z 17 location on the stable limit cycle indicated by the solid teal dot in Figure 11C. If they were staying on NS, this would be "dusk". However, since they are rotating to DS, instead of going to bed they remain at work, and receive additional light exposure which perturbs them away from the stable limit cycle. More specifically, the NS worker rotating to DS will receive 15 extra hours of light before going to bed at 11 PM. This can be thought of as equivalent to traveling 9 time zones in the eastward direction. In contrast, a worker that is already entrained to the DS light/dark cycle will not be at the Z 17 location on the stable limit cycle at 8 AM. Rather, they will be at the Z 2 location indicated by the solid orange dot in Figure 11C. The orange periodic orbit shown in Figure 11D represents the entrained DS worker, and the teal trajectory represents the NS worker rotating to DS. Similarly to the NS→DS scenario described in Section 5.1, in the (A, C) plane, we see that the iterates of the stroboscopic map move along the unstable manifold of the saddle limit cycle (red curve) until they converge to the location of the entrained DS worker ( Figure 11B). However, a key difference between the two scenarios is the location of the stable manifold of the saddle limit cycle. The stable manifold of the saddle limit cycle (blue curve) passes through the projection of the stable limit cycle onto the plane of zero phase (black/grey orbit) near the Z 17 location for the NS→DS case, but does not do so for the DS→NS case. In the NS→DS case, the first few iterates move along the stable manifold, passing close to the saddle point of the Poincaré map Eq. 11 before starting to slowly move away from this point along its unstable manifold, leading to the very long re-entrainment time of 57 days shown in Figure 11D. In the DS→NS case, the first few iterates do not move along the stable manifold and thus do not pass as close to the saddle point and therefore move away from the point along its unstable manifold more quickly, leading to the relatively shorter re-entrainment time of 33 days shown in Figure 11B.

Rotating Between Shifts at High Light Intensity
We assume the same shift work schedules and rotation protocols as in Section 5.1 and 5.2. With I 1000, the saddle limit cycle that played such a key role in the behavior for I 50 no longer exists. The strong stable manifold of the stable limit cycle passes through the projection of the stable limit cycle onto the plane of zero phase near the Z 17 location for NS→DS scenario ( Figure 12A), but not for DS→NS scenario ( Figure 12C), similarly to the situation with the stable manifold of the saddle limit cycle at low light intensity. In the NS→DS scenario with I 1000, the stroboscopic map iterates move along the strong stable manifold, taking the shortcut through phase space and re-entraining in 13.7 days ( Figure 12D). In the DS→NS scenario with I 1000, the map iterates are not near the strong stable manifold and thus do not have access to the shortcut, leading to a relatively longer re-entrainment time of 16.3 days ( Figure 12B). This example highlights the importance of the strong stable manifold of the stable limit cycle in organising re-entrainment dynamics under changes in shift work patterns.

DISCUSSION
The first key result of our paper is the identification of the boundaries of the parameter regimes in which the circadian oscillator can entrain to external forcing. To this end, we perform one-parameter continuation of the periodic orbits in each of light intensity I, day length N and natural period τ c , to identify their codimension-one bifurcations. We then continue these fold and Neimark-Sacker bifurcations in each pair of parameters. This approach leads us to identify Arnol'd tongue structures in the (τ c , I) and (N, I) parameter planes. Arnol'd tongues demarcate the region of stability of entrained solutions of systems of forced oscillators, tracing out bifurcations to instability of such solutions [29]. In our study, we not only compute the outer tongue structure of the entrained 24 h solution, but also show how other bifurcations within the tongue change the transient dynamics of trajectories converging to this solution. In the (τ c , N)-plane, we instead find the so called "Arnol'd Onion" shown in Figure 7D in which the widest parameter window for entrainment occurs at N 12. The Arnol'd Onion entrainment region was first identified in a generic amplitude-phase-oscillator model of a circadian clock [28]. It has also been found in the (I, τ c ) and (N, τ c )-planes via computation of entrainment times in the reduction of the FJK model to a one-dimensional iterative entrainment map [25]. In this paper, using numerical continuation and bifurcation analysis, we identify not only the boundaries of the entrainment region, but also the structure within the area of entrainment. This allows us to distinguish two distinct parameter regimes for entrainment, one where the stable periodic orbit is the only asymptotic solution, and one that contains a saddle periodic orbit, the existence of which leads to longer entrainment times. Via concatenation of two-parameter bifurcation diagrams, we extend the boundaries of all parameter regimes into the full (I, N, τ c )-space. Interestingly, Schmal et al. [28] identify higher order "strings" of onions for lower τ c values, specifically τ c 24/K where K takes the value of any of the factors of 24, and gives the number of onions (entrainment regions) in the string. In our model, we too identify regions of entrainment for fractional values of the natural period near τ c ≈ 3.4, 4.8, and 8 which appear as additional branches of solutions that are terminated and initiated via fold bifurcations. These regions are shown in Figure S13 in Supplementary Material S3 for N 12 and I 150, thereby extending Figure 4, along with the associated "strings of onions" in the (τ c , N)-plane. The majority of people have a natural period between 23.5 and 24.7 h so it is unlikely that these branches play a significant role in entrainment dynamics [22]. However, for individuals that do exhibit extremely low τ c values, these results suggest that entrainment to a 24 h cycle is possible, in spite of the wide discrepancy between the forcing period and their natural period.
The second key result of our paper is the computation of the geometric structures in phase space that organise previously observed re-entrainment dynamics; namely, the invariant manifolds of fixed points for a 24 h stroboscopic map constructed from the model. Computation of these manifolds allows us to find and fully characterise a separatrix between phase advancing and phase delaying re-entrainment trajectories. This phase space separatrix was conjectured to exist following studies of the one-dimensional iterative map reduction of the FJK model [25]. The separatrix is also responsible for the rapid reentrainment phenomenon that has been observed under certain conditions in simulations and experiments [24,25,[30][31][32]. If we interpret Figure 2B as representing entrainment times following international travel, we see that for low light intensity, the longest entrainment times occur for journeys approximately 10 h East (+10Δt s ). This is the East-West jet lag asymmetry phenomenon whereby travelling East results in longer entrainment times and worse reported jet lag [25,33]. By contrast, for high light intensity, this same figure indicates that this global maximum over entrainment times becomes a local minimum leading to a socalled "shortcut" to entrainment. Diekman and Bose identified this change from a maximum to a minimum in their 1D map and hypothesised that the shortcut corresponds to a phaseless set where isochrons of the periodic orbit converge [25]. Here we show that it is the composition of the separatrix that organises this behaviour. For low light intensity, when the separatrix consists of the strong stable manifold of the stable fixed point and the stable manifold of the saddle point of the stroboscopic map there is a local (in phase space) increase in entrainment times. For high light intensity, the saddle point no longer exists and the separatrix consists of only the strong stable manifold of the stable point enabeling entrainment trajectories that start close to the manifold to exhibit a local decrease in entrainment times.
Invariant manifolds of saddle orbits as organizing centres of entrainment times have recently been identified in a forced Kuramoto model of pacemaker cell dynamics [24] and a hierarchical system of planar Novak-Tyson models [26]. Moreover, the shortcut traced out by the strong stable manifold has recently been experimentally identified from wearable device data and exploited to develop jet lag strategies that align with it [32]. Here, jet lag is measured by self-reported mood scores that show that people who appear to hit the shortcut feel "better" according to a simple positive-negative scale. The authors propose an algorithm based on simulations of the FJK model [13,17] to create a schedule for optimum re-entrainment that consists of varying periods of light and dark each day. Their strategies rely on knowing the location in phase space of the "optimal solution", i.e., the strong stable manifold of the entrainment orbit. Their first approach is to identify the optimal solution for phase space corresponding to the situation immediately after arrival. They propose a light/dark schedule to move initial conditions to this optimal solution, but find that the trajectories never reach the optimum and, for some initial conditions, re-entrainment is not achieved. With respect to our formulation, changing the light/dark schedule corresponds to varying the parameter N, which leads to a shift in the position of relevant manifold(s). The authors' second approach is to update the schedule to fit the optimum for the system at the next step (N value). They show this is a superior strategy in that it leads to faster re-entrainment for all initial conditions. In both cases, the approach to finding the "optimal solution" is a brute force simulation method over the phase space. Here, we directly compute the optimal solution for high light intensity values as the strong stable manifold of the stable fixed point of the stroboscopic map defined by Eq. 11.
Our bifurcation analysis, as presented in Figure 7, shows the boundaries of the entrainment region in the three-parameter space consist of both fold and Neimark-Sacker bifurcations. In particular, Figure 7B suggest that loss of entrainment due to a Neimark-Sacker bifurcation in the (I, τ c )-plane occurs when the light intensity value is high and τ c is far from 24.2. In Figures 5, 6, we show that the type of bifurcation associated with lack of entrainment has important implications for the resulting dynamics. A τ c value close to the Neimark-Sacker bifurcation leads to toroidal dynamics in which the phase difference between the circadian oscillator and the external forcing is bounded, whereas a τ c value close to a fold leads to quasiperiodic dynamics in which this phase discrepancy is constantly slipping. We hypothesise that being close to a fold bifurcation would cause significantly different circadian rhythm disorders compared to being close to a Neimark-Sacker bifurcation. In particular, close to the Neimark-Sacker bifurcation, whilst the circadian rhythm is not entrained to the external environment, the phase difference between the two over successive days is constrained to be within a finite interval. Thus, we expect circadian disorders to be less severe than in the case of the fold bifurcation in which sequential phase differences between the circadian rhythm and the external environment span the entire circle.
Examining the relationships between parameters for light sensitivity G, light intensity scaling factor α 0 and I in Eq. 4, we observe that a low light intensity is equivalent to when individuals have a low sensitivity to light. We remark here that our BVP set up allows parameters in the model, other than the three presented, to be varied. We would expect that the results when varying G or α 0 would be similar to those we present for I. It is important to note that the jet lag strategies identified by [32] account for differences in an individual's intrinsic period (τ c ). Importantly, they show that personalisation to an individual's circadian clock improves the effectiveness of the scheduled recovery. Taken together, this suggests that taking into account the interplay between light intensity value (or light sensitivity) and intrinsic rhythm could further improve jet lag strategy development and develop personalised treatment plans for individuals with non-24 h sleep/wake disorder.
Our approach to the set-up of the continuation problem is to establish a multi-segment two-point boundary value problem in AUTO [34,35] to find and follow the periodic orbits of the twodimensional FJK system. This approach was facilitated by our choice, for simplicity, of a square wave function Eq. 6 for the light/dark forcing giving instantaneous transitions at dawn/ dusk. This multi-segment approach is similar in spirit to that taken in [36,37]. This approach can be readily modified to include, for example, more realistic light protocols, such as variations in the quality and intensity of light similar to those studies in the green unicellular alga Ostreococcus tauri [38,39]. Here we choose a two-state model that switches from complete darkness to full light, this could readily be extended in future studies to incorporate multiple light levels such as indoor and outdoor light regimes as well as darkness, as used in [40]. Including additional light levels as different "steps" would correspond to having additional segments in our multisegment BVP with similar matching conditions at the transition times. This multi-segment approach has limitations and an alternative approach would be to convert the 2D autonomous system into a 3D non-autonomous one for implementation in AUTO. This alternative approach would allow us to relax the condition on the light/dark forcing and use, for example, a sinusoidal signal reflecting a more gradual change, closer to the real light/dark cycle. Moreover, our choice of multi-segment encoding of the model means that the time shift parameter t s is not explicitly defined in the BVP, whereas the alternative approach allow t s to be explicitly specified during continuation runs. We note that to compute the manifolds for specific values of t s as displayed in Figures 10-12, we make use of the relationship defined in Eq. 12.
The framework we propose here can in principle be extended to the analysis of arbitrary perturbations by computing the invariant manifolds and periodic orbits that constitute organising structures of the system. In Figures 11, 12 we compare two such example perturbations in the context of shift work, the change from night to day shift and vice versa. This approach could be used to identify non-pharmacological strategies for shift workers thereby minimising the risk factors for a range of chronic diseases including cancer, metabolic syndrome and stroke [41]. Another interesting problem to consider is to use our approach to design "compromise" schedules for permanent night shift workers that avoid circadian misalignment during the work week yet also enable them to be awake during daylight hours on weekends thereby improving quality of life [42,43].
Our study centres around a two dimensional reduction of the FJK model. The reduction of the original system to a planar one facilitates the construction of the full invariant manifolds of the system, as depicted in Figure 10B. Such construction was achieved by first computing one dimensional manifolds of an appropriately chosen stroboscopic map and then by taking integrating these manifolds around the entire forcing cycle. Advances in numerical continuation algorithms, such as those included in the recent Matlab-based CoCo package [44], provide functionality to compute two-dimensional manifolds directly, so that our approach could then be used to compute manifolds for the original three-variable FJK model (though we remark that visualising manifolds of systems with more than two dimensions is difficult). Given the significant similarity between the original FJK model and our 2D variant, we expect that similar conclusions about the role of invariant manifolds in organising re-entrainment dynamics would be observed in the full FJK model.
In addition to the FJK model, there exist a number of other models that describe different aspects of circadian rhythms, such as variability in the expression of clock proteins [45][46][47], or describe the dynamics of the suprachiasmatic nucleus in a more physiological manner [48]. It remains an open question as to how our results might relate to such models. In this regard, it is worth noting that dynamics in general systems can be at least partially understood via analysis of their invariant sets and associated manifolds. As such, whilst the specific observations we make may not directly carry over to these different models, the general approach is likely to still be valid. Regarding our specific choice of system, we remark the original FJK model was constructed using empirical data from human participants [13,17]. We believe that this fact coupled with the focus on simple descriptions of core macroscopic variables makes it the ideal model for our study. One important macroscopic variable not included in the FJK model is that of sleep duration. Even in the absence of variation in circadian phase, the dynamics of the sleep/wake cycle are intricate [49]. Given the tight bidirectional coupling between circadian rhythms and sleep/wake cycles, incorporation of sleep as a macroscopic variable promises to be an interesting direction for future investigation [50,51].
It is well known that seasonality of day length affects the circadian rhythms of humans, animals, and plants [28,[52][53][54]. More recently, switching between different seasonal day lengths (such as travelling from winter to summer) has been studied by considering the phase response curves of a heuristic phaseamplitude model [55]. Our modelling framework presented here could readily be adapted to identify the organising structures, in particular, the invariant manifolds that organise re-entrainment after sudden seasonal switches. A further model extension, that to our knowledge has not been modelled before, is to incorporate forcing at multiple time scales the encompass both day length and seasonality. Additionally, on even longer timescales, there is evidence from evolutionary biology that human core body temperature is decreasing [56] and it is not clear what effect this will have on circadian rhythms.

CONCLUSION
In this paper, we study the loss of entrainment in a twodimensional reduction of the forced FJK model for human circadian rhythms. We use bifurcation theory to identify parameter regimes in which the circadian oscillator is unable to entrain to a 24 h cycle and identify the instabilities leading to this phenomenon under variation of key system parameters. For parameter regimes where entrainment is attainable, we show how re-entrainment times are organised by the invariant manifolds of the periodic orbits of the system. Finally, we study re-entrainment following phase shifts of the light/dark cycle and discuss these results in the context of shift work transitions.

CODE AVAILABILITY
AUTO, Python, CUDA, and Matlab code needed to reproduce all results in this manuscript may be downloaded via Git from https://github.com/kyle-wedgwood/EntrainmentTimesManifolds. For help with installing software or running code, please contact k.c.a.wedgwood@exeter.ac.uk.

DATA AVAILABILITY STATEMENT
Publicly available datasets were analyzed in this study. This data can be found here: https://github.com/kyle-wedgwood/ EntrainmentTimesManifolds.

AUTHOR CONTRIBUTIONS
JC, CD, and KW contributed to conception and design of the study. JC performed the continuation in AUTO. CD and KW performed simulations of entrainment times. JC, CD, and KW wrote sections of the manuscript. All authors contributed to manuscript revision, read, and approved the submitted version.

FUNDING STATEMENT
JC gratefully acknowledges funding from MRC Skills Development Fellowship MR/S019499/1. CD gratefully acknowledges the financial support of the US-UK Fulbright Commission, the EPSRC via grant EP/N014391/1, and the National Science Foundation via grant DMS 1555237. KW gratefully acknowledges the financial support of the EPSRC via grant EP/T017856/1 and from MRC via the Skills Development Fellowship MR/P01478X/1.