Return-Path: Received: from rly-me09.mx.aol.com (rly-me09.mail.aol.com [172.20.83.43]) by air-me03.mail.aol.com (v121_r4.4) with ESMTP id MAILINME033-9d949a05de09f; Sat, 21 Feb 2009 15:02:55 -0500 Received: from post.thorcom.com (post.thorcom.com [193.82.116.20]) by rly-me09.mx.aol.com (v121_r4.4) with ESMTP id MAILRELAYINME095-9d949a05de09f; Sat, 21 Feb 2009 15:02:42 -0500 Received: from majordom by post.thorcom.com with local (Exim 4.14) id 1Lay34-0001a5-S4 for rs_out_1@blacksheep.org; Sat, 21 Feb 2009 20:02:06 +0000 Received: from [193.82.116.32] (helo=relay1.thorcom.net) by post.thorcom.com with esmtp (Exim 4.14) id 1Lay34-0001Zw-77 for rsgb_lf_group@blacksheep.org; Sat, 21 Feb 2009 20:02:06 +0000 Received: from defout.telus.net ([204.209.205.13]) by relay1.thorcom.net with esmtp (Exim 4.63) (envelope-from ) id 1Lay32-0001Qv-86 for rsgb_lf_group@blacksheep.org; Sat, 21 Feb 2009 20:02:06 +0000 Received: from priv-edmwaa06.telusplanet.net ([204.209.205.55]) by priv-edmwes23.telusplanet.net (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20090221200201.TLJR19903.priv-edmwes23.telusplanet.net@priv-edmwaa06.telusplanet.net> for ; Sat, 21 Feb 2009 13:02:01 -0700 Received: from [192.168.1.66] (d75-157-158-66.bchsia.telus.net [75.157.158.66]) by priv-edmwaa06.telusplanet.net (BorderWare Security Platform) with ESMTP id 5ADB1405342AC9E8 for ; Sat, 21 Feb 2009 13:02:00 -0700 (MST) Message-ID: <49A05DB8.3090509@telus.net> Date: Sat, 21 Feb 2009 12:02:00 -0800 From: Scott Tilley User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: rsgb_lf_group@blacksheep.org References: <49A03A7C.2050703@telus.net> In-Reply-To: X-Karma: unknown: X-Spam-Score: 0.9 (/) X-Spam-Report: autolearn=disabled,MAILTO_TO_SPAM_ADDR=0.276,SUBJ_HAS_SPACES=0.651 Subject: Re: LF: Wanted - non-random PN sequence generator - so Off Topic it shouldn't be allowed here! Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on post.thorcom.com X-Spam-Level: ** X-Spam-Status: No, hits=2.9 required=5.0 tests=FROM_ENDS_IN_NUMS, MAILTO_TO_SPAM_ADDR,SUBJ_HAS_SPACES autolearn=no version=2.63 X-SA-Exim-Scanned: Yes Sender: owner-rsgb_lf_group@blacksheep.org Precedence: bulk Reply-To: rsgb_lf_group@blacksheep.org X-Listname: rsgb_lf_group X-SA-Exim-Rcpt-To: rs_out_1@blacksheep.org X-SA-Exim-Scanned: No; SAEximRunCond expanded to false X-AOL-IP: 193.82.116.20 X-Mailer: Unknown (No Version) Hi Andy Why not simply OR the xx% duty cycle with the PN sequence and suppress repeated TX sequences in a row? This should create something code compact and simple that lets you sleep at night that can be pretty easy to make appear 'random.' Also add the ability to your code to allow the user to select their own seed word. A 256bit LFSR sequence run over a WSPR period would take along time for someone to figure out a pattern. Larger sequences would only take abit more effort to code and if your writing in C no real effort at all. I think Joe K1JT lost some sleep over this as well. You should drop him a line as he is most helpful about such dialog. I ran into similar aesthetic issues simulating fire light with LFSRs years ago and found that many of them operating in tangent with each other produced very layered and real appearing effects. Another solution I have tried is an ADC or clipper/clamp circuit on an input of the MCU and an inductorless Chua's circuit driving it... Period three implies Chaos. http://www.cpdee.ufmg.br/~MACSIN/services/papers/toraguel.pdf gl es 73 Scott VE7TIL Andy Talbot wrote: > Scott: > Its precisely that an LFSR does not give what is needed that made me > start thinking along these lines. For one thing, LFSRs are only > random if considered over the whole repeat length, viz 2 ^ N - 1 bit > for a maximal length sequence. They will have one single run of > exactly N ones, and N-1 zeroes, and a predicatable numbers of runs of > fewer successive equal bits. It is a well established annoyance with > these that short register lengths cannot be used to generate > half-decent pseudo randomness > > What I was idly speculating on was a straightforward way of generating > a semi-random sequence with deliberately limited continuous runs of > ones or zeroes. By forcing this aspect, the sequence cannot possibly > be random. A ideal sequence would probably have very little > statistical randomness at all. But it sems to have turned out to be > not at all straightforward. > > Eg 33% duty cycle with no randomisation > 001001001001001001001001001001 > A true PN sequence at 33% could be like > 010000111100100000001100101000 > which has an excessively long sequence of ones for WSPR Tx purposes > A more optimised pattern might be > 001010100001010100100010001010 > Apart from one bit, this one is actually a smaller pattern repeated. > > Which all comes down to the idea that its easiest to just generate (by > inspection !) a set of precomputed tables - but that just feels like > cheating and I feel dissatisfied with it :-) > > Andy > www.g4jnt.com > > > > 2009/2/21 Scott Tilley : > >> Hi Andy >> >> Try a 'Linear Feedback Shift Register', Google it... >> >> Very simple to implement in a MCU and can be scaled to any size you like. I >> wrote some code to do this in PIC assembly years ago that was only a few >> lines long for a 256bit sequence... >> >> Best of all you can predict the outcome and choose a sequence that meets >> your needs given a unique seed word.... >> >> Better yet it offers a means of identification over a long term integration >> :-) >> >> 73 Scott >> VE7TIL >> >> >> Andy Talbot wrote: >> >>> ...but if any mathematicians, number theorists or cryptographers >>> should be reading this... >>> >>> I've just got a WSPR generating routine running on a PIC / AD9852 / >>> GPS combination, but I'm looking for a half-decent way of generating a >>> pseudo random Tx/Rx sequence with defined duty cycle that does not >>> give the long(ish) consecutive runs of 0's or 1's that MUST ALWAYS >>> occasionally be seen in a truly random sequence. >>> >>> In other words, the sequence needs to be bandpass filtered. >>> >>> Before I cop-out and just use a pre-generated set of lookup tables, >>> take a look at http://www.g4jnt.com/WSPR_PN_Sequence.pdf >>> for a fuller description of the mind-bender >>> >>> >>> Andy G4JNT >>> www.g4jnt.com >>> >>> >>> >>> >> > > >