Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Learning about oscillators in LTSpice

1,143 views
Skip to first unread message

Clifford Heath

unread,
Oct 21, 2010, 7:45:26 PM10/21/10
to
I'm just getting started with LTSpice, and played yesterday
with some Colpitts oscillators to my satisfaction. Today I
tried a Hartley, and I can't understand some of the behaviour
I'm seeing.

In the attached circuit, I've added an emitter resister in
an attempt to reduce the high collector current. Merely
increasing the base resistor didn't help until the oscillator
stopped entirely. Actually, the collector current wasn't so
high until I removed a resister from base to ground, so maybe
that's the answer... but anyhow.

The collector current is too high, but I'm seeing a 3MHz
amplitude modulation over the top of the 80MHz fundamental.
Despite the Oscout connector, I'm actually looking at the
tank voltage.

Where is this 3MHz coming from? I.e. where's the TC?

What should I change to reduce the collector current?

Clifford Heath.

---- cut here for Hartley.asc ----
Version 4
SHEET 1 884 680
WIRE 208 -176 32 -176
WIRE 432 -176 208 -176
WIRE 32 -128 32 -176
WIRE 208 0 208 -176
WIRE -208 48 -336 48
WIRE -112 48 -208 48
WIRE 32 48 32 -48
WIRE 32 48 -48 48
WIRE 144 48 32 48
WIRE 432 48 432 -176
WIRE -208 144 -208 128
WIRE -336 208 -336 48
WIRE -208 240 -208 224
WIRE 208 240 208 96
WIRE 208 240 -208 240
WIRE 576 240 208 240
WIRE -208 256 -208 240
WIRE 32 272 32 48
WIRE -336 400 -336 272
WIRE -208 400 -208 336
WIRE -208 400 -336 400
WIRE 32 400 32 352
WIRE 32 400 -208 400
WIRE 432 400 432 128
WIRE 432 400 32 400
WIRE 576 400 432 400
WIRE 432 448 432 400
WIRE 672 32 0 0
FLAG 576 240 OscOut
IOPIN 576 240 Out
FLAG 576 400 0
FLAG 432 448 0
FLAG -336 48 Tank
SYMBOL res 16 256 R0
SYMATTR InstName R11
SYMATTR Value 4k7
SYMBOL res 16 -144 R0
SYMATTR InstName R10
SYMATTR Value 47k
SYMBOL voltage 432 32 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 9v
SYMBOL npn 144 0 R0
SYMATTR InstName Q1
SYMATTR Value BFR91A
SYMBOL ind -224 128 R0
SYMATTR InstName L2
SYMATTR Value .4<B5>H
SYMBOL cap -352 208 R0
SYMATTR InstName C1
SYMATTR Value 22pF
SYMBOL ind -224 352 M180
WINDOW 0 36 80 Left 0
WINDOW 3 36 40 Left 0
SYMATTR InstName L1
SYMATTR Value .1<B5>h
SYMBOL cap -48 32 R90
WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0
SYMATTR InstName C2
SYMATTR Value 10pf
SYMBOL res -224 32 R0
SYMATTR InstName R1
SYMATTR Value 1ohm
TEXT -480 -168 Left 0 !.tran 0 20uS 0s 1ns
TEXT -160 264 Left 0 ;K1 L1 L2 1

George Herold

unread,
Oct 22, 2010, 10:17:40 AM10/22/10
to

Cliff I'm pretty much an LTspice newbie also. I don't know the
Hartley oscillator very well either. I also couldn't get your posted
circuit to work... (I had no model for the BFR91A tansistor.)

Anyway I futzed around (added some collector resistance.) and got this


Version 4
SHEET 1 884 680
WIRE 208 -176 32 -176
WIRE 432 -176 208 -176
WIRE 32 -128 32 -176

WIRE 208 -128 208 -176
WIRE 208 0 208 -48


WIRE -208 48 -336 48
WIRE -112 48 -208 48
WIRE 32 48 32 -48
WIRE 32 48 -48 48
WIRE 144 48 32 48
WIRE 432 48 432 -176
WIRE -208 144 -208 128
WIRE -336 208 -336 48
WIRE -208 240 -208 224
WIRE 208 240 208 96
WIRE 208 240 -208 240
WIRE 576 240 208 240
WIRE -208 256 -208 240
WIRE 32 272 32 48
WIRE -336 400 -336 272
WIRE -208 400 -208 336
WIRE -208 400 -336 400
WIRE 32 400 32 352
WIRE 32 400 -208 400
WIRE 432 400 432 128
WIRE 432 400 32 400
WIRE 576 400 432 400
WIRE 432 448 432 400

FLAG 576 240 OscOut
IOPIN 576 240 Out
FLAG 576 400 0
FLAG 432 448 0
FLAG -336 48 Tank
SYMBOL res 16 256 R0
SYMATTR InstName R11
SYMATTR Value 4k7
SYMBOL res 16 -144 R0
SYMATTR InstName R10
SYMATTR Value 47k
SYMBOL voltage 432 32 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 9v
SYMBOL npn 144 0 R0
SYMATTR InstName Q1

SYMATTR Value 2N3904


SYMBOL ind -224 128 R0
SYMATTR InstName L2

SYMATTR Value .4µH


SYMBOL cap -352 208 R0
SYMATTR InstName C1
SYMATTR Value 22pF
SYMBOL ind -224 352 M180
WINDOW 0 36 80 Left 0
WINDOW 3 36 40 Left 0
SYMATTR InstName L1

SYMATTR Value .1µH


SYMBOL cap -48 32 R90
WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0
SYMATTR InstName C2
SYMATTR Value 10pf
SYMBOL res -224 32 R0
SYMATTR InstName R1
SYMATTR Value 1ohm

SYMBOL res 192 -144 R0
WINDOW 0 42 73 Left 0
WINDOW 3 32 43 Left 0
SYMATTR InstName R2
SYMATTR Value 400
TEXT -480 -168 Left 0 !.tran 0 20uS 0us 1ns


TEXT -160 264 Left 0 ;K1 L1 L2 1


George H.

Message has been deleted
Message has been deleted

Clifford Heath

unread,
Oct 24, 2010, 7:19:32 AM10/24/10
to
George Herold wrote:
> On Oct 21, 7:45 pm, Clifford Heath <no.s...@please.net> wrote:
>> The collector current is too high, but I'm seeing a 3MHz
>> amplitude modulation over the top of the 80MHz fundamental.

>> Where is this 3MHz coming from? I.e. where's the TC?


>> What should I change to reduce the collector current?

> Cliff I'm pretty much an LTspice newbie also. I don't know the


> Hartley oscillator very well either. I also couldn't get your posted
> circuit to work... (I had no model for the BFR91A tansistor.)

I didn't have any trouble getting it to work better than the version I
posted... but I was curious about why this one behaved the way it did.

Apologies for not including the BFR91A model. It follows. I didn't
use the subckt with package parasitics, because (a) I'm not dialling
up that high a frequency, (b) there will be many other parasitics
I'm ignoring anyhow, and (c) I haven't figured out how to ;-).

More in response to Fred's message.

Clifford Heath.

.model BFR91A NPN
+ IS = 1.32873E-015
+ BF = 1.02000E+002
+ NF = 1.00025E+000
+ VAF = 5.19033E+001
+ IKF = 8.15511E+000
+ ISE = 1.39029E-014
+ NE = 1.51292E+000
+ BR = 1.76953E+001
+ NR = 9.94038E-001
+ VAR = 3.28032E+000
+ IKR = 1.00000E+001
+ ISC = 1.04297E-015
+ NC = 1.18993E+000
+ RB = 1.00000E+001
+ IRB = 1.00000E-006
+ RBM = 1.00000E+001
+ RE = 7.63636E-001
+ RC = 9.00000E+000
+ EG = 1.11000E+000
+ XTI = 3.00000E+000
+ CJE = 2.03216E-012
+ VJE = 6.00000E-001
+ MJE = 2.90076E-001
+ TF = 6.55790E-012
+ XTF = 3.89752E+001
+ VTF = 1.09308E+001
+ ITF = 5.21078E-001
+ CJC = 1.00353E-012
+ VJC = 3.40808E-001
+ MJC = 1.94223E-001

Clifford Heath

unread,
Oct 24, 2010, 12:31:04 PM10/24/10
to
Fred Abse wrote:
> Try this, it's Cliff's original circuit, with the coil ends reversed,
> driving the transistor more kindly, giving over 7V RMS, much more cleanly.

Ahh, right, I had the transformer upside-down. Referring to my
source circuit it is constructed that way (had to check the coil
winding details and board overlay). Thanks, that was the main
answer I wanted, to reduce the drive.

The other answer came in your reference to squegging. I hadn't come
across that before. Although I can't reproduce it now, I had an
oscillator that must have been borderline, because it had an
amplitude modulation of about 20% depth at 3MHz. I was puzzled
about where the TC was coming from; perhaps R10/R11 and C2?

I'd like to know more about how to design to avoid squegging.
There's obvious things to try, but is there a systematic approach?

> On Fri, 22 Oct 2010 07:17:40 -0700, George Herold wrote:
> Neither did I, but the BFR91 core is used in various NXP models as a basis
> for other devices, they just add package parasitics, so I used that.

I was simulating with the bare BFR91A because I hadn't figured
out how to use the BFR93A subcircuit. It took me freaking ages
to figure out how to make the subcircuit stuff work. I've included
the files below (Fred obviously knows this, but maybe not others).

The actual devices I was planning to use (though probably in a
Colpitts) is a BFR93A, and at 146MHz - now just playing to get the
hang of things without worrying too much about actual frequencies.
I'd tweak the coil and cap values to suit when it's looking reasonable.

At 46MHz, an 2N2222 is much more suitable, but the coupling cap has
to be raised to 15pF - then the output is quite clean (2nd harmonic
is 40dB down).

With the BFR93A in the fixed circuit attached, there's some squiggling
around 520MHz in the collector current before the transistor turns off
properly on each cycle (BFR93A too fast?), but it doesn't appear at all
in the tank - nearby spikes are > 60dB down.

Just out of interest, I'd choose the coil and tank reactances based
on magnitude at the frequency of interest; at 48MHz the .5uH has a
reactance of 151jOhms (or is that -jOhms?). Obviously the cap will
match with the opposite sign.

Question: Is 150-ish a reasonable choice for this circuit? How would
you choose this reactance? To dominate the bias resister impedances?

It worries me that the coupling cap is 15pf when the tank cap is only 22.
Should the coupling cap have a much higher impedance than the tank?
If I drop it much, the 2n2222 stops oscillating (not enough gain at
this frequency), but the BFR91A goes and goes. Smaller coupling caps
seem to reduce purity, the opposite of what I expected.

> Output is a bit anemic (about 250mV RMS)
> Spectral purity isn't so good, either, second harmonic only about 10dB
> down, and there's what looks like phase noise on it.

I didn't get that result I had; I was getting p-p of +16 .. -18V on the
tank. But what was surprising me was the 3MHz amplitude modulation on
the 46MHz, to about 20% depth - possibly marginal squegging. I can't
make it do that any more.

> it's a good idea to check the "Convert Greek mu to "u"" option

Good tip, thanks.

Files follow. The .sub file is off the net, the asy file is
one I made. The SYMATTRs are the tricky bit.

Clifford Heath.

------------------ Cut Here for Hartley.asc ------------------

FLAG 576 240 OscOut
IOPIN 576 240 Out
FLAG 576 400 0
FLAG 432 448 0
FLAG -336 48 Tank
SYMBOL res 16 256 R0
SYMATTR InstName R11
SYMATTR Value 4k7
SYMBOL res 16 -144 R0
SYMATTR InstName R10
SYMATTR Value 47k
SYMBOL voltage 432 32 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 9v

SYMBOL ind -224 128 R0
SYMATTR InstName L2

SYMATTR Value .06u


SYMBOL cap -352 208 R0
SYMATTR InstName C1
SYMATTR Value 22pF
SYMBOL ind -224 352 M180
WINDOW 0 36 80 Left 0
WINDOW 3 36 40 Left 0
SYMATTR InstName L1

SYMATTR Value .4u

SYMBOL cap -48 32 R90
WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0
SYMATTR InstName C2
SYMATTR Value 10pf
SYMBOL res -224 32 R0
SYMATTR InstName R1

SYMATTR Value 0.01ohm
SYMBOL custom\\bfr93a 144 0 R0
SYMATTR InstName Q1
TEXT -480 -168 Left 0 !.tran 0 10u 0s 1ns


TEXT -160 264 Left 0 ;K1 L1 L2 1

------------------ Cut Here for lib\sym\custom\bfr93a.asy ------------------
Version 4
SymbolType CELL
LINE Normal 44 76 36 84
LINE Normal 64 96 44 76
LINE Normal 64 96 36 84
LINE Normal 40 80 16 64
LINE Normal 16 80 16 16
LINE Normal 16 32 64 0
LINE Normal 16 48 0 48
WINDOW 0 56 32 Left 0
WINDOW 3 56 68 Left 0
SYMATTR Value BFR93A
SYMATTR Prefix X
SYMATTR ModelFile BFR93A.sub
SYMATTR SpiceModel BFR93A
SYMATTR Description Bipolar NPN RF transistor BFR93A
PIN 64 0 NONE 0
PINATTR PinName C
PINATTR SpiceOrder 1
PIN 0 48 NONE 0
PINATTR PinName B
PINATTR SpiceOrder 2
PIN 64 96 NONE 0
PINATTR PinName E
PINATTR SpiceOrder 3
------------------ Cut Here for lib\sub\bfr93a.sub ------------------
* Filename: BFR93A_SPICE.PRM
* BFR93A SPICE MODEL
* PHILIPS SEMICONDUCTORS
* Date : September 1995
*
* PACKAGE : SOT23 DIE MODEL : BFR91A
* 1: COLLECTOR; 2: BASE; 3: EMITTER;
.SUBCKT BFR93A 1 2 3
Q1 6 5 7 7 BFR91A
* SOT23 parasitic model
Lb 4 5 .4n
Le 7 8 .83n
L1 2 4 .35n
L2 1 6 .17n
L3 3 8 .35n
Ccb 4 6 71f
Cbe 4 8 2f
Cce 6 8 71f
*
* PHILIPS SEMICONDUCTORS Version: 1.0
* Filename: BFR91A.PRM Date: Feb 1992
*
.MODEL BFR91A NPN

.ENDS
------------------ Final Cut ------------------

Message has been deleted
Message has been deleted

Clifford Heath

unread,
Oct 25, 2010, 5:09:22 AM10/25/10
to
Fred Abse wrote:
> I've not been able to reproduce your result, Are you sure it wasn't an
> artifact of aliasing in your displayed waveform?

Yes, I'm sure, but nm, I can't do it again myself, despite fiddling
with this stuff for more than ten hours yesterday.

> Oscillators squeg when the drive builds up, maybe over several cycles,

I found a few more ways to do it yesterday too, and I have some
notion of how to handle it, though a few examples surprised me.
In particular this article from ED, which purports to show an
anti-squegging biassing for a Colpitts, but which will happily squegg
with even quite small changes (short url <http://bit.ly/d8nqxl> or
<http://electronicdesign.com/article/analog-and-mixed-signal/use-current-mirror-biasing-to-avoid-squegging-in-r.aspx>
Increase the 5.1K bias resistor, for example.

The inductor in the emitter is the only innovation that improves
the Colpitts circuit I already had. And maybe temp compensation on
the biassing, from the transistor matching, but I don't know how
to Spice that. ColpittsEL.asc is attached below.

> I've had trouble with fast transistors, where tracks were resonating,

My circuits don't model track lengths, but there is lead inductance
and internal and external capacitance, so maybe that reaches 500MHz.

> A 2N2222 will go quite nicely at over 100MHz

Yes, but needs a lot more drive than the BFR93A because it has less gain.
The CA3046 suggested by ED is better, if you can use the extra transistors.

> Try and keep the L/C ratio high, remembering that:

Ahh yes, I'd discovered that. That makes sense.

> That's because you're starving the transistor of drive with the smaller
> capacitor.

But it's biassed, so never turns off, and oscillates. All of these
oscillators use the transistor to deliver short pulses of collector
current, with the transistor off-ish in between, so as long as it
starts, why should low drive cause impurity?

>> The SYMATTRs are the tricky bit.

> Don't tell me you handcrafted an .asy file, line by line.

No, just those lines, copied after ones from the libraries.
The problem wasn't how to create the file, but how to know
which things mattered.

Clifford Heath.
------------------- Cut Here for ColpittsEL.asc -------------------
Version 4
SHEET 1 880 708
WIRE 576 -160 304 -160
WIRE 304 -128 304 -160
WIRE 304 -16 304 -48
WIRE 304 -16 80 -16
WIRE 80 16 80 -16
WIRE 304 80 304 -16
WIRE 576 80 576 -160
WIRE -176 128 -224 128
WIRE -144 128 -176 128
WIRE -48 128 -80 128
WIRE 80 128 80 96
WIRE 80 128 -48 128
WIRE 240 128 80 128
WIRE 80 144 80 128
WIRE -48 160 -48 128
WIRE -176 224 -176 128
WIRE 80 240 80 208
WIRE 304 240 304 176
WIRE 304 240 80 240
WIRE 304 288 304 240
WIRE -48 304 -48 240
WIRE 80 304 80 240
WIRE -176 432 -176 304
WIRE -48 432 -48 368
WIRE -48 432 -176 432
WIRE 80 432 80 368
WIRE 80 432 -48 432
WIRE 304 432 304 368
WIRE 304 432 80 432
WIRE 576 432 576 160
WIRE 576 432 304 432
WIRE 304 528 304 432
FLAG 304 528 0
FLAG -224 128 Vosc
IOPIN -224 128 Out
SYMBOL res 288 -144 R0
SYMATTR InstName R1
SYMATTR Value 220
SYMBOL ind 288 272 R0
SYMATTR InstName L1
SYMATTR Value 0.2uH
SYMBOL voltage 576 64 R0


WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 9v

SYMBOL cap 64 144 R0
SYMATTR InstName C1
SYMATTR Value 10pf
SYMBOL cap 64 304 R0
SYMATTR InstName C2
SYMATTR Value 47pF
SYMBOL ind -64 144 R0
SYMATTR InstName L3
SYMATTR Value 120nH
SYMBOL cap -64 304 R0
SYMATTR InstName C3
SYMATTR Value 1nF
SYMBOL npn 240 80 R0
SYMATTR InstName Q1
SYMATTR Value CA3046
SYMBOL res 64 0 R0
SYMATTR InstName R4
SYMATTR Value 100k
SYMBOL res -192 208 R0
SYMATTR InstName R2
SYMATTR Value 100k
SYMBOL cap -80 112 R90


WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0

SYMATTR InstName C4
SYMATTR Value 10pF
TEXT -272 -8 Left 0 !.tran 0 20uS 0 1nS
.model CA3046 NPN
+ (IS = 10.0E-15 XTI=3.000E+00 EG=1.110E+00 VAF=1.00E+02
+ VAR=1.000E+02 BF=145.7E+00 ISE=114.286E-15 NE=1.480E+00
+ IKF=46.700E-03 XTB=0.000E+00 BR=.1000E+00 ISC=10.005E-15
+ NC=2.000E+00 IKR=10.00E-03 RC=10.000E+00 CJC=991.71E-15
+ MJC=0.333E-00 VJC=0.7500E-00 FC=5.000E-01 CJE=1.02E-12
+ MJE=.336E-00 VJE=0.750E-00 TR=10.000E-09 TF=277.01E-12
+ ITF=1.750E-00 XTF=309.38E+00 VTF=16.37E+00 PTF=0.000E+00
+ RE=0.0E+00 RB=0.00E+00

Paul Keinanen

unread,
Oct 24, 2010, 8:00:26 PM10/24/10
to
On Fri, 22 Oct 2010 10:45:26 +1100, Clifford Heath
<no....@please.net> wrote:

>I'm just getting started with LTSpice, and played yesterday
>with some Colpitts oscillators to my satisfaction. Today I
>tried a Hartley, and I can't understand some of the behaviour
>I'm seeing.

Do current circuit simulators really work (produce usable results)
with oscillators (thermal noise amplifiers with frequency selective
positive feedback with voltage limitation, satisfying the Barkhausen
oscillation criterion) ?

At least in the old days, positive feedback did cause a lot of
problems in most simulation packages.

Tim Williams

unread,
Oct 24, 2010, 8:12:02 PM10/24/10
to
Hysteresis and oscillators work well for me, when they work at all. I've
discovered my fair share of simple yet "unsimulatable" circuits.

Tim

--
Deep Friar: a very philosophical monk.
Website: http://webpages.charter.net/dawill/tmoranwms

"Paul Keinanen" <kein...@sci.fi> wrote in message
news:8lh9c652ditl18on8...@4ax.com...

Clifford Heath

unread,
Oct 25, 2010, 7:34:24 AM10/25/10
to
Paul Keinanen wrote:
> Do current circuit simulators really work (produce usable results)
> with oscillators

Spice does not take a simplistic approach, and seems to model
the noise and many other characteristics pretty well. You can
see the effects of using different transistors, for example.
That said, there are two possible questions implied:

1) Can a Spice simulation truly reflect real-world behaviour?

2) Do Spice simulations actually reflect real-world behaviour?

