Electronic Schematics (alt.binaries.schematics.electronic) A place to show and share your electronics schematic drawings.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #131   Report Post  
Old April 29th 15, 01:55 PM posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.basics
external usenet poster
 
First recorded activity by DIYBanter: Nov 2010
Posts: 20
Default "Random" Circuit Needed.

On Tue, 28 Apr 2015 21:38:58 -0700, John Larkin
wrote:

On Wed, 01 Apr 2015 11:00:25 -0700, Jim Thompson
wrote:

For a simulation situation I need a random number generator with a
twist...

What I need to simulate is a "random" selection of one-of-16 outputs.

Clock "speed" is 12.5kHz ;-)

Built of 74HCxx parts is preferred... I have a full ensemble of those
device in my PSpice library.

Thanks in advance.

...Jim Thompson


Only vaguely on-topic, here is a noise generator experiment. The mess
on the left makes 1-bit digital noise clocked at 1 MHz, like a linear
shift register, just easier to draw. The issue at hand is what kind of
lowpass filter to use to get approximately Gaussian noise.

The 200 KHz filter is right out of AoE3 p 559. It looks fine in the
audio frequency domain, but it's nothing like Gaussian.

The 3-pole filter is a lot nicer.

We're actually going to use a LFSR in an FPGA and do the serious
filtering digitally, and drive a DAC with a little analog filtering
afterwards.


I have a Daqarta "mini-app" for converting a uniform to an
arbitrary distribution. I use Gaussian as the example. The
Help page is at
http://www.daqarta.com/dw_0oaa.htm. It includes a
"Theory" section, plus the complete macro script (it's in
Daqarta's own macro language, but I've added lots of
comments).

The basic method uses the inverse Cumulative Distribution
Function (iCDF) with a lookup table. The trick is to create
the proper table.

Best regards,


Bob Masta

DAQARTA v7.60
Data AcQuisition And Real-Time Analysis
www.daqarta.com
Scope, Spectrum, Spectrogram, Sound Level Meter
Frequency Counter, Pitch Track, Pitch-to-MIDI
FREE Signal Generator, DaqMusiq generator
Science with your sound card!

  #132   Report Post  
Old April 29th 15, 04:26 PM posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.basics
external usenet poster
 
First recorded activity by DIYBanter: Feb 2012
Posts: 231
Default "Random" Circuit Needed.

On Wed, 29 Apr 2015 02:16:52 -0500, "Tim Williams"
wrote:

Er, well.. surely an LFSR will be flat, not Gaussian, no?


Single bit digital noise has a PDF with two big impulses, about the
worst approximation to Gaussian (or flat) imaginable. So you need to
sum a LOT of them to get something sort of Gaussian... the Central
Limit Theorem thing. Hence the 20 KHz filter. Higher-order filters
work way better than single-pole ones.

If you nab 16-bit words from the shift register, and not the single
bit, you start with a basically flat histogram. Summing a modest
number of them gets Gaussian pretty fast. That's harder to Spice.


Fortunately, there is an app\\\ transform for that:
http://www.design.caltech.edu/erik/Misc/Gaussian.html
shouldn't be too bad to implement on FPGA. Log can be very crudely
obtained as the highest active ('1') bit position, and can be improved
iteratively (by repeated squarings and bit-shifts, or Taylor series
polynomial approximation methods).

Obviously, to shoot it out of a DAC, the bounds must be strictly limited,
so part of your spec will be how many sigma of Gaussian it's good for
(usually 3 or so?).


We have a +-10 volt DAC range, and we figure that 1 volt RMS is a good
number, and our 15-tap FIR filter will give us a crest factor of about
5.5. That sounds OK; I don't think our customers would want truly
Gaussian noise with infinite voltage spikes.


Which, in turn, implies that the argument of the log can't be near zero
(which is what produces the peaky outliers), and certainly can't be zero
exactly (which would be undefined), so perhaps the LFSR's inherent bias
could be tuned to match the dynamic range of the desired output? Nah,
probably not, not for any reasonable sequence length. So you'll have to
do something ugly (and hopefully not badly behaved), like RND * scale +
offset.

