¿ªÔÆÌåÓý

Date

Re: My collection of models and examples for LTspice.

 

Hi, thank you for your reply. When you get the chance, I would appreciate if you could re-upload it.


Thanks a lot


Marco


Re: FFT Resolution

 

John Woodgate wrote:

To get x Hz resolution, you should, in practice, simulate for 2/x
seconds.

Actually, x Hz resolution needs only 1/x seconds.

Simulating for 2/x seconds gives you x/2 Hz resolution, which in practice might be useful if you know you have discrete frequency components at x Hz increments. ?Having those in-between components in the FFT plot both makes it easier to see the components, and can be used as a rough gauge of the FFT's accuracy. ?If components which should be very low, are not low, then something is wrong and you need to take a closer look.

The factor of 2 is needed only for the upper frequency limit.

Andy



Re: FFT Resolution

John Woodgate
 

In message
<CALBs-TipQ2tWb71L_jO+d3CysuyxmNHd1cAx+162RVC-OCHd9g@...>,
dated Mon, 16 Dec 2013, Andy <Andrew.Ingraham@...> writes:

You need at least two time samples at the highest frequency of the FFT.

1/90MHz * 0.5 = 5.56 ns

Helmut's example simulates for 20 ms, which actually gives you 50 Hz
resolution, enough to see the "trough" between alternate components
that are 100 Hz apart. ?Given that, you need at least 3600000 for the
"Number of data point samples in time" to have time samples no greater
than 5.56 ns apart. ?Using Helmut's recommended 4194304 (= 2^22) gives
you that. ?That simulation's FFT goes up to (1/2) * 1/(20ms/4194304) =
104.858 MHz, which is what I see when I run it.

Using the bare minimum (3600000) probably stops exactly AT 90 MHz and
isn't enough to show you the 90 MHz component. ?So always go higher if
there is any doubt.
Thanks. I hope that makes it all clear:

To get x Hz resolution, you should, in practice, simulate for 2/x
seconds. You can simulate for longer to get a clearer spectrum display,
say N/x seconds.

To get a spectrum up to X Hz, you then need more than 2*N*X/x samples,
preferably the next higher power of 2.

I do think that, if it's correct, is a bit more lucid than the Help
text.
--
OOO - Own Opinions Only. With best wishes. See www.jmwa.demon.co.uk
Nondum ex silvis sumus
John Woodgate, J M Woodgate and Associates, Rayleigh, Essex UK


Re: UC 3825 Ltspice Model

 

Thank you sir for your valuable help.


MMBTH81 transistor model

kalias
 

I am trying to create a model for the MMBTH81 transistor.? I extracted the following model from the datasheet and put it in a LTspice schematic with a directive.
?
.MODEL MMBTH81? PNP(Is=10f Xti=3
+ Eg=1.11 Vaf=100 Bf=133.8 Ise=1.678p
+ Ne=2.159 Ikf=.1658 Nk=.901 Xtb=1.5 Var=100 Br=1
+ Isc=9.519n Nc=3.88 Ikr=5.813 Rc=7.838 Cjc=2.81p
+ Mjc=.1615 Vjc=.8282 Fc=.5 Cje=2.695p Mje=.3214 Vje=.7026
+ Tr=11.32n Tf=97.83p Itf=69.29 Xtf=599u Vtf=10)
?
The reason that I have picked this device is that it should provide a better gain bandwidth than a 3906.? However in my simulation I have two identical circuits and it seems as if the performance is the same.? Is there something wrong with this model?
?
I compared the model file of this device to that of the 3906 and there appears to be something missing.? There is no Rb = or Re=.? Could this model be flawed or am I doing something incorrect?
?
kalias


Re: FFT Resolution

 

John Woodgate asked:

This is all good stuff, but could you please comment in the OP's
question about analysing a 10 MHz square wave with a resolution of 100
Hz? Given that 20 ms is long enough to get 100 Hz resolution, how many
data points are required to get up to, say, 90 MHz?

You need at least two time samples at the highest frequency of the FFT.

1/90MHz * 0.5 = 5.56 ns

