Solving the Babylonian Problem of quasiperiodic rotation rates

A trajectory $u_n := F^n(u_0), n = 0,1,2, \dots $ is quasiperiodic if the trajectory lies on and is dense in some $d$-dimensional torus, and there is a choice of coordinates on the torus $\mathbb{T}$ for which $F$ has the form $F(\theta) = \theta + \rho\bmod1$ for all $\theta\in\mathbb{T}$ and for some $\rho\in\mathbb{T}$. There is an ancient literature on computing three rotation rates $\rho$ for the Moon. %There is a literature on determining the coordinates of the vector $\rho$, called the rotation rates of $F$. (For $d>1$ we always interpret $\bmod1$ as being applied to each coordinate.) However, even in the case $d=1$ there has been no general method for computing $\rho$ given only the trajectory $u_n$, though there is a literature dealing with special cases. Here we present our Embedding Continuation Method for computing some components of $\rho$ from a trajectory. It is based on the Takens Embedding Theorem and the Birkhoff Ergodic Theorem. Rotation rates are often called"rotation numbers"and both refer to a rate of rotation of a circle. However, the coordinates of $\rho$ depend on the choice of coordinates of $\mathbb{T}$. We explore the various sets of possible rotation rates that $\rho$ can yield. We illustrate our ideas with examples in dimensions $d=1$ and $2$.


