I worked once again on the AM/DSB demod algorithm. The algorithm I typed out last time had one more bug in it: the y_n=0.99y_n_1 ... needed to have x * demod at the end.
In any case, I studied carefully Gerald youngblood's Flex Radio software demodulation algorithm and made it work in my own program. I typed up the essential part of the code here. Contrary to what I and somebody else thought here, the PLL didn't lock on to a packet. In the below code set alpha=0.1 and beta=0.25*alpha. I thoroughly tested it in C and it works on both AM and DSB. About 5 years ago, I developed a good atan2 function in assembly. I think that the CORDIC algorithm is more efficient than what I did.
demod= (i *cos(-pll_phase) - q*sin(-pll_phase) );
x= (i * sin(-pll_phase) + q *cos (-pll_phase)) ;
est_error=atan2(x,demod) ;
pll_freq_n = pll_freq_n + beta * est_error ;
pll_phase = pll_phase + pll_freq_n + alpha * est_error;
BTW, sqrt((i*i) + (q*q)) does give a lesser SNR.
Frank
On 7-Sep-05, at 3:29 AM, [email protected] wrote:
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/ELTolB/TM
--------------------------------------------------------------------~->
There are 2 messages in this issue.
Topics in this digest:
1. Re: AM demod from I/Q in hardware
From: "jr_dakota" <[EMAIL PROTECTED]>
2. A further step towards the real SDR...
From: "i2phd" <[EMAIL PROTECTED]>
________________________________________________________________________
________________________________________________________________________
Message: 1
Date: Tue, 06 Sep 2005 09:22:18 -0000
From: "jr_dakota" <[EMAIL PROTECTED]>
Subject: Re: AM demod from I/Q in hardware
Use a AM stereo decoder IC if you can find one, that would be the
easiest, you may even be able to adapt it to make it syncronous
detection .... AM syncronous detectors (And AM Stereo) all use the I/Q
concept ... try a google on sync detectors, there are a couple of
websites but not a lot ...
John
--- In [email protected], "Chris Hirt" <[EMAIL PROTECTED]> wrote:
Hi all
Perhaps my question is stupid, but I am momentary at the end of my
ideas. What the heck is the demodulation of AM if I have a I/Q signal ?
My homebrew HDR-2005 (= HardwareDefinedRadio 2005 ;-) is a mixture
between QRP2001, SDR-1000 and other concepts. It sounds great in SSB.
I demodulate LSB, USB or both but not AM. Yes, yes I know M = srt(I^2
+ Q^2), but how I do it in hardware ! Up to now all my trials with AM
ended in much distortion.
Does anybody knows how I produce a clear AM from I and Q with (analog)
hardware?
Best regards
Chris
