Almost periodicity is a property of dynamical systems that appear to retrace their paths through phase space, but not exactly. An example would be a planetary system, with planets in orbits moving with periods that are not commensurable (i.e., with a period vector that is not proportional to a vector of integers). A theorem of Kronecker from diophantine approximation can be used to show that any particular configuration that occurs once, will recur to within any specified accuracy: if we wait long enough we can observe the planets all return to within a second of arc to the positions they once were in.
There are several different inequivalent definitions of almost periodic functions. An almost periodic function is a complex-valued function of a real variable that has the properties expected of a function on a phase space describing the time evolution of such a system. There have in fact been a number of definitions given, beginning with that of Harald Bohr. His interest was initially in finite Dirichlet series. In fact by truncating the series for the Riemann zeta function ζ(s) to make it finite, one gets finite sums of terms of the type
with s written as (σ+it) - the sum of its real part σ and imaginary part it. Fixing σ, so restricting attention to a single vertical line in the complex plane, we can see this also as
Taking a finite sum of such terms avoids difficulties of analytic continuation to the region σ < 1. Here the 'frequencies' log n will not all be commensurable (they are as linearly independent over the rational numbers as the integers n are multiplicatively independent - which comes down to their prime factorizations).
With this initial motivation to consider types of trigonometric polynomial with independent frequencies, mathematical analysis was applied to discuss the closure of this set of basic functions, in various norms.
The theory was developed using other norms by Besicovitch, Stepanov, Weyl, von Neumann, Turing, Bochner and others in the 1920s and 1930s.
An alternative definition due to Bochner (1926) is equivalent to that of Bohr and is relatively simple to state:
A function f is almost periodic if every sequence {f(tn+T)} of translations of f has a subsequence that converges uniformly for T in (-∞,+∞).
The Bohr almost periodic functions are essentially the same as continuous functions on the Bohr compactification of the reals.
The Besikovitch almost periodic functions in B2have an expansion (not necessarily convergent) as
The space Bp of Besikovitch almost periodic functions (for p≥1) contains the space Wp of Weyl almost periodic functions. If one quotients out a subspace of "null" functions, it can be identified with the space of Lp functions on the Bohr compactification of the reals.
The Bohr compactification of G is the compact abelian group of all possibly discontinuous characters of the dual group of G, and is a compact group containing G as a dense subgroup. The space of uniform almost periodic functions on G can be identified with the space of all continuous functions on the Bohr compactification of G. More generally the Bohr compactification can be defined for any topological group G, and the spaces of continuous or Lp functions on the Bohr compactification can be considered as almost periodic functions on G. For locally compact connected groups G the map from G to its Bohr compactification is injective if and only if G is a central extension of a compact group, or equivalently the product of a compact group and a finite dimensional vector space.
In speech processing, audio signal processing, and music synthesis, a quasiperiodic signal, sometimes called a quasiharmonic signal, is a waveform that is virtually periodic microscopically, but not necessarily periodic macroscopically. It should be noted that this does not give a quasiperiodic function in the sense of the Wikipedia article of that name, but something more akin to an almost periodic function, being a nearly periodic function where any one period is virtually identical to its adjacent periods but not necessarily similar to periods much farther away in time. This is the case for musical tones (after the initial attack transient) where all partials or overtones are harmonic (that is all overtones are at frequencies that are an integer multiple of a fundamental frequency of the tone).
When a signal is fully periodic with period , then the signal exactly satisfies
or
The Fourier series representation would be
or
where is the fundamental frequency and the Fourier coefficients are
The fundamental frequency , and Fourier coefficients , , , or , are constant, not functions of time. The harmonic frequencies are exact integer multiples of the fundamental frequency.
When is quasiperiodic then
or
where
Now the Fourier series representation would be
or
or
where is the possibly time-varying fundamental frequency and the Fourier coefficients are
and the instantaneous frequency for each partial is
Whereas in this quasiperiodic case, the fundamental frequency , the harmonic frequencies , and the Fourier coefficients , , , or are not necessarily constant, and are functions of time albeit slowly varying functions of time. Stated differently these functions of time are bandlimited to much less than the fundamental frequency for to be considered to be quasiperiodic.
The partial frequencies are very nearly harmonic but not necessarily exactly so. The time-derivative of , that is , has the effect of detuning the partials from their exact integer harmonic value . A rapidly changing means that the instantaneous frequency for that partial is severely detuned from the integer harmonic value which would mean that is not quasiperiodic.