# Distributional stability of the Szarek
and Ball inequalities

Alexandros Eskenazis  (A. E.) CNRS, Institut de Mathématiques de Jussieu,
Sorbonne Université, France and Trinity College, University of Cambridge, UK.
<EMAIL_ADDRESS><EMAIL_ADDRESS>,  Piotr Nayar  (P. N.)
University of Warsaw, 02-097 Warsaw, Poland.  nayar<EMAIL_ADDRESS>and  Tomasz
Tkocz  (T. T.) Carnegie Mellon University, Pittsburgh, PA 15213, USA.
<EMAIL_ADDRESS>
###### Abstract.

We prove an extension of Szarek’s optimal Khinchin inequality (1976) for
distributions close to the Rademacher one, when all the weights are uniformly
bounded by a $1/\sqrt{2}$ fraction of their total $\ell_{2}$-mass. We also
show a similar extension of the probabilistic formulation of Ball’s cube
slicing inequality (1986). These results establish the distributional
stability of these optimal Khinchin-type inequalities. The underpinning to
such estimates is the Fourier-analytic approach going back to Haagerup (1981).

This material is based upon work supported by the NSF grant DMS-1929284 while
A. E. was in residence at ICERM for the Harmonic Analysis and Convexity
program. P.N.’s research was supported by the National Science Centre, Poland,
grant 2018/31/D/ST1/0135. T.T.’s research was supported by the NSF grant
DMS-1955175.

2010 Mathematics Subject Classification. Primary 60E15; Secondary 42A38,
26D15, 60G50.

Key words. Khinchin inequality, sums of independent random variables, moment
comparison, cube slicing.

##  1\. Introduction

Let $\varepsilon_{1},\varepsilon_{2},\dots$ be independent identically
distributed (i.i.d.) Rademacher random variables, that is, symmetric random
signs satisfying $\mathbb{P}\left(\varepsilon_{j}=\pm 1\right)=\frac{1}{2}$.
Motivated by his study of bilinear forms on infinitely many variables,
Littlewood conjectured in [26] (see also [15]) the following inequality: for
every $n\geq 1$ and every unit vector $a$ in $\mathbb{R}^{n}$, we have

(1)
$\mathbb{E}\left|\sum_{j=1}^{n}a_{j}\varepsilon_{j}\right|\geq\mathbb{E}\left|\frac{\varepsilon_{1}+\varepsilon_{2}}{\sqrt{2}}\right|=\frac{1}{\sqrt{2}},$

which is clearly best possible. Not until 46 years after it had been posed,
was this proved by Szarek in [34]. His result was later generalised in a
stunning way to the setting of vector-valued coefficients $a_{j}$ in arbitrary
normed space by Latała and Oleszkiewicz in [24] (see also [30, Section 4.2]
for a modern presentation of their proof using discrete Fourier analysis).
Szarek’s original proof was based mainly on an intricate inductive scheme (see
also [35]). Note that (1) holds trivially if
$\|a\|_{\infty}=\max_{j}|a_{j}|\geq\frac{1}{\sqrt{2}}$, for if, say we have
$|a_{1}|\geq\frac{1}{\sqrt{2}}$, then thanks to independence and convexity,

$\mathbb{E}\left|\sum_{j=1}^{n}a_{j}\varepsilon_{j}\right|\geq\mathbb{E}\left|a_{1}\varepsilon_{1}+\mathbb{E}\sum_{j=2}^{n}a_{j}\varepsilon_{j}\right|=\mathbb{E}|a_{1}\varepsilon_{1}|=|a_{1}|\geq\frac{1}{\sqrt{2}}.$

Haagerup in his pioneering work [14] on Khinchin inequalities offered a very
different approach to the nontrivial regime
$\|a\|_{\infty}\leq\frac{1}{\sqrt{2}}$, using classical Fourier-analytic
integral representations along with tricky estimates for a special function.

Taking that route, the point of this paper is to illustrate the robustness of
Haagerup’s method and extend (1) to i.i.d. sequences of random variables whose
distribution is _close_ to the Rademacher one in the
$\mathsf{W}_{2}$-Wasserstein distance. Using the same framework, we also treat
Ball’s cube slicing inequality from [2] which asserts that the maximal-volume
hyperplane section of the cube $[-1,1]^{n}$ in $\mathbb{R}^{n}$ is attained at
$(1,1,0,\dots,0)^{\perp}$. This can be equivalently stated in probabilistic
terms as an inequality akin to (1) as follows (see, e.g. equation (2) in [6]).
Let $\xi_{1},\xi_{2},\dots$ be i.i.d. random vectors uniform on the unit
Euclidean sphere in $\mathbb{R}^{3}$. For every $n\geq 1$ and every unit
vector $a$ in $\mathbb{R}^{n}$, we have

(2)
$\mathbb{E}\left[\left|\sum_{j=1}^{n}a_{j}\xi_{j}\right|^{-1}\right]\leq\mathbb{E}\left[\left|\frac{\xi_{1}+\xi_{2}}{\sqrt{2}}\right|^{-1}\right]=\sqrt{2},$

where here and throughout $|\cdot|$ denotes the standard Euclidean norm.

Szarek’s inequality (1), Balls inequality (2), as well as these extensions
fall under the umbrella of so-called Khinchin-type inequalities. The archetype
was Khinchin’s result asserting that all $L_{p}$ norms of Rademacher sums
$\sum a_{j}\varepsilon_{j}$ are comparable to its $L_{2}$-norm, established in
his work [22] on the law of the iterated logarithm (and perhaps discovered
independently by Littlewood in [26]). Due to the intricacies of the methods
involved, sharp Khinchin inequalities are known only for a handful of
distributions, most notably random signs ([14, 29]), but also uniforms ([4, 5,
6, 8, 18, 21, 25]), type L ([17, 32]), Gaussian mixtures ([1, 10]), marginals
of $\ell_{p}$-balls ([3, 11]), or distributions with good spectral properties
([23, 33]). The present work makes a first step towards more general
distributions satisfying only a closeness-type assumption instead of imposing
structural properties. Viewing sharp Khinchin-type inequalities as
maximization problems for functionals on the sphere, our results assert,
perhaps surprisingly, the fact that such inequalities are stable with respect
to perturbations of the law of the underlying random vectors. These
_distributional stability_ results are novel in the context of optimal
probabilistic inequalities.

##  2\. Main results

For $p>0$ and a random vector $X$ in $\mathbb{R}^{d}$, we denote its
$L_{p}$-norm with respect to the standard Euclidean norm $|\cdot|$ on
$\mathbb{R}^{d}$ by $\|X\|_{p}=(\mathbb{E}|X|^{p})^{1/p}$, whereas for a
(deterministic) vector $a$ in $\mathbb{R}^{n}$, $\|a\|_{\infty}=\max_{j\leq
n}|a_{j}|$ is its $\ell_{\infty}$-norm. We say that the random vector $X$ in
$\mathbb{R}^{d}$ is symmetric if $-X$ has the same distribution as $X$. We
also recall that the vector $X$ is called rotationally invariant if for every
orthogonal map $U$ on $\mathbb{R}^{d}$, $UX$ has the same distribution as $X$.
Equivalently, $X$ has the same distribution as $|X|\xi$, where $\xi$ is
uniformly distributed on the unit sphere $\mathbb{S}^{d-1}$ in
$\mathbb{R}^{d}$ and independent of $|X|$. Recall that the
$\mathsf{W}_{2}$-Wasserstein distance $\mathsf{W}_{2}(X,Y)$ between (the
distributions of) two random vectors $X$ and $Y$ in $\mathbb{R}^{d}$ is
defined as $\inf_{(X^{\prime},Y^{\prime})}\|X^{\prime}-Y^{\prime}\|_{2}$,
where the infimum is taken over all couplings of $X$ and $Y$, that is, all
random vectors $(X^{\prime},Y^{\prime})$ in $\mathbb{R}^{2d}$ such that
$X^{\prime}$ has the same distribution as $X$ and $Y^{\prime}$ has the same
distribution as $Y$.

Our first result is an extension of Szarek’s inequality (1) which reads as
follows.

######  Theorem 1.

There is a positive universal constant $\delta_{0}$ such that if we let
$X_{1},X_{2},\dots$ be i.i.d. symmetric random variables satisfying

(3) $\big{\|}|X_{1}|-1\big{\|}_{2}\leq\delta_{0},$

then for every $n\geq 3$ and unit vectors $a$ in $\mathbb{R}^{n}$ with
$\|a\|_{\infty}\leq\frac{1}{\sqrt{2}}$, we have

(4)
$\mathbb{E}\left|\sum_{j=1}^{n}a_{j}X_{j}\right|\geq\mathbb{E}\left|\frac{X_{1}+X_{2}}{\sqrt{2}}\right|.$

Moreover, we can take $\delta_{0}=10^{-4}$.

Note that left hand side of (3) is nothing but the
$\mathsf{W}_{2}$-Wasserstein distance between the distribution of $X_{1}$ and
the Rademacher distribution since $|x\pm 1|\geq\big{|}|x|-1\big{|}$ for
$x\in\mathbb{R}$ and thus the optimal coupling of the two distributions is
$\big{(}X_{1},\mathrm{sign}(X_{1})\big{)}$.

Our second main result provides an analogous extension for Ball’s inequality
(2).

######  Theorem 2.

Let $X_{1},X_{2},\dots$ be i.i.d. symmetric random vectors in
$\mathbb{R}^{3}$. Suppose their common characteristic function
$\phi(t)=\mathbb{E}e^{i\\!\left\langle t,X_{1}\right\rangle\\!}$ satisfies

(5) $\left|\phi(t)\right|\leq\frac{C_{0}}{|t|},\qquad
t\in\mathbb{R}^{3}\setminus\\{0\\},$

for some constant $C_{0}>0$. Assume that

(6) $\mathsf{W}_{2}(X_{1},\xi)\leq
10^{-38}C_{1}^{-9}\min\big{\\{}(\mathbb{E}|X_{1}|^{3})^{-6},1\big{\\}},$

where $C_{1}=\max\\{C_{0},1\\}$ and $\xi$ is a random vector uniform on the
unit Euclidean sphere $\mathbb{S}^{2}$ in $\mathbb{R}^{3}$. Then for every
$n\geq 3$ and unit vectors $a$ in $\mathbb{R}^{n}$ with
$\|a\|_{\infty}\leq\frac{1}{\sqrt{2}}$, we have

(7)
$\mathbb{E}\left|\sum_{j=1}^{n}a_{j}X_{j}\right|^{-1}\leq\mathbb{E}\left|\frac{X_{1}+X_{2}}{\sqrt{2}}\right|^{-1}.$

Plainly, if we know that $X_{1}$ and $\xi$ are sufficently close in
$\mathsf{W}_{3}$, then the parameter $\mathbb{E}|X_{1}|^{3}$ in (6) is
redundant. In contrast to Theorem 1, here the closeness assumption (6) is put
in terms of two parameters of the distribution: its third moment and the
polynomial decay of its characteristic function. It is not clear whether this
is essential. At the technical level of our proofs, the third moment is needed
to carry out a certain Gaussian approximation, whilst the decay assumption has
to do with an a priori lack of integrability in the Fourier-analytic
representation of the $L_{-1}$ norm (as opposed to the $L_{1}$-norm handled in
Theorem 1).

On the other hand, neither of these is very restrictive. In particular, if
$X_{1}$ has a density $f$ on $\mathbb{R}^{3}$ vanishing at $\infty$ whose
gradient is integrable, then

$\displaystyle|t||\phi(t)|\leq\sum_{j=1}^{3}|t_{j}\phi(t)|=\sum_{j=1}^{3}\left|\int_{\mathbb{R}^{3}}t_{j}e^{i\\!\left\langle
t,x\right\rangle\\!}f(x)\mathrm{d}x\right|$
$\displaystyle=\sum_{j=1}^{3}\left|\int_{\mathbb{R}^{3}}ie^{i\\!\left\langle
t,x\right\rangle\\!}\partial_{j}f(x)\mathrm{d}x\right|$
$\displaystyle\leq\sqrt{3}\int_{\mathbb{R}^{3}}|\nabla f(x)|\mathrm{d}x,$

so (5) holds with $C_{0}=\sqrt{3}\int_{\mathbb{R}^{3}}|\nabla f|$.

Another natural sufficient condition is the rotational invariance of $X_{1}$:
if, say, $X_{1}$ has the same distribution as $R\xi$, for a nonnegative random
variable $R$ and an independent of it random vector $\xi$ uniform on the unit
sphere $\mathbb{S}^{2}$, then Archimedes’ Hat-Box theorem implies that
$\\!\left\langle t,R\xi\right\rangle\\!$, conditioned on the value of $R$, is
uniform on $[-R|t|,R|t|]$ and thus

$|\phi(t)|=|\mathbb{E}_{R}\mathbb{E}_{\xi}e^{i\\!\left\langle
t,R\xi\right\rangle\\!}|=\left|\mathbb{E}_{R}\frac{\sin(R|t|)}{R|t|}\right|\leq\frac{\mathbb{E}R^{-1}}{|t|}=\frac{\mathbb{E}|X_{1}|^{-1}}{|t|}.$

Moreover, in this case $\mathsf{W}_{2}(X_{1},\xi)=\|R-1\|_{2}$ (since for
every unit vectors $\theta,\theta^{\prime}$ in $\mathbb{R}^{d}$ and $R\geq 0$,
we have $|R\theta-\theta^{\prime}|\geq|R-1|$, as is easily seen by squaring).
Probabilistically, this is an important special case as it yields results for
symmetric unimodal distributions on $\mathbb{R}$. Indeed, if $X$ is of the
form $R\xi$ as above, for $q>-1$, we have the identity

(8)
$\mathbb{E}\left|\sum_{j=1}^{n}a_{j}X_{j}\right|^{q}=\mathbb{E}\left|\sum_{j=1}^{n}a_{j}R_{j}\xi_{j}\right|^{q}=(1+q)\mathbb{E}\left|\sum_{j=1}^{n}a_{j}R_{j}U_{j}\right|^{q},$

where the $R_{j}$ are i.i.d. copies of $R$ and the $U_{j}$ are i.i.d. uniform
random variables on $[-1,1]$, independent of the $R_{j}$ (see Proposition 4 in
[19]). The $R_{j}U_{j}$ showing up in this formula can have any symmetric
unimodal distribution, uniquely defined by the distribution of $R_{j}$. Thus,
if $V_{1},V_{2},\dots$ be i.i.d. symmetric unimodal random variables, Theorem
2 then immediately yields a sharp upper bound on
$\lim_{q\downarrow-1}(1+q)\mathbb{E}\left|\sum_{j=1}^{n}a_{j}X_{j}\right|^{q}$
for all unit vectors $a$ with $\|a\|_{\infty}\leq\frac{1}{\sqrt{2}}$ (cf. [6,
5, 11, 25]).

A result in the same vein as Theorem 2 is König and Koldobsky’s extension [19]
of Ball’s cube slicing inequality to product measures with densities
satisfying certain regularity and moment assumptions. Their result also
applies specifically to vectors of weights satisfying the small coefficient
condition $\|a\|_{\infty}\leq\tfrac{1}{\sqrt{2}}$.

Approached differently, _full_ extensions of (1) and (2) (i.e. without the
small coefficient restriction on $a$) have been obtained in our recent work
[12] for a very special family of distributions corresponding geometrically to
extremal sections and projections of $\ell_{p}$-balls.

##  3\. Proof of Theorem 1

Our approach builds on Haagerup’s slick Fourier-analytic proof from [14]. We
let

(9) $\phi(t)=\mathbb{E}e^{itX_{1}},\qquad t\in\mathbb{R},$

be the characteristic function of $X_{1}$. Using the elementary Fourier-
integral representation

$|x|=\frac{1}{\pi}\int_{\mathbb{R}}(1-\cos(tx))t^{-2}\mathrm{d}t,\qquad
x\in\mathbb{R},$

