Electronic circuit simulation

Last updated

Electronic circuit simulation uses mathematical models to replicate the behavior of an actual electronic device or circuit. Simulation software allows for the modeling of circuit operation and is an invaluable analysis tool. Due to its highly accurate modeling capability, many colleges and universities use this type of software for the teaching of electronics technician and electronics engineering programs. Electronics simulation software engages its users by integrating them into the learning experience. These kinds of interactions actively engage learners to analyze, synthesize, organize, and evaluate content and result in learners constructing their own knowledge. [1]

Contents

Simulating a circuit’s behavior before actually building it can greatly improve design efficiency by making faulty designs known as such, and providing insight into the behavior of electronic circuit designs. In particular, for integrated circuits, the tooling (photomasks) is expensive, breadboards are impractical, and probing the behavior of internal signals is extremely difficult. Therefore, almost all IC design relies heavily on simulation. The most well known analog simulator is SPICE. Probably the best known digital simulators are those based on Verilog and VHDL.

CircuitLogix electronics simulation software. CircuitLogix.jpg
CircuitLogix electronics simulation software.

Some electronics simulators integrate a schematic editor, a simulation engine, and an on-screen waveform display (see Figure 1), allowing designers to rapidly modify a simulated circuit and see what effect the changes have on the output. They also typically contain extensive model and device libraries. These models typically include IC specific transistor models such as BSIM, generic components such as resistors, capacitors, inductors and transformers, user defined models (such as controlled current and voltage sources, or models in Verilog-A or VHDL-AMS). Printed circuit board (PCB) design requires specific models as well, such as transmission lines for the traces and IBIS models for driving and receiving electronics.

Types

While there are strictly analog [2] electronics circuit simulators, popular simulators often include both analog and event-driven digital simulation [3] capabilities, and are known as mixed-mode or mixed-signal simulators if they can simulate both simultaneously. [4] An entire mixed signal analysis can be driven from one integrated schematic. All the digital models in mixed-mode simulators provide accurate specification of propagation time and rise/fall time delays.

The event-driven algorithm provided by mixed-mode simulators is general-purpose and supports non-digital types of data. For example, elements can use real or integer values to simulate DSP functions or sampled data filters. Because the event-driven algorithm is faster than the standard SPICE matrix solution, simulation time is greatly reduced for circuits that use event-driven models in place of analog models. [5]

Mixed-mode simulation is handled on three levels: with primitive digital elements that use timing models and the built-in 12 or 16 state digital logic simulator, with subcircuit models that use the actual transistor topology of the integrated circuit, and finally, with inline Boolean logic expressions.

Exact representations are used mainly in the analysis of transmission line and signal integrity problems where a close inspection of an IC’s I/O characteristics is needed. Boolean logic expressions are delay-less functions that are used to provide efficient logic signal processing in an analog environment. These two modeling techniques use SPICE to solve a problem while the third method, digital primitives, uses mixed mode capability. Each of these methods has its merits and target applications. In fact, many simulations (particularly those which use A/D technology) call for the combination of all three approaches. No one approach alone is sufficient.

Another type of simulation used mainly for power electronics represent piecewise linear [6] algorithms. These algorithms use an analog (linear) simulation until a power electronic switch changes its state. At this time a new analog model is calculated to be used for the next simulation period. This methodology both enhances simulation speed and stability significantly. [7]

Complexities

Process variations occur when the design is fabricated and circuit simulators often do not take these variations into account. These variations can be small, but taken together, they can change the output of a chip significantly.

Temperature variation can also be modeled to simulate the circuit's performance through temperature ranges. [8]

Simulation from admittance matrix

A common method of simulating linear circuits systems is with admittance matrices, or Y matrices. The technique involves modeling the individual linear components as an N port admittance matrix, inserting the component Y matrix into a circuits nodal admittance matrix, installing port terminations at nodes that contain ports, eliminating ports without nodes though Kron reduction, converting the final Y matrix to an S or Z matrix as needed, and extracting desired measurements from the Y, Z, and/or S matrix.

Simple Chebyshev filter example

A fifth order, 50 ohm, Chebyshev filter with 1dB of pass band ripple and cutoff frequency of 1GHz designed using the Chebyshev Cauar topology and subsequent impedance and frequency scaling produces the elements shown in the table and Micro-cap schematic below.