Introduction
The goal of this paper is to show how to compute a rotation rate of a quasiperiodic discrete-time trajectory. We begin with a motivating historical example, followed by a broad overview of our approach to determining rotation rates.
that are likely to be seen in a dynamical system are periodic orbits, chaotic orbits, and quasiperiodic orbits [2]. Starting with a d-dimensional quasiperiodic orbit on a torus T d for some d and a map φ : T d → S 1 , we establish a new method for computing rotation rates from a discrete-time quasiperiodic orbit. By discrete time, we mean that the trajectory observations are a discrete sequence φ n , n = 0, 1, 2, · · · , as for example when a Poincaré return map is used for the planar circular restricted three-body problem (CR3BP), and φ n is the angle of the image of the trajectory as measured from the perspective of some reference point at the n th time the trajectory crosses some specified Poincaré surface.
In the rest of this introduction, we give a non-technical summary of our results, ending with a comparison to previous work on this topic. We then proceed with a more technical parts of the paper, in which we describe our methods and results in detail and give numerical examples for which we compute rotation rates.
Quasiperiodicity defined. Let T d be a d-dimensional torus. A quasiperiodic orbit is an orbit that is dense on a d-dimensional torus and such that there exists a choice of coordinates θ ∈ T d := [0, 1] d mod 1 (where mod1 is applied to each coordinate) for the torus such that the dynamics on the orbit are given by the map θ n+1 := F (θ n ) = θ n + ρ mod 1 (1) for some rotation vector ρ ∈ T d where the coordinates ρ i of the ρ are irrational and rationally independent, i.e. if a k are rational numbers for k = 1, · · · , d for which a 1 ρ 1 + · · · + a d ρ d = 0, then a k = 0 for all k = 1, · · · , d. We will say such a rotation vector ρ is irrational.
The Babylonian Problem. One might imagine that our goal would be to compute ρ in Eq. 1 from whatever knowledge we could obtain about the torus T d . Although the Babylonians did not know about three-dimensional tori, they none the less obtained three meaningful rotation rates. To abstract their situation, we assume there is a smooth map ψ : T d → M where M is a manifold, usually of dimension 1 or 2. The Babylonian Problem is to compute a rotation rate ρ ψ from knowledge of the projection of a trajectory. We assume we only have the values ψ n of ψ at a sequence of times (though might have a continuous time series instead). We now describe the case where the manifold M is the circle S 1 .
See Eq. 9. For d = 1, Eq. 2 says ρ φ = a 1 ρ where a 1 is an integer. The integer a 1 depends on the choice of φ, so even when |a 1 | = 1 we can get ρ for one choice and −ρ for another choice.
We note that for every map φ of a torus to a circle, there are integers a j and a periodic function g : T d → R such that φ(θ) = g(θ) + a · θ mod 1.
Computing a rotation rate for this map can be difficult. In fact, after we define the rotation rate below, it will turn out that Eq. 3 will still be true, independent of g, but this formula will not be very helpful in determining ρ φ from the image of a trajectory, φ(θ n ).
Changes of variables. Defineθ := Aθ where A is a unimodular transformation, that is, an invertible d × d matrix with integer coefficients. In these coordinates, Eq. 1 becomes θ n+1 =θ n + Aρ mod 1.
Note that ρ is irrational if and only if Aρ is so that concept is well defined. However, as we discuss in Section 2.2, for a given irrational ρ the set of Aρ for all such matrices A is dense in T d . If for example we wanted to know the vector ρ with 30-digit precision, every 30-digit vectors in T d would be valid approximations for an appropriate choice of coordinate matrix A.
We assume throughout this paper each continuous function such as those denoted by F, φ, γ, and ψ, and each manifold is smooth, by which we mean infinitely differentiable (denoted C ∞ ). This assures rapid convergence of our numerical methods.
Defining ∆ and its lift∆ for a projection φ : T d → S 1 to a circle. Rotation rates are key characteristics of any quasiperiodic trajectory. Suppose there exists a continuous map φ : T d → S 1 from the dynamical system to a circle, but we only know the image φ n := φ(nρ) sequence of a trajectory F (θ n ) = θ n+1 = θ n + ρ mod 1 on a torus. Define We say∆ is a lift of ∆ : Motivated by Eq. 6, we define∆ (θ) := a · ρ + g(θ + ρ) − g(θ).
Then (i),(ii), and (iii) are satisfied so∆ is a lift of ∆.
Proposition 1.1 Assume θ n is quasiperiodic. There is a well-defined rotation rate ρ φ , and using the notation of Eq. 4, The existence of the limit is guaranteed by the Birkhoff Ergodic Theorem (See Theorem 1.2), which says that the limit in Eq. 8 is since T d dθ = 1 and the two integrals in Eq. 10 are equal. Hence ρ φ = a · ρ mod 1. Different choices of the lift∆ can change ρ φ by an integer, so ρ φ mod 1 is independent of the choice of lift∆. The rotation rate is this ρ φ mod 1.
The limit in Eq. 8 exists and is the same for all initial θ 0 .
A caveat. We note however, that in practice we do not know a · ρ so in practice we need to determine numerically what∆ is and we must numerically evaluate the limit.
Throughout this paper we consider T d to be [0, 1] d mod 1, where each copy of [0, 1] is the fraction of revolution around a circle. Furthermore θ ∈ T d can be treated as a set of d real numbers in [0, 1). This will enable us to write x ∈ R unambiguously as where k is an integer.
There are cases where it is easy to compute the rotation rate ρ φ . If the angle always makes small positive increases, we can convert φ n+1 − φ n mod 1 into a small real positive number in [0, 1), and we can think of ∆ n = φ n+1 − φ n as numbers in (0, α), where 0 < α < 1. The limit of the average of ∆ n is the rotation rate. The average of two or more angles in S 1 is not well defined. Hence we must average real numbers, not angles, and making that transition can be difficult.
Numerical determination of a lift∆. The essential problem in computing ρ φ is the determination of a lift∆ for φ. Given a lift, we can compute ρ φ using Eq. 8. While we know the fractional part of∆ is ∆ ∈ [0, 1), as we will explain later, we must choose the integer part k n of each∆ n so that all of the points (θ n ,∆ n ) := (θ n , k n + ∆ n ) lie on a connected curve in S 1 × R (for d = 1) or a connected surface in in T d × R (for d > 1). We must choose these integer parts despite the fact that we do not know which θ n corresponds to ∆ n .
Even in that case d = 1 there has been no general method for computing the lift in order to find ρ φ , though there is a literature dealing with special cases. See for example [3,4,5]. We have established a general method for determining the lift∆, as summarized in the Figs. 1-5. Our method is based on the Theorem 1.3, a version of the Embedding Theorems of Whitney and Takens, described in detail in Section 2.
Defining φ from a planar projection γ. Assume that we are given a planar projection γ : T d → R 2 and the images γ(θ n ). Fix a reference point P ∈ R 2 that is not in the image γ(T d ). Let R 2 be the complex plane C, so that we can define φ(θ) ∈ [0, 1) mod 1 = S 1 by The winding number around P is where φ = dφ dt . Note that W (P ) is an integral over the circle so it does not depend on θ. The value of W is piecewise constant and integer-valued. In our examples, it is critical that the projection of our quasiperiodic trajectory into R 2 is such that there exists a point P in R 2 with |W (P )| = 1. That is because the measured rotation rate will be higher by a factor of |W (P )|. For degenerate cases, there may be no point for which |W (P )| = 1, as shown in the next paragraph.
A non-generic map γ. Consider the map given by γ(z) = z 2 where z ∈ C. The map γ maps the unit circle onto the unit circle and for any value of P ∈ C, W (P ) = 0 if the reference point P is outside that circle, and W (P ) = 2 if inside, and W (P ) is not defined if P is on the unit circle. Thus there is no point P such that W (P ) = 1.
Two illustrative examples of complicated images of a quasiperiodic process. Figure 1 shows the projections maps γ : S 1 → R 2 , showing how the winding number differs in different connected components of the figure. On the left panel, every point inside the interior connected region that contains P 1 can act as a reference point for measuring angles and yields the same value of ρ φ . If the map is Figure 1: The fish map (left) and flower map (right). The function γ : S 1 → R 2 for each panel is respectively Eq. 22 and Eq. 23 and the image plotted is γ(S 1 ). These are images of quasiperiodic curves with self-intersections, and we want to compute the rotation rate only from knowledge of a trajectory γ n ∈ R 2 . The curves winds j times around points P j , so P 1 is a correct choice of reference point from which angles can be measured to compute a rotation rate. If instead we choose j = 1, then the measured rotation rate will be j times as big as for j = 1. In both cases, P 1 is the reference point. P 1 = (8.25, 4.4) and (0.5, 1.5) for the fish map and flower map, respectively. The angle marked ∆ n ∈ [0, 1) measured from point P 1 is the angle between trajectory points γ n and γ n+1 .  Fig. 1, we had only one coordinate of γ, for example, the real component, Re γ. Knowing only one coordinate would seem to be a huge handicap to measuring a rotation rate. But it is not. In the spirit of Takens's idea of delay coordinate embeddings explained in detail later, we plot (Re γ n , Re γ n−1 ) and choose a point P 1 as before, and the map is now two dimensional. The rotation rate can be computed as before. The rotation rate ρ φ here using P 1 is the same as for Fig. 1 right. sufficiently simple, (i.e., the nonlinearity g in Eq. 4 is sufficiently small), the rotation rate can immediately be computed as the average of these angle differences. However, if the map γ is more complicated, measurement of angle is compounded by overlap of lifts of the angle between two iterates, since they can be represented by multiple values (values differing by an integer).
Projections to R. Sometimes we are only provided with a scalar-valued function γ : T d → R, and yet we can still construct a two-dimensional map and use the methods described for R 2 projections. For example, Fig. 2 shows how we can recover a planar map from only the first component Re γ n of the flower map by considering planar points (Re γ n−1 , Re γ n ). This map still gives same rotation rate as obtained by using the map in Fig. 1.
A similar example occurs with the Moon. The mean time between lunar apogees is 27.53 days, slightly longer than the 27.3-day sidereal month. Suppose we measure the distance D n between the centers of the Earth and Moon once each sidereal month, n = 0, 1, 2, · · · . Then the sequence D n has an oscillation period of 8.85 years and can be measured using our approach by plotting D n−1 against D n , and the point (D n−1 , D n ) oscillates around a point P = (D av , D av ), where D av is the average of the values D n . Small changes in P have no effect on the rotation rate.
Yet another case arises from The Moon's orbit being tilted about 5 degrees from the Earth-Sun plane.
The line of intersection where the Moon's orbit crosses the Earth-Sun plane precesses with a period of 18.6 years. The plane of the ecliptic is a path in the distant stars through which the planets travel. Measuring the Moon's angular distance from this plane once each sidereal month gives scalar time series with that period of 18.6 years. This example can be handled like the apogee example above.
As a last example, see also our treatment of the circular planar restricted three body problem in Section 4.2 where we compute two rotation rates of the lunar orbit, the first by plotting the rotation rate around a central point and the second by plotting (r, dr/dt), deriving the rotation rate from a single variable r(t), the distance from a central point, where t is time.
The Birkhoff Ergodic Theorem. This theorem assumes there is an invariant set, which in our case is the set T d . Since we are interested here only in quasiperiodic dynamics, we can assume the dynamics are given by Eq. 1 where ρ is irrational. Lebesgue measure is invariant; that is, each measurable set E has the same measure as F (E) = E + ρ and as F −1 (E) = E − ρ. This map is "ergodic" because if E is a set for which E = F (E) = E + ρ, then the measure of E is either 0 or 1.
The measure µ enables the computation of the space-average T d f dµ for any L 1 function f : T d → R when a time series is the only information available. Since µ is Lebesgue measure, we can rewrite that integral as T d f (θ)dθ. We note that the Lebesgue measure of the entire torus is 1, so Lebesgue measure is a probability measure. Hence T d dθ = 1. For a map F : T d → T d , the Birkhoff average of a function f : T d → R along the trajectory Theorem 1.2 (Quasiperiodic case of the Birkhoff Ergodic Theorem [6]) Let F : exists and equals f dµ.
The Weighted Birkhoff Averaging method (WB N ). We have recently developed a method for speeding up the convergence of the Birkhoff sum in Theorem 1.2 through introducing a C ∞ weighting function by orders of magnitude when the process is quasiperiodic and the function f is C ∞ , a method we describe in [7,8,9]. In [9] it is proved that the limit of using WB [p] N is the same as Birkhoff's limit. Weighted Birkhoff (WB where the C ∞ weighting function w is chosen as In our calculations of the rotation rates, we use p = 1 or 2. See in particular [7] for details and a discussion of how the method relates to other approaches. Note that essentially the same weight function as for p = 1 case is discussed by Laskar [10] in the Remark 2 of the Annex, but he does not implement it.
Delay Coordinate Embeddings. For manifolds M 1 and M 2 , a map h : In particular the map must be one-to-one.
K is referred to as the delay number and is more precisely the number of coordinates used in defining Θ.
See Discussion, Section 5. In the theorem below, if K = 1, we have a Whitney-type embedding theorem, or if D = 1, a Takens-like result.
In order to include both of the projection maps φ : T d → S 1 and γ : T d → R 2 , we introduce the more Hence φ or γ can be substituted for ψ with D = 1 or 2, respectively.
Then for almost every C 2 function ψ : While this result gives a lower bound on the delay number K, it is often convenient to choose K much larger than required.
where∆ is given in Eq. 7. See Fig. 5. The following corollary follows immediately from Theorem 1.3.
Theorem 2.1 explains how this result is used when we have the image of a trajectory such as (γ(θ n )) N −1 n=0 -when N is sufficiently large.
Comparison to previous work. We have written previously about computation of rotation rate in the papers [7,8,9]. A complete streamlined method for the case d = 1 is provided in Section 2; the Embedding continuation method is announced in [8], but this is the first paper in which it is explained.
In addition, this paper is the first time that we have applied our methods to cases where d > 1. While we used the example (CR3BP) in [7], there we used a Poincaré return map whereas here in Section 4.2 no return map is used. We discuss the connections to our work with [3,4,5] in the subsequent sections of the paper. Those papers do investigate the Babylonian Problem, starting with only a set of iterates for a single finite length forward trajectory with the goal of finding a rotation number for some projection of a torus. Here we plot (φ n , ∆ n + k) for every n ∈ N and all integers k, where ∆ n = φ n+1 − φ n mod 1. In the left panel (the fish map, the easy case) the closure of the figure resolves into disjoint sets (which are curves ⊂ R × S 1 ), while on the right (the flower map, the hard case) they do not. Hence if we choose a point plotted on the left panel, it lies on a unique connected curve that we can designate as C ⊂ S 1 × R. We can choose any such curve to definê ∆ n , namely we define∆ n = ∆ n + k where k is the unique integer for which (φ n , ∆ n + k) ∈ C. A better method is needed to separate the set in the right panel into disjoint curves -and that is our embedding method. Figure 4: A lift of the angle difference for the fish and for the flower maps. This is similar to Fig. 3 except that the horizontal axis is θ instead of φ. That is, we take θ n to be nρ and ∆(θ) = φ(θ + ρ) − φ(θ) mod 1 ∈ [0, 1) and we plot (θ n , ∆ n + k) for all integers k (where again ∆ n = ∆(nρ)), These are points on the set G = {(θ, ∆(θ) + k) : θ ∈ S 1 , k ∈ Z}. This set G consists of a countable set of disjoint compact connected sets, "connected components", each of which is a vertical translate by an integer of every other component. For each θ ∈ S 1 and k ∈ Z there is exactly one point y ∈ [k, k + 1) for which θ, y) ∈ G. Each connected component of G is an acceptable candidate for∆. Unlike the plots in Fig. 3, G always splits into disjoint curves. Unfortunately the available data, the sequence (φ n ) only lets us make plots like Fig. 3. But the Takens Embedding method allows us to plot something like G and determine the lift in the next figure.
In particular the map is one-to-one. The smooth (oval) curve is the set (Θ(T d ), 0). As in our previous graphs, the vertical axis shows the angle difference ∆(θ) Fig. 3 but like Fig. 4, U always splits into bounded, connected component manifolds that are disjoint from each other. Hence U, which is also the closure of the set {(Θ(θ n ), ∆ n + k) : k ∈ Z, n = 0, · · · , ∞}, separates into disjoint components each of which is a lift of ∆ and each of which is homeomorphic to T d . For each integer k the set {(Θ(θ), ∆(θ) + k) : θ ∈ T d } is a component as shown in this figure. See Theorem 2.1.
The investigation of quasiperiodic orbits is considered in [12,13,14,15]. The approach in these papers assumes access to the full form of the original defining equations. Those papers are not investigating the Babylonian Problem.
Our paper proceeds as follows. We give a detailed description of our Embedding continuation method and an algorithm to implement it, in Section 2. Theorem 2.1 gives a proof of convergence of our method. In Section 3, we illustrate our methods using two one-dimensional examples (d = 1). We refer to these as the fish map (introduced by Luque and Villanueva [5]) and the flower map, based on the shapes of the graphs. In Section 4 we give two-dimensional (d = 2) examples of maps for which we explore the difficulty of determining their rotation rates about a reference point. We end in Section 5 with a discussion.
We have established that there is a lift∆ of ∆ and that Θ and Γ 0 := Γ are embeddings of T d for almost every ψ. We will assume in this section that ψ has been chosen so that Θ and Γ 0 are embeddings.
If we are given the image of a trajectory, either φ(θ n ) or γ(θ n ), we do not yet know what the correspond-ing∆ n is. In this section, we describe how we find the lift of a map using our Embedding continuation method. A schematic of these ideas is depicted in Fig. 5.
The key fact is that from its definition,∆(θ) is continuous and since it is defined on a compact set it is uniformly continuous. We describe in Steps 1 and 2 below how to choose the integer part of∆(θ n ) consistently, that is, so that∆(θ n ) is continuous on S 1 . They collectively constitute our Embedding continuation method.
Step 1. The embedding. Let N be given; in practice we usually use N ∼ 10 5 or 10 6 if d = 1.
Choose the delay number K so that 2d + 1 ≤ KD. Recall that ψ is either γ or ψ in our applications.
Since ψ(θ) ∈ M 0 , we have Θ(θ) ∈ M K 0 . By our version of the Takens Embedding Theorems, Theorem 1.3, if 2d + 1 ≤ KD, then for almost every smooth function φ, the map Θ is an embedding. In particular, there are no self intersections i.e., if Θ(θ 1 ) = Θ(θ 2 ), then θ 1 = θ 2 . That implies Γ defined by Eq. 17 is also an embedding of T d . We point out above that having an embedding guarantees that there are no self intersections, but there can be points far apart whose images are close to each other, and we try to avoid that by choosing K large.
The minimum distance between components of U. For each j ∈ Z, define Γ j (θ) = (Θ(θ),∆(θ) + j), Then U is the union of all Γ j . These sets are "vertical" translates of Γ(T d ) by an integer j, i.e. translates in the second coordinate. These are all disjoint from each other (since Θ(T d ) is assumed to be an embedding). See Fig. 5 for an illustration. Define where · is the Euclidean norm on R 2K+1 .
Then > 0 and is the minimum distance between points on different components of U. In general is hard to compute from just the time series ψ n := ψ(θ n ), so we have to fix a threshold δ > 0, assuming that δ < . Then if p 1 , p 2 ∈ U and p 1 − p 2 < δ, it follows that p 1 and p 2 are in the same component of

