22
\$\begingroup\$

I understand that it is common practice in electronic design to simulate a circuit in some spice program before building it. Sometimes a project requires the use of complex ICs, for instance an IC which performs charge control for a Li-Po battery or an IC which acts as PWM controller. Manufacturers generally don't make spice models of these sorts of complex components available. I would like to find out from any electronics engineers/designers what they do in this situation. How do you simulate such a circuit? Or is it more a case of working with the manufacturer designs provided in the application section of the datasheet and trusting that the designs will work. Maybe you abstract these ICs and simulate other portions of your circuit with the kind of output signal they would provide?

I would appreciate any real world practical examples from your experience in electronic design to illustrate how you approach simulation of circuits which make use of off the shelf ICs which do not have spice models available.

\$\endgroup\$
  • \$\begingroup\$ Charge control -> PWM doesn't sound that bad IMHO. I would try to build up the IC with ideal function blocks and look-up-tables (things which are fast to simulate) and see if that would get me close enough. If not, there are ways to combine VHDL and analog in the same simulation. How accurate do you need it? \$\endgroup\$ – winny Apr 9 at 11:09
  • \$\begingroup\$ There are mixed-signal simulators. \$\endgroup\$ – analogsystemsrf Apr 9 at 11:31
32
\$\begingroup\$

In my experience the widespread use of simulation of entire boards is mostly a myth outside of physics simulations in RF.

Simulation rules for IC design of course, because the prototyping costs are so insane, and for anything involving HDL design, but for general electronics, not so much.

Where the sim really helps is for things like filters and control loops where you really want to make sure the breakpoints and phase shifts are what you expected, but these are typically a small blob of a half dozen or so parts that you can simulate in isolation.

Attempts to simulate an entire board of reasonable complexity tend to fail either on numerical stability or just simply on run time, which explodes once you start adding reasonable parasitics.

Generally you simulate the bits you are not sure about, which is usually less then 10% of a design (The rest is 'data sheet engineering' of power supplies and IO stuff).

\$\endgroup\$
  • \$\begingroup\$ Most actual real-world electronics designers prototype physical circuits on breadboards instead of simulate. I do know of a few exceptions though: Apple uses Verilog to design boards so simulation is almost built-in \$\endgroup\$ – slebetman Apr 10 at 9:35
  • 1
    \$\begingroup\$ Well I don't do breadboards (Nasty, unreliable, capacitive things), but yea dead bugging something over a bit of scrap copper clad as a groundplane is fairly normal around here. I have pre cut 0.4mm thick pcb traces in various widths (impedances) that I can just glue down as needed. \$\endgroup\$ – Dan Mills Apr 10 at 10:24
15
\$\begingroup\$

Although a lot of tools exist, the two primary forms of simulation are analog (SPICE, LTSPICE or Simetrix for example) and signal integrity (with something like Hyperlynx if you have very deep pockets).

There are power analysis tools, but I have seen some very odd results that do not apparently equate with physical reality.

There are mixed signal tools, although the digital side tends to be behavioural.

The problems we run up against are:

1 No simulation model exists for the part. If you have a complete datasheet you can make a decent stab at rolling your own or use a part that does have a model. Rolling your own model for anything non-trivial is a very time consuming exercise.

Note that anything beyond a primitive (diode, transistor or simple passive) is a behavioural model that reflects device operation in the continuous state. See this application note for what is actually in such a model. Note that things like ferrites and chokes are very complex; although they can be modeled as a circuit (to achieve the response in the datasheet) it can be very time consuming.

2 Run time. I simulated the entire power path for an ejection seat to include the EEDs and thermal batteries as part of an independent safety review of the sequencer electronics. As the cables to the control and firing circuits were quite long, they were modeled as loosely coupled transformer windings. The circuit contained perhaps 40 elements and took (on a multi-core high end machine) over 30 hours to do a single transient run.

3 Some parts of the circuitry are not really suitable for simulation or should not need it. If I have a simple optocoupled isolation stage to toggle a control switch, it should not need simulation if the data sheets have been used properly (of course, that is a completely different subject as I have seen many designs where that was not the case).

4 In Signal Integrity simulation, most simulators do not take into account that controlled impedances are +/-10% at best, and will vary layer to layer. Such simulations are useful to see gross issues, but you can still get bitten by such details. In addition, most simulators cannot model the return path (although post layout simulations are getting better).

5 Virtually all simulation models are compromises to reflect the most common use case; I have had to modify models significantly to see corner case behaviour.

A full board (or often multi-board) system would be prohibitive in terms of time to actually run, so only the parts we are interested in checking are simulated.

Another issue is that for macro-models, start-up behaviour is undefined in many cases and no simulator in the world will help if start-up behaviour is critical (as it can be in flight safety critical equipment) - you simply have to measure it.

Simulations can certainly help designers, but they are not anywhere close to perfect and should not be relied on for actual circuit operation; they are indicative of circuit operation.

\$\endgroup\$
11
\$\begingroup\$

When using such ICs, I find myself often following the "cookbook" of the manufacturer. This should lead to a working circuit in most cases and often you have a circuit you can more or less integrate into your design as is.

But in some cases, I also build a SPICE model for a part of the circuit with its external components. E.g. feedback loop frequency response in a voltage regulator, comparator inputs with internally switched current sources. In this cases I use ideal elements from the Spice library and add the specified characteristics from the datasheet to it, e.g. input leakage, capacitance, ESD diodes. For digital highspeed devices, the manufacturer provides often so called IBIS models, which model the electrical behaviour of the inputs/outputs. This allows for signal integrity analyses (which may include the PCB as a component).

While generally it may be true that you often won't find more complex SPICE models available, I would like to mention Linear Technology/LTspice as an exception, they provide models for ICs like PWM controllers. Other manufacturers offer you web- or spreadsheet based design tools which allow you e.g. efficiency calculations.

\$\endgroup\$
10
\$\begingroup\$

I understand that it is common practice in electronic design to simulate a circuit in some spice program before building it.

I haven't seen whole-board simulation being used except for small, simple circuits. Instead, the whole board is analyzed in parts, and most appropriate methods are used for each part. For example, a typical microcontroller based system might be analyzed like this:

  • Switching mode power supply would be simulated in SPICE
  • Battery charger based on IC would be designed based on datasheet and manual calculations
  • Microcontroller would be connected according to datasheet or manufacturer example schematic
  • Radio antenna would be simulated in specialized RF simulator, or designed according to specifications a manufacturer has already verified

And any constraints between the parts would be verified manually, such as "microcontroller needs at least 200 mA supply" and "SMPS must handle 500 mA load".

\$\endgroup\$
2
\$\begingroup\$

In my limited experience, I have found that I do not need to simulate an entire system. Generally, there is only one small portion of the circuit that is hard to understand. And for that, the demo version of spice is usually enough. Likewise, in finite element modeling, there is only one small portion of the antenna structure that is hard to understand, so the demo version of FEMAP is sufficient.

As for your particular simulation problem, spice has provisions for you to construct your own model of whatever device you like. Alas, this requires a somewhat deeper understanding to get good results, but it can be done. (I don't remember if the demo version of spice supports this.)

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.