EDAboard.com | EDAboard.eu | EDAboard.de | EDAboard.co.uk | RTV forum PL | NewsGroups PL

elektroda.net NewsGroups Forum Index - EDA CAD Electronics - **The limits of .ac analysis in LTSpice**

Guest

Thu Jan 08, 2004 1:08 am

Would I be right in thinking that it's a waste of time trying to do a

frequency response sweep of something like a power amplifier with the

AC analysis? If any of the circuit elements need to be explored under

non-linear conditions when 'tuning for maximum smoke' as they say,

then is this beyond any current flavour of Spice?

thanks,

p

--

"I expect history will be kind to me, since I intend to write it."

- Winston Churchill

Guest

Thu Jan 08, 2004 1:23 am

Paul Burridge wrote:

Would I be right in thinking that it's a waste of time trying to do a

frequency response sweep of something like a power amplifier with the

AC analysis? If any of the circuit elements need to be explored under

non-linear conditions when 'tuning for maximum smoke' as they say,

then is this beyond any current flavour of Spice?

thanks,

p

frequency response sweep of something like a power amplifier with the

AC analysis? If any of the circuit elements need to be explored under

non-linear conditions when 'tuning for maximum smoke' as they say,

then is this beyond any current flavour of Spice?

thanks,

p

I would just use Transient Analysis with sinosoidal inputs turned up to

levels where distortion might become an issue. You can use an FFT to

post-process the output waveforms to evaluate them for

harmonics/distortion.

See the attached example:

paste the following to a file called LargeSignal.asc, and open it

with LTSpice

MikeM

-----------------------------

Version 4

SHEET 1 880 680

WIRE 80 224 -32 224

WIRE -32 224 -32 240

WIRE -32 320 -32 352

WIRE -32 352 128 352

WIRE 128 352 128 240

WIRE 128 144 128 128

WIRE 128 32 128 0

WIRE 128 0 272 0

WIRE 272 0 272 176

WIRE 272 352 272 256

WIRE 272 352 128 352

WIRE 128 384 128 352

WIRE 128 128 336 128

WIRE 128 128 128 112

FLAG 128 384 0

FLAG 336 128 out

SYMBOL nmos 80 144 R0

SYMATTR InstName M1

SYMATTR Value IRF7201

SYMBOL res 112 16 R0

SYMATTR InstName R1

SYMATTR Value 10

SYMBOL voltage -32 224 R0

WINDOW 123 0 0 Left 0

WINDOW 39 0 0 Left 0

SYMATTR InstName V1

SYMATTR Value SINE(2.9 0.1 1000)

SYMBOL Misc\\battery 272 160 R0

WINDOW 123 0 0 Left 0

WINDOW 39 0 0 Left 0

SYMATTR InstName V2

SYMATTR Value 12

TEXT -16 384 Left 0 !.tran 5m

Guest

Thu Jan 08, 2004 1:40 am

Paul Burridge wrote:

Would I be right in thinking that it's a waste of time trying to do

a frequency response sweep of something like a power amplifier with

the AC analysis?

a frequency response sweep of something like a power amplifier with

the AC analysis?

No, it's may only be a waste of time if you don't know what you are

doing and are unaware of the effect of operating point on small signal

response.

If any of the circuit elements need to be explored under non-linear

conditions when 'tuning for maximum smoke' as they say, then is this

beyond any current flavour of Spice?

conditions when 'tuning for maximum smoke' as they say, then is this

beyond any current flavour of Spice?

As with any linear circuit, for a power amplifier an ac analysis

would most likely be used to check loop gain and closed loop frequency

response. The only difference with a power amp being that one would

probably want to check response at several dynamic operating points,

not just at quiescence. A poorly designed amplifier may break into

"small-signal" oscillations only with certain loads when driven hard.

What an ac analysis won't do is tell you anything about non-linear

large signal behavior such as recovery from being driven into

saturation. Both ac and transient analyses are indispensable design

tools. -- analog

Download the full featured *free* LTspice circuit simulator at:

