Signals and Systems Part 2: Fourier Series

Lesson 8: What about Offsets?


Cosines of Zero Frequency

We saw that we can represent an odd square wave with a Sine Fourier Series, and an even square wave (just a shifted version) with the Cosine Fourier Series, but what if we add an offset to the signal? How do we handle that? Let's add an offset of 1 to the even square wave we were using in the last lesson:

How do we handle this offset? Well, we can think of an offset as a cosine of zero frequency. \(cos(0x)\) is just 1, regardless of what \(x\) is. So we can represent the offset with the term \(a_0*cos(0x)\), or the "zero harmonic" as it's sometimes called. If we are adding an offset of 1, we would expect this \(a_0\) term to be 1 - we know exactly how much offset is conained in our signal, but what is it if we use the definition?

\begin{equation} a_0=\frac{2}{P}\langle 1 + sq_e(x), 1 \rangle = \frac{2}{2\pi}\int_{-\pi}^{\pi}1+sq_e(x)dx = 2 \end{equation}

Since the square wave itself integrates to 0, we only end up integrating the offset over our period, but the result is twice as large as expected! What gives? We know the offset is 1.

Energy Bites us in the Butt

The problem turns out to be that \(cos(0x)\) has twice as much energy as all the other cosines over a single period (\(2\pi\)) of our square wave: \(cos(1x), cos(2x)\) and so on all have an energy of \(\pi\), but \(cos(0x)\) has an energy of \(2\pi\). So if we want to deal with offsets, we can still use the cosine Fourier Series, but we have to remember to divide the \(a_0\) coefficient by 2. That's a little awkward, but it works.

What would the coefficient \(a_0\) be if we multiplied the entire signal, \(1+sq_e(x)\), by 2?





What would the offset be if we multiplied the entire signal, \(1+sq_e(x)\), by 2?





Intuition behind the math

There's a mathy way to calculate the offset, but what does it actually mean? Well, it's just the average value of our signal, or the mean or expected value. In electrical engineering it's also called teh 'DC term' or 'DC offset', to indicate something that doesn't change with time.

Bringing it all together

You might be wondering why we went to all this trouble when we know what the offset is in the first place - it's 1. The answer is that usually we don't know the offset. Usually we have some unknown signal, and we want to find out what it is. The Fourier Series lets us do that. In the next lesson, we will bring together everything we have learned about even and odd signals, the sine and cosine Fourier Series, and the 'zero-frequency' offset together in the full Sine/Cosine Fourier Series.




If you found this content helpful, it would mean a lot to me if you would support me on Patreon. Help keep this content ad-free, get access to my Discord server, exclusive content, and receive my personal thanks for as little as $2. :)

Become a Patron!