Spice simulation - Page 104 - diyAudio
Go Back   Home > Forums > Design & Build > Software Tools

Software Tools SPICE, PCB CAD, speaker design and measurement software, calculators

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 17th February 2011, 04:21 AM   #1031
diyAudio Member
 
keantoken's Avatar
 
Join Date: Aug 2006
Location: Texas
Blog Entries: 2
My guess is that MJL's method is an approximation. In one of my simulations, MJL's method shows a big resonance at around 100MHz, while with the loopgain2 method it doesn't. Don't wanna put the schematic out here though...

In my understanding, -90d is the theoretical optimum, but -100d provides a big performance boost without sacrificing a significant amount of stability. Sort of like the trivial difference between a damping factor of 200 and one of 20000.

- keantoken
  Reply With Quote
Old 18th February 2011, 01:21 AM   #1032
Account disabled at member's request
 
MJL21193's Avatar
 
Join Date: Mar 2007
Quote:
Originally Posted by keantoken View Post
My guess is that MJL's method is an approximation.
First, it's not MY method, it's the Middlebrook method of loop gain measurement. Second, it was Andy_c who schooled me on it (OS at the same time, back in his 'frugal amp' thread) and he didn't mention that it was an approximation.
With that said, everything we do in simulation is just that - an approximation. I can say that my Patchwork amp seems to perform as modeled, stability wise.
  Reply With Quote
Old 18th February 2011, 03:07 AM   #1033
diyAudio Member
 
keantoken's Avatar
 
Join Date: Aug 2006
Location: Texas
Blog Entries: 2
The first loopgain.asc file uses Middlebrook method, from 1975. The second one says it's "more accurate" and references a paper from 2001.

- keantoken
  Reply With Quote
Old 20th February 2011, 11:50 AM   #1034
Account disabled at member's request
 
MJL21193's Avatar
 
Join Date: Mar 2007
Quote:
Originally Posted by keantoken View Post
The first loopgain.asc file uses Middlebrook method, from 1975. The second one says it's "more accurate" and references a paper from 2001.
'More accurate' by how much?
You've no doubt heard the expression 'fruit of the poison tree' - this applies to simulation. Unless your device models are accurate, and the way the simulator implements them is realistic, you can throw any supposed accuracy gain out of the window.
If there is one thing I have learned it's not to blindly trust what the sim is giving as results. Chances are they are just a rudimentary representation of reality.

Last edited by MJL21193; 20th February 2011 at 12:08 PM.
  Reply With Quote
Old 20th February 2011, 03:41 PM   #1035
diyAudio Member
 
Join Date: Jan 2011
I've been discussing this with Helmut and Frank Wiedmann in the ltspice yahooo group. They have been very helpful.

I learned that the voltage-only probe as originally shown by keantoken is an apporximation which yields results nearly identical to the Middlebrook results. I see very inconsequential differences at frequencies above a MHz, and none at lower frequencies.

I had another problem in my simulation that made my original results widely different.

On another topic...

Hey MJL, I though of you when working on a fried Carvin R1000 bass amp. It's a monster! No, not because of that. I was surprised to see it used, you guessed it... the MJL12293/21194 pair for the outputs. But I was wondering, have you considered updating your handle to maybe MJL4281, er... no, I mean MJL4302 because I know you're the positive type.
  Reply With Quote
Old 20th February 2011, 05:05 PM   #1036
Account disabled at member's request
 
MJL21193's Avatar
 
Join Date: Mar 2007
Thought so.

Very perceptive of you to spot the positive nature of my persona. I had a tough time weighing the potential benefits of one against the possible drawbacks of the other. NPN seems more manly but has that negative connotation. PNP seems mostly positive but I didn't want to have the 'he has a gay name' label hung off me...
  Reply With Quote
Old 21st February 2011, 12:34 AM   #1037
diyAudio Member
 
keantoken's Avatar
 
Join Date: Aug 2006
Location: Texas
Blog Entries: 2
I used both methods and I've attached OLG plots derived from one of my more interesting designs with each. It may depend on your circuit. Perhaps simulation is not accurate at 100MHz, but if I designed a slower circuit it may be down 40 or 20MHz. The first plot is with Middlebrook and the second is with the newer method. Also of note is that the second method is less optimistic on phase margin.

Square wave plots reveal not a hint of 100MHz resonance, so I conclude the second method is correct. I wouldn't play with accuracy, but I would say it's simply appropriate and that the first method simply isn't, and if the two methods give different results then one must be more accurate than the other, for the input given.

EDIT: used new images to make sure they are both from an identical simulation; this time the amp is driving a BetsyK speaker model.

