Design Article

Comment


kendallcp

12/8/2010 4:31 AM EST

Good questions and they raise an important point: if I have a real signal, when ...

More...



sharps_eng

11/27/2010 2:18 AM EST

Hilbert help is at hand!
W236: THE DISCRETE HILBERT TRANSFORM: A BRIEF ...

More...

DSP Tricks: Approximate envelope detection

Richard Lyons

11/16/2010 3:20 PM EST

Here’s a crude (but simple to implement) complex signal envelope detection scheme. By envelope detection, we mean estimating the instantaneous magnitude of a complex signal xc(n).

Whether this envelope approximation technique yields sufficiently accurate results is for the user to decide. Its accuracy may be below the requirements of most AM (amplitude modulation) detection requirements, but the process may well be useful for estimating signal magnitude in automatic gain control (AGC) or energy detection applications.

The process is straightforward: we sum the absolute values of a complex signal’s real and imaginary parts, and apply that sum to a simple first-order lowpass IIR filter to obtain an envelope signal E(n) as shown in Figure 13–77, below.

 

Figure 13–77. AGC process: (α) logorithmic AGC  circuit; (c) y(n) output for α = 1 and R = 1.

The filter’s feedback coefficient α is in the range of 0 to 1. (That lowpass filter is an our exponential averager, which some DSP folks call a leaky integrator). The E(n) sequence is proportional to the desired instantaneous magnitude of xc(n), or

To gauge the envelope detector’s performance, consider a sampled version of an amplitude modulated sinusoid such as the xr(n) from which a sampled analytic (complex) xc(n) can been generated.

If xc(n) is applied to our envelope detection process, the processing results are shown in Figure 13–78(b) and 13–78(c) below, where the solid curves represent E(n) and the dashed curves are the true magnitude of xc(n). 


Figure 13–78 Envelope detection: (a) block diagram; (b) |xr(n)|+|x(n)| adder output, and E(n) for α = 0.4; (c) E(n) for α = 0.7 and α = 0.9.

Notice how the amount of smoothing of the E(n) fluctuations depends on the value of α. Sequence xr(n) must be used to generate a complex analytic xc(n) sequence upon which this envelope detector scheme can be applied.

The advantage of this envelope detection process is that, of course, no squaring or square root computations in the |xr(n)| and |xi(n)| comparisons in the vector magnitude approximations need be performed.

Used with the permission of the publisher, Prentice Hall, this on-going series of articles on Embedded.com is based on copyrighted material from "Understanding Digital Signal Processing, Second Edition" by Richard G. Lyons. The book can be purchased on line.

Richard Lyons is a consulting systems engineer and lecturer with Besser Associates. As a lecturer with Besser and an instructor for the University of California Santa Cruz Extension, Lyons has delivered digitasl signal processing seminars and training course at technical conferences as well at companies such as Motorola, Freescale, Lockheed Martin, Texas Instruments, Conexant, Northrop Grumman, Lucent, Nokia, Qualcomm, Honeywell, National Semiconductor, General Dynamics and Infinion.





GubnaGG

11/17/2010 1:09 AM EST

My apologies if this is an obvious question - If I'm using a A/D (analog to digital converter) to sample a signal how do I extract its imaginary component? It seems necessary to obtain xi(n) in this example.

Sign in to Reply



kinnar

11/22/2010 9:51 AM EST

The imaginary and real part show the phase of the information signal instantaneously.

Sign in to Reply



vampailleur

11/26/2010 3:59 PM EST

You can take the Hilbert transform of the original x[n] to obtain the imaginary part.

To implement the Hilbert transform in "real-time", we usually use a Hilbert filter.

The Hilbert filter can be either an IIR or a FIR, and it is made up of 2 filters.

For example, in the FIR implementation, we have one filter that adds a phase of 90o to the signal and since it is a causal filter it also adds a linear phase delay.

The second filter is simply a linear phase delay equal to the linear phase delay of the first filter.

Once the signal x has passed through those 2 filters, we get a signal x_re and a signal x_im.

If you are interested in that subject Gubna, I would suggest buying Richard Lyons's book. It is a really great book and the explanation about the Hilbert transform and Hilbert filters will be much clearer and accurate than the one I gave you.

Sign in to Reply



Atomic9

11/19/2010 10:57 PM EST

( GubnaGG - In the example above, I think you've already GOT both the re and im parts together - its only in a signal in 2-part i q form that you have to sum the two, er, right ? )

One thing I'd like to see, is some easy 'Hilbertiser' DSP code that DOES turn a single signal into real and imaginary - maybe over a defined bandwidth, if down to zero is impossible

Is there anything like this in the book ? (I still think VERY analog domain, so apologies if I'm using the wrong term)

Sign in to Reply



sharps_eng

11/27/2010 2:18 AM EST

Hilbert help is at hand!
W236: THE DISCRETE HILBERT TRANSFORM: A BRIEF TUTORIAL
This is pitched at exactly the right level; the hidden meaning in the math is brought to the surface so we engineers can see how it fits together. It worked for me!
It is a little known fact that EE Times has a store of tech articles, so use the EE Times search box the next time you have a question. Actually I think the trend is for older articles to have more content so we should treasure this stuff.

Sign in to Reply



kendallcp

12/8/2010 4:31 AM EST

Good questions and they raise an important point: if I have a real signal, when is it worth consuming processing power in creating (an approximation to) the analytic signal, in order to use algorithms that work on a complex signal. The alternative is to use that processing power in a different algorithm that delivers the desired result directly from the real signal.

For instance, another way of extracting the envelope of your signal is just to take its absolute value and filter it - the simplest AM detector. More filter rejection is needed in this case to remove the carrier harmonics - but the processing power needed to create this filtering can be less than needed for a Hilbert filter or Hilbert transformer (they are different things) to do it the complex way.

Sign in to Reply



Please sign in to post comment

Navigate to related information

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)