Maker Pro
Maker Pro

real noise plots in SPICE?

R

Robert Baer

I only get obviously wrong data. So i tried a very simple case:
* GROUNDED BASE NPN
..LIB BJT.LIB
* C B E
Q1 N001 0 P002 0 QN2222
R1 P002 P001 10MEG
V1 N001 0 2V
V2 0 P001 10.6V
..model NPN NPN
..model PNP PNP
..AC oct 8 0.1 10K
..noise V(P002) V2
..PRINT NOISE
..PLOT NOISE
..SAVE
..end
Questions:
1) Where the hell is the 1/f??
2) Why the stupidity of noise *in*? If i wanted the noise of a resistor,
there ain't no input!
I can say almost the same for the transistor above, or even an
op-amp; one does not place noise on an input of an amplifier, except as
*one* step in deetermining the noise of the unit.

So, how do i get a plot of noise that one would see in the real world?
 
J

Jim Thompson

I only get obviously wrong data. So i tried a very simple case:
* GROUNDED BASE NPN
.LIB BJT.LIB
* C B E
Q1 N001 0 P002 0 QN2222
R1 P002 P001 10MEG
V1 N001 0 2V
V2 0 P001 10.6V
.model NPN NPN
.model PNP PNP
.AC oct 8 0.1 10K
.noise V(P002) V2
.PRINT NOISE
.PLOT NOISE
.SAVE
.end
Questions:
1) Where the hell is the 1/f??

As CDHW pointed out... the default model, which you used, has no 1/f
coefficient.
2) Why the stupidity of noise *in*? If i wanted the noise of a resistor,
there ain't no input!

One often specifies noise as "input referred", as a convenience for
other calculations. Look at the noise specification for a typical
OpAmp.
I can say almost the same for the transistor above, or even an
op-amp; one does not place noise on an input of an amplifier, except as
*one* step in deetermining the noise of the unit.

So, how do i get a plot of noise that one would see in the real world?

..PLOT NOISE ONOISE

*** From now on, before you post, please remind yourself that are
completely IGNORANT about simulators, a fookin' amateur, and should
then phrase your questions accordingly.

Otherwise your offensive posts implying that the simulator is broken
will get you nothing but a PLONK!

...Jim Thompson
 
If you want to see the 1/f the model has to have it. Very few models
do. I do mine like that, all of my models allow you to see the 1/f
given that you plot the noise on log log scale of course
 
first of all you have to "enable" the noise analysis of your simulator,
then simply put a voltage marker at the output of your buffer (while
it's grounded) and look at the input referred noise by simply using the
insert on your keyboard. Make sure you use the log log scale and bingo,
you should have your noise including the 1/f. As I said very few models
have that so don't expect to see it match the datasheet it ain't there.
if you want a good one to use as a guidance take a look at the OP27 or
AD8616 spice models.
 
R

Robert Baer

Charles said:
The default value for the BJT model parameter kf is zero. You need
to set it to an approriate value.

Charles.
That does not explain that when I have an NPN emiter follower then
drive a PNP emitter follower, that i get *less* noise than with the NPN
all by itself.
Furthermore, the noise values from SPICE are grossly different from
reality, and seem to have a different scale factor as I change emitter
current (1uA to 100uA).
 
R

Robert Baer

Jim said:
As CDHW pointed out... the default model, which you used, has no 1/f
coefficient.




One often specifies noise as "input referred", as a convenience for
other calculations. Look at the noise specification for a typical
OpAmp.




.PLOT NOISE ONOISE

*** From now on, before you post, please remind yourself that are
completely IGNORANT about simulators, a fookin' amateur, and should
then phrase your questions accordingly.

Otherwise your offensive posts implying that the simulator is broken
will get you nothing but a PLONK!

...Jim Thompson
LTspice allows me to select ONOISE, where one can select the node
that one wishes to be plotted.
TopSpice allows one to select the node to be plotted; slightly
different in presentation.
I presume that those selection methods are sufficently equivalent to
the card you designated.

BUT: That does not explain that when I have an NPN emiter follower
then drive a PNP emitter follower, that I get *less* noise than with the
NPN all by itself.
Furthermore, the noise values from SPICE are grossly different from
reality, and seem to have a different scale factor as I change emitter
current (1uA to 100uA).
*********
As a note of curiosity, suppose one had an involved linear circuit
and multiple outputs.
Then, what does "ONOISE" mean, and where would it be?
 
J

Jim Thompson

On Fri, 01 Apr 2005 08:18:12 GMT, Robert Baer

[snip]
LTspice allows me to select ONOISE, where one can select the node
that one wishes to be plotted.
TopSpice allows one to select the node to be plotted; slightly
different in presentation.
I presume that those selection methods are sufficently equivalent to
the card you designated.

Should be.
BUT: That does not explain that when I have an NPN emiter follower
then drive a PNP emitter follower, that I get *less* noise than with the
NPN all by itself.

Don't know. Could be that you killed the total gain when you added
the extra device.

Why don't you post LTspice .ASC file. Your vagueness is exasperating
;-)
Furthermore, the noise values from SPICE are grossly different from
reality, and seem to have a different scale factor as I change emitter
current (1uA to 100uA).