as well as the symmetry and independence of the $X_{j}$, we have,

(10) $\displaystyle\mathbb{E}\left|\sum_{j=1}^{n}a_{j}X_{j}\right|$
$\displaystyle=\frac{1}{\pi}\int_{\mathbb{R}}\left(1-\text{Re
}\mathbb{E}e^{it\sum
a_{j}X_{j}}\right)t^{-2}\mathrm{d}t=\frac{1}{\pi}\int_{\mathbb{R}}\left(1-\prod_{j=1}^{n}\phi(a_{j}t)\right)t^{-2}\mathrm{d}t$

(see also Lemma 1.2 in [14]). If $a$ is a unit vector in $\mathbb{R}^{n}$ with
nonzero components, using the AM-GM inequality, we obtain Haagerup’s lower
bound

(11)
$\mathbb{E}\left|\sum_{j=1}^{n}a_{j}X_{j}\right|\geq\sum_{j=1}^{n}a_{j}^{2}\Psi(a_{j}^{-2}),$

where

(12)
$\Psi(s)=\frac{1}{\pi}\int_{\mathbb{R}}\left(1-\left|\phi\left(\frac{t}{\sqrt{s}}\right)\right|^{s}\right)t^{-2}\mathrm{d}t,\qquad
s>0.$

(see Lemma 1.3 in [14]). The crucial lemma reads as follows.

######  Lemma 3.

Under the assumptions of Theorem 1, we have $\Psi(s)\geq\Psi(2)$ for every
$s\geq 2$.

If we take the lemma for granted, the proof of Theorem 1 is finished because
the small coefficient assumption $\|a\|_{\infty}\leq\frac{1}{\sqrt{2}}$ gives
$\Psi(a_{j}^{-2})\geq\Psi(2)$ for each $j$, and as a result we get

$\mathbb{E}\left|\sum_{j=1}^{n}a_{j}X_{j}\right|\geq\Psi(2)=\frac{1}{\pi}\int_{\mathbb{R}}\left(1-\left|\phi\left(\frac{t}{\sqrt{2}}\right)\right|^{2}\right)t^{-2}\mathrm{d}t=\mathbb{E}\left|\frac{X_{1}+X_{2}}{\sqrt{2}}\right|,$

where the last equality is justified by (10).

It remains to prove Lemma 3. To this end, we recall that if the $X_{j}$ were
Rademacher random variables, then the special function $\Psi$ becomes

(13)
$\Psi_{0}(s)=\frac{1}{\pi}\int_{\mathbb{R}}\left(1-\left|\cos\left(\frac{t}{\sqrt{s}}\right)\right|^{s}\right)t^{-2}\mathrm{d}t,\qquad
s>0.$

Haagerup showed that for every $s>0$,

(14) $\Psi_{0}(s)=\frac{2}{\sqrt{\pi
s}}\frac{\Gamma\left(\frac{s+1}{2}\right)}{\Gamma\left(\frac{s}{2}\right)}=\sqrt{\frac{2}{\pi}}\prod_{k=0}^{\infty}\Big{(}1-1/(s+2k+1)^{2}\Big{)}^{1/2}$

and concluded by the product representation that $\Psi_{0}$ is strictly
increasing. In particular, Lemma 3 holds in the Rademacher case due to
monotonicity. The rest of the proof builds exactly on this observation: we
show that the closeness of distributions guarantees that $\Psi$ and $\Psi_{0}$
are close for, say $s\geq 3$, and that their derivatives are close for $2\leq
s\leq 3$. Crucially, not only do we know that $\Psi_{0}$ is strictly monotone,
but also we can get a good bound on its derivative near the endpoint $s=2$,
which we record now for future use.

######  Lemma 4.

We have

(15) $\inf_{2\leq s\leq
3}\Psi_{0}^{\prime}(s)\geq\frac{\zeta(3)-1}{8\sqrt{2}}=0.01785...$

###### Proof.

Differentiating Haagerup’s product expression (14) term-by-term yields

$\displaystyle\Psi_{0}^{\prime}(s)$
$\displaystyle=\frac{\mathrm{d}}{\mathrm{d}s}\sqrt{\frac{2}{\pi}}\prod_{k=0}^{\infty}\Big{(}1-(s+2k+1)^{-2}\Big{)}^{1/2}$
$\displaystyle=\Psi_{0}(s)\sum_{k=0}^{\infty}\Big{(}1-(s+2k+1)^{-2}\Big{)}^{-1}(s+2k+1)^{-3}$
$\displaystyle\geq\Psi_{0}(2)\sum_{k=0}^{\infty}(2k+4)^{-3}=\frac{1}{\sqrt{2}}\frac{\zeta(3)-1}{8}.\qquad\qquad\qed$

The rest of this section is devoted to the proof of Lemma 3. We break it into
several parts.

###  3.1. A uniform bound on the characteristic function

######  Lemma 5.

Let $X$ be a symmetric random variable satisfying (3). Then its characteristic
function $\phi(t)=\mathbb{E}e^{itX}$ satisfies,

(16) $\left|\phi(t)-\cos
t\right|\leq\frac{\delta_{0}(\delta_{0}+2)}{2}t^{2},\qquad t\in\mathbb{R}.$

###### Proof.

By symmetry, the triangle inequality and the bound $|\sin u|\leq|u|$, we get

$\displaystyle\left|\phi(t)-\cos t\right|$
$\displaystyle=\left|\mathbb{E}\left[\cos(t|X|)-\cos
t\right]\right|=2\left|\mathbb{E}\left[\sin\left(t\frac{|X|-1}{2}\right)\sin\left(t\frac{|X|+1}{2}\right)\right]\right|$
$\displaystyle\leq\frac{t^{2}}{2}\mathbb{E}\left[\big{|}|X|-1\big{|}\cdot\big{|}|X|+1\big{|}\right]\leq\frac{t^{2}}{2}\big{\|}|X|-1\big{\|}_{2}\big{\|}|X|+1\big{\|}_{2},$

using the Cauchy-Schwarz inequality in the last estimate. Moreover,

$\big{\|}|X|+1\big{\|}_{2}\leq\big{\|}|X|-1\big{\|}_{2}+2.$

Plugging in the assumption $\big{\|}|X|-1\big{\|}_{2}\leq\delta_{0}$ completes
the proof. ∎

###  3.2. Uniform bounds on the special function and its derivative

######  Lemma 6.

Assuming (3) and the symmetry of $X_{1}$, the functions $\Psi$ and $\Psi_{0}$
defined in (12) and (13) respectively satisfy

(17)
$|\Psi(s)-\Psi_{0}(s)|\leq\frac{2}{\pi}\sqrt{2\delta_{0}(\delta_{0}+2)},\qquad
s\geq 1.$

###### Proof.

Fix $T>0$. Breaking the integral defining $\Psi$ into
$\int_{0}^{T}+\int_{T}^{\infty}$ and using that $|a-b|\leq 1$ for
$a,b\in[0,1]$, we obtain

$\displaystyle|\Psi(s)-\Psi_{0}(s)|$
$\displaystyle=\frac{2}{\pi}\left|\int_{0}^{\infty}\left[\left|\phi\left(\frac{t}{\sqrt{s}}\right)\right|^{s}-\left|\cos\left(\frac{t}{\sqrt{s}}\right)\right|^{s}\right]t^{-2}\mathrm{d}t\right|$
$\displaystyle\leq\frac{2}{\pi}\int_{0}^{T}\left|\left|\phi\left(\frac{t}{\sqrt{s}}\right)\right|^{s}-\left|\cos\left(\frac{t}{\sqrt{s}}\right)\right|^{s}\right|t^{-2}\mathrm{d}t+\frac{2}{\pi}\int_{T}^{\infty}t^{-2}\mathrm{d}t$

We also have $\big{|}|a|^{s}-|b|^{s}\big{|}\leq s|a-b|$ for $a,b\in[-1,1]$,
$s\geq 1$, thus Lemma 5 yields

$\displaystyle|\Psi(s)-\Psi_{0}(s)|$
$\displaystyle\leq\frac{2}{\pi}\int_{0}^{T}s\frac{\delta_{0}(\delta_{0}+2)}{2}\left(\frac{t}{\sqrt{s}}\right)^{2}t^{-2}\mathrm{d}t+\frac{2}{\pi
T}=\frac{2}{\pi}\left(T\frac{\delta_{0}(\delta_{0}+2)}{2}+\frac{1}{T}\right).$

Optimizing over the parameter $T$ gives the desired bound. ∎

######  Lemma 7.

For $s\geq 2$ and $0<u,v<1$, we have

$|u^{s}\log u-v^{s}\log v|\leq|u-v|.$

###### Proof.

Let $f(x)=x^{s}\log x$. It suffices to prove that on $(0,1)$ we have
$|f^{\prime}(x)|\leq 1$, which is equivalent to $|\alpha t\log t+t|\leq 1$
with $t=x^{s-1}\in(0,1)$ and $\alpha=\frac{s}{s-1}\in[1,2]$. To prove this
observe that for $t\in(0,1)$ we have $\alpha t\log t+t\leq t\leq 1$ and

$\alpha t\log t+t\geq\alpha t\log
t\geq-\frac{\alpha}{e}\geq-\frac{2}{e}>-1.\qed$

######  Lemma 8.

Assuming (3) and the symmetry of $X_{1}$, the functions $\Psi$ and $\Psi_{0}$
defined in (12) and (13) satisfy

(18) $|\Psi^{\prime}(s)-\Psi_{0}^{\prime}(s)|\leq
0.62\sqrt{\delta_{0}(\delta_{0}+2)},\qquad s\geq 2.$

###### Proof.

Changing the variables and differentiating gives

$\displaystyle\Psi^{\prime}(s)$
$\displaystyle=\frac{\mathrm{d}}{\mathrm{d}s}\left(\frac{2}{\pi\sqrt{s}}\int_{0}^{\infty}\Big{[}1-|\phi(t)|^{s}\Big{]}t^{-2}\mathrm{d}t\right)$
$\displaystyle=-\frac{1}{2s}\Psi(s)-\frac{2}{\pi\sqrt{s}}\int_{0}^{\infty}|\phi(t)|^{s}\log|\phi(t)|t^{-2}\mathrm{d}t.$

Thus,

$\displaystyle|\Psi^{\prime}(s)-\Psi_{0}^{\prime}(s)|$
$\displaystyle\leq\frac{1}{2s}|\Psi(s)-\Psi_{0}(s)|$
$\displaystyle\qquad+\frac{2}{\pi\sqrt{s}}\int_{0}^{\infty}\Big{|}|\phi(t)|^{s}\log|\phi(t)|-|\cos(t)|^{s}\log|\cos(t)|\Big{|}t^{-2}\mathrm{d}t.$

To estimate the integral, we proceed along the same lines as in the proof of
Lemma 6. We fix $T>0$, write
$\int_{0}^{\infty}=\int_{0}^{T}+\int_{T}^{\infty}$ and for the second integral
use $|u^{s}\log u|=\frac{1}{s}|u^{s}\log(u^{s})|\leq\frac{1}{es}$, $0<u<1$, to
get a bound on it by $\frac{2}{esT}$, whilst for the first integral, using
first Lemma 7 and then Lemma 5, we obtain

$\displaystyle\int_{0}^{T}\Big{|}|\phi(t)|^{s}\log|\phi(t)|-|\cos(t)|^{s}\log|\cos(t)|\Big{|}t^{-2}\mathrm{d}t$
$\displaystyle\leq\int_{0}^{T}|\phi(t)-\cos(t)|t^{-2}\mathrm{d}t$
$\displaystyle\leq\frac{\delta_{0}(\delta_{0}+2)}{2}T,$

Altogether, with the aid of Lemma 6,

$\displaystyle|\Psi^{\prime}(s)-\Psi_{0}^{\prime}(s)|$
$\displaystyle\leq\frac{1}{2s}\frac{2}{\pi}\sqrt{2\delta_{0}(\delta_{0}+2)}+\frac{2}{\pi\sqrt{s}}\left(\frac{\delta_{0}(\delta_{0}+2)}{2}T+\frac{2}{esT}\right).$

Minimising the second term over $T>0$ leads to the bound by

$\frac{1}{\pi s}\sqrt{2\delta_{0}(\delta_{0}+2)}+\frac{4}{\pi
s}\sqrt{\frac{\delta_{0}(\delta_{0}+2)}{e}}=\frac{\sqrt{\delta_{0}(\delta_{0}+2)}}{\pi
s}\left(\sqrt{2}+\frac{4}{\sqrt{e}}\right).$

For $s\geq 2$, we have $\frac{1}{\pi
s}\left(\sqrt{2}+\frac{4}{\sqrt{e}}\right)<0.61...$ and this completes the
proof. ∎

###  3.3. Proof of Lemma 3

First we assume that $s\geq 3$. Using Lemma 6 and letting
$\eta=\frac{2}{\pi}\sqrt{2\delta_{0}(\delta_{0}+2)}$ for brevity, we get

$\Psi(s)\geq\Psi_{0}(s)-\eta.$

Since $\Psi_{0}$ is increasing,
$\Psi_{0}(s)\geq\Psi_{0}(3)=\Psi_{0}(3)-\Psi_{0}(2)+\Psi_{0}(2)$ and
$\Psi_{0}(2)\geq\Psi(2)-\eta$, again using Lemma 6. Therefore,

$\Psi(s)\geq\Psi(2)+\big{(}\Psi_{0}(3)-\Psi_{0}(2)-2\eta\big{)}.$

It is now clear that as long as $\delta_{0}$ is sufficiently small, namely
$2\eta\leq\Psi_{0}(3)-\Psi_{0}(2)$, we get $\Psi(s)\geq\Psi(2)$, as desired.
It can be checked that
$\Psi_{0}(3)-\Psi_{0}(2)=\frac{4}{\pi\sqrt{3}}-\frac{1}{\sqrt{2}}=0.027..$ and
a choice of $\delta_{0}\leq 10^{-4}$ suffices for the estimate
$\Psi(s)\geq\Psi(2)$ to hold for $s\geq 3$.

Now we assume that $2<s<3$. We have

$\Psi(s)=\Psi(2)+(s-2)\Psi^{\prime}(\theta)$

for some $2<\theta<s$. Using Lemmas 8 and 4, we get

$\Psi^{\prime}(\theta)\geq\Psi_{0}^{\prime}(\theta)-0.62\sqrt{\delta_{0}(\delta_{0}+2)}\geq
0.017-0.62\sqrt{\delta_{0}(\delta_{0}+2)}$

which is positive for all $\delta_{0}\leq 3.7\cdot 10^{-4}$. Thus,
$\Psi(s)\geq\Psi(2)$ holds in both cases. $\square$

##  4\. Proof of Theorem 2

The approach is the same as for Theorem 1, however certain technical details
are substantially more involved. We begin with a Fourier-analytic
representation for _negative_ moments due to Gorin and Favorov [13].

######  Lemma 9 (Lemma 3 in [13]).

For a random vector $X$ in $\mathbb{R}^{d}$ and $-d<q<0$, we have

(19)
$\mathbb{E}|X|^{q}=\beta_{q,d}\int_{\mathbb{R}^{d}}\mathbb{E}e^{i\\!\left\langle
t,X\right\rangle\\!}\cdot|t|^{-q-d}\mathrm{d}t,$

where
$\beta_{q,d}=2^{q}\pi^{-d/2}\frac{\Gamma\left((d+q)/2\right)}{\Gamma(-q/2)}$,
provided that the integral on the right hand side exists.

Specialised to $d=3$, $q=-1$ ($\beta_{-1,3}=\frac{1}{2\pi^{2}}$) and
$X=\sum_{j=1}^{n}a_{j}X_{j}$ with $X_{1},\ldots,X_{n}$ independent random
vectors, we obtain