Chebyshev filter in Micro-cap schematic Chebyshev Filter 2.png
Chebyshev filter in Micro-cap schematic
Table of Chebyshev elements to simulate
elementg-valueTypescaled for

50 ohms and 1GHz

nodes
P11port501
L12.1348815inductor1.6988847E-081, 2
C11.0911073capacitor3.4731024E-122, 0
L23.0009229inductor2.3880586E-082, 3
C21.0911073capacitor3.4731024E-123, 0
L32.1348815inductor1.6988847E-083, 4
P21port504

Modeling the 2 port Y parameters

The table above provides a list of ideal elements to model along with a node attachments to simulate. Next, each non-port element must be converted into a 2X2 Y parameter model for each frequency to be simulated. For this example, a frequency of 1GHz is selected.

Elements connected to node 0, the ground node, do not need their respective Y12 or Y21 calculated, and are shown as "n/a" in the table.

Table of Chebyshev element Y parameters at 1GHz to simulate
elementadmittance at 1GHzY11, Y22 at 1GHzY12, Y21 at 1GHznodes
P1n/an/an/a1
L1-J0.0093682013-J0.0093682013J0.00936820131, 2
C1j0.021822146j0.021822146n/a2, 0
L2-J0.0066646164-J0.0066646164J0.00666461642, 3
C2j0.021822146j0.021822146n/a3, 0
L3-J0.0093682013-J0.0093682013J0.00936820133, 4
P2n/an/an/a4

Inserting the 2 port Y parameters into the nodal admittance matrix

It should be remembered that while Ideal inductor and capacitor modals consist of very simple 2x2 models where Y11 = Y22 = -Y12 = -Y21, most real world elements cannot be modeled so simply. With transmission lines and real world inductor and capacitor models, for example, Y11 != -Y12, and for some more complex passive asymmetric elements Y11 != Y22. For many active linear devices, such as operational amplifiers, Y12 != Y21. Therefore, the example in this section uses independent Y11, Y12, Y21, and Y22 to illustrate the simulation processes that applies to more complex real world devices.

Each element Y parameter is inserted into the nodal admittance matrix by summing in them into the nodes they are attached to following the rules below. [9]

  • Y11 is summed into the n x n node in the diagonal, where n is the node that the first pin, pin 1, is attached to.

If the second node is not 0, that is, not a ground:

  • Y22 is summed into the m x m node in the diagonal, where m is the node that the second pin, pin 2, is attached to.
  • Y12 is summed into the n x m node location
  • Y21 is summed into the m x n node location

The table below shows the Chebyshev element 2x2 Y parameters summed in at the appropriate locations.

Table of Y parameter entries
node1234
1L1_Y11L1_Y12
2L1_Y21L1_Y22+C1_Y11+L2_Y11L2_Y12
3L2_Y21L2_Y22+C2_Y11+L3_Y11L3_Y12
5L3_Y21L3_Y22

Nodal admittance matrix numerical entries

To simulate the filter at 1GHz, or any frequency, the element Y parameters must be converted to numerical entries using Y parameter models appropriate for the element installed. For ideal inductors and capacitors, the well known Y11 = Y22 = -Y12 = -Y21 = for inductors and Y11 = Y22 = -Y12 = -Y21 = for capacitors are sufficient. The numerical conversion are shown in the table below.

Table of numerical Y parameters at 1GHz
node1234
1-j0.00936820.0093682
20.0093682j0.00578933j0.00666462
3j0.00666462j0.005789330.0093682
40.0093682-j0.0093682

Removing internal nodes

Since ports are only attached to node 1 and node 4, nodes 2 and 3 need to be removed through Kron reduction. The table below shows the reduced Y parameter matrix of the Chebyshev filter example simulation after nodes 2 and 4 are eliminated. The nodes of the reduced table are renumbered to 1 and 2.

Table of Kron Reduced numerical Y parameters at 1GHz
node12
1j0.0372422-j0.0536574
2-j0.0536574j0.0372422

Converting to an S parameter matrix

Since the Chebyshev frequency response is observed from the S parameter matrix, namely |S12|, the next step is to convert the Y parameter matrix to an S parameter matrix, using well known Y matrix to S matrix conversions with the port impedance as the characteristic impedance (or characteristic admittance) for each node.

