Demodulation with Hilberttransformation

Started by August 27, 2013
```Hello,

Using " highpass | rectify | lowpass | downsample" for ages to demodulate
signald, I've just found that demodulation using Hilberttransformation
seems to be very easy (speaking matlab/octave):

function y=demodulate( x )
y=sqrt(x.^2 + real(hilbert(x)).^2);
endfunction

(I implemented "hilbet" myself, using fft)

That's the "how", easy ;) But I do not understand the "why". I understand
that adding two phase shifted signals cancels part of the signal, but
that's it.

Or can you explain?

Thank you,
Grue

_____________________________
Posted through www.DSPRelated.com
```
```On Tuesday, August 27, 2013 7:38:49 AM UTC-4, The Grue wrote:
> Hello,
>
>
>
> Using " highpass | rectify | lowpass | downsample" for ages to demodulate
>
> signald, I've just found that demodulation using Hilberttransformation
>
> seems to be very easy (speaking matlab/octave):
>
>
>
>
>
> function y=demodulate( x )
>
>   y=sqrt(x.^2 + real(hilbert(x)).^2);
>
> endfunction
>
>
>
> (I implemented "hilbet" myself, using fft)
>
>
>
> That's the "how", easy ;) But I do not understand the "why". I understand
>
> that adding two phase shifted signals cancels part of the signal, but
>
> that's it.
>
>
>
>
> Or can you explain?
>
>
>
> Thank you,
>
> Grue
>
>
>
>
>
>
>
> _____________________________
>
> Posted through www.DSPRelated.com

In short, a Hilbert transformer shifts a signal by 90 degrees.

See here for more details:  http://www.claysturner.com/dsp/HilbertTransforms.pdf

IHTH,
Clay

http://www.claysturner.com/dsp/HilbertTransforms.pdf

```
```>Hello,
>
>Using " highpass | rectify | lowpass | downsample" for ages to demodulate
>signald, I've just found that demodulation using Hilberttransformation
>seems to be very easy (speaking matlab/octave):
>
>
>function y=demodulate( x )
>  y=sqrt(x.^2 + real(hilbert(x)).^2);
>endfunction
>
>(I implemented "hilbet" myself, using fft)
>
>That's the "how", easy ;) But I do not understand the "why". I understand
>that adding two phase shifted signals cancels part of the signal, but
>that's it.
>
>Could you give me a pointer (online preferred) for reading more about
this?
>Or can you explain?
>
>Thank you,
>Grue
>
>
>
>_____________________________
>Posted through www.DSPRelated.com
>

http://en.wikipedia.org/wiki/Analytic_signal

_____________________________
Posted through www.DSPRelated.com
```
```>http://en.wikipedia.org/wiki/Analytic_signal

completely /why/ an analytic signal is a demodulation, but I think I'll get

Thanks,
Grue

_____________________________
Posted through www.DSPRelated.com
```
```"The Grue" <98409@dsprelated> writes:

>>http://en.wikipedia.org/wiki/Analytic_signal
>
> completely /why/ an analytic signal is a demodulation, but I think I'll get

Converting from a real signal to an analytic signal is not in itself a
demodulation, but often, and especially in digital communications, we
want to "quadrature demodulate" a signal, which is a combination of a
Hilbert transform and a mix to baseband. It is the mix that
"demodulates" since it converts from a carrier to baseband. It is the
carrier that is "modulated" at the transmitter.

I kinda don't like the term "demodulate" associated with quadrature
demodulator since one interpretation is to "recover the information that
was modulated." Yet many times the quadrature demodulation is not the
final step - there is more to do to recover the information, such as FM
discrimination, symbol slicing, etc.
--
Randy Yates
Digital Signal Labs
http://www.digitalsignallabs.com
```
```On 29.8.13 1:07 , The Grue wrote:
>> http://en.wikipedia.org/wiki/Analytic_signal
>
> completely /why/ an analytic signal is a demodulation, but I think I'll get
>
> Thanks,
> Grue
>
> _____________________________
> Posted through www.DSPRelated.com

In your case, the conversion to an analytic signal is not demodulation.
The demodulation of your AM signal happens when you calculate the norm
(magnitude) of the analytic signal.

--

Tauno Voipio

```
```On Thu, 29 Aug 2013 05:07:44 -0500, "The Grue" <98409@dsprelated>
wrote:

>>http://en.wikipedia.org/wiki/Analytic_signal
>
>completely /why/ an analytic signal is a demodulation, but I think I'll get
>
>Thanks,
>Grue

Converting from IF to baseband is, IMHO, more a tuning operation than
"demodulation".   De-modulating implies undoing the modulation, which
may not, and usually doesn't, have anything to do with frequency
conversion.

Many modulations are easier to demodulate at baseband when the signal
is complex-valued, and often the modulation is applied using complex
values at baseband as well (e.g., QPSK, QAM, etc.).

Unfortunately some do use the term "demodulation" the way you have,
but I think it is more confusing than helpful.

>_____________________________
>Posted through www.DSPRelated.com

Eric Jacobsen
Anchor Hill Communications
http://www.anchorhill.com
```
```Eric Jacobsen <eric.jacobsen@ieee.org> wrote:

(snip)

> Converting from IF to baseband is, IMHO, more a tuning operation than
> "demodulation".   De-modulating implies undoing the modulation, which
> may not, and usually doesn't, have anything to do with frequency
> conversion.

Reminds me of the discussion about whether a device is, or is not,
a modem based on whether it does, or does not, modulate and
demodulate anything.

To me, though IF to baseband is demodulating, where RF to IF is,
in the systems I know, frequency conversion.

But OK, detection is the non-linear operation that demodulates
an AM signal. So, you want to separate the conversion to baseband
(as not demodulation) and detection.

Do you agree that AF to IF is modulation? So, IF to RF is not?

> Many modulations are easier to demodulate at baseband when the signal
> is complex-valued, and often the modulation is applied using complex
> values at baseband as well (e.g., QPSK, QAM, etc.).

Leaving aside the comments by some that physical signals are
never complex, as voltmeters never measure complex voltages.

> Unfortunately some do use the term "demodulation" the way you have,
> but I think it is more confusing than helpful.

Seems to me that the operation of a mixer is commonly modulation
when going up, and it also could be going down.

-- glen

```
```On Thu, 29 Aug 2013 19:04:49 +0000 (UTC), glen herrmannsfeldt
<gah@ugcs.caltech.edu> wrote:

>Eric Jacobsen <eric.jacobsen@ieee.org> wrote:
>
>(snip)
>
>> Converting from IF to baseband is, IMHO, more a tuning operation than
>> "demodulation".   De-modulating implies undoing the modulation, which
>> may not, and usually doesn't, have anything to do with frequency
>> conversion.
>
>Reminds me of the discussion about whether a device is, or is not,
>a modem based on whether it does, or does not, modulate and
>demodulate anything.
>
>To me, though IF to baseband is demodulating, where RF to IF is,
>in the systems I know, frequency conversion.

So does direct conversion do demodulation or frequency conversion?

The issue is that the terms are overloaded and used ambiguously.

>But OK, detection is the non-linear operation that demodulates
>an AM signal. So, you want to separate the conversion to baseband
>(as not demodulation) and detection.
>
>Do you agree that AF to IF is modulation? So, IF to RF is not?

What is AF?

>> Many modulations are easier to demodulate at baseband when the signal
>> is complex-valued, and often the modulation is applied using complex
>> values at baseband as well (e.g., QPSK, QAM, etc.).
>
>Leaving aside the comments by some that physical signals are
>never complex, as voltmeters never measure complex voltages.

Doesn't matter.

>> Unfortunately some do use the term "demodulation" the way you have,
>> but I think it is more confusing than helpful.
>
>Seems to me that the operation of a mixer is commonly modulation
>when going up, and it also could be going down.

I think a mixer mixes, and the resulting frequency conversion is best
referred to as "frequency conversion" or "tuning" or "mixing".
Modulation, in this context, to me,  implies that something is being
modulated to carry a recoverable information signal.   Mixing doesn't
do that.   AM, FM, PM, MSK, etc., etc., does, and "demodulating" those
signals recovers the information used in the "modulation".

The sad fact is that the terms are already ambiguous and in common use
in their overloaded cases, so it's all just opinion on both sides.

>-- glen
>

Eric Jacobsen
Anchor Hill Communications
http://www.anchorhill.com
```
```Eric Jacobsen <eric.jacobsen@ieee.org> wrote:

(snip, someone wrote)

>>> Converting from IF to baseband is, IMHO, more a tuning
>>> operation than "demodulation".   De-modulating implies
>>> undoing the modulation, which may not, and usually doesn't,
>>> have anything to do with frequency conversion.

(then I wrote)
>>Reminds me of the discussion about whether a device is, or is not,
>>a modem based on whether it does, or does not, modulate and
>>demodulate anything.

>>To me, though IF to baseband is demodulating, where RF to IF is,
>>in the systems I know, frequency conversion.

> So does direct conversion do demodulation or frequency conversion?

My old favorite reference on such is the "ARRL Handbook."

In the chapter titled "Mixers, Modulators and Demodulators"
(and given that, you might guess that they are related).

"Translating information into radio form entails a process
we call modulation, and demodulation, is its reverse.

The chapter then goes on to explain mixers and their use for
modulation and demodulation.

> The issue is that the terms are overloaded and used ambiguously.

>>But OK, detection is the non-linear operation that demodulates
>>an AM signal. So, you want to separate the conversion to baseband
>>(as not demodulation) and detection.

>>Do you agree that AF to IF is modulation? So, IF to RF is not?

> What is AF?

Must be that I read too many old radio books, when the output
was AF, or Audio Frequency. I suppose now there are enough more uses
for radios that doesn't make sense. Still, I believe it is commonly
used in describing transistors not designed for higher frequencies.

(snip on complex signals)

>>> Unfortunately some do use the term "demodulation" the way you have,
>>> but I think it is more confusing than helpful.

>>Seems to me that the operation of a mixer is commonly modulation
>>when going up, and it also could be going down.

> I think a mixer mixes, and the resulting frequency conversion is best
> referred to as "frequency conversion" or "tuning" or "mixing".
> Modulation, in this context, to me,  implies that something is being
> modulated to carry a recoverable information signal.   Mixing doesn't
> do that.   AM, FM, PM, MSK, etc., etc., does, and "demodulating" those
> signals recovers the information used in the "modulation".

But mixing does do that! You might want to separate balanced
and double balanced mixers. Conventional AM comes from a singly
balanced mixer, which allows the carrier through even with no
input on the other port. AM-SC, like the FM stereo subcarrier,
and NTSC chrominance subcarrier, from a double balanced mixer.

> The sad fact is that the terms are already ambiguous and in common use
> in their overloaded cases, so it's all just opinion on both sides.

That is true just about everywhere, and might just as well be here.

-- glen
```