(20)
$\mathbb{E}\left|\sum_{j=1}^{n}a_{j}X_{j}\right|^{-1}=\frac{1}{2\pi^{2}}\int_{\mathbb{R}^{3}}\left(\prod_{j=1}^{n}\mathbb{E}e^{i\\!\left\langle
t,a_{j}X_{j}\right\rangle\\!}\right)|t|^{-2}\mathrm{d}t.$

Note that thanks to the decay assumption (5), the integral on the right hand
side converges as long as $n\geq 2$ (assuming the $a_{j}$ are nonzero). As in
Ball’s proof from [2], Hölder’s inequality yields

(21)
$\mathbb{E}\left|\sum_{j=1}^{n}a_{j}X_{j}\right|^{-1}\leq\prod_{j=1}^{n}\Phi\big{(}a_{j}^{-2}\big{)}^{a_{j}^{2}},$

where

(22)
$\Phi(s)=\frac{1}{2\pi^{2}}\int_{\mathbb{R}^{3}}\left|\phi\left(s^{-1/2}t\right)\right|^{s}|t|^{-2}\mathrm{d}t,\qquad
s>1$

with

(23) $\phi(t)=\mathbb{E}e^{i\\!\left\langle t,X_{1}\right\rangle\\!},\qquad
t\in\mathbb{R}^{3},$

denoting the characteristic function of $X_{1}$. Exactly as in the proof of
Theorem 1, the following pivotal lemma allows us to finish the proof.

######  Lemma 10.

Under the assumptions of Theorem 2, we have $\Phi(s)\leq\Phi(2)$ for every
$s\geq 2$.

If the $X_{j}$ are uniform on the unit sphere $\mathbb{S}^{2}$ in
$\mathbb{R}^{3}$, we have $\phi(t)=\frac{\sin|t|}{|t|}$ (because
$\\!\left\langle t,X_{1}\right\rangle\\!$ is uniform on $[-|t|,|t|]$), in
which case the special function $\Phi$ defined in (22) becomes

(24)
$\Phi_{0}(s)=\frac{2}{\pi}\int_{0}^{\infty}\left|\frac{\sin(s^{-1/2}t)}{s^{-1/2}t}\right|^{s}\mathrm{d}t,\qquad
s>1$

(after integrating in polar coordinates). Ball’s celebrated integral
inequality states that $\Phi_{0}(s)\leq\Phi_{0}(2)$, for all $s\geq 2$ (see
Lemma 3 in [2], as well as [28, 31] for different proofs). Our proof of Lemma
10 relies on this, additional bounds on the derivative $\Phi_{0}^{\prime}(s)$
near $s=2$, as well as, crucially, bounds quantifying how close $\Phi$ is to
$\Phi_{0}$. In the following subsections we gather such results and then
conclude with the proof of Lemma 10.

###  4.1. A uniform bound on the characteristic function

Throughout these sections $\xi$ always denotes a random vector uniform on the
unit sphere $\mathbb{S}^{2}$ in $\mathbb{R}^{3}$.

######  Lemma 11.

Let $X$ be a symmetric random vector in $\mathbb{R}^{3}$ with
$\delta=\mathsf{W}_{2}(X,\xi)$. Then, its characteristic function
$\phi(t)=\mathbb{E}e^{i\\!\left\langle t,X\right\rangle\\!}$ satisfies

(25)
$\left|\phi(t)-\frac{\sin|t|}{|t|}\right|\leq\frac{\delta(\delta+2)}{2}|t|^{2},\qquad
t\in\mathbb{R}^{3}.$

###### Proof.

Let $\xi$ be uniform on $\mathbb{S}^{2}$ such that for the joint distribution
of $(X,\xi)$, we have $\|X-\xi\|_{2}=\mathsf{W}_{2}(X,\xi)=\delta$. By
symmetry, the bound $|\sin u|\leq|u|$ and the Cauchy-Schwarz inequality (used
twice), we get

$\displaystyle\left|\phi(t)-\frac{\sin|t|}{|t|}\right|$
$\displaystyle=\left|\mathbb{E}\left[\cos\\!\left\langle
t,X\right\rangle\\!-\cos\\!\left\langle t,\xi\right\rangle\\!\right]\right|$
$\displaystyle=2\left|\mathbb{E}\left[\sin\left(\tfrac{1}{2}\\!\left\langle
t,X-\xi\right\rangle\\!\right)\sin\left(\tfrac{1}{2}\\!\left\langle
t,X+\xi\right\rangle\\!\right)\right]\right|$
$\displaystyle\leq\frac{|t|^{2}}{2}\mathbb{E}\left[\big{|}X-\xi\big{|}\cdot\big{|}X+\xi\big{|}\right]$
$\displaystyle\leq\frac{|t|^{2}}{2}\big{\|}X-\xi\big{\|}_{2}\big{\|}X+\xi\big{\|}_{2}.$

To conclude we use the triangle inequality

$\big{\|}X+\xi\big{\|}_{2}\leq\big{\|}X-\xi\big{\|}_{2}+2\|\xi\|_{2}=\big{\|}X-\xi\big{\|}_{2}+2.\qed$

###  4.2. Bounds on the special function

We begin with a bound on the difference $\Phi(s)-\Phi_{0}(s)$ obtained from
the uniform bound on the characteristic functions (Lemma 11 above). In
contrast to Lemma 6, the bound is not uniform in $s$. For $s$ _not_ too large
(the bulk), we incur the factor $s^{3/4}$. To fight it off for large values of
$s$, we shall employ a Gaussian approximation. For that part to work, it is
crucial that $\Phi_{0}(2)-\Phi_{0}(\infty)=\sqrt{2}-\sqrt{\frac{6}{\pi}}>0$.

####  4.2.1. The bulk

######  Lemma 12.

Let $X$ be a symmetric random vector in $\mathbb{R}^{3}$ with
$\delta=\mathsf{W}_{2}(X,\xi)$ and characteristic function $\phi$ satisfying
(5) for some $C_{0}>0$. Let $\Phi$ and $\Phi_{0}$ be defined through (22) and
(24) respectively. For every $s\geq 2$, we have

(26)
$|\Phi(s)-\Phi_{0}(s)|\leq\frac{2^{11/4}}{3\pi}s^{3/4}\big{(}\delta(\delta+2)\big{)}^{1/4}\big{(}C_{0}^{2}+1\big{)}^{3/4}.$

###### Proof.

Given the definitions, we have

$\Phi(s)-\Phi_{0}(s)=\frac{\sqrt{s}}{2\pi^{2}}\int_{\mathbb{R}^{3}}\left(|\phi(t)|^{s}-\left|\frac{\sin|t|}{|t|}\right|^{s}\right)|t|^{-2}\mathrm{d}t.$

We fix $T>0$ and split the integration into two regions.

_Small $t$._ Using Lemma 11 and $||a|^{s}-|b|^{s}|\leq s|a-b|$ when
$|a|,|b|\leq 1$, we obtain

$\left|\int_{|t|\leq
T}\left(|\phi(t)|^{s}-\left|\frac{\sin|t|}{|t|}\right|^{s}\right)|t|^{-2}\mathrm{d}t\right|\leq
s\frac{\delta(\delta+2)}{2}\int_{|t|\leq
T}\mathrm{d}t=\frac{2\pi}{3}s\delta(\delta+2)T^{3}.$

_Large $t$._ Since $s\geq 2$, we have

$\left|\int_{|t|\geq
T}\left(|\phi(t)|^{s}-\left|\frac{\sin|t|}{|t|}\right|^{s}\right)|t|^{-2}\mathrm{d}t\right|\leq\int_{|t|\geq
T}\left(|\phi(t)|^{2}+\left|\frac{\sin|t|}{|t|}\right|^{2}\right)|t|^{-2}\mathrm{d}t.$

By virtue of the decay assumption (5), this is at most

$\int_{|t|\geq
T}\frac{C_{0}^{2}+1}{|t|^{4}}\mathrm{d}t=4\pi\frac{C_{0}^{2}+1}{T}$

Adding up these two bounds and optimising over $T$ yields

$\left|\int_{\mathbb{R}^{3}}\left(|\phi(t)|^{s}-\left|\frac{\sin|t|}{|t|}\right|^{s}\right)|t|^{-2}\mathrm{d}t\right|\leq\frac{2^{15/4}\pi}{3}s^{1/4}\big{(}\delta(\delta+2)\big{)}^{1/4}\big{(}C_{0}^{2}+1\big{)}^{3/4}.$

Plugging this back gives the assertion. ∎

####  4.2.2. The Gaussian approximation

We now present a bound on $\Phi(s)$ which does not grow as $s\to\infty$ that
will allow us to prove Lemma 10 for $s$ sufficiently large.

######  Lemma 13.

Let $X$ be a symmetric random vector in $\mathbb{R}^{3}$ with
$\delta=\mathsf{W}_{2}(X,\xi)$ and characteristic function $\phi$ satisfying
(5) for some $C_{0}>0$. Let $\Phi$ be defined through (22). Assuming that
$\delta\leq\min\\{\frac{1}{\sqrt{3}},(15C_{0})^{-2}\\}$, we have

(27)
$\begin{split}\Phi(s)\leq&\sqrt{\frac{6}{\pi}}\Big{(}(1-\delta\sqrt{3})^{2}-\theta\mathbb{E}|X|^{3}\Big{)}^{-1/2}\\\
&+\sqrt{\frac{6}{\pi}}\exp\left\\{-s\left(\frac{\theta^{2}}{6}-26\delta(\delta+2)\right)\right\\}+2C_{0}\left(\sqrt{s}+\frac{2}{\sqrt{s}}\right)e^{-s},\quad
s\geq 2,\end{split}$

with arbitrary $0<\theta<\frac{(1-\delta\sqrt{3})^{2}}{3\mathbb{E}|X|^{3}}$.

###### Proof.

We split the integral defining
$\Phi(s)=\frac{1}{2\pi^{2}}\int_{\mathbb{R}^{3}}|\phi(s^{-1/2}t)|^{s}|t|^{-2}\mathrm{d}t$
into several regions.

_Large $t$._ Using the decay condition (5), we get

$\int_{|t|\geq
eC_{0}\sqrt{s}}\left|\phi\left(s^{-1/2}t\right)\right|^{s}|t|^{-2}\mathrm{d}t\leq\int_{|t|\geq
eC_{0}\sqrt{s}}C_{0}^{s}|s^{-1/2}t|^{-s}|t|^{-2}\mathrm{d}t=\frac{4\pi
e\sqrt{s}}{s-1}C_{0}e^{-s}.$

Thus, for $s\geq 2$,

$\frac{1}{2\pi^{2}}\int_{|t|\geq
eC_{0}\sqrt{s}}\left|\phi\left(s^{-1/2}t\right)\right|^{s}|t|^{-2}\mathrm{d}t\leq\frac{2e\sqrt{s}}{\pi(s-1)}C_{0}e^{-s}<\frac{4C_{0}}{\sqrt{s}}e^{-s},$

as $\frac{2e\sqrt{s}}{\pi(s-1)}<\frac{4}{\sqrt{s}}$ for $s\geq 2$.

_Moderate $t$._ This case is vacuous unless $C_{0}>\pi/e$. We use Lemma 11 to
obtain

$\displaystyle\int_{\pi\sqrt{s}\leq|t|\leq
eC_{0}\sqrt{s}}\left|\phi\left(s^{-1/2}t\right)\right|^{s}|t|^{-2}\mathrm{d}t$
$\displaystyle\leq\int_{\pi\sqrt{s}\leq|t|\leq
eC_{0}\sqrt{s}}\left(\left|\frac{\sin(s^{-1/2}|t|)}{s^{-1/2}|t|}\right|+\frac{\delta(\delta+2)}{2}\left(s^{-1/2}|t|\right)^{2}\right)^{s}|t|^{-2}\mathrm{d}t$
$\displaystyle\leq\int_{\pi\sqrt{s}\leq|t|\leq
eC_{0}\sqrt{s}}\left(\frac{1}{\pi}+\frac{\delta(\delta+2)}{2}\left(eC_{0}\right)^{2}\right)^{s}|t|^{-2}\mathrm{d}t$
$\displaystyle=4\pi\sqrt{s}\left(\frac{1}{\pi}+\frac{\delta(\delta+2)}{2}\left(eC_{0}\right)^{2}\right)^{s}(eC_{0}-\pi)_{+}.$

In this case, the condition $\delta<(15C_{0})^{-2}$ suffices to guarantee that
$\frac{1}{\pi}+\frac{\delta(\delta+2)}{2}\left(eC_{0}\right)^{2}<\frac{1}{e}$
(also using, say $\delta+2<3$). Then we get

$\frac{1}{2\pi^{2}}\int_{\pi\sqrt{s}\leq|t|\leq
eC_{0}\sqrt{s}}\left|\phi\left(s^{-1/2}t\right)\right|^{s}|t|^{-2}\mathrm{d}t\leq\frac{2}{\pi}\sqrt{s}e^{-s}(eC_{0}-\pi)_{+}<2C_{0}\sqrt{s}e^{-s}.$

_Small $t$._ For $0<u<\pi$, we have

(28) $\frac{\sin
u}{u}=\prod_{k=1}^{\infty}\left(1-\frac{u^{2}}{(k\pi)^{2}}\right)\leq\exp\Big{(}-\sum_{k=1}^{\infty}\frac{u^{2}}{(k\pi)^{2}}\Big{)}=e^{-u^{2}/6}.$

Fix $0<\theta<\pi$. Then, first using Lemma 11 and then (28), we obtain

$\displaystyle\int_{\theta\sqrt{s}\leq|t|\leq\pi\sqrt{s}}\left|\phi\left(s^{-1/2}t\right)\right|^{s}|t|^{-2}\mathrm{d}t$
$\displaystyle\leq\int_{\theta\sqrt{s}\leq|t|\leq\pi\sqrt{s}}\left(\left|\frac{\sin(s^{-1/2}|t|)}{s^{-1/2}|t|}\right|+\frac{\delta(\delta+2)}{2}\left(s^{-1/2}|t|\right)^{2}\right)^{s}|t|^{-2}\mathrm{d}t$
$\displaystyle\leq\int_{\theta\sqrt{s}\leq|t|\leq\pi\sqrt{s}}\left(e^{-|t|^{2}/(6s)}+\frac{\delta(\delta+2)}{2}\pi^{2}\right)^{s}|t|^{-2}\mathrm{d}t$
$\displaystyle\leq\int_{|t|\geq\theta\sqrt{s}}e^{-|t|^{2}/6}\left(1+\frac{\delta(\delta+2)}{2}\pi^{2}e^{\pi^{2}/6}\right)^{s}|t|^{-2}\mathrm{d}t.$

Integrating using polar coordinates and invoking the standard tail bound

$\int_{u}^{\infty}e^{-y^{2}/2}\mathrm{d}y\leq\sqrt{\pi/2}e^{-u^{2}/2},\qquad
u>0,$

the last integral gets upper bounded by

$4\pi^{3/2}\sqrt{\frac{3}{2}}e^{-\theta^{2}s/6}\left(1+\frac{\delta(\delta+2)}{2}\pi^{2}e^{\pi^{2}/6}\right)^{s}<4\pi^{3/2}\sqrt{\frac{3}{2}}e^{-\theta^{2}s/6}\big{(}1+26\delta(\delta+2)\big{)}^{s},$

Summarising, we have shown that

$\displaystyle\frac{1}{2\pi^{2}}\int_{\theta\sqrt{s}\leq|t|\leq\pi\sqrt{s}}\left|\phi\left(s^{-1/2}t\right)\right|^{s}|t|^{-2}\mathrm{d}t$
$\displaystyle\leq\sqrt{\frac{6}{\pi}}\big{(}1+26\delta(\delta+2)\big{)}^{s}e^{-s\theta^{2}/6}$
$\displaystyle\leq\sqrt{\frac{6}{\pi}}\exp\left\\{-s\left(\frac{\theta^{2}}{6}-26\delta(\delta+2)\right)\right\\}.$

_Very small $t$._ Taylor-expanding $\phi$ at $0$ with the Lagrange remainder,