Simulated S parameters also allow for useful post simulation processing for things such as group delay and phase delay.

Table of S parameters with 50 ohm terminations at 1GHz
node12
1-0.356328 + j0.2805390.551322 + j0.700266
20.551322 + j0.700266-0.356328 + j0.280539

S parameter magnitudes

Since the Chebyshev frequency response is expected to be observable in |S12| as a 1dB equi-ripple response from 0 to 1GHz, the complex S parameter entries need to be converted to their respective magnitudes, using the standard .

S parameters with 50 ohm terminations at 1GHz
node12
10.453510500.89125104
20.891251040.45351050

Check the results

It may be useful to do some quick validity checks at this point. Since the example Chebyshev filter design requirement is for -1dB attenuation at the cutoff frequency of 1GHz, |S12| at 1 GHz is expected to be -1dB. Furthermore, since all simulation elements are lossless, the well known relation, |S11|2+|S12|2 = 1 [10] applies at all frequencies, including 1GHz.

Simulation validity Tests at 1GHz
required conditionactual resultsStatus
120log10(|S12|) = -1dB20log10(0.89125104) = -1dBValid
2|S12|2+|S12|2 = 10.453510502+0.891251042 = 1Valid

Full frequency simulation

Chebyshev filter example simulation Chebyshev Example Simulation 2.png
Chebyshev filter example simulation

The final validity test for the example is to simulate the Chebyshev filter frequency response through the full useful range, which will be taken to be 100 MHz to 5 GHz for this case. This range should permit viewing of the equi-ripple |S12| of the pass band between 0 and -1 dB, somewhat steep stop band |S12| falling off at 1GHz, and an equi-ripple |S12| at the expected peak values of 20log10(.4535...) = -6.86825 dB.

Since all simulation outputs conform to the expected results, the Chebyshev filter example simulation is confirmed to be correct.

Simulating unterminated nodes

Since S parameters require terminations on all nodes being simulated, simulating the S parameter value for unterminated nodes, such as the internal nodes of a network, are technically unsupported. However, placing a resistive termination on unterminated nodes that is large enough to not introduce any error of significance to make the nodes terminated is sufficient to accurately simulate the node. For example, the two internal nodes that were eliminated above could alternatively have had a 1e+09 ohm port attached to them, so instead of using Kron reduction to eliminate the nodes, the nodes could be accurately simulated with excessively large resistive ports.

Simulating zero resistance sources

If the input source to the network is an ideal voltage source with no resistance, the example above may be made to work by including a port resistance small enough to not introduce any error of significance. For example, a port with a resistance of 1e-09 in a network that is terminated elsewhere by 50 ohms would model an ideal source with sufficient accuracy.

Simulating the transfer function

Since the example above simulates S parameters, another conversion is necessary to obtain the transfer function from S parameters. The conversion is, . [10]

See also

Concepts:

HDL:

Lists:

Software:

Related Research Articles

<span class="mw-page-title-main">Electrical network</span> Assemblage of connected electrical elements

An electrical network is an interconnection of electrical components or a model of such an interconnection, consisting of electrical elements. An electrical circuit is a network consisting of a closed loop, giving a return path for the current. Thus all circuits are networks, but not all networks are circuits. Linear electrical networks, a special type consisting only of sources, linear lumped elements, and linear distributed elements, have the property that signals are linearly superimposable. They are thus more easily analyzed, using powerful frequency domain methods such as Laplace transforms, to determine DC response, AC response, and transient response.

<span class="mw-page-title-main">Capacitive coupling</span> Transfer of energy between circuits

Capacitive coupling is the transfer of energy within an electrical network or between distant networks by means of displacement current between circuit(s) nodes, induced by the electric field. This coupling can have an intentional or accidental effect.

<span class="mw-page-title-main">Transmission line</span> Cable or other structure for carrying radio waves

In electrical engineering, a transmission line is a specialized cable or other structure designed to conduct electromagnetic waves in a contained manner. The term applies when the conductors are long enough that the wave nature of the transmission must be taken into account. This applies especially to radio-frequency engineering because the short wavelengths mean that wave phenomena arise over very short distances. However, the theory of transmission lines was historically developed to explain phenomena on very long telegraph lines, especially submarine telegraph cables.

