Access to this full-text is provided by Springer Nature.
Content available from Journal of Scientific Computing
This content is subject to copyright. Terms and conditions apply.
Journal of Scientific Computing (2022) 91:65
https://doi.org/10.1007/s10915-022-01776-0
Minimizing Aliasing in Multiple Frequency Harmonic Balance
Computations
Daniel Lindblad1·Christian Frey2·Laura Junge2·Graham Ashcroft2·
Niklas Andersson1
Received: 22 June 2020 / Revised: 8 December 2021 / Accepted: 17 December 2021 /
Published online: 11 April 2022
© The Author(s) 2022
Abstract
The harmonic balance method has emerged as an efficient and accurate approach for comput-
ing periodic, as well as almost periodic, solutions to nonlinear ordinary differential equations.
The accuracy of the harmonic balance method can however be negatively impacted by
aliasing. Aliasing occurs because Fourier coefficients of nonlinear terms in the governing
equations are approximated by a discrete Fourier transform (DFT). Understanding how alias-
ing occurs when the DFT is applied is therefore essential in improving the accuracy of the
harmonic balance method. In this work, a new operator that describe the fold-back, i.e. alias-
ing, of unresolved frequencies onto the resolved ones is developed. The norm of this operator
is then used as a metric for investigating how the time sampling should be performed to min-
imize aliasing. It is found that a time sampling which minimizes the condition number of the
DFT matrix is the best choice in this regard, both for single and multiple frequency problems.
These findings are also verified for the Duffing oscillator. Finally, a strategy for oversampling
multiple frequency harmonic balance computations is developed and tested.
Keywords Harmonic balance ·Aliasing ·Condition number ·Almost periodic Fourier
transform ·APFT ·Duffing oscillator
BNiklas Andersson
niklas.andersson@chalmers.se
Daniel Lindblad
daniel.lindblad@chalmers.se
Christian Frey
christian.frey@dlr.de
Laura Junge
laura.junge@dlr.de
Graham Ashcroft
graham.ashcroft@dlr.de
1Division of Fluid Dynamics, Department of Mechanics and Maritime Sciences, Chalmers
University of Technology, Hörsalsvägen 7A, 412 96 Gothenburg, Sweden
2Department of Numerical Methods, Institute of Propulsion Technology, Deutsches Zentrum für Luft-
und Raumfahrt e.V. (DLR), Linder Höhe, 51147 Cologne, Germany
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
65 Page 2 of 23 Journal of Scientific Computing (2022) 91 :65
Mathematics Subject Classification 65L70
1 Introduction
Many processes found in engineering and scientific applications are time-periodic. Some
examples are fluid flows inside turbomachines, vibrations of structures, or voltages within
AC circuits. In order to understand these processes, they may be simulated by integrating
their governing equations in time until a periodic solution is obtained. In cases when the
initial condition is far from being periodic and/or transient phenomena decay slowly, it may
however take a long time until the solution reaches a periodic state. In terms of a numerical
simulation that integrates between discrete time steps, this translates into a large number of
iterations, and consequently, a high computational cost [10,17].
An alternative approach that can be more computationally efficient is to directly seek
solutions that belong to some finite dimensional vector space spanned by a set of periodic
basis functions. This paper considers the special case when these basis functions are sinusoids
with different frequencies. In this case, the solution thus takes the form of a truncated Fourier
series, for which the unknowns become the Fourier coefficients. There exist several methods
in the literature for determining these Fourier coefficients. One approach is to integrate the
equations obtained from substituting the Fourier series into the governing equations against
each of the basis functions that span the vector space. This represents a Galerkin method, and
will yield one equation per basis function. In cases when the governing equations are linear,
the equations resulting from the integration uncouple with respect to the Fourier coefficients.
If the governing equations on the other hand are nonlinear, each Fourier coefficient will in
general be present in each of the final equations. When the Galerkin method is applied to
linear problems it is sometimes referred to as the Linear Frequency Domain method [7,15].
Some applications of the aforementioned approach to nonlinear problems can be found in
e.g. [31,39].
Unfortunately, the Galerkin integral can become very complicated to solve analytically in
the nonlinear case [16,31]. This is especially true when the dimension of the vector space
is large and/or when the governing equations are complex in nature. Other methods have
therefore been developed for nonlinear problems. One common approach is to require that the
equations resulting from the substitution only are satisfied at a discrete set of time instances,
rather than in a variational sense as in the Galerkin method. This leads to a class of methods
which here will be referred to as harmonic balance methods. Harmonic balance methods can
be formulated in both the time and the frequency domain, with the main difference being that
the solution variables are time samples in the former, and Fourier coefficients in the latter
[10,26]. Within the electronics community, harmonic balance is most often formulated in the
frequency domain [10], and the modern version of harmonic balance is acredited to Nakhla
and Valch [34]. Within the fluid dynamics community, the time domain harmonic balance
method was first introduced by Hall et al. [16] and the frequency domain formulation by
McMullen [33]. A good review of the history and theory of harmonic balance can be found
in a two part review paper by Gilmore and Steer [10,11].
The harmonic balance method is based on applying a discrete Fourier transform (DFT) to
either calculate the time derivative term (time-domain formulation), or the Fourier transform
of the nonlinear terms (frequency domain formulation) [10,26]. Applying a DFT to nonlinear
problems can however introduce aliasing, which is known to reduce the accuracy of the
harmonic balance method [24,29,32], and sometimes even lead to nonphysical solutions
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Journal of Scientific Computing (2022) 91 :65 Page 3 of 23 65
[28]. Several methods have therefore been developed to address these problems. Huang and
Ekici propose to add a time-spectral viscosity operator to the harmonic balance equations
[19]. This operator acts by damping the sinusoids which it is applied to, and has been shown
by Huang and Ekici to improve convergence in cases when aliasing otherwise prevents it [19].
Another approach investigated by La Bryer and Attair [28] is to filter the solution between
each nonlinear iteration. The main idea of the filtering approach is to limit the amplitude
of the sinusoids that have the highest frequencies, since these in general are the ones most
contaminated by aliasing. In cases when the nonlinearity of the governing equations is known,
exact frequency domain filters which keep the lower frequency sinusoids perfectly free from
aliasing can in fact be constructed by using a sharp cut-off frequency based on Orszag’s rule
[28,36]. It should also be noted that a frequency domain filter with a sharp cut-off frequency
is equivalent to the oversampling strategy employed by Frey et al. in their harmonic balance
solver [8].
In addition to filtering, a filtered inverse discrete Fourier transform has also been used
to improve the convergence and stability of the harmonic balance method [3,18]. This
approach is particularly useful in cases when discontinuities and/or strong gradients lead
to slow harmonic convergence (Gibbs phenomenon). The use of a filtered reconstruction
operator is thouroughly discussed by Gottlieb and Shu [12]. For its application to Fourier
spectral methods alongside so-called reprojection approaches the reader to referred to [9].
Harmonic balance methods were originally developed for problems where the solution
contains one fundamental frequency and its harmonics. Several problems in nature can how-
ever be expected to have solutions which contain a more general set of frequencies. In these
cases, the solution belongs to a wider class of functions known as almost periodic functions
[1,26]. A fundamental problem that arises when the harmonic balance method is applied to
almost periodic functions is to construct the DFT. In the original harmonic balance method,
the standard discrete Fourier transform based on Muniformly distributed points between 0
and the reciprocal of the lowest resolved frequency is almost exclusively employed. Here,
M≥2K+1, where Kis the number of frequencies included in the Fourier series expansion.
The reason for choosing this sampling is that it satisfies the assumptions of the Whittaker–
Kotel’nikov–Shannon sampling theorem [23,38,40]. A uniform time sampling that satisfies
the sampling theorem can also be constructed for almost periodic signals as long as the fre-
quencies considered are commensurable. Such a sampling may however require a very large
number of sampling points, which makes this approach unfavourable from a computational
perspective [21,26]. Other approaches have therefore been developed for cases when the
solution is an almost periodic function. Some of these are based on introducing a basis for
the frequency set, such that each frequency can be written as an integer linear combination of
a finite set of fundamental frequencies [26]. The method developed by Frey et al. [8] takes into
account only frequencies which are multiples of one the fundamental frequencies and applies
the so-called harmonic set approach. The advantages of the harmonic set approach are that
its computational cost scales linearly with the number of frequencies considered and that the
standard discrete Fourier transform can be used within each harmonic set. The harmonic set
approach does however neglect nonlinear coupling between different harmonic sets, except
through common frequencies such as the zeroth frequency. These coupling terms may be
accounted for by introducing several time variables, one for each fundamental frequency in
the basis [14,22]. This approach once again relies on the standard discrete Fourier transform
with uniform time samples, but requires a substantially larger computational cost than the
harmonic set approach.
A third approach, which is the main topic of this paper, is to employ the almost periodic
Fourier transform (APFT) introduced by Kundert et al. [25,26] in the harmonic balance
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
65 Page 4 of 23 Journal of Scientific Computing (2022) 91 :65
computation. The APFT differs from the standard discrete Fourier transform in two ways.
First, it considers an arbitrary set of frequencies and is therefore well suited for cases when
the solution is an almost periodic function. Secondly, it does not require that the time samples
are distributed uniformly like in the standard discrete Fourier transform. Instead, Kundert et
al. suggest that the time sampling is chosen so that it minimizes the condition number of the
DFTmatrixusedintheAPFT[25,26]. Finding a time sampling that satisfies this criterion
for an arbitrary set of frequencies is however a very complex problem, that to the authors’
knowledge has not yet been solved analytically. In the original work on harmonic balance
methods for arbitrary frequency sets, Chua and Ushida [2] employ a uniform discretization
and use oversampling to avoid ill-conditioning. The same strategy has also been used in
recent years by Ekici and Hall [5,6]. Kundert et al. [25,26] were the first to obtain a well
conditioned DFT matrix based on 2K+1 time samples. This was done using their Near-
Orthogonal Selection Algorithm. Since the work of Kundert et al., several other algorithms
have been developed to compute a time sampling that minimizes the condition number of
the DFT matrix, see e.g. [13,21,27,35,37].
The rationale of choosing a time sampling that minimizes the condition number of the
DFT matrix is that it limits the effect that a perturbation of the sampled signal can have on the
resulting DFT. Since all unresolved frequencies manifest themselves as perturbations of the
sampling, this implies that a low condition number can limit the amount of aliasing produced
by the DFT [26]. In [26], it is also noted that the condition number does not say anything
about how much the amplitude of a particular unresolved sinusoid affects the resolved ones.
This implies that the condition number in itself can not be used to identify an alias free DFT.
In order to do this, the mapping of the unresolved sinusoids onto the resolved ones must
be defined [26]. In this work, an operator that describes this mapping has been developed.
The benefit of this operator, hereinafter referred to as the alias operator, is that it directly
defines how a particular time sampling affects aliasing. As will be shown later, the norm of
this operator also provides an a-priori bound on the amount of aliasing that a particular time
sampling gives rise to.
In this paper, the relation between the alias operator and the condition number of the
DFT matrix employed in the APFT will be investigated. After this, the relation between the
norm of the alias operator, the condition number of the DFT matrix and the actual alias error
obtained in several harmonic balance computations will be investigated. Finally, the benefits
of employing oversampling in multiple frequency harmonic balance computations based on
the APFT will be investigated.
2 Method
2.1 Harmonic Balance Method
The purpose of this paper is to study how aliasing occurs in harmonic balance solutions of
first order ordinary differential equations of the following form
dq
dt +f(q,t)=0(1)
Here, q∈RNis a vector that contains the unknown solution and f:RN×R→RNis a
nonlinear function that describes the dynamics of the problem. The nonlinearity of f(q,t)
implies that an almost periodic solution to Eq. (1) can contain an infinite number of sinusoids
with different frequencies. Computing the amplitude of all these sinusoids is however not
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Journal of Scientific Computing (2022) 91 :65 Page 5 of 23 65
feasible from a numerical perspective. Therefore, approximate solutions that are spanned by
a limited number of sinusoids are considered instead
q(t)≈
k:ωk∈Λˆqkeiωkt(2)
Here, Λrepresents the set of frequencies included in the series expansion
Λ={0,ω
1,ω
2,...,ω
K,ω
−K,...,ω
−1}(3)
Note that the only requirement put on these frequencies is that ω−k=−ωk.
If a Galerkin projection of Eq. (1) onto the subspace spanned by the sinusoids in Eq. (2)
is performed, the following is obtained
ΩΛˆ
qΛ+ˆ
fΛ(ˆ
qΛ,Λ) =0(4)
Here, ΩΛ=ΩΛ⊗I,where⊗is the Kronecker product, Iis an identity matrix of size N×N,
and
ΩΛ=
⎡
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎣
00 ··· 0
0iω10··· 0
.
.
.0iω20··· 0
.
.
.0...0
.
.
.0
00 0 0 0iω−1
⎤
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎦
(5)
The vectors ˆ
qΛand ˆ
fΛ(ˆ
qΛ,Λ)in Eq. (4) further consist of 2K+1 sub-vectors, in which the
kth sub-vector contains ˆqkand ˆ
fkrespectively.
Calculating the Galerkin projection of Eq. (1) can be very complicated in cases when the
number of sinusoids considered in Eq. (2) is large, and/or the function f(q,t)is very complex
in nature. In order to overcome this difficulty, the harmonic balance method approximates
ˆ
fΛ(ˆ
qΛ,Λ) by a discrete Fourier transform (DFT) of f(q,t)instead
ΩΛˆ
qΛ+EΛ(t)f(E−1
Λ(t)ˆ
qΛ,t)=0(6)
The DFT of f(q,t)in Eq. (6) is performed in two steps. In the first step, f(q,t)is evaluated
at a set of time instances t
t=⎡
⎢
⎢
⎢
⎣
t0
t1
.
.
.
tM−1
⎤
⎥
⎥
⎥
⎦
(7)
This will in turn require the realization of Eq. (2) at these time instances
q=E−1
Λ(t)ˆ
qΛ(8)
Here, E−1
Λ(t)=E−1
Λ(t)⊗I,and
E−1
Λ(t)=⎡
⎢
⎢
⎢
⎣
1eiω1t0eiω2t0... eiω−1t0
1eiω1t1eiω2t1... eiω−1t1
.
.
..
.
..
.
..
.
.
1eiω1tM−1eiω2tM−1... eiω−1tM−1
⎤
⎥
⎥
⎥
⎦
(9)
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
65 Page 6 of 23 Journal of Scientific Computing (2022) 91 :65
In the second step, the sampling of f(q,t)is transformed back into the frequency domain
using the inverse of E−1
Λ(t), here denoted EΛ(t). For this inverse to be well defined, the
columns in E−1
Λ(t)must be linearly independent. Due to the structure of E−1
Λ(t), this holds
true if M=2K+1 time instances can be found such that the columns in E−1
Λ(t)are linearly
independent. As it turns out, this is always possible. In order to prove this, note that for an
equidistant sampling, the entries of E−1
Λ(t)take the form
E−1
Λ(t)m,n=eiΛnΔtm−1
(10)
For an equidistant time sampling, E−1
Λ(t)thus corresponds to a transposed Vandermonde
matrix. Its determinant is therefore given by
det E−1
Λ(t)=
m<neiΛmΔt−eiΛnΔt(11)
It is easy to verify that this expression is non-zero for almost all choices of Δt. This shows
that for any given set of frequencies one can find an equidistant sampling point distribution
tsuch that E−1
Λ(t), and thereby E−1
Λ(t), is invertible.
The time sampling is usually chosen to minimize the condition number of E−1
Λ(t).Note
that a small condition number automatically ensures that E−1
Λ(t)is invertible. Some authors
use a numerical optimization procedure to minimize the condition number. It is important to
note that the cost of this optimization procedure is usually negligible compared to solving
the harmonic balance system.
In the literature, the discrete Fourier transform defined by the matrices E−1
Λ(t)and EΛ(t)is
often referred to as the almost periodic Fourier transform (APFT) [26]. The APFT represents
a generalization of the standard DFT to arbitrary sets of frequencies and sampling points,
and will in fact be equivalent to the standard DFT when the frequencies in Λare integer
multiples of a single base frequency, and the time samples are distributed uniformly between
zero and the reciprocal of this base frequency.
Equation (6) represents the frequency domain formulation of the harmonic balance
method. An equivalent formulation in the time domain may also be expressed as follows
E−1
Λ(t)ΩΛEΛ(t)q+E−1
Λ(t)EΛ(t)f(q,t)=0(12)
This formulation is easily obtained by premultiplying Eq. (6) from the left by E−1
Λ(t)and
then using Eq. (8). The matrix E−1
Λ(t)EΛ(t)in the above equation will further be equal to the
identity matrix when M=2K+1 time samples are employed. If more than M=2K+1 time
samples on the other hand are used, this matrix will represent a projection that corresponds
to the application of a modal filter.
The frequency domain formulation of the harmonic balance method presented in Eq. (6)
will be used for the remainder of this paper. Due to the equivalence of Eq. (6)and(12),
however, the results presented will also apply to the time domain formulation of the harmonic
balance method.
2.1.1 Error Sources
It is well known that the harmonic balance method can give rise to two types of errors:
aliasing and harmonic truncation [10,11,26]. Aliasing occurs because f(q,t)can contain
more frequencies that those accounted for by the DFT in Eq. (6). Aliasing will on the other
hand not occur if Eq. (4) is solved. This is because the Galerkin projection in this case
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Journal of Scientific Computing (2022) 91 :65 Page 7 of 23 65
corresponds (up to a constant) to the standard formula for calculating Fourier coefficients.
Independently on whether the harmonic balance or Galerkin method is used, however, the
harmonic truncation error will always be present. This error occurs as a result of the fact
that the contribution of the unresolved sinusoids to the solution, including their nonlinear
coupling with the resolved sinusoids, is neglected.
Both the alias error and the harmonic truncation error can naturally be reduced by including
more frequencies in Λ. This is however not always possible in practical applications since the
computational cost of the harmonic balance method scales almost linearly with the size of Λ,
here denoted #Λ. It is therefore often hard to avoid aliasing and harmonic truncation errors
in the solution. This highlights the importance of understanding how these errors occur, and
how they can be limited. In this paper, the focus is put on the aliasing error.
2.2 Alias Operator
As noted in the previous section, aliasing occurs when f(q,t)contains more frequencies
than those accounted for by the DFT in Eq. (6). Let Λ denote the union of Λand the set of
all frequencies that are contained in f(q,t). In cases when f(q,t)is a polynomial in q, with
coefficients that are finite Fourier sums in t,thesetΛ will be finite. This in turn implies that
the signal f(q,t)can be written as
f(q,t)=E−1
Λ(t)ˆ
fΛ (13)
Note that ΛΛ. From this, it follows that Eq. (13) can be rewritten as
f(q,t)=E−1
Λ(t)ˆ
fΛ+E−1
Λ\Λ(t)ˆ
fΛ\Λ(14)
Based on this expression, the DFT of f(q,t)may now be expressed as
˜
ˆ
fΛ=EΛ(t)f(q,t)
=EΛ(t)E−1
Λ(t)ˆ
fΛ+E−1
Λ\Λ(t)ˆ
fΛ\Λ
=ˆ
fΛ+EΛ(t)E−1
Λ\Λ(t)ˆ
fΛ\Λ(15)
This shows that the Fourier coefficients obtained from the DFT of f(q,t)consist of two
terms. The first term represents the correct (alias free) Fourier coefficients corresponding
to the resolved frequencies, and the second term the fold-back of the remaining Fourier
coefficients onto the resolved ones. The operator EΛ(t)E−1
Λ\Λ(t)that defines the fold-back
of the unresolved Fourier coefficients in Eq. (15) will be referred to as the alias operator
for the remainder of this paper. Based on Eq. (15), it is easy to show that the norm of this
operator puts the following bound on the alias error
˜
ˆ
fΛ−ˆ
fΛ2
ˆ
fΛ\Λ2≤EΛ(t)E−1
Λ\Λ(t)2
=EΛ(t)E−1
Λ\Λ(t)2(16)
Provided that Λ is known, this relation may be used to obtain an a-priori bound on the
alias error that a particular time-sampling tcan give rise to. As will be shown next, however,
determining Λ for a particular problem is not a trivial task.
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
65 Page 8 of 23 Journal of Scientific Computing (2022) 91 :65
2.2.1 Selection of Unresolved Frequencies
The set Λ is completely defined by the function f(q,t)and the set Λ. In the present work,
it is assumed that f(q,t)is a polynomial of degree pin q. This assumption allows the set
Λ to be calculated by simple addition and subtraction of the frequencies in Λ. Clearly,
this assumption is not valid for all problems. Despite this, however, it can still be a good
approximation provided that f(q,t)itself approximates an analytic function, i.e., one that is
locally given by a convergent power series (which then coincides with its Taylor series).
The choice of Λ directly influences how well the norm of the alias operator will represent
the actual alias error obtained in a harmonic balance simulation. To see this, note that Eq. (16)
represents the largest possible alias error that any ˆ
fΛ\Λcan give rise to. This means that
the bound in Eq. (16) may not be representative if some elements in ˆ
fΛ\Λare negligible for
a given problem. It is also important to keep in mind that Eq. (16) gives a relative bound
on the alias error. As such, if Λhas been selected to contain all relevant frequencies for a
given problem, then ˆ
fΛ\Λ2≈0 and consequently, the actual alias error will be small
independent of the norm of the alias operator.
2.2.2 Relation to Condition Number
The condition number of E−1
Λ(t)has been successfully used by several authors in the past as
a measure for selecting the time sampling in multiple frequency harmonic balance compu-
tations [13,21,25–27,35,37]. This raises the question of how the condition number relates
to the alias operator defined in the present work. The condition number can be defined based
on the l2norm as
κ(E−1
Λ(t)) =E−1
Λ(t)2EΛ(t)2(17)
This definition can be used to derive a bound on the norm of the alias operator as follows
EΛ(t)E−1
Λ\Λ(t)2≤EΛ(t)2E−1
Λ\Λ(t)2
=κ(E−1
Λ(t)) E−1
Λ\Λ(t)2
E−1
Λ(t)2
α(Λ,Λ,t)
(18)
Both matrices in the last equation have entries with norm 1. From this, it follows that there
exists an upper bound on E−1
Λ\Λ(t)2, and a lower bound on E−1
Λ(t)2, both independent
of t. Equation may therefore be rewritten as
EΛ(t)E−1
Λ\Λ(t)2≤κ(E−1
Λ(t)) max
tαΛ, Λ,t (19)
This equation shows that the condition number in fact puts a bound on the aliasing operator.
Note, however, that this does not imply that a time sampling which minimizes the condition
number also minimizes the norm of the alias operator.
The complexity of the alias operator, condition number and αΛ, Λ,tin Eq. (19)
makes it very hard to investigate how they relate analytically. Numerical optimizations were
therefore used to search for time samplings which give a minimal condition number, minimal
norm of the alias operator or maximal value of αΛ, Λ,t. These results could then be used
to investigate whether a time sampling that gives, e.g., a low condition number, also yields a
low norm of the alias operator. For a detailed description of the optimization procedure used
in the present work, see “Appendix B”.
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Journal of Scientific Computing (2022) 91 :65 Page 9 of 23 65
2.3 Almost Periodic Fourier Transform with Oversampling
In this work, the impact of oversampling on the alias error obtained in a harmonic balance
computation has also been investigated. The motivation for doing this is that aliasing can
never be eliminated when M=2K+1 time samples are employed. This can be proven
by first noting that the columns in E−1
Λ(t)are required to be linearly independent, and
therefore form a basis for CM. From this, it follows that there exists a nonzero matrix W
such that E−1
Λ\Λ(t)=E−1
Λ(t)W. But then, the alias operator in Eq. (15) must be equal to
EΛ(t)E−1
Λ\Λ(t)=W= 0, which proves the desired result.
When oversampling is employed, EΛ(t)in Eq. (6) will represent a left inverse to E−1
Λ(t).
Contrary to the standard inverse of a square matrix, however, the left inverse is not uniquely
defined. In cases when Λ is finite, it can therefore be tailored such that aliasing is eliminated.
In order to prove this, one can start by noting that such a tailored inverse, here denoted
EΛ,Λ(t), must satisfy the following two conditions
EΛ,Λ(t)E−1
Λ(t)=I,(20)
EΛ,Λ(t)E−1
Λ\Λ(t)=0.(21)
The above conditions can be combined as follows
EΛ,Λ(t)E−1
Λ(t)E−1
Λ\Λ(t)=I0
(22)
Note that the matrix within the brackets in the left hand side of the above equation corresponds
to E−1
Λ (t). From before, it is known that there exists a time sampling with M =#Λ time
samples such that this matrix is invertible. From this, it follows that the above relation may
be rewritten as
EΛ,Λ(t)=πΛ,Λ EΛ (t). (23)
Here, πΛ,Λ is the projection onto the harmonics in Λ.
The argument above shows that a left inverse that eliminates aliasing always can be defined
if Λ is finite. Unfortunately, it is more computationally expensive to employ this left inverse
since it requires that f(q,t)is evaluated at M >2K+1 time instances. This motivates
the use of a left inverse which requires less than M time instances, but still has the potential
to reduce aliasing compared to not using oversampling at all. In order to define such a left
inverse, introduce a new set of frequencies Λthat satisfies
Λ⊂Λ⊆Λ (24)
There exists a time sampling with M=#Λtime samples such that E−1
Λ(t)is invertible.
Therefore, the following left inverse may be defined
EΛ,Λ(t)=πΛ,Λ EΛ(t)(25)
The idea behind this left inverse is to eliminate aliasing with respect to the frequencies in
Λ\Λ. This left inverse would also completely eliminate aliasing if a time sampling can be
found such that the unresolved Fourier coefficients only contribute to the amplitude of the
Fourier coefficients whose frequencies are in Λ\Λ.
An alternative choice for the left-inverse which has been suggested in the literature is
the Moore–Penrose inverse of E−1
Λ(t)[5,6,21]. This left inverse represents a least squares
projection onto the subspace spanned by the columns in E−1
Λ(t). From this, it follows the
Moore–Penrose inverse can only eliminate aliasing if the columns in E−1
Λ\Λ(t)are orthogonal
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
65 Page 10 of 23 Journal of Scientific Computing (2022) 91 :65
to those in E−1
Λ(t)(with respect to the standard inner product on CM). In cases when the
frequencies in Λare commensurable, and f(q,t)is a polynomial, it is possible to ensure
this by selecting a uniform time sampling that satisfies Orszag’s rule [21]
M ≥(p+1)ωmax
ωbase +1 (26)
Here, ωmax is the largest frequency in Λand ωbase is the greatest common divisor of all
frequencies in Λ.
It might also be possible to construct a (possibly non-uniform) time sampling such that
the Moore–Penrose inverse eliminates aliasing in the general case, but no such algorithm is
known to the authors. As shown in “Appendix A”, it is however possible to redefine the inner
product on CM such that the columns in E−1
Λ\Λ(t)become orthogonal to those in E−1
Λ(t).
There, it is also shown that the Moore–Penrose inverse defined with respect to this new inner
product is equivalent to the left inverse defined by Eq. (23).
3 Results
3.1 Aliasing for M=#Λ
This section considers the case when the number of sampling points corresponds to the
theoretical minimum of M=#Λ. To begin with, it is demonstrated how κ(E−1
Λ)and
EΛE−1
Λ\Λ2relate in this case. This is done for both the case when Λcontains a sin-
gle as well as multiple fundamental frequencies. After this, it is investigated how κ(E−1
Λ)
and EΛE−1
Λ\Λ2influence the alias error obtained when the Duffing oscillator is simulated
with the harmonic balance method. This is done for both the single and multiple frequency
case as well.
3.1.1 Relation Between Ä(E−1
Λ)and EΛE−1
Λ\Λ2
In Sect. 2.2.2 it was shown that EΛE−1
Λ\Λ2is bounded by κ(E−1
Λ)through Eq. (19). This
fact can be illustrated by a diagonal line in a κ(E−1
Λ)−EΛE−1
Λ\Λ2plane, if the slope of this
line is taken to be the maximum value of αΛ, Λ,t. In the same plane, the minimal values
of κ(E−1
Λ)≥1andEΛE−1
Λ\Λ2≥01can also be represented by a vertical and a horizontal
line respectively. The region between these three lines will then contain all possible values
of κ(E−1
Λ)and EΛE−1
Λ\Λ2that a time sampling can give rise to. In Fig. 1a, this region is
illustrated for the case when Λcontains a single fundamental frequency and Λ is generated
by a second degree polynomial (p=2).ThecasewhenΛ is generated by a third degree
polynomial ( p=3) is further depicted in Fig. 1b. The limit values of κ(E−1
Λ),EΛE−1
Λ\Λ2
and αΛ, Λ,tshown in these figures have all been computed with the OPT algorithm [13],
as described in “Appendix B”.
A large set of random time samples was also generated to investigate how κ(E−1
Λ)and
EΛE−1
Λ\Λ2relate. The resulting values of κ(E−1
Λ)and EΛE−1
Λ\Λ2are illustrated by gray
markers in Fig. 1. These random samplings indeed confirm that a time sampling is limited to
1The norm of the alias operator can only be identically zero when oversampling is employed since at most
#Λdifferent Fourier coefficients can be computed when M=#Λ.
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Journal of Scientific Computing (2022) 91 :65 Page 11 of 23 65
(b)
(a)
Fig. 1 Relation between norm of alias operator and condition number for the case Λ={0,1,2,−2,−1}·2π
the region between the three lines in Fig. 1. They also indicate that the maximal norm of the
alias operator is proportional to κ(E−1
Λ), as would be expected from Eq. (19). For the single
frequency case shown in Fig. 1, it did in fact turn out that both the minimum value of κ(E−1
Λ)
and the minimum value of EΛE−1
Λ\Λ2were obtained with M=#Λuniformly distributed
time samples between 0 and T. The results in Fig. 1thus point to the fact that the standard
DFT is optimal in terms of aliasing for the single frequency problem. Several other tests with
different numbers of harmonics in Λand different sets Λ have confirmed this statement.
The relation between κ(E−1
Λ)and EΛE−1
Λ\Λ2for the case when Λcontains two funda-
mental frequencies and Λ is generated by a second degree polynomial (p=2) is depicted
in Fig. 2a. The case when Λ is generated by a third degree polynomial (p=3) is further
depicted in Fig. 2b. The results shown in Fig. 2very much resemble the single frequency case
in Fig. 1. A couple of differences can however be noted. To begin with, the minimal value of
EΛE−1
Λ\Λ2can be seen to increase when going from the single frequency to the multiple
frequency case. For both cases, it can also be seen that the minimal value of EΛE−1
Λ\Λ2
increases when the nonlinearity of the problem increases. Both these trends can be explained
by the fact that the number of unresolved frequencies increases when the frequencies in Λ
are no longer harmonically related and/or when the nonlinearity of the problem increases.
In addition, it can be seen in Fig. 2that the time sampling which minimizes κ(E−1
Λ)(blue
square marker) and the one that minimizes EΛE−1
Λ\Λ2(yellow circle marker) are not the
same in the multiple frequency case. The difference between these two samplings can how-
ever be seen to be very small. One possible explanation of this difference could be that the
OPT algorithm has not converged. Alternatively, there may be a trade off between κ(E−1
Λ)
and EΛE−1
Λ\Λ2for the multiple frequency case. The trend of the randomly generated
samplings shown in Fig. 2does however suggest that this trade-off is very small.
Overall, Figs. 1and 2suggest that κ(E−1
Λ)is a reasonable metric for selecting a time
sampling when M=#Λtime samples are used in the single and multiple frequency case.
These figures also show that it is important that the optimization algorithm used to minimize
κ(E−1
Λ)is able to come close to the global optimum, since the time sampling will otherwise
not minimize the norm of the alias operator.
3.1.2 Duffing Oscillator
The Duffing oscillator is a model for a damped and driven oscillator with a nonlinear stiffening
spring. The equation governing the displacement of the weight in the presence of two driving
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
65 Page 12 of 23 Journal of Scientific Computing (2022) 91 :65
(a)(b)
Fig. 2 Relation between norm of alias operator and condition number for the case Λ={0,1,√2,−√2,−1}·
2π
forces may be written as
¨x+2ζ˙x+x+x3=F1sin(ω1t)+F2sin(ω2t)(27)
Here, ζand Firespectively denote the damping coefficient and the amplitude of the ith driving
force. Furthermore, a dot represents differentiation with respect to time. Equation (27)may
be rewritten as a first order ordinary differential equation by introducing the velocity of the
weight, y=˙x, as an additional degree of freedom. This yields the following system of
equations
dq
dt +f(q,t)=0 (28)
where
q=x
y,f(q,t)=−y
2ζy+x+x3−F1sin(ω1t)−F2sin(ω2t)(29)
Equation (28) is discretized in time using the frequency domain harmonic balance method
presented in Eq. (6). The resulting nonlinear system of equations have been implemented
in the Python programming languange and solved using the fsolve routine available in
SciPy [20]. The exact Jacobian is also provided to fsolve to avoid problems associated
with finite-difference approximations.
The implementation of the frequency domain harmonic balance solver for the Duffing
oscillator has been validated against the publically available MATLAB tool NLvib [24].
To begin with, only a single driving force is considered (F2=0). The presence of a single
driving force admits the standard DFT to be used in the harmonic balance method. Figure 3a
shows a comparison between the Python solver and NLvib for ζ=0.1, F1=1.25 and
K=5. Both solutions were obtained by starting with a driving frequency close to 0 and then
gradually increase the frequency. Each new frequency computation is then started from the
previous solution. Figure 3a shows that the Python solver and NLvib yield identical results
for this case. Note, however, that the hysteresis branch could only be computed with NLvib
since no arc length continuation method was implemented in the Python solver. It should
also be noted that both solutions were computed with M =21 time instances to ensure
that Orszag’s rule (Eq. (26)) was satisfied for the cubic nonlinearity present in the governing
equations.
Figure 3b shows results obtained with the Python solver for a multiple frequency problem.
In this case, two incommensurable driving frequencies with a ratio of ω2/ω1=√2areused.
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Journal of Scientific Computing (2022) 91 :65 Page 13 of 23 65
(a)(b)
Fig. 3 Validation of frequency domain harmonic balance implementation of Duffing’s oscillator against NLvib
v1.0 [24]. Comparisons are made in terms of displacement amplitude ( A(ω) =ˆ
xω2) for different frequencies
The damping factor and amplitudes of the driving forces are further set to ζ=0.1and
F1=F2=0.1 respectively. No higher harmonics of the driving frequencies are considered
in the computation. The presence of a cubic nonlinearity in Eq. (29) will however generate
a large number of additional frequencies. To avoid aliasing, the DFT defined by Eq. (23)is
used. This requires the use of M =#Λ =25 sampling points, which were selected to
minimize the condition number of the DFT matrix. Unfortunately, NLvib does not support
the APFT. A direct comparison between the two solvers was therefore not possible in the
multiple frequency case. Instead, two NLvib computations were run at each of the two
driving frequencies and with M =5 time samples to obtain alias free solutions. These
results are provided for reference in Fig. 3b. This figure clearly shows that the APFT solution
and the reference single-frequency solution deviate. To ensure that this deviation is due only
to the nonlinear coupling resolved by the APFT, the Python solver was rerun with F2=0
and all other settings intact. The results from this computation can be seen to agree perfectly
with the corresponding NLvib solution.
As shown previously, both EΛE−1
Λ\Λ2and κ(E−1
Λ)put a bound on the amount of
aliasing produced by a DFT. These metrics will now be compared to the actual amount of
aliasing obtained with the aforementioned frequency domain harmonic balance solver for the
Duffing oscillator. The comparison has been performed for the two sets of frequencies that
were previously used for the validation. For each of these sets, 90 random time samplings
were generated by drawing M=#Λsamples from a uniform distribution and then checking
the condition number of the corresponding DFT matrix. If the condition number was below
10, the sampling was saved. Otherwise, another sampling was generated until 90 samplings
had been obtained in total.
For both the single and multiple frequency cases the corresponding alias free discrete
Fourier transforms that were used for the validation were first used to compute a set of refer-
ence solutions using the same frequency stepping procedure as described previously. These
reference solutions were then used as initial conditions for the simulations that employed
the random samplings. For each frequency, several solutions in which the random samplings
were shifted in time were computed. These time shifts were employed to account for the
fact that the phase of the solution can affect the amount of aliasing obtained. Once all fre-
quency and time shift combinations had been computed for a given random time sampling,
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
65 Page 14 of 23 Journal of Scientific Computing (2022) 91 :65
(b)
(a)
Fig. 4 Numerical alias error for the Duffing oscillator plotted against κ(E−1
Λ)and EΛE−1
Λ\Λ2.Λ=
{0,1,2,3,4,5,−5,−4,−3,−2,−1}·ω,F1=0.25, ζ=0.1, ω1=ω,M=11, ω∈(0,1.3)
the following numerical alias error was calculated
Alias Error =max
ωmax
Δt||ˆ
xΛ,APFT −ˆ
xΛ,OS||2
||ˆ
xΛ,OS||2 (30)
Here, APFT and OS respectively denote the random sampling and the alias-free oversam-
pled solution. The vector ˆ
xΛin this equation further contains all Fourier coefficients of the
displacement.
The numerical alias error is plotted against κ(E−1
Λ)with circular markers for the single
frequency case in Fig. 4a. This figure shows that κ(E−1
Λ)puts a bound on the amount of
aliasing obtained in a harmonic balance simulation, which is consistent with the results
presented in Fig. 1. The red diamond marker and blue square marker in Fig. 4a further denote
the alias free reference solution and a solution obtained with the standard DFT. It is interesting
to note that the standard DFT gives the lowest numerical alias error among all samplings with
M=#Λ, which is consistent with the results in Fig. 1.FromFig.4a it can also be noted that
κ(E−1
Λ)=1 for both the oversampled reference solution as well as the standard DFT based
on M=#Λtime samples. This result points to the fact that κ(E−1
Λ)can not distinguish an
alias free solution from an aliased one. This is on the other hand possible when the numerical
alias error is plotted against EΛE−1
Λ\Λ2, as shown in Fig. 4b. This figure also shows that
EΛE−1
Λ\Λ2puts a bound on the numerical alias error, which is consistent with Eq. (16).
In Fig. 5a and b the numerical alias errors obtained for the multiple frequency case have
been plotted against κ(E−1
Λ)and EΛE−1
Λ\Λ2respectively. These figures very much resem-
ble their single frequency counterparts in the sense that both κ(E−1
Λ)and EΛE−1
Λ\Λ2can be
seen to bound the numerical alias error. The square and triangle markers in Fig. 5correspond
to two samplings which give the lowest value of κ(E−1
Λ)and EΛE−1
Λ\Λ2respectively.
These two results can be seen to be very close to each other. This once again indicates that
the trade off between κ(E−1
Λ)and EΛE−1
Λ\Λ2is very small in the multiple frequency case,
and thus that it is sufficient to optimize for κ(E−1
Λ)in order to obtain a DFT that minimizes
aliasing. Note however that this statement only holds true when M=#Λsampling points are
employed since the minimal value of κ(E−1
Λ)can be the same with or without oversampling.
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Journal of Scientific Computing (2022) 91 :65 Page 15 of 23 65
(a)(b)
Fig. 5 Numerical alias error for the Duffing oscillator plotted against κ(E−1
Λ)and EΛE−1
Λ\Λ2.Λ=
{0,1,√2,−√2,−1}·ω,F1=F2=0.01, ζ=0.1, ω1=ω,ω2=√2ω,M=5, ω∈(0,2)
3.2 Aliasing for M>#Λ
Two strategies for employing oversampling with the APFT were presented in Sect. 2.3.In
the first strategy, EΛ(t)is constructed by explicitly accounting for some of the unresolved
frequencies (Eq. (25)), and in the second strategy, EΛ(t)is computed as the Moore–Penrose
inverse of E−1
Λ(t). In this section, it will be investigated whether the additional knowledge
about Λ built into the first definition of EΛ(t)is beneficial from an aliasing perspective.
This will be done by investigating how the alias error obtained when the Duffing oscillator is
simulated with the harmonic balance method varies with Mfor both a single and a multiple
frequency case. In relation to this, it is also shown how the numerical alias error relates to
the norm of the alias operator and the condition number of the DFT matrix by plotting their
variation with Mas well.
3.2.1 Duffing Oscillator
The first case that has been used to investigate the impact of oversampling with the APFT
is the Duffing oscillator with a single driving force. The alias free reference solution for
this case was computed with a uniform sampling that satisfies Orszag’s rule (Eq. (26)) for
cubic nonlinearities. The two definitions of EΛ(t)presented in Sect. 2.3 were evaluated
using two different sets of time samples. The first set consists of Muniformly distributed
points between 0 and the reciprocal of the lowest frequency. The second set consists of M
non-uniformly distributed points created by perturbing each point in the first sampling set
by a random value drawn from the uniform distribution U(−0.15T/M,0.15T/M). When
EΛ(t)was computed based on Eq. (25), Λwas selected to contain the Mlowest frequencies
in Λ.
Once all samplings had been generated for all values of M, the numerical alias error was
calculated according to the procedure outlined in Sect. 3.1.2. The results from this calculation
are presented in Fig. 6a. This figure shows that the two definitions of EΛ(t)give equivalent
results for the uniform sampling. This is because both these discrete Fourier transforms are
equivalent to the standard DFT in this case. This fact also explains why both definitions of
EΛ(t)eliminate aliasing once Orszag’s rule is satisfied. From Fig. 6a it can also be seen that
aliasing is not eliminated for any value of Mwhen a non-uniform sampling is used and EΛ(t)
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
65 Page 16 of 23 Journal of Scientific Computing (2022) 91 :65
(a)(b)
(c)
Fig. 6 Variation of numerical alias error, EΛE−1
Λ\Λ2and κwith number of sampling points. Λ=
{0,1,2,3,4,5,−5,−4,−3,−2,−1}·ω,F1=1.0, ζ=0.1, ω1=ω,ω∈(0,2.2)
is selected to be the Moore–Penrose inverse of E−1
Λ(t). This is on the other hand possible
when all the information about Λ is built into the definition of EΛ(t)for the non-uniform
sampling.
The variation of EΛE−1
Λ\Λ2with Mfor the single frequency case is further presented
in Fig. 6b. This figure shows that the norm of the alias operator follows the same trend as the
numerical alias error when the number of sampling points increase. In particular, it can be
seen that both EΛE−1
Λ\Λ2and the numerical alias error becomes zero for the same number
of sampling points. This highlights the fact that EΛE−1
Λ\Λ2is able to identify an alias free
sampling. As noted previously, this is on the other hand not possible if only the condition
number is considered. To demonstrate this, κ(E−1
Λ)is plotted against Min Fig. 6c.
In general, Fig. 6indicates that both the definition of EΛ(t)as well as the choice of time
sampling can have a substantial impact on the amount of aliasing obtained in a harmonic
balance simulation. This raises the question regarding which combination is best. Based only
on the results shown in Fig. 6, it appears that it is beneficial to define EΛ(t)based on Eq. (25).
It also appears that the uniform sampling, which gives the lowest value of κ(E−1
Λ), is a better
choice than a non-uniform sampling. This indicates that the best choice in terms of aliasing
is to construct EΛ(t)based on Eq. (25), and then select a time sampling which minimizes
κ(E−1
Λ). Here, care must however be taken in the definition of the condition number. In this
work, it is suggested to compute the condition number based on the square matrix E−1
Λ(t),
and not based on Eq. (17) in which some columns/rows of E−1
Λ/EΛ(t)are neglected. The
first reason for this is that, in practice, EΛ(t)is computed from a numerical inverse of E−1
Λ(t)
(see Eq. (25)). For this preliminary step to be well-posed it is thus necessary that κ(E−1
Λ)is
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Journal of Scientific Computing (2022) 91 :65 Page 17 of 23 65
small. The second reason is that a minimal value of the condition number has been seen to
make the APFT robust against aliasing for the non-oversampled cases, independently on the
choice of Λ. In the suggested approach, EΛ(t)is thus computed by first computing a square
matrix EΛ(t)that gives as little aliasing as possible, and then explicitly eliminate aliasing
with respect to some of the unresolved Fourier coefficients, i.e., those that correspond to
frequencies in Λ\Λ.
In order to investigate the usefulness of the suggested approach for computing EΛ(t),the
Duffing oscillator with two incommensurable driving frequencies was once again considered.
The alias free reference solution for this case was computed using the DFT defined in Eq. (23).
The time sampling for this case was selected by minimizing κ(E−1
Λ )using the OPT algorithm
[13]. For each M, two different discrete Fourier transforms were then constructed. The first
one was calculated as the Moore–Penrose inverse of E−1
Λ(t), using a time sampling which
minimized κ(E−1
Λ), and the second one using Eq. (25) and a time sampling that minimized
κ(E−1
Λ). These minima were also obtained with the OPT algorithm.
The variation of the numerical alias error with Mfor the multiple frequency case is
presented in Fig. 7a. From this figure, it can be seen that for this case the suggested approach
effectively eliminates aliasing once M≥17. Calculating EΛ(t)as the Moore–Penrose
inverse of E−1
Λ(t)does on the other hand not eliminate aliasing for any M. These results once
again indicate that the definition of EΛ(t)can have a significant effect on aliasing. The fact that
aliasing also is effectively eliminated despite the fact that not all the unresolved frequencies
are accounted for in the construction of EΛ(t)is also interesting, since this suggests that
there could exist a generalization of Orszag’s rule for multiple frequency problems. That is,
it is not necessary to construct EΛ(t)in Eq. (25) such that all the unresolved sinusoids can be
distinguished, only such that the unresolved ones alias onto those with frequencies in Λ\Λ.
The variation of EΛE−1
Λ\Λ2with Mfor the multiple frequency case is shown in Fig. 7b.
This figure shows that the trend of EΛE−1
Λ\Λ2once again follows that of the numerical
alias error as the number of sampling points increase.
A comment on the point corresponding to M=15 in Fig. 7should also be made. In this
point, it can be seen that the numerical alias error is the largest for the case when EΛ(t)is
computed based on Eq. (25). At first, this might seem counter intuitive since more information
about the unresolved sinusoids is included in the DFT compared to e.g. M=5. A possible
explanation for this can be found in Fig. 7c. This figure shows that the largest value of κ(E−1
Λ)
is obtained for M=15. As such, it can be expected that EΛ(t)is the least robust against
aliasing for M=15. Thus, if not all the unresolved frequencies alias onto the frequencies in
Λ\Λ, which can not be guaranteed, this sampling may very well generate more aliasing than
another one that uses less sampling points and have a lower condition number. It is however
not known at this point whether the relatively large value of κ(E−1
Λ)for M=15 is due to
the fact that the OPT algorithm was unable to find the global optima or not.
4 Conclusions
It is well known that aliasing may occur when the harmonic balance method [16,33,34]is
applied to nonlinear problems. In the present paper, aliasing is studied in detail for the case
when the harmonic balance method is used to solve first order ordinary differential equations
which are nonlinear functions of the solution variables. It is shown that aliasing occurs as
a result of the fact that the harmonic balance method approximates the Fourier coefficients
of a nonlinear function by a discrete Fourier transform (DFT). Although this is already well
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
65 Page 18 of 23 Journal of Scientific Computing (2022) 91 :65
(a)(b)
(c)
Fig. 7 Variation of numerical alias error, EΛE−1
Λ\Λ2and κwith number of sampling points. Λ=
{0,1,√2,−√2,−1}·ω,F1=F2=0.04, ζ=0.1, ω1=ω,ω2=√2ω,ω∈(0,2)
known, the aliasing of each unresolved frequency onto the resolved ones is here given a
precise meaning by introducing a new operator that governs aliasing. This operator, referred
to as the alias operator, is derived for the general case when the almost periodic Fourier
transform (APFT) [26] is used in the harmonic balance method. As such, the alias operator
can be used to study aliasing in both single frequency as well as multiple frequency harmonic
balance computations.
Using the norm of the newly introduced alias operator as a metric, the best sampling
strategy for single and multiple frequency harmonic balance computations is investigated. It
is found that for single frequency problems, the widely adopted uniform sampling approach
is optimal. This sampling is also known to minimize the condition number of the DFT matrix
[26]. For the general case with multiple fundamental frequencies, the time sampling that
minimizes the condition number of the DFT matrix seems to be close, but not identical, to
the time sampling that minimizes the norm of the alias operator. A low condition number and
norm of the alias operator is also shown to give a smaller alias error in numerical simulations
of the Duffing Oscillator. The results presented in this paper therefore demonstrate that the
condition number of the DFT matrix is a reasonable metric for selecting a time sampling, as
has previously been done by e.g. [13,21,25–27,35,37].
Another important finding from the present work is that the alias error is only bounded
by, but not strongly correlated with, the condition number. This does in turn imply that the
time sampling must give a condition number which is close to the global optimum if the alias
error is to be minimized. Therefore, in cases when an optimization algorithm is used to find
the time sampling, it is important that it converges well. In the present work, it is found that
the OPT algorithm introduced in [13] performs very well.
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Journal of Scientific Computing (2022) 91 :65 Page 19 of 23 65
Employing the APFT in combination with oversampling is also considered in this work.
In this case, the DFT matrix is defined as a left inverse of the inverse DFT matrix. Previous
studies have used the Moore–Penrose inverse for this purpose [5,6,21]. In the present
work, however, it is shown that this left inverse in general can not eliminate aliasing in the
multiple frequency case. Based on this finding, a new left inverse that can eliminate aliasing
completely is introduced. This new left inverse is also shown to perform better in general
than the Moore–Penrose inverse on the Duffing Oscillator. Based on these observations, it is
suggested that the newly introduced left inverse is used in favor of the Moore–Penrose inverse
when oversampling is employed in multiple frequency harmonic balance computations based
on the APFT.
The above findings for the case of oversampling apply both to the abstract metric defined by
the norm of the aliasing operator and to the measured alias error in the numerical experiments.
In contrast, the conditon number could not be used as a criterion to distinguish samplings
that were optimal with regard to aliasing. It is therefore concluded that the norm of the alias
operator contains valuable information about the quality of a given sampling strategy.
It should finally be noted that both the alias error and the harmonic truncation error
encountered in the harmonic balance method can be reduced by increasing the number of
frequencies in the computation. In many practical applications, this is unfortunately not
feasible, and good control over the alias error is thus important to achieve accurate results.
In cases when more frequencies can be afforded, however, one must be mindful of the
computational complexity of the APFT, which scales as O(M2). To overcome this limitation,
the Non Uniform Fast Fourier Transform (NUFFT) of type three could be used instead [4,
30]. The theory developed in this paper would however need to be adapted for the NUFFT.
Acknowledgements The first author would like to express his gratitude towards the German Aerospace Center
(DLR) in Cologne for hosting him during a 6 month research visity in the spring of 2019.
Funding Open access funding provided by Chalmers University of Technology. The first author has recieved
funding from the Swedish Energy Agency, Grant Agreement No. 2017-00116.
Availability of data and material The datasets generated during and/or analysed during the current study are
available from the corresponding author on reasonable request.
Declarations
Conflict of interest The authors declare that they have no conflict of interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which
permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give
appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence,
and indicate if changes were made. The images or other third party material in this article are included in the
article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is
not included in the article’s Creative Commons licence and your intended use is not permitted by statutory
regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.
To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/ .
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
65 Page 20 of 23 Journal of Scientific Computing (2022) 91 :65
Appendix A Moore–Penrose Inverse with Redefined Inner Product
The goal of this section is to prove that the novel Fourier transformation matrix defined in
Eq. (25) is in fact a generalization of the standard pseudoinversein that it is the Moore–Penrose
inverse with respect to a generalized inner product on the space of sampled functions.
Let Λ ={0,ω
1,ω
2,...,ω
K,ω
−K,...,ω
−1}be a spectrum that contains a strictly
smaller spectrum Λ, the latter representing the resolved frequencies. Assume that t=
[t0,...,tM−1]Tis a sampling point distribution such that M =#Λ =2K +1and
such that E−1
Λ (t)is invertible. Consider the space of real-valued discrete functions on t.Such
a function fcan be viewed as an element in RM, where each component ficorresponds
to the value of fat the sampling point ti. Instead of the standard inner product on RM we
define an inner product on the space of sampled functions by pulling back the standard inner
product of CM R2M using the Fourier transformation EΛ (t), i.e., we set
f,g:=EΛ(t)f,EΛ(t)g,(31)
for two discrete functions fand g.Thatis, EΛ (t)becomes an isometry with respect to these
inner products, i.e., it preserves lengths and angles. An immediate consequence of (31)is
that
(EΛ(t))∗=E−1
Λ (t).
Here, the symbol ∗refers to the adjoint with respect to the corresponding inner products. It
is defined as
(EΛ(t))∗ˆ
f,g=ˆ
f,EΛ(t)g,
for all Fourier coefficient vectors ˆ
fand discrete functions g. Moreover, note that we can write
the oversampled reconstruction operator E−1
Λ(t)as the composition of the reconstruction
operator E−1
Λ (t)and the natural embedding operator ιΛ,Λ :R2M→R2M, which, loosely
speaking, just fills up the Fourier coefficient vector with zeros,
(ιΛ,Λ ˆ
f)ω=ˆ
fω,if ω∈Λ,
0,otherwise.
Hence,
E−1
Λ(t)=E−1
Λ (t)ι
Λ,Λ,
The adjoint of ιΛ,Λ is the projection onto the first Kharmonics, denoted by πΛ,Λ, i.e.,
the operator that “forgets” the Fourier coefficients with frequencies in Λ \Λ. The Moore–
Penrose inverse of E−1
Λ(t)is thus given by
(E−1
Λ(t))+=(E−1
Λ(t))∗E−1
Λ(t)−1
(E−1
Λ(t))∗
=πΛ,Λ (E−1
Λ (t))∗E−1
Λ (t)ιΛ,Λ−1
πΛ,Λ (E−1
Λ (t))∗
=πΛ,Λ ιΛ,Λ−1πΛ,Λ EΛ (t)
=πΛ,Λ EΛ (t), (32)
wherewehaveusedthatπΛ,Λ ιΛ,Λ is the identity. Moreover, the kernel of the Moore–
Penrose inverse is given by
ker (E−1
Λ(t))+=ker πΛ,Λ EΛ (t)
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Journal of Scientific Computing (2022) 91 :65 Page 21 of 23 65
=E−1
Λ (t)ker πΛ,Λ .(33)
The kernel thus consists of all discrete functions fthat are reconstructed from linear combi-
nations of harmonics with frequencies in Λ \Λ, i.e. the unresolved frequencies.
Appendix B Choice of Numerical Optimization Algorithm
Two different optimization procedures were tested in this work. The first one was the OPT
algorithm proposed by Guedeney et al. [13]. This algorithm is divided into two steps. In the
first step, the objective function is evaluated for a very large number of equidistant time-
samplings. In the second step, the best sampling is used to initialize an optimization based
on the L-BFGS-B algorithm. The OPT algorithm thus benefits from both the strengths of a
global search and a local optimization. The OPT algorithm was implemented in the Python
programming language using the L-BFGS-B algorithm available in SciPy [20]. The second
optimization procedure that was employed was the Differential Evolution (DE) algorithm.
DE is an evolutionary algorithm that uses mutation, recombination and tournament selection
to evolve a large population (set of different time samplings) over several generations. In
particular, DE benefits from a very efficient mutation step based on computing parameter
differences between two (or more) individuals. In this work, the DE implementation available
in SciPy was utilized.
In all optimizations the optimizer was allowed to modify all but the first time instance,
which was set to zero. A constraint was also added in all optimizations to ensure that the
time samples remained ordered, i.e. that ti>tjif i>j. This was done to ensure that several
optima, corresponding to different permutations of the time sampling, could not be found by
the optimizer. When the norm of the alias operator, or the maximum value of the bounding
coefficient αΛ, Λ,t, were optimized, an additional constraint was imposed which ensured
that the condition number of E−1
Λ(t)did not exceed the value of 103. This guarantees that the
inversion of E−1
Λ(t)remains a well-posed problem for all time samplings that came out of
the optimization. All constraints were furthermore implemented with Lagrange multipliers.
Comparisons between the OPT and DE algorithms showed that they often give very
similar results. The OPT algorithm was however found to be substantially faster than the
DE algorithm. It is believed that one of the main reasons for this is that the time-samplings
obtained from the mutation step in DE are not necessarily ordered. This will in turn lead to a
large number of mutations that generate individuals that violate the ordering constraint, and
thus not improve the population. If the time samplings on the other hand are not required to
be ordered, the number of samplings that give an equivalent objective function will be M!.
For large M, this implies that each individual can have the same objective function value, but
different parameter vectors. In terms of DE, which is based on evolving the population using
differences between parameter vectors, this should translate into bad performance since all
individuals are far from each other in the design space. Given these difficulties with the DE
algorithm for the particular problems considered in this work, it was decided to employ the
OPT algorithm.
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
65 Page 22 of 23 Journal of Scientific Computing (2022) 91 :65
References
1. Besicovitch, A.S.: Almost Periodic Functions. Cambridge University Press, Cambridge (1932)
2. Chua, L., Ushida, A.: Algorithms for computing almost periodic steady-state response of nonlinear sys-
tems to multiple input frequencies. IEEE Trans. Circuits Syst. 28(10), 953–971 (1981). https://doi.org/
10.1109/TCS.1981.1084921
3. Djeddi, R., Ekici, K.: Resolution of Gibbs phenomenon using a modified pseudo-spectral operator in
harmonic balance CFD solvers. Int. J. Comput. Fluid Dyn. 30(7–10), 495–515 (2016). https://doi.org/10.
1080/10618562.2016.1242726
4. Dutt, A., Rokhlin, V.: Fast Fourier transforms for nonequispaced data. SIAM J. Sci. Comput. 14(6),
1368–1393 (1993). https://doi.org/10.1137/0914081
5. Ekici, K., Hall, K.C.: Nonlinear analysis of unsteady flows in multistage turbomachines using harmonic
balance. AIAA J. 45(5), 1047–1057 (2007). https://doi.org/10.2514/1.22888
6. Ekici, K., Hall, K.C.: Nonlinear frequency-domain analysis of unsteady flows in turbomachinery with
multiple excitation frequencies. AIAA J. 46(8), 1912–1920 (2008). https://doi.org/10.2514/1.26006
7. Frey, C., Ashcroft, G., Kersken, H.P.: Simulations of unsteady blade row interactions using linear and
non-linear frequency domain methods. In: ASME Turbo Expo 2015: Turbine Technical Conference and
Exposition, GT2015-43453 (2015). https://doi.org/10.1115/GT2015-43453
8. Frey, C., Kersken, H.P., Ashcroft, G., Voigt, C.: A harmonic balance technique for multistage turbo-
machinery applications. In: ASME Turbo Expo 2014: Turbine Technical Conference and Exposition,
GT2014-25230 (2014). https://doi.org/10.1115/GT2014-25230
9. Gelb, A., Gottlieb, S.: The resolution of the Gibbs phenomenon for Fourier spectral methods. In: Jerri,
A. (ed.) Advances in the Gibbs Phenomenon. Sampling Publishing, Potsdam (2007)
10. Gilmore, R.J., Steer, M.B.: Nonlinear circuit analysis using the method of harmonic balance—a review
of the art. Part I. Introductory concepts. Int. J. Microw. Millim. Wave Comput. Aided Eng. 1(1), 22–37
(1991). https://doi.org/10.1002/mmce.4570010104
11. Gilmore, R.J., Steer, M.B.: Nonlinear circuit analysis using the method of harmonic balance—a review
of the art. Part II. Advanced concepts. Int. J. Microw. Millim. Wave Comput. Aided Eng. 1(2), 159–180
(1991). https://doi.org/10.1002/mmce.4570010205
12. Gottlieb, D., Shu, C.W.: On the Gibbs phenomenon and its resolution. SIAM Rev. 39(4), 644–668 (1997).
https://doi.org/10.1137/S0036144596301390
13. Guédeney, T., Gomar, A., Gallard, F., Sicot, F., Dufour, G., Pugit, G.: Non-uniform time sampling for
multiple-frequency harmonic balance computations. J. Comput. Phys. 236, 317–345 (2013). https://doi.
org/10.1016/j.jcp.2012.11.010
14. Guskov, M., Thouverez, F.: Harmonic balance-based approach for quasi-periodic motions and stability
analysis. J. Vib. Acoust. 134(3), 031003-1-031003–11 (2012). https://doi.org/10.1115/1.4005823
15. Hall, K.C., Crawely, E.F.: Calculation of unsteady flows in turbomachinery using the linearized Euler
equations. AIAA J. 27(6), 777–787 (1989). https://doi.org/10.2514/3.10178
16. Hall, K.C., Jeffrey, P.T., Clark, W.S.: Computation of unsteady nonlinear flows in cascades using a
harmonic balance technique. AIAA J. 40(5), 879–886 (2002). https://doi.org/10.2514/2.1754
17. He, L.: Fourier methods for turbomachinery applications. Prog. Aerosp. Sci. 46(8), 329–341 (2010).
https://doi.org/10.1016/j.paerosci.2010.04.001
18. Heners, J.P., Vogt, D.M., Frey, C., Ashcroft, G.: Investigation of the impact of unsteady turbulence effects
on the aeroelastic analysis of a low-pressure turbine rotor blade. J. Turbomach. (2019). https://doi.org/
10.1115/1.4043950
19. Huang, H., Ekici, K.: Stabilization of high-dimensional harmonic balance solvers using time spectral
viscosity. AIAA J. 52(8), 1784–1794 (2014). https://doi.org/10.2514/1.J052698
20. Jones, E., Oliphant, T., Peterson, P., et al.: SciPy: open source scientific tools for Python (2001–). http://
www.scipy.org/ [Version 1.2.2]
21. Junge, L., Ashcroft, G., Kersken, H.P., Frey, C.: On the development of harmonic balance methods for
multiple fundamental frequencies. In: ASME Turbo Expo 2018: Turbomachinery Technical Conference
and Exposition, GT2018-75495 (2018). https://doi.org/10.1115/GT2018-75495
22. Junge, L., Frey, C., Ashcroft, G., Kügeler, E.: A new harmonic balance approach using multidimensional
time. J. Eng. Gas Turbines Power 143(8), 081007-1–08100711 (2021). https://doi.org/10.1115/1.4049698
23. Kotel’nikov, V.A.: On the carrying capacity of the “ether” and wire in telecommunications. In: Material
for the First All-Union Conference on Questions of Communications (Russian), Izd., Red. Upr. Svyazi
RKKA
24. Krack, M., Gross, J.: Harmonic Balance for Nonlinear Vibration Problems. Mathematical Engineering.
Springer, Cham (2019). https://doi.org/10.1007/978- 3-030- 14023-6
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
Journal of Scientific Computing (2022) 91 :65 Page 23 of 23 65
25. Kundert, K.S., Sorkin, G.B., Sangiovanni-Vincentelli, A.: Applying harmonic balance to almost periodic
circuits. IEEE Trans. Microw. Theory Tech. 36(2), 366–378 (1988). https://doi.org/10.1109/22.3525
26. Kundert, K.S., White, J.K., Sangiovanni-Vincentelli, A.: Steady-State Methods for Simulating Analog
and Microwave Circuits, The Kluwer International Series in Engineering and Computer Science, vol. 94.
Kluwer Academic Publishers, Norwel (1990). https://doi.org/10.1007/978-1-4757-2081-5
27. Kunisch, J., Wolff, I.: Determination of sampling points for nearly DFT-equivalent almost-periodic Fourier
transforms. In: 1993 23rd European MicrowaveConference (1993). https:// doi.org/10.1109/EUMA.1993.
336680
28. LaBryer, A., Attar, P.J.: High dimensional harmonic balance dealiasing techniques for a Duffing oscillator.
J. Sound Vib. 324(3–5), 1016–1038 (2009). https://doi.org/10.1016/j.jsv.2009.03.005
29. LaBryer, A., Attar, P.J.: A harmonic balance approach for large scale problems in nonlinear structural
dynamics. Comput. Struct. 88(17–18), 1002–1014 (2010). https://doi.org/10.1016/j.compstruc.2010.06.
003
30. Lee, J.Y., Greengard, L.: The type 3 nonuniform FFT and its applications. J. Comput. Phys. 206(1), 1–5
(2005). https://doi.org/10.1016/j.jcp.2004.12.004
31. Liu, L., Thomas, J.P., Dowell, E.H., Attar, P., Hall, K.C.: A comparison of classical and high dimensional
harmonic balance approaches for a Duffing oscillator. J. Comput. Phys. 215(1), 298–320 (2006). https://
doi.org/10.1016/j.jcp.2005.10.026
32. McMullen, M., Jameson, A., Alonso, J.: Demonstration of nonlinear frequency domain methods. AIAA
J. 44(7), 1428–1435 (2006). https://doi.org/10.2514/1.15127
33. McMullen, M.S., Jameson, A.: The computational efficiency of non-linear frequency domain methods.
J. Comput. Phys. 212(2), 637–661 (2006). https://doi.org/10.1016/j.jcp.2005.07.021
34. Nakhla, M., Valch, J.: A piecewise harmonic balance technique for determination of periodic response of
nonlinear systems. IEEE Trans. Circuits Syst. 23(2), 85–91 (1976). https://doi.org/10.1109/TCS.1976.
1084181
35. Nimmagadda, S., Economon, T.D., Alonso, J.J., da Silva, C.R.I.: Robust uniform time sampling approach
for the harmonic balance method. In: 46th AIAA Fluid Dynamics Conference, AIAA Paper 2016-3966
(2016). https://doi.org/10.2514/6.2016-3966
36. Orszag, S.A.: On the elimination of aliasing in finite-difference schemes by filtering high-
wavenumber components. J. Atmos. Sci. 28(6), 1074 (1971). https://doi.org/10.1175/1520-
0469(1971)028<1074:OTEOAI>2.0.CO;2
37. Rodrigues, P.J.C.: An orthogonal almost-periodic Fourier transform for use in nonlinear circuit simulation.
IEEE Microw. Guided Wave Lett. 4(3), 74–76 (1994). https://doi.org/10.1109/75.275585
38. Shannon, C.E.: Communication in the presence of noise. Proc. IRE 37, 10–21 (1949)
39. Steer, M.B., Chang, C.R., Rhyne, G.W.: Computer-aided analysis of nonlinear microwave circuits using
frequency-domain nonlinear analysis techniques: the state of the art. Int. J. Microw. Millim. Wave Comput.
Aided Eng. 1(2), 181–200 (1991). https://doi.org/10.1002/mmce.4570010206
40. Whittaker, E.T.: On the functions which are represented by the expansion of interpolating theory. Proc.
R. Soc. Edinb. 35, 181–194 (1915)
Publisher’s Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and
institutional affiliations.
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
1.
2.
3.
4.
5.
6.
Terms and Conditions
Springer Nature journal content, brought to you courtesy of Springer Nature Customer Service Center
GmbH (“Springer Nature”).
Springer Nature supports a reasonable amount of sharing of research papers by authors, subscribers
and authorised users (“Users”), for small-scale personal, non-commercial use provided that all
copyright, trade and service marks and other proprietary notices are maintained. By accessing,
sharing, receiving or otherwise using the Springer Nature journal content you agree to these terms of
use (“Terms”). For these purposes, Springer Nature considers academic use (by researchers and
students) to be non-commercial.
These Terms are supplementary and will apply in addition to any applicable website terms and
conditions, a relevant site licence or a personal subscription. These Terms will prevail over any
conflict or ambiguity with regards to the relevant terms, a site licence or a personal subscription (to
the extent of the conflict or ambiguity only). For Creative Commons-licensed articles, the terms of
the Creative Commons license used will apply.
We collect and use personal data to provide access to the Springer Nature journal content. We may
also use these personal data internally within ResearchGate and Springer Nature and as agreed share
it, in an anonymised way, for purposes of tracking, analysis and reporting. We will not otherwise
disclose your personal data outside the ResearchGate or the Springer Nature group of companies
unless we have your permission as detailed in the Privacy Policy.
While Users may use the Springer Nature journal content for small scale, personal non-commercial
use, it is important to note that Users may not:
use such content for the purpose of providing other users with access on a regular or large scale
basis or as a means to circumvent access control;
use such content where to do so would be considered a criminal or statutory offence in any
jurisdiction, or gives rise to civil liability, or is otherwise unlawful;
falsely or misleadingly imply or suggest endorsement, approval , sponsorship, or association
unless explicitly agreed to by Springer Nature in writing;
use bots or other automated methods to access the content or redirect messages
override any security feature or exclusionary protocol; or
share the content in order to create substitute for Springer Nature products or services or a
systematic database of Springer Nature journal content.
In line with the restriction against commercial use, Springer Nature does not permit the creation of a
product or service that creates revenue, royalties, rent or income from our content or its inclusion as
part of a paid for service or for other commercial gain. Springer Nature journal content cannot be
used for inter-library loans and librarians may not upload Springer Nature journal content on a large
scale into their, or any other, institutional repository.
These terms of use are reviewed regularly and may be amended at any time. Springer Nature is not
obligated to publish any information or content on this website and may remove it or features or
functionality at our sole discretion, at any time with or without notice. Springer Nature may revoke
this licence to you at any time and remove access to any copies of the Springer Nature journal content
which have been saved.
To the fullest extent permitted by law, Springer Nature makes no warranties, representations or
guarantees to Users, either express or implied with respect to the Springer nature journal content and
all parties disclaim and waive any implied warranties or warranties imposed by law, including
merchantability or fitness for any particular purpose.
Please note that these rights do not automatically extend to content, data or other material published
by Springer Nature that may be licensed from third parties.
If you would like to use or distribute our Springer Nature journal content to a wider audience or on a
regular basis or in any other manner not expressly permitted by these Terms, please contact Springer
Nature at
onlineservice@springernature.com