It is indeed common for noise to vary with operating current... there
typically is a "sweet spot" for a given device, source impedance, etc.
*********
As a note of curiosity, suppose one had an involved linear circuit
and multiple outputs.
Then, what does "ONOISE" mean, and where would it be?

ONOISE is "output referred" _spot_ noise, with dimensions of
volts/sq-rt-Hz.

INOISE is "input referred" _spot noise, with dimensions of
volts/sq-rt-Hz.

...Jim Thompson
 
Yes noise will vary with current but in this case it shouldn't if
you're running a constant Vsy and not sweeping any sort of DC.
But i don't know anything about LTspice I just know Pspice or Orcad
from cadence I guess.
 
H

Helmut Sennewald

Robert Baer said:
LTspice allows me to select ONOISE, where one can select the node that
one wishes to be plotted.
TopSpice allows one to select the node to be plotted; slightly different
in presentation.
I presume that those selection methods are sufficently equivalent to the
card you designated.

BUT: That does not explain that when I have an NPN emiter follower then
drive a PNP emitter follower, that I get *less* noise than with the NPN
all by itself.


Hello Robert,
if you were able to get these results, then this have to be a mistake
in your schematic or simulation command, but never a mistake of
the SPICE simulator.

My results with LTspice:
* NPN only, 0.825nV/sqrt(Hz)
* NPN+PNP, 0.984nV/sqrt(Hz)

When you want the correct inoise shown in your emitter follower,
then you have to place the input source to the base of the
first transistor.
I have attached my files so that everybody can see the correct
connections and reproduce my result.
Furthermore, the noise values from SPICE are grossly different from
reality, and seem to have a different scale factor as I change emitter
current (1uA to 100uA).

Lower emitter current gives higher voltage noise if your source
impedance is low.

V(onoise) is the noise voltage density at the output.
V(inoise) is V(onoise)/Gain . It's named input referenced noise.


Robert, please don't believe in the first place that SPICE is wrong.
Millions have successfully used it before. So it's very unlikely
that a novice can blame it.

Best Regards,
Helmut




The LTspice netlist "draft11.cir"

* C:\LTSPICE_GERICOM\63\Draft11.asc
Q2 vcc N002 N003 0 2N2222
R2 N003 vee 10k
Q2p vee N003 out2 0 2N2907
R2p vcc out2 1k
V2 N002 0 0 AC 1
Q1 vcc N001 out1 0 2N2222
R1 out1 vee 10k
V1 N001 0 0 AC 1
V5 vcc 0 5
V6 0 vee 5 AC 1
..model NPN NPN
..model PNP PNP
..lib C:\Programme\LTC\SwCADIII\lib\cmp\standard.bjt
..noise V(out1) V1 dec 100 1 1MEG
* .noise V(out2) V2 dec 100 1 1MEG
* NPN only, 0.825nV/sqrt(Hz)
* NPN+PNP, 0.984nV/sqrt(Hz)
..op
..backanno
..end



