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

good book, slightly on-topic

Ask a question - edaboard.com

elektroda.net NewsGroups Forum Index - Electronics Design - good book, slightly on-topic

Goto page Previous  1, 2, 3

Phil Hobbs
Guest

Fri Dec 30, 2016 1:27 am   



On 12/29/2016 12:38 PM, John Larkin wrote:
Quote:
On Thu, 29 Dec 2016 03:59:19 GMT, Steve Wilson <no_at_spam.com> wrote:

John Larkin <jjlarkin_at_highlandtechnology.com> wrote:

Even LT Spice sometimes does goofy things. What most people do, when
it is erratic, is fiddle with time steps or solver options or parts
values until we get something that we *think* looks closer to reality,
in other words tells us what we want to hear. But maybe we just made
it worse.

I have been using SPICE since the DOS days. It is excellent at displaying
ideal situations without circuit parasitics such as crosstalk, ground
bounce, circuit noise, EMI and RFI problems, thermal effects, degraded
components, variations in components, and all the other ills that plague
circuit design. It is excellent at showing you how a circuit actually
works, so you can understand what you are really seeing when viewing a
noisy trace on an oscilloscope.

It is extremely good at developing new circuit ideas since you don't have
to waste time soldering and unsoldering various components to test a new
idea. You can view any parameter in a circuit that you wish, such as the
base current in a Colpitts oscillator. You could never do this in
hardware.

You cannot destroy a circuit by operating it beyond component limits. An
actual circuit may be difficult to troublehoot if it only lasts a
microsecond past power on.

But you have to be careful about your models. The simulation is only as
good as the model you supply.

For things like opamps, I don't supply the models. Most IC models are
encrypted, so I have no idea what's inside. I do know that many IC
models are unrealistic. I used one LTC opamp model that could generate
kilovolts on one pin, probably from some internal ideal current
source.

LT Spice defaults to speed over accuracy. Measure the base current of
a 2N2222 at -100 kilovolts on the base.

Spice also tends to dynamically pick big dTs, which can have strange
effects. Connect an L in parallel with a C and goose it to ring.
Measure the period. Compare to the calculated period.


I notice you have made a number of false
assumptions about the capabilities of SPICE, based on models that fail
basic mathematical analysis. SPICE is much better than you think, and you
have used the failure of your models to claim that much larger
simulations are also wrong.

My simulations aren't often wrong, but they are right because I can
spot when Spice is doing weird things, and I *do* fiddle until I think
it's modeling accurately.

One situation when LT Spice is wrong is when there are a wide range of
time constants in a multiple-feedback loop. If you set dT small enough
that the sim is accurate, it will take hours to simulate a millisecond
of real time. With the default dT, it can do crazy things.


That's an example of a "stiff system", which is what the Gear integrator
is designed to help. (It can also hide oscillations, of course!)

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510

hobbs at electrooptical dot net
http://electrooptical.net

Don Y
Guest

Fri Dec 30, 2016 1:50 am   



On 12/29/2016 2:11 AM, Tom Gardner wrote:
Quote:
On 29/12/16 02:54, Don Y wrote:
Really? The weather forecast here is almost always "spot on".

That's because you don't have "weather", you have
"climate with occasional exceptions" :)

Live near/under the jet stream and you will have
weather to the extent that sometimes the forecast
is inaccurate after <6 hours.


The jet stream frequently dips this far south. And,
where (east-west) it dips often moves around a bit
so weather changes are often very dramatic.

E.g., a 30 degree difference from one day to the next
is not uncommon (last week). Nor are 40-50MPH winds
associated with the "fronts" that it ushers through.

This usually alters the *timing* of our weather changes
but not the changes themselves ("Gee, it wasn't supposed
to rain until the morning...")

Beyond that, weather *in* town varies significantly.

Spring comes to our end of the street 2 weeks later than
the other end (< 0.5mi away) as evidenced by when the flowers
(same variety) bloom in the yards of our neighbors up and down
the street). Certain parts of town see much heavier rainfall
and flooding (not because of their topography but, rather,
their relative locations to the mountains immediately
to our north). Our neighborhood is particularly prone to
microbursts as the temperature gradients from the mountains
aggravate the downdrafts during storms.

Monsoon season is essentially a consequence of the heating of
the local land mass by the late summer sun bringing wind
and moisture *up* from Mexico, Baja, etc. The mountains to
our immediate north "squeeze" the moisture out of the air as
it tries to continue northward, over them.