Helmut's example simulates for 20 ms, which actually gives you 50 Hz resolution, enough to see the "trough" between alternate components that are 100 Hz apart. ?Given that, you need at least 3600000 for the "Number of data point samples in time" to have time samples no greater than 5.56 ns apart. ?Using Helmut's recommended 4194304 (= 2^22) gives you that. ?That simulation's FFT goes up to (1/2) * 1/(20ms/4194304) = 104.858 MHz, which is what I see when I run it.

Using the bare minimum (3600000) probably stops exactly AT 90 MHz and isn't enough to show you the 90 MHz component. ?So always go higher if there is any doubt.

Andy



Re: FFT Resolution

John Woodgate
 

In message
<CALBs-TgcwTBCyW1+=wNz4R7Yk09QHzk1sbNYC1ii8HU7SecrFg@...>,
dated Mon, 16 Dec 2013, Andy <Andrew.Ingraham@...> writes:

Here are some tips.

(1) ?To get finer frequency resolution in the FFT results, you need to
use longer simulation times. ?The two are directly related.
This is all good stuff, but could you please comment in the OP's
question about analysing a 10 MHz square wave with a resolution of 100 Hz? Given that 20 ms is long enough to get 100 Hz resolution, how many
data points are required to get up to, say, 90 MHz?
--
OOO - Own Opinions Only. With best wishes. See www.jmwa.demon.co.uk
Nondum ex silvis sumus
John Woodgate, J M Woodgate and Associates, Rayleigh, Essex UK


Re: CD74HC4017E.sym missing pins

 

Steve wrote:

I am new to LTSpice but I have experience with AutoCadd. Pins 8 and 16 are missing and I can't add them to the .sym model. How do I power this IC? Any advice or workaround will be appreciated.


That depends on the component's SPICE model.

Some SPICE models do not require power connections because the model itself implicitly includes power.

A more complete SPICE model should have power and (floating) ground pins too. ?(By floating, I mean not already connected to GND = Node 0.)

Adding power and ground pins to an LTspice symbol should be easy. ?Just add them, like you added every other pin to the symbol. ?Are you trying to modify an existing symbol, or creating your own from scratch? ?It would help if you explained what the actual difficulty is, rather than just saying you "can't add them", since, of course you can.

Note that if you have a SPICE model in the form of a subcircuit for your component, the symbol must have exactly the same pins on it as the subcircuit has.

Regards,
Andy



Re: FFT Resolution

 

ronw6wo?wrote:

I would like to be clear on at least one matter? " 'the value of the window"


Is this the same as the number of cycles AKA Span ?


I think "the value of the window" as used before, refers to the time interval that was simulated and sent to the FFT. ?Not the number of cycles, but the number of seconds of time.

Is it possible to display the harmonics of say a 10MHz square wave to 100Hz resolution ? My 30 year-old HP spectrum analyzer can


You could take Helmut's example and change V2 from a Sine wave source to a Pulse source.

Andy



Re: FFT Resolution

 

ronw6wo?wrote, "
this is my first attempt to model FT behaviour".

Here are some tips.

(1) ?To get finer frequency resolution in the FFT results, you need to use longer simulation times. ?The two are directly related.

For 100 Hz frequency resolution, the total time interval of the waveform data that is sent to the FFT must be 1/100Hz = 0.01 seconds = 10 ms. ?But to examine discrete components that are 100 Hz apart, you might want the frequency resolution to be at least twice as good as that (if not more) ... so simulate for 20 ms if not 40 ms or more. ?Then you can see the dips between the components too. ?Otherwise it tends to look like a big blob and it's hard to tell one component from the next.

(2) ?The "Number of data point samples in time" and the total time interval determine the upper frequency limit of the FFT. ?If the FFT doesn't go up high enough in frequency to show the components you want to see, repeat the FFT with more data point samples in time. ?Hopefully you have simulated with fine enough time steps so that the FFT isn't using fake data (see later, about "Tstep" and "plotwinsize").

An FFT works best when the number of data point samples is a power of 2 (hence LTspice starts with a default of 262144 data points), but I believe LTspice's algorithm does not require a power of 2. ?Just the same, I'd go with the power of 2 in case it impairs accuracy not to use it.