There are also methods for that -- ensuring that an output of truncated,
arbitrary range is calculated correctly from an even distribution in some
other range.

The geometric form is interesting, too; a random time delay could trigger
a S&H of complementary (90 degree phase shifted) sine waves, and the other
random number could feed a suitable arrangement of matched diode junctions
or OTAs which computes the sqrt(ln(x)) function, and simultaneously
controls the gain on the S&H buffers.

The "random" time delay has a strictly bounded range, so it could be
triggered on a fixed clock, 'computed', then 'registered' with a second
S&H on the following clock pulse, to give regularly sampled outputs (same
as you'd use extra D-flops to neaten up the transitions in a digital logic
circuit). Who even needs a DAC?

Or you could randomly sample a sin/cos table and vary the VREF into an
MDAC, or...


A tapped analog delay line is easy to Spice. If you poke in random
values and evenly sum the taps, that amounts to summing a sucession of
samples, so it does the Central Limit thing for you. And it's also a
finite-impulse-response filter. Everything turns out the be the same
thing, just looked at from different angles.

I really need a histogram back end for LT Spice. Snarl, snap, I guess
I'll have to make one.


--

John Larkin Highland Technology, Inc
picosecond timing laser drivers and controllers

jlarkin att highlandtechnology dott com
http://www.highlandtechnology.com

  #133   Report Post  
Old May 1st 15, 12:57 AM posted to alt.binaries.schematics.electronic
external usenet poster
 
First recorded activity by DIYBanter: Nov 2007
Posts: 149
Default "Random" Circuit Needed.

On Wed, 01 Apr 2015 12:06:00 -0700, John Larkin
wrote:

On Wed, 01 Apr 2015 11:00:25 -0700, Jim Thompson
wrote:

For a simulation situation I need a random number generator with a
twist...


http://www.theregister.co.uk/2015/04...andom_numbers/

--
Boris

---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com

  #134   Report Post  
Old May 7th 15, 09:56 PM posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.basics
external usenet poster
 
First recorded activity by DIYBanter: Jul 2006
Posts: 2,022
Default "Random" Circuit Needed.

On Sat, 25 Apr 2015 11:17:52 +1000, "David Eather"
wrote:


A paraphrase:
"anyone who believes a deterministic circuit can produce true randomness
is in a state of sin"


---
Beautiful.

John Fields
  #135   Report Post  
Old April 27th 16, 08:19 PM posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.basics
external usenet poster
 
First recorded activity by DIYBanter: May 2015
Posts: 8
Default "Random" Circuit Needed.

Jim Thompson
Wrote in message:
On Wed, 01 Apr 2015 11:53:10 -0700, Jim Thompson
wrote:

On Wed, 01 Apr 2015 13:27:06 -0500, John Fields
wrote:

On Wed, 01 Apr 2015 11:00:25 -0700, Jim Thompson
wrote:

For a simulation situation I need a random number generator with a
twist...

What I need to simulate is a "random" selection of one-of-16 outputs.

Clock "speed" is 12.5kHz ;-)

Built of 74HCxx parts is preferred... I have a full ensemble of those
device in my PSpice library.

Thanks in advance.

...Jim Thompson

---
If you use something like an HC154 with an LFSR driving its address
inputs to generate random one-hots on its outputs, will that work
for you?


John,

What are you saying... take the outputs of the LFSR broadside to drive
the address lines of the 'HC154?

I think that would do it.

Thanks also to Lasse for the same suggestion.

...Jim Thompson


I was puzzling over how to get 0000, but then it dawned... just use an
8-bit LFSR and use the last 4-bits.


It would be less than random because 0000 is still less likely.
Better to use a fast counter and latch it before the
154.

