real noise plots in SPICE?

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

Reply to
zineddine.zidane
Loading thread data ...

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

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
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?? 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?

Reply to
Robert Baer

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

Charles.

Reply to
Charles DH Williams

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.

Reply to
zineddine.zidane
[snip]

Should be.

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

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

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

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson

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

Reply to
Robert Baer

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?
Reply to
Robert Baer

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.

Reply to
zineddine.zidane

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

Reply to
Robert Baer

"Robert Baer" schrieb im Newsbeitrag news:8t73e.3198$ snipped-for-privacy@newsread1.news.pas.earthlink.net...

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

Reply to
Helmut Sennewald

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.

Reply to
Robert Baer

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.
Reply to
Robert Baer

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

Reply to
Helmut Sennewald

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

Reply to
Genome

"Genome" schrieb im Newsbeitrag news:8Nv3e.3240$ snipped-for-privacy@newsfe2-gui.ntli.net...

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

Reply to
Helmut Sennewald

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

Reply to
Genome

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.

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

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

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([,]) +

V([,]) 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. is the name of an independent source to which input noise is referred. is the noiseless input signal. The parameters , , , and 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 + left mouse button clicking on the corresponding data trace label.

Reply to
Helmut Sennewald

"Genome" schrieb im Newsbeitrag news:WNy3e.3744$ snipped-for-privacy@newsfe2-win.ntli.net...

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

Reply to
Helmut Sennewald

Helmut, you have amazing patience! I think we should nominate you as mentor of the decade!

Aloha, Mark

Reply to
qrk

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