When in doubt, click "Reset to Default Values" at the bottom of the FFT dialog window, then use the up/down arrows to try other powers-of-two.

(3) ?LTspice's FFT display has a truly annoying characteristic when you zoom in to see the individual components of the FFT: ?Each component looks like an arch. ?I think that happens because LTspice does a linear interpolation between the points, BEFORE it computes a logarithm to turn it into Decibels for display. ?Hence you end up with those deceptive arch-like bumps. ?(Note: LTspice's developer says this is actually intentional. ?Not a bug. ?Could've fooled me.)

The apparent "width" of those bumps means nothing and does not imply a width of the components present! ?The tip of each bump is the ONLY thing that matters. ?The sides of the bumps are meaningless.

You can highlight the individual FFT components (right-click in the FFT window, then "Mark Data Points"), and then LTspice draws little dots at the actual FFT components. ?The curves between the dots are interpolations, not real data, and should be ignored. ?Be aware that turning on the display of those data point dots can make LTspice VERY slow and unresponsive when there are a very large number of data points on your screen. ?But this is the only way to see what's really there when your FFT's resolution is 100 Hz and you need to see frequency components every 100 Hz.

(4) ?Many things affect the apparent accuracy of the FFT results, i.e., the "noise floor" of the FFT plot, the appearance of extraneous signal components, etc.

Most important is to simulate (and send to the FFT) an integral number of cycles. ?If you have multiple known components present, use an integral number of cycles of ALL of them, if you can. ?In Helmut's example, the time interval (20 ms) is a multiple of both 10.0000 MHz and 10.0001 MHz.

Here's why.

The time-domain simulation generates a bunch of data points running from t=0 to t=Tstop = Stop Time. ?Think of turning that into a continuous waveform, by repeating that interval indefinitely. ?This is effectively what the output of the FFT represents. ?When you "splice" the waveform at t=0 to the waveform at t=Tstop, is it continuous, or is there a "glitch" at the splice? ?If there's a glitch, the waveform effectively has a modulation applied to it, which shows up in the spectrum as unwanted sidebands around everything and an increased noise floor.

In the FFT dialog box, the "Time range to include" controls the amount of waveform sent to the FFT. ?Normally one would "Use Extent of Simulation Data". ?A case where you might not do that, is when the simulation includes a start-up transient, and you want to include only the steady-state waveform after that transient has died. ?Make sure the time range you include, has the integral number of cycles, even if the total simulation time does not.

Simulating over many cycles seems to work better than simulating fewer cycles. ?I think it allows mathematical errors to average out better, and this reduces the FFT's noise floor and spurious components in the display.

When it is impossible to simulate for an integral number of cycles of all components, that's when one of the Windowing functions is used. ?My understanding is that they force the pre-FFT, time-domain data to fall somewhat gracefully to zero at t=0 and at t=Tstop. ?Thus, a nasty glitch is avoided when you "splice" the ends together. ?Instead, a gentler modulation is applied to your signal, so it still causes sidebands to appear in the output spectrum.

(5) ?It helps to turn off waveform compression in the time-domain data:

.options plotwinsize=0

Also, make Tstep (Maximum Timestep) as small as practical. ?The less interpolation between data points that the FFT needs to do, the better.

(6) ?Enabling double precision may also help:

.options numdgt=15

Regards,
Andy




CD74HC4017E.sym missing pins

 

I am new to LTSpice but I have experience with AutoCadd. Pins 8 and 16 are missing and I can't add them to the .sym model. How do I power this IC? Any advice or workaround will be appreciated.

Steve


Re: LTspice Install problem under linux

 

"Business Kid" wrote, "
Is this a 'known issue?' (m$ speak for A BUG)? Where should I report it?"

The way to report bugs (if it continues to be one) is via email to: "LTspice @ " (remove the spaces).

For you other LTspice users: from within LTspice, click on
? Help > About LTspiceIV
and it shows you the email address for bug reports and suggestions.

Regards,
Andy



Re: LTspice Install problem under linux

 

Hello,


I also had a problem to update LTspice on two WIN7 PCs the last week. When I clicked on Sync Release, it simply did nothing. It behaved like when another LTspice is open. I rebooted the PCs and then the update worked. Please try immediately after reboot.