My (newbie) feeling is that the answer to (1) is yes, it can.

Whether or to what extent (2) is the case depends on how good
your models are. I haven't built even a substantial fraction of
the things I've simulated, but I think the models seem pretty
good. I'd expect the results to mostly match up. Might need to
adjust drive levels etc to get best purity, but Spice will get
you into the right ball-park. Seeing as I don't have a spectrum
analyser for final optimisation, that's pretty important.

Even if the predicted behaviour doesn't match exactly, the
*kinds* of behaviour still match, so I've still learned enough
about oscillators to have a fair shot at debugging one in
hardware without having a lot of expensive equipment.

The other thing that makes me trust LTSpice is that many very
experienced and learned folk here use it, a lot. They know when
they can trust it and when not, of course - experience will do
that to you. :-)

Best of all, I don't need to use Windoze - it works fine under
Wine on my Intel Mac, or on Linux.

Clifford Heath.

Message has been deleted

Clifford Heath

unread,
Oct 26, 2010, 5:26:48 AM10/26/10
to
Fred Abse wrote:

> On Mon, 25 Oct 2010 19:09:22 +1000, Clifford Heath wrote:
>> But it's biassed, so never turns off, and oscillates. All of these
>> oscillators use the transistor to deliver short pulses of collector
>> current, with the transistor off-ish in between, so as long as it
>> starts, why should low drive cause impurity?
> Try stepping the value of C2 to see what happens.

Low C2: bad purity. High C2: squegging. I thought that purity
would increase as I lowered C2, until oscillation stops. I can
see *what* is happening, but I still don't really know why.
A lower C2 should reduce the load on the tank and let it ring
more freely, shouldn't it?

Also, the optimum C2 falls in a quite small range, which will
depend on the actual transistor characteristics; unfortunate.

>> ------------------- Cut Here for ColpittsEL.asc -------------------

> Slow startup.

It got a lot slower as I reduced the base resister to lower the
current consumption. The inductive load in the emitter seems to
roughly halve the required current for a given tank amplitude,
vs having a resister there.

> Will need buffering

I planned to do that anyhow - don't want any downstream circuitry
introducing phase noise and pulling the frequency. This will be a
VCO in a synthesizer, I just haven't put the tuning diode there
yet - I wanted to understand the bare oscillator first. So frequency
pulling shouldn't be a problem, but phase noise is.

> Try loading it with 10k and watch it squeg.

The attached circuit shows the original effect I was asking about,
if you set C2 to 20pF. There's a 6-10MHz amplitude modulation on
the 49MHz carrier. I can't see it in the FFT, I got it from the
envelope. You'll need to set up the BFR93A yourself.

Anyhow, it's clearly starting to squegg, and this discussion has
educated me about why. Thanks!

Clifford Heath.
------------------- Cut here for HartleySub.asc -------------------
Version 4

SYMBOL voltage 432 32 R0


WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 9v

SYMBOL ind -224 128 R0
SYMATTR InstName L2
SYMATTR Value .06u

SYMBOL cap -352 208 R0
SYMATTR InstName C1


SYMATTR Value 22pF
SYMBOL ind -224 352 M180
WINDOW 0 36 80 Left 0
WINDOW 3 36 40 Left 0

SYMATTR InstName L1
SYMATTR Value .4u
SYMBOL cap -48 32 R90


WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0

SYMATTR InstName C2
SYMATTR Value 10pf

SYMBOL res -224 32 R0
SYMATTR InstName R1

Message has been deleted

Clifford Heath

unread,
Oct 27, 2010, 8:54:38 AM10/27/10
to
Fred Abse wrote:

> On Tue, 26 Oct 2010 19:26:48 +1000, Clifford Heath wrote:
>> The attached circuit shows the original effect I was asking about,
>> if you set C2 to 20pF. There's a 6-10MHz amplitude modulation on
>> the 49MHz carrier. I can't see it in the FFT, I got it from the
>> envelope. You'll need to set up the BFR93A yourself.
> I can see on the FFT.
> Sidebands at +/- 7.2Mhz about 30dB down.

Right - but it's hard to see because, as you say, there's
noise all over the floor ;-). IOW it's not a clean 7MHz
modulation, it's a noisy modulation that contains more
noise at 7MHz than elsewhere.

Nice clean signal with 10pF instead, marginal oscillation
with poor purity at 4pf. It surprises me that it only works
over a 2:1 range either side of optimum.

But then, I think the problem with a Hartley is this: the
amplitude is limited by Q and the the "on" conductance of
the active device (and the stiffness of the supply). That
determines the peak current, and hence the amount of energy
that can be pumped into the tank on each cycle. Multiply
by Q to get the amplitude.

In a Colpitts on the other hand, the energy is pumped into
a capacitor, so amplitude is limited by Q and *voltage*
rather than current. As long as the device turns on to a
significantly lower impedance than the tank presents to it,
differences in the device will have little effect on the
amplitude.

A collector resister will further degenerate device differences,
if there's a wide spread. You can do that in a Hartley too,
but you can get a subharmonic at the R/L TC, at least if it's
anywhere near a harmonic relationship (try 50R for example).

I think this shows why Hartleys are harder to tame than
Colpitts. I'll go with the Colpitts for my VCO, with an
inductive emitter load to reduce power consumption.

Clifford Heath.

Message has been deleted

Jim Thompson

unread,
Oct 29, 2010, 12:35:27 PM10/29/10
to
On Fri, 29 Oct 2010 08:17:27 -0700, Fred Abse
<excret...@invalid.invalid> wrote:

>On Wed, 27 Oct 2010 22:54:38 +1000, Clifford Heath wrote:
>
>> I think this shows why Hartleys are harder to tame than
>> Colpitts. I'll go with the Colpitts for my VCO, with an
>> inductive emitter load to reduce power consumption.
>

>I'd go with the Hartley. It's got better behavior under load.
>
>See 5k, 10k, 20k load spectra in A.B.S.E.
>
>20k up, it's clean.
>
>Starts much faster.
>
>Keep it around 50MHz and triple it.

Don't know if it has a name, but why not a differential pair LC
oscillator?

No bias issues. Everything balances out.

Easy to AGC in this modern day. I had some difficulties 45 years ago,
designing the MC1648 :-)

...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I can see November from my house :-)

Clifford Heath

unread,
Dec 7, 2010, 3:59:19 AM12/7/10
to
Jim Thompson wrote:
> Don't know if it has a name, but why not a differential pair LC
> oscillator?
>
> No bias issues. Everything balances out.
>
> Easy to AGC in this modern day. I had some difficulties 45 years ago,
> designing the MC1648 :-)

Jim,

I studied your circuit, but not wanting to spend 8 transistors (or whatever)
in the AGC network, the best I could come up with is the attached. The AGC
function works, but doesn't make the oscillator any cleaner. The differential
(or is it emitter-coupled - looks a bit different than the E-C osc in AoE)
oscillator is very clean to begin with (harmonics as low as 45dB down) before
you add AGC, and AGC doesn't seem to help. I can't see how to get to 60dB,
as your MC1648 data sheet claims.

What would you do differently?

Please also comment on my Colpitts-with-AGC circuit in the "RF PA Oscillator"
thread.

Clifford Heath.

---------------------- Cut Here for Differential.asc -------------------
Version 4
SHEET 1 1100 708
WIRE 464 -160 48 -160
WIRE 624 -160 464 -160
WIRE 688 -160 624 -160
WIRE 800 -160 688 -160
WIRE 912 -160 800 -160
WIRE 1040 -160 912 -160
WIRE 48 -144 48 -160
WIRE 624 -128 624 -160
WIRE 688 -128 688 -160
WIRE 800 -128 800 -160
WIRE 128 -32 -16 -32
WIRE 208 -32 128 -32
WIRE 304 -32 208 -32
WIRE 560 -32 304 -32
WIRE 208 0 208 -32
WIRE 128 16 128 -32
WIRE 304 80 304 -32
WIRE 464 80 464 -160
WIRE 912 80 912 -160
WIRE 1040 80 1040 -160
WIRE 48 128 48 -64
WIRE 128 128 128 80
WIRE 128 128 48 128
WIRE 208 128 208 80
WIRE 208 128 128 128
WIRE 240 128 208 128
WIRE 560 128 560 -32
WIRE 560 128 528 128
WIRE 624 128 624 -48
WIRE 624 128 560 128
WIRE 736 128 624 128
WIRE 800 128 800 -48
WIRE 848 128 800 128
WIRE 304 192 304 176
WIRE 384 192 304 192
WIRE 464 192 464 176
WIRE 464 192 384 192
WIRE 576 208 496 208
WIRE 688 208 688 -48
WIRE 688 208 576 208
WIRE 704 208 688 208
WIRE 384 224 384 192
WIRE 48 240 48 128
WIRE 128 240 128 128
WIRE 496 240 496 208
WIRE 688 240 688 208
WIRE 912 288 912 176
WIRE 912 288 752 288
WIRE 928 288 912 288
WIRE 384 320 384 304
WIRE 912 320 912 288
WIRE 576 336 576 208
WIRE 800 336 800 128
WIRE 496 368 448 368
WIRE 48 432 48 320
WIRE 128 432 128 304
WIRE 128 432 48 432
WIRE 384 432 384 416
WIRE 384 432 128 432
WIRE 576 432 576 400
WIRE 576 432 384 432
WIRE 688 432 688 416
WIRE 688 432 576 432
WIRE 800 432 800 416
WIRE 800 432 688 432
WIRE 912 432 912 400
WIRE 912 432 800 432
WIRE 1040 432 1040 160
WIRE 1040 432 912 432
WIRE 1040 464 1040 432
FLAG 1040 464 0
FLAG -16 -32 Vtank
IOPIN -16 -32 Out
FLAG 704 208 Vagc
IOPIN 704 208 Out
FLAG 928 288 Veout
IOPIN 928 288 Out
SYMBOL voltage 1040 64 R0


WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 9v

SYMBOL cap 112 16 R0
SYMATTR InstName C2
SYMATTR Value 22pF
SYMBOL ind 192 -16 R0
SYMATTR InstName L3
SYMATTR Value 60nH


SYMBOL npn 240 80 R0
SYMATTR InstName Q1
SYMATTR Value CA3046

SYMBOL npn 528 80 M0
SYMATTR InstName Q2
SYMATTR Value CA3046
SYMBOL npn 448 320 M0
SYMATTR InstName Q3
SYMATTR Value CA3046
SYMBOL res 368 208 R0
SYMATTR InstName R2
SYMATTR Value 220
SYMBOL cap 112 240 R0
SYMATTR InstName C4
SYMATTR Value 1nF
SYMBOL diode 480 304 R0
SYMATTR InstName D2
SYMBOL res 672 -144 R0
SYMATTR InstName R5
SYMATTR Value 22k
SYMBOL npn 848 80 R0
SYMATTR InstName Q4
SYMATTR Value CA3046
SYMBOL cap 560 336 R0
SYMATTR InstName C1
SYMATTR Value 1nF
SYMBOL npn 752 240 M0
SYMATTR InstName Q5
SYMATTR Value CA3046
SYMBOL res 672 320 R0
SYMATTR InstName R7
SYMATTR Value 1k
SYMBOL res 896 304 R0
SYMATTR InstName R8
SYMATTR Value 470
SYMBOL res 32 -160 R0
SYMATTR InstName R1
SYMATTR Value 47k
SYMBOL res 32 224 R0
SYMATTR InstName R3
SYMATTR Value 4.7k
SYMBOL res 784 -144 R0
SYMATTR InstName R4
SYMATTR Value 47k
SYMBOL cap 800 112 R90


WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0

SYMATTR InstName C3
SYMATTR Value 10pF
SYMBOL res 608 -144 R0
SYMATTR InstName R9
SYMATTR Value 47k
SYMBOL diode 480 240 R0
SYMATTR InstName D1
SYMBOL res 784 320 R0
SYMATTR InstName R6
SYMATTR Value 10k
TEXT 104 -200 Left 0 !.tran 0 10uS 0 1nS
TEXT 88 464 Left 0 !.inc "C:\\Program Files\\LTC\\LTspiceIV\\lib\\custom\\Transistors\\ca3000.lib"

Jim Thompson

unread,
Dec 6, 2010, 6:50:24 PM12/6/10
to
On Tue, 07 Dec 2010 19:59:19 +1100, Clifford Heath
<n...@spam.please.net> wrote:

>Jim Thompson wrote:
>> Don't know if it has a name, but why not a differential pair LC
>> oscillator?
>>
>> No bias issues. Everything balances out.
>>
>> Easy to AGC in this modern day. I had some difficulties 45 years ago,
>> designing the MC1648 :-)
>
>Jim,
>
>I studied your circuit, but not wanting to spend 8 transistors (or whatever)
>in the AGC network, the best I could come up with is the attached. The AGC
>function works, but doesn't make the oscillator any cleaner. The differential
>(or is it emitter-coupled - looks a bit different than the E-C osc in AoE)
>oscillator is very clean to begin with (harmonics as low as 45dB down) before
>you add AGC, and AGC doesn't seem to help. I can't see how to get to 60dB,
>as your MC1648 data sheet claims.
>
>What would you do differently?
>
>Please also comment on my Colpitts-with-AGC circuit in the "RF PA Oscillator"
>thread.
>
>Clifford Heath.
>
>---------------------- Cut Here for Differential.asc -------------------
>Version 4

[snip]


>TEXT 88 464 Left 0 !.inc "C:\\Program Files\\LTC\\LTspiceIV\\lib\\custom\\Transistors\\ca3000.lib"

With all the voltage headroom you have (because of capacitive
coupling) I'd swap R2 and Q3 so that Q3 becomes a better current
source.

In the discrete world you could use a comparator to pump-up/pump-down
the AGC.

I can't comment on your Colpitts... I never have the luxury of all
those external parts... mainly because of pin usage.



...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.

Jim Thompson

unread,
Dec 6, 2010, 7:05:41 PM12/6/10
to
On Tue, 07 Dec 2010 19:59:19 +1100, Clifford Heath
<n...@spam.please.net> wrote:

>Jim Thompson wrote:
>> Don't know if it has a name, but why not a differential pair LC
>> oscillator?
>>
>> No bias issues. Everything balances out.
>>
>> Easy to AGC in this modern day. I had some difficulties 45 years ago,
>> designing the MC1648 :-)
>
>Jim,
>
>I studied your circuit, but not wanting to spend 8 transistors (or whatever)
>in the AGC network, the best I could come up with is the attached. The AGC
>function works, but doesn't make the oscillator any cleaner. The differential
>(or is it emitter-coupled - looks a bit different than the E-C osc in AoE)
>oscillator is very clean to begin with (harmonics as low as 45dB down) before
>you add AGC, and AGC doesn't seem to help. I can't see how to get to 60dB,
>as your MC1648 data sheet claims.
>
>What would you do differently?
>
>Please also comment on my Colpitts-with-AGC circuit in the "RF PA Oscillator"
>thread.
>
>Clifford Heath.
>
>---------------------- Cut Here for Differential.asc -------------------
>Version 4
>SHEET 1 1100 708