$\displaystyle\int_{|t|\leq\theta\sqrt{s}}\left|\phi\left(s^{-1/2}t\right)\right|^{s}|t|^{-2}\mathrm{d}t$
$\displaystyle=\int_{|t|\leq\theta\sqrt{s}}\left|1-\frac{1}{2}\mathbb{E}\\!\left\langle
X,s^{-1/2}t\right\rangle\\!^{2}+\frac{s^{-3/2}}{6}\sum_{j,k,l=1}^{3}\frac{\partial^{3}\phi}{\partial
t_{j}\partial t_{k}\partial
t_{l}}(\theta)t_{j}t_{k}t_{l}\right|^{s}\mathrm{d}t,$

for some point $\theta$ in the segment $[0,s^{-1/2}t]$. To bound the error
term, we note that

$\left|\frac{\partial^{3}\phi}{\partial t_{j}\partial t_{k}\partial
t_{l}}(\theta)\right|\leq\mathbb{E}|X_{j}X_{k}X_{l}|,$

thus

$\left|\sum_{j,k,l=1}^{3}\frac{\partial^{3}\phi}{\partial t_{j}\partial
t_{k}\partial
t_{l}}(\theta)t_{j}t_{k}t_{l}\right|\leq\mathbb{E}\left(|t_{1}||X_{1}|+|t_{2}||X_{2}|+|t_{3}||X_{3}|\right)^{3}\leq|t|^{3}\mathbb{E}|X|^{3}.$

We also note that in the domain $\\{|t|\leq\theta\sqrt{s}\\}$, the leading
term $1-\frac{1}{2}\mathbb{E}\\!\left\langle X,s^{-1/2}t\right\rangle\\!^{2}$
is nonnegative, provided that $\frac{1}{2}\theta^{2}\mathbb{E}|X|^{2}\leq 1$.
Since $\|X\|_{2}\leq\delta+1$ under the assumption (6), it suffices that
$\theta<\frac{\sqrt{2}}{1+\delta}$. Assuming this, we thus get

$\displaystyle\int_{|t|\leq\theta\sqrt{s}}\left|\phi\left(s^{-1/2}t\right)\right|^{s}|t|^{-2}\mathrm{d}t\leq\int_{|t|\leq\theta\sqrt{s}}\left(1-\frac{1}{2}\mathbb{E}\\!\left\langle
X,s^{-1/2}t\right\rangle\\!^{2}+\frac{1}{6}|s^{-1/2}t|^{3}\mathbb{E}|X|^{3}\right)^{s}|t|^{-2}\mathrm{d}t.$

Evoking (6), let $\xi$ be uniform on $\mathbb{S}^{2}$ such that
$\|X-\xi\|_{2}\leq\delta$ with respect to some coupling. Then, for a fixed
vector $v$ in $\mathbb{R}^{3}$, we obtain the bound

$\left\|\\!\left\langle
X,v\right\rangle\\!\right\|_{2}\geq\|\\!\left\langle\xi,v\right\rangle\\!\|_{2}-\|\\!\left\langle
X-\xi,v\right\rangle\\!\|_{2}=\tfrac{1}{\sqrt{3}}|v|-\|\\!\left\langle
X-\xi,v\right\rangle\\!\|_{2}\geq\tfrac{1}{\sqrt{3}}|v|-\delta|v|.$

Thus, provided that $\delta<\frac{1}{\sqrt{3}}$, this yields

$\displaystyle\int_{|t|\leq\theta\sqrt{s}}\left|\phi\left(s^{-1/2}t\right)\right|^{s}|t|^{-2}\mathrm{d}t$
$\displaystyle\leq\int_{|t|\leq\theta\sqrt{s}}\left(1-\frac{(1/\sqrt{3}-\delta)^{2}}{2s}|t|^{2}+\frac{\theta\mathbb{E}|X|^{3}}{6s}|t|^{2}\right)^{s}|t|^{-2}\mathrm{d}t$
$\displaystyle\leq\int_{\mathbb{R}^{3}}\exp\left(-\alpha|t|^{2}/2\right)|t|^{-2}\mathrm{d}t=\frac{2\pi\sqrt{2\pi}}{\sqrt{\alpha}},$

where we have set
$\alpha=(\frac{1}{\sqrt{3}}-\delta)^{2}-\frac{1}{3}\theta\mathbb{E}|X|^{3}$
and assumed that $\alpha$ is positive in the last equality (guaranteed by
choosing $\theta$ sufficiently small). Then we finally obtain

$\frac{1}{2\pi^{2}}\int_{|t|\leq\theta\sqrt{s}}\left|\phi\left(s^{-1/2}t\right)\right|^{s}|t|^{-2}\mathrm{d}t\leq\sqrt{\frac{2}{\pi\alpha}}.$

Putting these three bounds together gives the assertion. Note that we have
imposed the conditions $\delta<\frac{1}{\sqrt{3}}$ and $\delta<(15C_{0})^{-2}$
when $C_{0}>\frac{\pi}{e}$, as well as $\theta<\pi$,
$\theta<\frac{\sqrt{2}}{1+\delta}$ and
$\theta<\frac{(1-\delta\sqrt{3})^{2}}{3\mathbb{E}|X|^{3}}$. Since
$\|X\|_{3}\geq\|X\|_{2}\geq 1-\delta$ and $\delta<\frac{1}{\sqrt{3}}$, we have
$\frac{(1-\delta\sqrt{3})^{2}}{3\mathbb{E}|X|^{3}}<\frac{(1-\delta\sqrt{3})^{2}}{3(1-\delta)^{3}}=\frac{1}{3(1-\delta)}\left(\frac{1-\delta\sqrt{3}}{1-\delta}\right)^{2}<\frac{1}{3-\sqrt{3}}<0.79$.
Moreover, $\frac{\sqrt{2}}{1+\delta}>\frac{\sqrt{2}}{1+1/\sqrt{3}}>0.89$, so
the condition $\theta<\frac{(1-\delta\sqrt{3})^{2}}{3\mathbb{E}|X|^{3}}$
implies the other two conditions on $\theta$. ∎

###  4.3. Bounds on the derivative of the special function

######  Lemma 14.

Let $X$ be a symmetric random vector in $\mathbb{R}^{3}$ with
$\delta=\mathsf{W}_{2}(X,\xi)$ and characteristic function $\phi$ satisfying
(5) for some $C_{0}>0$. Let $\Phi$ and $\Phi_{0}$ be defined through (22) and
(24) respectively. For every $s\geq 2$, we have

$\displaystyle|\Phi^{\prime}(s)-\Phi_{0}^{\prime}(s)|$
$\displaystyle\leq\frac{2^{7/4}}{3\pi}\big{(}\delta(\delta+2)\big{)}^{1/4}\big{(}C_{0}^{2}+1\big{)}^{3/4}s^{-1/4}+1.04\big{(}\delta(\delta+2)\big{)}^{1/7}\big{(}C_{0}^{3/2}+1\big{)}^{6/7}s^{1/2}.$

###### Proof.

First we take the derivative,

$\Phi^{\prime}(s)=\frac{\mathrm{d}}{\mathrm{d}s}\left(\frac{\sqrt{s}}{2\pi^{2}}\int_{\mathbb{R}^{3}}|\phi(t)|^{s}\mathrm{d}t\right)=\frac{1}{2s}\Phi(s)+\frac{\sqrt{s}}{2\pi^{2}}\int_{\mathbb{R}^{3}}|\phi(t)|^{s}\log|\phi(t)|\mathrm{d}t.$

For the resulting $\Phi-\Phi_{0}$ term, we use Lemma 12. To bound the
difference of the integrals resulting from the second term, we fix $T>0$ and
split the integration into two regions.

_Small $t$._ Using Lemmas 7 and 11, we obtain

$\displaystyle\left|\int_{|t|\leq
T}\left(|\phi(t)|^{s}\log|\phi(t)|-\left|\frac{\sin|t|}{|t|}\right|^{s}\log\left|\frac{\sin|t|}{|t|}\right|\right)|t|^{-2}\mathrm{d}t\right|$
$\displaystyle\leq\int_{|t|\leq
T}\frac{\delta(\delta+2)}{2}\mathrm{d}t=\frac{2\pi}{3}\delta(\delta+2)T^{3}.$

_Large $t$._ Note that for $s\geq 2$, and $0<u<1$ we have,

$|u^{s}\log u|=|2u^{s-1/2}u^{1/2}\log(u^{1/2})|\leq\frac{2}{e}u^{3/2}.$

Thus,

$\displaystyle\left|\int_{|t|\geq
T}\left(|\phi(t)|^{s}\log|\phi(t)|-\left|\frac{\sin|t|}{|t|}\right|^{s}\log\left|\frac{\sin|t|}{|t|}\right|\right)|t|^{-2}\mathrm{d}t\right|$
$\displaystyle\leq\frac{2}{e}\left|\int_{|t|\geq
T}\left(|\phi(t)|^{3/2}+\left|\frac{\sin|t|}{|t|}\right|^{3/2}\right)|t|^{-2}\mathrm{d}t\right|$

which, after applying the decay condition (5), gets upper bounded by

$\frac{8\pi}{e}\int_{T}^{\infty}\frac{C_{0}^{3/2}+1}{t^{3/2}}\mathrm{d}t=\frac{16\pi}{e}(C_{0}^{3/2}+1)T^{-1/2}.$

Adding up these two bounds and optimising over $T$ yields

$\displaystyle\left|\int_{\mathbb{R}^{3}}\left(|\phi(t)|^{s}\log|\phi(t)|-\left|\frac{\sin|t|}{|t|}\right|^{s}\log\left|\frac{\sin|t|}{|t|}\right|\right)|t|^{-2}\mathrm{d}t\right|$
$\displaystyle\leq\frac{7\cdot
2^{19/7}\pi}{3e^{6/7}}\big{(}\delta(\delta+2)\big{)}^{1/7}\big{(}C_{0}^{3/2}+1\big{)}^{6/7}.$

Going back to the difference of the derivatives, we arrive at the desired
bound using

$\frac{7\cdot 2^{12/7}}{3e^{6/7}\pi}<1.04.\qed$

###  4.4. Bounds on Ball’s special function

We will need two estimates on $\Phi_{0}$ defined in (24), that is

(29)
$\Phi_{0}(s)=\frac{2}{\pi}\int_{0}^{\infty}\left|\frac{\sin(s^{-1/2}t)}{s^{-1/2}t}\right|^{s}\mathrm{d}t=\frac{2\sqrt{s}}{\pi}\int_{0}^{\infty}\left|\frac{\sin
t}{t}\right|^{s}\mathrm{d}t,\qquad s>1.$

First, we have a bound on the derivative near $s=2$.

######  Lemma 15.

For $2\leq s\leq 2.01$, we have $\Phi_{0}^{\prime}(s)\leq-0.02$.

Second, on the complementary range, $\Phi_{0}(s)$ is separated from its
supremal value $\Phi_{0}(2)$.

######  Lemma 16.

For $s\geq 2.01$, we have $\Phi_{0}(s)\leq\Phi_{0}(2)-2\cdot 10^{-4}.$

We begin with a numerical bound which will be used in the proofs of these
assertions.

######  Lemma 17.

We have

$\int_{0}^{\infty}\left(\frac{\sin u}{u}\right)^{2}\log\left|\frac{\sin
u}{u}\right|\mathrm{d}u\leq-0.48.$

###### Proof.

Using (28), we get

$\int_{0}^{\pi}\left(\frac{\sin u}{u}\right)^{2}\log\left|\frac{\sin
u}{u}\right|\mathrm{d}u\leq-\frac{1}{6}\int_{0}^{\pi}(\sin
u)^{2}\mathrm{d}u=-\frac{\pi}{12}.$

Moreover,

$\displaystyle\int_{\pi}^{\infty}\left(\frac{\sin u}{u}\right)^{2}$
$\displaystyle\log\left|\frac{\sin
u}{u}\right|\mathrm{d}u=\sum_{k=1}^{\infty}\int_{k\pi}^{(k+1)\pi}\left(\frac{\sin
u}{u}\right)^{2}\log\left|\frac{\sin u}{u}\right|$
$\displaystyle\leq\sum_{k=1}^{\infty}\int_{k\pi}^{(k+1)\pi}\left(\frac{\sin
u}{(k+1)\pi}\right)^{2}\log\left|\frac{1}{k\pi}\right|=-\frac{1}{2\pi}\sum_{k=1}^{\infty}\frac{\log(k\pi)}{(k+1)^{2}}.$

Therefore our integral is bounded above by

$-\frac{\pi}{12}-\frac{1}{2\pi}\sum_{k=1}^{\infty}\frac{\log(k\pi)}{(k+1)^{2}}=-0.4867..<-0.48.\qed$

We let

(30) $I(s)=\int_{0}^{\infty}\left|\frac{\sin
u}{u}\right|^{s}\mathrm{d}u,\qquad s>1.$

###### Proof of Lemma 15.

First we observe that

$I^{\prime}(s)=\int_{0}^{\infty}\left|\frac{\sin
u}{u}\right|^{s}\log\left|\frac{\sin u}{u}\right|\mathrm{d}u.$

Note that $I$ is decreasing. We have,

$\Phi_{0}^{\prime}(s)=\frac{2}{\pi}\left(\frac{I(s)}{2\sqrt{s}}+\sqrt{s}I^{\prime}(s)\right)\leq\frac{2}{\pi}\left(\frac{I(2)}{2\sqrt{s}}+\sqrt{s}I^{\prime}(s)\right)=\frac{1}{2\sqrt{s}}+\frac{2\sqrt{s}}{\pi}I^{\prime}(s),$

since $I(2)=\frac{\pi}{2}$. Moreover,

$\displaystyle|I^{\prime\prime}(s)|$
$\displaystyle=\int_{0}^{\infty}\left|\frac{\sin
u}{u}\right|^{s}\log^{2}\left|\frac{\sin
u}{u}\right|\mathrm{d}u\leq\int_{0}^{\infty}\left|\frac{\sin
u}{u}\right|^{2}\log^{2}\left|\frac{\sin u}{u}\right|\mathrm{d}u$
$\displaystyle\leq\sup_{t\in(0,1)}(\sqrt{t}\log^{2}t)\int_{0}^{\infty}\left|\frac{\sin
u}{u}\right|^{3/2}\mathrm{d}u=16e^{-2}\int_{0}^{\infty}\left|\frac{\sin
u}{u}\right|^{3/2}\mathrm{d}u$ $\displaystyle\leq
16e^{-2}\left(1+\int_{1}^{\infty}\frac{1}{u^{3/2}}\mathrm{d}u\right)=48e^{-2}.$

With the aid of Lemma 17, we therefore have

$I^{\prime}(s)\leq I^{\prime}(2)+48e^{-2}(s-2)<-0.48+48e^{-2}(s-2).$

Thus, for $2\leq s\leq 2.01$, we have

$\displaystyle\Phi_{0}^{\prime}(s)$
$\displaystyle\leq\frac{1}{2\sqrt{s}}+\frac{2\sqrt{s}}{\pi}I^{\prime}(s)<\frac{1}{2\sqrt{s}}+\frac{2\sqrt{s}}{\pi}\big{(}-0.48+48e^{-2}(s-2)\big{)}$
$\displaystyle<\frac{1}{2\sqrt{2}}+\frac{2\sqrt{2}}{\pi}(-0.48+48e^{-2}(s-2))$
$\displaystyle\leq\frac{1}{2\sqrt{2}}+\frac{2\sqrt{2}}{\pi}(-0.48+48e^{-2}0.01)<-0.02,$

where in the first inequality we used that the term in parenthesis is
negative. ∎

For the proof of Lemma 16, we need several more estimates. First, we record a
lower bound on the derivative of $\Phi_{0}(s)$ for arbitrary $s$.

######  Lemma 18.