Because it's not physical maybe you'd have to jiggle the fast
clock with a large resistor to one of the bits, if Spice would
have a tendency to make one clock an exact multiple of the other.


--


  #136   Report Post  
Old April 27th 16, 08:38 PM posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.basics
external usenet poster
 
First recorded activity by DIYBanter: Mar 2010
Posts: 2,181
Default "Random" Circuit Needed.

On Wed, 27 Apr 2016 15:19:18 -0400 (EDT), Tom Del Rosso
wrote:

Jim Thompson
Wrote in message:
On Wed, 01 Apr 2015 11:53:10 -0700, Jim Thompson
wrote:

On Wed, 01 Apr 2015 13:27:06 -0500, John Fields
wrote:

On Wed, 01 Apr 2015 11:00:25 -0700, Jim Thompson
wrote:

For a simulation situation I need a random number generator with a
twist...

What I need to simulate is a "random" selection of one-of-16 outputs.

Clock "speed" is 12.5kHz ;-)

Built of 74HCxx parts is preferred... I have a full ensemble of those
device in my PSpice library.

Thanks in advance.

...Jim Thompson

---
If you use something like an HC154 with an LFSR driving its address
inputs to generate random one-hots on its outputs, will that work
for you?

John,

What are you saying... take the outputs of the LFSR broadside to drive
the address lines of the 'HC154?

I think that would do it.

Thanks also to Lasse for the same suggestion.

...Jim Thompson


I was puzzling over how to get 0000, but then it dawned... just use an
8-bit LFSR and use the last 4-bits.


It would be less than random because 0000 is still less likely.
Better to use a fast counter and latch it before the
154.

Because it's not physical maybe you'd have to jiggle the fast
clock with a large resistor to one of the bits, if Spice would
have a tendency to make one clock an exact multiple of the other.


Did you notice you're replying to a YEAR OLD post ?:-)

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

The touchstone of liberalism is intolerance
  #137   Report Post  
Old April 27th 16, 09:35 PM posted to sci.electronics.design,alt.binaries.schematics.electronic
external usenet poster
 
First recorded activity by DIYBanter: Sep 2008
Posts: 1,149
Default "Random" Circuit Needed.

Tom Del Rosso wrote:



I was puzzling over how to get 0000, but then it dawned... just use an
8-bit LFSR and use the last 4-bits.

OK, you don't want to just use the last N bits of the LFSR, as they will
shift over VERY predictably. So, if you want to use N bits, you need to
allow the LFSR to advance N clocks and then latch the N parallel bits for
use.

Jon
  #138   Report Post  
Old April 28th 16, 09:03 PM posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.basics
external usenet poster
 
First recorded activity by DIYBanter: Dec 2014
Posts: 46
Default "Random" Circuit Needed.

Jim Thompson wrote:

Did you notice you're replying to a YEAR OLD post ?:-)


On the phone app it wasn't so obvious. I don't use it much but it was
updated a month ago so I don't know why this thread was near the top.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Under the banner of "Si, Se Puede" "Moving America Forward""Latino Voter Registration Drives"... Warren Penn Home Repair 0 April 18th 12 10:38 PM
I am looking for a local source for "Rockwool" / "Mineral Wool" /"Safe & Sound" / "AFB" jtpr Home Repair 3 June 10th 10 06:27 AM
For women who desire the traditional 12-marker dials, the "Faceto,""Juro" and "Rilati" all add a little more functionality, without sacrificingthe diamonds. [email protected] Woodworking 0 April 19th 08 11:12 AM
Circuit to connect "Soundblaster" electret microphone to line-input Robert Ham Electronics 0 October 2nd 07 03:28 PM
Orange Peel Texture? "Knockdown" or "Skip Trowel" also "California Knock-down" HotRod Home Repair 6 September 28th 06 01:48 PM


All times are GMT +1. The time now is 08:54 AM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 DIYbanter.
The comments are property of their posters.
 

About Us

"It's about DIY & home improvement"

 

Copyright © 2017