The LTspice schematic "draft11.asc"

Version 4
SHEET 1 1464 680
WIRE -192 -576 -192 -608
WIRE -192 -464 -192 -496
WIRE -192 -368 -192 -400
WIRE -192 -256 -192 -288
WIRE -192 112 -192 80
WIRE -192 224 -192 192
WIRE -112 -608 -192 -608
WIRE -80 -400 -192 -400
WIRE -80 80 -192 80
WIRE -16 -608 -112 -608
WIRE -16 -448 -16 -608
WIRE -16 -320 -16 -352
WIRE -16 -288 -16 -320
WIRE -16 -160 -48 -160
WIRE -16 -160 -16 -208
WIRE -16 -80 -48 -80
WIRE -16 32 -16 -80
WIRE -16 160 -16 128
WIRE -16 224 -16 160
WIRE -16 352 -48 352
WIRE -16 352 -16 304
WIRE 80 -320 -16 -320
WIRE 128 160 -16 160
WIRE 192 -80 -16 -80
WIRE 192 -16 192 -80
WIRE 192 80 192 64
WIRE 192 112 192 80
WIRE 192 352 -16 352
WIRE 192 352 192 208
WIRE 304 80 192 80
WIRE 320 -576 320 -608
WIRE 320 -448 320 -496
FLAG -192 224 0
FLAG 304 80 out2
FLAG -192 -256 0
FLAG 80 -320 out1
FLAG -48 -80 vcc
FLAG -112 -608 vcc
FLAG -192 -464 0
FLAG 320 -448 0
FLAG 320 -608 vee
FLAG -48 -160 vee
FLAG -48 352 vee
SYMBOL npn -80 32 R0
SYMATTR InstName Q2
SYMATTR Value 2N2222
SYMBOL res -32 208 R0
SYMATTR InstName R2
SYMATTR Value 10k
SYMBOL pnp 128 208 M180
SYMATTR InstName Q2p
SYMATTR Value 2N2907
SYMBOL res 176 -32 R0
SYMATTR InstName R2p
SYMATTR Value 1k
SYMBOL voltage -192 96 R0
WINDOW 123 24 132 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value 0
SYMATTR Value2 AC 1
SYMBOL npn -80 -448 R0
SYMATTR InstName Q1
SYMATTR Value 2N2222
SYMBOL res -32 -304 R0
SYMATTR InstName R1
SYMATTR Value 10k
SYMBOL voltage -192 -384 R0
WINDOW 3 17 108 Left 0
WINDOW 123 32 78 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 0
SYMATTR Value2 AC 1
SYMBOL voltage -192 -592 R0
SYMATTR InstName V5
SYMATTR Value 5
SYMBOL voltage 320 -480 R180
WINDOW 0 -72 79 Left 0
WINDOW 3 -70 17 Left 0
WINDOW 123 -92 48 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V6
SYMATTR Value 5
SYMATTR Value2 AC 1
TEXT -200 -792 Left 0 !.noise V(out1) V1 dec 100 1 1MEG
TEXT -200 -760 Left 0 ;.noise V(out2) V2 dec 100 1 1MEG
TEXT 80 -360 Left 0 ;NPN only, 0.825nV/sqrt(Hz)
TEXT 280 40 Left 0 ;NPN+PNP, 0.984nV/sqrt(Hz)
TEXT -200 -720 Left 0 !.op
 
R

Robert Baer

Jim said:
On Fri, 01 Apr 2005 08:18:12 GMT, Robert Baer

[snip]
LTspice allows me to select ONOISE, where one can select the node
that one wishes to be plotted.
TopSpice allows one to select the node to be plotted; slightly
different in presentation.
I presume that those selection methods are sufficently equivalent to
the card you designated.


Should be.

BUT: That does not explain that when I have an NPN emiter follower
then drive a PNP emitter follower, that I get *less* noise than with the
NPN all by itself.