For $s\geq 2$, we have $\Phi_{0}^{\prime}(s)\geq-\frac{12\sqrt{s}}{\pi e}$.

###### Proof.

We have,

$\Phi_{0}^{\prime}(s)=\frac{2}{\pi}\left(\frac{I(s)}{2\sqrt{s}}+\sqrt{s}I^{\prime}(s)\right)\geq\frac{2\sqrt{s}}{\pi}I^{\prime}(s),$

so it is enough to upper bound $|I^{\prime}(s)|$. Note that

$\displaystyle|I^{\prime}(s)|$
$\displaystyle=\int_{0}^{\infty}\left|\frac{\sin
u}{u}\right|^{s}\left(-\log\left|\frac{\sin u}{u}\right|\right)\mathrm{d}u$
$\displaystyle\leq\int_{0}^{\infty}\left|\frac{\sin
u}{u}\right|^{2}\left(-\log\left|\frac{\sin u}{u}\right|\right)\mathrm{d}u$
$\displaystyle\leq\sup_{t\in(0,1)}(-\sqrt{t}\log
t)\int_{0}^{\infty}\left|\frac{\sin u}{u}\right|^{\frac{3}{2}}\mathrm{d}u$
$\displaystyle\leq
2e^{-1}\left(1+\int_{1}^{\infty}\frac{1}{u^{\frac{3}{2}}}\mathrm{d}u\right)=6e^{-1}.\qed$

Second, we obtain a quantitative drop-off of the values of $\Phi_{0}$.

######  Lemma 19.

Let $a\in[1,\frac{\pi}{3}]$ and suppose that for some $s_{0}\geq 2$, we have
$\Phi_{0}(s_{0})=\sqrt{\frac{2}{a}}$. Then

(31) $\Phi_{0}(s)\leq\sqrt{\frac{2}{a}},\qquad s\geq s_{0}.$

To prove this, we build on the argument of Nazarov and Podkorytov from [31].
For a somewhat similar bound, we refer to Proposition 7 in König and
Koldobsky’s work [20] on maximal-perimeter sections of the cube. For
convenience and completeness, we include all arguments in detail. We consider
functions

(32) $f_{a}(x)=e^{-\frac{\pi}{2}x^{2}a},\quad g(x)=\left|\frac{\sin\pi x}{\pi
x}\right|,\qquad x>0,$

and their distribution functions

(33) $F_{a}(y)=|\\{x>0:f_{a}(x)>y\\}|,\quad G(y)=|\\{x>0:g(x)>y\\}|,\qquad
y>0.$

######  Lemma 20.

For $a\in[1,\frac{\pi}{3}]$ the function $F_{a}-G$ has precisely one sign
change point $y_{0}$ and at this point changes sign from $"-"$ to $"+"$.

###### Proof.

Note that $F_{a}(y)=G(y)=0$ for $y\geq 1$, so we only consider $y\in(0,1)$. We
have $F_{a}(y)=\sqrt{\frac{2}{\pi a}\ln(\frac{1}{y})}$.

The function $g(x)$ has zeros for $x\in\mathbb{Z}$. For $m\in\mathbb{N}$, let
$y_{m}=\max_{[m,m+1]}g$. We clearly have $y_{m}<\frac{1}{\pi m}$ and
$y_{m}>g(m+\frac{1}{2})=\frac{1}{\pi(m+\frac{1}{2})}$. Thus
$y_{m}\in(\frac{1}{\pi(m+\frac{1}{2})},\frac{1}{\pi m})$, which shows that the
sequence $y_{m}$ is decreasing. We have the following claims.

Claim 1. The function $F_{a}-G$ is positive on $(y_{1},1)$.

Note that if $g(x)>y_{1}$ then $x\in(0,1)$. Moreover $g(x)\leq f(x)$ for
$x\in[0,1]$, since

$g(x)=\frac{\sin\pi x}{\pi
x}=\prod_{k=1}^{\infty}\left(1-\frac{x^{2}}{k^{2}}\right)\leq\prod_{k=1}^{\infty}e^{-\frac{x^{2}}{k^{2}}}=e^{-\frac{\pi^{2}}{6}x^{2}}\leq
e^{-\frac{\pi}{2}ax^{2}}=f_{a}(x).$

Thus, for $y\in(y_{1},1)$, we have

$G(y)=|\\{x\in(0,1):\ g(x)>y\\}|<|\\{x\in(0,1):\ f_{a}(x)>y\\}|\leq F_{a}(y).$

Claim 2. The function $F_{a}-G$ changes sign at least once in $(0,1)$.

Due to Claim 1 it is enough to show that $F_{a}-G$ is sometimes negative. We
have $F_{a}-G\leq F_{1}-G$ and
$\int_{0}^{\infty}2y(F_{1}(y)-G(y))\mathrm{d}y=\int(f_{1}^{2}-g^{2})=0$, so
$F_{1}-G$ can be negative.

Claim 3. The function $F_{a}-G$ is increasing on $(0,y_{1})$.

Clearly $F_{a}^{\prime}>F_{1}^{\prime}$ and thus the claim follows from the
fact that $F_{1}-G$ is increasing on $(0,y_{1})$, which was proved in [31]
(Chapter I, Step 5). ∎

###### Proof of Lemma 19.

The assumption $\Phi_{0}(s_{0})=\sqrt{\frac{2}{\alpha}}$ is equivalent to

$\int_{0}^{\infty}\left|\frac{\sin\pi x}{\pi
x}\right|^{s_{0}}\mathrm{d}x=\int_{0}^{\infty}\left|e^{-\frac{\pi}{2}x^{2}a}\right|^{s_{0}}\mathrm{d}x.$

After changing variables and using Lemma 20, we get from the
Nazarov–Podkorytov lemma (Chapter I, Step 4 in [31]) that for $s\geq s_{0}$

$\int_{0}^{\infty}\left|\frac{\sin
x}{x}\right|^{s}\mathrm{d}x\leq\int_{0}^{\infty}\left|e^{-\frac{1}{2\pi}x^{2}a}\right|^{s}\mathrm{d}x=\frac{\pi}{\sqrt{2as}}.\qed$

###### Proof of Lemma 16.

Take $s_{0}=2.01$ and $a=2\Phi_{0}(s_{0})^{-2}$ in Lemma 19. Since
$\Phi_{0}(2)=\sqrt{2}$, Ball’s inequality gives that $a\geq 1$. We need to
check that $a\leq\frac{\pi}{3}$. From Lemma 18, we have that for
$s\in[2,2.01]$, $\Phi_{0}^{\prime}(s)\geq-\frac{12\sqrt{2.01}}{\pi e}>-2$.
Thus, $\Phi_{0}(s_{0})\geq\Phi_{0}(2)-2(s_{0}-2)=\sqrt{2}-0.02$. Therefore,
$a<2\cdot(\sqrt{2}-0.02)^{-2}<1.03<\frac{\pi}{3}$, as needed. By Lemmas 19 and
15, we thus get that for $s\geq s_{0}=2.01$,

$\Phi_{0}(s)\leq\sqrt{\frac{2}{a}}=\Phi_{0}(s_{0})\leq\Phi_{0}(2)+\sup_{[2,2.01]}\Phi_{0}^{\prime}\cdot
0.01\leq\Phi_{0}(2)-0.02\cdot 0.01.\qed$

###  4.5. Proof of Lemma 10

Recall that we assume $X$ is a symmetric random vector in $\mathbb{R}^{3}$
with $\delta=\mathsf{W}_{2}(X,\xi)$ and characteristic function $\phi$
satisfying (5), that is $|\phi(t)|\leq C_{0}/|t|$, for all
$t\in\mathbb{R}^{3}\setminus\\{0\\}$. Let $C_{1}=\max\\{C_{0},1\\}$. Our goal
is to show that if (6) holds, that is

$\delta\leq
10^{-38}C_{1}^{-9}\min\big{\\{}(\mathbb{E}|X|^{3})^{-6},1\big{\\}},$

then $\Phi(s)\leq\Phi(2)$ for all $s\geq 2$, where $\Phi$ is defined in (22).
For the sake of clarity, we shall be fairly lavish with choosing constants.
Since $C_{1}\geq 1$, the above assumes in particular that $\delta\leq
10^{-38}$. With this in mind, we note the following consequences of Lemmas 12
and 14 respectively: for $s\geq 2$,

(34)
$|\Phi(s)-\Phi_{0}(s)|\leq\frac{2^{11/4}}{3\pi}s^{3/4}\big{(}\delta(\delta+2)\big{)}^{1/4}\big{(}C_{0}^{2}+1\big{)}^{3/4}<2s^{3/4}\delta^{1/4}C_{1}^{3/2}$

and similarly

(35)
$|\Phi^{\prime}(s)-\Phi_{0}^{\prime}(s)|<s^{-1/4}\delta^{1/4}C_{1}^{3/2}+2.1\cdot
s^{1/2}\delta^{1/7}C_{1}^{9/7}.$

We also remark that
$\|X\|_{3}\geq\|X\|_{2}\geq\|\xi\|_{2}-\|X-\xi\|_{2}=1-\delta\geq 1-10^{-38}$.

We break the argument into several regimes for the parameter $s$.

_Large $s$._ With hindsight, we set

(36) $s_{0}=\max\big{\\{}10^{6}(\mathbb{E}|X|^{3})^{2},2\log C_{1}\big{\\}}$

In particular, $s_{0}\geq 10^{5}$. Using Lemma 13, that is

$\displaystyle\Phi(s)\leq$
$\displaystyle\sqrt{\frac{6}{\pi}}\Big{(}(1-\delta\sqrt{3})^{2}-\theta\mathbb{E}|X|^{3}\Big{)}^{-1/2}$
$\displaystyle+\sqrt{\frac{6}{\pi}}\exp\left\\{-s\left(\frac{\theta^{2}}{6}-26\delta(\delta+2)\right)\right\\}+2C_{0}\left(\sqrt{s}+\frac{2}{\sqrt{s}}\right)e^{-s}=A_{1}+A_{2}+A_{3},$

we will show that $\Phi(s)\leq\Phi(2)$ for all $s\geq s_{0}$. We take
$\theta=\frac{1}{100\mathbb{E}|X|^{3}}$ which satisfies the conditions of the
lemma and then, for the first term $A_{1}$, we use

$A_{1}=\sqrt{\frac{6}{\pi}}\Big{(}(1-\delta\sqrt{3})^{2}-\theta\mathbb{E}|X|^{3}\Big{)}^{-1/2}\leq\sqrt{\frac{6}{\pi}}\big{(}1-0.01\big{)}^{-1/2}<\sqrt{2}-\frac{1}{50}.$

Thanks to (34), we also have

$\sqrt{2}=\Phi_{0}(2)\leq\Phi(2)+2^{7/4}\delta^{1/4}C_{1}^{3/2}=\Phi(2)+A_{4},$

so it suffices to show that each of the second and third terms $A_{2}$,
$A_{3}$ as well as this additional error $A_{4}$ do not exceed
$\frac{1}{150}$. Using $\delta<10^{-38}C_{1}^{-9}$, we get

$A_{4}\leq 2^{7/4}\cdot 10^{-19/2}C_{1}^{-3/4}<\frac{1}{150}.$

For the exponent in the second term $A_{2}$, observe that

$26\delta(\delta+2)<53\delta<53\cdot
10^{-38}C_{1}^{-9}(\mathbb{E}|X|^{3})^{-6}\leq
10^{-36}(\mathbb{E}|X|^{3})^{-2},$

and, consequently,

$\frac{\theta^{2}}{6}-26\delta(\delta+2)\geq\frac{1}{6\cdot
10^{4}(\mathbb{E}|X|^{3})^{2}}-\frac{1}{10^{36}(\mathbb{E}|X|^{3})^{2}}\geq\frac{1}{10^{5}(\mathbb{E}|X|^{3})^{2}}.$

Thus, using $s\geq s_{0}\geq 10^{6}(\mathbb{E}|X|^{3})^{2}$, we get

$A_{2}\leq\sqrt{\frac{6}{\pi}}\exp\left\\{-\frac{s_{0}}{10^{5}(\mathbb{E}|X|^{3})^{2}}\right\\}\leq\sqrt{\frac{6}{\pi}}\exp\\{-10\\}<\frac{1}{150}.$

Finally, for the third term, since $s\geq s_{0}\geq 10^{5}$,

$\left(\sqrt{s}+\frac{2}{\sqrt{s}}\right)e^{-s}\leq(\sqrt{s}+1)e^{-s}\leq
e^{\sqrt{s}-s}\leq\frac{1}{300}e^{-s/2},$

therefore, since $s\geq s_{0}\geq 2\log C_{1}$,

$A_{3}\leq
2C_{1}\left(\sqrt{s}+\frac{2}{\sqrt{s}}\right)e^{-s}\leq\frac{C_{1}}{150}e^{-s/2}\leq\frac{1}{150}.$

_Moderate $s$._ We now assume that $2.01\leq s\leq s_{0}$. Using (34) twice
and Lemma 16,

$\displaystyle\Phi(s)\leq\Phi_{0}(s)+2s_{0}^{3/4}\delta^{1/4}C_{1}^{3/2}$
$\displaystyle\leq\Phi_{0}(2)-2\cdot
10^{-4}+2s_{0}^{3/4}\delta^{1/4}C_{1}^{3/2}$ $\displaystyle\leq\Phi(2)-2\cdot
10^{-4}+2\cdot
2^{3/4}\delta^{1/4}C_{1}^{3/2}+2s_{0}^{3/4}\delta^{1/4}C_{1}^{3/2}$
$\displaystyle\leq\Phi(2)-2\cdot 10^{-4}+3s_{0}^{3/4}\delta^{1/4}C_{1}^{3/2}.$

Inserting the bound on $\delta$,

$\displaystyle 3s_{0}^{3/4}\delta^{1/4}C_{1}^{3/2}\leq 3\cdot
10^{-19/2}C_{1}^{-3/4}s_{0}^{3/4}\cdot\min\big{\\{}(\mathbb{E}|X|^{3})^{-3/2},1\big{\\}}$

If $s_{0}=10^{6}(\mathbb{E}|X|^{3})^{2}$, then using the
$(\mathbb{E}|X|^{3})^{-3/2}$ term in the minimum and $C_{1}^{-3/4}\leq 1$, we
get the above bounded by $3\cdot 10^{-19/2+9/2}=3\cdot 10^{-5}$. If
$s_{0}=2\log C_{1}$, then using the other term in the minimum, we get the
bound by $3\cdot 2^{3/4}10^{-19/2}C_{1}^{-3/4}(\log
C_{1})^{3/4}<3(2/e)^{3/4}10^{-19/2}<10^{-4}$ since $u^{-1}\log u\leq e^{-1}$
for $u>1$. In either case, we get the conclusion $\Phi(s)\leq\Phi(2)$.

_Small $s$._ We finally assume that $2\leq s\leq 2.01$. To argue that
$\Phi(s)\leq\Phi(2)$, we will show that $\Phi^{\prime}(s)<0$. By virtue of
(35) and Lemma 15,

$\displaystyle\Phi^{\prime}(s)$
$\displaystyle\leq\Phi_{0}^{\prime}(s)+s^{-1/4}\delta^{1/4}C_{1}^{3/2}+2.1\cdot
s^{1/2}\delta^{1/7}C_{1}^{9/7}$ $\displaystyle<-0.02+(\delta
C_{1}^{6})^{1/4}+3\big{(}\delta C_{1}^{9}\big{)}^{1/7}.$

Since $\delta C_{1}^{6}\leq\delta C_{1}^{9}\leq 10^{-38}$, this is clearly
negative and the proof is complete. $\square$

##  5\. Concluding remarks

######  Remark 1.

Assumption (3) seems natural: plainly, there are distributions which are _not_
close to the Rademacher one, for which the unit vector attaining
$\inf\mathbb{E}|\sum a_{j}X_{j}|$ is different than
$a=(\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}},0,\dots,0)$, for instance it is
$a=(1,0,\dots,0)$ for Gaussian mixtures (see [1, 10]), or for the Rademacher
distribution with a large atom at $0$ (see Theorem 4 and Remark 14 in [16]).

