¿ªÔÆÌåÓý

Date

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


Re: A Noisy Question

 

I guess my question with respect to noise and LTspice is how the time step between noise samples is established? And, how is it then interpreted - as a PWL source, for example??All I see is .noise - I don't see how to create a time-domaine noise signal is LTspice. To do an FFT on the noise, doesn't it have to be in the time domain? I see rand() but that appears to be uniform, not gaussian.?

The time between noise samples must set the upper frequency of the noise spectrum (maybe at 1/2T, where T is the sample interval ??). Where and how is T set in LTspice??

And, if the noise samples are taken as points in a PWL, then that says how the system treats that source between the sample points. Or, is there no "between the sample points"? I see random() which says it is smoothed between samples, but still nothing about the time interval between samples.

I hope these questions make sense, because I am not totally certain what I am asking about :) [If I were certain, I probably would not have to ask!!]

Thanks
Jim Wagner

On Dec 15, 2013, at 1:40 PM, David Hawkins wrote:

?

Hi Jim,

> I have a question about modeling noise in a real system.
>
> Lets say I start with a uniform distributed sequence of random values
> with a span of +1 to -1. I know that I can average over N of these
> values and get a Gaussian sequence with a mean of zero and a standard
> deviation of 0.5. This much is pretty easy.
>
> Now, these values represent discrete time samples. How do I turn them
> into real signal that has a defined bandwidth? Yes, I can put the
> sequence through a low-pass filter, but I have to define a time
> interval between samples. Do I need to set this time at 1/10X the
> filter bandwidth? 1/100X? And, does it matter whether I take the
> values as though the output of a first-order sample/hold, or do
> linear interpolation between them? Or something else? And, what sort
> of filtering is normally assumed? Single pole? Two or three poles?
>
> Yes, this is for an LTspice project. And, the reason I am being a
> bit coy about specific values is that I would like to apply this in a
> variety of communication systems with varying operating frequencies
> and bandwidths. In some cases, the system bandwidth will be very
> broad (maybe 100 MHz) encompassing HF frequencies with lots of
> ambient noise as well as VHF that is much quieter.

I typically use an LFSR and then average the uniform distribution
as you mention above.



If I'm using this noise to "simulate" an analog noise signal, and
I want to "sample" that signal with a jittery clock signal, or
I want to alias the signal to baseband, I will filter the noise
to say 4x the bandwidth I really want, generate my
clock sample times, and then interpolate (using MATLAB here,
not LTSpice).

For example, see the spectra in this doc



it contains simulated noise power ratio, clock jitter, etc.

I use PRBS generated noise so that I can reproduce the simulations
in hardware in FPGA-based DSP.



Cheers,
Dave



Re: FFT Resolution

John Woodgate
 

In message <l8l5j2+4h2m77@...>, dated Sun, 15 Dec 2013,
ronw6wo@... writes:


? RC and John Thanks? for the response,but I am blinded by science now
as

this is my first attempt to model FT behaviour


I would like to be clear on at least one matter? " 'the value of the
window"
It isn't very clear.

Is this the same as the number of cycles AKA Span ?
No. It's the 'width' in frequency of one window.


Is it possible to display the harmonics of say a 10MHz square wave to
100Hz resolution ? My 30 year-old HP spectrum analyzer can
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.

Your spectrum analyser works in the analogue domain, so the only time
constraint is the settling time of the 100 Hz filter, which might be as
long as 100 ms. So you do need to sweep the frequency slowly enough.
--
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: A Noisy Question

 

Hi Jim,

I have a question about modeling noise in a real system.

Lets say I start with a uniform distributed sequence of random values
with a span of +1 to -1. I know that I can average over N of these
values and get a Gaussian sequence with a mean of zero and a standard
deviation of 0.5. This much is pretty easy.

Now, these values represent discrete time samples. How do I turn them
into real signal that has a defined bandwidth? Yes, I can put the
sequence through a low-pass filter, but I have to define a time
interval between samples. Do I need to set this time at 1/10X the
filter bandwidth? 1/100X? And, does it matter whether I take the
values as though the output of a first-order sample/hold, or do
linear interpolation between them? Or something else? And, what sort
of filtering is normally assumed? Single pole? Two or three poles?

Yes, this is for an LTspice project. And, the reason I am being a
bit coy about specific values is that I would like to apply this in a
variety of communication systems with varying operating frequencies
and bandwidths. In some cases, the system bandwidth will be very
broad (maybe 100 MHz) encompassing HF frequencies with lots of
ambient noise as well as VHF that is much quieter.
I typically use an LFSR and then average the uniform distribution
as you mention above.



If I'm using this noise to "simulate" an analog noise signal, and
I want to "sample" that signal with a jittery clock signal, or
I want to alias the signal to baseband, I will filter the noise
to say 4x the bandwidth I really want, generate my
clock sample times, and then interpolate (using MATLAB here,
not LTSpice).

For example, see the spectra in this doc



it contains simulated noise power ratio, clock jitter, etc.

I use PRBS generated noise so that I can reproduce the simulations
in hardware in FPGA-based DSP.



Cheers,
Dave


Re: FFT Resolution

 

? RC and John Thanks? for the response,but I am blinded by science now as

this is my first attempt to model FT behaviour


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 ?


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


Can anyone illustrate? with the pulse and Tran statements using a square wave at any freqency



---In LTspice@..., <ron_liff@...> wrote:

In any event the resultant "spectral accuracy", even if optimized for some set of conditions, resolution, and bandwidth of spectrum, will be directly dependent on the accuracy of represented distortion (read non-linear) effects.
?
- In general large scale spectra will tend to more accurate representation, whereas the smaller the spectral component the more the sensitivity, and deviation, from the actual results in a real world circuit. This effect is exploited in so-called "Harmonic balance" type solvers to great success.
?
- Cordially - RC