Don't know. Could be that you killed the total gain when you added
the extra device.

Why don't you post LTspice .ASC file. Your vagueness is exasperating
;-)

Furthermore, the noise values from SPICE are grossly different from
reality, and seem to have a different scale factor as I change emitter
current (1uA to 100uA).


It is indeed common for noise to vary with operating current... there
typically is a "sweet spot" for a given device, source impedance, etc.

*********
As a note of curiosity, suppose one had an involved linear circuit
and multiple outputs.
Then, what does "ONOISE" mean, and where would it be?


ONOISE is "output referred" _spot_ noise, with dimensions of
volts/sq-rt-Hz.

INOISE is "input referred" _spot noise, with dimensions of
volts/sq-rt-Hz.

...Jim Thompson
Pray tell, how does SPICE determine where the input is, and where the
output is?
One could have a complex circuit, with randomly numbered nodes (no
other designations)...
 
H

Helmut Sennewald

Robert Baer said:
Jim said:
On Fri, 01 Apr 2005 08:18:12 GMT, Robert Baer

[snip]
LTspice allows me to select ONOISE, where one can select the node that
one wishes to be plotted.
TopSpice allows one to select the node to be plotted; slightly
different in presentation.
I presume that those selection methods are sufficently equivalent to
the card you designated.


Should be.

BUT: That does not explain that when I have an NPN emiter follower then
drive a PNP emitter follower, that I get *less* noise than with the NPN
all by itself.


Don't know. Could be that you killed the total gain when you added
the extra device.

Why don't you post LTspice .ASC file. Your vagueness is exasperating
;-)

Furthermore, the noise values from SPICE are grossly different from
reality, and seem to have a different scale factor as I change emitter
current (1uA to 100uA).


It is indeed common for noise to vary with operating current... there
typically is a "sweet spot" for a given device, source impedance, etc.

*********
As a note of curiosity, suppose one had an involved linear circuit and
multiple outputs.
Then, what does "ONOISE" mean, and where would it be?


ONOISE is "output referred" _spot_ noise, with dimensions of
volts/sq-rt-Hz.

INOISE is "input referred" _spot noise, with dimensions of
volts/sq-rt-Hz.

...Jim Thompson
Pray tell, how does SPICE determine where the input is, and where the
output is?
One could have a complex circuit, with randomly numbered nodes (no other
designations)...

Hello Robert,
your .noise command controls the input source.

Example in LTspice: The voltage source V1 is the input source.
..noise V(out1) V1 dec 100 1 1MEG

From your netlist: V2 is used as input source which is wrong
if you want simulate a voltage follower in your circuit.

Best Regards,
Helmut
 
R

Robert Baer

Helmut said:
Hello Robert,
if you were able to get these results, then this have to be a mistake
in your schematic or simulation command, but never a mistake of
the SPICE simulator.

My results with LTspice:
* NPN only, 0.825nV/sqrt(Hz)
* NPN+PNP, 0.984nV/sqrt(Hz)

When you want the correct inoise shown in your emitter follower,
then you have to place the input source to the base of the
first transistor.
I have attached my files so that everybody can see the correct
connections and reproduce my result.




Lower emitter current gives higher voltage noise if your source
impedance is low.

V(onoise) is the noise voltage density at the output.
V(inoise) is V(onoise)/Gain . It's named input referenced noise.


Robert, please don't believe in the first place that SPICE is wrong.
Millions have successfully used it before. So it's very unlikely
that a novice can blame it.

Best Regards,
Helmut




The LTspice netlist "draft11.cir"

