Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Simulation (grumble grumble)

Status
Not open for further replies.
I'm not a simulator user, but from the other side I think sims have issues. Some time back a person simulated one of my 2-transistor buck regulators and could not get the same high performance as the real world circuit.

Part of the issue was simulating the inductor properly as inductors behave in very complex ways, the other part was that the sim program seemed to use datasheet specs for the transistors, and did not have the same high gain and low sat voltage as the real transistors (which far exceeded the datasheet specs). Datasheet specs are usually "worst case" and represent the very worst parts in a batch and/or at the very worst operating conditions etc like very high temps. Also part performance is sometimes improved over time with new manufacturing processes etc, but the datasheet probably left original still showing the very worst case specs.

It's not often a datasheet lists the actual real world "typical" working specs of the component, so where does the simulator company get the specs for the components? I can't imagine they build circuits out of the components and actually test them.
 
I'm not a simulator user, but from the other side I think sims have issues. Some time back a person simulated one of my 2-transistor buck regulators and could not get the same high performance as the real world circuit.

Part of the issue was simulating the inductor properly as inductors behave in very complex ways, the other part was that the sim program seemed to use datasheet specs for the transistors, and did not have the same high gain and low sat voltage as the real transistors (which far exceeded the datasheet specs). Datasheet specs are usually "worst case" and represent the very worst parts in a batch and/or at the very worst operating conditions etc like very high temps. Also part performance is sometimes improved over time with new manufacturing processes etc, but the datasheet probably left original still showing the very worst case specs.
It's not often a datasheet lists the actual real world "typical" working specs of the component, so where does the simulator company get the specs for the components? I can't imagine they build circuits out of the components and actually test them.
Most models provided by simulator companies come from the manufacturers. Transistor models generally have typical characteristics. ICs models are often macromodels, and often don't perform well if used outside their intended use. Still, they are useful to the experienced design engineer.
 
Last edited:
................................

crutschow - The analog part of your "buck regulator" reduces to what - a coil, a diode, a drive transistor, couple of caps and a voltage comparator? I've had no problem simulating coil drivers very much like that, and from an analog standpoint, also very simple.
It was a little more complicated then that. I guess you haven't worked on a "buck regulator" before. :rolleyes:

It also had an op amp compensation circuit in the feedback loop which fed a pulse-width modulator consisting of a ramp generator, comparator, oscillator, and and number of logic circuits. It also contained a hiccup circuit input current limiter and a pulse-by-pulse output current limiter. The output filter consisted of two inductors and two capacitors.

So what type of complex analog circuits, that have dozens of components, have you done where simulation doesn't work properly? So far all you've done is spout platitudes.
 
I'm not a simulator user, but from the other side I think sims have issues. Some time back a person simulated one of my 2-transistor buck regulators and could not get the same high performance as the real world circuit.

Part of the issue was simulating the inductor properly as inductors behave in very complex ways, the other part was that the sim program seemed to use datasheet specs for the transistors, and did not have the same high gain and low sat voltage as the real transistors (which far exceeded the datasheet specs). Datasheet specs are usually "worst case" and represent the very worst parts in a batch and/or at the very worst operating conditions etc like very high temps. Also part performance is sometimes improved over time with new manufacturing processes etc, but the datasheet probably left original still showing the very worst case specs.

It's not often a datasheet lists the actual real world "typical" working specs of the component, so where does the simulator company get the specs for the components? I can't imagine they build circuits out of the components and actually test them.
Building a circuit and using "typical" or better characteristics to determine it's performance is fine for the hobbyist, but not if you want to build reliable circuits for production quantities or high reliability applications. For that you want to use worst-case parameters of the part and the only reasonable way to determine the worst-case performance of a circuit is to simulate it, since it is not practical to buy worst-case parts to test.

Edit: One interesting test that some simulators can do, which is also not possible to do in actual circuits, is to make a Monte Carlo analysis. In that test the parameters of the various circuit components are randomly varied between their worst-case limits while numerous simulations are run. You can then plot the results of many runs to see the effect of the tolerance changes on the circuit performance. Numerous random changes are simulated since it is often difficult when analyzing a complex circuit, to determine which combination of worst-case values, actually gives the worst-case circuit performance.
 
Last edited:
So far all you've done is spout platitudes.