######  Remark 2.

Handling the complementary case $\|a\|_{\infty}>\frac{1}{\sqrt{2}}$ which is
not covered by Theorems 1 and 2 is a different story. The trivial convexity
argument presented in the introduction works in fact only for the Rademacher
case, as it requires
$\frac{1}{\sqrt{2}}\mathbb{E}|X_{1}|\geq\mathbb{E}\left|\frac{X_{1}+X_{2}}{\sqrt{2}}\right|$,
and only for the $L_{1}$-norm (see Remark 21 in [6]). To circumvent this,
several different approaches have been used: Haagerup’s ad hoc approximation
(see §3 in [14]), Nazarov and Podkorytov’s induction with a strengthened
hypothesis (see Ch. II, Step 5 in [31]) which has also been adapted to other
distributions (see [6, 5, 8]), and very recently a different inductive scheme
near the extremiser (without a strengthening) needed in a geometric context
(see [12]). None of these techniques appears amenable to the broad setting of
general distributions that is treated in this paper.

######  Remark 3.

De, Diakonikolas and Servedio obtained in [9] a stable version of Szarek’s
inequality (1) with respect to the unit vector $a$, namely

(37)
$\mathbb{E}\left|\sum_{j=1}^{n}a_{j}\varepsilon_{j}\right|\geq\mathbb{E}\left|\frac{\varepsilon_{1}+\varepsilon_{2}}{\sqrt{2}}\right|+\kappa\sqrt{\delta(a)}$

for a universal positive constant $\kappa$, where the deficit is given by
$\delta(a)=|a-(\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}},0,\dots,0)|^{2}$,
assuming that $a_{1}\geq a_{2}\geq\dots\geq a_{n}\geq 0$. Note that in the
setting of Theorem 1, we have

$\left|\mathbb{E}\left|\sum_{j=1}^{n}a_{j}X_{j}\right|-\mathbb{E}\left|\sum_{j=1}^{n}a_{j}\varepsilon_{j}\right|\right|\leq\delta_{0},$

by a simple application of the triangle inequality and
$\|\cdot\|_{1}\leq\|\cdot\|_{2}$. Thus, applying this (twice) and the bound
(37) of De Diakonikolas and Servedio, we conclude that Theorem 1 also holds
for unit vectors $a$ with $\delta(a)\geq(2\delta_{0}/\kappa)^{2}$. The same
will apply to Theorem 2 with the aid of Theorem 1.2 from [7], a strengthening
of Ball’s inequality (2) (see also [27]). See [12] for numerical values of the
constants $\kappa$.

######  Remark 4.

We have used the $\mathsf{W}_{2}$-distance in Theorems 1 and 2 for
concreteness and convenience. Of course, for every $p\geq 1$, if we use the
$\mathsf{W}_{p}$-distance in (3) and assume that $X_{1}$ is in
$L_{\frac{p}{p-1}}$, then the proofs of Lemmas 5 and 11 go through with the
Cauchy–Schwarz inequality replaced by Hölder’s inequality and the rest of the
proof remains unchanged. It might be of interest to examine weaker distances
in such statements.

## References

  * [1] Roland Averkamp and Christian Houdré. Wavelet thresholding for non-necessarily Gaussian noise: Idealism. Ann. Statist. 31 (2003), 110–151.
  * [2] Keith Ball. Cube slicing in ${\bf R}^{n}$. Proc. Amer. Math. Soc. 97 (1986), no. 3, 465–473.
  * [3] Franck Barthe and Assaf Naor. Hyperplane projections of the unit ball of $\ell_{p}^{n}$. Discrete Comput. Geom. 27 (2002), no. 2, 215–226.
  * [4] Albert Baernstein II and Robert Culverhouse. Majorization of sequences, sharp vector Khinchin inequalities, and bisubharmonic functions. Studia Math. 152 (2002), no. 3, 231–248.
  * [5] Giorgos Chasapis, Keerthana Gurushankar and Tomasz Tkocz. Sharp bounds on $p$-norms for sums of independent uniform random variables, $0<p<1$. To appear in J. Anal. Math., preprint (2021), arXiv:2105.14079.
  * [6] Giorgos Chasapis, Hermann König and Tomasz Tkocz. From Ball’s cube slicing inequality to Khinchin-type inequalities for negative moments. J. Funct. Anal. 281 (2021), no. 9, Paper No. 109185, 23 pp.
  * [7] Giorgos Chasapis, Piotr Nayar and Tomasz Tkocz. Slicing $\ell_{p}$-balls reloaded: Stability, planar sections in $\ell_{1}$. Ann. Probab. 50 (2022), no. 6, 2344–2372.
  * [8] Giorgos Chasapis, Salil Singh and Tomasz Tkocz. Haagerup’s phase transition at polydisc slicing. Preprint (2022), arXiv:2206.01026.
  * [9] Anindya De, Ilias Diakonikolas and Rocco A. Servedio. A robust Khintchine inequality, and algorithms for computing optimal constants in Fourier analysis and high-dimensional geometry. SIAM J. Discrete Math. 30 (2016), no. 2, 1058–1094.
  * [10] Alexandros Eskenazis, Piotr Nayar and Tomasz Tkocz. Gaussian mixtures: entropy and geometric inequalities. Ann. of Prob. 46(5) 2018, 2908–2945.
  * [11] Alexandros Eskenazis, Piotr Nayar and Tomasz Tkocz. Sharp comparison of moments and the log-concave moment problem. Adv. Math. 334 (2018), 389–416.
  * [12] Alexandros Eskenazis, Piotr Nayar and Tomasz Tkocz. Resilience of cube slicing in $\ell_{p}$. Preprint available at arXiv:2211.01986 (2022).
  * [13] Evgeniǐ A. Gorin and Sergey Yu. Favorov. Generalizations of the Khinchin inequality. (Russian) Teor. Veroyatnost. i Primenen. 35 (1990), no. 4, 762–767; translation in Theory Probab. Appl. 35 (1990), no. 4, 766–771 (1991).
  * [14] Uffe Haagerup. The best constants in the Khintchine inequality. Studia Math. 70 (1981), no. 3, 231–283.
  * [15] Richard R. Hall. On a conjecture of Littlewood. Math. Proc. Cambridge Philos. Soc. 78 (1975), no. 3, 443–445.
  * [16] Alex Havrilla and Tomasz Tkocz. Sharp Khinchin-type inequalities for symmetric discrete uniform random variables. Israel J. Math. 246 (2021), no. 1, 281–297.
  * [17] Alex Havrilla, Piotr Nayar and Tomasz Tkocz. Khinchin-type inequalities via Hadamard’s factorisation. To appear in Int. Math. Res. Not. IMRN, preprint (2021), arXiv:2102.09500.
  * [18] Hermann König. On the best constants in the Khintchine inequality for Steinhaus variables. Israel J. Math. 203 (2014), no. 1, 23–57.
  * [19] Hermann König and Alexander Koldobsky. On the maximal measure of sections of the $n$-cube. Geometric analysis, mathematical relativity, and nonlinear partial differential equations, 123–155, Contemp. Math., 599, Amer. Math. Soc., Providence, RI, 2013.
  * [20] Hermann König and Alexander Koldobsky. On the maximal perimeter of sections of the cube. Adv. Math. 346 (2019), 773–804.
  * [21] Hermann König and Stanisław Kwapień. Best Khintchine type inequalities for sums of independent, rotationally invariant random vectors. Positivity 5 (2001), no. 2, 115–152.
  * [22] Aleksandr Khintchine. Über dyadische Brüche. Math. Z. 18 (1923), no. 1, 109–116.
  * [23] Stanisław Kwapień, Rafał Latała and Krzysztof Oleszkiewicz. Comparison of moments of sums of independent random variables and differential inequalities. J. Funct. Anal. 136 (1996), no. 1, 258–268.
  * [24] Rafał Latała and Krzysztof Oleszkiewicz. On the best constant in the Khinchin-Kahane inequality. Studia Math. 109 (1994), no. 1, 101–104.
  * [25] Rafał Latała and Krzysztof Oleszkiewicz. A note on sums of independent uniformly distributed random variables. Colloq. Math. 68 (1995), no. 2, 197–206.
  * [26] John E. Littlewood. On bounded bilinear forms in an infinte number of variables. Quart. J. Math. Oxford Ser. 1 (1930), 164–174.
  * [27] James Melbourne and Cyril Roberto. Quantitative form of Ball’s cube slicing in $\mathbb{R}^{n}$ and equality cases in the min-entropy power inequality. Proc. Amer. Math. Soc. 150 (2022), no. 8, 3595–3611.
  * [28] James Melbourne and Cyril Roberto. Transport-majorization to analytic and geometric inequalities. J. Funct. Anal. 284 (2023), no. 1, Paper No. 109717.
  * [29] Piotr Nayar and Krzysztof Oleszkiewicz. Khinchine type inequalities with optimal constants via ultra log-concavity. Positivity 16 (2012), no. 2, 359–371.
  * [30] Piotr Nayar and Tomasz Tkocz. Extremal sections and projections of certain convex bodies: a survey. Preprint (2022), arXiv:2210.00885.
  * [31] Fedor L. Nazarov and Anatoliy N. Podkorytov. Ball, Haagerup, and distribution functions. Complex analysis, operators, and related topics, 247–267, Oper. Theory Adv. Appl., 113, Birkhäuser, Basel, 2000.
  * [32] Charles M. Newman. An extension of Khintchine’s inequality. Bull. Amer. Math. Soc. 81 (1975), no. 5, 913–915.
  * [33] Krzysztof Oleszkiewicz. Comparison of moments via Poincaré-type inequality. Advances in stochastic inequalities (Atlanta, GA, 1997), 135–148, Contemp. Math., 234, Amer. Math. Soc., Providence, RI, 1999.
  * [34] Stanisław Szarek. On the best constant in the Khintchine inequality. Stud. Math. 58, 197–208 (1976).
  * [35] Bogusław Tomaszewski. A simple and elementary proof of the Kchintchine inequality with the best constant. Bull. Sci. Math. (2) 111 (1987), no. 1, 103–109.


# Software Implementation of Digital Filtering via Tustin’s Bilinear Transform

Connor W. Herron

###### Abstract

The purpose of this work is to provide some notes on a software implementation
for digital filtering via Tustin’s Bilinear Transform. The first section
discusses how to solve for the input/output coefficients by hand using a
generalized approach called Horner’s method. The second section presents some
results of this generalized digital filtering approach using the IHMC Open
Robotics Software (ORS) stack and Simulation Construction Set 2 (SCS2) [2, 3].
This generalized approach can solve for the digital coefficients for any
causal transfer function.

##  1 Introduction

The purpose of this package is to build digital filters which can run in
control loops at a consistent known frequency, $f_{l}$. We can represent
filters in their continuous transfer function form:

$H(s)=\frac{Y(s)}{X(s)}=\frac{b_{0}s^{\rm m}+b_{1}s^{\rm m-1}+...+b_{\rm
m-1}s+b_{\rm m}}{a_{0}s^{\rm n}+a_{1}s^{\rm n-1}+...+a_{\rm n-1}s+a_{\rm n}}$
(1)

where $\rm m\leq n$ for the transfer function to be causal. We are looking to
convert the transfer function, $H(s)$, to a digital filter of the following
form

$\begin{split}y_{0}&=\rm\hat{b}_{0}y_{1}+\hat{b}_{1}y_{2}+...+\hat{b}_{\rm
n-1}y_{\rm n-1}+\hat{a}_{0}x_{0}+\hat{a}_{1}x_{1}+...+\hat{a}_{\rm n-1}x_{\rm
n-1}+\hat{a}_{\rm n}x_{\rm n}\\\
&=\hat{\textbf{b}}^{T}\textbf{y}+\hat{\textbf{a}}^{T}\textbf{x}\end{split}$
(2)

where $\hat{\textbf{b}},\textbf{y}\in\mathbb{R}^{\rm n-1\times 1}$,
$\hat{\textbf{b}}=\rm{col}[\hat{b}_{0},\hat{b}_{1},...,\hat{b}_{\rm n-1}]$ and
$\hat{\textbf{a}},\textbf{x}\in\mathbb{R}^{\rm n\times 1}$,
$\hat{\textbf{a}}=\rm{col}[\hat{a}_{0},\hat{a}_{1},...,\hat{a}_{\rm
n-1},\hat{a}_{\rm n}]$ where $\hat{b}_{i},\hat{a}_{i}\in\mathbb{R}$ are
scalars with $0\leq i\leq n$ refers to the output order. The vectors
$\textbf{x}=\rm{col}[x_{0},x_{\rm 1},...,x_{\rm n-1},x_{\rm n}]$ and
$\textbf{y}=\rm{col}[y_{1},y_{\rm 2},...,y_{\rm n-1}]$ represent the
input/output “history” where the subscript represents the loop iteration (eg.
$x_{0}$ is the current input, $x_{1}$ is the previous input, $x_{2}$ is the
previous previous input, etc.). Equation (2) must be solved in a loop running
at a consistent frequency, $f_{l}$, where the input/output histories must be
updated. Failure to achieve a consistent frequency will no longer represent
the desired transfer function. The input/output coefficient vectors
$\hat{\textbf{a}},\,\hat{\textbf{b}}$ are constant throughout the control
sequence and only need to be solved during initialization. The goal of this
work is to describe a general approach which solves for the digital
representation of any continuous, causal transfer function, which translates
to solving for a set of input/output coefficients,
$\hat{\textbf{a}},\,\hat{\textbf{b}}$ to be used in Eq. (2) as part of a
control loop.

##  2 Examples

The digital transformation used here is Tustin’s Bilinear Transform method,
which simply represents the continuous frequency variable

$s=f_{l}\cdot
ln(z)=2f_{c}\cdot\big{[}\frac{z-1}{z+1}+\frac{1}{3}\cdot(\frac{z-1}{z+1})^{3}+\frac{1}{5}\cdot(\frac{z-1}{z+1})^{5}+\frac{1}{7}\cdot(\frac{z-1}{z+1})^{7}\big{]}$
$s=2f_{l}\frac{z-1}{z+1}$ (3)

where $f_{l}$ is the digital loop frequency at which Eq. (2) is solved at.
After solving the example using the general method, I’ll show an alternative
approach which is more software friendly.

###  2.1 General Method

####  2.1.1 Example 1: General Method

This first example is a simple 1st order, unity-gain, low-pass transfer
function of the form

$H(s)=\frac{1}{\frac{s}{\omega_{0}}+1},\quad\omega_{0}=0.1\,\text{rad/s}$
$H(s)=\frac{1}{10s+1}$ (4)

where we want to solve for a set of digital input/output coefficient vectors
$\hat{\textbf{a}},\hat{\textbf{b}}$ from Eq. (2).

If we have a loop frequency of $f_{l}=0.1$ Hz (chosen simply chosen for
mathematical convenience, and is considerably lower than normal loop speeds),
we can substitute Eq. (3) in (4) to get

$\displaystyle H[z]$ $\displaystyle=\frac{1}{10\cdot(2\cdot
0.1\frac{z-1}{z+1})+1}$ $\displaystyle H[z]$
$\displaystyle=\frac{z+1}{2\cdot(z-1)+z+1}$ $\displaystyle H[z]$
$\displaystyle=\frac{Y[z]}{X[z]}=\frac{z+1}{3z-1}$

where we can split the transfer function into $Y[z]$ and $X[z]$ components

$\displaystyle Y[z](3z-1)$ $\displaystyle=X[z](z+1)$ $\displaystyle
Y[z](1-\frac{1}{3}z^{-1})$ $\displaystyle=X[z](\frac{1}{3}+\frac{1}{3}z^{-1})$

Finally, we can derive our digital filter

$y_{0}=\frac{1}{3}y_{1}+\frac{1}{3}x_{0}+\frac{1}{3}x_{1}$ (5)