U.
The choice of the delay number K. It is important to note that this separation distance depends on the choice of K and we observe that increasing K increases , so that while Theorem 1.3 guarantees we have an embedding and therefore > 0, this may be small. That might make it necessary to have a very large N , so instead we choose K much larger than the theorem requires. value. This set A changes as the calculation proceeds. Initially m n is assigned only for n = 0 so at this point in the calculation the set A contains only 0. Each time we assign a value to some m n , that subscript n becomes an element of A. If there is an n 1 ∈ A and an n 2 / ∈ A and an integer k such that then the two points are in the same component and we assign m n 2 = k, which adds one element, n 2 to the set A. In the following theorem, we want δ < where is in Eq. 18.
Theorem 2.1 For a d-quasiperiodic map assume Θ is an embedding. Given a map ψ, for δ sufficiently small, for all sufficiently large N (depending on δ), the above value ρ N ψ is well defined (since all m n are defined), and 2.1 Continuation algorithm: long chains of little steps on T d .
To determine all∆(θ n ) for all n ∈ {0, · · · , n N −1 }, we begin knowing only∆(θ 0 ). Knowledge of∆ can spread like an infection, transmitted between nearby θ n . The epidemic is spread only in little steps. The goal is to describe a continuation algorithm that identifies chains of n j 's starting from n j = 0 and can reach every n j ∈ {0, · · · , n N −1 }.
To define "little step" we need a metric. Let d(·, ·) be a metric on T d which is translation invariant, According to Theorem 1.3, Θ is almost always an embedding of the (rigid-rotation) torus into a higher dimensional space, so we can reasonably assume the following hypothesis. In this section we will assume is given by Eq. 18. Then (Θ,∆)(T d ) is a smooth graph over Θ(T d ).
Hence if two points θ 1 and θ 2 in the are sufficiently close to each other, their images in (Θ,∆)(T d ) will be less δ apart. That is given δ there is a δ 1 > 0 such that (d(θ n 1 , θ n 2 ) < δ 1 ) implies Ineq. 19 will be satisfied.
Hence, if m n 1 has been assigned, and m n 2 has not, then we will now be able to assign it a value.
We say (n 0 , n 1 , · · · , n k ) is an N -δ 1 -chain from θ n 0 to θ n k if n j ∈ {0, · · · , N −1} for all j ∈ {0, . . . , k −1} and d(θ n j , θ n j+1 ) < δ 1 for all j ∈ {0, · · · , k − 2}. The following corollary interprets this proposition in terms of lifts and its proof is immediate. To sketch a proof of the Proposition, we need the following fact. It is an elementary fact whose proof we leave to the reader. Figure 6: Rigid rotation on the torus. x n = n √ 3 (mod1), y n = n √ 5 (mod1) for n = 0, · · · , N − 1 are plotted with the origin indicated by 0 at the center on the panel. Each point θ n = (x n , y n ) is labeled with its subscript n. Here N = 100 (left) and = 20, 000 (right). Only the neighborhood of the origin is shown for the right panel. In the left panel, θ 4 and θ 93 (i) are near the origin and (ii) their subscripts are relatively prime and (iii) the total of the subscripts is less than N . On the right points with subscripts 4109 and 11, 700 play the corresponding role. In each case it follows that there is a chain of points starting from 0 and ending at any desired θ m where 0 < m < N . This chain is a series of steps, each achieved by either adding one of the two subscripts or subtracting the other. See Prop. 2.2 and the algorithm sketched in its proof. In the left panel such a chain -adding 93 or subtracting 4 at each step -is shown that ends at θ 90 .
Given δ 1 > 0, there exists an N with the following property.
H 2 . There exist integers 0 < σ 1 < σ 2 < · · · < σ P for some integer P > 1 that (i) the σ j are relatively prime (i.e., the greatest common factor of all σ j is 1) and (ii) θ σ j are within δ 1 of θ 0 . Furthermore, It is always possible to choose N sufficiently large that P = 2 in H 2 ; however, we might not want to choose such a large N , and we might be satisfied with having P > 2. Proof of Proposition 2.2. We now describe why each θ n can be reached by a chain starting from θ 0 .
We assume that for the given δ 1 , the N and σ j have been chosen so that (i) and (ii) in H 2 are satisfied.
For non-negative integers a 1 , a 2 , write Suppose a 1 and a 2 are such that Since 0 ≤ σ 1 + σ 2 < N , we can either increase a 1 or a 2 by 1 (thereby decreasing a 2 σ 2 − a 1 σ 1 by σ 1 or increasing it by σ 2 , respectively) and still have Condition 20 satisfied. The key step of the proof is the following.
Algorithm. We choose a chain, a finite sequence (θ j ) of such points, each of the form [[a 1 , a 2 ]] as follows. Our algorithm begins at θ 0 with a 1 = a 2 = 0.
A 1 . Increase a 2 by 1 provided the subscript remains non negative; otherwise increase a 1 by 1. Repeat the process. Eventually the subscript returns to 0 (with a 1 = σ 2 and a 2 = σ 1 . We have thereby created a chain of points on the torus, but we most likely have not encountered all the θ j . Next, for each point in that chain, increase a 2 by 1, and repeat as long as Condition 20 satisfied. This process yields θ n for every n ∈ {0, · · · , N − 1}.
If P = 2, we are done. When P > 2, the greatest common factor, denoted Ψ 2 , of σ 1 and σ 2 is greater than 1. Then the above procedure reaches all points with subscripts divisible by Ψ 2 and no others. The next step is essentially the same as A 2 except that steps are taken by adding σ 3 to the subscript; that is, A 3 . Repeatedly add σ 3 to the subscript, as long as it remains less than N .
Taking all of those points and taking a small step for each by adding or subtracting σ 3 repeatedly will reach all points whose subscript is divisible by Ψ 3 := the greatest common divisor of σ 1 , σ 2 , and σ 3 .
A j . For each point that has been found so far, repeatedly add σ j to the subscript as long as it remains less than N .
Eventually all θ n for 0 < n < N will be reached.

A dense set of equivalent representations for each rotation vector
While the definition of quasiperiodicity requires that the map has some coordinate system that turns the map into Eq. 1, that requirement by itself does not determine the coordinates of ρ. Fixing a coordinate system allows us to write ρ = (ρ 1 , · · · , ρ d ) We have defined ρ in Eq. 1 in terms of a given coordinate system. Letθ = Aθ whereθ ∈ T d and A is a unimodular transformation, that is an integer-entried matrix with determinant |detA| = 1, then in this new coordinate system Eq. 1 becomes θ →θ + Aρ mod 1 (21) which is essentially Eq. 5. Hence Aρ is also a rotation vector for the same torus map. translates (translates in the direction (0, 1)) of (ρ 1 , ρ 2 ) mod 1, where {y k } is a dense set in S 1 . When we similarly apply B m for all m to each (ρ 1 , y k ) we obtain a dense set of horizontal translates of (ρ 1 , y k ) and thereby obtain a dense set in T 2 . Every coordinate of every point in that dense set is of the form k 1 ρ 1 + k 2 ρ 2 mod 1 where k 1 and k 2 are integers.
In this section, we give a detailed explanation of how we compute rotation rates for quasiperiodic maps on one-dimensional tori. For the first example computation of the rotation number is easy and straight forward while in the second it is sufficiently hard that we need our method. The pair of examples makes it clear when our method should be used.
One advantage of the examples below is that we know ρ and therefore we can compare it with the computed rotation rates.
Example 1. The fish map. Luque and Villanueva [5] addressed the case of a quasiperiodic planar curve γ : S 1 → C and introduced what we call the fish map, depicted in the left panel of Fig. 1. Let (See Fig. 5 and Eq. 31 in [5]). They chose the rotation rate ρ = ( √ 5 − 1)/2 ≈ 0.618 for the trajectory γ n = γ(nρ) for n = 0, 1, · · · so we also use that ρ. The method in [5] requires a step of unfolding γ, which our method bypasses. We measure angles with respect to P 1 = 8.25 + 4.4i, where the winding number Example 2. The flower map. We have created an example, the flower map in Fig. 1, right, to be more challenging than the fish. Let We use the same ρ = ( √ 5 − 1)/2 as above. The choice of a reference point P 1 for which |W (P 1 )| = 1 is shown in the right panel of Fig. 1. For our computations, we use P = P 1 := 0.5 + 1.5i. Points P j with |W (P j )| = j for j = 1, 2, 3, 6 are also shown. For ρ γ 6 , the rotation rate of γ 6 , to yield ρ or 1 − ρ mod 1 is essential to choose a point P where |W (P )| = 1. In this example the values of ∆ n are dense in S 1 , and For both examples, Fig. 1 shows two successive iterates γ n and γ n+1 , and the angle ∆ n between these two iterates, computed with respect to a reference point P 1 . It was computed by finding φ n , the angle of γ n with respect to P 1 as in Eq. 12. Using this, ∆ n = φ n+1 − φ n ∈ [0, 1) ≈ S 1 . On the left, in the fish map case, if we choose∆ 0 := ∆ 0 (or alternatively := ∆ 0 + m for some m), then we have selected the component in which all∆ n must lie. This is what is referred to below as the easy case. Choose some k, write J k := [a, b]. Choose m n is the integer for which ∆ n + m n ∈ J k . It is not as easy to do this for the flower map on the right. Fig. 3 right shows that the possible lifts when plotted against φ form a tangled mess which does not resolve into bounded components, while when plotted against θ we obtain components that are diffeomorphic to S 1 .
Figs. 3 and 4 show the possible lift values∆ n of the angle difference ∆ n plotted with respect to angle θ in Fig. 3 and φ in Fig. 4. For the fish map on the left, we see that we can set [a, b] ≈ [0.18 + k, 1.05 + k] for any integer k. Furthermore, we investigated the rotation rate of the signal viewed from P 1 = 7 + 4i.
Using the Weighted Birkhoff Average, we observe that the deviations of the approximate rotation from ρ falls below 10 −30 when the iteration number exceeds N = 20, 000, and since we know the actual rotation rate, we can report that the error in the rotation rate is then below 10 −30 . Once we have found a proper lift for the flower map, we can do the same procedure. The next section explains how we go about finding a lift in this more complicated case.

Higher-dimensional quasiperiodic examples
We develop a higher-dimensional method to compute the rotation vector ρ purely from knowledge of the sequence θ n+1 := F (θ n ). The question of how to compute the rotation vector is actually two questions. We use the fish and flower maps from the previous section in order to create 2-dimensional torus maps.
We will explore the problem of computing rotation rates for these examples where we know the rotation rates for the quasiperiodic maps. Let ρ := ( √ 5 − 1)/2 and φ := √ 3/2, and define (θ n , y n ) := (nρ mod 1, nφ mod 1) ∈ T 2 Let γ be either the fish or the flower map defined in the previous section. Define the torus-version f T of the γ map(s) as follows. Let Re(·) and Im(·) denote the real and imaginary components of a complex     Fig. 8.
The "+2" is just for convenience so that the torus image can wrap around the origin rather than having to wrap it around some other point. For each γ, the map f T takes a quasiperiodic trajectory into R 3 .
Two projections of a torus for two rotation rates. For a second rotation rate, let R α be the rotation matrix that tilts by angle α = 0.05π in the f 2 − f 3 plane. Namely Define r = h 2 1 + h 2 2 . Then our projection is to the value (r, f 3 ). We measure the angle of this projection relative to the point (8.25, 4.4) for the fish torus, and (2.6, 1.4) for the flower torus. For both maps, this projection gives rotation rates of 1 − φ/(2π) and 1 − ρ. Why the tilt by 0.05π rather than use value of r with respect to the original coordinates? Because without the tilt (i.e. α = 0), the projection would be a curve rather than a thick strip, which would not give a true test of our Embedding continuation method in two dimensions.
In both cases, we get a map whose image has at least one hole (in which the winding number = ±1), and we can measure angles φ and angle differences ∆ compared to a point inside one of the holes, as long as the torus has a winding number |W (p)| = 1 with respect to points in this hole. Thus just as for the one-dimensional case, we compute the lift, and then compute the rotation rate for these two different projections. Note that fish torus lift is easy to compute while the flower torus requires and embedding.
As mentioned in Section 1, rather than using Birkhoff Averages, we achieve more rapid convergence us-ing our Weighted Birkhoff Average, denoted WB [p] N in Eq.14. Define the ρ approximation ρ N := WB [1] N (∆ n ), when p = 1. Fluctuations in ρ N fall below 10 −30 for N > 20, 000. Since we know the actual rotation rate, we can report that the error |ρ − ρ N | is then below 10 −30 .

The circular planar restricted three-body problem (CR3BP)
CR3BP is an idealized model of the motion of a planet, a moon, and an asteroid governed by Newtonian mechanics Poincaré [17,18] introduced his method of return maps using this model. In particular, we consider a circular planar three-body problem consisting of two massive bodies ("planet" and a large "moon") moving in circles about their center of mass and a third body ("asteroid") whose mass is infinitesimal, having no effect on the dynamics of the other two.
This model can also (simplistically) represent the Sun-Earth-Moon system discussed in the introduction though the parameter µ has to be changed, and the Moon is the body that is assumed to have negligible mass. All three travel in a plane.
We assume that the moon has mass µ and the planet mass is 1−µ where µ = 0.1, and writing equations in rotating coordinates around the center of mass. Thus the planet remains fixed at (q 1 , p 1 ) = (−0.1, 0), and the moon is fixed at (q 2 , p 2 ) = (0.9, 0). In these coordinates, the satellite's location and velocity are given by the generalized position vector (q 1 , q 2 ) and generalized velocity vector (p 1 , p 2 ).
Define the distance of the asteroid from the moon and planet are The following function H is a Hamiltonian (see [19] p.59 Eqs. 63-66) for this system where p 1 =q 1 − q 2 and p 2 =q 2 + q 1 . We get the equations of motion from Figure 11: Two views of a two-dimensional quasiperiodic trajectory for the restricted three-body problem described in Section 4.2. Figure 12: Plots of the circular planar restricted three-body problem in r − r coordinates. As described in the text, we define r = (q 1 + 0.1) 2 + q 2 2 and r = dr/dt. This figure shows r versus r for a single trajectory. The right figure is the enlargement of the left. One of the two rotation rates ρ * φ is calculated by measuring from (r, r ) = (0.15, 0) in these coordinates.
That is, the equations of motion are as follows: Figure 13: Convergence to the rotation rates for the CR3BP. For these two figures, we used differential equation time step dt = 0.00002 and we compute the change in angle after 50 such steps, that is, in time "output time" Dt = 0.001. We show the convergence rates to the estimated rate of 0.001 × ρ * θ (left) and of 0.001 × ρ * φ (right). For both cases rotation rates are calculated using the Weighted Birkhoff averaging method WB [2] N in Eq.14 and show fast convergence.
We measure angles as a fraction of a full rotation and not in terms of radians. The asteroid's orbit in rotating coordinates is shown in Fig. 11. Here time is continuous so we can measure the total angle through which a trajectory travels, retaining the integer part. The first rotation rate ρ * θ of the asteroid's orbit is its average rate of rotation about the planet, that is, the average rate of change of the angle θ measured from (q 1 , q 2 ) = (−0.1, 0). We compute that ρ * θ = −2.497823504839344460408394 rev/sec, that is, about -2.5 θ-revolutions per unit time Fig. 13 (left) shows the error in convergence to the value 0.001ρ * θ Note that the rotation rate in the fixed coordinate frame is ρ * θ + 1/(2π). The second rotation rate ρ * φ measures the oscillation in the distance r from the planet. In particular, we project to the (r, r ) plane, where r := dr/dt. That is, define r = (q 1 + 0.1) 2 + q 2 2 and r = dr dt = ((q 1 + 0.1) dq 1 dt + q 2 dq 2 dt )/r, as shown in Fig. 12. The angle φ is measured from (r, r ) = (0.15, 0). The fast convergence to the value 0.001ρ * φ by the Weighted Birkhoff Average WB [2] N in 14 is seen in Fig. 13 (right), where ρ * φ = −2.3380583953388194764236520190142509 rev/sec. The period of time between perigees is the reciprocal, or about 0.43 time units.
We used the 8th-order Runge-Kutta method in Butcher [20] to compute trajectories of CR3BP with time steps of h = 2 × 10 −5 .
The meaning of rotation rates for the CR3BP. In [7], we investigated the same asteroid orbit of the CR3BP as is studied here, but instead of the continuous-time trajectory that lies on a two-dimensional torus as presented above, there we used a Poincaré map. The coordinates of the asteroid were recorded each time the asteroid crossed the line q 2 = 0 with dq 2 /dt > 0. In the cases we study, the map tra-jectory is a quasiperiodic trajectory on a closed curve. Hence there is only one rotation rate, a much simpler situation. Choosing a point inside the closed curve, we computed a rotation rate, namely the average angular rotation per iteration of the Poincaré map. The rotation rate ρ * P per Poincaré map on the Poincaré surface q 2 = 0 (or equivalently, θ = 0) around (q 1 , p 1 ) = (−0.25, 0) was computed as 0.0639617287574530971640777244014426955. We felt that the issues of rotation rates could be clarified if we computed the trajectory as a continuous orbit as we do here. The two rotation rates computed here ρ * φ and ρ * θ and our previous result ρ * P bear the following relation to our previous results: See the caption of Fig. 13. We solved the differential equation using an 8 th -order Runge-Kutta method using quadruple precision. Both approaches are based on rotating coordinates, but there is another approach.
The orbit as a slowly rotating ellipse. The asteroid rotates about the planet at a rate of ρ * θ revolutions per unit time when viewed in the rotating coordinate in which the moon and planet are fixed.
The sidereal rotation rate (as viewed in the coordinates of the fixed stars) is ρ * θ + 1/(2π). We can think of the orbit as an approximate ellipse whose major axis rotates and even changes eccentricity (being more eccentric when the asteroid apogee is aligned with the planet moon axis).
Without the moon the asteroid orbit would be perfectly elliptical with its major axis fixed in position, but the moon causes the ellipse to rotate slowly. The angle φ(t) tells where the asteroid is on its roughly elliptical orbit; Fig. 12 shows that the apogee occurs when when the distance from the planet r ∼ 0.27 and the perigee when r ∼ 0.05, with some variation. The time between successive perigees averages 1/ρ * φ . Note that the difference in these rates satisfies Hence relative to the fixed stars, that is, in non-rotating coordinates, the asteroid's ellipse's major axis precesses slowly. Its apogee point returns to its original position (in non-rotating coordinates) after the asteroid passes through its apogee approximately 1639 times.

Discussion and conclusions
What does it mean to ask for one or more rotation rates of the d-dimensional quasiperiodic map Eq. 1?
One might expect that one should find ρ or rather its coordinates. As we explain below and in Section 2.2, this is an ill-posed problem (especially for d > 1. The Babylonians computed rotation rates for projections of the Moon's trajectory onto the globe of fixed stars (as we have discussed in the Introduction). So we refer to their approach as the "Babylonian Problem": computing rotation rates for a projection of a quasiperiodic process.
We have developed our Embedding continuation method for calculating the rotation rate for "almost every" Babylonian Problem, that is, for smooth projection ψ from of a quasiperiodic dynamical system on T d . "Almost every" is in the sense of prevalence -and in practice there will be difficult cases especially since the number N of interates needed increases as d increases. Our Weighted Birkhoff Method of computing rotation numbers significantly shortens the computation time for computing rotation numbers, making our approach effective in practice. See the Introduction.
A key motivating difference between d = 1 and d > 1 is that in the higher-dimensional case, for the rotation vector ρ ∈ T d there are infinitely many ways of choosing coordinates on T d for the map Eq. 1.
In Section 2.2 we show that the set of resulting coordinate representations (ρ 1 , · · · , ρ d ) of ρ are dense in T d . Every point r in T d is arbitrarily close to such representations. Hence instead of trying to find the coordinates of ρ, we have learned from the Babylonians, and we phrase our goals in terms of finding a rotation number ρ ψ (usually, ρ φ or ρ γ ) for some projection from T d into a one or two-dimensional space.
Even for d = 1, there is some uncertainty for obtaining ρ depending on the choice of orientation on S 1 .
In Section 4.2, we apply our method to the quasiperiodic torus occurring for a 4-dimensional circular restricted 3-body problem, depicted in Fig. 11. In particular, we explain the relationship between the two rotation rates obtained from the original differential equation system and the rotation rate which was previously obtained from the Poincaré map. The fact that the rotation rate of an asteroid will be different depending on whether on uses rotating coordinates or sidereal coordinates (in which the distant stars are fixed) is an example of how the rotation rate can depend on the projection.
Notes on delay coordinate embedding theorems. H. Whitney [21] showed that a topologically Sauer et al [11] modified Takens' result in two ways. First, it replaced "topologically generic" by "almost every" (in the sense of "prevalence") in Theorems 2.1 and 2.3 in [22]. See also [23]. For physical purposes "almost every" has significance while residual sets do not seem to. In this paper, in Theorem 1.3, we have adapted the "almost every" approach.
For completeness, we mention the second way [11] generalized Takens' approach, even though this second way is not used here, because the sets we deal with are manifolds. The second way is that [11] allblack replaced the assumption that M is a manifold by assuming only that M ⊂ R k for some k is an invariant set of some map and that M has box dimension boxdim(M ) and Γ is a mapping of a neighborhood of M into R D where D > 2 · boxdim(M ). The great majority of citations to Takens [24] are for the case where M is a chaotic attractor that is not a manifold so that Takens' Theorem does not apply. Those papers actually use the results in [11], not in Takens' [24]. One unusual aspect of our current paper is that we actually only need the case that Takens proved. Here M is a quasiperiodic torus so it is a manifold.
The Takens Theorem also has assumptions that the set of periodic points F : M → M for some smooth map was in some sense small, in our case there are no periodic points so those assumptions are automatically satisfied. Hence we only state it in a special case needed here.
We have demonstrated that in one dimension, a rotation rate can be computed precisely with minimal ambiguity, but higher dimensional cases (T d with d > 1) are more complicated. Projections into the plane yield rotation rates, but there are infinitely many topologically distinct ways to project a higher dimensional torus onto a circle, each of which yields a different rotation rate. This makes it important for the investigator to explain the meaning of any particular rotation rate. In fact, a rotation rate is a rate specifying an average change per unit time, where there can be considerable choice in the time units. To illustrate this point, we more carefully consider the CR3BP example with a focus on what the rotation rates tell us about the trajectories of an asteroid.