* C:\LTSPICE_GERICOM\63\Draft11.asc
Q2 vcc N002 N003 0 2N2222
R2 N003 vee 10k
Q2p vee N003 out2 0 2N2907
R2p vcc out2 1k
V2 N002 0 0 AC 1
Q1 vcc N001 out1 0 2N2222
R1 out1 vee 10k
V1 N001 0 0 AC 1
V5 vcc 0 5
V6 0 vee 5 AC 1
.model NPN NPN
.model PNP PNP
.lib C:\Programme\LTC\SwCADIII\lib\cmp\standard.bjt
.noise V(out1) V1 dec 100 1 1MEG
* .noise V(out2) V2 dec 100 1 1MEG
* NPN only, 0.825nV/sqrt(Hz)
* NPN+PNP, 0.984nV/sqrt(Hz)
.op
.backanno
.end



The LTspice schematic "draft11.asc"

Version 4
SHEET 1 1464 680
WIRE -192 -576 -192 -608
WIRE -192 -464 -192 -496
WIRE -192 -368 -192 -400
WIRE -192 -256 -192 -288
WIRE -192 112 -192 80
WIRE -192 224 -192 192
WIRE -112 -608 -192 -608
WIRE -80 -400 -192 -400
WIRE -80 80 -192 80
WIRE -16 -608 -112 -608
WIRE -16 -448 -16 -608
WIRE -16 -320 -16 -352
WIRE -16 -288 -16 -320
WIRE -16 -160 -48 -160
WIRE -16 -160 -16 -208
WIRE -16 -80 -48 -80
WIRE -16 32 -16 -80
WIRE -16 160 -16 128
WIRE -16 224 -16 160
WIRE -16 352 -48 352
WIRE -16 352 -16 304
WIRE 80 -320 -16 -320
WIRE 128 160 -16 160
WIRE 192 -80 -16 -80
WIRE 192 -16 192 -80
WIRE 192 80 192 64
WIRE 192 112 192 80
WIRE 192 352 -16 352
WIRE 192 352 192 208
WIRE 304 80 192 80
WIRE 320 -576 320 -608
WIRE 320 -448 320 -496
FLAG -192 224 0
FLAG 304 80 out2
FLAG -192 -256 0
FLAG 80 -320 out1
FLAG -48 -80 vcc
FLAG -112 -608 vcc
FLAG -192 -464 0
FLAG 320 -448 0
FLAG 320 -608 vee
FLAG -48 -160 vee
FLAG -48 352 vee
SYMBOL npn -80 32 R0
SYMATTR InstName Q2
SYMATTR Value 2N2222
SYMBOL res -32 208 R0
SYMATTR InstName R2
SYMATTR Value 10k
SYMBOL pnp 128 208 M180
SYMATTR InstName Q2p
SYMATTR Value 2N2907
SYMBOL res 176 -32 R0
SYMATTR InstName R2p
SYMATTR Value 1k
SYMBOL voltage -192 96 R0
WINDOW 123 24 132 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value 0
SYMATTR Value2 AC 1
SYMBOL npn -80 -448 R0
SYMATTR InstName Q1
SYMATTR Value 2N2222
SYMBOL res -32 -304 R0
SYMATTR InstName R1
SYMATTR Value 10k
SYMBOL voltage -192 -384 R0
WINDOW 3 17 108 Left 0
WINDOW 123 32 78 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 0
SYMATTR Value2 AC 1
SYMBOL voltage -192 -592 R0
SYMATTR InstName V5
SYMATTR Value 5
SYMBOL voltage 320 -480 R180
WINDOW 0 -72 79 Left 0
WINDOW 3 -70 17 Left 0
WINDOW 123 -92 48 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V6
SYMATTR Value 5
SYMATTR Value2 AC 1
TEXT -200 -792 Left 0 !.noise V(out1) V1 dec 100 1 1MEG
TEXT -200 -760 Left 0 ;.noise V(out2) V2 dec 100 1 1MEG
TEXT 80 -360 Left 0 ;NPN only, 0.825nV/sqrt(Hz)
TEXT 280 40 Left 0 ;NPN+PNP, 0.984nV/sqrt(Hz)
TEXT -200 -720 Left 0 !.op
I copied your response and via cut and paste, made two files as you
described: draft11.cir and draft11.asc .
In LTspice, opened draft11.asc, saw the two circuits, and ran the
simulation.
It was not possible to select V(out1) or V(out2) for plotting, so i
tried inoise and onoise and got fairly flat lines, inoise about 0.825nV
per root Hertz and onoise about 0.820nV per root Hertz.
Then again, who knows where inoise and onoise really are (read on)?
Tried plotting all by themselves, V(Q1) and V(Q2p); got *zero*.
Could not find 0.984nV or anything near that value, except for inoise
and onoise; where do i look?

