dac dithering

It's pretty simple--the probability density of the sum of two uncorrelated variables (e.g. sines of incommensurate frequency) is the convolution of the two individual densities. So the nasty peaks at the ends get smoothed off.

He's just grouchy because he doesn't get any meat in his soup. ;)

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC 
Optics, Electro-optics, Photonics, Analog Electronics 

160 North State Road #203 
Briarcliff Manor NY 10510 

hobbs at electrooptical dot net 
http://electrooptical.net
Reply to
Phil Hobbs
Loading thread data ...

I added the s/h to fake the DAC clock and tried a triangle, under the assumption that my FPGA guy could make a triangle more easily than a pair of sines (which would probably just be a huge lookup table.) It was awful.

Two sines with the s/h aren't bad.

How do you get LT Spice to make bandlimited Gaussian noise? I could try that, too.

Reply to
John Larkin

A resistor, a BPF, and an ideal amplifier.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC 
Optics, Electro-optics, Photonics, Analog Electronics 

160 North State Road #203 
Briarcliff Manor NY 10510 

hobbs at electrooptical dot net 
http://electrooptical.net
Reply to
Phil Hobbs

Of course that doesn't work in transient simulations. I'd probably do a Box-Mueller noise generator followed by a BPF, but that would take some figuring out.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC 
Optics, Electro-optics, Photonics, Analog Electronics 

160 North State Road #203 
Briarcliff Manor NY 10510 

hobbs at electrooptical dot net 
http://electrooptical.net
Reply to
Phil Hobbs

This is why the sigma-delta approach works well: you put the quantization inside the loop, and you use feedback to make the whole thing high-pass.

Of course, your quantization model has to be a pretty good match for the actual DAC nonlinearity, which makes things challenging.

--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com
Reply to
Tim Wescott

Yeah, I'd have to trust that the DAC lsb step I happen to be using is

1/65536 of full scale. Not 4x as much, not negative! The forced noise thing can span a lot of bits, so gain will be more predictable.

This is a bear to model! I have some number of fairly-good solutions, so one of them will have to do.

Reply to
John Larkin

OK, that makes sense. Central Limit Theorem says the signal is becoming Gaussian, so the spikies must get scruffed down.

Reply to
John Larkin

Isn't the distribution sometype of hyperbolic function? Looks like spires on a suspension bridge.

HP used to make a histogram instrument, replicated the probably function of a sine wave pretty well.

Once I can get the function, I'll pop it through octave and see just how 'flat' the probability distribution goes.

Reply to
RobertMacy

I'd love to see that. I haven't got around to learning how to drive Matlab or its clones. Maybe try more than two uncorrelated sines?

I tried adding a histogram block (swept window comparator and lowpass filter) but it ran really slow, and I put that aside for now. That would be a cool intrinsic for LT Spice. Or I guess I could export a waveform and sic a PowerBasic program on it. The other thing I'd like to have is a time-domain Gaussian noise generator. Anybody want to write one? $100? Lunch at Zuni?

Reply to
John Larkin

Den mandag den 2. december 2013 18.46.01 UTC+1 skrev John Larkin:

in ltspice export the waveform, run something like this in scilab:

signal = csvRead('filename.txt',ascii(9), '.', 'double'); histplot(100,signal(:,2))

no guarantees but will this work?

Version 4 SHEET 1 3688 680 WIRE 224 96 80 96 WIRE 224 112 224 96 WIRE 80 128 80 96 WIRE 224 208 224 192 FLAG 80 208 0 FLAG 224 208 0 SYMBOL res 208 96 R0 SYMATTR InstName R1 SYMATTR Value 1 SYMBOL bv 80 112 R0 WINDOW 3 -33 155 Left 2 SYMATTR InstName B1 SYMATTR Value V=sqrt(-2 * log10(random(time*100e6)+1e-20)) * cos(2pi * random(time*100e6+100e6))-sqrt(-2 * log10(random(time*100e6+200e6)+1e-20)) * cos(2pi * random(time*100e6+300e6)) TEXT 48 232 Left 2 !.tran 0 1m 0 10n

-Lasse

Reply to
Lasse Langwadt Christensen

That is very cool. I don't understand it, but it looks right and FFTs pretty flat to about 10 MHz. Cash? Zuni?

--

John Larkin                  Highland Technology Inc 
www.highlandtechnology.com   jlarkin at highlandtechnology dot com    

Precision electronic instrumentation 
Picosecond-resolution Digital Delay and Pulse generators 
Custom timing and laser controllers 
Photonics and fiberoptic TTL data links 
VME  analog, thermocouple, LVDT, synchro, tachometer 
Multichannel arbitrary waveform generators
Reply to
John Larkin

Den tirsdag den 3. december 2013 02.20.37 UTC+1 skrev John Larkin:

the

the

ires

ion

how

random(time*100e6+100e6))-sqrt(-2 * log10(random(time*100e6+200e6)+1e-20)) * cos(2pi * random(time*100e6+300e6))

tty

it was an attempt at a Box?Muller transform, two of them to get it symmet ric and some hacks on time to get some random numbers, I'm not sure how well it works I'm not sure I understand the Time variable in ltspice

I'll look you up if I'm the neighborhood :P

