Monday, January 1, 2024

Welcome to NL5

This blog is an "informal" part of NL5 Circuit Simulator website. I'm going to explain what NL5 is, how is it different from popular (Spice-based) simulation tools, and why it worth trying.

It turned out that in Spice-dominating world many people undervalue, or simply are not aware of apparent benefits of simulation with "ideal" components. Some people strongly oppose the whole idea of "ideal" simulation, some people love it. I believe, both "real" and "ideal" simulation approaches make sense, as long as you understand what you are doing: "use right tool for right task".
Thanks.

Friday, February 8, 2013

More Sidelinesoft products

I'd like to introduce couple more Sidelinesoft products related to NL5.

idealCircuit: an analog circuit simulator working with true ideal components. Uses exactly the same unique and robust algorithm as NL5. However, it is simplified as much as possible: very simple and intuitive interface, fewer components and models, no fancy and powerful features that are only useful for specialized applications.

ideal-Z:  a simple impedance calculator with graphical schematic entry. Drop components onto the schematic, connect them, set values, and the impedance is calculated instantaneously. Also based on part of NL5 algorithm.

Tuesday, December 11, 2012

NL5: borrowing from "digital" world

A new feature is available in NL5 ver. 1.91: Z-transform method for low signal AC analysis.

It is an interesting one: z-domain analysis is typically used for discrete time signals, which is typical for digital circuits, but definitely not for continuous "analog" world. However, it happens that it might be working good enough for continuous periodical (or quasi-periodical) signals as well. Of course, there are some limitations, and the user should be very careful looking at the results.

Simulation time saving is huge: z-transform would be hundred or even thousand times faster than standard "Sweep AC source" method. Such an improvement is probably worth spending some time to learn basics of discrete time analysis, or at least what Nyquist frequency is.
 

Monday, January 30, 2012

NL5: step into a real world

What? "Ideal" simulator finally simulates "real" circuits? Not yet...

Components are still ideal. What you can do now is import real scope data, and:
- apply it to you circuit (use it as a "stimulus": voltage or current source signal);
- compare real data with simulation results of an ideal circuit;
- simply use unique NL5 tools and graphical capabilities to explore real data.

Wednesday, September 28, 2011

NL5: simulate circuits that do not exist

The question I've got from the visitor at ECCE-2011 Exposition: "Simulator with ideal components? Why would anybody need components that do not exist?".

The answer is simple and obvious: "To simulate circuits that do not exist".

With standard SPICE-based simulators, a result of the simulation is considered correct if it matches a known real circuit's behavior. What if real circuit does not exist yet? When you design a new principle, a new topology: how can you make sure the idea is feasible? That's what ideal components are used for.

Making everything as simple as possible, you eliminate problems caused by complex models, methods, and algorithms. Starting with ideal components gives you much more confidence that simulation results you see on the screen is true behavior of your circuit - even if the circuit does not exist.

Thursday, July 28, 2011

Sunday, April 3, 2011

Is there any other Simulator with ideal components?

Recently I tested PLECS: the last non-SPICE type simulator for switching circuits I'm aware of. As I expected, it could not simulate none of my test circuits: voltage multiplier, charge pump, circuits with discontinuous inductor current.

I was surprised, since they do have true "ideal" components: switches and diodes with zero/infinite impedance. However, in almost all circuits you have to add either small resistor in series, or large resistor in parallel to those components, so that I don't understand what is the use of those components at all. You cannot, for example, instantaneously connect voltage source and capacitor charged to different voltage: it has to be done through non-zero resistor or limited current source. Same for interrupting current through the inductor. For "ideal" diodes there is special parameter "turn-on threshold", which could be different than diode forward voltage. Some circuits simply stuck in the middle of simulation: same "old good SPICE" convergence problem? This is very confusing.