- keantoken
Attached Images
File Type: png WeirdOLG_Middlebrook.png (18.0 KB, 368 views)
File Type: png WeirdOLG_TianEtAl.png (19.0 KB, 366 views)

Last edited by keantoken; 21st February 2011 at 12:46 AM.
  Reply With Quote
Old 15th May 2011, 06:36 PM   #1038
diyAudio Member
 
unclejed613's Avatar
 
Join Date: Dec 2006
ok, i've done a search and come up empty....
looking for useable models for 2SC2240 and 2SA949. i'm trying to model a certain recent model Onkyo amp, that uses a goofy configuration on the input stage. i say goofy, because at first glance it looks like a current mirror. upon closer inspection, the diff amp (LTP) is cascoded, but the cascode gets it's reference voltage from a voltage divider (two resistors) and not a diode or zener stabilized reference. other transistors used in the amp are 2SC3423, 2SA1360, 2SC2229 2SA933, 2sc3423. there are also 4 "house numbered" devices that i'm going to just take a guess at what they are. but they're drivers and outputs, and it's the input stage i'm trying to figure out.
__________________
Vintage Audio and Pro-Audio repair ampz(removethis)@sohonet.net
spammer trap: spammers must die
  Reply With Quote
Old 2nd August 2011, 04:23 PM   #1039
diyAudio Member
 
Join Date: Aug 2011
Quote:
Originally Posted by GRollins View Post
John,
I call the phenomenon Science as Religion (I'll get the Nobel Prize for the concept someday). The irony is intentional. People who treat science as Revealed Truth refuse to question things in a manner precisely analogous to the most fervent religious zealot refusing to face the problems inherent in his faith. And, exactly as one would expect, they condemn most bitterly those who question the underpinnings of their faith as heretics, unbelievers, and worshipers of false gods.
Not to mention purveyors of snake oil.
I agree. But the issue here is I think simply lack of understanding. Any sort of an electronic/electromagnetic simulator eventually just gets a whole bunch of differential equations and integrates them, and perhaps does a linear system solution too (for FEM). The math behind that is well known, and the shortcomings of numerical approximations are known too, but not in all circles, though. Numerical methods are very hard to get right, that's what science tells us. As soon as you apply them to, say, circuit simulation, it gets even harder.

People who look at a simulation result like if it was holy scripture are simply deeply confused and idolize things that shouldn't be. Something is to be said about trying not to idolize things, no matter if you're religious or not. Simply because something is a result of calculations doesn't mean it's "scientific". Results could be called "scientific" if you follow the strict protocol of fully understanding what's going on at each step of computations, and know the limits of the methods and their impact on the results. This applies to simulations and real-life measurements, too.

On top of that, most simulations are done completely in absence of any input from how the prototype will look like. A state of the art simulation takes into account the physical layout of the prototype. In general, an EM solver is used to get a network of parasitics. Then the network is run through a simplifier, so that instead of tens of millions of Ls and Cs, some very tiny, you get perhaps thousands with saner values that make up an equivalent circuit. And this is run through SPICE. In absence of an EM solver, you use engineering experience and some measurements on a partial prototype to see what the ballparks are. I always look in horror at spice schematics posted in this forum, since it's usually not clear whether, say, decoupling caps have real-life parasitics entered. It's very easy to get milliohm "output impedances" when you use caps that don't exist, traces that don't exist, and generally idealize the heck out of everything... I beg everyone to show the parameter lines for all non-ideal devices on a circuit schematic. Otherwise I can't help but assume they are ideal (no ESR, no ESL, etc), and that the simulation is a pipe dream.

Plenty of models used in simulation are quite simplistic. For example all of the non-generic OPAMPs in LTSpice give rubbish when you run a noise simulation; you have to substitute them with generic library opamps set to equivalent noise densities. And that's just a very basic thing that could have been done right.
  Reply With Quote
Old 27th September 2011, 08:58 PM   #1040
klewis is offline klewis  United States
diyAudio Member
 
klewis's Avatar
 
Join Date: Sep 2007
Blog Entries: 36
I'm try to simulate a line filter. You'll see my schematic below. I don't know if I'm even close to having a correct schematic relative to how spice sees this circuit. When I just use the inductors and no caps, it wants a ground somewhere, so, I put the ground between the two caps. I can't get much current to pass through R3 regardless of how small a value I place here. Ideally I want to see the behavior with a 3 to 6 amp load. All help appreciated.

Ken
Attached Images
File Type: png 2011-09-27_1352.png (23.7 KB, 110 views)
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with Spice simulation overmind Everything Else 4 23rd December 2002 04:58 PM


New To Site? Need Help?

All times are GMT. The time now is 02:25 PM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2