Best regards,

Helmut

?


LTspice Install problem under linux

Business Kid
 

I can't install the latest update in linux. It certainly doesn't go in painlessly like the last one did, and may need shoehorning in. That's a pity, because I uninstalled the older version.

Is this a 'known issue?' (m$ speak for A BUG)? Where should I report it?


Re: Perl Optimizer initiation problems

 

thanks a lot, i will try it and hope it will work


Jad


Re: FFT Resolution

John Woodgate
 

In message <ENcQOfEjUjrSFwah@...>, dated Sun, 15 Dec 2013, John Woodgate <jmw@...> writes:


Working backwards through that last bit in the Help, to get 100 Hz resolution, the window width is 1/100 s = 10 milliseconds. You need to consider at least harmonics up to the ninth, 90 MHz, so the number of samples has to be at least 90 MHz/100 Hz = 90000. LTspice supports much larger numbers. But the necessary simulation time may be archaeological.
I'm sorry: I got a bit confused myself in trying to explain this and I inadvertently sent it before I'd fixed the text. Please disregard.
--
OOO - Own Opinions Only. With best wishes. See www.jmwa.demon.co.uk
Nondum ex silvis sumus
John Woodgate, J M Woodgate and Associates, Rayleigh, Essex UK


Re: UC 3825 Ltspice Model

 

Hi Andrew.
Look
File is LTspiceIV.zip. It contains a files Valvol.lib and UC3825.asy.
Bordodynov.


Re: My collection of models and examples for LTspice.

 

Hi.
My file 100MEG LTspiceDoc contained different files with instructions on using LTspice. These files I found on the internet. Files including in Russian. Links to some of them are in this group. These files can be useful for beginners. To reboot I have technical difficulties (very slow internet).
Bordodynov.


Re: Questions about phase in .AC LTspice Analysis

hoa van nguyen
 

Hello Andy,
Thank for sharing your thoughts with me. I discover something that I do not
understand. Maybe you or other people can answer my questions.

All 2stages_2CascodeDiff_ACsim_test1_orig.asc,
Readme,Cmosedu_models.txt,
2stages_2CascodeDiff_ACsim_test1_orig.jpg (graph)
are under Files > temp > GainPhase_inAC (folder).

1) from the graph 2stages_2CascodeDiff_ACsim_test1_orig.jpg:
the difference of first stage outputs (Vodp - Vodm) = 2dB, but the
Difference of second stage outputs (Vod - Vom) = 0.6dB.

Q: Why the Vod & Vom are nearly equal now? (Improved)

2) At f=30MHz the Vodp-phase goes up to positive, but the
the gain is below 0dB.

Q: How does the diff. Amplifier behave in real life at this frequency?

Best Regards

Hnguyen


On Tuesday, December 10, 2013 4:01 PM, Andy wrote:
?
Hnguyen wrote: "
Q1: Why |Vop| and |Vom| are nearly equal??why not equal?"

A1: ?Ideally they are equal. ?Real circuits are not ideal. ?If there is any common-mode component present in the output signal, the two output pins would not be precisely complementary and then their amplitudes might not be equal.

"
Q2: How do you know that V(vop,vom) would be larger than either one."

A2: ?When exactly complementary, if you look at their AC components (and ignore the DC offset), V(vom) = -V(vop).

V(vop,vom) = V(vop)-V(vom) = V(vop)-(-V(vop)) = 2*V(vop).

So, in an AC simulation, the amplitudes of vop and vom should be equal, and the amplitude of V(vop,vom) should be 6 dB higher.

Andy





Re: FFT Resolution

 

Hello Ron,

If you want 100Hz resolution, you have to simulate at least 1/100s=10ms.

I have uploaded an example "fft10meg.asc" to the Temp-folder folder. I simulated 20ms.

http://groups.yahoo.com/neo/groups/LTspice/files/%20Temp/

Run the simulation. Then in the FFT dialog window choose 4194304 samples.

Please be aware that the FFT/DFT only looks so perfect because my second source has 100Hz offset which exactly fits to the FFT's frequency resolution. If this is not the case, one would try with a window function to get a good resolution.

Best regards,
Helmut