Originally PLECS was designed to work with MATLAB as Simulink toolbox; stand-alone simulator is kind of a new product. This probably explains very poor interface and lack of many useful and, in fact, required features. For instance, you have to define initial conditions for all capacitors and inductors. I don't think this is acceptable for real engineering tool.

Anyway... so far, I don't know any simulator offering "ideal" component (or even close to "ideal"), and what is more important, providing reliable and fast simulation with those components. I tend to state that NL5 is the only one capable to do that. I'm not aware of any (reasonable) circuits that can not be simulated with NL5: it passed all the tests I designed, and I do not hear any complains from users. They are either happy or shy...

Dear NL5 users, please report problems you have: it would help further improving NL5 and make it more robust and useful for you and for thousands of other users! And please don't forget to download latest builds and revisions: you will definitely find something new and exiting.

Tuesday, March 23, 2010

NL5 - "Concept Proving" Tool

The main idea of NL and any other tool used for what I call "concept proving" is ability to

1) simulate schematic with true ideal components;
2) simulate schematic with arbitrary, even non-realistic, topology and component values;
3) have a minimal number (if any) of simulation parameters.

For instance, LTSpice gave a wrong solution for simple switching capacitors circuit, where I just tried to understand the principle, so I used ideal switches, floating capacitors with C=1F, and switching interval 1s. When I asked for explanation on one of LTSpice forums, I was literally accused of simulating "silly" circuits, "intentionally selecting difficult component values", and suggested to use "more reasonable" component values and parameters (TrTol, RelTol, etc.)

I don't think simulating silly circuits with unreasonable component values is a bad thing to do: this must be the only way to invent something really new or at least understand how things work. Of course it would be advantageous to have an easy to use and fast simulation tool as well, but this is another story...

Monday, March 22, 2010

Using circuit simulator in other disciplines

Here is an example of using NL5 for simulation in other disciplines using electrical analogy principle. If you know differential equations for the process - mechanical, heat transfer, fluid flow, whatever - and you know at least basics of electricity, it's not going to be much of a problem to find a correlation between two. Having simple ideal components, where none of parameters are hidden "under the hood" and component behaviour is clear and predicted - is absolutely required. And that's why NL5 is good for this type of analysis.

Sunday, March 21, 2010

Circuit Simulation Tools

(Some excerpts from discussion on LinkedIn)

I think a typical schematic design consists of 3 stages:

1. System level simulation
2. Schematic concept proving
3. Detailed analysis

Number 1 is testing the principle of a design on “block-diagram” level – no specific components/models, just functional blocks or equations. Not much choice of tools here: Matlab/Simulink/SimPowerSystems or PLECS (which is basically Simulink). Just use what your company purchased.

Let me jump to number 3: a huge selection of tools with wide ranges of features, performance, and prices (from free LTSpice to “multi-zeroes” Saber) are available, and almost all are SPICE-based. The best choice would be the one a) with the most accurate models, or at least ones you trust, b) that can perform all types of schematic analysis required by the company’s development process, and c) that can be integrated with other tools used by the company, such as PCB design, etc. In my opinion, in most companies engineers do not have much, if any, influence here. Depending on who makes a decision, the tool is selected based on either price (the higher the better :) or “shiny” ads and presentations. Maybe this is fine: since just ONE official tool for the company has to be selected, there will always be people who like it and who don’t. C’est la vie.

Number 2, I think, is the most important stage of a development. It is supposed to provide the right concept of a design prior to detailed analysis. Verifying your schematic idea with very simple “ideal” models you can catch and fix many essential schematic problems much quicker and easier, thus saving time, money, etc. And I believe that a “concept proving” tool MUST be personal engineer’s choice: the more comfortable the tool is to work with, the more efficient it is. I don’t think it’s going to be a problem for the company if engineers are using different tools – such a tool should be reasonably simple and cheap, no integration is needed, no models and libraries to support.