http://ltspice.linear.com/software/swcadiii.exe

__________

"The small-signal(linear) AC portion of LTspice computes the AC com-

plex node voltages as a function of frequency. First, the DC operating

point of the circuit is found. Next, linearized small-signal models

for all of the nonlinear devices in the circuit are found for this op-

erating point. Finally, using independent voltage and current sources

as the driving signal, the resultant linearized circuit is solved in

the frequency domain over the specified range of frequencies."

-- the LTspice help file on Dot Commands (.ac)

Guest

Thu Jan 08, 2004 3:43 am

Paul Burridge wrote:

Would I be right in thinking that it's a waste of time trying to do a

frequency response sweep of something like a power amplifier with the

AC analysis? If any of the circuit elements need to be explored under

non-linear conditions when 'tuning for maximum smoke' as they say,

then is this beyond any current flavour of Spice?

frequency response sweep of something like a power amplifier with the

AC analysis? If any of the circuit elements need to be explored under

non-linear conditions when 'tuning for maximum smoke' as they say,

then is this beyond any current flavour of Spice?

For something like a class-C RF amp, it would be useless. However, it

would give an idea of the input-output isolation capability of small

signals when the amp is not being driven.

Guest

Thu Jan 08, 2004 9:44 am

Paul Burridge wrote:

Would I be right in thinking that it's a waste of time trying to do a

frequency response sweep of something like a power amplifier with the

AC analysis?

frequency response sweep of something like a power amplifier with the

AC analysis?

No.

Its very useful, but does not contain the full story. In addition the

small signal ac distortion capability of spice gives can give a

reasonable quick guide of distortion over a range of frequencies.

If any of the circuit elements need to be explored under

non-linear conditions when 'tuning for maximum smoke' as they say,

then is this beyond any current flavour of Spice?

non-linear conditions when 'tuning for maximum smoke' as they say,

then is this beyond any current flavour of Spice?

Dont understand what you are saying here. Non-linear/large signal

conditions are handled in spice by a transient run. One can then use

this data to do an FFT to obtain a spot frequency measuring of

distortion.

Kevin Aylward

salesEXTRACT_at_anasoft.co.uk

http://www.anasoft.co.uk

SuperSpice, a very affordable Mixed-Mode

Windows Simulator with Schematic Capture,

Waveform Display, FFT's and Filter Design.

That which is mostly observed, is that which replicates the most.

http://www.anasoft.co.uk/replicators/index.html

Guest

Thu Jan 08, 2004 1:55 pm

In sci.electronics.design Kevin Aylward <kevindotaylwardEXTRACT_at_anasoft.co.uk> wrote:

Dont understand what you are saying here. Non-linear/large signal

conditions are handled in spice by a transient run. One can then use

this data to do an FFT to obtain a spot frequency measuring of

distortion.

conditions are handled in spice by a transient run. One can then use

this data to do an FFT to obtain a spot frequency measuring of

distortion.

Makes you wonder why Berkeley never implemented Harmonic Balance in SPICE ;-)

--

Rick

Guest

Thu Jan 08, 2004 2:29 pm

Rick wrote:

In sci.electronics.design Kevin Aylward

kevindotaylwardEXTRACT_at_anasoft.co.uk> wrote:

Dont understand what you are saying here. Non-linear/large signal

conditions are handled in spice by a transient run. One can then use

this data to do an FFT to obtain a spot frequency measuring of

distortion.

Makes you wonder why Berkeley never implemented Harmonic Balance in

SPICE

kevindotaylwardEXTRACT_at_anasoft.co.uk> wrote:

Dont understand what you are saying here. Non-linear/large signal

conditions are handled in spice by a transient run. One can then use

this data to do an FFT to obtain a spot frequency measuring of

distortion.

Makes you wonder why Berkeley never implemented Harmonic Balance in

SPICE

Not really. They were mostly students, so no doubt they were down the

pub, attempting to pick up women.

Kevin Aylward

salesEXTRACT_at_anasoft.co.uk