And.. using the hand to edit the NPN, it sed the collector current
wuz 800mA; the PNP it sed wuz 600mA!
Well, ignoring Vbe drop, the emitter current of the NPNs is about
500uA and the emitter current of the PNP is about 5mA.

The "Alt-doubleclick" scheme does not work, so i could not enter
V(out1) or anything else.
 
R

Robert Baer

Helmut said:
Jim Thompson wrote:

On Fri, 01 Apr 2005 08:18:12 GMT, Robert Baer

[snip]


LTspice allows me to select ONOISE, where one can select the node that
one wishes to be plotted.
TopSpice allows one to select the node to be plotted; slightly
different in presentation.
I presume that those selection methods are sufficently equivalent to
the card you designated.


Should be.



BUT: That does not explain that when I have an NPN emiter follower then
drive a PNP emitter follower, that I get *less* noise than with the NPN
all by itself.


Don't know. Could be that you killed the total gain when you added
the extra device.

Why don't you post LTspice .ASC file. Your vagueness is exasperating
;-)



Furthermore, the noise values from SPICE are grossly different from
reality, and seem to have a different scale factor as I change emitter
current (1uA to 100uA).


It is indeed common for noise to vary with operating current... there
typically is a "sweet spot" for a given device, source impedance, etc.



*********
As a note of curiosity, suppose one had an involved linear circuit and
multiple outputs.
Then, what does "ONOISE" mean, and where would it be?


ONOISE is "output referred" _spot_ noise, with dimensions of
volts/sq-rt-Hz.

INOISE is "input referred" _spot noise, with dimensions of
volts/sq-rt-Hz.

...Jim Thompson

Pray tell, how does SPICE determine where the input is, and where the
output is?
One could have a complex circuit, with randomly numbered nodes (no other
designations)...


Hello Robert,
your .noise command controls the input source.

Example in LTspice: The voltage source V1 is the input source.
.noise V(out1) V1 dec 100 1 1MEG

From your netlist: V2 is used as input source which is wrong
if you want simulate a voltage follower in your circuit.



Best Regards,
Helmut
What you say is what i understood, and so the card .NOISE V(OUT1) V1
DEC 100 1 1MEG would appear to make sense (sort-of).
Presumably, if one only were talking about the NPN emitter follower,
then if the results that i got (inoise=0.825nV per root Hz and
onoise=0.820 per root Hz) are correct, then one would read those values
in a real circuit?
Seems to me, that Q1 is being driven by a (relatively) flatband
*signal*, and being an emitter follower with a voltage gain of (about
0.95), that the signal at the output is a little lower; no noise added.
**
Now, with both cards "working" (and i guess it is fair to say they
both work - and together), one has the serious question as to where
"inoise" and "onoise" really are.
"inoise" cannot be at two places at the same time (N001 and N002) and
"onoise" cannot be at two places at the same time (out1 and out2).
****
Now the NPN is operating at approximately 430uA (taking into account
the Vbe drop), and an ideal transistor would produce about 0.710nV per
root Hz making for a rather large discrepancy (SPICE gave 0.825nV per
root Hz).
Likewise, the PNP is operating fairly close to 5mA; an ideal
transistor would produce about 0.210nV per root Hz.
Either simple adding or vector adding of these two will not give
0.985nV per root Hz.
**
These operational points are well within normal usage; the current is
not so small as to make leakage noises significant, nor so large that
base spreading resistance to become significant, or emitter resistivity
to become significant.
I have found that practice in this region to remarkably track theory.
Furthermore, one can use noise measurements at optimally chosen wide
current points to then determine the base spreading resistance; that
value is remarkably close to what the noise figure at RF indicates.
Hell, one can measure Ft in the low microamp region and extrapolate
the Ft in the mid milliamp region and be remarkably accurate.
 