No, a platitude would be more like: "If it's meant to be, it's meant to be." What I'm spouting is more like exasperation.

Anyway, I'll root around through my old designs and post something. Then we can pretend like anybody's going to wire it all up to compare.
 
Building a circuit and using "typical" or better characteristics to determine it's performance is fine for the hobbyist, but not if you want to build reliable circuits for production quantities or high reliability applications. For that you want to use worst-case parameters of the part and the only reasonable way to determine the worst-case performance of a circuit is to simulate it, since it is not practical to buy worst-case parts to test.
...

I'll argue that. I'm mainly known on the forums for my hobby web page but I have made my entire living for the last 12 years as a designer of commercial electronic products, and (in my professinal opinion) the best design practice is to get sample components and build an actual prototype, and then subject it to testing, then use the same parts in production.

I would be very wary about a designer who just sims the design then goes to production as testing a real world prototype is vital in good design practice. Part of the reason I don't bother with sims is that after 35 years in electronics I can quickly do the design on paper, then the prototype has to be done anyway. I would gain very little from adding a simulator step in the process.

...
Edit: One interesting test that some simulators can do, which is also not possible to do in actual circuits, is to make a Monte Carlo analysis. In that test the parameters of the various circuit components are randomly varied between their worst-case limits while numerous simulations are run. You can then plot the results of many runs to see the effect of the tolerance changes on the circuit performance. Numerous random changes are simulated since it is often difficult when analyzing a complex circuit, to determine which combination of worst-case values, actually gives the worst-case circuit performance.

Thnak you. That's a good case of where a sim could be useful. :)
 
I'll argue that. I'm mainly known on the forums for my hobby web page but I have made my entire living for the last 12 years as a designer of commercial electronic products, and (in my professinal opinion) the best design practice is to get sample components and build an actual prototype, and then subject it to testing, then use the same parts in production.

I would be very wary about a designer who just sims the design then goes to production as testing a real world prototype is vital in good design practice. Part of the reason I don't bother with sims is that after 35 years in electronics I can quickly do the design on paper, then the prototype has to be done anyway. I would gain very little from adding a simulator step in the process.
I would be wary of such a designer also. You must always built a prototype before going to production. I never meant to imply otherwise. My point was that simulation allows you to do worst-case evaluation of the circuit performance, which is difficult or impossible otherwise.