[snip]


>TEXT 88 464 Left 0 !.inc "C:\\Program Files\\LTC\\LTspiceIV\\lib\\custom\\Transistors\\ca3000.lib"

No ca3000.lib :-(



...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

Jim Thompson

unread,
Dec 6, 2010, 8:04:49 PM12/6/10
to
On Tue, 07 Dec 2010 19:59:19 +1100, Clifford Heath
<n...@spam.please.net> wrote:

>Jim Thompson wrote:
>> Don't know if it has a name, but why not a differential pair LC
>> oscillator?
>>
>> No bias issues. Everything balances out.
>>
>> Easy to AGC in this modern day. I had some difficulties 45 years ago,
>> designing the MC1648 :-)
>
>Jim,
>
>I studied your circuit, but not wanting to spend 8 transistors (or whatever)
>in the AGC network, the best I could come up with is the attached. The AGC
>function works, but doesn't make the oscillator any cleaner. The differential
>(or is it emitter-coupled - looks a bit different than the E-C osc in AoE)
>oscillator is very clean to begin with (harmonics as low as 45dB down) before
>you add AGC, and AGC doesn't seem to help. I can't see how to get to 60dB,
>as your MC1648 data sheet claims.
>
>What would you do differently?
>
>Please also comment on my Colpitts-with-AGC circuit in the "RF PA Oscillator"
>thread.
>
>Clifford Heath.
>
>---------------------- Cut Here for Differential.asc -------------------
>Version 4
>SHEET 1 1100 708

[snip]


>TEXT 104 -200 Left 0 !.tran 0 10uS 0 1nS
>TEXT 88 464 Left 0 !.inc "C:\\Program Files\\LTC\\LTspiceIV\\lib\\custom\\Transistors\\ca3000.lib"

How about this (not at all optimized)...

Version 4
SHEET 1 1568 944
WIRE 144 -160 -272 -160
WIRE 448 -160 144 -160
WIRE 608 -160 448 -160
WIRE 1264 -160 608 -160
WIRE 448 -48 448 -160
WIRE 608 -48 608 -160
WIRE -192 -32 -400 -32
WIRE -112 -32 -192 -32
WIRE -16 -32 -112 -32
WIRE 256 -32 -16 -32
WIRE -112 0 -112 -32
WIRE -192 16 -192 -32
WIRE -16 80 -16 -32
WIRE 144 80 144 -160
WIRE 1264 80 1264 -160
WIRE -272 128 -272 -160
WIRE -192 128 -192 80
WIRE -192 128 -272 128
WIRE -112 128 -112 80
WIRE -112 128 -192 128
WIRE -80 128 -112 128
WIRE 256 128 256 -32
WIRE 256 128 208 128
WIRE 704 128 256 128
WIRE 832 128 768 128
WIRE -16 192 -16 176
WIRE 64 192 -16 192
WIRE 144 192 144 176
WIRE 144 192 64 192
WIRE 64 224 64 192
WIRE 160 272 128 272
WIRE 256 272 160 272
WIRE 448 272 448 32
WIRE 448 272 256 272
WIRE 496 272 448 272
WIRE 608 304 608 32
WIRE 736 304 608 304
WIRE 608 352 608 304
WIRE 160 432 160 272
WIRE 256 432 256 272
WIRE 64 448 64 320
WIRE 448 448 448 272
WIRE 608 480 608 432
WIRE 832 480 832 128
WIRE 832 480 608 480
WIRE 608 496 608 480
WIRE 608 496 512 496
WIRE 608 544 608 496
WIRE 736 592 736 304
WIRE 736 592 672 592
WIRE 64 688 64 528
WIRE 160 688 160 496
WIRE 160 688 64 688
WIRE 256 688 256 512
WIRE 256 688 160 688
WIRE 448 688 448 544
WIRE 448 688 256 688
WIRE 608 688 608 640
WIRE 608 688 448 688
WIRE 1264 688 1264 160
WIRE 1264 688 608 688
WIRE 1264 720 1264 688
FLAG 1264 720 0
FLAG -400 -32 Vtank
IOPIN -400 -32 Out
FLAG 496 272 Vagc
IOPIN 496 272 Out
SYMBOL voltage 1264 64 R0


WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 9v

SYMBOL cap -208 16 R0


SYMATTR InstName C2
SYMATTR Value 22pF

SYMBOL ind -128 -16 R0


SYMATTR InstName L3
SYMATTR Value 60nH

SYMBOL npn -80 80 R0


SYMATTR InstName Q1
SYMATTR Value CA3046

SYMBOL npn 208 80 M0


SYMATTR InstName Q2
SYMATTR Value CA3046

SYMBOL npn 128 224 M0


SYMATTR InstName Q3
SYMATTR Value CA3046

SYMBOL res 48 432 R0
SYMATTR InstName R2
SYMATTR Value 1K
SYMBOL res 432 -64 R0


SYMATTR InstName R5
SYMATTR Value 22k

SYMBOL cap 144 432 R0


SYMATTR InstName C1
SYMATTR Value 1nF

SYMBOL npn 512 448 M0


SYMATTR InstName Q5
SYMATTR Value CA3046

SYMBOL cap 768 112 R90


WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0
SYMATTR InstName C3
SYMATTR Value 10pF

SYMBOL res 240 416 R0
SYMATTR InstName R1
SYMATTR Value 22k
SYMBOL npn 672 544 M0
SYMATTR InstName Q6
SYMATTR Value CA3046
SYMBOL res 592 336 R0
SYMATTR InstName R3
SYMATTR Value 200
SYMBOL res 592 -64 R0
SYMATTR InstName R7
SYMATTR Value 22K
TEXT 208 928 Left 0 !.tran 0 100uS 0 1nS
TEXT 208 896 Left 0 !.inc
S:\PSpice\DeviceLib\AnaSoftZIP\IntersilDescrete.lib


Fix the wrap ^^^^



...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

Jim Thompson

unread,
Dec 6, 2010, 8:27:42 PM12/6/10
to
On Tue, 07 Dec 2010 19:59:19 +1100, Clifford Heath
<n...@spam.please.net> wrote:

>Jim Thompson wrote:
>> Don't know if it has a name, but why not a differential pair LC
>> oscillator?
>>
>> No bias issues. Everything balances out.
>>
>> Easy to AGC in this modern day. I had some difficulties 45 years ago,
>> designing the MC1648 :-)
>
>Jim,
>
>I studied your circuit, but not wanting to spend 8 transistors (or whatever)
>in the AGC network, the best I could come up with is the attached. The AGC
>function works, but doesn't make the oscillator any cleaner. The differential
>(or is it emitter-coupled - looks a bit different than the E-C osc in AoE)
>oscillator is very clean to begin with (harmonics as low as 45dB down) before
>you add AGC, and AGC doesn't seem to help. I can't see how to get to 60dB,
>as your MC1648 data sheet claims.
>
>What would you do differently?
>

[snip]

(1) My LTspice sim run of your oscillator didn't show it AGC-ing, it
showed C-B forward as the amplitude limit.

(2) Study my crude quicky and observe the AGC.

(3) My latest VCO of this type, more than a year ago now, for a client
down in your neck of the woods... Adelaide, required 11 pages of
drawings ;-)



...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

Clifford Heath

unread,
Dec 7, 2010, 9:05:29 AM12/7/10
to
Jim Thompson wrote:
> (1) My LTspice sim run of your oscillator didn't show it AGC-ing, it
> showed C-B forward as the amplitude limit.

I had played with multiple different levels of AGC, and you're right,
this one shows almost none.

But my point is that even if you adjust things so it does AGC, the
tank purity doesn't change. As it is, the fundamental is -7dB, 2nd and
3rd harmonic are -50dB... hardly any point trying to improve that with
AGC...?

The tank purity is what I'm after, since I'm looking for a wide-range
VFO that will need minimal to no filtering.

> (2) Study my crude quicky and observe the AGC.

Nice AGC, but poor tank purity - 2nd harmonic is 32dB down.

However, I've modified mine to use the same biassing you use in the
oscillator cell (deleting unnecessary components) and tweaked things,
and I now have nice AGC and 42dB between fundamental and 3rd, with the
2nd harmonic being 57dB down(!). Still stabilises in 4uS. Attached.

I'm still having trouble working out how to take a feed off this oscillator
without affecting its behaviour. Simple emitter followers from the tank
work ok, but if I want gain as well, it doesn't seem to behave logically.

In case you have a different version of the model (though mine is Intersil
too), I've included a snippet of my ca3000.lib too.

> (3) My latest VCO of this type, more than a year ago now, for a client
> down in your neck of the woods... Adelaide, required 11 pages of
> drawings ;-)

Sounds like a serious oscillator. What was the most stringent design goal?

Clifford Heath.

--------- Cut Here for ca3046.lib ----------


.model CA3046 NPN
+ (IS = 10.0E-15 XTI=3.000E+00 EG=1.110E+00 VAF=1.00E+02
+ VAR=1.000E+02 BF=145.7E+00 ISE=114.286E-15 NE=1.480E+00
+ IKF=46.700E-03 XTB=0.000E+00 BR=.1000E+00 ISC=10.005E-15
+ NC=2.000E+00 IKR=10.00E-03 RC=10.000E+00 CJC=991.71E-15
+ MJC=0.333E-00 VJC=0.7500E-00 FC=5.000E-01 CJE=1.02E-12
+ MJE=.336E-00 VJE=0.750E-00 TR=10.000E-09 TF=277.01E-12
+ ITF=1.750E-00 XTF=309.38E+00 VTF=16.37E+00 PTF=0.000E+00
+ RE=0.0E+00 RB=0.00E+00

--------- Cut here for Differential2.asc ----------


Version 4
SHEET 1 1100 708

WIRE 304 -160 208 -160
WIRE 384 -160 304 -160
WIRE 464 -160 384 -160
WIRE 688 -160 464 -160


WIRE 800 -160 688 -160
WIRE 912 -160 800 -160
WIRE 1040 -160 912 -160

WIRE 384 -128 384 -160


WIRE 688 -128 688 -160
WIRE 800 -128 800 -160

WIRE 912 -128 912 -160
WIRE 304 -112 304 -160
WIRE 912 16 912 -48
WIRE 944 16 912 16
WIRE 304 32 304 -48
WIRE 384 32 384 -48
WIRE 384 32 304 32
WIRE 560 32 384 32
WIRE 592 32 560 32
WIRE 304 80 304 32


WIRE 464 80 464 -160

WIRE 912 80 912 16


WIRE 1040 80 1040 -160

WIRE 208 128 208 -160


WIRE 240 128 208 128

WIRE 560 128 560 32


WIRE 560 128 528 128

WIRE 736 128 560 128


WIRE 800 128 800 -48
WIRE 848 128 800 128
WIRE 304 192 304 176
WIRE 384 192 304 192
WIRE 464 192 464 176
WIRE 464 192 384 192

WIRE 688 208 688 -48

WIRE 688 208 624 208


WIRE 704 208 688 208
WIRE 384 224 384 192

WIRE 688 240 688 208

WIRE 512 272 496 272
WIRE 576 272 560 272
WIRE 624 272 624 208
WIRE 624 272 576 272


WIRE 912 288 912 176
WIRE 912 288 752 288
WIRE 928 288 912 288

WIRE 576 320 576 272


WIRE 912 320 912 288

WIRE 384 336 384 320
WIRE 624 336 624 272


WIRE 800 336 800 128

WIRE 384 432 384 416

WIRE 576 432 576 400
WIRE 576 432 384 432

WIRE 624 432 624 400
WIRE 624 432 576 432


WIRE 688 432 688 416

WIRE 688 432 624 432


WIRE 800 432 800 416
WIRE 800 432 688 432
WIRE 912 432 912 400
WIRE 912 432 800 432
WIRE 1040 432 1040 160
WIRE 1040 432 912 432
WIRE 1040 464 1040 432
FLAG 1040 464 0

FLAG 592 32 Vtank
IOPIN 592 32 Out


FLAG 704 208 Vagc
IOPIN 704 208 Out
FLAG 928 288 Veout
IOPIN 928 288 Out

FLAG 944 16 Vcout
IOPIN 944 16 Out


SYMBOL voltage 1040 64 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 9v

SYMBOL cap 288 -112 R0


SYMATTR InstName C2
SYMATTR Value 22pF

SYMBOL ind 368 -144 R0


SYMATTR InstName L3
SYMATTR Value 60nH
SYMBOL npn 240 80 R0
SYMATTR InstName Q1
SYMATTR Value CA3046
SYMBOL npn 528 80 M0
SYMATTR InstName Q2
SYMATTR Value CA3046

SYMBOL npn 448 224 M0


SYMATTR InstName Q3
SYMATTR Value CA3046

SYMBOL res 368 320 R0
SYMATTR InstName R2
SYMATTR Value 220R
SYMBOL diode 512 256 R90


WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0

SYMATTR InstName D2
SYMBOL res 672 -144 R0
SYMATTR InstName R5
SYMATTR Value 22k
SYMBOL npn 848 80 R0
SYMATTR InstName Q4
SYMATTR Value CA3046

SYMBOL cap 608 336 R0
SYMATTR InstName C1
SYMATTR Value 470p


SYMBOL npn 752 240 M0
SYMATTR InstName Q5
SYMATTR Value CA3046
SYMBOL res 672 320 R0
SYMATTR InstName R7

SYMATTR Value 470


SYMBOL res 896 304 R0
SYMATTR InstName R8

SYMATTR Value 220


SYMBOL res 784 -144 R0
SYMATTR InstName R4
SYMATTR Value 47k
SYMBOL cap 800 112 R90
WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0
SYMATTR InstName C3
SYMATTR Value 10p

SYMBOL diode 560 256 R90


WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0

SYMATTR InstName D1
SYMBOL res 784 320 R0
SYMATTR InstName R6
SYMATTR Value 10k

SYMBOL res 896 -144 R0
SYMATTR InstName R10
SYMATTR Value 220R
SYMBOL res 560 304 R0
SYMATTR InstName R1
SYMATTR Value 10k
TEXT 208 264 Left 0 !.tran 0 10uS 0 1nS
TEXT 200 464 Left 0 !.inc "C:\\Program Files\\LTC\\LTspiceIV\\lib\\custom\\Transistors\\ca3000.lib"

Jim Thompson

unread,
Dec 7, 2010, 5:14:51 PM12/7/10
to

[snip]

Device measures losses to the adjacent environment, by way of a
linearized AGC curve, which is then A-to-D'd.

Jim Thompson

unread,
Dec 7, 2010, 5:15:46 PM12/7/10
to
On Wed, 08 Dec 2010 01:05:29 +1100, Clifford Heath
<n...@spam.please.net> wrote:

[snip]

Should have also commented, CA3046 is stretching it to make 100MHz+

Clifford Heath

unread,
Dec 8, 2010, 5:28:35 AM12/8/10
to
Jim Thompson wrote:
> Should have also commented, CA3046 is stretching it to make 100MHz+

Yes. Funnily enough, it's less troublesome (in simulation) than my
much faster alternative, BFR93A. I guess because it isn't fast enough
to do the bad things which parasitics would allow.

Many thanks for your help and advice - I feel honoured.

Clifford Heath.

Jim Thompson

unread,
Dec 7, 2010, 7:42:31 PM12/7/10
to

Naaaah! My pleasure!

Clifford Heath

unread,
Dec 8, 2010, 6:10:19 AM12/8/10
to
Jim Thompson wrote:
> On Wed, 08 Dec 2010 21:28:35 +1100, Clifford Heath
> Naaaah! My pleasure!

I do feel that, though my last effort was good, I should be able
to do better. Even if that means changing the device. Would a
JFET produce a cleaner oscillator, in general?

Clifford Heath.

Jim Thompson

unread,
Dec 7, 2010, 8:33:02 PM12/7/10
to

Higher Q produces cleaner oscillators. And think like a child's
swing, push at the top, powerful and short. The ideal is to replace
energy lost each swing.

Joel Koltner

unread,
Dec 8, 2010, 12:21:38 PM12/8/10
to
"Jim Thompson" <To-Email-Use-Th...@On-My-Web-Site.com> wrote in
message news:bvntf61s2g3l1ceuk...@4ax.com...

> Higher Q produces cleaner oscillators. And think like a child's
> swing, push at the top, powerful and short. The ideal is to replace
> energy lost each swing.

Yabbut... isn't an oscillator whereby the active device remains in continuous
conduction less (phase) noisy than one that's only on for part of each cycle?

...that's what I've been led to believe by various RF design books I've
read...

Jim Thompson

unread,
Dec 8, 2010, 12:31:39 PM12/8/10
to

Good question. Maybe Wescott or Hobbs would have an answer.

mike742

unread,
Dec 8, 2010, 3:36:01 PM12/8/10
to
> >> Higher Q produces cleaner oscillators.  And think like a child's
> >> swing, push at the top, powerful and short.  The ideal is to replace
> >> energy lost each swing.
>
> >Yabbut... isn't an oscillator whereby the active device remains in continuous
> >conduction less (phase) noisy than one that's only on for part of each cycle?
>
> >...that's what I've been led to believe by various RF design books I've
> >read...

Newer books have a different answer.

Planar Microwave Engineering by Thomas H. Lee section 17.4 (page
582)

points out that a pulse to add power to a resonator will shift the
phase of the oscillation unless it occurs at the peak. So you will
cause AM changes, but phase changes are optional...

There is more in the book and it has the following footnotes:

A. Hajimiri and T. Lee,
"A General Theory of Phase Noise in Electrical Oscillators",
IEEE J. Solid-State Circuits, v. 33 no. 2, February 1998, pp 179-94

A. Hajimiri and T. Lee,
The Design of Low-Noise Oscillators, Kluwer, Dordrecht, 1999.

So the child swing model is good...

sk.yeahia been sayeed

unread,
Jul 25, 2014, 5:25:46 AM7/25/14
to
phase noise simulation possible with LTspice?if how?

RobertMacy

unread,
Jul 25, 2014, 9:07:51 AM7/25/14
to
On Fri, 25 Jul 2014 02:25:46 -0700, sk.yeahia been sayeed
<yeah...@gmail.com> wrote:

> phase noise simulation possible with LTspice?if how?

There is a way to combine .noise and .tran analyses into a single analysis
I call, .tranoise

The idea is to expand the models to appropriately include noise, then when
tran runs the 'effects' from all those noise sources shows up and you get
a very accurate picture of what is going on. For example, analog OpAmps
show 'fuzz' on the time line plots, the spectrum analysis shows an
accurate noise floor, when an OpAmp is driven into slew rate limit, you
can see the noise floor jump, mixers/non-linear circuitry changes the
noise, etc

Perhaps, using .tranoise to simulate an oscillator would more
realistically provide the 'starting' impetus AND once running accurately
allow you to measure phase noise. ...To refresh my memory, doesn't phase
noise cause what should be a line on the spectrum analyzer to spread
slightly creating what's called, a 'skirt' at the bottom of the spectrum
plot? Instead of a line, you get this teepee shaped output. I vaguely
remember seeing little +/-60, 120Hz lines too.






John Larkin

unread,
Jul 25, 2014, 1:53:19 PM7/25/14
to
Right. You'd have to build multiple independent time-domain noise
generators and add them to all the resistors and semiconductors and
power supplies in a time-domain sim. LT Spice doesn't include Johnson
or shot noise in a transient sim.

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

is one way to make some noise.


--

John Larkin Highland Technology, Inc

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

RobertMacy

unread,
Jul 25, 2014, 5:15:53 PM7/25/14
to
usually need the
.options plotwinsize=0

not very 'flat' rolls down about 15dB between 20 and 50Hz, should be flat
at least out to that.
was it supposed to be flat? calibrated? have 'any' known characteristic?
or, just make noise?

even going to maximum time step of over 100x smaller than the maximum
frequency [Nyquist] the noise rolls down almost 5 dB at the 'high' end. So
conclusion, yes makes noise, but not very controllable and even slowing
down your analysis won't make that noise source flat enough to count on
it, plus I see no way to include the 1/f noise in an OpAmp

and worst of all!!! put two in your circuit and they both produce the SAME
voltage!!! just like white() does.




John Larkin

unread,
Jul 25, 2014, 7:20:28 PM7/25/14
to
A narrowband FFT of a noisy time-domain circuit is going to get grim.
It's like a time-domain analysis of a high-Q crystal oscillator,
likely to result in unbearable sim times.

>
>not very 'flat' rolls down about 15dB between 20 and 50Hz, should be flat
>at least out to that.

Nyquist is 50 Hz. Most real systems are flat to, say, half of Nyquist.
This isn't bad for something this simple.

>was it supposed to be flat? calibrated? have 'any' known characteristic?
>or, just make noise?

Well, obviously, you'd have to adjust the time quantization (and max
timestep) to get wider bandwidth noise. And the RMS value can be
changed, too; want to know how?

