Let's start with periodic sequences.

An N-periodic sequence has only N degrees of freedom, and

DFS captures the situation by providing us with a spectral representation for

the sequence that only has N distinct Fourier coefficients.

We can illustrate these points more in detail with the help of the Karplus Strong

algorithm.

You remember how the Karplus Strong circuit works, you have an input,

you have a delay line of length big-M, and that's an iteration factor alpha.

As the samples go in the circuit, they get pushed out to the output, and

they get pushed also to the delay line.

That will be stored here, and

output at the other end of the delay line after big-M samples,

where they get iterated by a factor alpha and summed to the current input.

If we were to describe this mathematically,

we would have what we call a difference equation that relates the current output

to the past output that has gone through the delay line.

So, an output delay by big-M scaled by the attenuation factor and

sum to the original input.

We can use the circuit to generate the simple periodic signal, and to do that,

we choose an input signal, X, that is nonzero only for n between zero and M.

That means that x(n) is actually a finite support sequence, and

that's why we use the overbar notation.

You will only have big-M nonzero samples, and it will be zero everywhere else.

Then we choose alpha equal to 1, so there will be no attenuation in the loop.

If we input this signal to the Karplus Strong circuit,

we will see that the output consists of a periodic signal, where each period is

constituted of the M nonzero samples of the input finance support signal.

Suppose, for instance, that our finance support signal looks like these,

has a nonzero support of 32 points and

over the support it looks like a straight line, and it's zero everywhere else.

So if we use this as an input to the algorithm, we will get a periodic

repetition of this shape, which overall will look like a sawtooth wave.

If we take the DFT of this signal considered as a 32 point

finite length signal, The DFT will look like this.

Computing the exact value of the DFT coefficients is left as an exercise.

Just note, for instance, that the coefficient is 0.

Is 0 because the signal is actually centered around 0 so it's average is 0.

What happens then if we take the DFT of two periods?

So we consider the first 64 points that came out of the carplestrom algorithm and

we take the DFT of this.

Well, if we go through the math algorithm and we put this into analytical package,

we will see that shape of the DFT coefficient, the envelope, so to speak,

is the same As the one for just the first 32 points.

However for every DFT coefficient there is an extra DFT coefficient with value 0.

In other words, the DFT coefficients have been with 0 valued coefficients.

To get an intuition as to why it is so, let's go back to the definition of DFT.

Each DFT coefficient will be the inner product between the appropriate

basis vector and the Fourier basis for c 64.

And this signal that we see here.

So let's see graphically how these inner products are computed.

Let's start with the first basis vector.

We will show here in blue just the Ideal shape of this basis vector.

We don't really care about the real and

imaginary part because we're just interested in the structure.

The first vector is just the constant one.

And the result of the inner product will be the non-normalized average

of this signal in red.

We know the average to be zero, the same holds for two periods.

So the first coefficient is zero, for k =1 we have the first basis vector and

this will be a sinusoid that will spend a full period over 64 points.

What that means is that the first 32 points will be multiplied by a shape

that is exactly the inverse Of the shape for the next 32 points.

And so this subsum of the inner product plus this will get 0.

For k = 2, on the other hand,

the Fourier vector will span 2 periods over the space of 64 points.

And so here we simply have Twice the same thing,

this half of the inner product will be equal to the second half and

the DFT coefficient will be twice the original DFT coefficient.