If you can do a design on paper and have the circuit work perfectly the first time, that's remarkable. But I don't think many designers are that good (anyway, I know I'm not ;)), especially for circuits involving multiple feedback loops or other complexities. I find that simulation helps me to correct errors in the design or optimize its performance before I build the circuit. That has saved me a lot of time and reworking of the prototype.

I just think there are many who have an unduly negative opinion about Spice simulation. Certainly there's a steep learning curve and it can give erroneous results, so you have to understand the circuit well enough to recognize when the results are off, and I realize that can be a problem for newbies. On the other hand there have been many times when I though the simulation was not right and it turned out it was just my thinking that was off. So I consider it a very useful tool during the initial design phase of a circuit to easily try different circuit variations, detect circuit errors, and optimize the design. It also allow you to probe circuit voltages and currents that can be difficult or impossible to do in the actual circuit. In most cases my actual circuits have operated very close to what the simulation predicted. I never build a circuit, even a simple one, without first simulating it.
 
Those are execelllent points Mr RB and Crutschow!!

Perhaps we need to revisit why we simulate in the first place...

I have been away from electronics design for about 10 years, but was a former electronics CAE administrator
in an R&D department. We used Mentor Graphics simulation tools at that time..

The reason we simulated was not to replace hard prototyping, but to reduce time to market....
There were other reasons that just simulating was not good enough....The effect of PCB materials,
enclosure designs, all came into play, etc..

But those we not reasons NOT to simulate, we simulated anyway to shorten time to market.
Simulation is a good thing!
 
Last edited:
hi Roman,
I would agree with Carl's comments.

A simulator will not design a working circuit, thats the designers job.
The designed circuit is then run in simulation to check it out and also to subject it to changes in parameters.

Quite often the simulation can highlight problem areas, especially ones due to temperature and tolerances in the components.

When I started designing circuits some 57 years ago we did not have simulators and all the calculations were done using a slide rule.
The electronic pocket calculator came into common use in the early 1970's, that made the calculation process a lot quicker and more accurate.

Today we have the PC simulator, which basically does the same calculations as we had to do by hand and I for one would not go back to using a slide rule.!

A simulator is only a high powered, fast and accurate calculator, ie: a tool and like any tool if incorrectly used will give incorrect results ,as will a slide rule or pocket calculator.

I would never go from a successful circuit simulation to a full production run, I dont think any sensible design engineer would.! [ or be allowed too by his employer]

Its Design, Simulation, Rework, Prototype type, Rework, Pilot production batch, Rework, Production.

Of course I am considering the commercial approach, not the hobbyist.
Which I would recommend if a simulator is used as: Design, Simulation, Rework, BBoard ....

Eric
 
Last edited:
OP here... It's been very interesting reading the discussion on this. Well, I've now got myself a solderless breadboard now so can knock up simple circuits really quickly, even though I'm using secondhand parts. Still struggling to get anything useful from simulators - I've tried qucs, ktechlab and LTSpice to make a simple voltage booster (lm393, transistor, diode, choke, c's and r's) which I know works in real life, and quite fed up now.
 
I can recommend you Micro-cap - https://www.spectrum-soft.com/index.shtm. Try making the circuit in there, if you don´t succeed post the schematic here and I will try tweaking the simulation settings to make it work. I am looking forward to see the results, I never had a simulation that didn´t work like I expected it to.
 
It works (using wine, too)! Now I can play with values. Also, more settings in there I don't what to do with (since I trained in repair, not design) than I can shake a stick at... Thanks :D

(since you were interested I've attached a png of the basic schematic. Values weren't calculated, just picked on a "what works, roughly" basis. V2 represents an open collector signal source such as LM323 etc.)
 
...
I just think there are many who have an unduly negative opinion about Spice simulation. Certainly there's a steep learning curve and it can give erroneous results, so you have to understand the circuit well enough to recognize when the results are off, and I realize that can be a problem for newbies. On the other hand there have been many times when I though the simulation was not right and it turned out it was just my thinking that was off. So I consider it a very useful tool during the initial design phase of a circuit to easily try different circuit variations, detect circuit errors, and optimize the design. It also allow you to probe circuit voltages and currents that can be difficult or impossible to do in the actual circuit. In most cases my actual circuits have operated very close to what the simulation predicted. I never build a circuit, even a simple one, without first simulating it.

You've made some good points and likewise Ericgibbs. I'm not really anti-simulator, maybe I'm just a little worried about people getting too "sim happy" especially young people who use a sim in their education and then think that's all they need to know about electronics.

I've seen a bit of this happen on the forum with someone posting a schematic and asking for help on why it doesn't work, then the replies "please post sim files" as if there were no way the people could understand or diagnose the schematic without having sim files.

I think being able to "mentally sim" a schematic is a hugely valuable tool in electronics and it would be a real shame if the new generations lost this ability to actually see the schematic working in their head and see the waveforms and voltages, current paths etc, because they have been spoiled by that convenience of laying out some parts on a computer screen and pressing "go". :)
 
Last edited:
throbscottle I am glad it worked for you. Just a side note, you don´t need to use C2 since V1 is an ideal source and has no internal resistance or other parasitics.
 
I'm an old (71) analog/digital circuit design engineer (retired). I was designing circuits WAY before there were simulators. I simulate all the time now (for fun, and to help noobs), but I understand analog as well as anyone on this forum, so I know qualitatively what to expect in advance. Sometimes you can calculate quantitative performance, but sometimes, with nonlinear circuits, it is difficult or impossible. You get quantitative results with simulations, and they might be different from hardware, but I know that.
Simulation also is great for illustrating a point that might otherwise be hard to explain. How would you like to breadboard the guts of a TTL gate in order to illustrate this point?:D
 
hi,
I take Ron's position regarding explaining a circuit design to a wannabe.
A simple simulation of the OP's proposed circuit can easily show its pro's and con's with the minimum of explanatory text.

I also believe that it helps the OP to visualise what the circuit is actually doing at the different key points in the circuit. I often find it quicker to create a sim for the most basic circuits posted by OP's and use it as an explanation of the circuit, rather than type pages of text.

Taking Roman's point, I would agree that wannabes should not get the idea that the simulator will design the circuit for them. Some LTSpice 'asc' files that have been posted have no chance of working in simulation or in hardware.

E.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top