Hi, All
Do we have ideal switches in QSPICE like other simulators have. Bcoz simulation doesn’t run in Qspice when we don’t select any mosfet model from selection guide. For example running a buck converter.
Hi, All
Do we have ideal switches in QSPICE like other simulators have. Bcoz simulation doesn’t run in Qspice when we don’t select any mosfet model from selection guide. For example running a buck converter.
How we will do that in case of synchronous buck converter. since there is grounding issue with top switch.
Thanks a lot for your buck model. @ivan1
I consider Ideal switch as Ron=0 and Roff = infinity, No power loss, infinite switching speed.
@Mike2 ,
QSpice and other circuit simulators don’t operate well (or at all) with Ron=0 and Roff=infinity. (It’s an analog thing.) The “kind-of” exception is a “wire” = 0 ohms and a no connect across nodes is infinity. They resolve the analog problem by creating a correct netlist.
However, with the SW component you can come close to 0 ohms and infinity ohms.
Here’s an example of a SW model.
.model SWideal(Ron=1f Roff=1T Vt=0.5 Vh=0.2)
This is where 1f = 1e-15 ohms and 1T = 1e15 ohms.
Not quite 0 and infinity but practically close enough. You can make them closer by using 0.001f and 100T.
Len
PS: Infinite switching speed is also not practical in a simulator. However, you can define a MaxTimeStep of 1f seconds. It makes the simulate take a very long time to compute. There are other ways to improve switching time computations where the sim time is not so long. That is a discussion for another time.
There are mainly two types of simulators. People often compare them, but in reality, they are very different things. For PWL-based simulator, they can handle ideal device but in general not handle physical device characteristic.
SPICE-based and PWL-based
There are primarily two different circuit simulation concepts
SPICE-based models device equations. To simulate a near-ideal device, it generally requires more attention and a higher level of understanding of how to set up the simulation as it was not designed to handle discontinuity in I-V curves
PWL simulation engines model devices with piecewise linear functions and focus on resolving ideal switching circuit elements. They are designed to handle steep I-V curves
And with which simulator is better to stay in between the two?
@Cornel As an engineer, the key is to understand what tools exist, why they exist, and when to use them. Here is a reference that explains SPICE-based and PWL-based simulation for power electronics circuits from Synopsys: Comprehensive Simulation of Power Electronics Systems
@Mike2 question is about simulation with Ideal Switches. In general, the need for simulation with Ideal Switches is mainly related to simulating Power Electronics Circuits. If you recall your learning path in the Power Electronics, you start with Ideal Devices to develop various circuit topology, but eventually you realize that in the real world, no such device exists, and you have to consider how the topology works with actual physical devices.
PWL-based uses Piecewise-Linear circuit model as it mainly focus on simulating power electronics circuit and can prevent the stiff nature of power electronics circuits can cause difficult convergence for SPICE-like tools.
SPICE - “Simulation Program with Integrated Circuit Emphasis” was initially developed to simulate integrated circuit devices, with its major focus being to replicate real-world characteristics. The famous “timestep too small” issue in SPICE simulation is a kind of challenge that arises when it has to handle stiff I-V curve devices. This is why we have to prevent to setup a switch with Ron=1f and Roff=1T as it only to present a non-necessary challenge to SPICE simulation.
However, as far as I know, all famous PWL-based simulators are NOT completely free (or free with feature limitations). The same situation applies to SPICE-based simulators, even though Berkeley SPICE is free to use. This is what makes Mike Engelhardt’s work very special. He developed LTspice and Qspice, allowing the SPICE engine (LTspice) to run power electronics simulations, free to be used, and allowing the use of other manufacturer models. Currently, Qspice takes this to the next level.
With all these, my point is that you should study the tool you are using, its strengths, weaknesses, limitations, and trade-offs. You may have to consider different simulators for different tasks. For example, I work in industry, and 90% of the time, LTspice or Qspice is the best choice for my work. However, when I was pursuing my research degree many years ago, a PWL-based simulator (e.g., PSIM) was the best option.