# Using the imaginary number (i) as a phase shift operator

• Jan 8th 2010, 06:17 AM
kevinvinv
Using the imaginary number (i) as a phase shift operator
It seems intuitive that multiplying by i should shift the phase of a signal by 90 degrees.

I believe this can be shown to be true using euiler identities.

However, something doesn't make sense.

If I multiply cos(theta) by i -- and plot the result, I don't see the cosine shifted by 90 degrees, instead I get a string of complex numbers which I can't even really plot.

So what obvious thing am I not understanding here?

Thanks!
• Jan 8th 2010, 06:21 AM
You want to phase shift the angle only.
You are multiplying the function itself by i.
You need to keep the function real, while shifting the angle.
Hope that helps.
• Jan 8th 2010, 06:54 AM
kevinvinv
Sorry I don't exactly follow.

So what should I multiply a cosine by then to shift the phase by 90 degree's ?
• Jan 8th 2010, 07:15 AM
HallsofIvy
You don't multiply the cosine by anything. You write $\displaystyle cos(\theta)= \frac{e^{i\theta}+ e^{-i\theta}}{2}$ and do the shift by adding something to $\displaystyle \theta$.
• Jan 8th 2010, 07:42 AM
kevinvinv
Thank you,

But if I multiply cosine by i twice, I get a 180 degree phase shift. So if I multiply cosine by i once, I should get a 90 degree phase shift.

I can show this to be true using the Euiler definition of Cosine but not by doing the simple i*cosine(theta) operation-- and this is the root of my question

Does that make sense?
• Jan 8th 2010, 08:02 AM
CaptainBlack
Quote:

Originally Posted by kevinvinv
It seems intuitive that multiplying by i should shift the phase of a signal by 90 degrees.

I believe this can be shown to be true using euiler identities.

However, something doesn't make sense.

If I multiply cos(theta) by i -- and plot the result, I don't see the cosine shifted by 90 degrees, instead I get a string of complex numbers which I can't even really plot.

So what obvious thing am I not understanding here?

Thanks!

Don't rely on intuition in signal processing (not until you have 10+ years experience anyway) it is often just wrong.

It shifts the phase of an analytic signal, that is a signal of the form:

$\displaystyle s(t)=\sum_{k}A_k(t) e^{(2 \pi f_k t +\phi_k)i}$

where $\displaystyle A_k(t)>0$ for all $\displaystyle k$ in the sum

Your $\displaystyle \cos(2 \pi f t)$ signal is the real part of $\displaystyle e^{2 \pi f t i}$ and the phase shifted signal you want is the real part of $\displaystyle ie^{2 \pi f t i}$

You can also do this by writing $\displaystyle \cos(2 \pi f t)$ in the complex exponential form given in HallsofIvy's post then multiplying by $\displaystyle j$, but ther algebra is more complicated (That is my opinion anyway. Others probably differ)

CB
• Jan 8th 2010, 12:53 PM
kevinvinv
Hmmm... that helps somewhat.

I am not sure what the term "Analytic Signal" really means- can you clarify by chance?
• Jan 8th 2010, 01:53 PM
CaptainBlack
Quote:

Originally Posted by kevinvinv
Hmmm... that helps somewhat.

I am not sure what the term "Analytic Signal" really means- can you clarify by chance?

It means exactly what I posted, it is the sum of one or more complex exponential signals.

CB
• Jan 8th 2010, 02:00 PM
kevinvinv
OK,

Well- I understand some of what your saying but am getting the sense that you aren't too interested in helping someone gain the intuition that comes from 10 yrs of DSP so I'll just back off for now. (Nod)

It seems odd that j^2 (cos(theta)) does a 180 degree phase shift but j(cos(theta)) does not do a 90 degree shift. That is the root of the question for anyone else who might be watching this.

Thanks!
• Jan 8th 2010, 09:56 PM
CaptainBlack
Quote:

Originally Posted by kevinvinv
OK,

Well- I understand some of what your saying but am getting the sense that you aren't too interested in helping someone gain the intuition that comes from 10 yrs of DSP so I'll just back off for now. (Nod)

It seems odd that j^2 (cos(theta)) does a 180 degree phase shift but j(cos(theta)) does not do a 90 degree shift. That is the root of the question for anyone else who might be watching this.

Thanks!

Long winded way with analytic signal form:

$\displaystyle \text{re}(j^2 e^{2\pi f t j})=$$\displaystyle \text{re}(j^2 \cos(2 \pi f t)+j^2 j \sin(2 \pi f t)) = \displaystyle \text{re}(-\cos(2 \pi f t) -j \sin(2 \pi f t))=-\cos(2 \pi f t)=\cos(2 \pi f t + \pi) Better, note \displaystyle j=e^{(\pi j)/2} and \displaystyle -1=j^2=e^{\pi j}: \displaystyle \text{re}(j^2 e^{2\pi f t j})=$$\displaystyle \text{re}(e^{\pi j}e^{2\pi f t j})=\text{re}( e^{(2\pi f t+\pi) j})=\cos(2 \pi f t + \pi)$

and:

$\displaystyle \text{re}(j e^{2\pi f t j})=$$\displaystyle \text{re}(e^{(\pi j)/2}e^{2\pi f t j})=\text{re}( e^{(2\pi f t+\pi/2) j})=\cos(2 \pi f t + \pi/2)$

Complex analytic signals can be phase shifted by multiplying by the appropriate complex phase factor $\displaystyle e^{\phi j}$ real signals cannot (except under the exceptional circumstances where the complex phase factor just happens to be real)

CB
• Jan 8th 2010, 10:41 PM
CaptainBlack
Quote:

Originally Posted by kevinvinv
OK,

Well- I understand some of what your saying but am getting the sense that you aren't too interested in helping someone gain the intuition that comes from 10 yrs of DSP so I'll just back off for now. (Nod)

You don't need the intuition is my point you just need the knowlege that you use complex analytic signals when doing phase shifting my multiplication by a phase factor. All intuition will tell you is when a short cut is feasible and/or appropriate and then you will still get things wrong, we all do.

CB
• Jan 9th 2010, 01:05 AM
Quote:

Originally Posted by kevinvinv

It seems odd that j^2 (cos(theta)) does a 180 degree phase shift but j(cos(theta)) does not do a 90 degree shift.

$\displaystyle j^2\ or\ i^2\ is\ real.$

$\displaystyle j\ or\ i\ is\ not.$

When you multiply a function by -1, you invert it with respect to the x axis,
hence the 180 degree phase shift.
Multiplying by j or i is very different.

The world of complex numbers is quite surreal.
• Jan 9th 2010, 04:26 AM
Multiplying by i does phase shift a constant by 90 degrees,
but this is implied in how complex numbers represent the
phase shift in voltage and current in RLC circuits etc.

There is a 90 degree phase shift between any real value and any imaginary value.

4 leads -4i or any other imaginary negative constant by 90 degrees.
5i leads 5 or any positive real constant by 90 degrees.
-7 leads 4i by 90 degrees.
-8i leads -3 by 90 degrees.

If you multiply a Sine or Cosine function by i, however,
you are not multiplying a real by imaginary or imaginary by real.
The question is... why would you do that?

HallsofIvy's and CaptainBlack's explanations show what you need to study on phase-shifting.

Attached is cosx and cosx phase-shifted by 90 degrees.
• Jan 12th 2010, 10:31 AM
kevinvinv
OK- so I've asked around and done some googling, I need a pointer to a good reference on when and when not to use analytic signals, what they are good for and the basics...

Any suggestions? I am an analog circuit designer with a good bit of experience--- just not in this area.