where our set of input/output coefficient vectors is

$\boxed{\hat{\textbf{a}}^{T}=[\frac{1}{3},\,\frac{1}{3}],\quad\text{and}\quad\hat{\textbf{b}}^{T}=[\frac{1}{3}]}$
(6)

While this approach is relatively simple to complete by hand, it’s quite
difficult to generalize to more difficult examples. In this next example, the
desired transfer function is 2nd order.

####  2.1.2 Example 2: General Method

The 2nd order low-pass, Butterworth is a common filter of the form

$H(s)=\frac{\omega_{c}^{2}}{s^{2}+\sqrt{2}\omega_{c}s+\omega_{c}^{2}}$ (7)

For simple numerical values, I’ll choose $\omega_{c}=\sqrt{2}$ rad/s, with
$f_{l}=1$ Hz. We can start by immediately plugging in Eq. (3) where

$\displaystyle H(s)$ $\displaystyle=\frac{2}{s^{2}+2s+2}$ $\displaystyle H[z]$
$\displaystyle=\frac{2}{(2f_{l}\frac{z-1}{z+1})^{2}+2(2f_{l}\frac{z-1}{z+1})+2}$
$\displaystyle H[z]$
$\displaystyle=\frac{2(z+1)^{2}}{(4f_{l}^{2}(z-1)^{2}+4f_{l}(z-1)(z+1))+2(z+1)^{2}}$
$\displaystyle H[z]$
$\displaystyle=\frac{2(z^{2}+2z+1))}{(4(z^{2}-2z+1)+4(z^{2}-1)+2(z^{2}+2z+1)}$
$\displaystyle H[z]$
$\displaystyle=\frac{2z^{2}+4z+2}{4z^{2}-8z+4+4z^{2}-4+2z^{2}+4z+2}$
$\displaystyle H[z]$
$\displaystyle=\frac{Y[z]}{X[z]}=\frac{2z^{2}+4z+2}{10z^{2}-4z+2}$

where we can finally split the transfer function into $Y[z]$ and $X[z]$
components

$\displaystyle Y[z](10z^{2}-4z+2)$ $\displaystyle=X[z](2z^{2}+4z+2)$
$\displaystyle Y[z](1-0.4z^{-1}+0.2z^{-2})$
$\displaystyle=X[z](0.2+0.4z^{-1}+0.2z^{-2})$

Finally, our digital filter can be derived as

$y_{0}=0.4y_{1}-0.2y_{2}+0.2x_{0}+0.4x_{1}+0.2x_{2}$ (8)

and the set of input/output coefficient vectors is

$\boxed{\hat{\textbf{a}}=[0.2,\,0.4,\,0.2],\quad\text{and}\quad\hat{\textbf{b}}=[0.4,\,-0.2]}$
(9)

Using the general method, it can be hard to write an algorithm to find
$\hat{\textbf{a}},\,\hat{\textbf{b}}$ for any transfer function. In addition,
a generalized method could be computational expensive, which isn’t a deal
breaker since this task would be completed during initialization prior to loop
running, but we may have hundreds of filters and it would be good to consider
efficiency.

###  2.2 Horner’s Method

Horner’s method is a convienent way of solving the $H(s)\rightarrow H[z]$
conversion in a stepwise manner which is mathematically equivalent and
software generalizable to any causal transfer function [1]. Horner’s method
relies on the fact that we can rewrite Tustin’s bilinear transform as

$\begin{split}\frac{1}{s}&=\frac{1}{2f_{l}}\cdot\frac{z+1}{z-1}\\\
&=\frac{1}{2f_{l}}\cdot\frac{z+1-1+1}{z-1}\\\
&=\frac{1}{2f_{l}}\cdot(\frac{2}{z-1}+1)\end{split}$ (10)

In this method, instead of simply substituting Eq. (3) into the transfer
function, this method retains the polynomial orders of power while separately
considering the numerator and denominator. The method will convert

$\displaystyle\begin{split}F(s)\rightarrow F(x)\rightarrow F(x+1)\rightarrow
F(\frac{1}{x}+1)&\rightarrow F(\frac{2}{x}+1)\rightarrow F(\frac{2}{x-1}+1)\\\
&\equiv F\left(\frac{1}{2f_{l}}\cdot(\frac{2}{z-1}+1)\right)=F[z]\end{split}$
(11)

Note: The variable $x$ is a general variable to transition between layers of
the $F(s)\rightarrow F[z]$, where $x$ is not equivalent between layers. In
addition, the multiplication of $2f_{l}$ can take place in an step in
transition where I’ve chosen to the first step where $F(s)\rightarrow F(x)$.
In addition, there are steps here where the same multiplication will take
place across the numerator and denominator for convenience while being
mathematically equivalent.

####  2.2.1 Example 1: Horner’s Method

This first example is a simple 1st order, unity-gain, low-pass transfer
function of the form

$H(s)=\frac{1}{\frac{s}{\omega_{0}}+1},\quad\omega_{0}=0.1\,\text{rad/s}$
$H(s)=\frac{1}{10s+1}$ (12)

where $f_{l}=0.1$ Hz and we want to solve for a set of digital input/output
coefficient vectors $\hat{\textbf{a}},\hat{\textbf{b}}$ from Eq. (2).

1) $\boldsymbol{[F(s)\rightarrow F(x)]}$ We can start by separating the
numerator and denominator, divide the polynomial by $s^{n}$, then substitute
$s=\frac{2f_{l}}{x}$. As previously mentioned, you can choose to multiply by
$2f_{l}$ at any step in this transition.

$\displaystyle\underline{\textbf{Nume}}$
$\displaystyle\underline{\textbf{rator}}$
$\displaystyle\underline{\textbf{Deno}}$
$\displaystyle\underline{\textbf{minator}}$ $\displaystyle N(s)$
$\displaystyle=1$ $\displaystyle D(s)$ $\displaystyle=10s+1$
$\displaystyle\frac{N(s)}{s}$ $\displaystyle=\frac{1}{s}$
$\displaystyle\frac{D(s)}{s}$ $\displaystyle=10+\frac{1}{s}$
$\displaystyle\frac{N(s)}{s}\rightarrow N(x)$ $\displaystyle=\frac{x}{2f_{l}}$
$\displaystyle\frac{D(s)}{s}\rightarrow D(x)$
$\displaystyle=10+\frac{x}{2f_{l}}$ $\displaystyle N(x)$
$\displaystyle=\frac{x}{0.2}$ $\displaystyle D(x)$
$\displaystyle=10+\frac{x}{0.2}$ $\displaystyle N(x)$ $\displaystyle=5x$
$\displaystyle D(x)$ $\displaystyle=10+5x$

2) $\boldsymbol{F(x)\rightarrow F(x+1)]}$ Next we can decrease the zeros by 1
using synthetic division where

$\displaystyle\underline{\textbf{Nume}}$
$\displaystyle\underline{\textbf{rator}}$
$\displaystyle\underline{\textbf{Deno}}$
$\displaystyle\underline{\textbf{minator}}$ $\displaystyle N(x)$
$\displaystyle=5x$ $\displaystyle D(x)$ $\displaystyle=5x+10$
$\displaystyle\begin{array}[]{rrr}&5&0\\\ +&\downarrow&5\\\
\cline{2-3}\cr&\downarrow&{|}5\\\ \cline{2-3}\cr&5&\end{array}$
$\displaystyle\begin{array}[]{rrr}&5&10\\\ +&\downarrow&5\\\
\cline{2-3}\cr&\downarrow&{|}15\\\ \cline{2-3}\cr&5&\end{array}$
$\displaystyle N(x)\rightarrow N(x+1)$ $\displaystyle=5x+5$ $\displaystyle
D(x)\rightarrow D(x+1)$ $\displaystyle=5x+15$

3) $\boldsymbol{[F(x+1)\rightarrow F(\frac{1}{x}+1)]}$ Replace all zeros w/
reciprocals, equivalent to flipping the coefficients.

$\displaystyle\underline{\textbf{Nume}}$
$\displaystyle\underline{\textbf{rator}}$
$\displaystyle\underline{\textbf{Deno}}$
$\displaystyle\underline{\textbf{minator}}$ $\displaystyle N(x+1)$
$\displaystyle=5x+5$ $\displaystyle D(x+1)$ $\displaystyle=5x+15$
$\displaystyle N(\frac{1}{x}+1)$ $\displaystyle=5x+5$ $\displaystyle
D(\frac{1}{x}+1)$ $\displaystyle=15x+5$

4) $\boldsymbol{F(\frac{1}{x}+1)\rightarrow F(\frac{2}{x}+1)]}$ Scale the
polynomial zeroes by 2. Note can you could scale by either $\frac{1}{2}$ or
$2$ for the orders of power since the polynomials are in both the numerator
and denominator.

$\displaystyle\underline{\textbf{Nume}}$
$\displaystyle\underline{\textbf{rator}}$
$\displaystyle\underline{\textbf{Deno}}$
$\displaystyle\underline{\textbf{minator}}$ $\displaystyle N(\frac{1}{x}+1)$
$\displaystyle=5x+5$ $\displaystyle D(\frac{1}{x}+1)$ $\displaystyle=15x+5$
$\displaystyle N(\frac{2}{x}+1)$ $\displaystyle=5(\frac{x}{2})+5$
$\displaystyle D(\frac{2}{x}+1)$ $\displaystyle=15(\frac{x}{2})+5$
$\displaystyle=2.5x+5$ $\displaystyle=7.5x+5$

5) $\boldsymbol{F(\frac{2}{x}+1)\rightarrow F(\frac{2}{x-1}+1)]}$ Increase all
polynomial zeros by 1 using synthetic division.

$\displaystyle\underline{\textbf{Nume}}$
$\displaystyle\underline{\textbf{rator}}$
$\displaystyle\underline{\textbf{Deno}}$
$\displaystyle\underline{\textbf{minator}}$ $\displaystyle N(\frac{2}{x}+1)$
$\displaystyle=2.5x+5$ $\displaystyle D(\frac{2}{x}+1)$ $\displaystyle=7.5x+5$
$\displaystyle\begin{array}[]{rrr}&2.5&5\\\ -&\downarrow&2.5\\\
\cline{2-3}\cr&\downarrow&{|}2.5\\\ \cline{2-3}\cr&2.5&\end{array}$
$\displaystyle\begin{array}[]{rrr}&7.5&5\\\ -&\downarrow&7.5\\\
\cline{2-3}\cr&\downarrow&{|}-2.5\\\ \cline{2-3}\cr&7.5&\end{array}$
$\displaystyle N(\frac{2}{x}+1)\rightarrow N(\frac{2}{x-1}+1)$
$\displaystyle=2.5x+2.5$ $\displaystyle D(\frac{2}{x}+1)\rightarrow
D(\frac{2}{x-1}+1)$ $\displaystyle=7.5x-2.5$

6) $\boldsymbol{F(x)=F[z]]}$ Substitute in $x=z$ to equivalently write the
transfer function as

$H[z]=\frac{Y[z]}{X[z]}=\frac{N[z]}{D[z]}=\frac{2.5z+2.5}{7.5z-2.5}$ (13)

7) Derive the digital filter where

$\displaystyle Y[z](7.5z-2.5)$ $\displaystyle=X[z](2.5z+2.5)$ $\displaystyle
Y[z](1-\frac{1}{3}z^{-1})$ $\displaystyle=X[z](\frac{1}{3}+\frac{1}{3}z^{-1})$

where finally we have our digital filter.

$y_{0}=\frac{1}{3}y_{1}+\frac{1}{3}x_{0}+\frac{1}{3}x_{1}$ (14)

with input/output coefficients of

$\boxed{\hat{\textbf{a}}^{T}=[\frac{1}{3},\,\frac{1}{3}],\quad\text{and}\quad\hat{\textbf{b}}^{T}=[\frac{1}{3}]}$
(15)

Note that this solution matches the solution from the general approach shown
in (6).

####  2.2.2 Example 2: Horner’s Method

The 2nd order low-pass, Butterworth is a common filter of the form

$H(s)=\frac{\omega_{c}^{2}}{s^{2}+\sqrt{2}\omega_{c}s+\omega_{c}^{2}}$ (16)

For simple numerical values, I’ll choose $\omega_{c}=\sqrt{2}$ rad/s, with
$f_{l}=1$ Hz. So our transfer function is of the form

$H(s)=\frac{2}{s^{2}+2s+2}$

1) $\boldsymbol{[F(s)\rightarrow F(x)]}$ Separate the numerator and
denominator, divide each polynomial by $s^{n}$, and then substitute
$s=\frac{2f_{l}}{x}$.

$\displaystyle\underline{\textbf{Nume}}$
$\displaystyle\underline{\textbf{rator}}$
$\displaystyle\underline{\textbf{Deno}}$
$\displaystyle\underline{\textbf{minator}}$ $\displaystyle N(s)$
$\displaystyle=2$ $\displaystyle D(s)$ $\displaystyle=s^{2}+2s+2$
$\displaystyle\frac{N(s)}{s^{2}}$ $\displaystyle=\frac{2}{s^{2}}$
$\displaystyle\frac{D(s)}{s^{2}}$
$\displaystyle=1+\frac{2}{s}+\frac{2}{s^{2}}$
$\displaystyle\frac{N(s)}{s^{2}}\rightarrow N(x)$
$\displaystyle=\frac{x^{2}}{2}$ $\displaystyle\frac{D(s)}{s^{2}}\rightarrow
D(x)$ $\displaystyle=1+x+\frac{x^{2}}{2}$ $\displaystyle N(s)\rightarrow N(x)$
$\displaystyle=0.5x^{2}$ $\displaystyle D(s)\rightarrow D(x)$
$\displaystyle=0.5x^{2}+x+1$

2) $\boldsymbol{[F(x)=F(x+1)]}$ Decrease the zeros by 1 using synthetic
division

$\displaystyle\underline{\textbf{Nume}}$
$\displaystyle\underline{\textbf{rator}}$
$\displaystyle\underline{\textbf{Deno}}$
$\displaystyle\underline{\textbf{minator}}$ $\displaystyle N(x)$
$\displaystyle=0.5x^{2}$ $\displaystyle D(x)$ $\displaystyle=0.5x^{2}+x+1$
$\displaystyle\begin{array}[]{rrrr}&0.5&0&0\\\ +&\downarrow&0.5&0.5\\\
\cline{2-4}\cr&0.5&0.5&{|}0.5\\\ \cline{4-4}\cr+&\downarrow&0.5\\\
\cline{2-3}\cr+&0.5&{|}1\\\ \cline{2-3}\cr&0.5&\end{array}$
$\displaystyle\begin{array}[]{rrrr}&0.5&1&1\\\ +&\downarrow&0.5&1.5\\\
\cline{2-4}\cr&0.5&1.5&{|}2.5\\\ \cline{4-4}\cr+&\downarrow&0.5\\\
\cline{2-3}\cr+&0.5&{|}2\\\ \cline{2-3}\cr&0.5&\end{array}$ $\displaystyle
N(x+1)$ $\displaystyle=0.5x^{2}+x+0.5$ $\displaystyle D(x+1)$
$\displaystyle=0.5x^{2}+2x+2.5$

3) $\boldsymbol{[F(x+1)=F(\frac{1}{x}+1)]}$ Replace all zeros w/ reciprocals,
which is equivalent to flipping the coefficients

$\displaystyle\underline{\textbf{Nume}}$
$\displaystyle\underline{\textbf{rator}}$
$\displaystyle\underline{\textbf{Deno}}$
$\displaystyle\underline{\textbf{minator}}$ $\displaystyle N(x+1)$
$\displaystyle=0.5x^{2}+x+0.5$ $\displaystyle D(x+1)$
$\displaystyle=0.5x^{2}+2x+2.5$ $\displaystyle N(\frac{1}{x}+1)$
$\displaystyle=0.5x^{2}+x+0.5$ $\displaystyle D(\frac{1}{x}+1)$
$\displaystyle=2.5x^{2}+2x+0.5$