-Lasse

Reply to
Lasse Langwadt Christensen

I can't find the "time" variable explained in the Help.

It looks like it's, well, time:

Version 4 SHEET 1 880 680 WIRE 320 64 128 64 WIRE 400 64 320 64 WIRE 128 96 128 64 WIRE 320 112 320 64 WIRE 128 208 128 176 WIRE 320 208 320 192 FLAG 128 208 0 FLAG 320 208 0 SYMBOL bv 128 80 R0 WINDOW 0 -99 36 Left 2 WINDOW 3 -135 82 Left 2 SYMATTR InstName B1 SYMATTR Value V=time SYMBOL res 304 96 R0 SYMATTR InstName R1 SYMATTR Value 1 TEXT 192 16 Left 2 !.tran 5

--

John Larkin                  Highland Technology Inc 
www.highlandtechnology.com   jlarkin at highlandtechnology dot com    

Precision electronic instrumentation 
Picosecond-resolution Digital Delay and Pulse generators 
Custom timing and laser controllers 
Photonics and fiberoptic TTL data links 
VME  analog, thermocouple, LVDT, synchro, tachometer 
Multichannel arbitrary waveform generators
Reply to
John Larkin

Try this one!

Version 4 SHEET 1 880 680 WIRE 320 64 128 64 WIRE 368 64 320 64 WIRE 400 64 368 64 WIRE 128 96 128 64 WIRE 320 112 320 64 WIRE 128 208 128 176 WIRE 320 208 320 192 FLAG 128 208 0 FLAG 320 208 0 FLAG 368 64 NOISE SYMBOL bv 128 80 R0 WINDOW 0 -198 53 Left 2 WINDOW 3 -336 104 Left 2 SYMATTR InstName B1 SYMATTR Value V=random(100*time) - 0.5 SYMBOL res 304 96 R0 WINDOW 0 -59 37 Left 2 WINDOW 3 -56 73 Left 2 SYMATTR InstName R1 SYMATTR Value 1 TEXT -96 64 Left 2 !.tran 5

--

John Larkin                  Highland Technology Inc 
www.highlandtechnology.com   jlarkin at highlandtechnology dot com    

Precision electronic instrumentation 
Picosecond-resolution Digital Delay and Pulse generators 
Custom timing and laser controllers 
Photonics and fiberoptic TTL data links 
VME  analog, thermocouple, LVDT, synchro, tachometer 
Multichannel arbitrary waveform generators
Reply to
John Larkin

Den tirsdag den 3. december 2013 05.21.00 UTC+1 skrev John Larkin:

is the

at the

spires

nction

st how

ss

ke

i * random(time*100e6+100e6))-sqrt(-2 * log10(random(time*100e6+200e6)+1e-2

0)) * cos(2pi * random(time*100e6+300e6))

pretty

it symmetric

it works I'm not sure I understand the Time variable in ltspice

might work, I assumed random was uniform not normal distributed

random is just a lookup table, so unless you multiply time with a number bigger than 1/timestep you get repeating numbers

-Lasse

Reply to
Lasse Langwadt Christensen

Some simple function will map uniform to almost-Gaussian.

The random values could be squared up and then lowpass filtered; see AoE p 660.

Is it a finite table? Any idea of the size?

It would be cool if Spice had more numeric operators, like "save these variables when..." or "stop if..."

--

John Larkin                  Highland Technology Inc 
www.highlandtechnology.com   jlarkin at highlandtechnology dot com    

Precision electronic instrumentation 
Picosecond-resolution Digital Delay and Pulse generators 
Custom timing and laser controllers 
Photonics and fiberoptic TTL data links 
VME  analog, thermocouple, LVDT, synchro, tachometer 
Multichannel arbitrary waveform generators
Reply to
John Larkin

Den tirsdag den 3. december 2013 17.13.53 UTC+1 skrev John Larkin:

or the box-muller transform or just add enough independent random numbers several ways

no idea, and it might not really be a table the help says:

"rand(x) Random number between 0 and 1 depending on the integer value of x."

"random(x) Similar to rand(), but smoothly transitions between values"

so rand(time) will give you a new number every second, random(time) a smooth curve that connect those numbers

-Lasse

Reply to
Lasse Langwadt Christensen

Two values at a time--it uses polar coordinates. Google "Box-Mueller". (Numerical Recipes has a good discussion.)

You can do a lot of that stuff by creative use of Boolean operators. (Old versions of Mathcad had a lot of the same limitations, so I'm pretty used to it.) I recently upgraded to the 2001i edition.

[Mathsoft claims that it doesn't run on Win 7, but it actually runs fine if you copy the installation from XP and run the registry tool they supply (regtool.exe). Same with Wine. It just doesn't install there.]

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC 
Optics, Electro-optics, Photonics, Analog Electronics 

160 North State Road #203 
Briarcliff Manor NY 10510 

hobbs at electrooptical dot net 
http://electrooptical.net
Reply to
Phil Hobbs

20011 edition? now, THAT'S planning ahead!
Reply to
RobertMacy

two-zero-zero-one-aye. Just about free, because it allegedly doesn't work on any Windows past XP, except that it does.

Cheers

Phil Hobbs

Reply to
Phil Hobbs

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.