[A monsoon storm is truly exciting to watch; so "angry"]

Etc.


Guest

Fri Dec 30, 2016 4:29 am   



On Thu, 29 Dec 2016 09:38:50 -0800, John Larkin
<jjlarkin_at_highlandtechnology.com> wrote:

Quote:
On Thu, 29 Dec 2016 03:59:19 GMT, Steve Wilson <no_at_spam.com> wrote:

John Larkin <jjlarkin_at_highlandtechnology.com> wrote:

Even LT Spice sometimes does goofy things. What most people do, when
it is erratic, is fiddle with time steps or solver options or parts
values until we get something that we *think* looks closer to reality,
in other words tells us what we want to hear. But maybe we just made
it worse.

I have been using SPICE since the DOS days. It is excellent at displaying
ideal situations without circuit parasitics such as crosstalk, ground
bounce, circuit noise, EMI and RFI problems, thermal effects, degraded
components, variations in components, and all the other ills that plague
circuit design. It is excellent at showing you how a circuit actually
works, so you can understand what you are really seeing when viewing a
noisy trace on an oscilloscope.

It is extremely good at developing new circuit ideas since you don't have
to waste time soldering and unsoldering various components to test a new
idea. You can view any parameter in a circuit that you wish, such as the
base current in a Colpitts oscillator. You could never do this in
hardware.

You cannot destroy a circuit by operating it beyond component limits. An
actual circuit may be difficult to troublehoot if it only lasts a
microsecond past power on.

But you have to be careful about your models. The simulation is only as
good as the model you supply.

For things like opamps, I don't supply the models. Most IC models are
encrypted, so I have no idea what's inside. I do know that many IC
models are unrealistic. I used one LTC opamp model that could generate
kilovolts on one pin, probably from some internal ideal current
source.


Most opamp models will source more power than the power pins sink. If
you believe the simulations, they make nice batteries. Component-level
models are *really* bad. The models chip designers use are at the
other end of the spectrum. If they weren't really good, there
wouldn't be ICs. ;-)

<...>


Guest

Fri Jan 06, 2017 5:34 am   



Quote:
That's an example of a "stiff system", which is what the Gear
integrator is designed to help.  (It can also hide oscillations, of
course!)

You are correct. Gear integration, which is used in PSpice, is horrible.