>
>even going to maximum time step of over 100x smaller than the maximum
>frequency [Nyquist] the noise rolls down almost 5 dB at the 'high' end. So
>conclusion, yes makes noise, but not very controllable and even slowing
>down your analysis won't make that noise source flat enough to count on
>it, plus I see no way to include the 1/f noise in an OpAmp
>

Add a shaping filter. Or demand your money back.

>and worst of all!!! put two in your circuit and they both produce the SAME
>voltage!!! just like white() does.

Then change the time scalers. Change the amplitudes. Sum a few to make
things more Gaussian... there might even be a theorem about that.

Or post something better.

RobertMacy

unread,
Jul 26, 2014, 12:08:05 AM7/26/14
to
On Fri, 25 Jul 2014 16:20:28 -0700, John Larkin
<jla...@highlandtechnology.com> wrote:

> On Fri, 25 Jul 2014 14:15:53 -0700, RobertMacy
> <robert...@gmail.com> wrote:
>> ....snip...
> A narrowband FFT of a noisy time-domain circuit is going to get grim.
> It's like a time-domain analysis of a high-Q crystal oscillator,
> likely to result in unbearable sim times.

How long the simulation time runs determines the BW and how small the
maximum step determines the maximum frequency. With 10 uncorrelated true
gaussian noise sources I analyzed the analog multiplier MC1496 made out of
the CA3046 NPN's. Using BW of 100Hz BW out to 5MHz max frequency kept the
simulation times resonable on this 500MHz machine. Just have to use reason.

>> not very 'flat' rolls down about 15dB between 20 and 50Hz, should be
>> flat
>> at least out to that.
>
> Nyquist is 50 Hz. Most real systems are flat to, say, half of Nyquist.
> This isn't bad for something this simple.

Where do you get that the Nyquist is 50Hz? In your circuit it was actually
102.4Hz, I used half, at 50Hz, to give some allowance, albeit was not
enough.

>> was it supposed to be flat? calibrated? have 'any' known characteristic?
>> or, just make noise?
>
> Well, obviously, you'd have to adjust the time quantization (and max
> timestep) to get wider bandwidth noise. And the RMS value can be
> changed, too; want to know how?

That's a bit impudent, considering. Yes, for edification I do want to know
how YOU would set ten independent gaussian noise sources to represent the
contribution from ten resistors? I'm keeping it simple and not even
including a transistor. I'll even help a bit, let's set the BW to 10Hz and
the maximum frequency of interest to 100kHz.

>> ...snip...
>> it, plus I see no way to include the 1/f noise in an OpAmp
>
> Add a shaping filter. Or demand your money back.

Actually, the way I do it, it is VERY easy to add the 1/f and control what
you have.

>> and worst of all!!! put two in your circuit and they both produce the
>> SAME
>> voltage!!! just like white() does.
>
> Then change the time scalers. Change the amplitudes. Sum a few to make
> things more Gaussian... there might even be a theorem about that.

Change in some arbitrary manner? No way! Again, what I do is CALIBRATED,
so the results have value. The technique to get .tranoise is TRUE circuit
simulation where in one pass you get BOTH .noise and .tran AND any
interaction going on in the non-linear circuitry.

> Or post something better.

How? The zipped package for doing the MC1496 analysis was 35MB. If we can
get someone to build it into LTspice, it would be less than 3k, and be
text.

The resistor model is very simple, consisting of a calibrated current
noise source attached to the nodes of the resistor. As a result, the
technique does not even increase the node count in the circuit. Anybody
who has worked with PSpice knows the advantage of keeping node count low.
Plus, the model does NOT get in the way of the normal .ac or .noise
analysis.

Also, the technique provides flat noise spectrums out to the Nyquist rate.

If ten is too difficult, look forward to seeing how you propose to doing
two resistor noise models.

John Larkin

unread,
Jul 26, 2014, 2:00:49 AM7/26/14
to
On Fri, 25 Jul 2014 21:08:05 -0700, RobertMacy <robert...@gmail.com> wrote:

>On Fri, 25 Jul 2014 16:20:28 -0700, John Larkin
><jla...@highlandtechnology.com> wrote:
>
>> On Fri, 25 Jul 2014 14:15:53 -0700, RobertMacy
>> <robert...@gmail.com> wrote:
>>> ....snip...
>> A narrowband FFT of a noisy time-domain circuit is going to get grim.
>> It's like a time-domain analysis of a high-Q crystal oscillator,
>> likely to result in unbearable sim times.
>
>How long the simulation time runs determines the BW and how small the
>maximum step determines the maximum frequency. With 10 uncorrelated true
>gaussian noise sources I analyzed the analog multiplier MC1496 made out of
>the CA3046 NPN's. Using BW of 100Hz BW out to 5MHz max frequency kept the
>simulation times resonable on this 500MHz machine. Just have to use reason.
>
>>> not very 'flat' rolls down about 15dB between 20 and 50Hz, should be
>>> flat
>>> at least out to that.
>>
>> Nyquist is 50 Hz. Most real systems are flat to, say, half of Nyquist.
>> This isn't bad for something this simple.
>
>Where do you get that the Nyquist is 50Hz? In your circuit it was actually
>102.4Hz, I used half, at 50Hz, to give some allowance, albeit was not
>enough.

100 samples per second, 50 Hz Nyquist.

>
>>> was it supposed to be flat? calibrated? have 'any' known characteristic?
>>> or, just make noise?
>>
>> Well, obviously, you'd have to adjust the time quantization (and max
>> timestep) to get wider bandwidth noise. And the RMS value can be
>> changed, too; want to know how?
>
>That's a bit impudent, considering. Yes, for edification I do want to know
>how YOU would set ten independent gaussian noise sources to represent the
>contribution from ten resistors? I'm keeping it simple and not even
>including a transistor. I'll even help a bit, let's set the BW to 10Hz and
>the maximum frequency of interest to 100kHz.

BW of what is 10 Hz?


>
>>> ...snip...
>>> it, plus I see no way to include the 1/f noise in an OpAmp
>>
>> Add a shaping filter. Or demand your money back.
>
>Actually, the way I do it, it is VERY easy to add the 1/f and control what
>you have.

Well, how do you do it? Post an LT Spice circuit.


>
>>> and worst of all!!! put two in your circuit and they both produce the
>>> SAME
>>> voltage!!! just like white() does.
>>
>> Then change the time scalers. Change the amplitudes. Sum a few to make
>> things more Gaussian... there might even be a theorem about that.
>
>Change in some arbitrary manner? No way! Again, what I do is CALIBRATED,
>so the results have value. The technique to get .tranoise is TRUE circuit
>simulation where in one pass you get BOTH .noise and .tran AND any
>interaction going on in the non-linear circuitry.
>
>> Or post something better.
>
>How? The zipped package for doing the MC1496 analysis was 35MB. If we can
>get someone to build it into LTspice, it would be less than 3k, and be
>text.

Blather.


--

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

Precision electronic instrumentation

RobertMacy

unread,
Jul 26, 2014, 4:44:18 PM7/26/14
to
On Fri, 25 Jul 2014 23:00:49 -0700, John Larkin
<jjla...@highnotlandthistechnologypart.com> wrote:

> On Fri, 25 Jul 2014 21:08:05 -0700, RobertMacy <robert...@gmail.com>
> wrote:
>>> ....snip....
>> Where do you get that the Nyquist is 50Hz? In your circuit it
>> was actually 102.4Hz, I used half, at 50Hz, to give some
>> allowance, albeit was not enough.
>
> 100 samples per second, 50 Hz Nyquist.

Yes, 100 samples per second does yield 50Hz Nyquist, but a formula should
use values based upon some type of reality. LTspice's ACTUAL sampling rate
is related to the maximum step size set in the .tran command. Which by
default is 1000 steps. By setting the argument in the random function to
(100*time); you have forced the 'effective' useable rate to be much less,
only due to the resulting 'flatness' of your noise source.

You did NOT match the use of your random function to the use of the
sampling rate. Threw away a lot of capability. Setting the random function
to (100*time) only causes the function to change at 100Hz rate, BUT the
random function is smoothed. Since random is smoothed, it's VERY difficult
to get the noise spectrum flat, in this case, still not flat even over the
very small range between 200mHz to 25Hz. Plus, the noise characteristic
doesn't even 'look' right. White noise is more 'spikey'. For example, a 1
Vrms white noise source will actually have, every now and then, 6 Volts
pop out of it, where as that random function will ALWAYS be within +/-0.5
volts and NEVER be outside that range.

>> Yes, for edification I do want to know how YOU would set ten
>> independent gaussian noise sources to represent the contribution
>> from ten resistors? I'm keeping it simple and not even including
>> a transistor. I'll even help a bit, let's set the BW to 10Hz and
>> the maximum frequency of interest to 100kHz.
>
> BW of what is 10 Hz?

The Bandwidth is set by the run length. The Nyquist rate is related to the
maximum time step. Therefore, the following gets you BW of 10Hz and
Nyquist rate of 100kHz:
.tran 0 100m 0 5u

>> ...snip...
> Well, how do you do it? Post an LT Spice circuit.

I do it in the spectral domain, multiply a noise spectrum by
1/sqrt(frequency) then convert back to the time domain and use those
values. Creates noise that plots with the 1/f shape and obviously looks
correct with that meandering characteristic one sees at the output of an
OpAmp.

>> ...snip...
>> How? The zipped package for doing the MC1496 analysis was 35MB. If we
>> can
>> get someone to build it into LTspice, it would be less than 3k, and be
>> text.
>
> Blather.

No, statement of fact.

.
.
.
Have you yet figured out how to make the two noise sources using random()?

John Larkin

unread,
Jul 26, 2014, 5:34:46 PM7/26/14
to
On Sat, 26 Jul 2014 13:44:18 -0700, RobertMacy <robert...@gmail.com> wrote:

>On Fri, 25 Jul 2014 23:00:49 -0700, John Larkin
><jjla...@highnotlandthistechnologypart.com> wrote:
>
>> On Fri, 25 Jul 2014 21:08:05 -0700, RobertMacy <robert...@gmail.com>
>> wrote:
>>>> ....snip....
>>> Where do you get that the Nyquist is 50Hz? In your circuit it
>>> was actually 102.4Hz, I used half, at 50Hz, to give some
>>> allowance, albeit was not enough.
>>
>> 100 samples per second, 50 Hz Nyquist.
>
>Yes, 100 samples per second does yield 50Hz Nyquist, but a formula should
>use values based upon some type of reality.

What number is more "real" than 50? 50 is a perfectly respectable number.

LTspice's ACTUAL sampling rate
>is related to the maximum step size set in the .tran command. Which by
>default is 1000 steps. By setting the argument in the random function to
>(100*time); you have forced the 'effective' useable rate to be much less,
>only due to the resulting 'flatness' of your noise source.

Sure. Why not? If you don't like the sample rate in my example, change it. It's
there in plain sight. I did the demo for visibility.

>
>You did NOT match the use of your random function to the use of the
>sampling rate. Threw away a lot of capability. Setting the random function
>to (100*time) only causes the function to change at 100Hz rate, BUT the
>random function is smoothed. Since random is smoothed, it's VERY difficult
>to get the noise spectrum flat, in this case, still not flat even over the
>very small range between 200mHz to 25Hz.

Of course it isn't flat. It's noise. Look at real wideband noise on a spectrum
analyzer some time. It's noisy!


Plus, the noise characteristic
>doesn't even 'look' right. White noise is more 'spikey'. For example, a 1
>Vrms white noise source will actually have, every now and then, 6 Volts
>pop out of it, where as that random function will ALWAYS be within +/-0.5
>volts and NEVER be outside that range.


The single Random(time) call obviously has a uniform probability distribution.
EE101. If you want it to be more Gaussian, sum a few of them. Statistics101.

The extreme example of a non-Gaussian PDF is a TTL serial data stream,
specifically the output of a pseudo-random shift register. That can be turned
into nearly perfect bandlimited white noise with a simple RC lowpass filter; see
AoE for details. Similarly, a lowpass filter is another, simple way to improve
the statistics of random(time), and fix your complaint about the rolloff shape.

I was looking for a simple way to graph probability density functions in LT
Spice. Some other time maybe.

>
>>> Yes, for edification I do want to know how YOU would set ten
>>> independent gaussian noise sources to represent the contribution
>>> from ten resistors? I'm keeping it simple and not even including
>>> a transistor. I'll even help a bit, let's set the BW to 10Hz and
>>> the maximum frequency of interest to 100kHz.
>>
>> BW of what is 10 Hz?
>
>The Bandwidth is set by the run length. The Nyquist rate is related to the
>maximum time step. Therefore, the following gets you BW of 10Hz and
>Nyquist rate of 100kHz:
>.tran 0 100m 0 5u

The random(K*TIME) function changes K times per second regardless of the LT
Spice time step. So going to smaller time steps doesn't change the spectrum. See
example below where K=1.

>
>>> ...snip...
>> Well, how do you do it? Post an LT Spice circuit.
>
>I do it in the spectral domain, multiply a noise spectrum by
>1/sqrt(frequency) then convert back to the time domain and use those
>values. Creates noise that plots with the 1/f shape and obviously looks
>correct with that meandering characteristic one sees at the output of an
>OpAmp.

Post an LT Spice demo.

>
>>> ...snip...
>>> How? The zipped package for doing the MC1496 analysis was 35MB. If we
>>> can
>>> get someone to build it into LTspice, it would be less than 3k, and be
>>> text.
>>
>> Blather.
>
>No, statement of fact.

You've done nothing but whine, and present a Thompson-Fermat claim of a
marvelous solution that you don't have room to post.

If you want to discuss things, great. If you want to whine and bitch, you should
try to be right.


>
>.
>.
>.
>Have you yet figured out how to make the two noise sources using random()?

I can make any number of them. Of arbitrary bandwidth and amplitude, and as
Gaussian as you like. This ain't hard.

Below is a set of examples, which I did for future reference.

The product XC, and its lowpass filtered version XCLP, are fun. The N1 and N2
sources start identical, and take one second to drift out of correlation.

I think the 3.94 values (to make 1 volt RMS) should actually be 3.464, the
square root of 12, but maybe the LT Spice smoothing changes the statistics or
something.


