We are said that in nature oscillations are everywhere,

from the heartbeat to engines to waves to musical instruments.

And the fact is,

the sustainable dynamic systems must exhibit an oscillatory behavior.

Somehow you have to have something that comes back to it's initial state,

because things that don't move in circle cannot really last for a long time.

So, for instance, a bomb has a lot of energy but

the release of energy is unidirectional, and so not sustainable.

Rockets, same way, and unfortunately, human beings as well,

although many parts inside our bodies do work in circular patterns.

An oscillation is the product of a rotation, you take a point on the plane,

you make it go around in a circle, you create an oscillatory behavior.

If you put a coordinates systems around the center of the oscillation,

you can describe the vertical and horizontal displacement of this

point as it goes around the circle with a cosine and the sine function.

So you always have two trigonometric functions that work together to describe

the position of something that turns around in circles.

Perhaps it's easier use a complex reference system centered on the origin of

the oscillation.

And use a complex exponential to describe the position of the point on the plane.

So we will say that the position of the point is described by a complex

exponential e to the j omega t, where omega is the rotation frequency.

So here we are in standard algebraic terms where t is a real variable that

indicates time, in discrete-time things are a little bit different.

The discrete-time oscillatory heartbeat has three fundamental ingredients,

a frequency omega, where the units are radians and not radians over seconds.

Because our "time variable is adimensional",

it has initial phase phi and an amplitude A, and

the discrete-time sequence is Ae to the j (omega n + phi).

We can use Euler's formula to decompose this into a real and imaginary part,

that's why we have A[cos(omega n + phi) + j sin(omega n + phi)].

So, why use complex exponentials instead of explicit sine and cosine functions?

Well, first of all, while building our own digital signal processing world,

we said we can use complex numbers in digital systems, so why not?

But it makes sense because every circle or

motion is always a sine and cosine intertwined and

Euler's formula compactly brings them together in one single function.

And it makes math simpler because trigonometry becomes simple algebra, for

instance, let's try and

change the phase of a cosine In the old-school trigonometric way.

So if we have cos(omega n + phi),

then we have to remember the trigonometric identities for the sum of angles.

And we know that the result will be something like a cos of

the first term + b sin of the first term.

But do we remember if it's plus or minus or do we remember the values for a and

b and so on, so forth?

So it's kind of a mess and very much error prone, conversely, if we try and

change the phase using complex algebra, we have the cos(omega

n + phi) is simply the real part of e to the j(omega n + phi).

Now we can decompose this complex exponential into the product of two

complex exponentials.

We have no problem performing the multiplication of two complex numbers when

we separate the real and imaginary parts.

And then we get the result without any numonic effort, so sine and

cosines live together, phase shift becomes simple multiplication and

the notation is way simpler.

Okay, so the complex exponential is our friend,

let's get to know it a little bit better.

The complex number e to the j alpha is a complex number with real

part consign of alpha and imaginary part sin of alpha.

A magnitude e to the j alpha is always equal to 1, so the point e to the j

alpha always lives on the unit circle, and how we find this point?

Well we travel along the unit circle counterclockwise until we reach

an angle equal to alpha, where alpha's expressed in radians, and

that is the position of our complex exponential.

If we have any point on the complex plane, and

we multiply this point by e to the j alpha, we are rotating

this point counterclockwise by an angle alpha on a circle,

centered in the origin, and with radius equal to the magnitude of z.

So we can use multiplication by a complex exponential

to rotate any point on the complex plane.

This is actually at the heart of complex exponential generating machine that will

create all these complex exponential signals that we will use in the future.

So a sequence like x[n] = e to the j omega n,

where omega is the frequency of the complex exponential sequence.

Can be obtained at each step by multiplying the previous point in

the sequence by e to the j omega, okay?

So this is how we recursively generate a complex exponential sequence, and

if we plot the sequence of points on the plane, it'll all start at one location.

So let's assume that x[0] = 1, and so

the next step will be 1 times e to j omega, and

we will have moved here by an angle omega, counterclockwise around the unit circle.

And then in next step we will move by another angle omega, and so on and

so forth, and that's how we generate a complex exponential signal.

Here in this example you see that after 12 steps we go back to the original point,

so clearly we can say that omega = 2pi divided by 12.

Because in 12 steps we have gone back to the starting point,

after going around the circle the sequence repeats.

Of course, initial point need not be 1,

we can start at any arbitrary point on the complex plane, and

the complex exponential sequence will proceed exactly in the same way.

Where we advance counterclockwise by an angle omega at each step,

and here, for instance, we keep the same frequency of 2pi over 12.

And so we will repeat the pattern once again every 12 steps, now so far,

there haven't been many surprises with respect to standard complex algebra.

But here is a one key fact about discrete-time complex exponentials,

in discrete time, not every sinusoid is periodic.

As a matter of fact, if you'll choose an arbitrary omega,

there's a high probability that you will never end up on any of the previous points

in your complex exponential sequence, as you can see in this picture here.