From: Vladimir Vassilevsky on


Jerry Avins wrote:

> On 4/23/2010 5:33 PM, HardySpicer wrote:
>
>> On Apr 24, 8:24 am, Vladimir Vassilevsky<nos...(a)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)

VLV


From: glen herrmannsfeldt on
HardySpicer <gyansorova(a)gmail.com> wrote:
(snip)

> The problem arrises when you want to do synchronous demod and the
> carrier isn't there! What I mean by that is that when you have
> double sideband supressed carrier. There is no power at the carrier
> freq then and nothing to lock onto.

> Solution...among otehr things you need to square the received waveform
> and lock into twice the carrier then divide down (missing some other
> crucial steps).

As I understand it, commonly used by many modems doing anything
except FSK. To make sure that there are enough transitions for
carrier recovery, scramblers are commonly used on the bit stream.

-- glen
From: gretzteam on
>On 4/23/2010 5:03 PM, gretzteam 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.
>
>How many samples per carrier cycle do you have? How many carrier cycles
>do you average over? How long does that take, and what does that imply
>about the highest envelope frequency you can demodulate without
attenuation?

Ok I'm way oversampled. I'm doing this to learn about it so I don't want to
have the added difficulty of sample rate (just yet). Here is the current
system - I should have posted this FIRST!

parameters:
fs = 4MHz
carrier: 99kHz

Currently, there is no noise, and no 'information' being modulated. Just a
carrier sine wave:) One gotta start somewhere!

I then bandpass using a 2nd order bandpass filter centered at the carrier.

Then take the absolute value.
Then lowpass filter using a 2nd order CIC filter all the way down to
something ridiculous like 10-50Hz.

The output matches surprisingly well the 2*A/pi formula depending on the A
of the carrier.

Now if I do a frequency sweep, using a full scale sine wave from 0 to 2MHz
(fs/2), and plot the obtained average value after it settled, I get the
shape of the bandpass filter! I guess this was to be expected, which is why
I asked if 'method-1' was only dependent on the performance of the bandpass
filter.

I guess so far my 'information' is only at DC, but it works well.

Now, ff I modulate a 2Hz signal, I also see it at the output, with a DC
offset.

And this is where I decided to post, since I didn't know how to measure
performance of the system when there IS information.

Does this make sense?

Thanks!




From: Tim Wescott on
gretzteam 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?

Some analog implementations rectify and average, which is what you're doing.

Some (the ones that have a series diode to a shunt cap) detect the peak
of the waveform, then have the charge drained out of the cap by other
circuit elements. I.e. a peak detector.

Different things, but close enough when the carrier frequency is way
higher than the audio.

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
From: Tim Wescott on
Jerry Avins wrote:
> On 4/23/2010 4:24 PM, Tim Wescott wrote:
>> Jerry Avins wrote:
>>> On 4/23/2010 1:52 PM, gretzteam wrote:
>>>>>> Use it, but understand it. Understand the implication of in-band
>>>>>> interference. Understand the need to exclude out-of-band signals from
>>>>>> the demodulation process. (The baseband low-pass filter can't remove
>>>>>> aliases.)
>>>>>
>>>>> I am assuming that he is properly prepping the signal prior to the
>>>>> multiplication by sin/cos and will pick appropriate filters at
>>>>> baseband.
>>>>
>>>>
>>>> Ok I must admit that I'm more confused than before! Why do you still
>>>> need a
>>>> bandpass filter for method 2? Isn't multiplying by sin/cos shifting the
>>>> carrier frequency to DC?
>>>
>>> What Brent said. Keep in mind that you not only shift the carrier to
>>> baseband, you also shift everything else down by a similar amount.
>>> Where do the aliases of the out-of-band signals go?
>>>
>>>> About method 1 having the problem of peak values not being close to
>>>> full
>>>> scale, can we say that this is not a problem when fs>> carrier?
>>>
>>> When the carrier is adequately oversampled, method 1 works. I leave it
>>> to you to determine what "adequate" means. How many samples per
>>> carrier cycle are needed to ensure that one is at least 95% of either
>>> peak? Is that a reasonable expenditure of resources?
>>
>> Except that by his original description he's not peak-seeking -- he's
>> averaging the absolute value. That _ought_ to work better, but I don't
>> know by how much.
>
> 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?

Well, the RF signal (not the carrier) is carrier * (audio signal +
offset) -- so you can find a scaled value of the audio signal either by
finding the peaks (as in traditional AM receivers) or by rectifying and
averaging.

I suspect (but would have to play with it to find out) that the rectify
and average is not as harshly nonlinear, and therefore would stand a
lower sampling (or carrier) rate.

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com