Version 4
SHEET 1 1268 680
WIRE -352 -272 -432 -272
WIRE -272 -272 -352 -272
WIRE 112 -272 -16 -272
WIRE 176 -272 112 -272
WIRE 624 -272 576 -272
WIRE 656 -272 624 -272
WIRE 880 -272 736 -272
WIRE 976 -272 880 -272
WIRE 1040 -272 976 -272
WIRE -432 -240 -432 -272
WIRE -16 -240 -16 -272
WIRE 576 -192 576 -272
WIRE 880 -192 880 -272
WIRE -432 -128 -432 -160
WIRE -16 -128 -16 -160
WIRE 576 -48 576 -112
WIRE 880 -48 880 -128
WIRE -352 112 -432 112
WIRE -272 112 -352 112
WIRE 112 112 -16 112
WIRE 176 112 112 112
WIRE 608 112 576 112
WIRE 656 112 608 112
WIRE 880 112 736 112
WIRE 976 112 880 112
WIRE 1040 112 976 112
WIRE -432 144 -432 112
WIRE -16 144 -16 112
WIRE 880 192 880 112
WIRE -432 256 -432 224
WIRE -16 256 -16 224
WIRE 880 336 880 256
WIRE -320 448 -432 448
WIRE -112 448 -240 448
WIRE 96 448 -32 448
WIRE 288 448 176 448
WIRE 464 448 368 448
WIRE 656 448 544 448
WIRE 720 448 656 448
WIRE 880 448 800 448
WIRE 944 448 880 448
WIRE 1024 448 944 448
WIRE -432 496 -432 448
WIRE 880 496 880 448
WIRE 880 608 880 560
FLAG -16 256 0
FLAG 112 112 N1
FLAG -16 -128 0
FLAG 112 -272 N2
FLAG 576 -48 0
FLAG 880 -48 0
FLAG 880 336 0
FLAG 608 112 N1
FLAG 976 -272 XCLP
FLAG 976 112 N1LP
FLAG 624 -272 XC
FLAG -432 -128 0
FLAG -352 -272 T
FLAG -432 256 0
FLAG -352 112 R
FLAG 880 608 0
FLAG 656 448 SUM
FLAG 944 448 SLP
FLAG -432 496 0
SYMBOL bv -16 128 R0
WINDOW 0 97 46 Left 2
WINDOW 3 51 95 Left 2
SYMATTR InstName B1
SYMATTR Value V= 3.94 * ( random(100*time) - 0.5 )
SYMBOL bv -16 -256 R0
WINDOW 0 84 55 Left 2
WINDOW 3 50 100 Left 2
SYMATTR InstName B2
SYMATTR Value V= 3.94 * ( random(101*time) - 0.5 )
SYMBOL bv 576 -208 R0
WINDOW 0 52 78 Left 2
WINDOW 3 27 130 Left 2
SYMATTR InstName B3
SYMATTR Value V= V(N1) * V(N2)
SYMBOL res 752 -288 R90
WINDOW 0 74 54 VBottom 2
WINDOW 3 79 54 VTop 2
SYMATTR InstName R3
SYMATTR Value 1
SYMBOL cap 864 -192 R0
WINDOW 0 83 16 Left 2
WINDOW 3 77 55 Left 2
SYMATTR InstName C1
SYMATTR Value 0.16
SYMBOL res 752 96 R90
WINDOW 0 75 54 VBottom 2
WINDOW 3 85 56 VTop 2
SYMATTR InstName R4
SYMATTR Value 1
SYMBOL cap 864 192 R0
WINDOW 0 75 21 Left 2
WINDOW 3 69 58 Left 2
SYMATTR InstName C2
SYMATTR Value 0.16
SYMBOL bv -432 -256 R0
WINDOW 0 86 44 Left 2
WINDOW 3 58 85 Left 2
SYMATTR InstName B4
SYMATTR Value V=TIME
SYMBOL bv -432 128 R0
WINDOW 0 89 50 Left 2
WINDOW 3 47 91 Left 2
SYMATTR InstName B5
SYMATTR Value V=random(TIME)
SYMBOL bv -224 448 R90
WINDOW 0 71 59 VBottom 2
WINDOW 3 80 58 VTop 2
SYMATTR InstName B6
SYMATTR Value V=random(721*time) - 0.5
SYMBOL bv -16 448 R90
WINDOW 0 71 59 VBottom 2
WINDOW 3 142 62 VTop 2
SYMATTR InstName B7
SYMATTR Value V=random(420*time) - 0.5
SYMBOL bv 192 448 R90
WINDOW 0 71 59 VBottom 2
WINDOW 3 89 58 VTop 2
SYMATTR InstName B8
SYMATTR Value V=random(1234*time) - 0.5
SYMBOL bv 384 448 R90
WINDOW 0 71 59 VBottom 2
WINDOW 3 141 49 VTop 2
SYMATTR InstName B9
SYMATTR Value V=random(555*time) - 0.5
SYMBOL res 816 432 R90
WINDOW 0 76 55 VBottom 2
WINDOW 3 81 55 VTop 2
SYMATTR InstName R5
SYMATTR Value 1
SYMBOL cap 864 496 R0
WINDOW 0 86 16 Left 2
WINDOW 3 82 55 Left 2
SYMATTR InstName C3
SYMATTR Value 0.016
SYMBOL bv 560 448 R90
WINDOW 0 71 59 VBottom 2
WINDOW 3 87 45 VTop 2
SYMATTR InstName B10
SYMATTR Value V=random(1690*time) - 0.5
TEXT 184 -368 Left 2 !.tran 0 10 0 100u
TEXT -8 -416 Left 2 ;Some time-domain noise sources J Larkin July 26, 2014

RobertMacy

unread,
Jul 27, 2014, 10:23:54 PM7/27/14
to
On Sat, 26 Jul 2014 14:34:46 -0700, John Larkin
<jjla...@highnotlandthistechnologypart.com> wrote:

>> ...snip...
> What number is more "real" than 50? 50 is a perfectly respectable number.

You missed the whole point. Now THAT comment is blather.

>> ...snip....
> Of course it isn't flat. It's noise. Look at real wideband noise on a
> spectrum
> analyzer some time. It's noisy!

You missed the whole point again.

>> ...snip..
> The single Random(time) call obviously has a uniform probability
> distribution.
> EE101. If you want it to be more Gaussian, sum a few of them.
> Statistics101.

Only works *IF* you sum a few INDEPENDENT noise sources! As you found out
later by having to use the K multiplying factor to try to change the
function's coherency.

>> ...snip...
> the statistics of random(time), and fix your complaint about the rolloff
> shape.

Where do you assume complaint?! That was an observation, albeit an
observation that makes it less desirable to use that function, but still
an observation. Very importantly, take a look at trying to actually use
that function as a 'calibrated' noise source. To actually use any noise
source it must be calibrated in terms of resistor value AND BW! With your
example, you'll be 'adjusting' every noise source to get each to produce
the 'correct' value.

> I was looking for a simple way to graph probability density functions in
> LTSpice. Some other time maybe.

When I plotted the probability density function for your multisource
technique, and looked at its distribution, it only took about four of the
uniform distributions to get a 'decent' gaussian shape, interesting.
Didn't know so few could go so far.

>> ..snip...
> The random(K*TIME) function changes K times per second regardless of the
> LT
> Spice time step. So going to smaller time steps doesn't change the
> spectrum. See
> example below where K=1.

Not quite correct. By making the K factor small, you've caused the random
function's K value to dominate, so LTspice .tran maximum steps ultimately
have no effect. However, the true LIMITING maximum frequency is set by
.tran's maximum step. The 'useable' frequency range can only be set to a
frequency smaller than that.

>> ...snip....
> You've done nothing but whine, and present a Thompson-Fermat claim of a
> marvelous solution that you don't have room to post.
>
> If you want to discuss things, great. If you want to whine and bitch,
> you should
> try to be right.

Discussing is not whining and bitching. Note three times you missed the
point and regarding a simple, easy to verify statement you are wrong, yet
I've never stooped to calling you an idiot. Instead, I continue to
discuss, and again, ask you for your example TWO calibrated noise sources.
You still haven't produced them, although purport how 'simple' it is to do.

>> ...snip....
> I can make any number of them. Of arbitrary bandwidth and amplitude, and
> as
> Gaussian as you like. This ain't hard.
>
> ....SNIP... description of schematic....
> I think the 3.94 values (to make 1 volt RMS) should actually be 3.464,
> the
> square root of 12, but maybe the LT Spice smoothing changes the
> statistics or
> something.

"...ain't hard"? Then where are your two calibrated noise sources?

With your questioning sqrt(12), there's hope! yes, LTspice changes things
a bit. It 'smooths' the function, which doesn't change the statistics [or
may be semantics] but changes the spectral content by rolling off the high
frequency end.

How valuable is a noise source that you must wait for 1 second?! and then
there's a beat in there? [Look closely at your low pass output 'noise'
signal.] Interesting statistics. Did you ever analyze the statistics of
these 'added' noise sources to determine how many of these noise sources
you must add together to reach a specific level of confidence? Hold it!
don't assume uncorrelated noise sources either, because the random
function is replicated. You only get some type of non-correlation [as you
found out] by varying the K multiplier term in the argument.

In review:
1. You still haven't produced your claimed simple noise sources. So far,
you've made a lot of symbols on a schematic. [Note, I recommend using use
multiple current sources, not voltage sources, else you unnecessarily
increase the number of nodes in the kernel's analyses.] Although a bit
uncontrollable, using random() is an interesting approach. [In other
words, so far your solution does NOT meet requirements.]
2. You chide me by saying I'm whining and bitching [no idea where THAT'S
coming from] rather than respond to legitimate attempt to discuss.
3. You actually declare I'm wrong without supporting that claim. When YOUR
claim(s) is/are wrong.
4. And STILL you have not produced two simple CALIBRATED noise sources.
Which you declared several times as an easy task.

So summarizing: wrong, name calling, wrong, didn't produce.



Again, since using Aioe for access to these usenet groups, I'm limited by
number of quote lines AND number of reply lines. It is NOT possible to
quote completely, nor possible to post very long copies of a program. I
even have to reply to this post to include the example of trying to
calibrate your proposed multi-source noise source.


NOTE: If any lurkers out there are interested, let me know. I'll see if
there's a way to post somewhere a complete description of the basics, of
the 'gotcha's', the step by steps, and a set of small programs that can be
used on free PC tools to do this. Of course, up front, I say tremendous
thanks to Alex Bordodynov for his excellent help in
streamlining/automating the technique.

RobertMacy

unread,
Jul 27, 2014, 10:26:57 PM7/27/14
to
here is the LTspice schematic showing the diffiuclty at 'calibrating' your
noise source.

Version 4
SHEET 1 27404 860
WIRE 1984 -336 1808 -336
WIRE 2096 -336 1984 -336
WIRE 2128 -336 2096 -336
WIRE 1808 -304 1808 -336
WIRE 1984 -304 1984 -336
WIRE 1808 -192 1808 -224
WIRE 1984 -192 1984 -224
FLAG 1984 -192 0
FLAG 1808 -192 0
FLAG 2096 -336 noise
SYMBOL res 1968 -320 R0
SYMATTR InstName R1
SYMATTR Value 1
SYMBOL bv 1808 -320 R0
WINDOW 0 -67 10 Left 2
WINDOW 3 -414 168 Left 2
SYMATTR InstName B1
SYMATTR Value V=(random(100*time)-0.5)/0.20353/1.134/0.98523
TEXT 1448 -272 Left 2 !.tran 5
TEXT 1448 -336 Left 2 !.options plotwinsize=0;\n.param fmax=50
TEXT 2256 -312 Left 2 ;Why does it take three attempts to find the
constant to make this 1Vrms?\nV=random(100*time)-0.5 produces
203.53mVrms\nV=(random(100*time)-0.5)/0.20353 produces
1.134Vrms\nV=(random(100*time)-0.5)/0.20353/1.134 produces
985.23mVrms\nV=(random(100*time)-0.5)/0.20353/1.134/0.98523 produces
1.0005Vrms\nnote: k=4.3977, not the expected sqrt(12)=3.4641, odd.
TEXT 1704 -408 Left 3 ;Uncontrollable Aspects of Using Random Function as
a Noise Source



oops, guess it wasn't that long!

John Larkin

unread,
Jul 27, 2014, 11:20:10 PM7/27/14
to
On Sun, 27 Jul 2014 19:23:54 -0700, RobertMacy <robert...@gmail.com> wrote:

>On Sat, 26 Jul 2014 14:34:46 -0700, John Larkin
><jjla...@highnotlandthistechnologypart.com> wrote:
>
>>> ...snip...
>> What number is more "real" than 50? 50 is a perfectly respectable number.
>
>You missed the whole point. Now THAT comment is blather.
>
>>> ...snip....
>> Of course it isn't flat. It's noise. Look at real wideband noise on a
>> spectrum
>> analyzer some time. It's noisy!
>
>You missed the whole point again.
>
>>> ...snip..
>> The single Random(time) call obviously has a uniform probability
>> distribution.
>> EE101. If you want it to be more Gaussian, sum a few of them.
>> Statistics101.
>
>Only works *IF* you sum a few INDEPENDENT noise sources! As you found out
>later by having to use the K multiplying factor to try to change the
>function's coherency.

I didn't find that out "later". I've known that for decades. And changing the K
factor does deconhere the sources. Throw in some sines or something if you want,
but I don't think they are necessary.

>
>>> ...snip...
>> the statistics of random(time), and fix your complaint about the rolloff
>> shape.
>
>Where do you assume complaint?! That was an observation, albeit an
>observation that makes it less desirable to use that function, but still
>an observation. Very importantly, take a look at trying to actually use
>that function as a 'calibrated' noise source. To actually use any noise
>source it must be calibrated in terms of resistor value AND BW! With your
>example, you'll be 'adjusting' every noise source to get each to produce
>the 'correct' value.

What's wrong with that? If you used a zener diode noise source, you'd have a
trimpot or something to adjust the RMS noise voltage.

>
>> I was looking for a simple way to graph probability density functions in
>> LTSpice. Some other time maybe.
>
>When I plotted the probability density function for your multisource
>technique, and looked at its distribution, it only took about four of the
>uniform distributions to get a 'decent' gaussian shape, interesting.
>Didn't know so few could go so far.

The crest factor for a single source is already over 2. Four sources gets you to
4, which is OK.

>
>>> ..snip...
>> The random(K*TIME) function changes K times per second regardless of the
>> LT
>> Spice time step. So going to smaller time steps doesn't change the
>> spectrum. See
>> example below where K=1.
>
>Not quite correct. By making the K factor small, you've caused the random
>function's K value to dominate, so LTspice .tran maximum steps ultimately
>have no effect. However, the true LIMITING maximum frequency is set by
>.tran's maximum step. The 'useable' frequency range can only be set to a
>frequency smaller than that.

LT Spice smooths the steps (and I don't know how he manages to do that) so the
spectrum rolls off well below Nyquist. So, tune the K values and filter the
output until it makes the noise you want.

>
>>> ...snip....
>> You've done nothing but whine, and present a Thompson-Fermat claim of a
>> marvelous solution that you don't have room to post.
>>
>> If you want to discuss things, great. If you want to whine and bitch,
>> you should
>> try to be right.
>
>Discussing is not whining and bitching. Note three times you missed the
>point and regarding a simple, easy to verify statement you are wrong, yet
>I've never stooped to calling you an idiot. Instead, I continue to
>discuss, and again, ask you for your example TWO calibrated noise sources.
>You still haven't produced them, although purport how 'simple' it is to do.

N1 is a calibrated (1 volt RMS) noise source. N2 is an identical but
uncorrelated source. My sum thing is a pretty Gaussian source. You should be
able to copy/paste the Gaussian source, select some different K values, and get
a second, independent Gaussian source. Scaling the RMS voltage is easy too.
Surely you don't need help doing any of that.


>
>>> ...snip....
>> I can make any number of them. Of arbitrary bandwidth and amplitude, and
>> as
>> Gaussian as you like. This ain't hard.
>>
>> ....SNIP... description of schematic....
>> I think the 3.94 values (to make 1 volt RMS) should actually be 3.464,
>> the
>> square root of 12, but maybe the LT Spice smoothing changes the
>> statistics or
>> something.
>
>"...ain't hard"? Then where are your two calibrated noise sources?

N1. N2.


>
>With your questioning sqrt(12), there's hope! yes, LTspice changes things
>a bit. It 'smooths' the function, which doesn't change the statistics [or
>may be semantics] but changes the spectral content by rolling off the high
>frequency end.
>
>How valuable is a noise source that you must wait for 1 second?!

There's no need to wait any time. I purposely selected K values of 100 and 101
to demonstrate 1 second decoherence, just for fun.


and then
>there's a beat in there? [Look closely at your low pass output 'noise'
>signal.] Interesting statistics. Did you ever analyze the statistics of
>these 'added' noise sources to determine how many of these noise sources
>you must add together to reach a specific level of confidence? Hold it!
>don't assume uncorrelated noise sources either, because the random
>function is replicated. You only get some type of non-correlation [as you
>found out] by varying the K multiplier term in the argument.

All obvious. And we're simulating noisy analog circuits, not generating crypto
keys for the NSA.




>
>In review:
>1. You still haven't produced your claimed simple noise sources. So far,
>you've made a lot of symbols on a schematic. [Note, I recommend using use
>multiple current sources, not voltage sources, else you unnecessarily
>increase the number of nodes in the kernel's analyses.] Although a bit
>uncontrollable, using random() is an interesting approach. [In other
>words, so far your solution does NOT meet requirements.]
>2. You chide me by saying I'm whining and bitching [no idea where THAT'S
>coming from] rather than respond to legitimate attempt to discuss.
>3. You actually declare I'm wrong without supporting that claim. When YOUR
>claim(s) is/are wrong.
>4. And STILL you have not produced two simple CALIBRATED noise sources.
>Which you declared several times as an easy task.

N1. N2.

>
>So summarizing: wrong, name calling, wrong, didn't produce.
>
>
>
>Again, since using Aioe for access to these usenet groups, I'm limited by
>number of quote lines AND number of reply lines. It is NOT possible to
>quote completely, nor possible to post very long copies of a program. I
>even have to reply to this post to include the example of trying to
>calibrate your proposed multi-source noise source.

Filter it to the desired spectral shape and bandwidth. Then measure the RMS
voltage and scale to whatever you need. I can't believe that I have to explain
stuff this simple.

>
>
>NOTE: If any lurkers out there are interested, let me know. I'll see if
>there's a way to post somewhere a complete description of the basics, of
>the 'gotcha's', the step by steps, and a set of small programs that can be
>used on free PC tools to do this. Of course, up front, I say tremendous
>thanks to Alex Bordodynov for his excellent help in
>streamlining/automating the technique.

John Larkin

unread,
Jul 27, 2014, 11:48:16 PM7/27/14
to
The problem here is that, with only one simple function on the screen, LT Spice
uses huge time steps and gets the RMS value wrong. LT Spice is quirky that way.
I wish it allowed me to specify the exact, invariant time step; that would help
with a number of issues.

Try setting the max time step to 10u or 100u. Then things scale sensibly. The
correct RMS value of 'noise', unscaled, seems to be 251.1 mV.

Phil Hobbs

