DSPRelated.com
Forums

AM digital demodulation methods

Started by gretzteam April 23, 2010
On Fri, 23 Apr 2010 16:03:32 -0500, gretzteam <gretzteam@n_o_s_p_a_m.yahoo.com> wrote:
>> >> >>How does the average value of samples of the carrier relate to the >>approximate value of the envelope? Would it help if the "carrier" were >>triangular? >> > > Yes you have a point here! All I've proven so far is that when the input > signal contains only a carrier, full scale, then the output of the lowpass > filter is pretty much exactly 0.63 (2/pi), which is the average value of a > full scale sine wave. > > I was pretty happy to see this, but that's probably not AM demodulation > just yet! But isn't this what the Analog version does when using bandpass, > full wave rectifier and capacitor?
The size of the capacitor (a.k.a. lowpass filter) matters. Put a 100pF capacitor across your signal and you filter out stuff you can't hear (and presumably, in this context, don't care about). It won't have a noticeable effect on audio frequencies. (But you should check to see what impedance 100pF represents at your carrier and modulating frequencies.) Put a 1000uF capacitor across your signal hand and you filter out everything down nearly to DC; in other words, you've reinvented the wall-wart (power supply, AC->DC converter, etc.). (Calculate the impedance of 1000uF at your carrier and modulating frequencies.) So... design your trailing LPF to eliminate signals above (say) 20kHz, feed it a carrier modulated by a 2000Hz signal, and see what you get out the far end. Hope this helps... Frank McKenney -- Liberty not only means that the individual has both the opportunity and the burden of choice; it also means that he must bear the consequences of his actions... Liberty and responsibility are inseparable. -- Friedrich von Hayek, The Constitution of Liberty 1960 -- Frank McKenney, McKenney Associates Richmond, Virginia / (804) 320-4887 Munged E-mail: frank uscore mckenney ayut mined spring dawt cahm (y'all)
Jerry Avins <jya@ieee.org> wrote:
(snip, I wrote)

>> OK, but say one wants to minimize the analog circuitry, and fast >> digital circuitry is available, including a fast ADC. That would >> seem to go against the analog bandpass filter, but a lot of digital >> filtering after the ADC could be provided.
(snip)
> With baseband sampling, we need an anti-alias lowpass filter. With > bandpass sampling, we need an anti-alias bandpass filter.
>> But 1MHz is pretty slow for an ADC by now, isn't it?
> Sure, but needing all those samples means that you need the MIPS > (and the watts) to process them. Why do that?
Microprocessors are an inefficient way to do digital logic operations, but they are convenient to program. If you do it in an FPGA, as a systolic array, it should take a fairly small amount of logic and, hopefully, not so much power.
>>> Incidentally, sampling at 1 MHz provides a little over 2 samples per >>> carrier cycle, with little chance that either of them will be near a >>> carrier peak and hence representative of the envelope. With bandpass >>> sampling at 50 KHz, there will be only one sample for every 9 or so >>> carrier cycles. There is then no hope of peak detection.
>> Even a small FPGA should allow for a lot of digital filtering >> that can run at 100MHz or so.
> I think the trade-offs between analog and digital selectivity keep > changing as technology advances. What sample rate would be needed to > digitize the whole AM band? Should we build receivers that way?
I haven't followed it so closely, but I think that they now have most of an analog AM radio on a single chip. It would seem, though, that pretty soon AM radios could easily be built mostly digital, and maybe not so much longer for FM. Well, I had the idea not so long ago in an FPGA newsgroup about an FPGA based development board for college level digital logic classes. It would have the parts for a digital clock that could be used for a freshman level class, and then in later years one could convert to a clock radio. As above, the amount of analog circuitry would be minimized, such that much of the work goes into the digital part in the FPGA. As I understand it, many college level digital design classes are taught entirely with simulations. Students never see any actual hardware! -- glen
>The size of the capacitor (a.k.a. lowpass filter) matters. > >Put a 100pF capacitor across your signal and you filter out stuff you >can't hear (and presumably, in this context, don't care about). It >won't have a noticeable effect on audio frequencies. (But you should >check to see what impedance 100pF represents at your carrier and >modulating frequencies.) > >Put a 1000uF capacitor across your signal hand and you filter out >everything down nearly to DC; in other words, you've reinvented the >wall-wart (power supply, AC->DC converter, etc.). (Calculate the >impedance of 1000uF at your carrier and modulating frequencies.) > >So... design your trailing LPF to eliminate signals above (say) >20kHz, feed it a carrier modulated by a 2000Hz signal, and see what >you get out the far end. > >Hope this helps...
Hi, Thanks, this helps! Now, I'm not building an AM radio, and I'm mostly interested in very low frequency (up to 20Hz), but I need quite good performance. My sampling rate and carrier are fixed and won't change. This is not under my control and were decided because of other stuff that this system is doing. So another way to ask the original question: When taking the absolute value of a digital signal, what really happens? I'm trying to see this from a frequency domain perspective. My original experiment - reinventing the wall-wart I guess - showed that the carrier is shifted to DC pretty well. I'm trying to get a feel for what happens to the sidebands, how much distortion is introduced when I move out of DC? I understand abs() is nonlinear, but there might be some analysis possible? Now, since multiplying by sin/cos is a perfect shift, I know the sidebands won't get affected, and my problem becomes designing a good lowpass filter. Thanks!
On Apr 25, 12:39&#4294967295;am, Jerry Avins <j...@ieee.org> wrote:
> On 4/23/2010 5:56 PM, Vladimir Vassilevsky wrote: > > > > > > > Jerry Avins wrote: > > >> On 4/23/2010 5:33 PM, HardySpicer wrote: > > >>> On Apr 24, 8:24 am, Vladimir Vassilevsky<nos...@nowhere.com> wrote: > > >>>> HardySpicer wrote: > > >>>>> Synchronous demodulation using a PLL will give you 3dB improvement > >>>>> over ordinary envelope detection. > > >>>> This is wrong. > > >>> It's in the textbooks...read it! > > >> What is ordinary envelope detection? Peak detection? > > > Doesn't matter; It is very simple. Think of |I| vs sqrt(I^2 + Q^2) > > Still, when someone claims "3dB improvement", I want to know what is > improved upon. > > Jerry > -- > "I view the progress of science as ... the slow erosion of the tendency > &#4294967295; to dichotomize." --Barbara Smuts, U. Mich. > &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
If I can remember that far back I believe it is in received SNR (baseband). Look up synchronous demodulation vs envelope detection. Of course you digital guys have I and Q and make things even more complicated. Do you remember when we just used a cats whisker! The I and Q method vs a PLL - I have no idea. How do you get I and Q - do you need a PLL to get I and Q? If so then I expect it is the same result. It was Taub and Shilling or some such that had the details but most older coms books will have the info. People are so locked into digital nowadays that they forget the basics which all comes from analogue. You cannot understand digital without understanding analogue first. I don't mean you Jerry of course but many of the new breed of engineer that gets taught exclusively digital. (does happen!!) For example, what is an exclusive OR in a PLL? To me it is a multiplier!! Hardy
On 4/24/2010 3:30 PM, gretzteam wrote:
>> The size of the capacitor (a.k.a. lowpass filter) matters. >> >> Put a 100pF capacitor across your signal and you filter out stuff you >> can't hear (and presumably, in this context, don't care about). It >> won't have a noticeable effect on audio frequencies. (But you should >> check to see what impedance 100pF represents at your carrier and >> modulating frequencies.) >> >> Put a 1000uF capacitor across your signal hand and you filter out >> everything down nearly to DC; in other words, you've reinvented the >> wall-wart (power supply, AC->DC converter, etc.). (Calculate the >> impedance of 1000uF at your carrier and modulating frequencies.) >> >> So... design your trailing LPF to eliminate signals above (say) >> 20kHz, feed it a carrier modulated by a 2000Hz signal, and see what >> you get out the far end. >> >> Hope this helps... > > Hi, > Thanks, this helps! > > Now, I'm not building an AM radio, and I'm mostly interested in very low > frequency (up to 20Hz), but I need quite good performance. My sampling rate > and carrier are fixed and won't change. This is not under my control and > were decided because of other stuff that this system is doing. > > So another way to ask the original question: > When taking the absolute value of a digital signal, what really happens? > I'm trying to see this from a frequency domain perspective.
I'd have to do the math -- a Laplace transform -- to give a definitive answer even for a continuous signal, and the discrete-time case is more involved. There seems to be a conflict among authorities. In the one hand, the waveform is what one gets from a push-push doubler, and should contain no odd harmonics, not even the fundamental. On the other hand, the ITT Reference Data for Radio Engineers (4th edition; 1949) gives a formula that I don't believe involving finite values of coefficients for all harmonics, including the fundamental.
> My original experiment - reinventing the wall-wart I guess - showed that > the carrier is shifted to DC pretty well.
I wouldn't say that. There's a strong second harmonic, so you could also say that the carrier is shifted up. What we know is that the average value is extracted and that harmonics are produced. Each of those harmonics will exhibit sidebands.
> I'm trying to get a feel for what > happens to the sidebands, how much distortion is introduced when I move out > of DC? I understand abs() is nonlinear, but there might be some analysis > possible? > > Now, since multiplying by sin/cos is a perfect shift, I know the sidebands > won't get affected, and my problem becomes designing a good lowpass filter.
What do you mean by "not affected"? they get shifted along with the carrier. Jerry -- "I view the progress of science as ... the slow erosion of the tendency to dichotomize." --Barbara Smuts, U. Mich. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On 4/24/2010 8:04 PM, HardySpicer wrote:
> On Apr 25, 12:39 am, Jerry Avins<j...@ieee.org> wrote: >> On 4/23/2010 5:56 PM, Vladimir Vassilevsky wrote: >> >> >> >> >> >>> Jerry Avins wrote: >> >>>> On 4/23/2010 5:33 PM, HardySpicer wrote: >> >>>>> On Apr 24, 8:24 am, Vladimir Vassilevsky<nos...@nowhere.com> wrote: >> >>>>>> HardySpicer wrote: >> >>>>>>> Synchronous demodulation using a PLL will give you 3dB improvement >>>>>>> over ordinary envelope detection. >> >>>>>> This is wrong. >> >>>>> It's in the textbooks...read it! >> >>>> What is ordinary envelope detection? Peak detection? >> >>> Doesn't matter; It is very simple. Think of |I| vs sqrt(I^2 + Q^2) >> >> Still, when someone claims "3dB improvement", I want to know what is >> improved upon. >> >> Jerry >> -- >> "I view the progress of science as ... the slow erosion of the tendency >> to dichotomize." --Barbara Smuts, U. Mich. >> &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295; > > If I can remember that far back I believe it is in received SNR > (baseband). Look up synchronous demodulation vs > envelope detection. Of course you digital guys have I and Q and make > things even more complicated. Do you remember when we just used a cats > whisker! > The I and Q method vs a PLL - I have no idea. How do you get I and Q - > do you need a PLL to get I and Q? If so then I expect it is the same > result. > > It was Taub and Shilling or some such that had the details but most > older coms books will have the info. People are so locked into digital > nowadays that they forget the basics > which all comes from analogue. You cannot understand digital without > understanding analogue first. I don't mean you Jerry of course but > many of the new breed of engineer that gets taught exclusively > digital. > (does happen!!) For example, what is an exclusive OR in a PLL? To me > it is a multiplier!!
I/Q demodulation is pure envelope detection, even for carriers not much higher than the highest modulating frequency. What you seem to refer to as envelope detection is peak detection, which is merely a damn good approximation under typical conditions of operation. There are a number of ways to make an analytic (I-Q) signal. A Hilbert transformer is one, Clay Turner's Tips & Tricks article is better. Often the best produces both I and Q in the sampling process. Synchronous demodulation does improve on peak detection, but not on sqrt(I^2+Q^2). So does exalted carrier, for the same fundamental reason. Jerry -- "I view the progress of science as ... the slow erosion of the tendency to dichotomize." --Barbara Smuts, U. Mich. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On 4/24/2010 1:25 PM, glen herrmannsfeldt wrote:

   ...