On Tuesday, December 10, 2013 2:58 PM, John Woodgate <jmw@...> wrote:
?
In message <l87u7c+ebvu@...>, dated Tue, 10 Dec 2013,
"skleiser@..." <skleiser@...> writes:

> Given (in this case) a square wave of fixed frequency, fast but
>non-zero rising & falling edges, 50% duty cycle, and an exact integer
>number of cycles (etc.), what's the narrowest possible harmonic
>bandwidth that ought to be expected? In other words, when is the
>simulation as optimized as it can be?

harmonic bandwidth doesn't depend on those things. Embedded in the Help
on the B source is:

"In LTspice, the impulse response is found from the FFT of a discrete
set points in frequency domain response. This process is prone to the
usual artifacts of FFT's such as spectral leakage and picket fencing
that is common to discrete FFT's. LTspice uses a proprietary algorithm
that exploits that it has an exact analytical expression for the
frequency domain response and chooses points and windows to cause such
artifacts to diffract precisely to zero. However, LTspice must guess an
appropriate frequency range and resolution. It is recommended that the
LTspice first be allowed to make a guess at this. The length of the
window and number of FFT data points used will be reported in the .log
file. You can then adjust the algorithm's choices by explicitly setting
nfft and window length. The reciprocal of the value of the window is the
frequency resolution. The value of nfft times this resolution is the
highest frequency considered."

The significant words are:

"The reciprocal of the value of the window is the frequency resolution."

Frequency resolution is the same as the observed 'harmonic bandwidth'.

>
> On a more general note, assuming artifacts of a non-ideal simulation
>have been minimized, does the harmonic bandwidth provide useful
>information, or do only the peak values matter?

The harmonic energy is averaged over the bandwidth, so widening the
bandwidth tends to reduce the observed amplitude.
--
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: A Noisy Question

monettsys
 

--- In LTspice@..., Jim Wagner <wagnejam99@...> wrote:
Greetings folks -
I have a question about modeling noise in a real system.
Lets say I start with a uniform distributed sequence of random values with a span of +1 to -1. I know that I can average over N of these values and get a Gaussian sequence with a mean of zero and a standard deviation of 0.5. This much is pretty easy.
I don't think that will give a very good approximation to Gaussian noise. You might want to try the Box-Mueller method.

Now, these values represent discrete time samples. How do I turn them into real signal that has a defined bandwidth? Yes, I can put the sequence through a low-pass filter, but I have to define a time interval between samples. Do I need to set this time at 1/10X the filter bandwidth? 1/100X? And, does it matter whether I take the values as though the output of a first-order sample/hold, or do linear interpolation between them? Or something else? And, what sort of filtering is normally assumed? Single pole? Two or three poles?
For the Box-Mueller, just take the output signal. You don't need S/H, interpolation, or any other tricks. You may need to adjust tripdV and tripdt. There are several Box-Mueller files available. Try

"

and

"

In a hardware noise generator, you normally want the noise spectrum to remain flat well past the frequencies of interest. But if you need to define the bandwidth, how about doing a FFT on the resulting noise signal? That should give answers to your questions.

Thanks
Jim Wagner
Oregon Research Electronics
Mike


Re: Cmos 4026

John Woodgate
 

In message <CAFL0OtQZcJSRTgEKrDT3ObSrjGatJzBfoLanqGr7Y2uN6vZOOQ@...>, dated Sun, 15 Dec 2013, Business Kid <business.kid@...> writes:

And I have stopped thinking in 4xxx logic, because they are not recommended for new designs, to put it mildly.
No doubt, but the fact that they are very slow by modern standards means that they produce much less EMI. If you don't need the speed, don't buy it.
--
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: Cmos 4026

Business Kid
 

I thought I was the only one with any 4000 chips left. I never saw or met the 4026. There are a few on ebay if you want to prototype :-)

I am guessing that you are simulating an idea which you are going to program. Use a separate 74xx counter and 74xx bcd decoder chip if you must, but I also fail to see the point. And I have stopped thinking in 4xxx logic, because they are not recommended for new designs, to put it mildly.


On 14 December 2013 10:55, <xcheta1@...> wrote:
?

HI there,

I Would like to build a speeometer.
My plan was that i use the CMOS 4026 because i need the Carry Out for my 7-Single-Digit-Nummeric Display but in LTSpice i can?t find the 4026 to Simulate my circiut.
Please help my i search a alternate component for the CMOS 4026 with the same application and where i can use at LTSpice.

Thank you for Help

Xcheta1



A Noisy Question

 

Greetings folks -

I have a question about modeling noise in a real system.

Lets say I start with a uniform distributed sequence of random values with a span of +1 to -1. I know that I can average over N of these values and get a Gaussian sequence with a mean of zero and a standard deviation of 0.5. This much is pretty easy.

Now, these values represent discrete time samples. How do I turn them into real signal that has a defined bandwidth? Yes, I can put the sequence through a low-pass filter, but I have to define a time interval between samples. Do I need to set this time at 1/10X the filter bandwidth? 1/100X? And, does it matter whether I take the values as though the output of a first-order sample/hold, or do linear interpolation between them? Or something else? And, what sort of filtering is normally assumed? Single pole? Two or three poles?

Yes, this is for an LTspice project. And, the reason I am being a bit coy about specific values is that I would like to apply this in a variety of communication systems with varying operating frequencies and bandwidths. In some cases, the system bandwidth will be very broad (maybe 100 MHz) encompassing HF frequencies with lots of ambient noise as well as VHF that is much quieter.

Thanks
Jim Wagner
Oregon Research Electronics