unread,
Jul 28, 2014, 10:58:07 AM7/28/14
to
You can also use a Box-Mueller transform to get independent Gaussian
noise sources (see below).


There are some odd FFT effects. If you run it for 8 seconds with
.options plotwinsize=0, the vanilla trapezoid method, the default time
stepping behaviour, and the longest available FFT, you get right around
-40 dBV out to about 1 kHz, at which point it drops to about -48 dBV.
If you run it for a bit over two seconds with all compression turned
off, the FFT starts out at about -24 dBV and drops to about -45 dBV
between 300 Hz and 3 kHz.

Finer details are hard to recognize, because in an FFT of noise, the
variance equals the mean unless you average scans or do frequency binning.

Some extra work will be required to get this method to be a reliable
noise source for transient analysis. Of course a variable-stepsize
simulation will require that the data be resampled before it can do an
FFT, so it's unclear whether the artifacts are coming from the transient
simulation or the transform calculation.

I also still doubt very much whether op amp macromodels are going to do
the right thing when they go nonlinear.

Cheers

Phil Hobbs

Version 4
SHEET 1 1656 900
WIRE -224 192 -256 192
WIRE -224 208 -224 192
WIRE 144 304 128 304
WIRE 384 304 368 304
WIRE -224 320 -224 288
WIRE 128 352 128 304
WIRE 368 352 368 304
WIRE -240 400 -256 400
WIRE -240 416 -240 400
WIRE 128 464 128 432
WIRE 368 464 368 432
WIRE -240 512 -240 496
FLAG 128 464 0
FLAG 144 304 n1
FLAG 368 464 0
FLAG 384 304 n2
FLAG -240 512 0
FLAG -224 320 0
FLAG -256 400 gn1
FLAG -256 192 gn2
SYMBOL bv 128 336 R0
SYMATTR InstName B2
SYMATTR Value V=rand(50000*time)
SYMBOL bv 368 336 R0
SYMATTR InstName B1
SYMATTR Value V=rand(50000*time-20000)
SYMBOL bv -240 400 R0
SYMATTR InstName B3
SYMATTR Value V=sqrt(-2*ln(v(n2)))*cos(2*pi*v(n1))
SYMBOL bv -224 192 R0
WINDOW 3 60 49 Left 2
SYMATTR InstName B4
SYMATTR Value V=sqrt(-2*ln(v(n2)))*sin(2*pi*v(n1))
TEXT 208 368 Left 2 !.tran 8m




--
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

RobertMacy

unread,
Jul 28, 2014, 11:17:19 AM7/28/14
to
On Mon, 28 Jul 2014 07:58:07 -0700, Phil Hobbs <ho...@electrooptical.net>
wrote:

>> ...snip...
> I also still doubt very much whether op amp macromodels are going to do
> the right thing when they go nonlinear.
>
> Cheers
>
> Phil Hobbs
> ...snip....

Thanks for jumping in, Phil.

That is ABSOLUTELY true!!!

Using simple minded pair of input current noise sources and a single input
voltage noise source only work within approximately 1/2 the CLOSED loop
bandwidth for obvious reasons. AND, they don't work if the OpAmp pops out
of linear behaviour, again for obvious reasons. However still interesting
if you're designing a receiver, or pre-amp.

Jim Thompson's OpAmp model with resistor and transistor noise sources
stuck in into a few judicious places does seem to get much closer to
simulating over much wider conditions, like out of bandwidth and into slew
rate limit. So as usual, complexity versus accuracy is the trade off.

Phil Hobbs

unread,
Jul 28, 2014, 11:58:57 AM7/28/14
to
It turns out that the default behaviour is pretty sensible if you pick
the right parameters. Using the vanilla trapezoid with maxstep = 1u and
all compression turned off, a transient of 2.097152 s (2**22 data points
at maximum time resolution) comes out with a pretty flat spectrum that
looks pretty much exactly as you'd expect.

1 VRMS with a 50 kHz bandwidth is -47 dBV/Hz, which (by eyeball
accuracy) is what you actually get. The random staircase function shows
the expected sinc function rolloff with a first null at 50 kHz.

So it looks like there is no major impediment to using this method, as
long as you keep Mike from getting too clever on you. ;)

Cheers

Phil Hobbs

John Larkin

unread,
Jul 28, 2014, 12:01:45 PM7/28/14
to
rand(time) and random(time) do make different spectra (expected) and different
RMS values (unexpected?) because of the soft transitions of 'random.' I can't
imagine what might be the algorithm for those transitions.

Phil Hobbs

unread,
Jul 28, 2014, 12:08:49 PM7/28/14
to
Probably tanh() or atan(). Mike uses atan() for his soft switches.

Cheers

Phil Hobbs

Kevin Aylward

unread,
Jul 28, 2014, 12:43:02 PM7/28/14
to
"RobertMacy" wrote in message news:op.xjk63sru2cx0wh@ajm...


>>> and worst of all!!! put two in your circuit and they both produce the
>>> SAME
>>> voltage!!! just like white() does.
>
>> Then change the time scalers. Change the amplitudes. Sum a few to make
>> things more Gaussian... there might even be a theorem about that.

>Change in some arbitrary manner? No way! Again, what I do is CALIBRATED,
>so the results have value. The technique to get .tranoise is TRUE circuit
>simulation where in one pass you get BOTH .noise and .tran

I would guess that you could also figure out how in just one pass, I get
SuperSpice to figure out the values of all the resisters and mosfet sizes to
achieve a a specified set of voltages and currents. Standard optimisers
iterate out the results.

http://www.anasoft.co.uk/devicedesigner.htm

Kevin Aylward
www.kevinaylward.co.uk
www.anasoft.co.uk - SuperSpice

John Larkin

unread,
Jul 28, 2014, 12:47:15 PM7/28/14
to
If I do random(time), the transition shape is independent of the sim dt. If I do
random(99*time) the shape is scaled in time but looks the same. So random() is
aware of the '99'. Somehow. Maybe it remembers the time of the previous
invocation.

Mike must have all sorts of tricks in there.

Jim Thompson

unread,
Jul 28, 2014, 1:05:27 PM7/28/14
to
On Mon, 28 Jul 2014 12:08:49 -0400, Phil Hobbs
<ho...@electrooptical.net> wrote:

[snip]

>>
>> rand(time) and random(time) do make different spectra (expected) and different
>> RMS values (unexpected?) because of the soft transitions of 'random.' I can't
>> imagine what might be the algorithm for those transitions.
>>
>>
>Probably tanh() or atan(). Mike uses atan() for his soft switches.
>
>Cheers
>
>Phil Hobbs

I use TANH for my switches... G-sources, switching from low to high
conductance... works quite nicely with no convergence issues.

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |

Phil Hobbs

unread,
Jul 28, 2014, 1:23:53 PM7/28/14
to
Well, he probably has a list of the samples and just uses the equivalent
of a spline to get the smooth edges. Not too hard to code. Also the
transitions are a small fraction of the width of the stair steps, so
they won't cause problems as long as you're well below the Nyquist limit
of the sampled staircase. (You can see the sinc function lobes in the FFT.)

rand(time) is a random staircase with a sample period of 1 second and
smoothish transitions. I used rand(50000*time) and
rand(50000*time+20000) as independent noise sources, which they are if
there's nothing in the system with a memory longer than 0.4 seconds.

Looks like it works fine with no funnies, as long as you turn off the
excess Mike cleverness and use a long enough FFT. Good medicine--I'll
have to try it sometime.

It would be useful if there were a way to frequency-bin the FFT--a 2
million sample FFT with a 1000-pixel wide graph should be able to be
averaged X1000, which would make the relative uncertainty

delta_H = 10*log(1+sqrt(1000)) ~ 0.15 dB.

That would make much nicer plots, for sure.

RobertMacy

unread,
Jul 28, 2014, 6:41:08 PM7/28/14
to
On Sun, 27 Jul 2014 20:20:10 -0700, John Larkin
<jjla...@highnotlandthistechnologypart.com> wrote:

>> ....snip...
>> "...ain't hard"? Then where are your two calibrated noise sources?
>
> N1. N2.
>

no, those two are not very incoherent

V(N1) and V(N2) both have 1 Vrms, but

V(N2,N1), which has a 1 Vrms also, has a different spectral content by
over 8dB.


RobertMacy

unread,
Jul 28, 2014, 6:44:01 PM7/28/14
to
On Mon, 28 Jul 2014 07:58:07 -0700, Phil Hobbs <ho...@electrooptical.net>
wrote:

>> ..snip...everything? oops

kudos, you got pretty close with those two, BUT the max time run was 8mS
?! and the PDF is skewed to negative value, like 0.12 in +/- 1 range.

see notes attached:


Version 4
SHEET 1 1656 900
WIRE -480 208 -512 208
WIRE -480 224 -480 208
WIRE -1040 240 -1056 240
WIRE -800 240 -816 240
WIRE -1056 288 -1056 240
WIRE -816 288 -816 240
WIRE 128 288 0 288
WIRE 144 288 128 288
WIRE 0 320 0 288
WIRE -480 336 -480 304
WIRE -160 336 -176 336
WIRE -48 336 -160 336
WIRE -160 384 -176 384
WIRE -48 384 -160 384
WIRE -1056 400 -1056 368
WIRE -816 400 -816 368
WIRE -496 416 -512 416
WIRE -496 432 -496 416
WIRE 0 432 0 400
WIRE -496 528 -496 512
FLAG -1056 400 0
FLAG -1040 240 n1
FLAG -816 400 0
FLAG -800 240 n2
FLAG -496 528 0
FLAG -480 336 0
FLAG -512 416 gn1
FLAG -512 208 gn2
FLAG 0 432 0
FLAG -160 336 gn2
FLAG -160 384 gn1
FLAG 128 288 out
SYMBOL bv -1056 272 R0
SYMATTR InstName B2
SYMATTR Value V=rand(50000*time)
SYMBOL bv -816 272 R0
SYMATTR InstName B1
SYMATTR Value V=rand(50000*time-20000)
SYMBOL bv -496 416 R0
SYMATTR InstName B3
SYMATTR Value V=sqrt(-2*ln(v(n2)))*cos(2*pi*v(n1))
SYMBOL bv -480 208 R0
WINDOW 3 60 49 Left 2
SYMATTR Value V=sqrt(-2*ln(v(n2)))*sin(2*pi*v(n1))
SYMATTR InstName B4
SYMBOL e 0 304 R0
SYMATTR InstName E1
SYMATTR Value {1/sqrt(2)}
TEXT -1048 456 Left 2 !.tran 8m
TEXT -1256 496 Left 2 ;ARRRGGG! can't run for more than 8mS, else nulls
out!!\ngn1,2's PDF appears to 'peak' somewhere near -0.12 in the range of
+/- 1\nout PDF appears to 'peak' somewhere near +0.09 in the range of +/- 1

RobertMacy

unread,
Jul 28, 2014, 7:02:47 PM7/28/14
to
On Sat, 26 Jul 2014 14:34:46 -0700, John Larkin
<jjla...@highnotlandthistechnologypart.com> wrote:

>> ..snip...
>
> Post an LT Spice demo.
>

whew

Since limited by length here, will try to put everything in.

Basically start with a set of PWL files for LTspice to use:

description of Vn1.txt

PWL file with 0 0 at the start. after that the time is actually the count,
and each value is a gaussian random value with an rms value of 1. The STEP
is required to thwart LTspice from the likelihood of linearly
interpolating between two diverse points, thus destroying high frequency
energy in the PWL noise file. Note, to test any schematic before full
implementation, simply use 'dummy' files containing nothing but two terms,
0 0.

An example of a typical Vn1.txt PWL file is to do this for 220001 steps:

0.0 0
0.1 -0.131558
1.0 -0.131558
1.1 0.867919
2.0 0.867919
2.1 -1.33285
3.0 -1.33285
3.1 1.50479
4.0 1.50479
4.1 0.266214
5.0 0.266214
.
.
.
109999.0 -0.0523589
109999.1 -0.622929
110000.0 -0.622929

Each file is then scaled both in VALUE and in TIME to be used in the
schematic.

Then make a bunch of non-coherent files and use the PROPERLY.

Herre is an octave [runs on 2.1.50a] funcion that creates a single file:

function [N]=noisefile(filename,N);
% this function creates a text file compatible with LTspice PWL noise
input
% optional input N defualts to 100000 steps to make the file 110001
entries.
% use the form [N]=noisefile(filename,[N]); where the filename is a text
variable
% and optional N defaults to 100000
% Note N is returned as a courtesy and .txt is added to the name of the
file
if ((nargin==0) || (nargin>2))
help noisefile;
return;
endif

if (nargin==1)
N=100000;
endif

if ( sum(isalpha(filename)) <1 )
disp("ERROR - filename MUST be text");
return;
endif

filename=[filename,".txt"];

% Linear steps, not useable, because LTspice linearly interpolates between
each
% time value, thus destroying high frequency content
%n=round(1.1*N+1);
%v=randn(n,1);
%f=fopen(filename,"w");
%for i=1:n
%fprintf(f,"%d\t%g\n",i-1,v(i));
%endfor
%fclose(f);

% In order to preserve the high frequency content of the noise, need to
HOLD value
% until just before the value changes at the next sample point.
% whether the variable are 1,N or N,1 makes NO difference because
thevariables are
% written into the file one at a time.
n=1.1*N;
t=[0,zeros(1,2*n)];
t(3:2:2*n+1)=[1:n];
t(2:2:2*n)=t(3:2:2*n+1)-9/10;

v=[0,zeros(1,2*n)];
v(3:2:2*n+1)=randn(1,n);
v(2:2:2*n)=v(3:2:2*n+1);


f=fopen(filename,"w");
for i=1:2*n+1
fprintf(f,"%6.1f\t%g\n",t(i),v(i));
endfor
fclose(f);

endfunction;

Here is a script that will run, creating 10 sets of files

% This program creates nine noise files named Vn1.txt thrugh Vn9.txt
% Each file contains 110001 values.
for ii=1:2
ii
filename=["Vn",int2str(ii)];
noisefile(filename);
endfor

After running these you're almost set to go. You have to judiciously apply
the files:

Here is a SINGLE noise source:

Version 4
SHEET 1 27404 860
WIRE 2064 -432 2048 -432
WIRE 2160 -432 2144 -432
WIRE 2048 -336 2048 -432
WIRE 2048 -336 1936 -336
WIRE 2064 -336 2048 -336
WIRE 2160 -336 2160 -432
WIRE 2160 -336 2144 -336
WIRE 2256 -336 2160 -336
WIRE 2368 -336 2256 -336
WIRE 2400 -336 2368 -336
WIRE 1936 -304 1936 -336
WIRE 2256 -304 2256 -336
WIRE 2256 -208 2256 -240
WIRE 1936 -192 1936 -224
FLAG 2256 -208 0
FLAG 1936 -192 0
FLAG 2368 -336 out
SYMBOL res 2160 -352 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R1
SYMATTR Value {R}
SYMBOL cap 2240 -304 R0
SYMATTR InstName C1
SYMATTR Value {C}
SYMBOL voltage 1936 -320 R0
WINDOW 0 48 35 Left 2
WINDOW 3 33 98 Left 2
WINDOW 123 50 63 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V1
SYMATTR Value SINE(0 {sqrt(2)*20u} 10)
SYMATTR Value2 AC 1
SYMBOL current 2144 -432 R90
WINDOW 0 -89 36 VBottom 2
WINDOW 3 -90 3 VTop 2
SYMATTR InstName InoiseR1
SYMATTR Value PWL value_scale_factor={sqrt(4*k*T/R/dt)}
time_scale_factor={dt} file=Vn1.txt
TEXT 2992 -176 Left 2 ;right edge
TEXT 2504 -288 Left 2 !.tran 0 {Tstop} 0 {dt/2}
TEXT 1632 -416 Left 2 !.options plotwinsize=0;\n.param k=1.38e-23
T=300\n.param fmax=100\n.param dt={1/2/fmax}\n.param Tstop=5\n.param
BW={1/Tstop}\n.param R=1MEG C=1nF
TEXT 1664 -480 Left 2 ;Note to prevent 'clutter' on the schematic the
"PWL..." statement is usually NOT shown.
TEXT 2504 -352 Left 2 ;.ac dec 200 {BW} {fmax}
TEXT 2504 -320 Left 2 ;.noise V(out) V1 dec 200 {BW} {fmax}
TEXT 1632 -208 Left 2 ;.param N={Tstop*2*fmax}
TEXT 2280 -560 Left 4 ;EXAMPLE .tranoise

and here are TWO noise sources WITH comparisons to see how the two are
completely non-coherent.

Version 4
SHEET 1 2172 680
WIRE -176 -256 -240 -256
WIRE -64 -256 -176 -256
WIRE -48 -256 -64 -256
WIRE -240 -224 -240 -256
WIRE -240 -112 -240 -144
WIRE 176 -80 64 -80
WIRE 192 -80 176 -80
WIRE 64 -64 64 -80
WIRE -176 -48 -176 -256
WIRE 16 -48 -176 -48
WIRE 16 0 -176 0
WIRE 64 64 64 16
WIRE -176 128 -176 0
WIRE -176 128 -240 128
WIRE -64 128 -176 128
WIRE -48 128 -64 128
WIRE -240 160 -240 128
WIRE -240 272 -240 240
FLAG -240 272 0
FLAG -240 -112 0
FLAG 64 64 0
FLAG -64 -256 N2
FLAG -64 128 N1
FLAG 176 -80 out
SYMBOL e 64 -80 R0
SYMATTR InstName E1
SYMATTR Value {1/sqrt(2)}
SYMBOL voltage -240 144 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V1
SYMATTR Value PWL value_scale_factor={Vrms/sqrt(dt)}
time_scale_factor={dt} file=Vn1.txt
SYMBOL voltage -240 -240 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V2
SYMATTR Value PWL value_scale_factor={Vrms/sqrt(dt)}
time_scale_factor={dt} file=Vn2.txt
TEXT 88 -304 Left 2 !.tran 0 {Tstop} 0 {dt/2}
TEXT 72 -408 Left 3 ;PWL Noise Sources
TEXT 96 -264 Left 2 !.param fmax=12.5kHz Tstop=2\n.param Vrms=1
BW={1/Tstop} dt={1/2/fmax}
TEXT -264 -360 Left 2 ;almost set to approx match Phil Hobbs' approach, at
least match useable spectral flatness range of 12.5kHz
TEXT 840 -192 Left 2 ;If PWL value_scale_factor={Vrms}
time_scale_factor={dt} file=Vn2.txt\nN1 = 981.74mVrms\nN2 =
984.04mVrms\nOUT = 979.08mVrms\nslightly lower than 1Vrms because LTspice
linearly interpolates between sample points\nPlotting spectrum from 0.5Hz
to 12.5kHz yields each spectrum overlayed at approx -48dB
TEXT 832 8 Left 2 ;If use the FULL calibration, PWL
value_scale_factor={Vrms/sqrt(dt)} time_scale_factor={dt}
file=Vn2.txt\nPlot N1, N2, and V(out) spectral from 0.5Hz [minimum] to
12.5kHz the spectrums of ALL\nthree lie on top each other at approx -3dB,
which of course, calculates out to 1Vrms/rtHz\n \nNote the slight rounding
that starts near 8kHz is an artifact of LTspice FFT, EXPORTING\n the
variables and THEN performing straight processing there is NO roundoff.
And, the\n noise energy calculates to within 0.5% of 'proper' noise
density value in terms of Vrms/sqrtHz.

