Mon Aug 30 20:51:36 CEST 2021

```On Sun, Aug 29, 2021 at 10:03:20PM +0200, Robin Gareus wrote:

> This works well, except for the first FFT bin: 0 Hz, DC offset. If the
> phase-shift changes the average DC level of the signal there is a
> discontinuity.

To understand why you can't chage the phase of DC at an even more
fundamental level, imagine the complex plane, and a vector starting
at the origin and rotating anti-clockwise with frequency F.

So its angle will be

A(t) = 2 * pi * F + P for some F and P, where P (or sometime A(t),
depending on context) is called the phase.

Your 'signal' is the endpoint of the vector, clearly a complex value,

To get a real-valued signal you need a second vector, the mirror image
of the first one w,r.t. the real axis, and so rotating clockwise, i.e.
with a negative frequency,

The sum of the two vectors is then always purely real.

That's why it is said that real-valued signals always contain both
positive and negative frequencies with equal magnitude.

The angle of the second vector is -A(t). So its phase is -P

So the condition for having a real-valued signal is that the phase
for the negative frequency is minus the phase of the positive one,
and both have the same amplitude. The only way to satisfy this
condition for 0 Hz is that the phase must be zero,

--
FA

```