What candidates do we have on the market? Not much. I’m not considering SPICE-based simulators: even LTSpice, which is surprisingly very fast, failed at several simple schematics with ideal components. (And my personal opinion: the LTSpice interface is the worst I’ve ever seen). PSIM deals with ideal components, is fast, and provides AC response of switching circuits, which is good. But it also failed my tests with ideal components. SIMPLIS – I have not tested it yet. And, of course, NL5 – that’s why I’m writing all this :). By the way, although it is new to the public, the core of the NL algorithm was developed in the late 80s, and earlier DOS/Windows versions have been extensively used by a limited number of users since the 90s. It has been tested and proven, unlike many products announced for sale before they’re actually completed.

Friday, February 26, 2010

Right simulation tool: impressions from APEC-2010

This week I have presented NL5 Circuit Simulator at APEC-2010 exposition. Still under impression, so this note might be too emotional…

I talked to many engineers: “freelancers”, working for their own small companies, as well as employees of worldwide-known semiconductor “monsters”. I was prepared to discussions and arguments about why would anybody need anything other than old good SPICE. Unfortunately, I did not have a chance to demonstrate my “oratory” abilities: there was surprising consensus on what kind of simulation tool engineers really need, and what they are forced to use instead.

No doubt, SPICE-based simulators are more or less adequate for detailed analysis of circuits with accurate component models (hopefully… but who knows?). However, they are absolutely not suitable for development stage: i.e. evaluating a concept, proving basic functionality of a design, performing fast, reliable, and trusted simulation with very simple models. So far, I’ve not seen anybody happy with SPICE, even really advanced (and free!) LTSpice. Complains, complains - that’s all I’ve heard. Correct me if I’m wrong.

I’d like to ask engineers: if you do not like SPICE, why are you still using it? I’d like to ask managers and directors: do you aware of your engineers’ needs? Do you provide (or allow) engineers a right tool for efficient development? And what do you think right tool is?

Tuesday, October 20, 2009

6. Simulating switching circuits

Simulation with "ideal" components is not a new idea. Spice always had problems with switching circuits: SMPS (switching mode power supplies), switched capacitors, etc. In many cases, detailed and accurate simulation of switching process is not needed: a simple "On/Off" transistor model (i.e. ideal switch) with instant switching is quite appropriate to accurately predict circuit behavior. This is definitely a case when simplifying a component, rather then making it more real, is the only way to obtain a reliable result.

This approach has been described in many papers since 80's. However, there is no any real, reliable, publicly available tool so far. Why? Probably because there is a long way from an idea and a method, usually designed and tested for specific circuits only, to a software with convenient, user-friendly GUI, simulating any arbitrary schematic. Also, there is a mistaken belief that simulating circuits with simplified "ideal" components is easier than "real". This is not true: there are many problems, specific to "ideal" components, and simulation tool should be able to handle all of them.