> As I understand it, many college level digital design classes > are taught entirely with simulations. Students never see any > actual hardware!
The nature of many of the questions we see here bear that out. Jerry -- "I view the progress of science as ... the slow erosion of the tendency to dichotomize." --Barbara Smuts, U. Mich. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
>As I understand it, many college level digital design classes >are taught entirely with simulations. Students never see any >actual hardware!
I am told that it is becoming quite normal for entire electronics degree courses to be free of any lab work. Therefore, analogue, power and other topics are in the same position as digital. Cost, health and safety issues, and the narrow inclinations of lecturers were cited to me recently by a lecturer. One still runs his power electronics courses to include things that can actually go bang. Regards, Steve
On Apr 25, 1:03&#4294967295;am, Jerry Avins <j...@ieee.org> wrote:

>Synchronous demodulation does improve on peak detection, but not on sqrt(I^2+Q^2).
I think you are wrong on this point. I am in this group primarily because I have responsibility to "maintain " a software radio product that we bought from another company. So I have had to try to learn DSP to maintain understand and maintain this radio. I am not yet capable of designing a radio like this, but I am getting closer as time goes by. Anyhow, In their design they use a digital PLL. They run a FFT to analyze the carrier and then build an PLL around the signal to get synchronous detection. If the carrier gets squirrely, the PLL will break lock, and if it does they revert to I/Q detection so as to not lose the signal. My point is, I know they did not go to great lengths to build thisFFT/ PLL detection scheme if I/Q demodulation would give the same result. I cannot tell you right now what the math is, but I know synchronous detection is better in some respects.
On 4/25/2010 7:07 AM, brent wrote:
> On Apr 25, 1:03 am, Jerry Avins<j...@ieee.org> wrote: > >> Synchronous demodulation does improve on peak detection, but not on sqrt(I^2+Q^2). > > I think you are wrong on this point.
That would hardly be novel!
> I am in this group primarily because I have responsibility to > "maintain " a software radio product that we bought from another > company. So I have had to try to learn DSP to maintain understand and > maintain this radio. I am not yet capable of designing a radio like > this, but I am getting closer as time goes by. > > Anyhow, In their design they use a digital PLL. They run a FFT to > analyze the carrier and then build an PLL around the signal to get > synchronous detection. If the carrier gets squirrely, the PLL will > break lock, and if it does they revert to I/Q detection so as to not > lose the signal. > My point is, I know they did not go to great lengths to build thisFFT/ > PLL detection scheme if I/Q demodulation would give the same result. > I cannot tell you right now what the math is, but I know synchronous > detection is better in some respects.
Without judging the merits of this particular scheme, I have to keep in mind other instances where designers -- Even Edwin Armstrong, the father of FM -- acted on superstition rather than fact. The scheme you describe leaves me with a question: If synchronous demodulation loses the signal even when I/Q demodulation tracks it, in what way is synchronous demodulation superior? Have you had a chance to compare the outputs of the two detectors when both are working? Jerry -- "I view the progress of science as ... the slow erosion of the tendency to dichotomize." --Barbara Smuts, U. Mich. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;