A low-pass filter is a filter that passes signals with a frequency lower than a selected cutoff frequency and attenuates signals with frequencies higher than the cutoff frequency. The exact frequency response of the filter depends on the filter design. The filter is sometimes called a high-cut filter, or treble-cut filter in audio applications. A low-pass filter is the complement of a high-pass filter.

SPICE is a general-purpose, open-source analog electronic circuit simulator. It is a program used in integrated circuit and board-level design to check the integrity of circuit designs and to predict circuit behavior.

<span class="mw-page-title-main">Two-port network</span> Electric circuit with two pairs of terminals

In electronics, a two-port network is an electrical network or device with two pairs of terminals to connect to external circuits. Two terminals constitute a port if the currents applied to them satisfy the essential requirement known as the port condition: the current entering one terminal must equal the current emerging from the other terminal on the same port. The ports constitute interfaces where the network connects to other networks, the points where signals are applied or outputs are taken. In a two-port network, often port 1 is considered the input port and port 2 is considered the output port.

<span class="mw-page-title-main">Electronic filter</span> Electronic device

Electronic filters are a type of signal processing filter in the form of electrical circuits. This article covers those filters consisting of lumped electronic components, as opposed to distributed-element filters. That is, using components and interconnections that, in analysis, can be considered to exist at a single point. These components can be in discrete packages or part of an integrated circuit.

Transistors are simple devices with complicated behavior. In order to ensure the reliable operation of circuits employing transistors, it is necessary to scientifically model the physical phenomena observed in their operation using transistor models. There exists a variety of different models that range in complexity and in purpose. Transistor models divide into two major groups: models for device design and models for circuit design.

<span class="mw-page-title-main">Ngspice</span> Analog circuit simulator software

Ngspice is an open-source mixed-level/mixed-signal electronic circuit simulator. It is a successor of the latest stable release of Berkeley SPICE, version 3f.5, which was released in 1993. A small group of maintainers and the user community contribute to the ngspice project by providing new features, enhancements and bug fixes.

<span class="mw-page-title-main">Quite Universal Circuit Simulator</span>

Quite Universal Circuit Simulator (Qucs) is a free-software electronics circuit simulator software application released under GPL. It offers the ability to set up a circuit with a graphical user interface and simulate the large-signal, small-signal and noise behaviour of the circuit. Pure digital simulations are also supported using VHDL and/or Verilog. Only a small set of digital devices like flip flops and logic gates can be used with analog circuits. Qucs uses its own SPICE-incompatible backend simulator Qucsator, however the Qucs-S fork supports some SPICE backends.

A switched capacitor (SC) is an electronic circuit that implements a function by moving charges into and out of capacitors when electronic switches are opened and closed. Usually, non-overlapping clock signals are used to control the switches, so that not all switches are closed simultaneously. Filters implemented with these elements are termed switched-capacitor filters, which depend only on the ratios between capacitances and the switching frequency, and not on precise resistors. This makes them much more suitable for use within integrated circuits, where accurately specified resistors and capacitors are not economical to construct, but accurate clocks and accurate relative ratios of capacitances are economical.

Verilog-AMS is a derivative of the Verilog hardware description language that includes Analog and Mixed-Signal extensions (AMS) in order to define the behavior of analog and mixed-signal systems. It extends the event-based simulator loops of Verilog/SystemVerilog/VHDL, by a continuous-time simulator, which solves the differential equations in analog-domain. Both domains are coupled: analog events can trigger digital actions and vice versa.

Verilog-A is an industry standard modeling language for analog circuits. It is the continuous-time subset of Verilog-AMS. A few commercial applications may export MEMS designs in Verilog-A format.

<span class="mw-page-title-main">CircuitLogix</span> Electronic circuit simulator software

CircuitLogix is a software electronic circuit simulator which uses PSpice to simulate thousands of electronic devices, models, and circuits. CircuitLogix supports analog, digital, and mixed-signal circuits, and its SPICE simulation gives accurate real-world results. The graphic user interface allows students to quickly and easily draw, modify and combine analog and digital circuit diagrams. CircuitLogix was first launched in 2005, and its popularity has grown quickly since that time. In 2012, it reached the milestone of 250,000 licensed users, and became the first electronics simulation product to have a global installed base of a quarter-million customers in over 100 countries.