G

Genome

Helmut Sennewald said:
Hello Robert,
your .noise command controls the input source.

Example in LTspice: The voltage source V1 is the input source.
.noise V(out1) V1 dec 100 1 1MEG

From your netlist: V2 is used as input source which is wrong
if you want simulate a voltage follower in your circuit.


Best Regards,
Helmut

It may be that my install has got corrupted but when I try to
edit the simulation card for noise silly things go on and the
entered data gets corrupted.

Before

Output V(vout)
Input V(vset)
Type decade
N.points 20
Start F 1
Stop F 100K

After

Output V(vout)
Input V
Type octave
N.points dec
Start F 20
Stop F 1

Gives Error 'Missing number of points per octave'

DNA
 
H

Helmut Sennewald

Genome said:
It may be that my install has got corrupted but when I try to
edit the simulation card for noise silly things go on and the
entered data gets corrupted.

Before

Output V(vout)
Input V(vset)
Type decade
N.points 20
Start F 1
Stop F 100K

After

Output V(vout)
Input V
Type octave
N.points dec
Start F 20
Stop F 1

Gives Error 'Missing number of points per octave'

DNA

Hello Genome,
there seems to be a different syntax between the SPICE programs.


LTspice:
..noise V(out1) V1 dec 100 1 1MEG

Other SPICE programs may require two lines:
..noise V(out1) V1
..ac dec 100 1 1MEG

Best Regards,
Helmut
 
H

Helmut Sennewald

Robert Baer said:
I copied your response and via cut and paste, made two files as you
described: draft11.cir and draft11.asc .
In LTspice, opened draft11.asc, saw the two circuits, and ran the
simulation.
It was not possible to select V(out1) or V(out2) for plotting, so i
tried inoise and onoise and got fairly flat lines, inoise about 0.825nV
per root Hertz and onoise about 0.820nV per root Hertz.

Hello Robert,

if the following line is active, then V(onoise) is the noise
at node out1.

..noise V(out1) V1 dec 100 1 1MEG

You were right that it's 0.82nV/sqrt(Hz).


If the other line is active, then V(onoise) is the noise at
node out2.

..noise V(out2) V2 dec 100 1 1MEG

Here V(onoise) is 0.97nV/sqrt(Hz).


The values added as comment are slightly different. I assume that
I had varied the resistor values when I simulated those.

Then again, who knows where inoise and onoise really are (read on)?

V(onoise) is measured at the net you specify in the .noise command.

Tried plotting all by themselves, V(Q1) and V(Q2p); got *zero*.

V(Q2) must be zero, because it doesn't add anything to the target
( V(onoise) when set to net out1 ).

Could not find 0.984nV or anything near that value, except for inoise
and onoise; where do i look?

You have to enable the other .noise command line.
You will then get 0.97nV/sqrt(Hz).


When you move the cursor over the different components, you will
see the probe symbol. Then click the left mouse button to get
the noise contribution plotted. And of course a component which
doesn't contribute shows 0nV.

Now the math.
The output noise voltage is the square root of the squared sum
of all the noise contributors. Now you will ask why these squares.
It's because all the noise contributors are assumed to be
independent of each other.

V(onoise)=sqrt(V(Q1)*VQ1)+V(R1)*V(r1)+ ......)

The help page from LTspice repeats some of my explanantions.
The total RMS noise voltage is the integral over the frequency
band of interest.

Best Regards,
Helmut



This is the help page from LTspice
----------------------------------
Help -> Help Topics -> LTspice -> Dot Commands -> .NOISE


..NOISE -- Perform a Noise Analysis

This is a frequency domain analysis that computes the noise due to
Johnson, shot and flicker noise. The output data is noise spectral
density per unit square root bandwidth.

Syntax: .noise V(<out>[,<ref>]) <src> <oct, dec, lin>
+ <Nsteps> <StartFreq> <EndFreq>