Although Spice is doing much better now (I'd rather say: faster), it still fails on simple switching circuits. It actually does something, but results are wrong. Of course, there are some "knobs" (simulation and component parameters) you can adjust to make everything work right. However, as I said before, you have to realize a result is wrong, you have to know what to change, and how to change.

Monday, October 19, 2009

5. NL5 - "Concept Simulation" tool

This is an excerpt from NL5 presentation:

Concept Simulation is a process where design ideas are evaluated and iterated using fast and simple simulation tool. The result of this process is a schematic which is more complete and is ready for the rigorous and detailed SPICE simulation. This allows your SPICE simulation stage to be shorter and much more efficient.

In the Concept Simulation stage many iterations are performed in a short period of time, concurrent to the engineer’s thinking. A tool used for Concept Simulation should provide the
response extremely fast, preferably before the next idea comes into engineer’s mind. It needs to allow instantaneous modification of the design and starting of a new simulation with minimal delay. Under no circumstances should the simulator be a frustrating “bottleneck” in the process. The Concept Simulation tool must complement the engineer’s thinking, literally being a seamless and efficient add-on to the engineer’s brain.

NL5 meets all of these requirements well: it is easy to use, fast, and reliable, substantially due to its ability to work with ideal components.

Friday, October 16, 2009

4. NL="Never Lies". Why?

There are two sorts of "lie" in simulation world.

Number one is "not intentional": simulator "thinks" it does everything right, but due to many reasons the result is not correct. The reasons could be: approximation error of numerical integration method, arithmetic rounding errors, wrong simulation time step or other simulation parameters, etc. The only way to determine if the result is correct is to know upfront, or at least approximately expect, what correct result is, based on your knowledge, practical experience, and even common sense. Not a big deal for many engineers, but could be a real trouble for students. Of course, it would be not honest declaring NL5 "never lies" that way. However, many problems common for Spice do not exist, or significantly reduced in NL5. 1) Basically, except very rare situations, calculation step is the only simulation parameter user should set up. If result is in question, just run simulation several times (it's fast!) with different steps: repeatable and stable result is most likely right. 2) Most of wrong results happen at switching points, where voltages and currents are rapidly changing and very often show erroneous oscillations and overshoots. In NL5, with true instant switching of ideal components, this almost never happens. 3) It is much easier to predict how correct result should look like for a schematic with ideal components rather than complex "real" models.

Number two is "intentional". Due to limitations of Spice algorithm, it is not able to simulate arbitrary schematic with arbitrary component parameters. For instance, many simulators do not allow capacitors connected in parallel, inductors connected in series, floating schematics, etc. To solve the problem, some very small or very high resistors are added into schematic, and those "hidden" features are not indicated on the schematic. This might be OK as long as those additions do not affect results much, or you are familiar with the tool and know what to expect (and where in the program all the settings are located). Otherwise you may have a hard time to find out why results do not correspond to schematic. NL5 does not add anything into schematic and simulates exactly what you ask for: "what you see is what you get".

I've probably exaggerated those problems a bit... But I believe that for efficient and fast design everything you do must be clear and "transparent". There should be nothing "hidden" your have to remember or always keep in mind, especially if it is critical to simulation process. Any "hidden" thing is a potential source of error and misinterpreting, and if it may happen, some time it will.

Thursday, October 15, 2009

3. NL="No Limits". Why?

As a "concept simulation tool", NL5 is able to simulate any schematic ideas generated by engineer. First, there are "no limits" on circuit topology: you can do anything you want, and NL5 should successfully perform simulation even if such a schematic can not be implemented in real life. Second, there are "no limits" on component parameters: almost all of them can be set to zero, infinity, negative or positive values, and NL5 should handle that as well. And third, there are "no limits" on schematic operating range: voltage, current, time, and frequency. There are no any absolute or relative tolerance settings: picoamps and megaamps, nanovolts and gigavolts may exist in the same schematic at the same time.

In other words, NL5 does not expect engineer to do "right" things, and it does not limit engineer in what he is able to do. Instead, it allows evaluating any "silly" and "crazy" ideas with components that do not exist (at least today, but who knows about tomorrow...), and parameters that may not make sense in real life. While Spice simulation is very often limited by real world "rules and conditions", and thus it may easily fail if something is "not-real", NL5 is designed and optimized for "ideal" world of your imagination. It does not care what you do, it just gives you true results on schematic you entered. No questions asked.

I believe such a "no limits" capability is exactly what is needed for initial design process: quickly evaluate and iterate any "non-real" design ideas, and finally converge to "real" schematic, ready for rigorous Spice analysis.

Tuesday, October 13, 2009

2. Why ideal components?

As I already said, when engineer "evaluates" a new circuit idea in his mind, he is using ideal components. Why? Because it is much easier than dealing with real components. Although human's brain is quite powerful, it is more "optimized" for solving problems other than circuit simulation.

However, even with a computer capable to do real simulation, using ideal components would be very beneficial at the initial stage of a project. Why?

First, even if calculations are done by computer, an analysis of the simulation results will be performed by a human. With simple ideal components it would be much easier to understand how schematic is supposed to work, how parts of the schematics and individual components interact with each other, and how each component (or component's parameter) affects circuit functionality.

Second, even NL is not a perfect tool: all simulation algorithms and methods have some limitations and may introduce some inevitable errors while converting "real world" into numbers, manipulating those numbers, and finally presenting results. With real components, separating math "artifacts" from actual schematic problem could be a very difficult task. With ideal components, any "strange", non-expected schematic behavior could be analyzed better.

Third: although new Spice simulators are extremely fast, using simple components could definitely accelerate simulation a lot (of course, if simulator can handle ideal components properly). Engineer is designing a new schematic still in his head, using simulator as an external "add-on tool" to evaluate ideas. For productive work, simulator should be literally as fast as human's brain is: providing response as fast as possible and not to be a "bottleneck" in the design process.

Fourth:.. we'll find out more reasons later, while discussing what NL5 is.

Thursday, October 8, 2009

1. NL is not a Spice! (cont.)

1.3. What does NL5 do? I can imagine only 3 reasons why Spice could not simulate a schematic:
1) Schematic topology is absolutely wrong;
2) Schematic is correct, but component parameters are wrong;
3) Everything is correct, but Spice can not simulate...

