# Signal processing - why compute imaginary part?

I'm new to signal processing.

Could somebody explain to me what are the benefits and reasons for decomposing a signal into real and especially imaginary parts?

I'm looking at the hilbert transform in matlab. Matlal hilbert transform

The imaginary part is a version of the original real sequence with a 90° phase shift. What exactly is a phase shift of 90 degrees.

For example if I have a data sequence of [100, 100, 200, 100, 200], how are the imaginary parts calculated? How do you phase shift 90 degrees?

Thanks

• You are wrong. The real and imaginary part look similar, but they are not just shifted data, they are different. – Ander Biguri Jun 10 '15 at 12:56
• @AnderBiguri - thats what the matlab page says?? – lucozade Jun 10 '15 at 13:05
• No it doesn't, you just can see it with the bare eye. Look e.g. to the second figure. Real part has 6 peaks while imaginary 4. " The analytic signal x = xr + i*xi has a real part, xr, which is the original data, and an imaginary part, xi, which contains the Hilbert transform" – Ander Biguri Jun 10 '15 at 13:09
• @AnderBiguri matlab reference correctly indicates that the imaginary part contains a phase shift, not time shifted data. The same phase shift for different frequency components results in different time shifts which alters the shape in figure 2. – SleuthEye Jun 10 '15 at 13:47
• @Pi, flag for moderator attention then. – A. Donda Jun 10 '15 at 19:14

One use of Hilbert Transform is to recover the amplitude envelope of a signal.

Here is a practical example: Extracting Binary Magnetic-Strip Card Data from raw WAV

Often the shortest distance between two points is through complex analysis. Even if the start and destination don't appear to involve complex numbers.

Regarding "What is the phase shift of 90°?": If it is single cisoid, i.e. a single point making a circular orbit around the origin on the complex plane, then applying a phase shift of 90° obviously sets it backwards or forwards by a quarter-cycle. Now if you consider an arbitrary waveform to be a sum of cisoids with different amplitude, phase and frequency, (Fourier Theory shows that you can generally achieve this), you can just set each one back by a quarter cycle, and recombine. That's one way to accomplish the Hilbert Transform.

http://bl.ocks.org/jinroh/7524988 <-- this gives a visual example of combining cisoids into the target waveform.

This is really more than one question and for any answer to make sense, you have to come to terms (or be okay with) with Euler's formula: $$e^{i\theta}=\cos(\theta) +i\sin(\theta)$$

There's a good math.stackexchange with plenty of fodder to gain intuition. Then reasoning about imaginary parts, harmonic conjugates, Hilbert & its relationship to Fourier becomes more straightforward. Also, it makes reading the docs for any (MATLAB) implementation less "WTF?". Good luck.

A window of samples can be decomposed into an even vector (symmetric about the center) and an odd vector (anti-symmetric about the center). The even vector is the "real" or cosine component in the frequency domain, the odd vector is the "imaginary" or sine component in the frequency domain. These two vectors are orthogonal under certain operations.

If you only use the real component, then you can only analyze symmetric windows of data (or cosine compositions).

Combining the two components, cosine and sine, into a single complex data type representation allows writing many of the equations regarding signal processing using less pencil or chalk (half as many symbols to scribble).