4) $\boldsymbol{[F(\frac{1}{x}+1)=F(\frac{2}{x}+1)]}$ Scale the polynomial
zeros by 2 (or $\frac{1}{2}$).

$\displaystyle\underline{\textbf{Nume}}$
$\displaystyle\underline{\textbf{rator}}$
$\displaystyle\underline{\textbf{Deno}}$
$\displaystyle\underline{\textbf{minator}}$ $\displaystyle N(\frac{1}{x}+1)$
$\displaystyle=0.5x^{2}+x+0.5$ $\displaystyle D(\frac{1}{x}+1)$
$\displaystyle=2.5x^{2}+2x+0.5$ $\displaystyle N(\frac{2}{x}+1)$
$\displaystyle=0.5(\frac{x}{2})^{2}+(\frac{x}{2})+0.5$ $\displaystyle
D(\frac{2}{x}+1)$ $\displaystyle=2.5(\frac{x}{2})^{2}+2(\frac{x}{2})+0.5$
$\displaystyle N(\frac{2}{x}+1)$ $\displaystyle=0.125x^{2}+0.5x+0.5$
$\displaystyle D(\frac{2}{x}+1)$ $\displaystyle=0.625x^{2}+x+0.5$

5) $\boldsymbol{[F(\frac{2}{x}+1)=F(\frac{2}{x-1}+1)]}$ Increase all
polynomial zeros by 1 using synthetic division.

$\displaystyle\underline{\textbf{Nume}}$
$\displaystyle\underline{\textbf{rator}}$
$\displaystyle\underline{\textbf{Deno}}$
$\displaystyle\underline{\textbf{minator}}$ $\displaystyle N(x)$
$\displaystyle=0.125x^{2}+0.5x+0.5$ $\displaystyle D(x)$
$\displaystyle=0.625x^{2}+x+0.5$
$\displaystyle\begin{array}[]{rrrr}&0.125&0.5&0.5\\\
-&\downarrow&0.125&0.375\\\ \cline{2-4}\cr&0.125&0.375&{|}0.125\\\
\cline{4-4}\cr-&\downarrow&0.125\\\ \cline{2-3}\cr-&0.125&{|}0.25\\\
\cline{2-3}\cr&0.125&\end{array}$
$\displaystyle\begin{array}[]{rrrr}&0.625&1&0.5\\\ -&\downarrow&0.625&0.375\\\
\cline{2-4}\cr&0.625&0.375&{|}0.125\\\ \cline{4-4}\cr-&\downarrow&0.625\\\
\cline{2-3}\cr-&0.625&{|}-0.25\\\ \cline{2-3}\cr&0.625&\end{array}$
$\displaystyle N(x)$ $\displaystyle=0.125x^{2}+0.25x+0.125$ $\displaystyle
D(x)$ $\displaystyle=0.625x^{2}-0.25x+0.125$

6) $\boldsymbol{[F(x)=F[z]]}$ Substitute in $x=z$ and equivalently write the
digital transfer function as

$H[z]=\frac{Y[z]}{X[z]}=\frac{N[z]}{D[z]}=\frac{0.125z^{2}+0.25z+0.125}{0.625z^{2}-0.25z+0.125}$

7) Derive the digital filter.

$\displaystyle Y[z](0.625z^{2}-0.25z+0.125)$
$\displaystyle=X[z](0.125z^{2}+0.25z+0.125)$ $\displaystyle
Y[z](1-0.4z^{-1}+0.2z^{-2})$ $\displaystyle=X[z](0.2+0.4z^{-1}+0.2z^{-2})$

Finally, our digital filter is

$y_{0}=0.4y_{1}-0.2y_{2}+0.2x_{0}+0.4x_{1}+0.2x_{2}$ (17)

where the digital input/output coefficients are

$\boxed{\hat{\textbf{a}}^{T}=[0.2,\,0.4,\,0.2],\quad\text{and}\quad\hat{\textbf{b}}^{T}=[0.4,\,-0.2]}$
(18)

Notes that this solution is equivalent to that in the general method in (9).

##  3 Results

###  3.1 Chirp Signals

I’ll show some comparisons of transfer functions using the intended model and
results of an input/output response of that model’s filter with an exponential
chirp input. A chirp signal is a sinusoid whose frequency changes linearly or
exponentially with time depending on the desired waveform. This type of signal
can be used to sweep through a frequency spectrum for generating a bode plot
of the linear system. Personally, I prefer using exponential chirp signals so
that the number of data points spent on each frequency matches the log-scale
graph of the bode plot (i.e. we get more data points on lower-frequencies that
we usually care more about). Alternatively, one could use a sequence of
sinusoids instead of a dynamic sinusoid. That allows you to separate the
transient and steady state responses, which is otherwise impossible to
separate in a chirp signal response.

Here’s the equation of the frequency change, $\omega_{\rm c}(t)$, with respect
to time for linear and exponential chirp signals

$\omega_{\rm c}^{\rm lin}(t)=\left(\frac{\omega_{\rm max}-\omega_{\rm
min}}{T}\right)\cdot t+\omega_{\rm min}$ (19)
$\omega_{\rm c}^{\rm exp}(t)=\omega_{\rm min}\cdot\left(\frac{\omega_{\rm
max}}{\omega_{\rm min}}\right)^{\frac{t}{T}}$ (20)

Figure 1: Linear and Exponential Chirp Waveforms from 0.01 to 2.5 Hz with
amplitude of 1

Where $\omega_{\rm min}$ is the minimum frequency in rad/s, $\omega_{\rm max}$
is the maximum frequency in rad/s, and $T$ is total time in seconds. Using
(19) and (20), the chirp signal for a digital system can be represented as

$\displaystyle\cos_{i}$ $\displaystyle=\cos(\omega_{c}[t]\cdot\Delta
t)\cos_{i-1}-\sin(\omega_{c}[t]\cdot\Delta t)\sin_{i-1}$ (21)
$\displaystyle\sin_{i}$ $\displaystyle=\sin(\omega_{c}[t]\cdot\Delta
t)\cos_{i-1}+\cos(\omega_{c}[t]\cdot\Delta t)\sin_{i-1}$ (22)

Finally, the chirp equation is represented by the following

$x_{i}=A\sin_{i}$ (23)

where $A$ refers to the amplitude. Figure 1 shows a plot of linear and
exponential chirp signals where $\omega_{\rm min}=2\pi\cdot 0.01$ rad/s,
$\omega_{\rm max}=2\pi\cdot 2.5$ rad/s, $T=10$ sec, and $A=1$.

###  3.2 Software Implementation of Digital Filtering

The algorithm for generating and using the filter in a control loop can be
summarized by the following pseudocode:

Algorithm 1 Using a filter in a control loop.

% Solve for Digital Coefficients, $\hat{\textbf{a}}$ and $\hat{\textbf{b}}$,
from Transfer Function, $H_{s}(s)=\frac{N_{s}(s)}{D_{s}(s)}$.

Check $n\geq m$

$\text{N}_{z}=\text{solve}_{\text{Fs}\rightarrow\text{Fz}}(\text{N}_{s})$

$\text{D}_{z}=\text{solve}_{\text{Fs}\rightarrow\text{Fz}}(\text{D}_{s})$

$\text{Scale }\text{N}_{z}\text{ and }\text{D}_{z}\text{ coefficients by
}\text{D}_{z}\text{[0].}$

$\text{Multiply }\text{D}_{z}\text{ coefficients by -1 and solve for the
}\hat{\textbf{a}}\text{ and }\hat{\textbf{b}}\text{ column vectors.}$

firstTick = true

% Run Control Loop.

while Control Loop is active do

% Initialize output and input history vectors to first input.

if firstTick then

$\textbf{y}=x_{0}\cdot\textbf{col}(1)_{\rm(n-1)\times 1}$ $\triangleright$
Heuristic for avoiding high outputs during initialization.

$\textbf{x}=x_{0}\cdot\textbf{col}(1)_{\rm n\times 1}$

firstTick = false

end if

% Update input vector, where $\textbf{x}\in\mathbb{R}^{\rm n\times 1}$.

$\textbf{x}=[x_{0},\,x_{1},\,...\,x_{\rm n-1},x_{\rm n}]^{T}$

% Solve for next filtered output.

$y_{0}=\hat{\textbf{b}}^{T}\textbf{y}+\hat{\textbf{a}}^{T}\textbf{x}$

% Update output vector, where $\textbf{y}\in\mathbb{R}^{\rm n-1\times 1}$.

$\textbf{y}=[y_{0},\,y_{1},\,...\,y_{\rm n-2},\,y_{\rm n-1}]^{T}$

end while

The following pages show some examples of the digital filtering performance
compared to an ideal model. This experimentation is completed using IHMC’s
Open Robotics Software (ORS) [2] and Simulation Construction Set 2 (SCS2) [3].

####  3.2.1 1st Order Low-Pass Filter:

The following transfer function:

$H(s)=\frac{1}{\frac{1}{\tau}s+1}$

where $\tau=2\pi\cdot 10$. This transfer function can be digitally represented
by the following input/output coefficient vectors with $f_{l}=1000$ Hz.

$\displaystyle\hat{\textbf{a}}$ $\displaystyle=[3.0459E-02,3.0459E-02]$
$\displaystyle\hat{\textbf{b}}$ $\displaystyle=[9.3908E-01]$

The input/output and bode plot from this digital filter are as follows.

Figure 2: Input-Output plot of the 1st Order LP Filter with an exponential
chirp input of 1 amplitude from 0.1 to 100 Hz Figure 3: Bode Plot of filter
with an exponential chirp input of 1 amplitude from 0.1 to 100 Hz

####  3.2.2 2nd order Low-Pass Butterworth Filter:

The following transfer function:

$H(s)=\frac{\omega_{c}^{2}}{s^{2}+\sqrt{2}\omega_{c}s+\omega_{c}^{2}}$

where $\omega_{c}=2\pi\cdot 10$. This transfer function can be digitally
represented by the following input/output coefficient vectors with
$f_{l}=1000$ Hz.

$\displaystyle\hat{\textbf{a}}$
$\displaystyle=[9.4408E-04,1.8882E-03,9.4408E-04]$
$\displaystyle\hat{\textbf{b}}$ $\displaystyle=[1.9112E+00,-9.1500E-01]$

The input/output and bode plot from this digital filter are as follows.

Figure 4: Input-Output plot of 2nd order LP Butterworth filter with an
exponential chirp input of 1 amplitude from 0.1 to 100 Hz Figure 5: Bode Plot
of filter with an exponential chirp input of 1 amplitude from 0.1 to 100 Hz

####  3.2.3 Notch Filter:

The following transfer function:

$H(s)=\frac{s^{2}+\omega_{n}^{2}}{s^{2}+\frac{\omega_{n}}{Q}s+\omega_{n}^{2}}$

where $\omega_{n}=2\pi\cdot 60$ and the quality factor, $Q=5$. This transfer
function can be digitally represented by the following input/output
coefficient vectors with $f_{l}=1000$ Hz.

$\displaystyle\hat{\textbf{a}}$
$\displaystyle=[9.6487E-01,-1.7973E+00,9.6487E-01]$
$\displaystyle\hat{\textbf{b}}$ $\displaystyle=[1.7973E+00,-9.2975E-01]$

The input/output and bode plot from this digital filter are as follows.

Figure 6: Input-Output plot of Notch Filter set to 60 Hz with an exponential
chirp input of 1 amplitude from 0.1 to 100 Hz Figure 7: Bode Plot of filter
with an exponential chirp input of 1 amplitude from 0.1 to 100 Hz

####  3.2.4 Complex Multi-order Filter:

The following transfer function:

$H(s)=\frac{196.92s^{3}+21033.79s^{2}+427573.90s+18317222.93}{s^{3}+382.16s^{2}+60851.34s+3875784.59}$

This transfer function can be digitally represented by the following
input/output coefficient vectors with $f_{l}=1000$ Hz.

$\displaystyle\hat{\textbf{a}}$
$\displaystyle=[1.7198E+02,-4.9816E+02,4.8074E+02,-1.5455E+02]$
$\displaystyle\hat{\textbf{b}}$
$\displaystyle=[2.6305E+00,-2.3162E+00,6.8252E-01]$

The input/output and bode plot from this digital filter are as follows.

Figure 8: Input-Output plot of multi-order filter with an exponential chirp
input of 1 amplitude from 0.1 to 100 Hz Figure 9: Bode Plot of filter with an
exponential chirp input of 1 amplitude from 0.1 to 100 Hz

####  3.2.5 PID Controller:

A PID Controller can be represented by the following causal (and unstable)
transfer function:

$\displaystyle H(s)=(K_{p}+\frac{1}{s}K_{i}+\frac{\tau
s}{s+\tau}K_{d})=\frac{(K_{p}+K_{d}\tau)s^{2}+(K_{p}\tau+K_{i})s+K_{i}\tau}{s^{2}+\tau
s}$

where $K_{p}=15.0$, $K_{i}=2$, $K_{d}=0.25$, and $\tau=0.0035$ which simply
acts as a low-pass filter on the derivative term for cleaner signals and
causality. This transfer function can be digitally represented by the
following input/output coefficient vectors with $f_{l}=1000$ Hz.

$\displaystyle\hat{\textbf{a}}$
$\displaystyle=[1.5002E+01,-3.0002E+01,1.5000E+01]$
$\displaystyle\hat{\textbf{b}}$ $\displaystyle=[2.0000E+00,-1.0000E+00]$

The input/output and bode plot from this digital filter are as follows.

Figure 10: Input-Output plot of PID Controller with an exponential chirp input
of 1 amplitude from 0.1 to 100 Hz Figure 11: Bode Plot of filter with an
exponential chirp input of 1 amplitude from 0.1 to 100 Hz

####  3.2.6 Lead-Lag Compensator:

The following transfer function:

$H(s)=K\frac{s+z}{s+p}$

where $K=10.0$, $z=2\pi\cdot 1.0$, and $p=2\pi\cdot 10.0$. This transfer
function can be digitally represented by the following input/output
coefficient vectors with $f_{l}=1000$ Hz.

$\displaystyle\hat{\textbf{a}}$ $\displaystyle=[9.7259E+00,-9.6650E+00]$
$\displaystyle\hat{\textbf{b}}$ $\displaystyle=[9.3908E-01]$

The input/output and bode plot from this digital filter are as follows.

Figure 12: Input-Output plot of a Lead-Lag Compensator with an exponential
chirp input of 1 amplitude from 0.1 to 100 Hz Figure 13: Bode Plot of filter
with an exponential chirp input of 1 amplitude from 0.1 to 100 Hz

####  3.2.7 Heuristic for Avoiding High Outputs on Initialization

As mentioned in Algorithm 1, a heuristic is added to set the $\mathbf{x}$ and
$\mathbf{y}$ history vectors to the initial input. Without this heuristic, the
first input and output history vectors can be initialized to zero and tend to
have very high solutions at the start. This effect can be shown for the
following example with a 2nd order Low-Pass Butterworth and Lead-Lag
Controller, with equivalent transfer functions to Sections 3.2.2 and 3.2.6,
respectively. The input is a sinusoidal function of the form $x=\sin(2\pi\cdot
100t)+5$.

Figure 14: Start up heuristic to avoid large outputs for a 2nd order
butterworth and lead-lag controller with an input of $x=\sin(2\pi\cdot
100t)+5$.

## References

  * [1] A Davies.  Bilinear transformation of polynomials.  IEEE Transactions on Circuits and Systems, 21(6):792–794, 1974\.
  * [2] Institute of Human and Machine Cognition.  IHMC Open Robotics Software.  ihmcrobotics.github.io, January 5, 2024.
  * [3] Institute of Human and Machine Cognition.  IHMC Simulation Construction Set 2.  github.com/ihmcrobotics/simulation-construction-set-2, January 5, 2024.