V(<out>[,<ref>]) is the node at which the total output noise is
calculated. It can be expressed as V(n1, n2) to represent the voltage
between two nodes. <src> is the name of an independent source to
which input noise is referred. <src> is the noiseless input signal.
The parameters <oct, dec, lin>, <Nsteps>, <StartFreq>, and <EndFreq>
define the frequency range of interest and resolution in the manner
used in the .ac directive.

Output data trace V(onoise) is the noise spectral voltage density
referenced to the node(s) specified as the output in the above syntax.
If the input signal is given as a voltage source, then data trace
V(inoise) is the input-referred noise voltage density. If the input
is specified as a current source, then the data trace inoise is the
noise referred to the input current source signal. The noise
contribution of each component can be plotted. These contributions
are referenced to the output. You can reference them to the input
by dividing by the data trace "gain".

The waveform viewer can integrate noise over a bandwidth by
<Ctrl-Key> + left mouse button clicking on the corresponding
data trace label.
 
G

Genome

Helmut Sennewald said:
Hello Genome,
there seems to be a different syntax between the SPICE programs.


LTspice:
.noise V(out1) V1 dec 100 1 1MEG

Other SPICE programs may require two lines:
.noise V(out1) V1
.ac dec 100 1 1MEG

Best Regards,
Helmut

I am running LTspice.

If I click on Simulate, Edit Simulation Cmd and then click
on the Noise tab then when I set up the analysis and click
on OK the data gets corrupted and the error message is
generated.

If I explicitly place a spice directive on the circuit in
the correct format then when I run the simulation it comes
up with the same error. The spice directive remains correct
but the data in the Noise tab gets corrupted.

I did do a web update but the problem remains.

HTH

DNA
 
H

Helmut Sennewald

Genome said:
I am running LTspice.

If I click on Simulate, Edit Simulation Cmd and then click
on the Noise tab then when I set up the analysis and click
on OK the data gets corrupted and the error message is
generated.

If I explicitly place a spice directive on the circuit in
the correct format then when I run the simulation it comes
up with the same error. The spice directive remains correct
but the data in the Noise tab gets corrupted.

I did do a web update but the problem remains.

HTH

DNA

Hello Genome,
I tried to force an error. Most probably you have written
out
instead of
V(out)
in the .noise setup.

Example:
--------

This is the error message which you will get if you have written
..noise out v2 oct 100 100 1k

instead of the correct
..noise V(out) v2 oct 100 100 1k


Circuit: * F:\Programme\Ltc\SwCADIII\examples\Educational\noise.asc

Error on line 67 : .noise out v2 oct 100 100 1k
bad syntax [.noise v(OUT) SRC {DEC OCT LIN} NP FSTART FSTOP <PTSPRSUM>]
Fatal Error: .NOISE syntax error


Best Regards,
Helmut

To all:
The .NOISE analysis correctly works in LTspice.
A user should ask himself why it doesn't work as expected.

I am the moderator of the LTspice Yahoo group,
but I am not an employee of LT if that matters.
 
R

Robert Baer

Genome said:
It may be that my install has got corrupted but when I try to
edit the simulation card for noise silly things go on and the
entered data gets corrupted.

Before

Output V(vout)
Input V(vset)
Type decade
N.points 20
Start F 1
Stop F 100K

After

Output V(vout)
Input V
Type octave
N.points dec
Start F 20
Stop F 1

Gives Error 'Missing number of points per octave'

DNA
I see that al of the time; make a change like that and the entries
"push" down like they were in a stack.
You have to go back and fix the last 3 entries by hand...
 
R

Robert Baer

Helmut said:
Hello Genome,
there seems to be a different syntax between the SPICE programs.


LTspice:
.noise V(out1) V1 dec 100 1 1MEG

Other SPICE programs may require two lines:
.noise V(out1) V1
.ac dec 100 1 1MEG

Best Regards,
Helmut
True; does not address the problem, which appears to be a bug.
 
Top