http://www.anasoft.co.uk

SuperSpice, a very affordable Mixed-Mode

Windows Simulator with Schematic Capture,

Waveform Display, FFT's and Filter Design.

"That which is mostly observed, is that which replicates the most".

http://www.anasoft.co.uk/replicators/index.html

"quotes with no meaning, are meaningless" - Kevin Aylward.

Guest

Thu Jan 08, 2004 2:40 pm

In sci.electronics.design Kevin Aylward <kevindotaylwardEXTRACT_at_anasoft.co.uk> wrote:

Rick wrote:

Makes you wonder why Berkeley never implemented Harmonic Balance in

SPICE ;-)

Not really. They were mostly students, so no doubt they were down the

pub, attempting to pick up women.

Makes you wonder why Berkeley never implemented Harmonic Balance in

SPICE ;-)

Not really. They were mostly students, so no doubt they were down the

pub, attempting to pick up women.

Spice Girls, obviously.

--

Rick

Guest

Thu Jan 08, 2004 10:31 pm

On Thu, 08 Jan 2004 12:55:01 GMT, Rick <broken_at_broken.com> wrote:

In sci.electronics.design Kevin Aylward <kevindotaylwardEXTRACT_at_anasoft.co.uk> wrote:

Dont understand what you are saying here. Non-linear/large signal

conditions are handled in spice by a transient run. One can then use

this data to do an FFT to obtain a spot frequency measuring of

distortion.

Makes you wonder why Berkeley never implemented Harmonic Balance in SPICE

Dont understand what you are saying here. Non-linear/large signal

conditions are handled in spice by a transient run. One can then use

this data to do an FFT to obtain a spot frequency measuring of

distortion.

Makes you wonder why Berkeley never implemented Harmonic Balance in SPICE

How (in simple terms) do harmonic-based simulators function which

makes them better than spice for RF stuff?

--

My opinion is worth what you've paid for it.

Guest

Fri Jan 09, 2004 12:03 am

On Wed, 07 Jan 2004 17:23:51 -0700, mikem

<mladejov_at_CharlieEchoDelta.utah.edu> wrote:

Paul Burridge wrote:

Would I be right in thinking that it's a waste of time trying to do a

frequency response sweep of something like a power amplifier with the

AC analysis? If any of the circuit elements need to be explored under

non-linear conditions when 'tuning for maximum smoke' as they say,

then is this beyond any current flavour of Spice?

thanks,

p

I would just use Transient Analysis with sinosoidal inputs turned up to

levels where distortion might become an issue. You can use an FFT to

post-process the output waveforms to evaluate them for

harmonics/distortion.

See the attached example:

Would I be right in thinking that it's a waste of time trying to do a

frequency response sweep of something like a power amplifier with the

AC analysis? If any of the circuit elements need to be explored under

non-linear conditions when 'tuning for maximum smoke' as they say,

then is this beyond any current flavour of Spice?

thanks,

p

I would just use Transient Analysis with sinosoidal inputs turned up to

levels where distortion might become an issue. You can use an FFT to

post-process the output waveforms to evaluate them for

harmonics/distortion.

See the attached example:

Thanks, Mike, I ran your example and it nicely illustrates clipping

and gate threshold biasing, but I'm quite happy with TA; have no

insurmountable problem with it and it's info on the correct use of

*.AC* that I need to acquire.. Perhaps I haven't expressed myself

adequately. it has been known. I

I've read the technical explanation of what it does as provided in the

LT spice help file but... I try to rephrase it.

--

My opinion is worth what you've paid for it.

Guest

Fri Jan 09, 2004 3:34 am

On Thu, 08 Jan 2004 21:31:27 +0000, Paul Burridge

<pb_at_osiris1.notthisbit.co.uk> wrote:

On Thu, 08 Jan 2004 12:55:01 GMT, Rick <broken_at_broken.com> wrote:

In sci.electronics.design Kevin Aylward <kevindotaylwardEXTRACT_at_anasoft.co.uk> wrote:

Dont understand what you are saying here. Non-linear/large signal

conditions are handled in spice by a transient run. One can then use

this data to do an FFT to obtain a spot frequency measuring of

distortion.

Makes you wonder why Berkeley never implemented Harmonic Balance in SPICE

In sci.electronics.design Kevin Aylward <kevindotaylwardEXTRACT_at_anasoft.co.uk> wrote:

Dont understand what you are saying here. Non-linear/large signal

conditions are handled in spice by a transient run. One can then use

this data to do an FFT to obtain a spot frequency measuring of

distortion.

Makes you wonder why Berkeley never implemented Harmonic Balance in SPICE

That was a matter of timing, I think. Berkeley had Tom Quarles

working on doing SPICE3 about the same time Ken Kundert was working on

the original (Berkeley) Spectre. I think Ken didn't want SPICE's

baggage, and there was a bit of rivalry there. But that was before

the Krylov methods had been turned into a tool for beating down the

harmonic balance problem. But there are a few industrial circuit

simulators that have, basically, SPICE + harmonic balance.

How (in simple terms) do harmonic-based simulators function which

makes them better than spice for RF stuff?

makes them better than spice for RF stuff?

Harmonic balance solves Kirchoff's equations in the frequency domain,

for as many harmonics as you can afford. The models used are the

standard nonlinear models like those used for transient analysis; AC

analysis linearizes about a single operating point. The result is a

spectrum of the circuit at steady-state, taking into account all the

effects one expects to see from the nonlinearities, similar to what

one would get from FFT'ing the 'final' period of a transient analysis.

Except: multiple nonrelated tones can be used, and for this type of

simulation the appropriate transient analysis could be measured in

geological time. The steady-state spectrum can be considered as a

time-varying operating point for further analysis, such as periodic

noise analysis.

Anyway, most of the standard measures of RF circuit 'goodness' are in

the frequency domain and are best done in harmonic balance: IP3, IM

calculations, etc. are done most easily as sweeps or sequences of

harmonic balance simulations.

Guest

Fri Jan 09, 2004 10:56 am

On Fri, 09 Jan 2004 02:34:52 GMT, Steve Hamm

<nobody_home_at_austin.rr_no_way.com> wrote:

Harmonic balance solves Kirchoff's equations in the frequency domain,

for as many harmonics as you can afford. The models used are the

standard nonlinear models like those used for transient analysis; AC

analysis linearizes about a single operating point. The result is a

spectrum of the circuit at steady-state, taking into account all the

effects one expects to see from the nonlinearities, similar to what

one would get from FFT'ing the 'final' period of a transient analysis.

Except: multiple nonrelated tones can be used, and for this type of

simulation the appropriate transient analysis could be measured in

geological time. The steady-state spectrum can be considered as a

time-varying operating point for further analysis, such as periodic

noise analysis.

Anyway, most of the standard measures of RF circuit 'goodness' are in

the frequency domain and are best done in harmonic balance: IP3, IM

calculations, etc. are done most easily as sweeps or sequences of

harmonic balance simulations.

for as many harmonics as you can afford. The models used are the

standard nonlinear models like those used for transient analysis; AC

analysis linearizes about a single operating point. The result is a

spectrum of the circuit at steady-state, taking into account all the

effects one expects to see from the nonlinearities, similar to what

one would get from FFT'ing the 'final' period of a transient analysis.

Except: multiple nonrelated tones can be used, and for this type of

simulation the appropriate transient analysis could be measured in

geological time. The steady-state spectrum can be considered as a

time-varying operating point for further analysis, such as periodic

noise analysis.

Anyway, most of the standard measures of RF circuit 'goodness' are in

the frequency domain and are best done in harmonic balance: IP3, IM

calculations, etc. are done most easily as sweeps or sequences of

harmonic balance simulations.

So the upshot being that whereas a real world RF circuit might throw

out all sorts of spurii, a Spice simulation of it would only show one,

principal signal; the HB method shows all the crap as well; like you'd

see of the real circuit had you used an oscilloscope of suitably high