Simulation software is based on the process of modeling a real phenomenon with a set of mathematical formulas. It is, essentially, a program that allows the user to observe an operation through simulation without actually performing that operation. Simulation software is used widely to design equipment so that the final product will be as close to design specs as possible without expensive in process modification. Simulation software with real-time response is often used in gaming, but it also has important industrial applications. When the penalty for improper operation is costly, such as airplane pilots, nuclear power plant operators, or chemical plant operators, a mock up of the actual control panel is connected to a real-time simulation of the physical response, giving valuable training experience without fear of a disastrous outcome.

<span class="mw-page-title-main">LTspice</span> Circuit simulation software

LTspice is a SPICE-based analog electronic circuit simulator computer software, produced by semiconductor manufacturer Analog Devices. It is the most widely distributed and used SPICE software in the industry. Though it is freeware, it is not artificially restricted to limit its abilities. It ships with a library of SPICE models from Analog Devices, Linear Technology, Maxim Integrated, and third-party sources.

<span class="mw-page-title-main">Ken Kundert</span> Creator of Spectre, SpectreRF, and Verilog-A; pioneer of analog verification

Kenneth S. Kundert is an engineer who is most well known for his work in the area of Electronic Design Automation (EDA). He studied electrical engineering at the University of California, Berkeley under professors Alberto Sangiovanni-Vincentelli and Robert G. Meyer and received his doctorate in 1989. During this time, he created the circuit simulator that eventually became the Advanced Design System from what is now PathWave Design and the Spectre circuit simulator from Cadence Design Systems.

SystemC AMS is an extension to SystemC for analog, mixed-signal and RF functionality. The SystemC AMS 2.0 standard was released on April 6, 2016 as IEEE Std 1666.1-2016.

In power engineering, Kron reduction is a method used to reduce or eliminate the desired node without need of repeating the steps like in Gaussian elimination.

Reciprocity in electrical networks is a property of a circuit that relates voltages and currents at two points. The reciprocity theorem states that the current at one point in a circuit due to a voltage at a second point is the same as the current at the second point due to the same voltage at the first. The reciprocity theorem is valid for almost all passive networks. The reciprocity theorem is a feature of a more general principle of reciprocity in electromagnetism.

References

  1. "Disadvantages and Advantages of Simulations in Online Education". Archived from the original on 2010-12-16. Retrieved 2011-03-11.
  2. Mengue and Vignat, Entry in the University of Marne, at Vallee
  3. Fishwick, P. "Entry in the University of Florida". Archived from the original on 2000-05-19.
  4. Pedro, J; Carvalho, N. "Entry in the Universidade de Aveiro, Portugal" (PDF). Archived from the original (PDF) on 2012-02-07. Retrieved 2007-04-27.
  5. L. Walken and M. Bruckner, Event-Driven Multimodal Technology Archived 2007-05-05 at the Wayback Machine
  6. Pejovic, P.; Maksimovic, D. (May 13, 1995). "A new algorithm for simulation of power electronic systems using piecewise-linear device models". IEEE Transactions on Power Electronics. 10 (3): 340–348. Bibcode:1995ITPE...10..340P. doi:10.1109/63.388000 via IEEE Xplore.
  7. Allmeling, J.H.; Hammer, W.P. (July 13, 1999). "PLECS-piece-wise linear electrical circuit simulation for Simulink". Proceedings of the IEEE 1999 International Conference on Power Electronics and Drive Systems. PEDS'99 (Cat. No.99TH8475). Vol. 1. pp. 355–360 vol.1. doi:10.1109/PEDS.1999.794588. ISBN   0-7803-5769-8. S2CID   111196369 via IEEE Xplore.
  8. Ohnari, Mikihiko (1998). Simulation engineering. Ohmsha. ISBN   9784274902178 . Retrieved October 12, 2022.
  9. Zelinger, G. (1966). Basic Matrix Analysis and Synthesis. Oxford, London, Edinburgh, New York, Toronto, Paris, Braunschweig: Pergamon Press, Ltd. pp. 45–58. ISBN   9781483199061.
  10. 1 2 Matthaei, George L.; Young, Leo; Jones, E. M. T. (1984). Microwave Filters, Impudence-Matching Networks, and Coupling Structures. 610 Washington Street, Dedham, Massachusetts, US: Artech House, Inc. (published 1985). p. 44. ISBN   0-89006-099-1.{{cite book}}: CS1 maint: location (link)