Phil Hobbs

unread,
Jul 28, 2014, 7:15:18 PM7/28/14
to
I discussed how to fix that in later posts, like so. I asked on the
Yahoo LTspice group whether there's any way to do frequency binning on
the LTspice FFT function. So far, it doesn't look like it.

Cheers

Phil Hobbs

Version 4
SHEET 1 1656 900
WIRE -224 192 -256 192
WIRE -224 208 -224 192
WIRE -96 288 -112 288
WIRE 208 288 192 288
WIRE -224 320 -224 288
WIRE -112 336 -112 288
WIRE 192 336 192 288
WIRE -240 400 -256 400
WIRE -240 416 -240 400
WIRE -112 448 -112 416
WIRE 192 448 192 416
WIRE -240 512 -240 496
FLAG -112 448 0
FLAG -96 288 n1
FLAG 192 448 0
FLAG 208 288 n2
FLAG -240 512 0
FLAG -224 320 0
FLAG -256 400 gn1
FLAG -256 192 gn2
SYMBOL bv -112 320 R0
SYMATTR InstName B2
SYMATTR Value V=rand(-50000*time)
SYMBOL bv 192 320 R0
SYMATTR InstName B1
SYMATTR Value V=rand(50000*time-20000)
SYMBOL bv -240 400 R0
SYMATTR InstName B3
SYMATTR Value V=sqrt(-2*ln(v(n2)))*cos(2*pi*v(n1))
SYMBOL bv -224 192 R0
WINDOW 3 60 49 Left 2
SYMATTR Value V=sqrt(-2*ln(v(n2)))*sin(2*pi*v(n1))
SYMATTR InstName B4
TEXT -32 352 Left 2 !.tran 2.097152
TEXT 192 504 Left 2 !.options plotwinsize=0 maxstep=1u

RobertMacy

unread,
Jul 28, 2014, 7:31:38 PM7/28/14
to
On Mon, 28 Jul 2014 16:15:18 -0700, Phil Hobbs <ho...@electrooptical.net>
wrote:

>>> ...snip....
>
> I discussed how to fix that in later posts, like so. I asked on the
> Yahoo LTspice group whether there's any way to do frequency binning on
> the LTspice FFT function. So far, it doesn't look like it.
>
> Cheers
>
> Phil Hobbs
>
I saw that, ....but didn't understand the purpose of the discussion and
deleted the thread. didn't know you started it, thought John Woodgate, UK
started it. oops.

Check a reply to John Larking, the FULL details of how to do the
.transoise technique are in there.

From experience, watch out for LTspice's many, many 'adjustments' that
skew results much more than expected. Sometimes I just give up and EXPORT
to control the processing done to the signal. The biggest is the way the
FFT starts rounding down BEFORE it should, and the other is the way it
SPREADS energy when you think it shouldn't. Don't get me wrong, Mike's a
GENIUS when it comes to how to handle the unknown signals, waveforms
conditions, etc. sheer genius.

Notice how the technique doesn't require much thought process, so you can
concentrate on the design, not the tool. plus, doesn't add many nodes.

John Larkin

unread,
Jul 28, 2014, 9:24:07 PM7/28/14
to
On Mon, 28 Jul 2014 16:31:38 -0700, RobertMacy
<robert...@gmail.com> wrote:

>On Mon, 28 Jul 2014 16:15:18 -0700, Phil Hobbs <ho...@electrooptical.net>
>wrote:
>
>>>> ...snip....
>>
>> I discussed how to fix that in later posts, like so. I asked on the
>> Yahoo LTspice group whether there's any way to do frequency binning on
>> the LTspice FFT function. So far, it doesn't look like it.
>>
>> Cheers
>>
>> Phil Hobbs
>>
>I saw that, ....but didn't understand the purpose of the discussion and
>deleted the thread. didn't know you started it, thought John Woodgate, UK
>started it. oops.
>
>Check a reply to John Larking, the FULL details of how to do the
>.transoise technique are in there.

Seems awfully complex. This is pretty good:


Version 4
SHEET 1 880 680
WIRE 192 64 128 64
WIRE 272 64 192 64
WIRE 432 64 352 64
WIRE 512 64 432 64
WIRE 576 64 512 64
WIRE 128 96 128 64
WIRE 432 112 432 64
WIRE 128 208 128 176
WIRE 432 208 432 176
FLAG 128 208 0
FLAG 192 64 NOISE
FLAG 432 208 0
FLAG 512 64 LPF
SYMBOL bv 128 80 R0
WINDOW 0 -68 104 Left 2
WINDOW 3 -225 179 Left 2
SYMATTR InstName B1
SYMATTR Value V=58.65 * ( rand(12345*time) - 0.5 )
SYMBOL res 368 48 R90
WINDOW 0 72 56 VBottom 2
WINDOW 3 78 56 VTop 2
SYMATTR InstName R1
SYMATTR Value 1
SYMBOL cap 416 112 R0
WINDOW 0 70 20 Left 2
WINDOW 3 63 53 Left 2
SYMATTR InstName C1
SYMATTR Value 0.016
TEXT -176 104 Left 2 !.tran 0 10 0 10u
TEXT 24 -40 Left 2 ;10 Hz Noise Source J Larkin July 28, 2014


rand() runs about 6 times faster than random() and gives slightly
better crest factors and a mildly messier spectrum. Shaping the noise
spectrum would be easy by futzing the filter.

Phil Hobbs

unread,
Jul 28, 2014, 10:26:16 PM7/28/14
to
On 7/28/2014 6:44 PM, RobertMacy wrote:
> On Mon, 28 Jul 2014 07:58:07 -0700, Phil Hobbs
> <ho...@electrooptical.net> wrote:
>
>>> ..snip...everything? oops
>
> kudos, you got pretty close with those two, BUT the max time run was 8mS
> ?! and the PDF is skewed to negative value, like 0.12 in +/- 1 range.
>
> see notes attached:
>

The weird artifacts come from excess Mike cleverness, and from not
setting a maximum time step. Try this, switch to straight trapezoidal
and the "alternate" solver, and use a 2097152-point FFT. Good behaviour
results.

Cheers

Phil Hobbs
SYMATTR Value V=random(50000*time)
SYMBOL bv -816 272 R0
SYMATTR InstName B1
SYMATTR Value V=rand(101000*time+21000)
SYMBOL bv -496 416 R0
SYMATTR InstName B3
SYMATTR Value V=sqrt(-2*ln(v(n2)))*cos(2*pi*v(n1))
SYMBOL bv -480 208 R0
WINDOW 3 60 49 Left 2
SYMATTR Value V=sqrt(-2*ln(v(n2)))*sin(2*pi*v(n1))
SYMATTR InstName B4
SYMBOL e 0 304 R0
SYMATTR InstName E1
SYMATTR Value {1/sqrt(2)}
TEXT -1048 456 Left 2 !.tran 0 2.097152 0 1u
TEXT -1256 496 Left 2 ;ARRRGGG! can't run for more than 8mS, else nulls
out!!\ngn1,2's PDF appears to 'peak' somewhere near -0.12 in the range
of ᅵ 1\nout PDF appears to 'peak' somewhere near +0.09 in the range of ᅵ 1
TEXT -408 448 Left 2 !.options plotwinsize=0
SYMATTR Value V=random(50000*time)
SYMBOL bv -816 272 R0
SYMATTR InstName B1
SYMATTR Value V=rand(101000*time+21000)
SYMBOL bv -496 416 R0
SYMATTR InstName B3
SYMATTR Value V=sqrt(-2*ln(v(n2)))*cos(2*pi*v(n1))
SYMBOL bv -480 208 R0
WINDOW 3 60 49 Left 2
SYMATTR Value V=sqrt(-2*ln(v(n2)))*sin(2*pi*v(n1))
SYMATTR InstName B4
SYMBOL e 0 304 R0
SYMATTR InstName E1
SYMATTR Value {1/sqrt(2)}
TEXT -1048 456 Left 2 !.tran 0 2.097152 0 1u
TEXT -1256 496 Left 2 ;ARRRGGG! can't run for more than 8mS, else nulls
out!!\ngn1,2's PDF appears to 'peak' somewhere near -0.12 in the range
of ᅵ 1\nout PDF appears to 'peak' somewhere near +0.09 in the range of ᅵ 1
TEXT -408 448 Left 2 !.options plotwinsize=0

Phil Hobbs

unread,
Jul 28, 2014, 10:36:45 PM7/28/14
to
That method is appealingly simple, I agree. It generates independent
samples much more slowly than the Box-Mueller approach, though, because
you're relying on the central limit theorem to give you your Gaussian
statistics, rather than applying the inverse function.

Cheers

Phil Hobbs

RobertMacy

unread,
Jul 28, 2014, 10:39:53 PM7/28/14
to
On Mon, 28 Jul 2014 18:24:07 -0700, John Larkin
<jla...@highlandtechnology.com> wrote:

>> ...snip...
> Seems awfully complex. This is pretty good:

May be good, but don't see how to use it to analyze an MC1496, would you
show us?

John Larkin

unread,
Jul 28, 2014, 11:04:55 PM7/28/14
to
The RMS of the sum of N1+N2, over an adequately long observation, is almost
exactly 1.41 times the values of N1 and N2.

I deliberately made the K values 100 and 101 to demonstrate correlation in the
first second of a run. Don't do that in production.

This is noise; of course the measurements tend to be noisy.

The rand(K*time) function still has a uniform PDF, so it needs work to make it
more gaussian: summing, lowpass filtering, hashing.

rand() is better than random(), for the better runtime.

Phil Hobbs

unread,
Jul 28, 2014, 11:21:45 PM7/28/14
to
On 7/28/2014 7:02 PM, RobertMacy wrote:
> On Sat, 26 Jul 2014 14:34:46 -0700, John Larkin
> <jjla...@highnotlandthistechnologypart.com> wrote:
>
>>> ..snip...
>>
>> Post an LT Spice demo.
>>
>
> whew
>
> Since limited by length here, will try to put everything in.
>

Eternal September costs the same as aioe, and doesn't have the silly
limitation.

John Larkin

unread,
Jul 28, 2014, 11:52:21 PM7/28/14
to
Wouldn't you want to soften the sharp edges anyhow?

John Larkin

unread,
Jul 29, 2014, 12:00:57 AM7/29/14
to
No thanks. Analyzing an MC1496 is a job for a historian, not an engineeer. Is it
50 years old yet?

Why not just measure it? It's probably noisier than a sim would predict.


Point is, rand(time) can be the basis of a pretty good time-domain noise source,
and it's easy.

RobertMacy

unread,
Jul 29, 2014, 9:34:35 AM7/29/14
to
On Mon, 28 Jul 2014 20:21:45 -0700, Phil Hobbs
<pcdhSpamM...@electrooptical.net> wrote:

> On 7/28/2014 7:02 PM, RobertMacy wrote:
>> On Sat, 26 Jul 2014 14:34:46 -0700, John Larkin
>> <jjla...@highnotlandthistechnologypart.com> wrote:
>>
>>>> ..snip...
>>>
>>> Post an LT Spice demo.
>>>
>>
>> whew
>>
>> Since limited by length here, will try to put everything in.
>>
>
> Eternal September costs the same as aioe, and doesn't have the silly
> limitation.
>
> Cheers
>
> Phil Hobbs
>
>

Yes, I am signed up for Eternal September and use it to receive every
Usenet, but alt.home.repair

but alas some setting I haven't figured out won't let me post through it,
keep getting an error about some setting is wrong.

So, when Aioe allowed me to instantly get going, was done.

RobertMacy

unread,
Jul 29, 2014, 9:39:35 AM7/29/14
to
On Mon, 28 Jul 2014 21:00:57 -0700, John Larkin
<jjla...@highnotlandthistechnologypart.com> wrote:

>> ...snip....
> Point is, rand(time) can be the basis of a pretty good time-domain noise
> source,
> and it's easy.

Acutally white() is not a bad basis, but was 'difficult' to concquer the
myriad of problems, thus the solution I posted to you.

This is your second email ADMITTING to not providing your offer of two
noise sources. The other one you talked about 100 and 101 as some point of
a flaw and this one you call it a basis. Still interested in a simple two
resistor circuit with two sources

I'll post one here for you later, It has an interesting way to show the
effects of that rounding in LTspice.

John Larkin

unread,
Jul 29, 2014, 10:26:15 AM7/29/14
to
On Tue, 29 Jul 2014 06:39:35 -0700, RobertMacy <robert...@gmail.com> wrote:

>On Mon, 28 Jul 2014 21:00:57 -0700, John Larkin
><jjla...@highnotlandthistechnologypart.com> wrote:
>
>>> ...snip....
>> Point is, rand(time) can be the basis of a pretty good time-domain noise
>> source,
>> and it's easy.
>
>Acutally white() is not a bad basis, but was 'difficult' to concquer the
>myriad of problems, thus the solution I posted to you.
>
>This is your second email ADMITTING to not providing your offer of two
>noise sources. The other one you talked about 100 and 101 as some point of
>a flaw and this one you call it a basis. Still interested in a simple two
>resistor circuit with two sources

My N1 and N2 are independent noise sources. You're not making sense.

RobertMacy

unread,
Jul 29, 2014, 3:10:29 PM7/29/14
to
On Tue, 29 Jul 2014 07:26:15 -0700, John Larkin
<jjla...@highnotlandthistechnologypart.com> wrote:

>> ...snip....
>
> My N1 and N2 are independent noise sources. You're not making sense.

No, they are not independent.

Again, Vrms for N1, N2, and sum are approximately the same value.

Check the spectrum of N1, N2 [which are the same], BUT the spectrum for
the sum is off more than 8dB, signifying a fair bit of 'non-independency'.

you did look at my other reply?

named
NoiseSources_JohnLarking_compared.asc

Version 4
SHEET 1 2088 680
WIRE -176 -256 -240 -256
WIRE -112 -256 -176 -256
WIRE -48 -256 -112 -256
WIRE 528 -256 464 -256
WIRE 592 -256 528 -256
WIRE 656 -256 592 -256
WIRE -240 -224 -240 -256
WIRE 464 -224 464 -256
WIRE -240 -112 -240 -144
WIRE 464 -112 464 -144
WIRE 160 -80 64 -80
WIRE 192 -80 160 -80
WIRE 864 -80 768 -80
WIRE 896 -80 864 -80
WIRE 64 -64 64 -80
WIRE 768 -64 768 -80
WIRE -176 -48 -176 -256
WIRE 16 -48 -176 -48
WIRE 528 -48 528 -256
WIRE 720 -48 528 -48
WIRE 16 0 -176 0
WIRE 720 0 528 0
WIRE 64 64 64 16
WIRE 768 64 768 16
WIRE -176 128 -176 0
WIRE -176 128 -240 128
WIRE -112 128 -176 128
WIRE -48 128 -112 128
WIRE 528 128 528 0
WIRE 528 128 464 128
WIRE 592 128 528 128
WIRE 656 128 592 128
WIRE -240 160 -240 128
WIRE 464 160 464 128
WIRE -240 272 -240 240
WIRE 464 272 464 240
FLAG -240 272 0
FLAG -112 128 uniform_N2
FLAG -240 -112 0
FLAG -112 -256 uniform_N1
FLAG 64 64 0
FLAG 160 -80 uniform_out
FLAG 464 272 0
FLAG 592 128 white_N2
FLAG 464 -112 0
FLAG 592 -256 white_N1
FLAG 768 64 0
FLAG 864 -80 white_out
SYMBOL bv -240 144 R0
WINDOW 0 97 46 Left 2
WINDOW 3 51 95 Left 2
SYMATTR InstName B1
SYMATTR Value V= 3.94 * ( random(100*time) - 0.5 )
SYMBOL bv -240 -240 R0
WINDOW 0 84 55 Left 2
WINDOW 3 50 100 Left 2
SYMATTR InstName B2
SYMATTR Value V= 3.94 * ( random(1021*time) - 0.5 )
SYMBOL e 64 -80 R0
SYMATTR InstName E1
SYMATTR Value {1/sqrt(2)}
SYMBOL bv 464 144 R0
WINDOW 0 97 46 Left 2
WINDOW 3 51 95 Left 2
SYMATTR InstName B3
SYMATTR Value V= 4.08*white(100*time)
SYMBOL bv 464 -240 R0
WINDOW 0 84 55 Left 2
WINDOW 3 50 100 Left 2
SYMATTR InstName B4
SYMATTR Value V= 4.08*white(1021*time)
SYMBOL e 768 -80 R0
SYMATTR InstName E2
SYMATTR Value {1/sqrt(2)}
TEXT 176 -304 Left 2 !.tran 0 10 0 100u
TEXT -112 -352 Left 2 ;MODIFIED [Some time-domain noise sources J
Larkin July 26, 2014]
TEXT 1040 -112 Left 2 ;NOTE: useable range is only minimum to 25Hz due to
the use of 100 as a k factor\nvery slow analysis for only two sets of
sources,shudder at 10 of these!\nwhy are the 'independent' noise sources
produce 8 dB more energy?\nhow does anyone interpret the nV/rtHz from the
the spectral plot?
TEXT 920 96 Left 2 ;white() is described as a 'gaussian' distribution
value limited random signal\nrandom() is described as a 'uniform'
distribution also value limited random signal\nIt is very interesting the
spectrum of the two so closely match and \n further the distributions do
not seem to impact that spectrum
TEXT 896 -264 Left 2 ;ERROR: the rms voltage of EACH noise is 1 Vrms,
\nyet over the 'useable' range of 0.1Hz to 25 Hz\nthe spectral energies
are NOT the same and are off by over 8dB