NL can't do anything with #3: it is Spice responsibility to do things right. As for #1 and #2: a responsible party here is an engineer, who invents schematic, selects parts, and must guarantee workable solution for further Spice simulation. NL can help engineer to do this job quick and efficient.

How does engineer create a new schematic? Mostly in his head. Or on the sheet of paper with pencil and eraser. Or on the blackboard. In any case, all the calculations and evaluations are done in his brain in the form: "this diode is close, current goes here, capacitor is charged, switch opens...". Just note: no real parts here, only "diode", "switch", "OpAmp". Advantage of using NL on this stage of the project is that it is designed to do reliable simulation of schematics with ideal components: "diodes", "switches", "OpAmps", etc., and most of the time it does it well. Spice simulators can't do that reliably just because their algorithm is not designed for ideal components. Although some simulators claim that they can, very often they are failing at very simple schematics.

Wednesday, October 7, 2009

1. NL is not a Spice!

First of all, NL is not a Spice. Not only because the algorithm is different. In fact, the whole idea and purpose of NL is different.

1.1 What's the problem with Spice simulators? All Spice based simulators are designed for accurate simulation of schematics with real components, or at least what they think are real components. There are hundreds of libraries, thousands of component models, and an intention is: draw schematic with real parts, start simulation, and immediately see how your "real" prototype would work. This is definitely a very important step of the design process: it saves a lot of money, resources, and time.

Unfortunately, there are a lot of problems with Spice simulators: and don't trust anybody who says there are not. You may get used to it, you may learn how to avoid those problems, but they always exist.

The main problem is that when you enter a real schematic and try to simulate it, very often it does not work, or gives you a wrong result. Ok, ok: sometimes it does not work. But for some people: often; for me: very often; and I know people for whom it never works at first run. And for some types of schematics - 100% never works. Then you have to do a "magic": tweaking component values, simulation parameters, usually without understanding what you are doing, just to make it work. And when you see a wrong result, how do you know, is it a schematic problem, or Spice problem? Without experience, you don't. When you change some "tolerance" parameters and see different results, how can you trust those results at all? This is funny: you have to know what a correct result is in order to trust simulation results!

1.2 You still need Spice! Despite all those scary things, you still need Spice: when you have your schematic working as expected, Spice is a very good tool to do accurate analysis with parts variation, in required temperature range, etc. The question is: how to make your schematic work in Spice without doing much "magic"? How to get results you would trust? How to make Spice simulation stage of a project very efficient? This is exactly what NL was designed for.

to be continued...