bandwidth to view it? Is that a consequence of what you're saying?

--

My opinion is worth what you've paid for it.

Guest

Fri Jan 09, 2004 11:58 am

Paul Burridge wrote:

On Fri, 09 Jan 2004 02:34:52 GMT, Steve Hamm

nobody_home_at_austin.rr_no_way.com> wrote:

Harmonic balance solves Kirchoff's equations in the frequency domain,

for as many harmonics as you can afford. The models used are the

standard nonlinear models like those used for transient analysis; AC

analysis linearizes about a single operating point. The result is a

spectrum of the circuit at steady-state, taking into account all the

effects one expects to see from the nonlinearities, similar to what

one would get from FFT'ing the 'final' period of a transient analysis.

Except: multiple nonrelated tones can be used, and for this type of

simulation the appropriate transient analysis could be measured in

geological time. The steady-state spectrum can be considered as a

time-varying operating point for further analysis, such as periodic

noise analysis.

Anyway, most of the standard measures of RF circuit 'goodness' are in

the frequency domain and are best done in harmonic balance: IP3, IM

calculations, etc. are done most easily as sweeps or sequences of

harmonic balance simulations.

So the upshot being that whereas a real world RF circuit might throw

out all sorts of spurii, a Spice simulation of it would only show one,

principal signal;

nobody_home_at_austin.rr_no_way.com> wrote:

Harmonic balance solves Kirchoff's equations in the frequency domain,

for as many harmonics as you can afford. The models used are the

standard nonlinear models like those used for transient analysis; AC

analysis linearizes about a single operating point. The result is a

spectrum of the circuit at steady-state, taking into account all the

effects one expects to see from the nonlinearities, similar to what

one would get from FFT'ing the 'final' period of a transient analysis.

Except: multiple nonrelated tones can be used, and for this type of

simulation the appropriate transient analysis could be measured in

geological time. The steady-state spectrum can be considered as a

time-varying operating point for further analysis, such as periodic

noise analysis.

Anyway, most of the standard measures of RF circuit 'goodness' are in

the frequency domain and are best done in harmonic balance: IP3, IM

calculations, etc. are done most easily as sweeps or sequences of

harmonic balance simulations.

So the upshot being that whereas a real world RF circuit might throw

out all sorts of spurii, a Spice simulation of it would only show one,

principal signal;

No. Spice will generate the same IMD from multi-tones, but the lower

level products are easily lost in numerical noise, and are a pain to

extract with FFT.

the HB method shows all the crap as well; like you'd

see of the real circuit had you used an oscilloscope of suitably high

bandwidth to view it? Is that a consequence of what you're saying?

see of the real circuit had you used an oscilloscope of suitably high

bandwidth to view it? Is that a consequence of what you're saying?

HB is best for time-varying circuits with one principle

large signal and any number of smaller signals.

Guest

Sat Jan 10, 2004 1:04 am

On Fri, 09 Jan 2004 21:58:32 +1100, Russell Shaw

<rjshaw_at_iprimus.com.au> wrote:

HB is best for time-varying circuits with one principle

large signal and any number of smaller signals.

large signal and any number of smaller signals.

Best why? Is it simply _faster_ or is it more revealing in some way?

--

My opinion is worth what you've paid for it.

Guest

Sat Jan 10, 2004 3:33 am

Paul Burridge wrote:

On Fri, 09 Jan 2004 21:58:32 +1100, Russell Shaw

rjshaw_at_iprimus.com.au> wrote:

HB is best for time-varying circuits with one principle

large signal and any number of smaller signals.

Best why? Is it simply _faster_ or is it more revealing in some way?

rjshaw_at_iprimus.com.au> wrote:

HB is best for time-varying circuits with one principle

large signal and any number of smaller signals.

Best why? Is it simply _faster_ or is it more revealing in some way?

More dynamic range. Small signals aren't lost in noise.

elektroda.net NewsGroups Forum Index - EDA CAD Electronics - **The limits of .ac analysis in LTSpice**