The Gear integrator is available in all SPICE flavours as far as I know. I used it in LTspice just today. It's very useful in situations with widely spread eigenvalues, provided you're confident that no oscillation is possible. (I'm doing a diode laser/thermoelectric cooler controller board for a customer in Scandinavia.)

Cheers

Phil Hobbs

Steve Wilson
Guest

Fri Jan 06, 2017 8:30 am   



Phil Hobbs <pcdhSpamMeSenseless_at_electrooptical.net> wrote:

[...]

Quote:
That's an example of a "stiff system", which is what the Gear
integrator is designed to help. (It can also hide oscillations, of
course!)


You are correct. Gear integration, which is used in PSpice, is horrible.

Please see SPICE Differentiation, by Mike Engelhardt:

http://preview.tinyurl.com/j4q99t7

Mike's modified trap is far superior. It is the default method in LTspice,
and works much better than Gear or Trapezoid.

Quote:
Cheers

Phil Hobbs


Steve Wilson
Guest

Sun Jan 08, 2017 5:00 pm   



John Larkin <jjlarkin_at_highlandtechnology.com> wrote:

Quote:
On Thu, 29 Dec 2016 03:59:19 GMT, Steve Wilson <no_at_spam.com> wrote:

John Larkin <jjlarkin_at_highlandtechnology.com> wrote:

Even LT Spice sometimes does goofy things. What most people do, when
it is erratic, is fiddle with time steps or solver options or parts
values until we get something that we *think* looks closer to
reality, in other words tells us what we want to hear. But maybe we
just made it worse.

I have been using SPICE since the DOS days. It is excellent at
displaying ideal situations without circuit parasitics such as
crosstalk, ground bounce, circuit noise, EMI and RFI problems, thermal
effects, degraded components, variations in components, and all the
other ills that plague circuit design. It is excellent at showing you
how a circuit actually works, so you can understand what you are
really seeing when viewing a noisy trace on an oscilloscope.

It is extremely good at developing new circuit ideas since you don't
have to waste time soldering and unsoldering various components to
test a new idea. You can view any parameter in a circuit that you
wish, such as the base current in a Colpitts oscillator. You could
never do this in hardware.

You cannot destroy a circuit by operating it beyond component limits.
An actual circuit may be difficult to troublehoot if it only lasts a
microsecond past power on.

But you have to be careful about your models. The simulation is only
as good as the model you supply.

For things like opamps, I don't supply the models. Most IC models are
encrypted, so I have no idea what's inside. I do know that many IC
models are unrealistic. I used one LTC opamp model that could generate
kilovolts on one pin, probably from some internal ideal current
source.

LT Spice defaults to speed over accuracy. Measure the base current of
a 2N2222 at -100 kilovolts on the base.


That is intentional. LTspice does not use the breakdown voltage.

Quote:
Spice also tends to dynamically pick big dTs, which can have strange
effects. Connect an L in parallel with a C and goose it to ring.
Measure the period. Compare to the calculated period.


Your July 2015 model is wrong in many ways. I don't see how you got any
information from it at all.

I extended the analysis from the 25 cycles you used to 99 cycles to get
enough resolution to measure.

At 50us Max Timestep, I measure a difference of 8.51 parts per billion.

At 10us Max Timestep, I measure a difference of 597 parts per trillion.

At 6us Max Timestep, I measure negligible difference, or ~zero parts per
trillion.

Quote:
I notice you have made a number of false
assumptions about the capabilities of SPICE, based on models that fail
basic mathematical analysis. SPICE is much better than you think, and
you have used the failure of your models to claim that much larger
simulations are also wrong.

My simulations aren't often wrong, but they are right because I can
spot when Spice is doing weird things, and I *do* fiddle until I think
it's modeling accurately.


Like your LC Ringing model?

Quote:
One situation when LT Spice is wrong is when there are a wide range of
time constants in a multiple-feedback loop. If you set dT small enough
that the sim is accurate, it will take hours to simulate a millisecond
of real time. With the default dT, it can do crazy things.


Witness the success of designing airplanes. These are obviously multi-
billion dollar projects, and simulating the airflow and dynamic
performance is essential to the success of the project. When the
prototype takes off on its first flight, it is highly instrumented and
they can measure just about every important flight parameter.

Why prototype and why instrument an aircraft if the sim is accurate?

Note that NASA and the big aircraft companies still use wind tunnels.
The turbulent air flow models aren't entirely to be trusted, even with
petaflop supercomputers. Things like wing flutter still surprise
people.


If you
watch the Youtube videos of the flight analysis, they show the result
of dynamic perturbations match the simulations almost exactly.

On Youtube maybe.


So the basic approach of fiddling until you "get something that we
*think* looks closer to reality" is wrong. I have been surprised many
times by finding that a circuit performs much different from what I
expected, and this has led to new appreciations of circuit design and
performance.

If you are surprised "many times" by unexpected circuit behavior, you
are modeling and designing badly.


That is irrational. You have no idea what the circuits are doing or what
I am trying to measure. You have no basis to make such a statement.

Quote:
Just understand your models and their limitations, and you can build
on the new knowledge of a good simulation.

I can't understand an encrypted behavioral model, except by fiddling
with it and judging if its behavior makes sense to me. That's not very
scientific.

The fast circuits - nanosecond and picosecond - I don't usually bother
to model at all; I breadboard that stuff, or just design the product
and see how the first one works.

That's what's fun about electronics to me. It's not all analytical.
There is plenty of room for instinct and lots of cool surprises. I
know things about parts, and the use of parts, that the manufacturers
don't.


John Larkin
Guest

Tue Jan 10, 2017 1:45 am   



On Sun, 08 Jan 2017 10:00:51 GMT, Steve Wilson <no_at_spam.com> wrote:

Quote:
John Larkin <jjlarkin_at_highlandtechnology.com> wrote:

On Thu, 29 Dec 2016 03:59:19 GMT, Steve Wilson <no_at_spam.com> wrote:

John Larkin <jjlarkin_at_highlandtechnology.com> wrote:

Even LT Spice sometimes does goofy things. What most people do, when
it is erratic, is fiddle with time steps or solver options or parts
values until we get something that we *think* looks closer to
reality, in other words tells us what we want to hear. But maybe we
just made it worse.

I have been using SPICE since the DOS days. It is excellent at
displaying ideal situations without circuit parasitics such as
crosstalk, ground bounce, circuit noise, EMI and RFI problems, thermal
effects, degraded components, variations in components, and all the
other ills that plague circuit design. It is excellent at showing you
how a circuit actually works, so you can understand what you are
really seeing when viewing a noisy trace on an oscilloscope.

It is extremely good at developing new circuit ideas since you don't
have to waste time soldering and unsoldering various components to
test a new idea. You can view any parameter in a circuit that you
wish, such as the base current in a Colpitts oscillator. You could
never do this in hardware.

You cannot destroy a circuit by operating it beyond component limits.
An actual circuit may be difficult to troublehoot if it only lasts a
microsecond past power on.

But you have to be careful about your models. The simulation is only
as good as the model you supply.

For things like opamps, I don't supply the models. Most IC models are
encrypted, so I have no idea what's inside. I do know that many IC
models are unrealistic. I used one LTC opamp model that could generate
kilovolts on one pin, probably from some internal ideal current
source.

LT Spice defaults to speed over accuracy. Measure the base current of
a 2N2222 at -100 kilovolts on the base.

That is intentional. LTspice does not use the breakdown voltage.

Spice also tends to dynamically pick big dTs, which can have strange
effects. Connect an L in parallel with a C and goose it to ring.
Measure the period. Compare to the calculated period.

Your July 2015 model is wrong in many ways. I don't see how you got any
information from it at all.

I extended the analysis from the 25 cycles you used to 99 cycles to get
enough resolution to measure.

At 50us Max Timestep, I measure a difference of 8.51 parts per billion.

At 10us Max Timestep, I measure a difference of 597 parts per trillion.

At 6us Max Timestep, I measure negligible difference, or ~zero parts per
trillion.


Sure. You can manually tweak the time step and other things until
Spice generates the result that you know is correct, or more generally
the results that you want.

In a complex system, where you don't know the correct answer, and
where you really need Spice, it's more interesting. About all you can
do about dt is keep reducing it until the sim results stop changing,
or until you like what you see. That sometimes makes runtimes
intolerable.



Quote:

I notice you have made a number of false
assumptions about the capabilities of SPICE, based on models that fail
basic mathematical analysis. SPICE is much better than you think, and
you have used the failure of your models to claim that much larger
simulations are also wrong.

My simulations aren't often wrong, but they are right because I can
spot when Spice is doing weird things, and I *do* fiddle until I think
it's modeling accurately.

Like your LC Ringing model?


Exactly. The default sim was off by several per cent, and it mattered.
Good thing I checked.


Quote:

One situation when LT Spice is wrong is when there are a wide range of
time constants in a multiple-feedback loop. If you set dT small enough
that the sim is accurate, it will take hours to simulate a millisecond
of real time. With the default dT, it can do crazy things.


Witness the success of designing airplanes. These are obviously multi-
billion dollar projects, and simulating the airflow and dynamic
performance is essential to the success of the project. When the
prototype takes off on its first flight, it is highly instrumented and
they can measure just about every important flight parameter.

Why prototype and why instrument an aircraft if the sim is accurate?

Note that NASA and the big aircraft companies still use wind tunnels.
The turbulent air flow models aren't entirely to be trusted, even with
petaflop supercomputers. Things like wing flutter still surprise
people.


If you
watch the Youtube videos of the flight analysis, they show the result
of dynamic perturbations match the simulations almost exactly.

On Youtube maybe.


So the basic approach of fiddling until you "get something that we
*think* looks closer to reality" is wrong. I have been surprised many
times by finding that a circuit performs much different from what I
expected, and this has led to new appreciations of circuit design and
performance.

If you are surprised "many times" by unexpected circuit behavior, you
are modeling and designing badly.

That is irrational. You have no idea what the circuits are doing or what
I am trying to measure. You have no basis to make such a statement.


OK, what are you doing and simulating?


--

John Larkin Highland Technology, Inc
picosecond timing precision measurement

jlarkin att highlandtechnology dott com
http://www.highlandtechnology.com

Goto page Previous  1, 2, 3

elektroda.net NewsGroups Forum Index - Electronics Design - good book, slightly on-topic

Ask a question - edaboard.com

Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
RTV map EDAboard.com map News map EDAboard.eu map EDAboard.de map EDAboard.co.uk map