John Larkin

unread,
Jul 29, 2014, 3:16:55 PM7/29/14
to
On Tue, 29 Jul 2014 12:10:29 -0700, RobertMacy
<robert...@gmail.com> wrote:

>On Tue, 29 Jul 2014 07:26:15 -0700, John Larkin
><jjla...@highnotlandthistechnologypart.com> wrote:
>
>>> ...snip....
>>
>> My N1 and N2 are independent noise sources. You're not making sense.
>
>No, they are not independent.
>
>Again, Vrms for N1, N2, and sum are approximately the same value.

I measured the sum as almost exactly 1.41 times the individual values.
N1 and N2 only correlate for the first second, and that was
deliberate. You don't have to do that.

You can break almost anything that you don't like. LT Spice will help
you if you want.

RobertMacy

unread,
Jul 29, 2014, 3:19:07 PM7/29/14
to
On Tue, 29 Jul 2014 07:26:15 -0700, John Larkin
<jjla...@highnotlandthistechnologypart.com> wrote:

APOLOGIES!

typo alert! left hand keeps adding a g and typing 'ing' instead of 'in'

Absolutely no insult intended. Again, apologies.

RobertMacy

unread,
Jul 29, 2014, 3:25:56 PM7/29/14
to
On Mon, 28 Jul 2014 21:00:57 -0700, John Larkin
<jjla...@highnotlandthistechnologypart.com> wrote:

>> ...snip....
>
> Point is, rand(time) can be the basis of a pretty good time-domain noise
> source,
> and it's easy.

As promised here is a simple resistor network with CALIBRATED noise
sources. The schematic has comparison notes. It is interesting to note
that the resistor networks do NOT even add a single node to the PSpice
solution matrix, which maintains speed [and I'll bet accuracy]

some of the fonts may not transfer.

ResistorCompare.asc

Version 4
SHEET 1 27404 712
WIRE 896 -16 880 -16
WIRE 1344 -16 896 -16
WIRE 1936 -16 1424 -16
WIRE 2048 -16 1936 -16
WIRE 2112 -16 2048 -16
WIRE 2208 -16 2112 -16
WIRE 880 16 880 -16
WIRE 1936 16 1936 -16
WIRE 2048 32 2048 -16
WIRE 2144 32 2048 32
WIRE 2048 112 2048 96
WIRE 2144 112 2048 112
WIRE 2368 112 2256 112
WIRE 2416 112 2368 112
WIRE 880 144 880 96
WIRE 1936 144 1936 96
WIRE 2048 144 2048 112
WIRE 2256 160 2256 112
WIRE 2208 176 2208 -16
WIRE 2256 272 2256 240
WIRE 1248 320 1232 320
WIRE 1312 320 1248 320
WIRE 1328 320 1312 320
WIRE 1424 320 1408 320
WIRE 1936 320 1424 320
WIRE 2048 320 1936 320
WIRE 2112 320 2048 320
WIRE 2208 320 2208 224
WIRE 2208 320 2112 320
WIRE 1936 336 1936 320
WIRE 1936 336 1856 336
WIRE 1856 352 1856 336
WIRE 1936 352 1936 336
WIRE 2048 368 2048 320
WIRE 2144 368 2048 368
WIRE 1312 400 1312 320
WIRE 1328 400 1312 400
WIRE 1424 400 1424 320
WIRE 1424 400 1408 400
WIRE 1856 448 1856 432
WIRE 1936 448 1936 432
WIRE 1936 448 1856 448
WIRE 2048 448 2048 432
WIRE 2144 448 2048 448
WIRE 1936 480 1936 448
WIRE 2048 480 2048 448
FLAG 880 144 0
FLAG 1936 144 0
FLAG 2048 144 0
FLAG 1936 480 0
FLAG 2048 480 0
FLAG 896 -16 in
FLAG 1248 320 in
FLAG 2112 320 out
FLAG 2112 -16 out1
FLAG 2256 272 0
FLAG 2368 112 compare
SYMBOL res 1328 0 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName Rs1
SYMATTR Value {Rs}
SYMBOL res 1920 0 R0
SYMATTR InstName Rload1
SYMATTR Value {Rload}
SYMBOL voltage 880 0 R0
WINDOW 0 -119 20 Left 2
WINDOW 3 -249 101 Left 2
WINDOW 123 -131 67 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName Vin
SYMATTR Value SINE(0 100uV 100kHz)
SYMATTR Value2 AC 1
SYMBOL cap 2032 32 R0
SYMATTR InstName Cload1
SYMATTR Value 1nF
SYMBOL res 1312 336 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 -1 62 VBottom 2
SYMATTR InstName Rs2
SYMATTR Value {Rs}
SYMBOL res 1920 336 R0
SYMATTR InstName Rload2
SYMATTR Value {Rload}
SYMBOL cap 2032 368 R0
SYMATTR InstName Cload2
SYMATTR Value 1nF
SYMBOL e 2256 144 R0
SYMATTR InstName Ecompare
SYMATTR Value 1
SYMBOL current 1328 400 R270
WINDOW 0 -66 33 VTop 2
WINDOW 3 -94 33 VTop 2
SYMATTR InstName InoiseRs
SYMATTR Value PWL value_scale_factor={sqrt(4*k*T/Rs*fmax)}
time_scale_factor={dt} file=Vn1.txt
SYMBOL current 1856 352 R0
WINDOW 0 -142 -7 Left 2
WINDOW 3 -154 176 Left 2
SYMATTR InstName InoiseRload
SYMATTR Value PWL value_scale_factor={sqrt(4*k*T/Rload*fmax)}
time_scale_factor={dt} file=Vn2.txt
TEXT 584 424 Left 2 !.tran 0 {Tstop} {Tstart} {dt/2}
TEXT 592 344 Left 2 ;.ac dec 100 {BW} {fmax}
TEXT 592 376 Left 2 ;.noise V(out) Vin dec 100 {BW} {fmax}
TEXT 1400 -104 Left 2 ;NORMAL CIRCUIT
TEXT 1376 232 Left 2 ;.TRANOISE CIRCUIT
TEXT 584 168 Left 2 !.options plotwinsize=0\n.param Rs=1k
Rload=5k\n.param k=1.38e-23 T=300 N=20000 fmax=10MEG\n.param
Tstop={1.1*N/2/fmax} Tstart={0.1*N/2/fmax}\n.param dt={1/2/fmax}
BW={2*fmax/N}
TEXT 1256 104 Left 2 ;Circuit set up for 1kHz to 10MHz operation
TEXT 2472 -16 Left 2 ;.ac V(out) at 100kHz is -2.62657dB, if rms for
100uVp signal that is 52.258 uVrms\n.noise V(onoise) shows
2.0199µVrms\n with no cap, 11.752µVrms\n
starts at 3.71659nV/Hz½\n with no cap,
3.71664nV/Hz½\n.tran V(compare) ctl-left-clk shows approx
2.0245µVrms\n with no cap,
11.522µVrms\n from FFT approx starts at -140dBV, estimate start
at 3.2 nV/rtHz\n with no cap, approx -140dBV, estimate
3.2 nVrms/rtHz\n using V(out), peak arppox -86.0377dBV\n
octave Post Processing:\n using V(compare_eq)\n
time waveform, 2.04uVrms\n after conversion to spectrum using
time2freq, starts with 3.64nV/rtHz\n using V(out_eq)\n after
conversion to spectrum using time2freq, peak occurs at -85.639 dBV,
52.246uVrms
TEXT 824 520 Left 2 ;NOTE: Usually the full formula of each PWL
description are NOT shown,\n but are left shown here for review.

RobertMacy

unread,
Jul 29, 2014, 3:27:43 PM7/29/14
to
On Tue, 29 Jul 2014 12:16:55 -0700, John Larkin
<jla...@highlandtechnology.com> wrote:

> On Tue, 29 Jul 2014 12:10:29 -0700, RobertMacy
> <robert...@gmail.com> wrote:
>
>> On Tue, 29 Jul 2014 07:26:15 -0700, John Larkin
>> <jjla...@highnotlandthistechnologypart.com> wrote:
>>
>>>> ...snip....
>>>
>>> My N1 and N2 are independent noise sources. You're not making sense.
>>
>> No, they are not independent.
>>
>> Again, Vrms for N1, N2, and sum are approximately the same value.
>
> I measured the sum as almost exactly 1.41 times the individual values.
> N1 and N2 only correlate for the first second, and that was
> deliberate. You don't have to do that.
>
> You can break almost anything that you don't like. LT Spice will help
> you if you want.
>
>
not trying to break, was examining it.

and the statment the same Vrms is BECAUSE when I summed I used 1/sqrt(2)
to make them similar. Didn't you look at the schematic?

Jim Thompson

unread,
Jul 29, 2014, 3:58:03 PM7/29/14
to
>2.0199锟絍rms\n with no cap, 11.752锟絍rms\n
>starts at 3.71659nV/Hz锟絓n with no cap,
>3.71664nV/Hz锟絓n.tran V(compare) ctl-left-clk shows approx
>2.0245锟絍rms\n with no cap,
>11.522锟絍rms\n from FFT approx starts at -140dBV, estimate start
>at 3.2 nV/rtHz\n with no cap, approx -140dBV, estimate
>3.2 nVrms/rtHz\n using V(out), peak arppox -86.0377dBV\n
>octave Post Processing:\n using V(compare_eq)\n
>time waveform, 2.04uVrms\n after conversion to spectrum using
>time2freq, starts with 3.64nV/rtHz\n using V(out_eq)\n after
>conversion to spectrum using time2freq, peak occurs at -85.639 dBV,
>52.246uVrms
>TEXT 824 520 Left 2 ;NOTE: Usually the full formula of each PWL
>description are NOT shown,\n but are left shown here for review.

Barfs repeatedly for syntax errors. Probably you need to post with
wrap turned off.

Also LTspice doesn't like "time_scale_factor={dt}"

Phil Hobbs

unread,
Jul 29, 2014, 7:12:30 PM7/29/14
to
Sure, but not by that large a factor, I shouldn't think. Modelling the
edges of the distribution accurately out so some crest factor M requires
integrating uniformly-distributed noise for some really long time
(something like exp(M**2/2) samples), whereas with the Box-Mueller
method, you get the Gaussian distribution to machine precision (or
whatever your random generator can do) in one step.

Of course in LTspice, the rounded edges happen before the Box-Mueller
transform, which will mess up the distribution a bit. One should really
sample in the middle of the interval, transform, and then smooth again.

Whether any of that is worth the trouble depends on the situation. Shot
noise and Johnson noise are really really Gaussian, so if one were
trying to model the counting statistics of threshold crossings, for
instance, you'd care quite a lot.

John Larkin

unread,
Jul 29, 2014, 7:48:00 PM7/29/14
to
The alternative would be to sum a few (3-10 maybe) rand(K*time) terms
and lowpass filter just enough to tame the edges. Crest factor would
be OK for most uses... grows by square root of the number of summed
sources, I think. I don't know if that would be faster or slower than
Box-Mueller, and there's no way to tell but to try it.

I was impressed by random() being 6:1 slower than rand().

This discussion is interesting. I have no use for it right now, but
I'm fairly sure I will one of these days. It is a break from writing
Python test scripts.

I wonder if LT Spice pre-compiles or interprets math expressions. That
could probably be determined by experiment.

RobertMacy

unread,
Jul 29, 2014, 8:12:47 PM7/29/14
to
On Tue, 29 Jul 2014 12:58:03 -0700, Jim Thompson
<To-Email-Use-Th...@on-my-web-site.com> wrote:

> Barfs repeatedly for syntax errors. Probably you need to post with
> wrap turned off.
> Also LTspice doesn't like "time_scale_factor={dt}"
>
> ...Jim Thompson

No control over the wrap, have to straighten out by examination.

But, the LTspice version I have, 4.20x, May 2014, demands I put dt in {}

that's supposed to be all one line, not a single line by itself.

I'll send to you as .asc

RobertMacy

unread,
Jul 29, 2014, 8:22:53 PM7/29/14
to
On Tue, 29 Jul 2014 16:48:00 -0700, John Larkin
<jla...@highlandtechnology.com> wrote:

>> ...snip....
>
> The alternative would be to sum a few (3-10 maybe) rand(K*time) terms
> and lowpass filter just enough to tame the edges. Crest factor would
> be OK for most uses... grows by square root of the number of summed
> sources, I think. I don't know if that would be faster or slower than
> Box-Mueller, and there's no way to tell but to try it.
>
> I was impressed by random() being 6:1 slower than rand().
>
> This discussion is interesting. I have no use for it right now, but
> I'm fairly sure I will one of these days. It is a break from writing
> Python test scripts.
>
> I wonder if LT Spice pre-compiles or interprets math expressions. That
> could probably be determined by experiment.

Mike has installed a gaussian function, called white()

Just like rand and random, it replicates and does not reseed.

However, somehow he has a very decent gaussian distribution, but the range
is limited to +/- 0.5 [I think it is] Have NO idea how he does that. The
distribution just has a small 'cutoff' with no long tails extending out.

John Larkin

unread,
Jul 29, 2014, 9:29:35 PM7/29/14
to
That's interesting; I'll try it.

John Larkin

unread,
Jul 29, 2014, 10:36:45 PM7/29/14
to
On Tue, 29 Jul 2014 18:29:35 -0700, John Larkin <jla...@highlandtechnology.com>
wrote:

>On Tue, 29 Jul 2014 17:22:53 -0700, RobertMacy
><robert...@gmail.com> wrote:
>
>>On Tue, 29 Jul 2014 16:48:00 -0700, John Larkin
>><jla...@highlandtechnology.com> wrote:
>>
>>>> ...snip....
>>>
>>> The alternative would be to sum a few (3-10 maybe) rand(K*time) terms
>>> and lowpass filter just enough to tame the edges. Crest factor would
>>> be OK for most uses... grows by square root of the number of summed
>>> sources, I think. I don't know if that would be faster or slower than
>>> Box-Mueller, and there's no way to tell but to try it.
>>>
>>> I was impressed by random() being 6:1 slower than rand().
>>>
>>> This discussion is interesting. I have no use for it right now, but
>>> I'm fairly sure I will one of these days. It is a break from writing
>>> Python test scripts.
>>>
>>> I wonder if LT Spice pre-compiles or interprets math expressions. That
>>> could probably be determined by experiment.
>>
>>Mike has installed a gaussian function, called white()
>>
>>Just like rand and random, it replicates and does not reseed.
>>
>>However, somehow he has a very decent gaussian distribution, but the range
>>is limited to +/- 0.5 [I think it is] Have NO idea how he does that. The
>>distribution just has a small 'cutoff' with no long tails extending out.
>
>That's interesting; I'll try it.

noise() is peculiar. You have to say V = noise(something).

If 'something' = K*TIME, it seems to work and give a new value K times per
second. But if K is large, it sort of runs out of steam pretty soon. Crest
factor is only about 2.

If 'something' is K * V(VA) where VA is a sine wave source of some frequency, to
keep 'something' from getting too big, weird things happen again.

I haven't quite figured it out, but it seems to run slow.

josephkk

unread,
Jul 30, 2014, 12:50:28 AM7/30/14
to
On Tue, 29 Jul 2014 06:34:35 -0700, RobertMacy <robert...@gmail.com>
wrote:
Please, Please put forth the effort to resolve that. Everyone will be
happier.

?-)

John Larkin

unread,
Jul 30, 2014, 1:18:34 AM7/30/14
to
'noise' is just too weird.

This is pretty good:

It runs fast, the output *looks* like noise, crest factor is good, and it's very
tolerant of changes in time step size. Has slight DC bump at startup, easily
fixed with a little more work if it matters.

Version 4
SHEET 1 1044 680
WIRE 208 64 128 64
WIRE 256 64 208 64
WIRE 416 64 336 64
WIRE 480 64 416 64
WIRE 528 64 480 64
WIRE 128 96 128 64
WIRE 416 112 416 64
WIRE 128 208 128 176
WIRE 416 208 416 176
FLAG 128 208 0
FLAG 208 64 RAW
FLAG 416 208 0
FLAG 480 64 OUT
SYMBOL bv 128 80 R0
WINDOW 0 34 107 Left 2
WINDOW 3 -80 188 Left 2
SYMATTR InstName B1
SYMATTR Value V= VS * ( rand(K1*time) + rand(K2*time) + rand(K3*time) + rand(K4*time) - 2 )
SYMBOL res 352 48 R90
WINDOW 0 63 52 VBottom 2
WINDOW 3 68 54 VTop 2
SYMATTR InstName R1
SYMATTR Value 1
SYMBOL cap 400 112 R0
WINDOW 0 85 22 Left 2
WINDOW 3 63 55 Left 2
SYMATTR InstName C1
SYMATTR Value 1.6e-4
TEXT 704 -24 Left 2 !.tran 0 1 0 5u
TEXT 88 -64 Left 2 ;1 volt RMS 1 KHz Time-domain Noise Generator
TEXT 240 -16 Left 2 ;J Larkin July 29, 2014
TEXT 664 72 Left 2 !.PARAM K2 = {6582}
TEXT 664 32 Left 2 !.PARAM K1 = {3435}
TEXT 664 112 Left 2 !.PARAM K3 = {5678}
TEXT 664 152 Left 2 !.PARAM K4 = {7777}
TEXT 664 192 Left 2 !.PARAM VS = {2.74}


(does that leading space fix the wrap problem?)
0 new messages